14static const double Li[5] = {2.443221e-3, 1.323095e-2, 6.770357e-3,
15 -3.454586e-3, 4.096266e-4};
16static const double Lij[5][6] = {
17 {1.60397357, -0.646013523, 0.111443906, 0.102997357, -0.0504123634,
19 {2.33771842, -2.78843778, 1.53616167, -0.463045512, 0.0832827019,
21 {2.19650529, -4.54580785, 3.55777244, -1.40944978, 0.275418278,
23 {-1.21051378, 1.60812989, -0.621178141, 0.0716373224, 0, 0},
24 {-2.7203370, 4.57586331, -3.18369245, 1.1168348, -0.19268305, 0.012913842}};
30 const double bar_rho);
32 const std::array<double, 5>& series_factorT,
33 const std::array<double, 6>& series_factorRho);
50 const double lambda1 = std::exp(
74 "WaterThermalConductivityIAPWS::dValue is implemented for "
75 "derivatives with respect to temperature and liquid density "
84 for (
double value :
Li)
86 sum_val += (value / barT_i);
94 std::array<double, 5> series_factorT;
95 series_factorT[0] = 1.;
96 const double barT_fac = 1 / barT - 1.0;
97 for (
int i = 1; i < 5; i++)
99 series_factorT[i] = series_factorT[i - 1] * barT_fac;
102 return series_factorT;
107 std::array<double, 6> series_factorRho;
108 series_factorRho[0] = 1.;
109 for (
int i = 1; i < 6; i++)
111 series_factorRho[i] = series_factorRho[i - 1] * (bar_rho - 1.0);
114 return series_factorRho;
118 const std::array<double, 6>& series_factorRho)
121 for (
int i = 0; i < 5; i++)
123 double sum_val_j = 0;
124 for (
int j = 0; j < 6; j++)
126 sum_val_j +=
Lij[i][j] * series_factorRho[j];
128 sum_val += series_factorT[i] * sum_val_j;
137 const double sqrt_barT = std::sqrt(barT);
139 double dlambda0_factor_dbarT = 0.0;
140 double barT_i = barT * barT;
141 for (
int i = 1; i < 5; i++)
143 dlambda0_factor_dbarT -=
static_cast<double>(i) * (
Li[i] / barT_i);
147 const double dbar_lambda0_dbarT =
148 0.5 / (lambda0_factor * sqrt_barT) -
149 sqrt_barT * dlambda0_factor_dbarT / (lambda0_factor * lambda0_factor);
154 double dlambda1_factor_dbarT = 0.0;
155 for (
int i = 1; i < 5; i++)
157 double sum_val_j = 0;
158 for (
int j = 0; j < 6; j++)
160 sum_val_j +=
Lij[i][j] * series_factorRho[j];
162 dlambda1_factor_dbarT -=
static_cast<double>(i) *
163 series_factorT[i - 1] * sum_val_j /
167 const double lambda1_factor =
169 const double dbar_lambda1_dbarT =
170 bar_rho * std::exp(bar_rho * lambda1_factor) * dlambda1_factor_dbarT;
172 return dbar_lambda0_dbarT * std::exp(bar_rho * lambda1_factor) +
173 dbar_lambda1_dbarT * sqrt_barT / lambda0_factor;
181 double dlambda1_factor_dbar_rho = 0.0;
182 for (
int i = 0; i < 5; i++)
184 double sum_val_j = 0;
185 for (
int j = 1; j < 6; j++)
188 static_cast<double>(j) *
Lij[i][j] * series_factorRho[j - 1];
190 dlambda1_factor_dbar_rho += series_factorT[i] * sum_val_j;
195 const double lambda1_factor =
197 return lambda0 * std::exp(bar_rho * lambda1_factor) *
198 (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