22 const double triple_temperature,
23 const double triple_pressure,
26 const double ref_temperature,
27 const double ref_pressure)
28 : T_triple_(triple_temperature),
29 p_triple_(triple_pressure),
32 T_ref_(ref_temperature),
40 if (!(std::holds_alternative<Phase*>(
scale_) ||
41 std::holds_alternative<Component*>(
scale_)))
44 "The property 'ClausiusClapeyron' is implemented on 'phase' and "
45 "'component' scales only.");
50 std::variant<Medium*, Phase*, Component*>
const scale,
53 double const dt)
const
56 [&variable_array, &pos, t, dt](
auto&& s) ->
double
67 double const dt)
const
85 return p_ref_ * std::exp((1. /
T_ref_ - 1. / T) * M * dh / R);
91 double const dt)
const
111 const double p_vap = std::get<double>(
value(variable_array, pos, t, dt));
115 return p_vap * M * dh / (R * T * T);
118 "ClausiusClapeyron::dValue is implemented for derivatives with respect "
119 "to phase pressure and temperature only.");
125 double const ,
double const )
const
127 OGS_FATAL(
"ClausiusClapeyron::d2Value is not implemented.");
PropertyDataType dValue(VariableArray const &variable_array, Variable const variable, ParameterLib::SpatialPosition const &pos, double const t, double const dt) const override
void checkScale() const override
ClausiusClapeyron(std::string name, const double triple_temperature, const double triple_pressure, const double critical_temperature, const double critical_pressure, const double ref_temperature, const double ref_pressure)
PropertyDataType d2Value(VariableArray const &variable_array, Variable const variable1, Variable const variable2, ParameterLib::SpatialPosition const &pos, double const t, double const dt) const override
Default implementation: 2nd derivative of any constant property is zero.
double molarMass(std::variant< Medium *, Phase *, Component * > const scale, VariableArray const &variable_array, ParameterLib::SpatialPosition const &pos, double const t, double const dt) const
virtual PropertyDataType value() const
std::variant< Medium *, Phase *, Component * > scale_
double enthalpy_of_evaporation
constexpr double IdealGasConstant
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