20 double const lower_saturation_limit,
21 double const upper_saturation_limit,
23 :
p_(std::move(swelling_pressures)),
25 S_min_(lower_saturation_limit),
26 S_max_(upper_saturation_limit),
34 if (!std::holds_alternative<Phase*>(
scale_))
37 "The property 'SaturationDependentSwelling' is implemented on the "
38 "'phase' scales only.");
40 auto const phase = std::get<Phase*>(
scale_);
41 if (phase->name !=
"Solid")
44 "The property 'SaturationDependentSwelling' must be given in the "
45 "'Solid' phase, not in '{:s}' phase.",
54 double const dt)
const
59 Eigen::Matrix<double, 3, 3>
const e =
61 ? Eigen::Matrix<double, 3, 3>::Identity()
64 Eigen::Matrix<double, 3, 3> delta_sigma_sw =
65 Eigen::Matrix<double, 3, 3>::Zero();
69 return delta_sigma_sw;
73 double const S_eff_prev =
76 double const delta_S_eff = S_eff - S_eff_prev;
78 if (delta_S_eff == 0.)
80 return delta_sigma_sw;
86 for (
int i = 0; i < 3; ++i)
88 Eigen::Matrix<double, 3, 3>
const ei_otimes_ei =
89 e.col(i) * e.col(i).transpose();
95 return (delta_sigma_sw * delta_S_eff / dt).eval();
107 "SaturationDependentSwelling::dValue is implemented for "
108 "derivatives with respect to liquid saturation only.");
114 Eigen::Matrix<double, 3, 3>
const e =
116 ? Eigen::Matrix<double, 3, 3>::Identity()
119 Eigen::Matrix<double, 3, 3> delta_sigma_sw =
120 Eigen::Matrix<double, 3, 3>::Zero();
124 return delta_sigma_sw;
128 double const S_eff_prev =
131 double const delta_S_eff = S_eff - S_eff_prev;
134 if (std::abs(delta_S_eff) <= 0)
136 return delta_sigma_sw;
139 for (
int i = 0; i < 3; ++i)
141 Eigen::Matrix<double, 3, 3>
const ei_otimes_ei =
142 e.col(i) * e.col(i).transpose();
virtual PropertyDataType value() const
std::variant< Medium *, Phase *, Component * > scale_
void checkScale() const override
std::array< double, 3 > const p_
Maximum swelling pressures, one for each spatial dimension.
PropertyDataType dValue(VariableArray const &variable_array, VariableArray const &variable_array_prev, Variable const variable, ParameterLib::SpatialPosition const &pos, double const t, double const dt) const override
ParameterLib::CoordinateSystem const *const local_coordinate_system_
SaturationDependentSwelling(std::string name, std::array< double, 3 > swelling_pressures, std::array< double, 3 > exponents, double const lower_saturation_limit, double const upper_saturation_limit, ParameterLib::CoordinateSystem const *const local_coordinate_system)
std::array< double, 3 > const lambda_
Exponents, one for each spatial dimension.
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
A local coordinate system used for tensor transformations.