28 const double min_relative_permeability,
29 const double exponent)
32 min_relative_permeability_(min_relative_permeability),
41 double const dt)
const
47 auto const s_L = std::visit(
48 [&variable_array, &pos, t, dt](
auto&&
scale) ->
double
51 .
template value<double>(variable_array, pos, t, dt);
60 auto const s_eff = (s_L - s_L_res) / (s_L_max - s_L_res);
73 auto const k_rel_GR = (1. - s_eff) * (1. - s_eff) *
74 (1. - std::pow(s_eff, (2. + lambda) / lambda));
81 double const dt)
const
86 "RelPermBrooksCoreyNonwettingPhase::dValue is implemented for "
87 "derivatives with respect to liquid saturation only.");
93 auto const s_L = std::visit(
94 [&variable_array, &pos, t, dt](
auto&&
scale) ->
double
97 .
template value<double>(variable_array, pos, t, dt);
105 auto const s_eff = (s_L - s_L_res) / (s_L_max - s_L_res);
106 if ((s_eff < 0.) || (s_eff > 1.))
111 auto const twoL_L = (2. + lambda) / lambda;
112 auto const d_se_d_sL = 1. / (s_L_max - s_L_res);
113 auto const dk_rel_GRdse =
114 -2. * (1 - s_eff) * (1. - std::pow(s_eff, twoL_L)) -
115 twoL_L * std::pow(s_eff, twoL_L - 1.) * (1. - s_eff) * (1. - s_eff);
117 return dk_rel_GRdse * d_se_d_sL;
virtual PropertyDataType value() const
std::variant< Medium *, Phase *, Component * > scale_
const double min_relative_permeability_
const double residual_gas_saturation_
const double residual_liquid_saturation_
RelPermBrooksCoreyNonwettingPhase(std::string name, const double residual_liquid_saturation, const double residual_gas_saturation, const double min_relative_permeability, const double exponent)
PropertyDataType dValue(VariableArray const &variable_array, Variable const variable, ParameterLib::SpatialPosition const &pos, double const t, double const dt) const override
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 > > PropertyDataType
std::array< VariableType, static_cast< int >(Variable::number_of_variables)> VariableArray
@ residual_liquid_saturation
@ residual_gas_saturation
void scale(PETScVector &x, double const a)