24 double const pressure_exponent,
25 double const saturation_exponent,
29 m_(pressure_exponent),
30 n_(saturation_exponent),
35 if (!(
m_ > 0 &&
m_ < 1))
38 "The pressure exponent value m = {:g} of van Genuchten saturation "
39 "model, is out of its range of (0, 1)",
46 "The saturation exponent value n = {:g} of van Genuchten "
47 "saturation model, is out of its range of [1, +inf)",
64 double const p = p_cap /
p_b_;
65 double const p_to_n = std::pow(p,
n_);
67 double const S_eff = std::pow(p_to_n + 1., -
m_);
80 "SaturationVanGenuchten::dValue is implemented for derivatives "
81 "with respect to capillary pressure only.");
91 double const p = p_cap /
p_b_;
92 double const p_to_n = std::pow(p,
n_);
94 double const S_eff = std::pow(p_to_n + 1., -
m_);
102 double const dS_eff_dp_cap =
103 -
m_ *
n_ * p_to_n * S_eff / (p_cap * (p_to_n + 1.));
110 double const ,
double const )
const
116 "SaturationVanGenuchten::d2Value is implemented for derivatives "
117 "with respect to capillary pressure only.");
126 double const p = p_cap /
p_b_;
127 double const p_to_n = std::pow(p,
n_);
129 double const S_eff = std::pow(p_to_n + 1., -
m_);
137 double const d2S_eff_dp_cap2 =
138 m_ *
n_ *
n_ * p_to_n * S_eff * (p_to_n -
m_) /
139 ((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