26constexpr double alpha = 1. / 8.;
27constexpr double beta = 1. / 3.;
30constexpr std::array
c = {1989.41582, 11178.45586, 26923.68994,
31 -28989.28947, -19797.03646, 28403.32283,
32 -30382.306422, 15210.380};
46 double const tau = (
T_c - T) /
T_c;
47 double const tau_p2 = tau * tau;
48 double const tau_p3 = tau_p2 * tau;
49 double const tau_p4 = tau_p3 * tau;
50 double const tau_p5 = tau_p4 * tau;
52 std::array v = {std::pow(tau,
beta),
65#if __GNUC__ < 9 || (__GNUC__ == 9 && (__GNUC_MINOR__ < 3))
70 (begin(
c), end(
c), begin(v), 0.);
81 "WaterVapourLatentHeatWithCriticalTemperature::dValue is "
84 "the derivative with respect to temperature only.");
93 constexpr std::array dc = {
c[0] *
beta,
102 double const tau = (
T_c - T) /
T_c;
103 double const tau_p2 = tau * tau;
104 double const tau_p3 = tau_p2 * tau;
105 double const tau_p4 = tau_p3 * tau;
106 std::array v = {std::pow(tau,
beta - 1),
118#if __GNUC__ < 9 || (__GNUC__ == 9 && (__GNUC_MINOR__ < 3))
121 std::transform_reduce
123 (begin(dc), end(dc), begin(v), 0.) /
virtual PropertyDataType value() const
PropertyDataType dValue(VariableArray const &variable_array, Variable const 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 >, Eigen::MatrixXd > PropertyDataType