24 constexpr
double T_c =
26 constexpr
double alpha = 1. / 8.;
27 constexpr
double beta = 1. / 3.;
30 constexpr std::array
c = {1989.41582, 11178.45586, 26923.68994,
31 -28989.28947, -19797.03646, 28403.32283,
32 -30382.306422, 15210.380};
39 const double T = std::get<double>(
47 double const tau = (
T_c - T) /
T_c;
48 double const tau_p2 = tau * tau;
49 double const tau_p3 = tau_p2 * tau;
50 double const tau_p4 = tau_p3 * tau;
51 double const tau_p5 = tau_p4 * tau;
53 std::array v = {std::pow(tau,
beta),
66 #if __GNUC__ < 9 || (__GNUC__ == 9 && (__GNUC_MINOR__ < 3))
71 (begin(
c), end(
c), begin(v), 0.);
82 "WaterVapourLatentHeatWithCriticalTemperature::dValue is "
85 "the derivative with respect to temperature only.");
87 const double T = std::get<double>(
95 constexpr std::array dc = {
c[0] *
beta,
104 double const tau = (
T_c - T) /
T_c;
105 double const tau_p2 = tau * tau;
106 double const tau_p3 = tau_p2 * tau;
107 double const tau_p4 = tau_p3 * tau;
108 std::array v = {std::pow(tau,
beta - 1),
120 #if __GNUC__ < 9 || (__GNUC__ == 9 && (__GNUC_MINOR__ < 3))
123 std::transform_reduce
125 (begin(dc), end(dc), begin(v), 0.) /
virtual PropertyDataType value() const
PropertyDataType dValue(VariableArray const &variable_array, Variable const primary_variable, ParameterLib::SpatialPosition const &pos, double const t, double const dt) const override
constexpr double CelsiusZeroInKelvin
Zero degrees Celsius in Kelvin.
constexpr double T_c
Critical temperature.
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