22static const double Li[5] = {2.443221e-3, 1.323095e-2, 6.770357e-3,
23 -3.454586e-3, 4.096266e-4};
24static const double Lij[5][6] = {
25 {1.60397357, -0.646013523, 0.111443906, 0.102997357, -0.0504123634,
27 {2.33771842, -2.78843778, 1.53616167, -0.463045512, 0.0832827019,
29 {2.19650529, -4.54580785, 3.55777244, -1.40944978, 0.275418278,
31 {-1.21051378, 1.60812989, -0.621178141, 0.0716373224, 0, 0},
32 {-2.7203370, 4.57586331, -3.18369245, 1.1168348, -0.19268305, 0.012913842}};
38 const double bar_rho);
40 const std::array<double, 5>& series_factorT,
41 const std::array<double, 6>& series_factorRho);
58 const double lambda1 = std::exp(
82 "WaterThermalConductivityIAPWS::dValue is implemented for "
83 "derivatives with respect to temperature and liquid density "
92 for (
double value :
Li)
94 sum_val += (value / barT_i);
102 std::array<double, 5> series_factorT;
103 series_factorT[0] = 1.;
104 const double barT_fac = 1 / barT - 1.0;
105 for (
int i = 1; i < 5; i++)
107 series_factorT[i] = series_factorT[i - 1] * barT_fac;
110 return series_factorT;
115 std::array<double, 6> series_factorRho;
116 series_factorRho[0] = 1.;
117 for (
int i = 1; i < 6; i++)
119 series_factorRho[i] = series_factorRho[i - 1] * (bar_rho - 1.0);
122 return series_factorRho;
126 const std::array<double, 6>& series_factorRho)
129 for (
int i = 0; i < 5; i++)
131 double sum_val_j = 0;
132 for (
int j = 0; j < 6; j++)
134 sum_val_j +=
Lij[i][j] * series_factorRho[j];
136 sum_val += series_factorT[i] * sum_val_j;
145 const double sqrt_barT = std::sqrt(barT);
147 double dlambda0_factor_dbarT = 0.0;
148 double barT_i = barT * barT;
149 for (
int i = 1; i < 5; i++)
151 dlambda0_factor_dbarT -=
static_cast<double>(i) * (
Li[i] / barT_i);
155 const double dbar_lambda0_dbarT =
156 0.5 / (lambda0_factor * sqrt_barT) -
157 sqrt_barT * dlambda0_factor_dbarT / (lambda0_factor * lambda0_factor);
162 double dlambda1_factor_dbarT = 0.0;
163 for (
int i = 1; i < 5; i++)
165 double sum_val_j = 0;
166 for (
int j = 0; j < 6; j++)
168 sum_val_j +=
Lij[i][j] * series_factorRho[j];
170 dlambda1_factor_dbarT -=
static_cast<double>(i) *
171 series_factorT[i - 1] * sum_val_j /
175 const double lambda1_factor =
177 const double dbar_lambda1_dbarT =
178 bar_rho * std::exp(bar_rho * lambda1_factor) * dlambda1_factor_dbarT;
180 return dbar_lambda0_dbarT * std::exp(bar_rho * lambda1_factor) +
181 dbar_lambda1_dbarT * sqrt_barT / lambda0_factor;
189 double dlambda1_factor_dbar_rho = 0.0;
190 for (
int i = 0; i < 5; i++)
192 double sum_val_j = 0;
193 for (
int j = 1; j < 6; j++)
196 static_cast<double>(j) *
Lij[i][j] * series_factorRho[j - 1];
198 dlambda1_factor_dbar_rho += series_factorT[i] * sum_val_j;
203 const double lambda1_factor =
205 return lambda0 * std::exp(bar_rho * lambda1_factor) *
206 (lambda1_factor + bar_rho * dlambda1_factor_dbar_rho);
virtual PropertyDataType value() const
static constexpr double ref_lambda_
reference thermal conductivity in W.K^-1.m^-1
static constexpr double ref_T_
reference temperature in K
PropertyDataType dValue(VariableArray const &variable_array, Variable const variable, ParameterLib::SpatialPosition const &pos, double const t, double const dt) const override
static constexpr double ref_rho_
reference density in kg/m^3
static double computeBarLambda1Factor(const std::array< double, 5 > &series_factorT, const std::array< double, 6 > &series_factorRho)
static std::array< double, 6 > computeSeriesFactorRhoForLambda1(const double bar_rho)
static double computedBarLambda_dbarT(const double barT, double bar_rho)
static double computeBarLambda0Factor(const double barT)
static const double Li[5]
static std::array< double, 5 > computeSeriesFactorTForLambda1(const double barT)
static const double Lij[5][6]
static double computedBarLambda_dbarRho(const double barT, double bar_rho)
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