LCOV - code coverage report
Current view: top level - src/userobjects - PorousFlowCapillaryPressureBW.C (source / functions) Hit Total Coverage
Test: porous_flow Test Coverage Lines: 27 35 77.1 %
Date: 2017-11-21 14:47:27 Functions: 7 10 70.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 "PorousFlowCapillaryPressureBW.h"
       9             : #include "PorousFlowBroadbridgeWhite.h"
      10             : 
      11             : template <>
      12             : InputParameters
      13           3 : validParams<PorousFlowCapillaryPressureBW>()
      14             : {
      15           3 :   InputParameters params = validParams<PorousFlowCapillaryPressure>();
      16          12 :   params.addRequiredRangeCheckedParam<Real>(
      17             :       "Sn",
      18             :       "Sn >= 0",
      19             :       "Low saturation.  This must be < Ss, and non-negative.  This is BW's "
      20             :       "initial effective saturation, below which effective saturation never goes "
      21             :       "in their simulations/models.  If Kn=0 then Sn is the immobile saturation.  "
      22           3 :       "This form of effective saturation is only correct for Kn small.");
      23          12 :   params.addRangeCheckedParam<Real>(
      24             :       "Ss",
      25             :       1.0,
      26             :       "Ss <= 1",
      27             :       "High saturation.  This must be > Sn and <= 1.  Effective saturation "
      28             :       "where porepressure = 0.  Effective saturation never exceeds this "
      29           3 :       "value in BW's simulations/models.");
      30          12 :   params.addRequiredRangeCheckedParam<Real>(
      31           3 :       "C", "C > 1", "BW's C parameter.  Must be > 1.  Typical value would be 1.05.");
      32          12 :   params.addRequiredRangeCheckedParam<Real>(
      33             :       "las",
      34             :       "las > 0",
      35             :       "BW's lambda_s parameter multiplied by (fluid_density * gravity).  Must be "
      36           3 :       "> 0.  Typical value would be 1E5");
      37           6 :   params.addClassDescription("Broadbridge and White capillary pressure for negligable Kn");
      38           3 :   return params;
      39             : }
      40             : 
      41           3 : PorousFlowCapillaryPressureBW::PorousFlowCapillaryPressureBW(const InputParameters & parameters)
      42             :   : PorousFlowCapillaryPressure(parameters),
      43           9 :     _sn(getParam<Real>("Sn")),
      44           9 :     _ss(getParam<Real>("Ss")),
      45           9 :     _c(getParam<Real>("C")),
      46          21 :     _las(getParam<Real>("las"))
      47             : {
      48           3 :   if (_ss <= _sn)
      49           0 :     mooseError("In BW effective saturation Sn set to ",
      50             :                _sn,
      51             :                " and Ss set to ",
      52             :                _ss,
      53           0 :                " but these must obey Ss > Sn");
      54             : 
      55             :   // Set _log_ext to false as no capillary pressure curves are implmented in this class
      56           3 :   _log_ext = false;
      57           3 : }
      58             : 
      59           0 : Real PorousFlowCapillaryPressureBW::capillaryPressureCurve(Real /*saturation*/) const
      60             : {
      61           0 :   mooseError("PorousFlowCapillaryPressureBW::capillaryPressure not implemented");
      62             :   return 0.0;
      63             : }
      64             : 
      65           0 : Real PorousFlowCapillaryPressureBW::dCapillaryPressureCurve(Real /*saturation*/) const
      66             : {
      67           0 :   mooseError("PorousFlowCapillaryPressureBW::dCapillaryPressure not implemented");
      68             :   return 0.0;
      69             : }
      70             : 
      71           0 : Real PorousFlowCapillaryPressureBW::d2CapillaryPressureCurve(Real /*saturation*/) const
      72             : {
      73           0 :   mooseError("PorousFlowCapillaryPressureBW::d2CapillaryPressure not implemented");
      74             :   return 0.0;
      75             : }
      76             : 
      77             : Real
      78      630594 : PorousFlowCapillaryPressureBW::effectiveSaturation(Real pc) const
      79             : {
      80      630594 :   return PorousFlowBroadbridgeWhite::effectiveSaturation(pc, _c, _sn, _ss, _las);
      81             : }
      82             : 
      83             : Real
      84      626594 : PorousFlowCapillaryPressureBW::dEffectiveSaturation(Real pc) const
      85             : {
      86      626594 :   return PorousFlowBroadbridgeWhite::dEffectiveSaturation(pc, _c, _sn, _ss, _las);
      87             : }
      88             : 
      89             : Real
      90      313102 : PorousFlowCapillaryPressureBW::d2EffectiveSaturation(Real pc) const
      91             : {
      92      313102 :   return PorousFlowBroadbridgeWhite::d2EffectiveSaturation(pc, _c, _sn, _ss, _las);
      93        2499 : }

Generated by: LCOV version 1.11