www.mooseframework.org
PorousFlowCapillaryPressureVG.C
Go to the documentation of this file.
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 
10 
11 template <>
12 InputParameters
14 {
15  InputParameters params = validParams<PorousFlowCapillaryPressure>();
16  params.addRequiredRangeCheckedParam<Real>(
17  "m",
18  "m >= 0 & m <= 1",
19  "van Genuchten exponent m. Must be between 0 and 1, and optimally should be set to >0.5");
20  params.addRequiredRangeCheckedParam<Real>(
21  "alpha", "alpha > 0", "van Genuchten parameter alpha. Must be positive");
22  params.addRangeCheckedParam<Real>("s_scale",
23  1.0,
24  "s_scale > 0.0 & s_scale <= 1.0",
25  "CapillaryPressure = f(Seff * s_scale) - "
26  "f(s_scale), where f is the van Genuchten "
27  "expression. Setting s_scale<1 is unusual "
28  "but sometimes helps fully saturated, "
29  "2-phase PP simulations converge as the "
30  "zero derivative (1/f'(S=1)=0) is removed");
31  params.addClassDescription("van Genuchten capillary pressure");
32  return params;
33 }
34 
36  : PorousFlowCapillaryPressure(parameters),
37  _m(getParam<Real>("m")),
38  _alpha(getParam<Real>("alpha")),
39  _s_scale(getParam<Real>("s_scale")),
40  _pc_sscale(PorousFlowVanGenuchten::capillaryPressure(_s_scale, _alpha, _m, _pc_max))
41 {
42 }
43 
44 Real
46 {
47  const Real seff = effectiveSaturationFromSaturation(saturation) * _s_scale;
49 }
50 
51 Real
53 {
54  const Real seff = effectiveSaturationFromSaturation(saturation) * _s_scale;
56  _s_scale;
57 }
58 
59 Real
61 {
62  const Real seff = effectiveSaturationFromSaturation(saturation) * _s_scale;
65 }
66 
67 Real
69 {
70  return (1.0 / _s_scale) *
72 }
73 
74 Real
76 {
77  return (1.0 / _s_scale) *
79 }
80 
81 Real
83 {
84  return (1.0 / _s_scale) *
86 }
virtual Real dCapillaryPressureCurve(Real saturation) const override
Derivative of raw capillary pressure wrt true saturation.
Real capillaryPressure(Real seff, Real pe, Real lambda, Real pc_max)
Capillary pressure as a function of effective saturation.
const Real _m
van Genuchten exponent m
InputParameters validParams< PorousFlowCapillaryPressure >()
van Genuchten effective saturation, capillary pressure and relative permeability functions.
virtual Real capillaryPressureCurve(Real saturation) const override
Raw capillary pressure curve (does not include logarithmic extension)
Base class for capillary pressure for multiphase flow in porous media.
const Real _pc_max
Maximum capillary pressure (Pa). Note: must be <= 0.
virtual Real d2EffectiveSaturation(Real pc) const override
Second derivative of effective saturation wrt capillary pressure.
virtual Real dEffectiveSaturation(Real pc) const override
Derivative of effective saturation wrt capillary pressure.
Real d2CapillaryPressure(Real seff, Real alpha, Real m, Real pc_max)
Second derivative of capillary pressure wrt effective saturation.
Real effectiveSaturationFromSaturation(Real saturation) const
Effective saturation of liquid phase given liquid saturation and residual liquid saturation.
virtual Real d2CapillaryPressureCurve(Real saturation) const override
Second derivative of raw capillary pressure wrt true saturation.
const Real _alpha
van Genuchten capillary coefficient alpha
Real effectiveSaturation(Real p, Real alpha, Real m)
Effective saturation as a function of porepressure.
const Real _s_scale
capillary pressure = f(Seff * s_scale) - pc_sscale, where f is the van Genuchten function. For almost all simulations s_scale=1 will be appropriate
Real dCapillaryPressure(Real seff, Real alpha, Real m, Real pc_max)
Derivative of capillary pressure wrt effective saturation.
Real d2EffectiveSaturation(Real p, Real alpha, Real m)
Second derivative of effective saturation wrt porepressure.
virtual Real effectiveSaturation(Real pc) const override
Effective saturation as a function of capillary pressure.
const Real _dseff_ds
Derivative of effective saturation with respect to saturation.
const Real _pc_sscale
pc_sscale = f(s_scale), where f is the van Genuchten function
void FORTRAN_CALL() saturation(double &P, double &T, int &N, int &nerr)
PorousFlowCapillaryPressureVG(const InputParameters &parameters)
Real dEffectiveSaturation(Real p, Real alpha, Real m)
Derivative of effective saturation wrt porepressure.
Real capillaryPressure(Real seff, Real alpha, Real m, Real pc_max)
Capillary pressure as a function of effective saturation.
InputParameters validParams< PorousFlowCapillaryPressureVG >()