30#ifndef DUMUX_IAPWS_REGION4_HH
31#define DUMUX_IAPWS_REGION4_HH
50template <
class Scalar>
65 constexpr Scalar n[10] = {
66 0.11670521452767e4, -0.72421316703206e6, -0.17073846940092e2,
67 0.12020824702470e5, -0.32325550322333e7, 0.14915108613530e2,
68 -0.48232657361591e4, 0.40511340542057e6, -0.23855557567849,
74 Scalar A = (sigma + n[0])*sigma + n[1];
75 Scalar B = (n[2]*sigma + n[3])*sigma + n[4];
76 Scalar C = (n[5]*sigma + n[6])*sigma + n[7];
79 Scalar tmp = 2*C/(sqrt(B*B - 4*A*C) - B);
96 constexpr Scalar n[10] = {
97 0.11670521452767e4, -0.72421316703206e6, -0.17073846940092e2,
98 0.12020824702470e5, -0.32325550322333e7, 0.14915108613530e2,
99 -0.48232657361591e4, 0.40511340542057e6, -0.23855557567849,
104 Scalar beta = pow((
pressure/1e6 ), (1./4.));
105 Scalar beta2 = pow(beta, 2.);
106 Scalar E = beta2 + n[2] * beta + n[5];
107 Scalar F = n[0]*beta2 + n[3]*beta + n[6];
108 Scalar G = n[1]*beta2 + n[4]*beta + n[7];
111 Scalar D = ( 2.*G)/(-F -sqrt(pow(F,2.) - 4.*E*G));
112 Scalar
temperature = (n[9] + D - sqrt(pow(n[9]+D , 2.) - 4.* (n[8] + n[9]*D)) ) * 0.5;
make the local view function available whenever we use the grid geometry
Definition: adapt.hh:29
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
Implements the equations for region 4 of the IAPWS '97 formulation.
Definition: region4.hh:52
static Scalar saturationPressure(Scalar temperature)
Returns the saturation pressure in of pure water at a given temperature.
Definition: region4.hh:63
static Scalar vaporTemperature(Scalar pressure)
Returns the saturation temperature in of pure water at a given pressure.
Definition: region4.hh:94