LCOV - code coverage report
Current view: top level - src/materials - PorousFlow1PhaseP_BW.C (source / functions) Hit Total Coverage
Test: porous_flow Test Coverage Lines: 1 29 3.4 %
Date: 2017-11-17 17:48:31 Functions: 2 7 28.6 %
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 "PorousFlow1PhaseP_BW.h"
       9             : #include "libmesh/utility.h"
      10             : 
      11             : template <>
      12             : InputParameters
      13           0 : validParams<PorousFlow1PhaseP_BW>()
      14             : {
      15           0 :   InputParameters params = validParams<PorousFlow1PhaseP>();
      16           0 :   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           0 :       "This form of effective saturation is only correct for Kn small.");
      23           0 :   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           0 :       "value in BW's simulations/models.");
      30           0 :   params.addRequiredRangeCheckedParam<Real>(
      31           0 :       "C", "C > 1", "BW's C parameter.  Must be > 1.  Typical value would be 1.05.");
      32           0 :   params.addRequiredRangeCheckedParam<Real>(
      33             :       "las",
      34             :       "las > 0",
      35             :       "BW's lambda_s parameter multiplied by (fluid_density * gravity).  Must be "
      36           0 :       "> 0.  Typical value would be 1E5");
      37           0 :   params.addClassDescription("Broadbridge-white form of effective saturation for negligable Kn.  "
      38             :                              "Then porepressure = -las * ((1 - th) / th - (1 / c) * Ln((C - "
      39             :                              "th)/((C - 1) * th))), for th = (Seff - Sn) / (Ss - Sn).  A Lambert-W "
      40             :                              "function must be evaluated to express Seff in terms of porepressure, "
      41           0 :                              "which can be expensive");
      42           0 :   return params;
      43             : }
      44             : 
      45           0 : PorousFlow1PhaseP_BW::PorousFlow1PhaseP_BW(const InputParameters & parameters)
      46             :   : PorousFlow1PhaseP(parameters),
      47           0 :     _sn(getParam<Real>("Sn")),
      48           0 :     _ss(getParam<Real>("Ss")),
      49           0 :     _c(getParam<Real>("C")),
      50           0 :     _las(getParam<Real>("las"))
      51             : {
      52             :   mooseDeprecated("PorousFlow1PhaseP_BW is deprecated. Please use PorousFlow1PhaseP and a "
      53             :                   "PorousFlowCapillaryPressureBW UserObject instead");
      54             : 
      55           0 :   if (_ss <= _sn)
      56           0 :     mooseError("In BW effective saturation Sn set to ",
      57             :                _sn,
      58             :                " and Ss set to ",
      59             :                _ss,
      60           0 :                " but these must obey Ss > Sn");
      61           0 : }
      62             : 
      63             : Real
      64           0 : PorousFlow1PhaseP_BW::effectiveSaturation(Real pressure) const
      65             : {
      66           0 :   return PorousFlowBroadbridgeWhite::effectiveSaturation(pressure, _c, _sn, _ss, _las);
      67             : }
      68             : 
      69             : Real
      70           0 : PorousFlow1PhaseP_BW::dEffectiveSaturation_dP(Real pressure) const
      71             : {
      72           0 :   return PorousFlowBroadbridgeWhite::dEffectiveSaturation(pressure, _c, _sn, _ss, _las);
      73             : }
      74             : 
      75             : Real
      76           0 : PorousFlow1PhaseP_BW::d2EffectiveSaturation_dP2(Real pressure) const
      77             : {
      78           0 :   return PorousFlowBroadbridgeWhite::d2EffectiveSaturation(pressure, _c, _sn, _ss, _las);
      79        2499 : }

Generated by: LCOV version 1.11