11 #include "libmesh/utility.h" 22 "m",
"m > 0 & m < 1",
"The van Genuchten exponent of the phase");
25 "seff_turnover > 0 & seff_turnover <= 1",
26 "The relative permeability will be a cubic for seff > " 27 "seff_turnover. The cubic is chosen so that its derivative " 28 "and value matche the VG function at seff=seff_turnover");
29 params.
addParam<
bool>(
"zero_derivative",
31 "Employ a cubic for seff>seff_turnover that has zero derivative at seff=1");
34 "If true, use the van Genuchten form appropriate for a wetting (liquid) " 35 "phase. If false, use the non-wetting (gas) expression.");
37 "using the van Genuchten model");
45 _m(this->template getParam<
Real>(
"m")),
46 _wetting(this->template getParam<bool>(
"wetting")),
47 _cut(this->template getParam<
Real>(
"seff_turnover")),
53 ? (this->template getParam<bool>(
"zero_derivative")
54 ? 3.0 * (1.0 - _cub0 - _cub1 * (1.0 - _cut)) / Utility::
pow<2>(1.0 - _cut) +
60 ? (this->template getParam<bool>(
"zero_derivative")
61 ? -2.0 * (1.0 - _cub0 - _cub1 * (1.0 - _cut)) / Utility::
pow<3>(1.0 - _cut) -
62 _cub1 / Utility::
pow<2>(1.0 - _cut)
63 : (1.0 - _cub0 - _cub1 * (1.0 - _cut) - _cub2 * Utility::
pow<2>(1.0 - _cut)) /
64 Utility::
pow<3>(1.0 - _cut))
81 return _cub0 + _cub1 * (seff - _cut) + _cub2 * Utility::pow<2>(seff - _cut) +
82 _cub3 * Utility::pow<3>(seff - _cut);
97 return _cub1 + 2.0 * _cub2 * (seff - _cut) + 3.0 * _cub3 * Utility::pow<2>(seff - _cut);
static InputParameters validParams()
Real d2RelativePermeability(Real s, Real c, Real sn, Real ss, Real kn, Real ks)
Second derivative of relative permeability with respect to saturation.
Real dRelativePermeabilityNW(Real seff, Real lambda)
Derivative of relative permeability of the non-wetting phase wrt to effective saturation.
registerMooseObject("PorousFlowApp", PorousFlowRelativePermeabilityVG)
virtual Real dRelativePermeability(Real seff) const override
Derivative of relative permeability with respect to effective saturation.
T relativePermeabilityNW(const T &seff, Real m)
Relative permeability for a non-wetting phase as a function of effective saturation.
T relativePermeabilityNW(const T &seff, Real lambda)
Relative permeability of the non-wetting phase as a function of effective saturation.
T relativePermeability(const T &s, Real c, Real sn, Real ss, Real kn, Real ks)
Relative permeability as a function of saturation.
van Genuchten effective saturation, capillary pressure and relative permeability functions.
virtual GenericReal< is_ad > relativePermeability(GenericReal< is_ad > seff) const override
Relative permeability equation (must be overriden in derived class)
Material to calculate van Genuchten-type relative permeability of an arbitrary phase given the satura...
Base class for PorousFlow relative permeability materials.
Real d2RelativePermeabilityNW(Real seff, Real m)
Second derivative of relative permeability for a non-wetting phase with respect to effective saturati...
Real dRelativePermeability(Real seff, Real m)
Derivative of relative permeability with respect to effective saturation.
Real dRelativePermeability(Real s, Real c, Real sn, Real ss, Real kn, Real ks)
Derivative of relative permeability with respect to saturation.
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
T relativePermeability(const T &seff, Real m)
Relative permeability as a function of effective saturation.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
PorousFlowRelativePermeabilityVGTempl(const InputParameters ¶meters)
typename Moose::GenericType< Real, is_ad > GenericReal
Real dRelativePermeabilityNW(Real seff, Real m)
Derivative of relative permeability for a non-wetting phase with respect to effective saturation...
static InputParameters validParams()