LCOV - code coverage report
Current view: top level - src/userobjects - PorousFlowCapillaryPressureRSC.C (source / functions) Hit Total Coverage
Test: porous_flow Test Coverage Lines: 24 30 80.0 %
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 "PorousFlowCapillaryPressureRSC.h"
       9             : #include "PorousFlowRogersStallybrassClements.h"
      10             : 
      11             : template <>
      12             : InputParameters
      13           2 : validParams<PorousFlowCapillaryPressureRSC>()
      14             : {
      15           2 :   InputParameters params = validParams<PorousFlowCapillaryPressure>();
      16           6 :   params.addParam<Real>("oil_viscosity",
      17             :                         "Viscosity of oil (gas) phase.  It is assumed this is "
      18             :                         "double the water-phase viscosity.  (Note that this "
      19             :                         "effective saturation is mostly useful for 2-phase, not "
      20           2 :                         "single-phase.)");
      21           6 :   params.addParam<Real>("scale_ratio",
      22             :                         "This is porosity / permeability / beta^2, where beta may "
      23           2 :                         "be chosen by the user.  It has dimensions [time]");
      24           6 :   params.addParam<Real>("shift", "effective saturation is a function of (Pc - shift)");
      25           4 :   params.addClassDescription("Rogers-Stallybrass-Clements version of effective saturation for the "
      26             :                              "water phase, valid for residual saturations = 0, and viscosityOil = "
      27             :                              "2 * viscosityWater.  seff_water = 1 / sqrt(1 + exp((Pc - shift) / "
      28           2 :                              "scale)), where scale = 0.25 * scale_ratio * oil_viscosity.");
      29           2 :   return params;
      30             : }
      31             : 
      32           2 : PorousFlowCapillaryPressureRSC::PorousFlowCapillaryPressureRSC(const InputParameters & parameters)
      33             :   : PorousFlowCapillaryPressure(parameters),
      34           6 :     _oil_viscosity(getParam<Real>("oil_viscosity")),
      35           6 :     _scale_ratio(getParam<Real>("scale_ratio")),
      36           6 :     _shift(getParam<Real>("shift")),
      37          10 :     _scale(0.25 * _scale_ratio * _oil_viscosity)
      38             : {
      39             :   // Set _log_ext to false as no capillary pressure curves are implmented in this class
      40           2 :   _log_ext = false;
      41           2 : }
      42             : 
      43           0 : Real PorousFlowCapillaryPressureRSC::capillaryPressureCurve(Real /*saturation*/) const
      44             : {
      45           0 :   mooseError("PorousFlowCapillaryPressureRSC::capillaryPressure not implemented");
      46             :   return 0.0;
      47             : }
      48             : 
      49           0 : Real PorousFlowCapillaryPressureRSC::dCapillaryPressureCurve(Real /*saturation*/) const
      50             : {
      51           0 :   mooseError("PorousFlowCapillaryPressureRSC::dCapillaryPressure not implemented");
      52             :   return 0.0;
      53             : }
      54             : 
      55           0 : Real PorousFlowCapillaryPressureRSC::d2CapillaryPressureCurve(Real /*saturation*/) const
      56             : {
      57           0 :   mooseError("PorousFlowCapillaryPressureRSC::d2CapillaryPressure not implemented");
      58             :   return 0.0;
      59             : }
      60             : 
      61             : Real
      62      403554 : PorousFlowCapillaryPressureRSC::effectiveSaturation(Real pc) const
      63             : {
      64      403554 :   return PorousFlowRogersStallybrassClements::effectiveSaturation(-pc, _shift, _scale);
      65             : }
      66             : 
      67             : Real
      68      400354 : PorousFlowCapillaryPressureRSC::dEffectiveSaturation(Real pc) const
      69             : {
      70      400354 :   return -PorousFlowRogersStallybrassClements::dEffectiveSaturation(-pc, _shift, _scale);
      71             : }
      72             : 
      73             : Real
      74      200022 : PorousFlowCapillaryPressureRSC::d2EffectiveSaturation(Real pc) const
      75             : {
      76      200022 :   return PorousFlowRogersStallybrassClements::d2EffectiveSaturation(-pc, _shift, _scale);
      77        2499 : }

Generated by: LCOV version 1.11