18#ifndef DUMUX_IAPWS_COMMON_HH
19#define DUMUX_IAPWS_COMMON_HH
24#include <dune/common/math.hh>
43template <
class Scalar>
90 const Scalar rhoBar = rho/322.0;
94 constexpr Scalar Hij[6][7] = {
95 { 5.20094e-1, 2.22531e-1,-2.81378e-1, 1.61913e-1,-3.25372e-2, 0, 0 },
96 { 8.50895e-2, 9.99115e-1,-9.06851e-1, 2.57399e-1, 0, 0, 0 },
97 {-1.08374 , 1.88797 ,-7.72479e-1, 0, 0, 0, 0 },
98 {-2.89555e-1, 1.26613 ,-4.89837e-1, 0, 6.98452e-2, 0,-4.35673e-3 },
99 { 0, 0,-2.57040e-1, 0, 0, 8.72102e-3, 0 },
100 { 0, 1.20573e-1, 0, 0, 0, 0,-5.93264e-4 }
103 Scalar tmp, tmp2, tmp3 = 1;
105 for (
int i = 0; i <= 5; ++i) {
108 for (
int j = 0; j <= 6; ++j) {
109 tmp += Hij[i][j]*tmp2;
110 tmp2 *= (rhoBar - 1);
113 tmp3 *= 1.0/TBar - 1;
121 muBar *= 100*sqrt(TBar);
122 constexpr Scalar H[4] = {
123 1.67752, 2.20462, 0.6366564, -0.241605
127 for (
int i = 0; i < 4; ++i) {
151 constexpr Scalar thcond_tstar = 647.26 ;
152 constexpr Scalar thcond_rhostar = 317.7 ;
155 constexpr Scalar thcond_b0 = -0.397070 ;
156 constexpr Scalar thcond_b1 = 0.400302 ;
157 constexpr Scalar thcond_b2 = 1.060000 ;
158 constexpr Scalar thcond_B1 = -0.171587 ;
159 constexpr Scalar thcond_B2 = 2.392190 ;
161 constexpr Scalar thcond_c1 = 0.642857 ;
162 constexpr Scalar thcond_c2 = -4.11717 ;
163 constexpr Scalar thcond_c3 = -6.17937 ;
164 constexpr Scalar thcond_c4 = 0.00308976 ;
165 constexpr Scalar thcond_c5 = 0.0822994 ;
166 constexpr Scalar thcond_c6 = 10.0932 ;
168 constexpr Scalar thcond_d1 = 0.0701309 ;
169 constexpr Scalar thcond_d2 = 0.0118520 ;
170 constexpr Scalar thcond_d3 = 0.00169937 ;
171 constexpr Scalar thcond_d4 = -1.0200 ;
172 constexpr unsigned int thcond_a_count = 4;
173 constexpr Scalar thcond_a[thcond_a_count] = {
180 const Scalar Tbar = T / thcond_tstar;
181 const Scalar rhobar = rho / thcond_rhostar;
185 const Scalar Troot = sqrt(Tbar);
189 for(
unsigned int k = 0; k < thcond_a_count; ++k) {
190 lam += thcond_a[k] * Tpow;
195 lam += thcond_b0 + thcond_b1
197 * exp(thcond_B1 * ((rhobar + thcond_B2)*(rhobar + thcond_B2)));
202 const Scalar DTbar = abs(Tbar - 1) + thcond_c4;
203 const Scalar DTbarpow = pow(DTbar, 3./5);
204 const Scalar Q = 2. + thcond_c5 / DTbarpow;
205 const Scalar S = (Tbar >= 1) ? 1. / DTbar : thcond_c6 / DTbarpow;
207 const Scalar rhobar18 = pow(rhobar, 1.8);
208 const Scalar rhobarQ = pow(rhobar, Q);
211 (thcond_d1 / power(Tbar,10) + thcond_d2) * rhobar18 *
212 exp(thcond_c1 * (1 - rhobar * rhobar18))
213 + thcond_d3 * S * rhobarQ *
214 exp((Q/(1+Q))*(1 - rhobar*rhobarQ))
216 exp(thcond_c2 * power(Troot,3) + thcond_c3 / power(rhobar,5));
A central place for various physical constants occurring in some equations.
Definition: constants.hh:27
Implements relations which are common for all regions of the IAPWS '97 formulation.
Definition: common.hh:45
static constexpr Scalar criticalMolarVolume
Critical molar volume of water .
Definition: common.hh:60
static constexpr Scalar Rs
Specific gas constant of water .
Definition: common.hh:51
static constexpr Scalar triplePressure
Triple pressure of water .
Definition: common.hh:72
static constexpr Scalar molarMass
The molar mass of water .
Definition: common.hh:48
static Scalar viscosity(Scalar temperature, Scalar rho)
The dynamic viscosity of pure water.
Definition: common.hh:88
static constexpr Scalar acentricFactor
The acentric factor of water .
Definition: common.hh:63
static constexpr Scalar criticalTemperature
Critical temperature of water .
Definition: common.hh:54
static constexpr Scalar criticalDensity
Density of water at the critical point .
Definition: common.hh:66
static constexpr Scalar tripleTemperature
Triple temperature of water .
Definition: common.hh:69
static constexpr Scalar criticalPressure
Critical pressure of water .
Definition: common.hh:57
static Scalar thermalConductivityIAPWS(const Scalar T, const Scalar rho)
Thermal conductivity water (IAPWS) .
Definition: common.hh:149
A central place for various physical constants occurring in some equations.
std::string temperature() noexcept
I/O name of temperature for equilibrium models.
Definition: name.hh:39