https://mooseframework.inl.gov
Loading...
Searching...
No Matches
PorousFlowCapillaryPressureRSC.C
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
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
46Real
47PorousFlowCapillaryPressureRSC::capillaryPressureCurve(Real /*saturation*/, unsigned /*qp*/) const
48{
49 mooseError("PorousFlowCapillaryPressureRSC::capillaryPressure not implemented");
50 return 0.0;
51}
52
53Real
54PorousFlowCapillaryPressureRSC::dCapillaryPressureCurve(Real /*saturation*/, unsigned /*qp*/) const
55{
56 mooseError("PorousFlowCapillaryPressureRSC::dCapillaryPressure not implemented");
57 return 0.0;
58}
59
60Real
61PorousFlowCapillaryPressureRSC::d2CapillaryPressureCurve(Real /*saturation*/, unsigned /*qp*/) const
62{
63 mooseError("PorousFlowCapillaryPressureRSC::d2CapillaryPressure not implemented");
64 return 0.0;
65}
66
67Real
72
73Real
78
79Real
registerMooseObject("PorousFlowApp", PorousFlowCapillaryPressureRSC)
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
void mooseError(Args &&... args) const
Rogers-Stallybrass-Clements form of capillary pressure.
const Real _shift
Shift. seff_water = 1/Sqrt(1 + Exp((Pc - shift)/scale)), where scale = 0.25 * scale_ratio * oil_visco...
const Real _scale
Scale = 0.25 * scale_ratio * oil_viscosity.
virtual Real capillaryPressureCurve(Real saturation, unsigned qp=0) const override
Raw capillary pressure curve (does not include logarithmic extension)
virtual Real effectiveSaturation(Real pc, unsigned qp=0) const override
Effective saturation as a function of capillary pressure.
virtual Real dCapillaryPressureCurve(Real saturation, unsigned qp=0) const override
Derivative of raw capillary pressure wrt true saturation.
virtual Real dEffectiveSaturation(Real pc, unsigned qp=0) const override
Derivative of effective saturation wrt capillary pressure.
PorousFlowCapillaryPressureRSC(const InputParameters &parameters)
virtual Real d2CapillaryPressureCurve(Real saturation, unsigned qp=0) const override
Second derivative of raw capillary pressure wrt true saturation.
virtual Real d2EffectiveSaturation(Real pc, unsigned qp=0) const override
Second derivative of effective saturation wrt capillary pressure.
Base class for capillary pressure for multiphase flow in porous media.
bool _log_ext
Flag to use a logarithmic extension for low saturation.
Real dEffectiveSaturation(Real pc, Real shift, Real scale)
Derivative of effective saturation wrt capillary pressure.
Real d2EffectiveSaturation(Real pc, Real shift, Real scale)
Second derivative of effective saturation wrt capillary pressure.
Real effectiveSaturation(Real pc, Real shift, Real scale)
Effective saturation as a function of capillary pressure.