www.mooseframework.org
PorousFlowCapillaryPressureRSC.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
12 
14 
17 {
19  params.addParam<Real>("oil_viscosity",
20  "Viscosity of oil (gas) phase. It is assumed this is "
21  "double the water-phase viscosity. (Note that this "
22  "effective saturation is mostly useful for 2-phase, not "
23  "single-phase.)");
24  params.addParam<Real>("scale_ratio",
25  "This is porosity / permeability / beta^2, where beta may "
26  "be chosen by the user. It has dimensions [time]");
27  params.addParam<Real>("shift", "effective saturation is a function of (Pc - shift)");
28  params.addClassDescription("Rogers-Stallybrass-Clements version of effective saturation for the "
29  "water phase, valid for residual saturations = 0, and viscosityOil = "
30  "2 * viscosityWater. seff_water = 1 / sqrt(1 + exp((Pc - shift) / "
31  "scale)), where scale = 0.25 * scale_ratio * oil_viscosity.");
32  return params;
33 }
34 
36  : PorousFlowCapillaryPressure(parameters),
37  _oil_viscosity(getParam<Real>("oil_viscosity")),
38  _scale_ratio(getParam<Real>("scale_ratio")),
39  _shift(getParam<Real>("shift")),
40  _scale(0.25 * _scale_ratio * _oil_viscosity)
41 {
42  // Set _log_ext to false as no capillary pressure curves are implmented in this class
43  _log_ext = false;
44 }
45 
46 Real
47 PorousFlowCapillaryPressureRSC::capillaryPressureCurve(Real /*saturation*/, unsigned /*qp*/) const
48 {
49  mooseError("PorousFlowCapillaryPressureRSC::capillaryPressure not implemented");
50  return 0.0;
51 }
52 
53 Real
54 PorousFlowCapillaryPressureRSC::dCapillaryPressureCurve(Real /*saturation*/, unsigned /*qp*/) const
55 {
56  mooseError("PorousFlowCapillaryPressureRSC::dCapillaryPressure not implemented");
57  return 0.0;
58 }
59 
60 Real
61 PorousFlowCapillaryPressureRSC::d2CapillaryPressureCurve(Real /*saturation*/, unsigned /*qp*/) const
62 {
63  mooseError("PorousFlowCapillaryPressureRSC::d2CapillaryPressure not implemented");
64  return 0.0;
65 }
66 
67 Real
69 {
71 }
72 
73 Real
75 {
77 }
78 
79 Real
81 {
83 }
Real dEffectiveSaturation(Real pc, Real shift, Real scale)
Derivative of effective saturation wrt capillary pressure.
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
virtual Real d2EffectiveSaturation(Real pc, unsigned qp=0) const override
Second derivative of effective saturation wrt capillary pressure.
virtual Real capillaryPressureCurve(Real saturation, unsigned qp=0) const override
Raw capillary pressure curve (does not include logarithmic extension)
static InputParameters validParams()
const Real _shift
Shift. seff_water = 1/Sqrt(1 + Exp((Pc - shift)/scale)), where scale = 0.25 * scale_ratio * oil_visco...
Base class for capillary pressure for multiphase flow in porous media.
virtual Real dCapillaryPressureCurve(Real saturation, unsigned qp=0) const override
Derivative of raw capillary pressure wrt true saturation.
registerMooseObject("PorousFlowApp", PorousFlowCapillaryPressureRSC)
virtual Real effectiveSaturation(Real pc, unsigned qp=0) const override
Effective saturation as a function of capillary pressure.
PorousFlowCapillaryPressureRSC(const InputParameters &parameters)
virtual Real dEffectiveSaturation(Real pc, unsigned qp=0) const override
Derivative of effective saturation wrt capillary pressure.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual Real d2CapillaryPressureCurve(Real saturation, unsigned qp=0) const override
Second derivative of raw capillary pressure wrt true saturation.
void mooseError(Args &&... args) const
Real d2EffectiveSaturation(Real pc, Real shift, Real scale)
Second derivative of effective saturation wrt capillary pressure.
void addClassDescription(const std::string &doc_string)
bool _log_ext
Flag to use a logarithmic extension for low saturation.
Real effectiveSaturation(Real pc, Real shift, Real scale)
Effective saturation as a function of capillary pressure.
const Real _scale
Scale = 0.25 * scale_ratio * oil_viscosity.
Rogers-Stallybrass-Clements form of capillary pressure.