17 double const pressure_exponent,
18 double const saturation_exponent,
22 m_(pressure_exponent),
23 n_(saturation_exponent),
28 if (!(
m_ > 0 &&
m_ < 1))
31 "The pressure exponent value m = {:g} of van Genuchten saturation "
32 "model, is out of its range of (0, 1)",
39 "The saturation exponent value n = {:g} of van Genuchten "
40 "saturation model, is out of its range of [1, +inf)",
57 double const p = p_cap /
p_b_;
58 double const p_to_n = std::pow(p,
n_);
60 double const S_eff = std::pow(p_to_n + 1., -
m_);
73 "SaturationVanGenuchten::dValue is implemented for derivatives "
74 "with respect to capillary pressure only.");
84 double const p = p_cap /
p_b_;
85 double const p_to_n = std::pow(p,
n_);
87 double const S_eff = std::pow(p_to_n + 1., -
m_);
95 double const dS_eff_dp_cap =
96 -
m_ *
n_ * p_to_n * S_eff / (p_cap * (p_to_n + 1.));
103 double const ,
double const )
const
109 "SaturationVanGenuchten::d2Value is implemented for derivatives "
110 "with respect to capillary pressure only.");
119 double const p = p_cap /
p_b_;
120 double const p_to_n = std::pow(p,
n_);
122 double const S_eff = std::pow(p_to_n + 1., -
m_);
130 double const d2S_eff_dp_cap2 =
131 m_ *
n_ *
n_ * p_to_n * S_eff * (p_to_n -
m_) /
132 ((p_cap * p_to_n + p_cap) * (p_cap * p_to_n + p_cap));
virtual PropertyDataType value() const
PropertyDataType d2Value(VariableArray const &variable_array, Variable const variable1, Variable const variable2, ParameterLib::SpatialPosition const &, double const, double const) const override
Default implementation: 2nd derivative of any constant property is zero.
PropertyDataType dValue(VariableArray const &variable_array, Variable const variable, ParameterLib::SpatialPosition const &, double const, double const) const override
SaturationVanGenuchten(std::string name, double const residual_liquid_saturation, double const residual_gas_saturation, double const pressure_exponent, double const saturation_exponent, double const p_b)
double capillary_pressure
@ residual_liquid_saturation
@ residual_gas_saturation
std::variant< double, Eigen::Matrix< double, 2, 1 >, Eigen::Matrix< double, 3, 1 >, Eigen::Matrix< double, 2, 2 >, Eigen::Matrix< double, 3, 3 >, Eigen::Matrix< double, 4, 1 >, Eigen::Matrix< double, 6, 1 >, Eigen::MatrixXd > PropertyDataType