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