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);
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
Moose::GenericType< Real, is_ad > GenericReal
registerMooseObject("PorousFlowApp", PorousFlowRelativePermeabilityVG)
Base class for PorousFlow relative permeability materials.
static InputParameters validParams()
Material to calculate van Genuchten-type relative permeability of an arbitrary phase given the satura...
PorousFlowRelativePermeabilityVGTempl(const InputParameters ¶meters)
virtual Real dRelativePermeability(Real seff) const override
Derivative of relative permeability with respect to effective saturation.
virtual GenericReal< is_ad > relativePermeability(GenericReal< is_ad > seff) const override
Relative permeability equation (must be overriden in derived class)
static InputParameters validParams()
van Genuchten effective saturation, capillary pressure and relative permeability functions.
T relativePermeabilityNW(const T &seff, Real m)
Relative permeability for a non-wetting phase as a function of effective saturation.
Real dRelativePermeability(Real seff, Real m)
Derivative of relative permeability with respect to effective saturation.
T relativePermeability(const T &seff, Real m)
Relative permeability as a function of effective saturation.
Real dRelativePermeabilityNW(Real seff, Real m)
Derivative of relative permeability for a non-wetting phase with respect to effective saturation.