30#ifndef DUMUX_IAPWS_REGION2_HH
31#define DUMUX_IAPWS_REGION2_HH
50template <
class Scalar>
63 const std::string& propertyName =
"This property")
74 propertyName <<
" of steam is only implemented for temperatures below 623.15K and "
110 {
return 1.0 / 1e6; }
142 for (
int i = 0; i < 9; ++i)
143 result += n_g(i)*pow(
tau, J_g(i));
146 for (
int i = 0; i < 43; ++i)
149 pow(
tau - 0.5, J_r(i));
173 for (
int i = 0; i < 9; i++) {
176 pow(tau_, J_g(i) - 1);
180 for (
int i = 0; i < 43; i++) {
184 pow(tau_ - 0.5, J_r(i) - 1);
208 Scalar result = 1/pi_;
212 for (
int i = 0; i < 43; i++) {
215 pow(pi_, I_r(i) - 1) *
216 pow(tau_ - 0.5, J_r(i));
244 for (
int i = 0; i < 43; i++) {
248 pow(pi_, I_r(i) - 1) *
249 pow(tau_ - 0.5, J_r(i) - 1);
273 Scalar result = -1/(pi_*pi_);
277 for (
int i = 0; i < 43; i++) {
281 pow(pi_, I_r(i) - 2) *
282 pow(tau_ - 0.5, J_r(i));
308 for (
int i = 0; i < 9; i++) {
312 pow(tau_, J_g(i) - 2);
317 for (
int i = 0; i < 43; i++) {
322 pow(tau_ - 0.5, J_r(i) - 2.);
329 static Scalar n_g(
int i)
331 constexpr const Scalar n[9] = {
332 -0.96927686500217e1, 0.10086655968018e2, -0.56087911283020e-2,
333 0.71452738081455e-1, -0.40710498223928, 0.14240819171444e1,
334 -0.43839511319450e1, -0.28408632460772, 0.21268463753307e-1
339 static Scalar n_r(
int i)
341 constexpr const Scalar n[43] = {
342 -0.17731742473213e-2, -0.17834862292358e-1, -0.45996013696365e-1,
343 -0.57581259083432e-1, -0.50325278727930e-1, -0.33032641670203e-4,
344 -0.18948987516315e-3, -0.39392777243355e-2, -0.43797295650573e-1,
345 -0.26674547914087e-4, 0.20481737692309e-7, 0.43870667284435e-6,
346 -0.32277677238570e-4, -0.15033924542148e-2, -0.40668253562649e-1,
347 -0.78847309559367e-9, 0.12790717852285e-7, 0.48225372718507e-6,
348 0.22922076337661e-5, -0.16714766451061e-10, -0.21171472321355e-2,
349 -0.23895741934104e2, -0.59059564324270e-17, -0.12621808899101e-5,
350 -0.38946842435739e-1, 0.11256211360459e-10, -0.82311340897998e1,
351 0.19809712802088e-7, 0.10406965210174e-18, -0.10234747095929e-12,
352 -0.10018179379511e-8, -0.80882908646985e-10, 0.10693031879409,
353 -0.33662250574171, 0.89185845355421e-24, 0.30629316876232e-12,
354 -0.42002467698208e-5, -0.59056029685639e-25, 0.37826947613457e-5,
355 -0.12768608934681e-14, 0.73087610595061e-28, 0.55414715350778e-16,
361 static Scalar I_r(
int i)
363 constexpr const short int I[43] = {
383 static Scalar J_g(
int i)
385 constexpr const short int J[9] = {
393 static Scalar J_r(
int i)
395 constexpr const short int J[43] = {
Some exceptions thrown in DuMux
std::string temperature() noexcept
I/O name of temperature for equilibrium models.
Definition: name.hh:51
std::string pressure(int phaseIdx) noexcept
I/O name of pressure for multiphase systems.
Definition: name.hh:34
Exception thrown if a fixable numerical problem occurs.
Definition: exceptions.hh:39
Implements the equations for region 2 of the IAPWS '97 formulation.
Definition: region2.hh:52
static Scalar ddGamma_ddTau(Scalar temperature, Scalar pressure)
The second partial derivative of the Gibbs free energy to the normalized temperature for IAPWS region...
Definition: region2.hh:300
static Scalar dGamma_dTau(Scalar temperature, Scalar pressure)
The partial derivative of the Gibbs free energy to the normalized temperature for IAPWS region 2 (i....
Definition: region2.hh:165
static Scalar ddGamma_dTaudPi(Scalar temperature, Scalar pressure)
The partial derivative of the Gibbs free energy to the normalized pressure and to the normalized temp...
Definition: region2.hh:234
static Scalar gamma(Scalar temperature, Scalar pressure)
The Gibbs free energy for IAPWS region 2 (i.e. sub-critical steam) (dimensionless).
Definition: region2.hh:132
static Scalar ddGamma_ddPi(Scalar temperature, Scalar pressure)
The second partial derivative of the Gibbs free energy to the normalized pressure for IAPWS region 2 ...
Definition: region2.hh:267
static void checkValidityRange(Scalar temperature, Scalar pressure, const std::string &propertyName="This property")
Returns true if IAPWS region 2 applies for a (temperature, pressure) pair.
Definition: region2.hh:62
static constexpr Scalar dTau_dt(Scalar temperature)
Returns the derivative of the reduced temperature to the temperature for IAPWS region 2.
Definition: region2.hh:92
static constexpr Scalar pi(Scalar pressure)
Returns the reduced pressure (dimensionless) for IAPWS region 2.
Definition: region2.hh:100
static constexpr Scalar dPi_dp(Scalar pressure)
Returns the derivative of the reduced pressure to the pressure for IAPWS region 2 in .
Definition: region2.hh:109
static constexpr Scalar tau(Scalar temperature)
Returns the reduced temperature (dimensionless) for IAPWS region 2.
Definition: region2.hh:83
static constexpr Scalar dp_dPi(Scalar pressure)
Returns the derivative of the pressure to the reduced pressure for IAPWS region 2 (dimensionless).
Definition: region2.hh:118
static Scalar dGamma_dPi(Scalar temperature, Scalar pressure)
The partial derivative of the Gibbs free energy to the normalized pressure for IAPWS region 2 (i....
Definition: region2.hh:202