LCOV - code coverage report
Current view: top level - src/materials - PorousFlowRelativePermeabilityBW.C (source / functions) Hit Total Coverage
Test: porous_flow Test Coverage Lines: 29 33 87.9 %
Date: 2017-11-21 09:41:48 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 "PorousFlowRelativePermeabilityBW.h"
       9             : 
      10             : template <>
      11             : InputParameters
      12           3 : validParams<PorousFlowRelativePermeabilityBW>()
      13             : {
      14           3 :   InputParameters params = validParams<PorousFlowRelativePermeabilityBase>();
      15          12 :   params.addRequiredRangeCheckedParam<Real>(
      16             :       "Sn",
      17             :       "Sn >= 0",
      18             :       "Low saturation.  This must be < Ss, and non-negative.  This is BW's "
      19             :       "initial effective saturation, below which effective saturation never goes "
      20             :       "in their simulations/models.  If Kn=0 then Sn is the immobile saturation.  "
      21           3 :       "This form of effective saturation is only correct for Kn small.");
      22          12 :   params.addRangeCheckedParam<Real>(
      23             :       "Ss",
      24             :       1.0,
      25             :       "Ss <= 1",
      26             :       "High saturation.  This must be > Sn and <= 1.  Effective saturation "
      27             :       "where porepressure = 0.  Effective saturation never exceeds this "
      28           3 :       "value in BW's simulations/models.");
      29          12 :   params.addRequiredRangeCheckedParam<Real>(
      30           3 :       "Kn", "Kn >= 0", "Low relative permeability.  This must be < Ks, and non-negative.");
      31          12 :   params.addRequiredRangeCheckedParam<Real>(
      32           3 :       "Ks", "Ks <= 1", "High relative permeability.  This must be > Kn and less than unity");
      33          12 :   params.addRequiredRangeCheckedParam<Real>(
      34           3 :       "C", "C > 1", "BW's C parameter.  Must be > 1.  Typical value would be 1.05.");
      35           6 :   params.addClassDescription("Broadbridge-White form of relative permeability");
      36           3 :   return params;
      37             : }
      38             : 
      39           9 : PorousFlowRelativePermeabilityBW::PorousFlowRelativePermeabilityBW(
      40           9 :     const InputParameters & parameters)
      41             :   : PorousFlowRelativePermeabilityBase(parameters),
      42          27 :     _sn(getParam<Real>("Sn")),
      43          27 :     _ss(getParam<Real>("Ss")),
      44          27 :     _kn(getParam<Real>("Kn")),
      45          27 :     _ks(getParam<Real>("Ks")),
      46          72 :     _c(getParam<Real>("C"))
      47             : {
      48           9 :   if (_ss <= _sn)
      49           0 :     mooseError("In BW relative permeability Sn set to ",
      50             :                _sn,
      51             :                " and Ss set to ",
      52             :                _ss,
      53           0 :                " but these must obey Ss > Sn");
      54           9 :   if (_ks <= _kn)
      55           0 :     mooseError("In BW relative permeability Kn set to ",
      56             :                _kn,
      57             :                " and Ks set to ",
      58             :                _ks,
      59           0 :                " but these must obey Ks > Kn");
      60           9 : }
      61             : 
      62             : Real
      63      313492 : PorousFlowRelativePermeabilityBW::relativePermeability(Real seff) const
      64             : {
      65      313492 :   return PorousFlowBroadbridgeWhite::relativePermeability(seff, _c, _sn, _ss, _kn, _ks);
      66             : }
      67             : 
      68             : Real
      69      313492 : PorousFlowRelativePermeabilityBW::dRelativePermeability(Real seff) const
      70             : {
      71      313492 :   return PorousFlowBroadbridgeWhite::dRelativePermeability(seff, _c, _sn, _ss, _kn, _ks);
      72        2499 : }

Generated by: LCOV version 1.11