LCOV - code coverage report
Current view: top level - src/materials - PorousFlowRelativePermeabilityBC.C (source / functions) Hit Total Coverage
Test: porous_flow Test Coverage Lines: 20 20 100.0 %
Date: 2017-11-21 14:47:27 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 "PorousFlowRelativePermeabilityBC.h"
       9             : #include "PorousFlowBrooksCorey.h"
      10             : 
      11             : template <>
      12             : InputParameters
      13           8 : validParams<PorousFlowRelativePermeabilityBC>()
      14             : {
      15           8 :   InputParameters params = validParams<PorousFlowRelativePermeabilityBase>();
      16          24 :   params.addRequiredParam<Real>("lambda", "The Brooks-Corey exponent of the phase");
      17          24 :   params.addParam<bool>("nw_phase", false, "Set true if this is the non-wetting phase");
      18          16 :   params.addClassDescription("Brooks-Corey relative permeability");
      19           8 :   return params;
      20             : }
      21             : 
      22          24 : PorousFlowRelativePermeabilityBC::PorousFlowRelativePermeabilityBC(
      23          24 :     const InputParameters & parameters)
      24             :   : PorousFlowRelativePermeabilityBase(parameters),
      25          72 :     _lambda(getParam<Real>("lambda")),
      26         120 :     _is_nonwetting(getParam<bool>("nw_phase"))
      27             : {
      28          24 : }
      29             : 
      30             : Real
      31       19680 : PorousFlowRelativePermeabilityBC::relativePermeability(Real seff) const
      32             : {
      33       19680 :   if (_is_nonwetting)
      34        9840 :     return PorousFlowBrooksCorey::relativePermeabilityNW(seff, _lambda);
      35             :   else
      36        9840 :     return PorousFlowBrooksCorey::relativePermeabilityW(seff, _lambda);
      37             : }
      38             : 
      39             : Real
      40       19680 : PorousFlowRelativePermeabilityBC::dRelativePermeability(Real seff) const
      41             : {
      42       19680 :   if (_is_nonwetting)
      43        9840 :     return PorousFlowBrooksCorey::dRelativePermeabilityNW(seff, _lambda);
      44             :   else
      45        9840 :     return PorousFlowBrooksCorey::dRelativePermeabilityW(seff, _lambda);
      46        2499 : }

Generated by: LCOV version 1.11