LCOV - code coverage report
Current view: top level - src/materials - PorousFlowRelativePermeabilityCorey.C (source / functions) Hit Total Coverage
Test: porous_flow Test Coverage Lines: 15 15 100.0 %
Date: 2017-11-18 13:30:36 Functions: 6 6 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /****************************************************************/
       2             : /* MOOSE - Multiphysics Object Oriented Simulation Environment  */
       3             : /*                                                              */
       4             : /*          All contents are licensed under LGPL V2.1           */
       5             : /*             See LICENSE for full restrictions                */
       6             : /****************************************************************/
       7             : 
       8             : #include "PorousFlowRelativePermeabilityCorey.h"
       9             : 
      10             : template <>
      11             : InputParameters
      12         185 : validParams<PorousFlowRelativePermeabilityCorey>()
      13             : {
      14         185 :   InputParameters params = validParams<PorousFlowRelativePermeabilityBase>();
      15         555 :   params.addRequiredParam<Real>("n", "The Corey exponent of the phase.");
      16         370 :   params.addClassDescription("This Material calculates relative permeability of the fluid phase, "
      17         185 :                              "using the simple Corey model ((S-S_res)/(1-sum(S_res)))^n");
      18         185 :   return params;
      19             : }
      20             : 
      21         555 : PorousFlowRelativePermeabilityCorey::PorousFlowRelativePermeabilityCorey(
      22         555 :     const InputParameters & parameters)
      23        1665 :   : PorousFlowRelativePermeabilityBase(parameters), _n(getParam<Real>("n"))
      24             : {
      25         555 : }
      26             : 
      27             : Real
      28     4008736 : PorousFlowRelativePermeabilityCorey::relativePermeability(Real seff) const
      29             : {
      30     4008736 :   return std::pow(seff, _n);
      31             : }
      32             : 
      33             : Real
      34     4008736 : PorousFlowRelativePermeabilityCorey::dRelativePermeability(Real seff) const
      35             : {
      36     4008736 :   return _n * std::pow(seff, _n - 1.0);
      37        2499 : }

Generated by: LCOV version 1.11