30#ifndef DUMUX_IAPWS_COMMON_HH
31#define DUMUX_IAPWS_COMMON_HH
36#include <dune/common/math.hh>
55template <
class Scalar>
102 const Scalar rhoBar = rho/322.0;
106 constexpr Scalar Hij[6][7] = {
107 { 5.20094e-1, 2.22531e-1,-2.81378e-1, 1.61913e-1,-3.25372e-2, 0, 0 },
108 { 8.50895e-2, 9.99115e-1,-9.06851e-1, 2.57399e-1, 0, 0, 0 },
109 {-1.08374 , 1.88797 ,-7.72479e-1, 0, 0, 0, 0 },
110 {-2.89555e-1, 1.26613 ,-4.89837e-1, 0, 6.98452e-2, 0,-4.35673e-3 },
111 { 0, 0,-2.57040e-1, 0, 0, 8.72102e-3, 0 },
112 { 0, 1.20573e-1, 0, 0, 0, 0,-5.93264e-4 }
115 Scalar tmp, tmp2, tmp3 = 1;
117 for (
int i = 0; i <= 5; ++i) {
120 for (
int j = 0; j <= 6; ++j) {
121 tmp += Hij[i][j]*tmp2;
122 tmp2 *= (rhoBar - 1);
125 tmp3 *= 1.0/TBar - 1;
133 muBar *= 100*sqrt(TBar);
134 constexpr Scalar H[4] = {
135 1.67752, 2.20462, 0.6366564, -0.241605
139 for (
int i = 0; i < 4; ++i) {
163 constexpr Scalar thcond_tstar = 647.26 ;
164 constexpr Scalar thcond_rhostar = 317.7 ;
167 constexpr Scalar thcond_b0 = -0.397070 ;
168 constexpr Scalar thcond_b1 = 0.400302 ;
169 constexpr Scalar thcond_b2 = 1.060000 ;
170 constexpr Scalar thcond_B1 = -0.171587 ;
171 constexpr Scalar thcond_B2 = 2.392190 ;
173 constexpr Scalar thcond_c1 = 0.642857 ;
174 constexpr Scalar thcond_c2 = -4.11717 ;
175 constexpr Scalar thcond_c3 = -6.17937 ;
176 constexpr Scalar thcond_c4 = 0.00308976 ;
177 constexpr Scalar thcond_c5 = 0.0822994 ;
178 constexpr Scalar thcond_c6 = 10.0932 ;
180 constexpr Scalar thcond_d1 = 0.0701309 ;
181 constexpr Scalar thcond_d2 = 0.0118520 ;
182 constexpr Scalar thcond_d3 = 0.00169937 ;
183 constexpr Scalar thcond_d4 = -1.0200 ;
184 constexpr unsigned int thcond_a_count = 4;
185 constexpr Scalar thcond_a[thcond_a_count] = {
192 const Scalar Tbar = T / thcond_tstar;
193 const Scalar rhobar = rho / thcond_rhostar;
197 const Scalar Troot = sqrt(Tbar);
201 for(
unsigned int k = 0; k < thcond_a_count; ++k) {
202 lam += thcond_a[k] * Tpow;
207 lam += thcond_b0 + thcond_b1
209 * exp(thcond_B1 * ((rhobar + thcond_B2)*(rhobar + thcond_B2)));
214 const Scalar DTbar = abs(Tbar - 1) + thcond_c4;
215 const Scalar DTbarpow = pow(DTbar, 3./5);
216 const Scalar Q = 2. + thcond_c5 / DTbarpow;
217 const Scalar S = (Tbar >= 1) ? 1. / DTbar : thcond_c6 / DTbarpow;
219 const Scalar rhobar18 = pow(rhobar, 1.8);
220 const Scalar rhobarQ = pow(rhobar, Q);
223 (thcond_d1 / power(Tbar,10) + thcond_d2) * rhobar18 *
224 exp(thcond_c1 * (1 - rhobar * rhobar18))
225 + thcond_d3 * S * rhobarQ *
226 exp((Q/(1+Q))*(1 - rhobar*rhobarQ))
228 exp(thcond_c2 * power(Troot,3) + thcond_c3 / power(rhobar,5));
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:51
Implements relations which are common for all regions of the IAPWS '97 formulation.
Definition: common.hh:57
static constexpr Scalar criticalMolarVolume
Critical molar volume of water .
Definition: common.hh:72
static constexpr Scalar Rs
Specific gas constant of water .
Definition: common.hh:63
static constexpr Scalar triplePressure
Triple pressure of water .
Definition: common.hh:84
static constexpr Scalar molarMass
The molar mass of water .
Definition: common.hh:60
static Scalar viscosity(Scalar temperature, Scalar rho)
The dynamic viscosity of pure water.
Definition: common.hh:100
static constexpr Scalar acentricFactor
The acentric factor of water .
Definition: common.hh:75
static constexpr Scalar criticalTemperature
Critical temperature of water .
Definition: common.hh:66
static constexpr Scalar criticalDensity
Density of water at the critical point .
Definition: common.hh:78
static constexpr Scalar tripleTemperature
Triple temperature of water .
Definition: common.hh:81
static constexpr Scalar criticalPressure
Critical pressure of water .
Definition: common.hh:69
static Scalar thermalConductivityIAPWS(const Scalar T, const Scalar rho)
Thermal conductivity water (IAPWS) .
Definition: common.hh:161
A central place for various physical constants occurring in some equations.
Definition: constants.hh:39