Skip to content

Instantly share code, notes, and snippets.

@dirkncl
Last active August 7, 2021 11:12
Show Gist options
  • Save dirkncl/8eb42c91da831de74364b2044665ddaa to your computer and use it in GitHub Desktop.
Save dirkncl/8eb42c91da831de74364b2044665ddaa to your computer and use it in GitHub Desktop.
<html>
<head>
<script>
/*
The International Association for the Properties of Water and Steam
Lucerne, Switzerland
August 2007
Revised Release on the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam
(The revision only relates to the extension of region 5 to 50 MPa)
©2007 International Association for the Properties of Water and Steam
Publication in whole or in part is allowed in all countries provided that attribution is given to the
International Association for the Properties of Water and Steam
President:
J. R. Cooper
School of Engineering and Materials Science
Queen Mary, University of London
Mile End Road
London E1 4NS, England
Executive Secretary:
Dr. R. B. Dooley
Structural Integrity Associates,Inc.
2616 Chelsea Drive
Charlotte, NC 28209, USA
email: bdooley@structint.com
_____________________________________________________________________________________________________________________________________
_____________________________________________________________________________________________________________________________________
What Next Formulation in 17th International Conference on the Properties of Water and Steam (Prague, 2-7 September, 2018)??...
Simplification of Steam Formulation.
------------------------------------
*/
var constants = {
/* Critical and Gas Constants */
'R' : 0.461526, /* kJ/kg.K constants.R (eq. 1) */
'Tc' : 647.096, /* K constants.Tc (eq. 2) */
'Pc' : 22.064, /* Mpa constants.Pc (eq. 3) */
'Rhoc' : 322, /* kg/m3 constants.Rhoc (eq. 4) */
/* Temperature and Pressure region limits */
'MIN_P' : 0.000611213, /* MPa */
'MAX_P' : 100.0, /* MPa */
'MAX_T' : 2273.15, /* K */
'MIN_T' : 273.15, /* K */
'MIN_S' : -0.000154549592045, /* kJ/kg */
'MIN_H' : -0.041587825659104, /* kJ/kg.K */
'R2_MIN_T' : 623.15, /* K */
'R2_MAX_T' : 1073.15, /* K */
'R2_CRT_S' : 5.85, /* kJ/kg.K constants.R2_CRT_S */
'R2_CRT_P' : 4.0, /* MPa */
'B23_MIN_P' : 16.5292, /* MPa (The region 2-3 boundary pressure at R2_MIN_T) */
'B23_MAX_T' : 863.15, /* K (The region 2-3 boundary temperature at MAX_P) */
'R5_MIN_T' : 1073.15, /* K */
'R5_MAX_P' : 50, /* Mpa */
'R5_MAX_T' : 2273.15, /* K */
'R3_MIN_T' : 623.15, /* K */
'R3_CRT_S' : 4.41202148223476, /* kJ/kg.K */
'B23_S_MIN' : 5.048096828,
'B23_S_MAX' : 5.260578707,
'B23_H_MIN' : 2563.592004,
'B23_H_MAX' : 2812.942061,
};
var R = constants.R;
function SteamTable(){
var self=this;
self.PT = PT,
self.r1_PT = r1_PT,
self.r2_PT = r2_PT,
self.r3_PT = r3_PT,
self.r5_PT = r5_PT,
self.b23_P_T = b23_P_T,
self.r4_T_Psat = r4_T_Psat,
self.r4_P_Tsat = r4_P_Tsat,
self.b23_T_P = b23_T_P,
self.b3ab_P_T = b3ab_P_T,
self.b3cd_P_T = b3cd_P_T,
self.b3ef_P_T = b3ef_P_T,
self.b3gh_P_T = b3gh_P_T,
self.b3ij_P_T = b3ij_P_T,
self.b3jk_P_T = b3jk_P_T,
self.b3mn_P_T = b3mn_P_T,
self.b3op_P_T = b3op_P_T,
self.b3qu_P_T = b3qu_P_T,
self.b3rx_P_T = b3rx_P_T,
self.b3uv_P_T = b3uv_P_T,
self.b3wx_P_T = b3wx_P_T,
self.Viscosity = Viscosity,
self.Thermal_Conductivity = Thermal_Conductivity,
self.Surface_Tension = Surface_Tension,
self.Dielectric_Constant = Dielectric_Constant,
self.Ionization_Constant = Ionization_Constant,
self.PH = PH,
self.r2_PH = r2_PH,
self.r1_PH_T = r1_PH_T,
self.b2bc_H_P = b2bc_H_P,
self.b2bc_P_H = b2bc_P_H,
self.b3ab_P_H = b3ab_P_H,
self.r3A_PH_V = r3A_PH_V,
self.r3B_PH_V = r3B_PH_V,
self.r4_H_Psat = r4_H_Psat,
self.PS = PS,
self.r3A_PS_V = r3A_PS_V,
self.r3B_PS_V = r3B_PS_V,
self.HS = HS,
self.b2ab_S_H = b2ab_S_H,
self.b23_HS_T = b23_HS_T,
self.b14_S_H = b14_S_H,
self.b3A_S_H = b3A_S_H,
self.b2ab_S_Hsat = b2ab_S_Hsat,
self.b2c3b_S_H = b2c3b_S_H,
self.b13_S_H = b13_S_H,
self.r4_HS_Tsat = r4_HS_Tsat,
self.findRegion_PT = findRegion_PT,
self.findRegion_PH = findRegion_PH,
self.findRegion_PS = findRegion_PS,
self.findRegion_HS = findRegion_HS
};
function SteamResult(r) {
var result = {};
with (r){
result.P = P; /* Pressure, P, Mpa */
result.T = T; /* Temperature, T, K */
result.v = v; /* Specific volume, v, m^3/kg */
result.rho = 1/v; /* Density, rho, kg/m^3 */
result.u = u; /* Specific internal energy, u, kJ/kg */
result.s = s; /* Specific entropy, s, kJ/kg */
result.h = h; /* Specific enthalpy, h, kJ/kg.K */
result.cp = cp; /* Specific isobaric heat capacity, Cp kJ/kg.K */
result.cv = cv; /* Specific isochoric heat capacity, Cv */
result.w = w; /* Speed of Sound, w, m/s */
result.mu = Viscosity(T, result.rho)/1000; /* Viscosity cP, */
result.k = Thermal_Conductivity(T, result.rho)/1000; /* Thermal Conductivity W/m.K */
result.sig = Surface_Tension(T); /* Surface Tension mN/m */
result.epsilon = Dielectric_Constant(T, result.rho); /* Dielectric constant */
result.ic = Ionization_Constant(T, result.rho); /* Ionisation constant */
};
return result;
};
/*
Calculate the steam properties using IAWPS for a given pressure and temperature
P is the pressure of the water in MPa
T is the temperature in K
*/
function PT(P, T, v) {
v = (typeof v == "undefined") ? -1 : v;
var region = findRegion_PT(P,T),
result = null;
switch(region) {
case 1 : result = r1_PT(P, T); break;
case 2 : result = r2_PT(P, T); break;
case 3 : result = r3_PT(P, T, v); break;
case 5 : result = r5_PT(P, T); break;
}
return result;
}
/*
Determines which IAPWS-IF97 region a pressure and temperature combination lie in.
P is the pressure of the water in MPa
T is the temperature in K
*/
function findRegion_PT(P, T) {
if (P >= constants.MIN_P && P <= constants.MAX_P && T >= constants.MIN_T &&
(T <= constants.R5_MIN_T || ( P <= constants.R5_MAX_P && T <= constants.MAX_T))) {
if (T > constants.R5_MIN_T) {
if(P <= constants.R5_MAX_P) {
return 5;
} else {
return -1;
}
} else if (T > constants.R3_MIN_T) {
if (P > b23_T_P(T)) {
return 3;
} else {
return 2;
}
} else {
if (r4_T_Psat(T) > P) {
return 2;
} else {
return 1;
}
}
}
return -1;
}
/*
Auxillary equations for Regions 2 and 3
Book : IF97-Rev.pdf
Equation 5 (pp. 5) of IAPWS-97
Returns the pressure for a given temperature along the region 2-3 boundary
For computer-program verification, Eqs. (5) and (6) must meet the following T-p point:
T = 0.623150000 * 10^3 K , p = 0.165291643 * 10^2 MPa.
*/
function b23_T_P(T) {
/* n1-n2*T+n3*T^2 */
var n1 = 348.05185628969,
n2 = 1.1671859879975,
n3 = 0.0010192970039326;
return n1 - n2*T+ n3*T*T;
}
/*
Equation 6 (pp. 6) of IAPWS-97
Returns the temperature for a given pressure along the region 2-3 boundary
*/
function b23_P_T(P) {
/* n4+((P-n4)/n3)^0.5 */
var n3 = 0.0010192970039326,
n4 = 572.54459862746,
n5 = 13.91883977887;
return n4 + Math.pow((P-n5)/n3, 0.5);
}
/*
Book : IF97-Rev.pdf
5.1 Basic Equation
Region 1 forwards equation
u_t_liq = 0 ; u_t_liq = 0, ... 8
T_t = 273.16 K ; p_t = 611.657 Pa ... 9
h_t_liq = 0.611783 J kg^{-1} ... 10
*/
function r1_PT(P, T) {
/*
Range: 273.15 K <= T <= 623.15 K; ps(T) <= p <= 100 MPa .
Table 2. Numerical values of the coefficients and exponents of the dimensionless Gibbs free energy for region 1, Eq. (7)
*/
var I = [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 8, 8, 21, 23, 29, 30, 31, 32],
J = [-2, -1, 0, 1, 2, 3, 4, 5, -9, -7, -1, 0, 1, 3, -3, 0, 1, 3, 17, -4, 0, 6, -5, -2, 10, -8, -11, -6, -29, -31, -38, -39, -40, -41],
n = [0.14632971213167, -0.84548187169114, -3.756360367204, 3.3855169168385, -0.95791963387872, 0.15772038513228, -0.016616417199501, 8.1214629983568E-4, 2.8319080123804E-4, -6.0706301565874E-4, -0.018990068218419, -0.032529748770505, -0.021841717175414, -5.283835796993E-5, -4.7184321073267E-4, -3.0001780793026E-4, 4.7661393906987E-5, -4.4141845330846E-6, -7.2694996297594E-16, -3.1679644845054E-5, -2.8270797985312E-6, -8.5205128120103E-10, -2.2425281908E-6, -6.5171222895601E-7, -1.4341729937924E-13, -4.0516996860117E-7, -1.2734301741641E-9, -1.7424871230634E-10, -6.8762131295531E-19, 1.4478307828521E-20, 2.6335781662795E-23, -1.1947622640071E-23, 1.8228094581404E-24, -9.3537087292458E-26],
/* equation in Table 3 and 4 */
T_star = 1386.0, /* K */
p_star = 16.53, /* Mpa */
tau = T_star / T,
pi = P / p_star,
gamma = 0,
gamma_pi = 0,
gamma_pi_pi = 0,
gamma_tau = 0,
gamma_tau_tau = 0,
gamma_pi_tau = 0;
for (var i = 0; i < 34; i++) {
/* $$\gamma = \sum_{i=1}^{34}n_i(7.1-\pi)^{I_i}(\tau-1.222)^{J_i}$$ */
gamma += n[i]*Math.pow(7.1-pi, I[i])*Math.pow(tau-1.222, J[i]);
/* $$\gamma_{\pi} = \sum_{i=1}^{34}-n_i I_i(7.1-\pi)^{I_i-1}(\tau-1.222)^{J_i}$$ */
gamma_pi += -n[i]*I[i]*Math.pow(7.1-pi, I[i]-1)*Math.pow(tau-1.222, J[i]);
/* $$\gamma_{\pi \pi} = \sum_{i=1}^{34}n_i I_i(I_i-1)(7.1-\pi)^{I_i-2}(\tau-1.222)^{J_i}$$ */
gamma_pi_pi += n[i]*I[i]*(I[i]-1)*Math.pow(7.1-pi, I[i]-2)*Math.pow(tau-1.222, J[i]);
/* $$\gamma_{\tau} = \sum_{i=1}^{34}n_i(7.1-\pi)^{I_i}J_i(\tau-1.222)^{J_i-1}$$ */
gamma_tau += n[i]*Math.pow(7.1-pi, I[i])*J[i]*Math.pow(tau-1.222, J[i]-1);
/* $$\gamma_{\tau \tau} = \sum_{i=1}^{34}n_i(7.1-\pi)^{I_i}J_i(J_i-1)(\tau-1.222)^{J_i-2}$$ */
gamma_tau_tau += n[i]*Math.pow(7.1-pi, I[i])*J[i]*(J[i]-1)*Math.pow(tau-1.222,J[i]-2);
/* $$\gamma_{\pi \tau} = \sum_{i=1}^{34}-n_i I_i(7.1-\pi)^{I_i-1}J_i(\tau-1.222)^{J_i-1}$$ */
gamma_pi_tau += -n[i]*I[i]*Math.pow(7.1-pi, I[i]-1)*J[i]*Math.pow(tau-1.222, J[i]-1);
}
/* $$v=\left(\partial g/\partial p \right)_T \qquad v(\pi,\tau)\frac{p}{RT}=\pi \gamma_{\pi}$$ */
var SpecVolume = R*T*pi*gamma_pi/(1000*P);
/* $$u = g-T \left(\partial g/\partial T \right)_p-p\left(\partial g/\partial p \right)_T \qquad \frac{u(\pi,\tau)}{RT} = \tau \gamma_{tau}-\pi \gamma_{\pi}$$ */
var InternalEnergy = R*T*(tau*gamma_tau-pi*gamma_pi);
/* $$s=-\left(\partial g/\partial T \right)_p \qquad \frac{s(\pi,\tau)}{R} = \tau \gamma_{\tau}-\gamma$$ */
var Entropy = R*(tau*gamma_tau-gamma);
/* $$h = g-T \left(\partial g/\partial T \right)_p \qquad \frac{h(\pi,\tau)}{RT} = \tau \gamma_{\tau}$$ */
var Enthalpy = R*T*tau*gamma_tau;
/* $$c_p=\left(\partial h/\partial T \right)_p \qquad \frac{c_p(\pi,\tau)}{R} = -\tau^2 \gamma_{\tau \tau}$$ */
var SpecHeat_cp = R*(-Math.pow(tau,2)*gamma_tau_tau);
/* $$c_v=\left(\partial u/\partial T \right)_v \qquad \frac{c_v(\pi,\tau)}{R} = -\tau^2 \gamma_{\tau \tau}+\frac{\left(\gamma_{\pi}-\tau \gamma_{\pi \tau} \right)^2}{\gamma_{\pi \pi}}$$ */
var SpecHeat_cv = R*(-Math.pow(tau,2)*gamma_tau_tau+Math.pow(gamma_pi-tau*gamma_pi_tau,2)/gamma_pi_pi);
/* $$w=v\left[-\left(\partial p/\partial v \right)_s \right]^{1/2} \qquad \frac{w^2(\pi,\tau)}{RT} = \frac{\gamma_{\pi}^2 }{\frac{(\gamma_{\pi}-\tau \gamma_{\pi \tau})^2}{\tau^2 \gamma_{\tau \tau}}-\gamma_{\pi \pi}}$$ */
var SpeedOfSound = Math.pow(1000*R*T*Math.pow(gamma_pi,2) / (Math.pow(gamma_pi-tau*gamma_pi_tau,2) / (Math.pow(tau,2)*gamma_tau_tau) - gamma_pi_pi), 0.5);
return SteamResult({
P: P,
T: T,
v: SpecVolume,
u: InternalEnergy,
s: Entropy,
h: Enthalpy,
cp: SpecHeat_cp,
cv: SpecHeat_cv,
w: SpeedOfSound
});
}
function r2_PT(P, T) {
var Jo = [0, 1, -5, -4, -3, -2, -1, 2, 3],
no = [-9.6927686500217, 10.086655968018, -0.005608791128302, 0.071452738081455, -0.40710498223928, 1.4240819171444, -4.383951131945, -0.28408632460772, 0.021268463753307],
Ir = [1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 5, 6, 6, 6, 7, 7, 7, 8, 8, 9, 10, 10, 10, 16, 16, 18, 20, 20, 20, 21, 22, 23, 24, 24, 24],
Jr = [0, 1, 2, 3, 6, 1, 2, 4, 7, 36, 0, 1, 3, 6, 35, 1, 2, 3, 7, 3, 16, 35, 0, 11, 25, 8, 36, 13, 4, 10, 14, 29, 50, 57, 20, 35, 48, 21, 53, 39, 26, 40, 58],
nr = [-1.7731742473213E-3, -0.017834862292358, -0.045996013696365, -0.057581259083432, -0.05032527872793, -3.3032641670203E-5, -1.8948987516315E-4, -3.9392777243355E-3, -0.043797295650573, -2.6674547914087E-5, 2.0481737692309E-8, 4.3870667284435E-7, -3.227767723857E-5, -1.5033924542148E-3, -0.040668253562649, -7.8847309559367E-10, 1.2790717852285E-8, 4.8225372718507E-7, 2.2922076337661E-6, -1.6714766451061E-11, -2.1171472321355E-3, -23.895741934104, -5.905956432427E-18, -1.2621808899101E-6, -0.038946842435739, 1.1256211360459E-11, -8.2311340897998, 1.9809712802088E-8, 1.0406965210174E-19, -1.0234747095929E-13, -1.0018179379511E-9, -8.0882908646985E-11, 0.10693031879409, -0.33662250574171, 8.9185845355421E-25, 3.0629316876232E-13, -4.2002467698208E-6, -5.9056029685639E-26, 3.7826947613457E-6, -1.2768608934681E-15, 7.3087610595061E-29, 5.5414715350778E-17, -9.436970724121E-7],
p_star = 1,
T_star = 540,
pi = P / p_star,
tau = T_star / T,
gamma_o = Math.log(pi),
gamma_o_pi = 1/pi,
gamma_o_pi_pi = -1/(pi*pi),
gamma_o_tau = 0,
gamma_o_tau_tau = 0,
gamma_o_pi_tau = 0;
for (var i = 0; i < 9; i++) {
gamma_o += no[i]*Math.pow(tau, Jo[i]);
gamma_o_tau += no[i]*Jo[i]*Math.pow(tau, Jo[i]-1);
gamma_o_tau_tau += no[i]*Jo[i]*(Jo[i]-1)*Math.pow(tau, Jo[i]-2);
}
var gamma_r = 0,
gamma_r_pi = 0,
gamma_r_pi_pi = 0,
gamma_r_tau = 0,
gamma_r_tau_tau = 0,
gamma_r_pi_tau = 0;
for (var i = 0; i < 43; i++) {
gamma_r += nr[i]*Math.pow(pi, Ir[i])*Math.pow(tau-0.5, Jr[i]);
gamma_r_pi += nr[i]*Ir[i]*Math.pow(pi, Ir[i]-1)*Math.pow(tau-0.5, Jr[i]);
gamma_r_pi_pi += nr[i]*Ir[i]*(Ir[i]-1)*Math.pow(pi, Ir[i]-2)*Math.pow(tau-0.5, Jr[i]);
gamma_r_tau += nr[i]*Math.pow(pi, Ir[i])*Jr[i]*Math.pow(tau-0.5, Jr[i]-1);
gamma_r_tau_tau += nr[i]*Math.pow(pi, Ir[i])*Jr[i]*(Jr[i]-1)*Math.pow(tau-0.5, Jr[i]-2);
gamma_r_pi_tau += nr[i]*Ir[i]*Math.pow(pi, Ir[i]-1)*Jr[i]*Math.pow(tau-0.5, Jr[i]-1);
}
var SpecVolume = (R*T/(1000*P))*pi*(gamma_o_pi + gamma_r_pi);
var InternalEnergy = R*T*(tau*(gamma_o_tau+gamma_r_tau)-pi*(gamma_o_pi+gamma_r_pi));
var Entropy = R*(tau*(gamma_o_tau+gamma_r_tau)-(gamma_o+gamma_r));
var Enthalpy = R*T*tau*(gamma_o_tau+gamma_r_tau);
var SpecHeat_cp = -R*tau*tau*(gamma_o_tau_tau+gamma_r_tau_tau);
var SpecHeat_cv = R*(-tau*tau*(gamma_o_tau_tau+gamma_r_tau_tau)-Math.pow(1+pi*gamma_r_pi-tau*pi*gamma_r_pi_tau,2)/(1-pi*pi*gamma_r_pi_pi));
var SpeedOfSound = Math.pow(1000*R*T*(1 + 2*pi*gamma_r_pi+pi*pi*gamma_r_pi*gamma_r_pi)/((1-pi*pi*gamma_r_pi_pi)+Math.pow(1+pi*gamma_r_pi-tau*pi*gamma_r_pi_tau,2)/(tau*tau*(gamma_o_tau_tau+gamma_r_tau_tau))), 0.5);
return SteamResult({
P: P,
T: T,
v: SpecVolume,
u: InternalEnergy,
s: Entropy,
h: Enthalpy,
cp: SpecHeat_cp,
cv: SpecHeat_cv,
w: SpeedOfSound
});
}
/*
Region 3
Use a optional argument to calculate density
The basic equation for this region is a fundamental equation for the specific Helmholtz free energy f. This equation is expressed in dimensionless form, \phi = f / (RT) , and reads
$$f(\rho,T)=\phi(\delta,\tau)=n1\ln(delta)+\sum_{i=2}^{40}n_i\delta^{I_i}\tau^{J_i}$$
*/
function r3_PT(P, T, rho) {
var SpecVolume = 1/rho;
if (rho == -1 || typeof rho == 'undefined') {// Has the density volume been set - if false then calculate it
SpecVolume = r3_PT_v(P, T);
rho = 1/SpecVolume;
}
var I = [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 8, 9, 9, 10, 10, 11],
J = [0, 0, 1, 2, 7, 10, 12, 23, 2, 6, 15, 17, 0, 2, 6, 7, 22, 26, 0, 2, 4, 16, 26, 0, 2, 4, 26, 1, 3, 26, 0, 2, 26, 2, 26, 2, 26, 0, 1, 26],
n = [1.0658070028513, -15.732845290239, 20.944396974307, -7.6867707878716, 2.6185947787954, -2.808078114862, 1.2053369696517, -8.4566812812502E-03, -1.2654315477714, -1.1524407806681, 0.88521043984318, -0.64207765181607, 0.38493460186671, -0.85214708824206, 4.8972281541877, -3.0502617256965, 0.039420536879154, 0.12558408424308, -0.2799932969871, 1.389979956946, -2.018991502357, -8.2147637173963E-03, -0.47596035734923, 0.0439840744735, -0.44476435428739, 0.90572070719733, 0.70522450087967, 0.10770512626332, -0.32913623258954, -0.50871062041158, -0.022175400873096, 0.094260751665092, 0.16436278447961, -0.013503372241348, -0.014834345352472, 5.7922953628084E-04, 3.2308904703711E-03, 8.0964802996215E-05, -1.6557679795037E-04, -4.4923899061815E-05],
delta = rho/constants.Rhoc,
tau = constants.Tc/T,
phi = n[0]*Math.log(delta),
phi_delta = n[0]/delta,
phi_delta_delta = -n[0]/Math.pow(delta,2),
phi_tau = 0,
phi_tau_tau = 0,
phi_delta_tau = 0;
// Need to start from i = 1 because j[0] and i[0] are NA and not used
for (var i = 1; i < 40; i++) {
phi += n[i]*Math.pow(delta,I[i])*Math.pow(tau,J[i]);
phi_delta += n[i]*I[i]*Math.pow(delta,I[i]-1.0)*Math.pow(tau,J[i]);
phi_delta_delta += n[i]*I[i]*(I[i]-1.0)*Math.pow(delta,I[i]-2.0)*Math.pow(tau,J[i]);
phi_tau += n[i]*Math.pow(delta,I[i])*J[i]*Math.pow(tau,J[i]-1.0);
phi_tau_tau += n[i]*Math.pow(delta,I[i])*J[i]*(J[i]-1.0)*Math.pow(tau,J[i]-2.0);
phi_delta_tau += n[i]*I[i]*Math.pow(delta,I[i]-1.0)*J[i]*Math.pow(tau,J[i]-1.0);
}
var Pressure = rho*R*T*delta*phi_delta/1000;
var InternalEnergy = R*T*tau*phi_tau;
var Entropy = R*(tau*phi_tau-phi);
var Enthalpy = R*T*(tau*phi_tau+delta*phi_delta);
var SpecHeat_cp = R*(-Math.pow(tau,2)*phi_tau_tau + Math.pow(delta*phi_delta-delta*tau*phi_delta_tau,2)/(2*delta*phi_delta+Math.pow(delta,2)*phi_delta_delta));
var SpecHeat_cv = R*(-Math.pow(tau,2)*phi_tau_tau);
var SpeedOfSound = Math.pow(1000*R*T*(2*delta*phi_delta + Math.pow(delta,2)*phi_delta_delta - Math.pow(delta*phi_delta-delta*tau*phi_delta_tau,2)/(Math.pow(tau,2)*phi_tau_tau)),0.5);
return SteamResult({
P: Pressure,
T: T,
v: SpecVolume,
u: InternalEnergy,
s: Entropy,
h: Enthalpy,
cp: SpecHeat_cp,
cv: SpecHeat_cv,
w: SpeedOfSound
});
}
/* Selection criteria from table 2, page 10 of PT Region 3 supplementary release */
function r3_PT_v(P, T) {
var Tsat = r4_P_Tsat(P),
b3cd = b3cd_P_T(P);
if( 40.0 < P && P <= 100.0 ) {
if(T <= b3ab_P_T(P)) {
return r3a_PT_v(P,T);
}
else {
return r3b_PT_v(P,T);
}
}
else if( 25.0 < P && P <= 40.0 ) {
if( T <= b3cd ) {
return r3c_PT_v(P,T);
}
else if( T <= b3ab_P_T(P) ) {
return r3d_PT_v(P,T);
}
else if( T <= b3ef_P_T(P) ) {
return r3e_PT_v(P,T);
}
else {
return r3f_PT_v(P,T);
}
}
else if ( 22.5 < P && P <= 25.0) {
if( T <= b3cd ) {
return r3c_PT_v(P,T);
}
else if (T <= b3gh_P_T(P)) {
if( P <= 23.5 ) {
return r3l_PT_v(P,T);
}
return r3g_PT_v(P,T);
}
else if ( T <= b3ef_P_T(P) ) {
if( P <= 23.0 ) {
if(T <= b3mn_P_T(P)) {
return r3m_PT_v(P,T);
}
else {
return r3n_PT_v(P,T);
}
}
return r3h_PT_v(P,T);
}
else if ( T <= b3ij_P_T(P) ) {
if ( P <= 23.0 ) {
if( T <= b3op_P_T(P) ) {
return r3o_PT_v(P,T);
}
else {
return r3p_PT_v(P,T);
}
}
return r3i_PT_v(P,T);
}
else if( T <= b3jk_P_T(P) ) {
return r3j_PT_v(P,T);
}
else {
return r3k_PT_v(P,T);
}
}
else if ( 21.04336732 < P && P <= 22.5) { /* R4_T_Psat(643.15) < P < 22.5 */
if( T <= b3cd ) {
return r3c_PT_v(P,T);
}
else if( T <= b3qu_P_T(P) ) {
return r3q_PT_v(P,T);
}
else if( T <= b3rx_P_T(P) ) {
/* critical region */
if( P <= constants.Pc ) {
/* Subcritical pressure region */
if( T <= Tsat ) {
if( P <= 21.93161551 ) {
return r3u_PT_v(P,T);
}
else {
if( T <= b3uv_P_T(P) ) {
return r3u_PT_v(P,T);
}
else {
return r3y_PT_v(P,T);
}
}
}
else {
if( P <= 21.90096265 ) {
return r3x_PT_v(P,T);
}
else {
if( T <= b3wx_P_T(P) ) {
return r3z_PT_v(P,T);
}
else {
return r3x_PT_v(P,T);
}
}
}
}
else {
/* Supercritical pressure region */
if( T <= b3uv_P_T(P) ) {
return r3u_PT_v(P,T);
}
else if( T <= b3ef_P_T(P) ) {
if( P <= 22.11) {
return r3y_PT_v(P,T);
}
else {
return r3v_PT_v(P,T);
}
}
else if( T <= b3wx_P_T(P) ) {
if( P <= 22.11 ) {
return r3z_PT_v(P,T);
}
else {
return r3w_PT_v(P,T);
}
}
else {
return r3x_PT_v(P,T);
}
}
}
else if( T <= b3jk_P_T(P) ) {
return r3r_PT_v(P,T);
}
else {
return r3k_PT_v(P,T);
}
}
else if ( 20.5 < P && P <= 21.04336732) {
if( T <= b3cd ) {
return r3c_PT_v(P,T);
}
else if( T <= Tsat ) {
return r3s_PT_v(P,T);
}
else if( T <= b3jk_P_T(P) ) {
return r3r_PT_v(P,T);
}
else {
return r3k_PT_v(P,T);
}
}
else if ( 19.00881189173929 < P && P <= 20.5 ) {
if( T <= b3cd ) {
return r3c_PT_v(P,T);
}
else if( T <= Tsat ) {
return r3s_PT_v(P,T);
}
else {
return r3t_PT_v(P,T);
}
}
else if ( 16.52916427498 < P && P <= 19.00881189173929 ) { /* R4_T_Psat(623.15) < P < P3cd */
if( T <= Tsat ) {
return r3c_PT_v(P,T);
}
else {
return r3t_PT_v(P,T);
}
}
/* Else specific volume cannot be calculated and set to -ve */
return -1.0;
}
/*
Subregion Boundary equations for Region 3
From pp. 9 of Supplementary Release on Backward Equations for Specific Volume as a Function of Pressure and Temperature v(p,T)
*/
function b3ab_P_T(P) {
var I = [0,1,2,-1,-2],
n = [1.54793642129415E3,-1.87661219490113E2,2.13144632222113E1,-1.91887498864292E3,9.18419702359447E2],
T = 0;
P = Math.log(P);
for (var i = 0; i < 5; i++) {
T += n[i]*Math.pow(P, I[i]);
}
return T;
}
function b3op_P_T(P) {
var I = [0,1,2,-1,-2],
n = [9.69461372400213E2,-3.32500170441278E2,6.4285959846667E1,7.73845935768222E2,-1.52313732937084E3],
T = 0;
P = Math.log(P);
for (var i = 0; i < 5; i++) {
T += n[i]*Math.pow(P, I[i]);
}
return T;
}
function b3ef_P_T(P) {
return 3.727888004*(P-constants.Pc)+constants.Tc;
}
function b3cd_P_T(P) {
var I = [0,1,2,3],
n = [5.85276966696349E2,2.78233532206915,-1.27283549295878E-2,1.59090746562729E-4],
T = 0;
for (var i = 0; i < 4; i++) {
T += n[i]*Math.pow(P, I[i]);
}
return T;
}
function b3gh_P_T(P) {
var I = [0,1,2,3,4],
n = [-2.49284240900418E4,4.28143584791546E3,-2.6902917314013E2,7.51608051114157,-7.87105249910383E-2],
T = 0;
for(var i = 0; i < 5; i++) {
T += n[i]*Math.pow(P, I[i]);
}
return T;
}
function b3ij_P_T(P) {
var I = [0,1,2,3,4],
n = [5.84814781649163E2,-6.16179320924617E-1,2.60763050899562E-1,-5.87071076864459E-3,5.15308185433082E-5],
T = 0;
for (var i = 0; i < 5; i++) {
T += n[i]*Math.pow(P, I[i]);
}
return T;
}
function b3jk_P_T(P) {
var I = [0,1,2,3,4],
n = [6.17229772068439E2,-7.70600270141675,6.97072596851896E-1,-1.57391839848015E-2,1.37897492684194E-4],
T = 0;
for(var i = 0; i < 5; i++) {
T += n[i]*Math.pow(P, I[i]);
}
return T;
}
function b3mn_P_T(P) {
var I = [0,1,2,3],
n = [5.35339483742384E2,7.61978122720128,-1.58365725441648E-1,1.92871054508108E-3],
T = 0;
for(var i = 0; i < 4; i++) {
T += n[i]*Math.pow(P, nI[i]);
}
return T;
}
function b3qu_P_T(P) {
var I = [0,1,2,3],
n = [5.65603648239126E2,5.29062258221222,-1.02020639611016E-1,1.22240301070145E-3],
T = 0;
for(var i = 0; i < 4; i++) {
T += n[i]*Math.pow(P, I[i]);
}
return T;
}
function b3rx_P_T(P) {
var I = [0,1,2,3],
n = [5.84561202520006E2,-1.02961025163669,2.43293362700452E-1,-2.94905044740799E-3],
T = 0;
for(var i = 0; i < 4; i++) {
T += n[i]*Math.pow(P, I[i]);
}
return T;
}
function r3a_PT_v(P, T) {
var I = [-12,-12,-12,-10,-10,-10,-8,-8,-8,-6,-5,-5,-5,-4,-3,-3,-3,-3,-2,-2,-2,-1,-1,-1,0,0,1,1,2,2],
J = [5,10,12,5,10,12,5,8,10,1,1,5,10,8,0,1,3,6,0,2,3,0,1,2,0,1,0,2,0,2],
n = [1.10879558823853E-3,5.72616740810616E2,-7.67051948380852E4,-2.53321069529674E-2,6.28008049345689E3,2.34105654131876E5,2.16867826045856E-1,-1.56237904341963E2,-2.69893956176612E4,-1.80407100085505E-4,1.16732227668261E-3,2.6698704085604E1,2.82776617243286E4,-2.42431520029523E3,4.35217323022733E-4,-1.22494831387441E-2,1.79357604019989,4.42729521058314E1,-5.93223489018342E-3,4.53186261685774E-1,1.3582570312914,4.08748415856745E-2,4.74686397863312E-1,1.18646814997915,5.46987265727549E-1,1.95266770452643E-1,-5.02268790869663E-2,-3.69645308193377E-1,6.3382803752842E-3,7.97441793901017E-2],
v_star = 0.0024,
p_star = 100,
T_star = 760,
pi = P / p_star,
sigma = T / T_star,
v = 0;
for(var i = 0; i < 30; i++) {
v += n[i]*Math.pow(pi-0.085,I[i])*Math.pow(sigma-0.817, J[i]);
}
return v_star*v;
}
function r3b_PT_v(P, T) {
var I = [-12,-12,-10,-10,-8,-6,-6,-6,-5,-5,-5,-4,-4,-4,-3,-3,-3,-3,-3,-2,-2,-2,-1,-1,0,0,1,1,2,3,4,4],
J = [10,12,8,14,8,5,6,8,5,8,10,2,4,5,0,1,2,3,5,0,2,5,0,2,0,1,0,2,0,2,0,1],
n = [-8.27670470003621E-2,4.16887126010565E1,4.83651982197059E-2,-2.91032084950276E4,-1.11422582236948E2,-2.02300083904014E-2,2.94002509338515E2,1.40244997609658E2,-3.44384158811459E2,3.61182452612149E2,-1.40699677420738E3,-2.02023902676481E-3,1.71346792457471E2,-4.25597804058632,6.91346085000334E-6,1.51140509678925E-3,-4.16375290166236E-2,-4.13754957011042E1,-5.06673295721637E1,-5.72212965569023E-4,6.08817368401785,2.39600660256161E1,1.22261479925384E-2,2.16356057692938,3.98198903368642E-1,-1.16892827834085E-1,-1.02845919373532E-1,-4.92676637589284E-1,6.5554045640679E-2,-2.4046253507853E-1,-2.69798180310075E-2,1.28369435967012E-1],
v_star = 0.0041,
p_star = 100,
T_star = 860,
pi = P / p_star,
sigma = T / T_star,
v = 0;
for (var i = 0; i < 32; i++) {
v += n[i]*Math.pow(pi-0.280,I[i])*Math.pow(sigma-0.779,J[i]);
}
return v_star*v;
}
function r3c_PT_v(P, T) {
var I = [-12,-12,-12,-10,-10,-10,-8,-8,-8,-6,-5,-5,-5,-4,-4,-3,-3,-2,-2,-2,-1,-1,-1,0,0,0,1,1,2,2,2,2,3,3,8],
J = [6,8,10,6,8,10,5,6,7,8,1,4,7,2,8,0,3,0,4,5,0,1,2,0,1,2,0,2,0,1,3,7,0,7,1],
n = [3.1196778876303,2.76713458847564E4,3.22583103403269E7,-3.42416065095363E2,-8.99732529907377E5,-7.93892049821251E7,9.53193003217388E1,2.29784742345072E3,1.75336675322499E5,7.91214365222792E6,3.19933345844209E-5,-6.59508863555767E1,-8.33426563212851E5,6.45734680583292E-2,-3.82031020570813E6,4.06398848470079E-5,3.10327498492008E1,-8.92996718483724E-4,2.34604891591616E2,3.77515668966951E3,1.58646812591361E-2,7.07906336241843E-1,1.2601622514657E1,7.36143655772152E-1,6.76544268999101E-1,-1.78100588189137E1,-1.56531975531713E-1,1.17707430048158E1,8.40143653860447E-2,-1.86442467471949E-1,-4.40170203949645E1,1.23290423502494E6,-2.40650039730845E-2,-1.07077716660869E6,4.38319858566475E-2],
v_star = 0.0022,
p_star = 40,
T_star = 690,
pi = P / p_star,
sigma = T / T_star,
v = 0;
for(var i = 0; i < 35; i++) {
v += n[i]*Math.pow(pi-0.259,I[i])*Math.pow(sigma-0.903, J[i]);
}
return v_star*v;
}
function r3d_PT_v(P, T) {
var I = [-12,-12,-12,-12,-12,-12,-10,-10,-10,-10,-10,-10,-10,-8,-8,-8,-8,-6,-6,-5,-5,-5,-5,-4,-4,-4,-3,-3,-2,-2,-1,-1,-1,0,0,1,1,3],
J = [4,6,7,10,12,16,0,2,4,6,8,10,14,3,7,8,10,6,8,1,2,5,7,0,1,7,2,4,0,1,0,1,5,0,2,0,6,0],
n = [-4.52484847171645E-10,3.15210389538801E-5,-2.14991352047545E-3,5.08058874808345E2,-1.27123036845932E7,1.15371133120497E12,-1.97805728776273E-16,2.41554806033972E-11,-1.56481703640525E-6,2.772113468366250E-3,-2.03578994462286E1,1.44369489909053E6,-4.11254217946539E10,6.23449786243773E-6,-2.21774281146038E1,-6.89315087933158E4,-1.95419525060713E7,3.16373510564015E3,2.24040754426988E6,-4.36701347922356E-6,-4.04213852833996E-4,-3.48153203414663E2,-3.85294213555289E5,1.35203700099403E-7,1.34648383271089E-4,1.25031835351736E5,9.68123678455841E-2,2.25660517512438E2,-1.90102435341872E-4,-2.99628410819229E-2,5.00833915372121E-3,3.87842482998411E-1,-1.38535367777182E3,8.70745245971773E-1,1.71946252068742,-3.26650121426383E-2,4.98044171727877E3,5.51478022765087E-3],
v_star = 0.0029,
p_star = 40,
T_star = 690,
pi = P / p_star,
sigma = T / T_star,
v = 0;
for(var i = 0; i < 38; i++) {
v += n[i]*Math.pow(pi-0.559, I[i])*Math.pow(sigma-0.939, J[i]);
}
return v_star*Math.pow(v,4);
}
function r3e_PT_v(P, T) {
var I = [-12,-12,-10,-10,-10,-10,-10,-8,-8,-8,-6,-5,-4,-4,-3,-3,-3,-2,-2,-2,-2,-1,0,0,1,1,1,2,2],
J = [14,16,3,6,10,14,16,7,8,10,6,6,2,4,2,6,7,0,1,3,4,0,0,1,0,4,6,0,2],
n = [7.15815808404721E8,-1.14328360753449E11,3.7653100201572E-12,-9.03983668691157E-5,6.65695908836252E5,5.35364174960127E9,7.94977402335603E10,9.22230563421437E1,-1.42586073991215E5,-1.11796381424162E6,8.9612162964076E3,-6.69989239070491E3,4.51242538486834E-3,-3.39731325977713E1,-1.20523111552278,4.75992667717124E4,-2.66627750390341E5,-1.53314954386524E-4,3.05638404828265E-1,1.23654999499486E2,-1.04390794213011E3,-1.57496516174308E-2,6.85331118940253E-1,1.78373462873903,-5.4467412487891E-1,2.04529931318843E3,-2.28342359328752E4,4.13197481515899E-1,-3.41931835910405E1],
v_star = 0.0032,
p_star = 40,
T_star = 710,
pi = P / p_star,
sigma = T / T_star,
v = 0;
for(var i = 0; i < 29; i++) {
v += n[i]*Math.pow(pi-0.587, I[i])*Math.pow(sigma-0.918, J[i]);
}
return v_star*v;
}
function r3f_PT_v(P, T) {
var I = [0,0,0,0,0,0,1,1,1,1,2,2,3,3,3,4,5,5,6,7,7,10,12,12,12,14,14,14,14,14,16,16,18,18,20,20,20,22,24,24,28,32],
J = [-3,-2,-1,0,1,2,-1,1,2,3,0,1,-5,-2,0,-3,-8,1,-6,-4,1,-6,-10,-8,-4,-12,-10,-8,-6,-4,-10,-8,-12,-10,-12,-10,-6,-12,-12,-4,-12,-12],
n = [-2.51756547792325E-8,6.01307193668763E-6,-1.00615977450049E-3,9.99969140252192E-1,2.14107759236486,-1.65175571959086E1,-1.41987303638727E-3,2.69251915156554,3.49741815858722E1,-3.00208695771783E1,-1.31546288252539,-8.39091277286169,1.81545608337015E-10,-5.91099206478909E-4,1.52115067087106,2.52956470663225E-5,1.00726265203786E-15,-1.4977453386065,-7.93940970562969E-10,-1.50290891264717E-4,1.51205531275133,4.70942606221652E-6,1.95049710391712E-13,-9.11627886266077E-9,6.04374640201265E-4,-2.25132933900136E-16,6.10916973582981E-12,-3.03063908043404E-7,-1.37796070798409E-5,-9.19296736666106E-4,6.39288223132545E-10,7.53259479898699E-7,-4.00321478682929E-13,7.56140294351614E-9,-9.12082054034891E-12,-2.37612381140539E-08,2.69586010591874E-5,-7.32828135157839E-11,2.4199557830666E-10,-4.05735532730322E-4,1.89424143498011E-10,-4.86632965074563E-10],
v_star = 0.0064,
p_star = 40,
T_star = 730,
pi = P / p_star,
sigma = T / T_star,
v = 0;
for (var i = 0; i < 42; i++) {
v += n[i]*Math.pow(pi-0.587, 0.5*I[i])*Math.pow(sigma-0.891, J[i]);
}
return v_star*Math.pow(v,4);
}
function r3g_PT_v(P, T) {
var I = [-12,-12,-12,-12,-12,-12,-10,-10,-10,-8,-8,-8,-8,-6,-6,-5,-5,-4,-3,-2,-2,-2,-2,-1,-1,-1,0,0,0,1,1,1,3,5,6,8,10,10],
J = [7,12,14,18,22,24,14,20,24,7,8,10,12,8,22,7,20,22,7,3,5,14,24,2,8,18,0,1,2,0,1,3,24,22,12,3,0,6],
n = [4.12209020652996E-5,-1.14987238280587E6,9.4818088503208E9,-1.95788865718971E17,4.962507048713E24,-1.05549884548496E28,-7.58642165988278E11,-9.22172769596101E22,7.25379072059348E29,-6.17718249205859E1,1.07555033344858E4,-3.79545802336487E7,2.28646846221831E11,-4.99741093010619E6,-2.80214310054101E30,1.04915406769586E6,6.13754229168619E27,8.02056715528378E31,-2.98617819828065E7,-9.10782540134681E1,1.35033227281565E5,-7.12949383408211E18,-1.04578785289542E36,3.04331584444093E1,5.93250797959445E9,-3.64174062110798E27,9.21791403532461E-1,-3.37693609657471E-1,-7.24644143758508E1,-1.10480239272601E-1,5.36516031875059,-2.91441872156205E3,6.16338176535305E39,-1.2088917586118E38,8.18396024524612E22,9.40781944835829E8,-3.67279669545448E4,-8.37513931798655E15],
v_star = 0.0027,
p_star = 25,
T_star = 660,
pi = P / p_star,
sigma = T / T_star,
v = 0;
for (var i = 0; i < 38; i++) {
v += n[i]*Math.pow(pi-0.872, I[i])*Math.pow(sigma-0.971, J[i]);
}
return v_star*Math.pow(v,4);
}
function r3h_PT_v(P, T) {
var I = [-12,-12,-10,-10,-10,-10,-10,-10,-8,-8,-8,-8,-8,-6,-6,-6,-5,-5,-5,-4,-4,-3,-3,-2,-1,-1,0,1,1],
J = [8,12,4,6,8,10,14,16,0,1,6,7,8,4,6,8,2,3,4,2,4,1,2,0,0,2,0,0,2],
n = [5.61379678887577E-2,7.74135421587083E9,1.11482975877938E-9,-1.43987128208183E-3,1.9369655876492E3,-6.05971823585005E8,1.71951568124337E13,-1.85461154985145E16,3.8785116807801E-17,-3.95464327846105E-14,-1.70875935679023E2,-2.1201062070122E3,1.77683337348191E7,1.10177443629575E1,-2.34396091693313E5,-6.56174421999594E6,1.56362212977396E-5,-2.129462570214,1.35249306374858E1,1.77189164145813E-1,1.39499167345464E3,-7.03670932036388E-3,-1.52011044389648E-1,9.81916922991113E-5,1.47199658618076E-3,2.02618487025578E1,8.9934551894424E-1,-2.11346402240858E-1,2.49971752957491E1],
v_star = 0.0032,
p_star = 25,
T_star = 660,
pi = P / p_star,
sigma = T / T_star,
v = 0;
for (var i = 0; i < 29; i++) {
v += n[i]*Math.pow(pi-0.898, I[i])*Math.pow(sigma-0.983, J[i]);
}
return v_star*Math.pow(v, 4);
}
function r3i_PT_v(P, T) {
var I = [0,0,0,1,1,1,1,2,3,3,4,4,4,5,5,5,7,7,8,8,10,12,12,12,14,14,14,14,18,18,18,18,18,20,20,22,24,24,32,32,36,36],
J = [0,1,10,-4,-2,-1,0,0,-5,0,-3,-2,-1,-6,-1,12,-4,-3,-6,10,-8,-12,-6,-4,-10,-8,-4,5,-12,-10,-8,-6,2,-12,-10,-12,-12,-8,-10,-5,-10,-8],
n = [1.06905684359136,-1.48620857922333,2.59862256980408E14,-4.46352055678749E-12,-5.66620757170032E-7,-2.35302885736849E-3,-2.69226321968839E-1,9.22024992944392,3.57633505503772E-12,-1.73942565562222E1,7.00681785556229E-6,-2.67050351075768E-4,-2.31779669675624,-7.53533046979752E-13,4.81337131452891,-2.23286270422356E21,-1.18746004987383E-5,6.46412934136496E-3,-4.10588536330937E-10,4.22739537057241E19,3.13698180473812E-13,1.6439533434504E-24,-3.39823323754373E-6,-1.35268639905021E-2,-7.232525142116250E-15,1.84386437538366E-9,-4.63959533752385E-2,-9.9226310037675E13,6.88169154439335E-17,-2.22620998452197E-11,-5.40843018624083E-8,3.45570606200257E-3,4.22275800304086E10,-1.26974478770487E-15,9.27237985153679E-10,6.126708120164890E-14,-7.22693924063497E-12,-3.83669502636822E-4,3.74684572410204E-4,-9.31976897511086E4,-2.47690616026922E-2,6.58110546759474E1],
v_star = 0.0041,
p_star = 25,
T_star = 660,
pi = P / p_star,
sigma = T / T_star,
v = 0;
for (var i = 0; i < 42; i++) {
v += n[i]*Math.pow(pi-0.910, 0.5*I[i])*Math.pow(sigma-0.984, J[i]);
}
return v_star*Math.pow(v,4);
}
function r3j_PT_v(P, T) {
var I = [0,0,0,1,1,1,2,2,3,4,4,5,5,5,6,10,12,12,14,14,14,16,18,20,20,24,24,28,28],
J = [-1,0,1,-2,-1,1,-1,1,-2,-2,2,-3,-2,0,3,-6,-8,-3,-10,-8,-5,-10,-12,-12,-10,-12,-6,-12,-5],
n = [-1.1137131739554E-4,1.00342892423685,5.30615581928979,1.79058760078792E-6,-7.28541958464774E-4,-1.87576133371704E1,1.99060874071849E-3,2.4357475537729E1,-1.77040785499444E-4,-2.5968038522713E-3,-1.98704578406823E2,7.38627790224287E-5,-2.36264692844138E-3,-1.61023121314333,6.22322971786473E3,-9.60754116701669E-9,-5.10572269720488E-11,7.67373781404211E-3,6.63855469485254E-15,-7.17590735526745E-10,1.46564542926508E-5,3.09029474277013E-12,-4.64216300971708E-16,-3.90499637961161E-14,-2.36716126781431E-10,4.54652854268717E-12,-4.22271787482497E-3,2.83911742354706E-11,2.70929002720228],
v_star = 0.0054,
p_star = 25,
T_star = 670,
pi = P / p_star,
sigma = T / T_star,
v = 0;
for (var i = 0; i < 29; i++) {
v += n[i]*Math.pow(pi-0.875, 0.5*I[i])*Math.pow(sigma-0.964,J[i]);
}
return v_star*Math.pow(v,4);
}
function r3k_PT_v(P, T) {
var I = [-2,-2,-1,-1,0,0,0,0,0,0,0,0,0,1,1,1,1,1,2,2,2,2,2,2,5,5,5,6,6,6,6,8,10,12],
J = [10,12,-5,6,-12,-6,-2,-1,0,1,2,3,14,-3,-2,0,1,2,-8,-6,-3,-2,0,4,-12,-6,-3,-12,-10,-8,-5,-12,-12,-10],
n = [-4.01215699576099E8,4.84501478318406E10,3.94721471363678E-15,3.72629967374147E4,-3.69794374168666E-30,-3.80436407012452E-15,4.75361629970233E-7,-8.79148916140706E-4,8.44317863844331E-1,1.224331626566E1,-1.04529634830279E2,5.89702771277429E2,-2.91026851164444E13,1.7034307284185E-6,-2.77617606975748E-4,-3.44709605486686,2.21333862447095E1,-1.94646110037079E2,8.08354639772825E-16,-1.8084520914547E-11,-6.96664158132412E-6,-1.81057560300994E-3,2.55830298579027,3.28913873658481E3,-1.73270241249904E-19,-6.61876792558034E-7,-3.9568892342125E-3,6.04203299819132E-18,-4.00879935920517E-14,1.60751107464958E-9,3.83719409025556E-5,-6.49565446702457E-15,-1.49095328506E-12,5.41449377329581E-9],
v_star = 0.0077,
p_star = 25,
T_star = 680,
pi = P / p_star,
sigma = T / T_star,
v = 0;
for (var i = 0; i < 34; i++) {
v += n[i]*Math.pow(pi-0.802,I[i])*Math.pow(sigma-0.935,J[i]);
}
return v_star*v;
}
function r3l_PT_v(P, T) {
var I = [-12,-12,-12,-12,-12,-10,-10,-8,-8,-8,-8,-8,-8,-8,-6,-5,-5,-4,-4,-3,-3,-3,-3,-2,-2,-2,-1,-1,-1,0,0,0,0,1,1,2,4,5,5,6,10,10,14],
J = [14,16,18,20,22,14,24,6,10,12,14,18,24,36,8,4,5,7,16,1,3,18,20,2,3,10,0,1,3,0,1,2,12,0,16,1,0,0,1,14,4,12,10],
n = [2.60702058647537E9,-1.88277213604704E14,5.54923870289667E18,-7.58966946387758E22,4.13865186848908E26,-8.1503800073806E11,-3.81458260489955E32,-1.23239564600519E-2,2.26095631437174E7,-4.9501780950672E11,5.29482996422863E15,-4.44359478746295E22,5.21635864527315E34,-4.87095672740742E54,-7.14430209937547E5,1.27868634615495E-1,-1.00752127917598E1,7.7745143796099E6,-1.08105480796471E24,-3.57578581169659E-6,-2.12857169423484,2.70706111085238E29,-6.95953622348829E32,1.1060902747228E-1,7.21559163361354E1,-3.06367307532219E14,2.6583961888553E-5,2.53392392889754E-2,-2.14443041836579E2,9.37846601489667E-1,2.231840431017,3.38401222509191E1,4.94237237179718E20,-1.98068404154428E-1,-1.4141534988114E30,-9.93862421613651E1,1.25070534142731E2,-9.96473529004439E2,4.73137909872765E4,1.16662121219322E32,-3.15874976271533E15,-4.45703369196945E32,6.42794932373694E32],
v_star = 0.0026,
p_star = 24,
T_star = 650,
pi = P / p_star,
sigma = T / T_star,
v = 0;
for(var i = 0; i < 43; i++) {
v += n[i]*Math.pow(pi-0.908, I[i])*Math.pow(sigma-0.989, J[i]);
}
return v_star*Math.pow(v, 4);
}
function r3m_PT_v(P, T) {
var I = [0,3,8,20,1,3,4,5,1,6,2,4,14,2,5,3,0,1,1,1,28,2,16,0,5,0,3,4,12,16,1,8,14,0,2,3,4,8,14,24],
J = [0,0,0,2,5,5,5,5,6,6,7,8,8,10,10,12,14,14,18,20,20,22,22,24,24,28,28,28,28,28,32,32,32,36,36,36,36,36,36,36],
n = [8.11384363481847E-1,-5.68199310990094E3,-1.78657198172556E10,7.95537657613427E31,-8.14568209346872E4,-6.59774567602874E7,-1.52861148659302E10,-5.60165667510446E11,4.58384828593949E5,-3.85754000383848E13,4.53735800004273E7,9.39454935735563E11,2.66572856432938E27,-5.47578313899097E9,2.00725701112386E14,1.85007245563239E12,1.85135446828337E8,-1.70451090076385E11,1.57890366037614E14,-2.02530509748774E15,3.6819392618357E59,1.70215539458936E17,6.39234909918741E41,-8.21698160721956E14,-7.95260241872306E23,2.3341586947851E17,-6.00079934586803E22,5.94584382273384E24,1.89461279349492E39,-8.10093428842645E45,1.88813911076809E21,1.11052244098768E35,2.91133958602503E45,-3.2942192395146E21,-1.37570282536696E25,1.81508996303902E27,-3.46865122768353E29,-2.1196114877426E37,-1.28617899887675E48,4.79817895699239E64],
v_star = 0.0028,
p_star = 23,
T_star = 650,
pi = P / p_star,
sigma = T / T_star,
v = 0;
for(var i = 0; i < 40; i++) {
v += n[i]*Math.pow(pi-1,I[i])*Math.pow(sigma-0.997, 0.25*J[i]);
}
return v_star*v;
}
function r3n_PT_v(P, T) {
var I = [0,3,4,6,7,10,12,14,18,0,3,5,6,8,12,0,3,7,12,2,3,4,2,4,7,4,3,5,6,0,0,3,1,0,1,0,1,0,1],
J = [-12,-12,-12,-12,-12,-12,-12,-12,-12,-10,-10,-10,-10,-10,-10,-8,-8,-8,-8,-6,-6,-6,-5,-5,-5,-4,-3,-3,-3,-2,-1,-1,0,1,1,2,4,5,6],
n = [2.80967799943151E-39,6.14869006573609E-31,5.82238667048942E-28,3.90628369238462E-23,8.21445758255119E-21,4.02137961842776E-15,6.51718171878301E-13,-2.11773355803058E-8,2.64953354380072E-3,-1.35031446451331E-32,-6.07246643970893E-24,-4.02352115234494E-19,-7.44938506925544E-17,1.89917206526237E-13,3.64975183508473E-6,1.77274872361946E-26,-3.34952758812999E-19,-4.21537726098389E-9,-3.91048167929649E-2,5.41276911564176E-14,7.05412100773699E-12,2.58585887897486E-9,-4.93111362030162E-11,-1.58649699894543E-6,-5.250374278861E-1,2.20019901729615E-3,-6.43064132636925E-3,6.29154149015048E1,1.35147318617061E2,2.40560808321713E-7,-8.90763306701305E-4,-4.40209599407714E3,-3.02807107747776E2,1.59158748314599E3,2.32534272709876E5,-7.926812071326E5,-8.69871364662769E10,3.54542769185671E11,4.00849240129329E14];
v_star = 0.0031,
p_star = 23,
T_star = 650,
pi = P / p_star,
sigma = T / T_star,
v = 0;
for(var i = 0; i < 39; i++) {
v += n[i]*Math.pow(pi-0.976, I[i])*Math.pow(sigma-0.997, J[i]);
}
return v_star*Math.exp(v);
}
function r3o_PT_v(P, T) {
var I = [0,0,0,2,3,4,4,4,4,4,5,5,6,7,8,8,8,10,10,14,14,20,20,24],
J = [-12,-4,-1,-1,-10,-12,-8,-5,-4,-1,-4,-3,-8,-12,-10,-8,-4,-12,-8,-12,-8,-12,-10,-12],
n = [1.28746023979718E-35,-7.35234770382342E-12,2.8907869214915E-3,2.44482731907223E-1,1.41733492030985E-24,-3.54533853059476E-29,-5.94539202901431E-18,-5.85188401782779E-9,2.01377325411803E-6,1.38647388209306,-1.73959365084772E-5,1.37680878349369E-3,8.14897605805513E-15,4.25596631351839E-26,-3.87449113787755E-18,1.3981474793024E-13,-1.71849638951521E-3,6.41890529513296E-22,1.18960578072018E-11,-1.55282762571611E-18,2.33907907347507E-8,-1.74093247766213E-13,3.77682649089149E-9,-5.16720236575302E-11],
v_star = 0.0034,
p_star = 23,
T_star = 650,
pi = P / p_star,
sigma = T / T_star,
v = 0;
for(var i = 0; i < 24; i++) {
v += n[i]*Math.pow(pi-0.974, 0.5*I[i])*Math.pow(sigma-0.996, J[i]);
}
return v_star*v;
}
function r3p_PT_v(P, T) {
var I = [0,0,0,0,1,2,3,3,4,6,7,7,8,10,12,12,12,14,14,14,16,18,20,22,24,24,36],
J = [-1,0,1,2,1,-1,-3,0,-2,-2,-5,-4,-2,-3,-12,-6,-5,-10,-8,-3,-8,-8,-10,-10,-12,-8,-12],
n = [-9.82825342010366E-5,1.05145700850612,1.16033094095084E2,3.24664750281543E3,-1.23592348610137E3,-5.61403450013495E-2,8.56677401640869E-8,2.36313425393924E2,9.72503292350109E-3,-1.03001994531927,-1.49653706199162E-9,-2.15743778861592E-5,-8.34452198291445,5.86602660564988E-1,3.43480022104968E-26,8.16256095947021E-6,2.94985697916798E-3,7.11730466276584E-17,4.00954763806941E-10,1.07766027032853E1,-4.09449599138182E-7,-7.29121307758902E-6,6.77107970938909E-9,6.02745973022975E-8,-3.82323011855257E-11,1.79946628317437E-3,-3.45042834640005E-4],
v_star = 0.0041,
p_star = 23,
T_star = 650,
pi = P / p_star,
sigma = T / T_star,
v = 0;
for(var i = 0; i < 27; i++) {
v += n[i]*Math.pow(pi-0.972, 0.5*I[i])*Math.pow(sigma-0.997, J[i]);
}
return v_star*v;
}
function r3q_PT_v(P, T) {
var I = [-12,-12,-10,-10,-10,-10,-8,-6,-5,-5,-4,-4,-3,-2,-2,-2,-2,-1,-1,-1,0,1,1,1],
J = [10,12,6,7,8,10,8,6,2,5,3,4,3,0,1,2,4,0,1,2,0,0,1,3],
n = [-8.2043384325995E4,4.73271518461586E10,-8.05950021005413E-2,3.2860002543598E1,-3.5661702998249E3,-1.72985781433335E9,3.51769232729192E7,-7.75489259985144E5,7.10346691966018E-5,9.93499883820274E4,-6.4209417190457E-1,-6.12842816820083E3,2.32808472983776E2,-1.42808220416837E-5,-6.43596060678456E-3,-4.28577227475614,2.25689939161918E3,1.0035565172151E-3,3.33491455143516E-1,1.09697576888873,9.61917379376452E-1,-8.38165632204598E-2,2.47795908411492,-3.19114969006533E3],
v_star = 0.0022,
p_star = 23,
T_star = 650,
pi = P / p_star,
sigma = T / T_star,
v = 0;
for(var i = 0; i < 24; i++) {
v += n[i]*Math.pow(pi-0.848,I[i])*Math.pow(sigma-0.983,J[i]);
}
return v_star*Math.pow(v,4);
}
function r3r_PT_v(P, T) {
var I = [-8,-8,-3,-3,-3,-3,-3,0,0,0,0,3,3,8,8,8,8,10,10,10,10,10,10,10,10,12,14],
J = [6,14,-3,3,4,5,8,-1,0,1,5,-6,-2,-12,-10,-8,-5,-12,-10,-8,-6,-5,-4,-3,-2,-12,-12],
n = [1.44165955660863E-3,-7.01438599628258E12,-8.30946716459219E-17,2.61975135368109E-1,3.93097214706245E2,-1.04334030654021E4,4.90112654154211E8,-1.47104222772069E-4,1.03602748043408,3.05308890065089,-3.99745276971264E6,5.6923371959375E-12,-4.64923504407778E-2,-5.35400396512906E-18,3.99988795693162E-13,-5.36479560201811E-07,1.59536722411202E-2,2.70303248860217E-15,2.44247453858506E-8,-9.83430636716454E-6,6.63513144224454E-2,-9.93456957845006,5.46491323528491E2,-1.43365406393758E4,1.50764974125511E5,-3.37209709340105E-10,3.77501980025469E-9],
v_star = 0.0054,
p_star = 23,
T_star = 650,
pi = P / p_star,
sigma = T / T_star,
v = 0;
for(var i = 0; i < 27; i++) {
v += n[i]*Math.pow(pi-0.874,I[i])*Math.pow(sigma-0.982,J[i]);
}
return v_star*v;
}
function r3s_PT_v(P, T) {
var I = [-12,-12,-10,-8,-6,-5,-5,-4,-4,-3,-3,-2,-1,-1,-1,0,0,0,0,1,1,3,3,3,4,4,4,5,14],
J = [20,24,22,14,36,8,16,6,32,3,8,4,1,2,3,0,1,4,28,0,32,0,1,2,3,18,24,4,24],
n = [-5.32466612140254E22,1.00415480000824E31,-1.91540001821367E29,1.05618377808847E16,2.02281884477061E58,8.84585472596134E7,1.66540181638363E22,-3.13563197669111E5,-1.85662327545324E53,-6.24942093918942E-2,-5.0416072413259E9,1.87514491833092E4,1.21399979993217E-3,1.88317043049455,-1.6707350396206E3,9.65961650599775E-1,2.94885696802488,-6.53915627346115E4,6.04012200163444E49,-1.98339358557937E-1,-1.75984090163501E57,3.56314881403987,-5.75991255144384E2,4.56213415338071E4,-1.09174044987829E7,4.37796099975134E33,-6.16552611135792E45,1.93568768917797E9,9.50898170425042E53],
v_star = 0.0022,
p_star = 21,
T_star = 640,
pi = P / p_star,
sigma = T / T_star,
v = 0;
for(var i = 0; i < 29; i++) {
v += n[i]*Math.pow(pi-0.886,I[i])*Math.pow(sigma-0.990,J[i]);
}
return v_star*Math.pow(v,4);
}
function r3t_PT_v(P, T) {
var I = [0,0,0,0,1,1,2,2,2,3,3,4,4,7,7,7,7,7,10,10,10,10,10,18,20,22,22,24,28,32,32,32,36],
J = [0,1,4,12,0,10,0,6,14,3,8,0,10,3,4,7,20,36,10,12,14,16,22,18,32,22,36,24,28,22,32,36,36],
n = [1.55287249586268,6.64235115009031,-2.8936623672721E3,-3.85923202309848E12,-2.91002915783761,-8.29088246858083E11,1.76814899675218,-5.34686695713469E8,1.60464608687834E17,1.96435366560186E5,1.56637427541729E12,-1.78154560260006,-2.29746237623692E15,3.85659001648006E7,1.10554446790543E9,-6.77073830687349E13,-3.27910592086523E30,-3.41552040860644E50,-5.27251339709047E20,2.45375640937055E23,-1.68776617209269E26,3.58958955867578E28,-6.56475280339411E35,3.55286045512301E38,5.6902145441327E57,-7.00584546433113E47,-7.05772623326374E64,1.66861176200148E52,-3.00475129680486E60,-6.68481295196808E50,4.28432338620678E68,-4.44227367758304E71,-2.81396013562745E76],
v_star = 0.0088,
p_star = 20,
T_star = 650,
pi = P / p_star,
sigma = T / T_star,
v = 0;
for(var i = 0; i < 33; i++) {
v += n[i]*Math.pow(pi-0.803,I[i])*Math.pow(sigma-1.02,J[i]);
}
return v_star*v;
}
/*
Auxillary Equations for the region very close to the critical point
T3uv ( p) approximates the isochore v = 0.00264 m^3 kg^-1 from 2.193161551x10^1 MPa to 22.5 MPa.
*/
function b3uv_P_T(P) {
var I = [0,1,2,3],
n = [5.28199646263062E2,8.90579602135307,-0.222814134903755,0.286791682263697E-2],
T = 0;
for (var i = 0; i < 4; i++) {
T +=n[i]*Math.pow(P, I[i]);
}
return T;
}
/*
T3wx ( p) approximates the isochore v = 0.00385 m^3 kg^-1 from 2.190096265x10 MPa to 22.5 MPa
*/
function b3wx_P_T(P) {
var I = [0,1,2,-1,-2],
n = [7.2805260914538,9.73505869861952E1,1.47370491183191E1,0.329196213998375E3,8.73371668682417E2],
T = 0;
P = Math.log(P);
for (var i = 0; i < 5; i++) {
T += n[i]*Math.pow(P, I[i]);
}
return T;
}
function r3u_PT_v(P, T) {
var I = [-12,-10,-10,-10,-8,-8,-8,-6,-6,-5,-5,-5,-3,-1,-1,-1,-1,0,0,1,2,2,3,5,5,5,6,6,8,8,10,12,12,12,14,14,14,14],
J = [14,10,12,14,10,12,14,8,12,4,8,12,2,-1,1,12,14,-3,1,-2,5,10,-5,-4,2,3,-5,2,-8,8,-4,-12,-4,4,-12,-10,-6,6],
n = [1.22088349258355E17,1.04216468608488E9,-8.82666931564652E15,2.59929510849499E19,2.22612779142211E14,-8.78473585050085E17,-3.14432577551552E21,-2.16934916996285E12,1.59079648196849E20,-3.39567617303423E2,8.84387651337836E12,-8.43405926846418E20,1.14178193518022E1,-1.22708229235641E-4,-1.06201671767107E2,9.03443213959313E24,-6.93996270370852E27,6.48916718965575E-9,7.18957567127851E3,1.05581745346187E-3,-6.51903203602581E14,-1.60116813274676E24,-5.10254294237837E-9,-1.52355388953402E-1,6.77143292290144E11,2.7637843837893E14,1.16862983141686E-2,-3.01426947980171E13,1.6971981388484E-8,1.04674840020929E26,-1.0801690456014E4,-9.90623601934295E-13,5.36116483602738E6,2.26145963747881E21,-4.8873156577621E-10,1.5100154888067E-05,-2.2770046464392E04,-7.81754507698846E27],
v_star = 0.0026,
p_star = 23,
T_star = 650,
pi = P / p_star,
sigma = T / T_star,
v = 0;
for (var i = 0; i < 38; i++) {
v += n[i]*Math.pow(pi-0.902,I[i])*Math.pow(sigma-0.988,J[i]);
}
return v_star*v;
}
function r3v_PT_v(P, T) {
var I = [-10,-8,-6,-6,-6,-6,-6,-6,-5,-5,-5,-5,-5,-5,-4,-4,-4,-4,-3,-3,-3,-2,-2,-1,-1,0,0,0,1,1,3,4,4,4,5,8,10,12,14],
J = [-8,-12,-12,-3,5,6,8,10,1,2,6,8,10,14,-12,-10,-6,10,-3,10,12,2,4,-2,0,-2,6,10,-12,-10,3,-6,3,10,2,-12,-2,-3,1],
n = [-4.15652812061591E-55,1.77441742924043E-61,-3.57078668203377E-55,3.59252213604114E-26,-2.59123736380269E1,5.9461976619346E4,-6.24184007103158E10,3.13080299915944E16,1.05006446192036E-9,-1.92824336984852E-6,6.54144373749937E5,5.13117462865044E12,-6.97595750347391E18,-1.03977184454767E28,1.19563135540666E-48,-4.36677034051655E-42,9.26990036530639E-30,5.87793105620748E20,2.80375725094731E-18,-1.92359972440634E22,7.42705723302738E26,-5.17429682450605E1,8.20612048645469E6,-1.88214882341448E-9,1.84587261114837E-2,-1.35830407782663E-6,-7.23681885626348E16,-2.23449194054124E26,-1.11526741826431E-35,2.76032601145151E-29,1.34856491567853E14,6.5244029334586E-10,5.1065511977436E16,-4.68138358908732E31,-7.60667491183279E15,-4.17247986986821E-19,3.12545677756104E13,-1.00375333864186E14,2.47761392329058E26],
v_star = 0.0031,
p_star = 23,
T_star = 650,
pi = P / p_star,
sigma = T / T_star,
v = 0;
for (var i = 0; i < 39; i++) {
v += n[i]*Math.pow(pi-0.960, I[i])*Math.pow(sigma-0.995,J[i]);
}
return v_star*v;
}
function r3w_PT_v(P, T) {
var I = [-12,-12,-10,-10,-8,-8,-8,-6,-6,-6,-6,-5,-4,-4,-3,-3,-2,-2,-1,-1,-1,0,0,1,2,2,3,3,5,5,5,8,8,10,10],
J = [8,14,-1,8,6,8,14,-4,-3,2,8,-10,-1,3,-10,3,1,2,-8,-4,1,-12,1,-1,-1,2,-12,-5,-10,-8,-6,-12,-10,-12,-8],
n = [-5.86219133817016E-8,-8.94460355005526E10,5.31168037519774E-31,1.09892402329239E-1,-5.75368389425212E-2,2.28276853990249E4,-1.58548609655002E18,3.29865748576503E-28,-6.34987981190669E-25,6.15762068640611E-9,-9.61109240985747E7,-4.06274286652625E-45,-4.71103725498077E-13,7.25937724828145E-1,1.87768525763682E-39,-1.03308436323771E3,-6.62552816342168E-2,5.7951404176571E2,2.37416732616644E-27,2.71700235739893E-15,-9.0788621348360E1,-1.71242509570207E-37,1.56792067854621E2,9.2326135790147E-1,-5.97865988422577,3.21988767636389E6,-3.99441390042203E-30,4.93429086046981E-08,8.12036983370565E-20,-2.07610284654137E-12,-3.40821291419719E-07,5.42000573372233E-18,-8.56711586510214E-13,2.66170454405981E-14,8.58133791857099E-6],
v_star = 0.0039,
p_star = 23,
T_star = 650,
pi = P / p_star,
sigma = T / T_star,
v = 0;
for (var i = 0; i < 35; i++) {
v += n[i]*Math.pow(pi-0.959, I[i])*Math.pow(sigma-0.995, J[i]);
}
return v_star*Math.pow(v, 4);
}
function r3x_PT_v(P, T) {
var I = [-8,-6,-5,-4,-4,-4,-3,-3,-1,0,0,0,1,1,2,3,3,3,4,5,5,5,6,8,8,8,8,10,12,12,12,12,14,14,14,14],
J = [14,10,10,1,2,14,-2,12,5,0,4,10,-10,-1,6,-12,0,8,3,-6,-2,1,1,-6,-3,1,8,-8,-10,-8,-5,-4,-12,-10,-8,-6],
n = [3.77373741298151E18,-5.07100883722913E12,-1.0336322559886E15,1.84790814320773E-6,-9.24729378390945E-4,-4.25999562292738E23,-4.62307771873973E-13,1.07319065855767E21,6.48662492280682E10,2.44200600688281,-8.51535733484258E9,1.69894481433592E21,2.1578022250902E-27,-3.20850551367334E-1,-3.8264244845861E16,-2.75386077674421E-29,-5.63199253391666E5,-3.26068646279314E20,3.97949001553184E13,1.00824008584757E-7,1.62234569738433E4,-4.32355225319745E10,-5.9287424559861E11,1.33061647281106,1.57338197797544E6,2.58189614270853E13,2.62413209706358E24,-9.20011937431142E-2,2.20213765905426E-3,-1.10433759109547E1,8.47004870612087E6,-5.92910695762536E8,-1.8302717326966E-5,1.81339603516302E-1,-1.19228759669889E3,4.30867658061468E6],
v_star = 0.0049,
p_star = 23,
T_star = 650,
pi = P / p_star,
sigma = T / T_star,
v = 0;
for (var i = 0; i < 36; i++) {
v += n[i]*Math.pow(pi-0.910, I[i])*Math.pow(sigma-0.988, J[i]);
}
return v_star*v;
}
function r3y_PT_v(P, T) {
var I = [0,0,0,0,1,2,2,2,2,3,3,3,4,4,5,5,8,8,10,12],
J = [-3,1,5,8,8,-4,-1,4,5,-8,4,8,-6,6,-2,1,-8,-2,-5,-8],
n = [-5.25597995024633E-10,5.83441305228407E3,-1.34778968457925E16,1.18973500934212E25,-1.59096490904708E26,-3.15839902302021E-7,4.96212197158239E2,3.27777227273171E18,-5.27114657850696E21,2.10017506281863E-17,7.05106224399834E20,-2.66713136106469E30,-1.45370512554562E-8,1.4933391705313E27,-1.49795620287641E7,-3.818819062711E15,7.24660165585797E-5,-9.37808169550193E13,5.14411468376383E9,-8.28198594040141E4],
v_star = 0.0031,
p_star = 22,
T_star = 650,
pi = P / p_star,
sigma = T / T_star,
v = 0;
for (var i = 0; i < 20; i++) {
v += n[i]*Math.pow(pi-0.996, I[i])*Math.pow(sigma-0.994, J[i]);
}
return v_star*Math.pow(v,4);
}
function r3z_PT_v(P, T) {
var I = [-8,-6,-5,-5,-4,-4,-4,-3,-3,-3,-2,-1,0,1,2,3,3,6,6,6,6,8,8],
J = [3,6,6,8,5,6,8,-2,5,6,2,-6,3,1,6,-6,-2,-6,-5,-4,-1,-8,-4],
n = [2.4400789229065E-11,-4.63057430331242E6,7.28803274777712E9,3.27776302858856E15,-1.10598170118409E9,-3.23899915729957E12,9.23814007023245E15,8.42250080413712E-13,6.63221436245506E11,-1.67170186672139E14,2.53749358701391E3,-8.19731559610523E-21,3.28380587890663E11,-6.25004791171543E7,8.03197957462023E20,-2.04397011338353E-11,-3.78391047055938E3,9.7287654593862E-3,1.54355721681459E1,-3.73962862928643E3,-6.82859011374572E10,-2.48488015614543E-4,3.94536049497068E6],
v_star = 0.0038,
p_star = 22,
T_star = 650,
pi = P / p_star,
sigma = T / T_star,
v = 0;
for(var i = 0; i < 23; i++) {
v += n[i]*Math.pow(pi-0.993, I[i])*Math.pow(sigma-0.994, J[i]);
}
return v_star*Math.pow(v,4);
}
/*
Region 4
The saturation pressure for given temperature along the vapour-liquid saturation line
Range of validity is 273.15 K <= T <= 647.096 K
Equation 30 (pp. 33)
*/
function r4_T_Psat(T) {
var T_star=1,
p_star=1,
n = [null,1167.0521452767,-724213.16703206,-17.073846940092,12020.82470247,-3232555.0322333,14.91510861353,-4823.2657361591,405113.40542057,-0.238558557567849,650.17534844798],
vartheta = (T / T_star) + n[9]/((T / T_star)-n[10]),
A = vartheta*vartheta + n[1]*vartheta + n[2],
B = n[3]*vartheta*vartheta + n[4]*vartheta + n[5],
C = n[6]*vartheta*vartheta + n[7]*vartheta + n[8];
return Math.pow(2*C/(-B+Math.pow(B*B-4*A*C,0.5)),4)*p_star;
}
/*
The saturation temperature for given pressure along the vapour-liquid saturation line
Range of validity is 0.000611213 MPa (611.213 Pa) <= p <= 22.064 MPa
Equation 30 (pp. 33)
*/
function r4_P_Tsat(P) {
var p_star=1, /* MPa */
T_star=1, /* K */
n = [null,1167.0521452767,-724213.16703206,-17.073846940092,12020.82470247,-3232555.0322333,14.91510861353,-4823.2657361591,405113.40542057,-0.238558557567849,650.17534844798],
beta = Math.pow((P / p_star),0.25), /*eq. 29a */
E = beta*beta + n[3]*beta +n[6],
F = n[1]*beta*beta + n[4]*beta +n[7],
G = n[2]*beta*beta + n[5]*beta + n[8],
D = 2.0*G/(-F-Math.pow(F*F-4.0*E*G,0.5));
return ((n[10] + D-Math.pow(Math.pow(n[10]+D,2)-4.0*(n[9]+n[10]*D),0.5))/2.0)*T_star;
}
/*
Region 5
*/
function r5_PT(P, T) {
var Jo = [0, 1, -3, -2, -1, 2],
no = [-13.179983674201, 6.8540841634434, -0.024805148933466, 0.36901534980333, -3.1161318213925, -0.32961626538917],
Ir = [1, 1, 1, 2, 2, 3],
Jr = [1, 2, 3, 3, 9, 7],
nr = [1.5736404855259E-3, 9.0153761673944E-4, -5.0270077677648E-3, 2.2440037409485E-6, -4.1163275453471E-6, 3.7919454822955E-8],
p_star = 1, /*MPa */
T_star = 1000, /*K */
pi = P / p_star,
tau = T_star / T,
gamma_o = Math.log(pi),
gamma_o_pi = 1/pi,
gamma_o_pi_pi = -1/(pi*pi),
gamma_o_tau = 0,
gamma_o_tau_tau = 0,
gamma_o_pi_tau = 0;
for (var i = 0; i < 6; i++) {
gamma_o += no[i]*Math.pow(tau,Jo[i]);
gamma_o_tau += no[i]*Jo[i]*Math.pow(tau,Jo[i]-1);
gamma_o_tau_tau += no[i]*Jo[i]*(Jo[i]-1)*Math.pow(tau,Jo[i]-2);
}
var gamma_r = 0,
gamma_r_pi = 0,
gamma_r_pi_pi = 0,
gamma_r_tau = 0,
gamma_r_tau_tau = 0,
gamma_r_pi_tau = 0;
for (var j = 0; j < 6; j++) {
gamma_r += nr[j]*Math.pow(pi,Ir[j])*Math.pow(tau,Jr[j]);
gamma_r_pi += nr[j]*Ir[j]*Math.pow(pi,Ir[j]-1)*Math.pow(tau,Jr[j]);
gamma_r_pi_pi += nr[j]*Ir[j]*(Ir[j]-1)*Math.pow(pi,Ir[j]-2)*Math.pow(tau,Jr[j]);
gamma_r_tau += nr[j]*Math.pow(pi,Ir[j])*Jr[j]*Math.pow(tau,Jr[j]-1);
gamma_r_tau_tau += nr[j]*Math.pow(pi,Ir[j])*Jr[j]*(Jr[j]-1)*Math.pow(tau,Jr[j]-2);
gamma_r_pi_tau += nr[j]*Ir[j]*Math.pow(pi,Ir[j]-1)*Jr[j]*Math.pow(tau,Jr[j]-1);
}
/* The pressure and temperature MPa, K */
var SpecVolume = R*T*pi*(gamma_o_pi+gamma_r_pi)/(1000*P);
var InternalEnergy = R*T*(tau*(gamma_o_tau+gamma_r_tau)-pi*(gamma_o_pi+gamma_r_pi));
var Entropy = R*(tau*(gamma_o_tau+gamma_r_tau)-(gamma_o+gamma_r));
var Enthalpy = R*T*tau*(gamma_o_tau+gamma_r_tau);
var SpecHeat_cp = -R*tau*tau*(gamma_o_tau_tau+gamma_r_tau_tau);
var SpecHeat_cv = R*(-tau*tau*(gamma_o_tau_tau+gamma_r_tau_tau)-Math.pow(1+pi*gamma_r_pi-tau*pi*gamma_r_pi_tau,2)/(1-pi*pi*gamma_r_pi_pi));
var SpeedOfSound = Math.pow(1000*R*T*((1+2*pi*gamma_r_pi+pi*pi*gamma_r_pi*gamma_r_pi) / ((1-pi*pi*gamma_r_pi_pi) + Math.pow(1+pi*gamma_r_pi-tau*pi*gamma_r_pi_tau,2)/(tau*tau*(gamma_o_tau_tau+gamma_r_tau_tau)))),0.5);
return SteamResult({
P: P,
T: T,
v: SpecVolume,
u: InternalEnergy,
s: Entropy,
h: Enthalpy,
cp: SpecHeat_cp,
cv: SpecHeat_cv,
w: SpeedOfSound
});
}
/*
Auxiliary Equation for additonal properties
IAPWS Viscosity of ordinary water substances 2008
T is the temperature in K
Rho is the density in kg/m^3
return Viscosity in Pa.s (P)
*/
function Viscosity(T, rho){
var T_hat = T/constants.Tc,
rho_hat = rho/constants.Rhoc,
mu0_H = [1.67752, 2.20462, 0.6366564, -0.241605],
mu0 = 100*Math.sqrt(T_hat),
x = 0,
y = 0;
for(var i = 0; i < 4; i++) {
x += mu0_H[i]/Math.pow(T_hat, i);
}
mu0 = mu0/x;
var mu1 = 0,
mu1_H = [5.20094E-1,8.50895E-2,-1.08374,-2.89555E-1,0,0,2.22531E-1,9.99115E-1,1.88797,1.26613,0,1.20573E-1,-2.81378E-1,-9.06851E-1,-7.72479E-1,-4.89837E-1,-2.5704E-1,0,1.61913E-1,2.57399E-1,0,0,0,0,-3.25372E-2,0,0,6.98452E-2,0,0,0,0,0,0,8.72102E-3,0,0,0,0,-4.35673E-3,0,-5.93264E-4];
for(var j = 0; j < 6; j++) {
x = Math.pow(1/T_hat - 1, j);
y = 0;
for(var z = 0; z < 7; z++) {
y += mu1_H[z*6+j]*Math.pow(rho_hat - 1, z);
}
mu1 += x*y;
}
mu1 = Math.exp(rho_hat*mu1);
/* No correction at the subcritical region yet */
var mu2 = 1;
return mu0*mu1*mu2;
}
/*
IAPWS Thermal conductivity of ordinary water substances 2011
T is the temperature in K
Rho is the density in kg/m^3
Thermal conductivity in mW/m.K
*/
function Thermal_Conductivity(T, rho) {
var T_hat = T/constants.Tc,
rho_hat = rho/constants.Rhoc,
k0_L = [2.443221E-3, 1.323095E-2, 6.770357E-3, -3.454586E-3, 4.096266E-4],
k0 = 0;
for(var i = 0; i < 5; i++) {
k0 += k0_L[i]/Math.pow(T_hat, i);
}
k0 = Math.sqrt(T_hat)/k0;
var k1 = 0,
k1_L = [1.60397357, -0.646013523, 0.111443906, 0.102997357, -0.0504123634, 0.00609859258, 2.33771842, -2.78843778, 1.53616167, -0.463045512, 0.0832827019, -0.00719201245, 2.19650529, -4.54580785, 3.55777244, -1.40944978, 0.275418278, -0.0205938816, -1.21051378, 1.60812989, -0.621178141, 0.0716373224, 0, 0, -2.720337, 4.57586331, -3.18369245, 1.1168348, -0.19268305, 0.012913842],
x = 0,
y = 0;
for(var i = 0; i < 5; i++) {
x = Math.pow(1/T_hat - 1, i);
y = 0;
for(var j = 0; j < 6; j++) {
y += k1_L[i*6 + j]*Math.pow(rho_hat - 1, j);
}
k1 += x*y;
}
k1 = Math.exp(rho_hat*k1);
/* The critical enhancement not implemented yet */
var k2 = 0;
return k0*k1 + k2;
}
/*
IAPWS Surface Tension of ordinary water substances 2014
T is the temperature in K
return The surface tension in mN/m
*/
function Surface_Tension(T) {
var tau = 1 - T/constants.Tc,
sigma = 235.8*Math.pow(tau,1.256)*(1 - 0.625*tau);
return sigma;
}
/*
IAPWS Static Dielectric Constant of ordinary water substances 1997
T is the temperature in K
rho is the density in kg . m^-3
Dielectric Constant
*/
function Dielectric_Constant(T, rho) {
var MW = 0.018015268,
rhom = rho/MW, /* Molecular density (mol . m^-3) */
rho_rhoc = rhom/(constants.Rhoc/MW),
apha = 1.636E-40, /* Mean molecular polarizability (C^2 . J^-1 . m^2) */
N_a = 6.0221367E23, /* Avogadro's number (mol^-1) */
mu = 6.138E-30, /* Molecular dipole moment (C . m) */
epsilon_0 = 1/(4E-7*Math.PI*Math.pow(299792458,2)), /* Permittivity of free space (C^2 . J^-1 . m^-1) */
k = 1.380658E-23, /* Boltzmann's constant (J . K^-1) */
I = [1, 1, 1, 2, 3, 3, 4, 5, 6, 7, 10],
J = [0.25, 1, 2.5, 1.5, 1.5, 2.5, 2, 2, 5, 0.5, 10],
n = [0.978224486826, -0.957771379375, 0.237511794148, 0.714692244396, -0.298217036956, -0.108863472196, 0.0949327488264, -0.00980469816509, 0.16516763497E-4, 0.937359795772E-4, -0.12317921872E-9],
/*n = [0.978224486826,-0.957771379375,0.237511794148,0.714692244396,-0.298217036956,-0.108863472196,0.0949327488264,-0.00980469816509,0.000016516763497,0.0000937359795772,-1.23179218720E-10],
*/
g = 0;
for(var i = 0; i < 11; i++) {
g += n[i]*Math.pow(rho_rhoc, I[i])*Math.pow(constants.Tc/T, J[i]);
}
g = 1 + g + 0.00196096504426*(rho_rhoc)*Math.pow(T/228 - 1, -1.2);
var A = N_a*mu*mu*rhom*g/(epsilon_0*k*T),
B = N_a*apha*rhom/(3*epsilon_0),
epsilon = (1 + A + 5*B + Math.sqrt(9 + 2*A + 18*B + A*A + 10*A*B + 9*B*B))/(4 - 4*B);
return epsilon;
}
/*
IAPWS Ionization Constant of H2O 2007
T is the temperature in K
rho is the density in kg.m^-3
Ionization constant in (dimensionless)
*/
function Ionization_Constant(T, rho) {
var pK_wg = 0.61415 + 48251.33/T - 67707.93/(T*T) + 10102100/(T*T*T),
Q = rho*Math.exp(-0.864671 + 8659.19/T - 22786.2*Math.pow(rho, 2/3)/(T*T)),
pK_w = -12*(Math.log10(1+Q) - Q/(Q+1)*rho*(0.642044 -56.8534/T -0.375754*rho)) + pK_wg + 2*Math.log10(0.018015268);
return pK_w;
}
/*
Calculate the steam properties using IAWPS for a given pressure and temperature
P is the pressure of the water in MPa
h is the enthalpy kg/KJ.K
*/
function PH(P, h) {
var region = findRegion_PH(P,h),
result = null;
switch(region) {
case 1 : result = r1_PH(P,h); break;
case 2 : result = r2_PH(P,h); break;
case 3 : result = r3_PH(P,h); break;
case -1 : break;
}
return result;
}
/*
Determines which IAPWS-97 region a temperature and pressure combination lie in.
P is the pressure of the water in mega Pascals
h is the enthalpy kg/KJ.K
*/
function findRegion_PH(P, h) {
var self=this;
var r = self.r1_PT(P, constants.MIN_T);
/* Whats the region max/min for h */
if(P >= constants.MIN_P && P <= constants.MAX_P && h >= r.h ) {
if( P < constants.B23_MIN_P ) {
var Ts = self.r4_P_Tsat(P);
r = self.r1_PT(P, Ts);
if( h <= r.h ) {
return 1;
}
/* Check region 2 */
if( h < 4000) {
return 2;
}
r = self.r2_PT(P, constants.R2_MAX_T);
if(h <= r.h) {
return 2;
}
/* Region 5 */
if( P < constants.R5_MAX_P) {
r = self.r5_PT(P, constants.MAX_T);
if(h < r.h) {
return 5;
}
}
} else { /* P >= B23_MIN_P */
/* Region 1 check */
r = self.r1_PT(P, constants.R3_MIN_T);
if (h <= r.h) {
return 1;
}
/* Region 3 */
r = self.r2_PT(P, self.b23_P_T(P));
if( h < r.h) {
return 3;
}
/* Region 2 */
r = self.r2_PT(P, constants.R2_MAX_T);
if(h < r.h) {
return 2;
}
}
}
return -1;
}
/*
Region 1
*/
function r1_PH(P, h) {
var self=this;
return self.r1_PT(P, r1_PH_T(P,h));
}
function r1_PH_T(P, h) {
var I = [0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 3, 3, 4, 5, 6],
J = [0, 1, 2, 6, 22, 32, 0, 1, 2, 3, 4, 10, 32, 10, 32, 10, 32, 32, 32, 32],
n = [-238.72489924521, 404.21188637945, 113.49746881718, -5.8457616048039, -0.0001528548241314, -1.0866707695377E-6, -13.391744872602, 43.211039183559, -54.010067170506, 30.535892203916, -6.5964749423638, 0.0093965400878363, 1.157364750534E-7, -0.000025858641282073, -4.0644363084799E-9, 6.6456186191635E-8, 8.0670734103027E-11, -9.3477771213947E-13, 5.8265442020601E-15, -1.5020185953503E-17],
p_star = 1,
h_star = 2500,
pi = P / p_star,
eta = h / h_star,
T = 0;
for(var i = 0; i < 20; i++) {
T += n[i]*Math.pow(pi,I[i])*Math.pow((eta+1), J[i]);
}
return T;
}
/*
Region 2
*/
function r2_PH(P, h) {
var self = this;
var T = r2_PH_T(P,h);
return self.r2_PT(P, T);
}
function r2_PH_T(P, h) {
var T;
if(P < constants.R2_CRT_P) {
T = r2A_PH_T(P, h);
}
else {
if(P < b2bc_H_P(h)) {
T = r2B_PH_T(P,h);
}
else {
T = r2C_PH_T(P,h);
}
}
return T;
}
/*
Equation 20 (page 21)
From : Release on the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water
and Steam, September 1997
Simple quadratic pressure-entalphy relationship for the region 2b - 2c boundary
*/
function b2bc_H_P(h) {
var n1 = 0.90584278514723E3,
n2 = 0.67955786399241,
n3 = 0.12809002730136E-3;
return n1 - n2*h + n3*h*h;
}
function b2bc_P_H(P) {
var n3 = 0.12809002730136E-3,
n4 = 2652.6571908428,
n5 = 4.5257578905948;
return (n4 + Math.pow((P-n5)/n3,0.5));
}
/* Equation 22 */
function r2A_PH_T(P, h) {
var I = [0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 7],
J = [0, 1, 2, 3, 7, 20, 0, 1, 2, 3, 7, 9, 11, 18, 44, 0, 2, 7, 36, 38, 40, 42, 44, 24, 44, 12, 32, 44, 32, 36, 42, 34, 44, 28],
n = [1089.8952318288, 849.51654495535, -107.81748091826, 33.153654801263, -7.4232016790248, 11.765048724356, 1.844574935579, -4.1792700549624, 6.2478196935812, -17.344563108114, -200.58176862096, 271.96065473796, -455.11318285818, 3091.9688604755, 252266.40357872, -0.0061707422868339, -0.31078046629583, 11.670873077107, 128127984.04046, -985549096.23276, 2822454697.3002, -3594897141.0703, 1722734991.3197, -13551.334240775, 12848734.66465, 1.3865724283226, 235988.32556514, -13105236.545054, 7399.9835474766, -551966.9703006, 3715408.5996233, 19127.7292396, -415351.64835634, -62.459855192507],
p_star = 1,
h_star = 2000,
pi = P / p_star,
eta = h / h_star,
T = 0;
for(var i = 0; i < 34; i++) {
T += n[i]*Math.pow(pi,I[i])*Math.pow(eta-2.1, J[i]);
}
return T;
}
function r2B_PH_T(P, h) {
var I = [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 5, 5, 5, 6, 7, 7, 9, 9],
J = [0, 1, 2, 12, 18, 24, 28, 40, 0, 2, 6, 12, 18, 24, 28, 40, 2, 8, 18, 40, 1, 2, 12, 24, 2, 12, 18, 24, 28, 40, 18, 24, 40, 28, 2, 28, 1, 40],
n = [1489.5041079516, 743.07798314034, -97.708318797837, 2.4742464705674, -0.63281320016026, 1.1385952129658, -0.47811863648625, 0.0085208123431544, 0.93747147377932, 3.3593118604916, 3.3809355601454, 0.16844539671904, 0.73875745236695, -0.47128737436186, 0.15020273139707, -0.002176411421975, -0.021810755324761, -0.10829784403677, -0.046333324635812, 0.000071280351959551, 0.00011032831789999, 0.00018955248387902, 0.0030891541160537, 0.0013555504554949, 2.8640237477456E-7, -0.000010779857357512, -0.000076462712454814, 0.000014052392818316, -0.000031083814331434, -1.0302738212103E-6, 2.821728163504E-7, 1.2704902271945E-6, 7.3803353468292E-8, -1.1030139238909E-8, -8.1456365207833E-14, -2.5180545682962E-11, -1.7565233969407E-18, 8.6934156344163E-15],
p_star = 1,
h_star = 2000,
pi = P / p_star,
eta = h / h_star,
T = 0;
for(var i = 0; i < 38; i++) {
T += n[i]*Math.pow((pi-2), I[i])*Math.pow((eta-2.6), J[i]);
}
return T;
}
/*
Equation 24
*/
function r2C_PH_T(P, h) {
var I = [-7, -7, -6, -6, -5, -5, -2, -2, -1, -1, 0, 0, 1, 1, 2, 6, 6, 6, 6, 6, 6, 6, 6],
J = [0, 4, 0, 2, 0, 2, 0, 1, 0, 2, 0, 1, 4, 8, 4, 0, 1, 4, 10, 12, 16, 20, 22],
n = [-3236839855524.2, 7326335090218.1, 358250899454.47, -583401318515.9, -10783068217.47, 20825544563.171, 610747.83564516, 859777.2253558, -25745.72360417, 31081.088422714, 1208.2315865936, 482.19755109255, 3.7966001272486, -10.842984880077, -0.04536417267666, 1.4559115658698E-13, 1.126159740723E-12, -1.7804982240686E-11, 1.2324579690832E-7, -1.1606921130984E-6, 0.000027846367088554, -0.00059270038474176, 0.0012918582991878],
p_star = 1,
h_star = 2000,
pi = P / p_star,
eta = h / h_star,
T = 0;
for(var i = 0; i < 23; i++) {
T += n[i]*Math.pow(pi+25, I[i])*Math.pow(eta-1.8, J[i]);
}
return T;
}
/*
Region 3
*/
function r3_PH(P, h) {
var self = this,
T,
rho;
if( h < b3ab_P_H(P) ) {
T = r3A_PH_T(P,h);
rho = r3A_PH_V(P,h);
}
else {
T = r3B_PH_T(P,h);
rho = r3B_PH_V(P,h);
}
return self.r3_PT(P, T, rho);
}
/*
Equation 1 (page 5)
From : Revised Supplementary Release on Backward Equations for the Functions
T(p,h), v(p,h) and T(p,s), v(p,s) for Region 3 of the IAPWS Industrial
Formulation 1997 for the Thermodynamic Properties of Water and Steam
Polynomial to match the critical isentropic line (but does not match exactly)
*/
function b3ab_P_H(P) {
return 2014.64004206875 + 3.74696550136983*P + -0.0219921901054187*P*P + 0.000087513168600995*P*P*P;
}
function r3A_PH_T(P, h) {
var I = [-12, -12, -12, -12, -12, -12, -12, -12, -10, -10, -10, -8, -8, -8, -8, -5, -3, -2, -2, -2, -1, -1, 0, 0, 1, 3, 3, 4, 4, 10, 12],
J = [0, 1, 2, 6, 14, 16, 20, 22, 1, 5, 12, 0, 2, 4, 10, 2, 0, 1, 3, 4, 0, 2, 0, 1, 1, 0, 1, 0, 3, 4, 5],
n = [-1.33645667811215E-7, 4.55912656802978E-6, -1.46294640700979E-5, 0.0063934131297008, 372.783927268847, -7186.54377460447, 573494.7521034, -2675693.29111439, -3.34066283302614E-5, -0.0245479214069597, 47.8087847764996, 7.64664131818904E-6, 0.00128350627676972, 0.0171219081377331, -8.51007304583213, -0.0136513461629781, -3.84460997596657E-6, 0.00337423807911655, -0.551624873066791, 0.72920227710747, -0.00992522757376041, -0.119308831407288, 0.793929190615421, 0.454270731799386, 0.20999859125991, -0.00642109823904738, -0.023515586860454, 0.00252233108341612, -0.00764885133368119, 0.0136176427574291, -0.0133027883575669],
T_star = 760,
p_star = 100,
h_star = 2300,
pi = P / p_star,
eta = h / h_star,
T = 0;
for(var i = 0; i < 31; i++) {
T += n[i]*Math.pow((pi+0.240),I[i])*Math.pow((eta-0.615),J[i]);
}
return T_star*T;
}
function r3A_PH_V(P, h) {
var I = [-12, -12, -12, -12, -10, -10, -10, -8, -8, -6, -6, -6, -4, -4, -3, -2, -2, -1, -1, -1, -1, 0, 0, 1, 1, 1, 2, 2, 3, 4, 5, 8],
J = [6, 8, 12, 18, 4, 7, 10, 5, 12, 3, 4, 22, 2, 3, 7, 3, 16, 0, 1, 2, 3, 0, 1, 0, 1, 2, 0, 2, 0, 2, 2, 2],
n = [0.00529944062966028, -0.170099690234461, 11.1323814312927, -2178.98123145125, -0.000506061827980875, 0.556495239685324, -9.43672726094016, -0.297856807561527, 93.9353943717186, 0.0192944939465981, 0.421740664704763, -3689141.2628233, -0.00737566847600639, -0.354753242424366, -1.99768169338727, 1.15456297059049, 5683.6687581596, 0.00808169540124668, 0.172416341519307, 1.04270175292927, -0.297691372792847, 0.560394465163593, 0.275234661176914, -0.148347894866012, -0.0651142513478515, -2.92468715386302, 0.0664876096952665, 3.52335014263844, -0.0146340792313332, -2.24503486668184, 1.10533464706142, -0.0408757344495612],
v_star = 0.0028,
p_star = 100,
h_star = 2100,
pi = P / p_star,
eta = h / h_star,
v = 0;
for(var i = 0; i < 32; i++) {
v += n[i]*Math.pow((pi+0.128),I[i])*Math.pow((eta-0.727),J[i]);
}
return v_star*v;
}
function r3B_PH_T(P, h) {
var I = [-12, -12, -10, -10, -10, -10, -10, -8, -8, -8, -8, -8, -6, -6, -6, -4, -4, -3, -2, -2, -1, -1, -1, -1, -1, -1, 0, 0, 1, 3, 5, 6, 8],
J = [0, 1, 0, 1, 5, 10, 12, 0, 1, 2, 4, 10, 0, 1, 2, 0, 1, 5, 0, 4, 2, 4, 6, 10, 14, 16, 0, 2, 1, 1, 1, 1, 1, ],
n = [0.000032325457364492, -0.000127575556587181, -0.000475851877356068, 0.00156183014181602, 0.105724860113781, -85.8514221132534, 724.140095480911, 0.00296475810273257, -0.00592721983365988, -0.0126305422818666, -0.115716196364853, 84.9000969739595, -0.0108602260086615, 0.0154304475328851, 0.0750455441524466, 0.0252520973612982, -0.0602507901232996, -3.07622221350501, -0.0574011959864879, 5.03471360939849, -0.925081888584834, 3.91733882917546, -77.314600713019, 9493.08762098587, -1410437.19679409, 8491662.30819026, 0.861095729446704, 0.32334644281172, 0.873281936020439, -0.436653048526683, 0.286596714529479, -0.131778331276228, 0.00676682064330275],
T_star = 860,
p_star = 100,
h_star = 2800,
pi = P / p_star,
eta = h / h_star,
T = 0;
for(var i = 0; i < 33; i++) {
T += n[i]*Math.pow((pi+0.298),I[i])*Math.pow((eta-0.720),J[i]);
}
return T_star*T;
}
function r3B_PH_V(P, h) {
var I = [-12, -12, -8, -8, -8, -8, -8, -8, -6, -6, -6, -6, -6, -6, -4, -4, -4, -3, -3, -2, -2, -1, -1, -1, -1, 0, 1, 1, 2, 2],
J = [0, 1, 0, 1, 3, 6, 7, 8, 0, 1, 2, 5, 6, 10, 3, 6, 10, 0, 2, 1, 2, 0, 1, 4, 5, 0, 0, 1, 2, 6],
n = [-2.25196934336318E-09, 1.40674363313486E-08, 2.3378408528056E-06, -3.31833715229001E-05, 0.00107956778514318, -0.271382067378863, 1.07202262490333, -0.853821329075382, -2.15214194340526E-05, 0.00076965608822273, -0.00431136580433864, 0.453342167309331, -0.507749535873652, -100.475154528389, -0.219201924648793, -3.21087965668917, 607.567815637771, 0.000557686450685932, 0.18749904002955, 0.00905368030448107, 0.285417173048685, 0.0329924030996098, 0.239897419685483, 4.82754995951394, -11.8035753702231, 0.169490044091791, -0.0179967222507787, 0.0371810116332674, -0.0536288335065096, 1.6069710109252],
v_star = 0.0088,
p_star = 100,
h_star = 2800,
pi = P / p_star,
eta = h / h_star,
v = 0;
for(var i = 0; i < 30; i++) {
v += n[i]*Math.pow(pi+0.0661,I[i])*Math.pow(eta-0.720,J[i]);
}
return v_star*v;
}
/*
/ Region 4
*/
function r4_H_Psat(h) {
var I = [0, 1, 1, 1, 1, 5, 7, 8, 14, 20, 22, 24 ,28, 36],
J = [0, 1, 3, 4, 36, 3, 0, 24, 16, 16, 3, 18, 8, 24],
n = [0.600073641753024, -9.36203654849857, 2.46590798594147E1, -1.07014222858224E2, -9.15821315805768E13, -8.62332011700662E3, -2.35837344740032E1, 2.52304969384128E17, -3.89718771997719E18, -3.33775713645296E22, 3.56499469636328E10, -1.48547544720641E26, 3.30611514838798E18, 8.13641294467829E37],
p_star = 22,
h_star = 2600,
eta = h / h_star,
p = 0;
for(var i = 0; i < 14; i++) {
p += n[i]*Math.pow(eta-1.02, I[i])*Math.pow(eta-0.608, J[i]);
}
return p_star*p;
}
/*
Determines which IAPWS-IF97 region a pressure and entropy combination lie in.
P is the pressure of the water in mega Pascals
s is the entropy in kJ . K^-1 . kg^1
*/
function PS(P, s) {
var region = findRegion_PS(P,s),
result = null;
switch(region) {
case 1 : result = r1_PS(P, s); break;
case 2 : result = r2_PS(P, s); break;
case 3 : result = r3_PS(P, s); break;
/* case 4 : result = R4_PS(P, s); break; */
}
return result;
}
/*
Determines which IAPWS-IF97 region a pressure and entropy combination lie in.
P is the pressure of the water in mega Pascals
s is the entropy in kJ/kg
*/
function findRegion_PS(P, s) {
var self=this;
var r = self.r5_PT(P, constants.R5_MAX_T);
if(P >= constants.MIN_P && P <= constants.MAX_P && s >= constants.MIN_S && s <= r.s) {
r = self.r2_PT(P, constants.R5_MIN_T);
if(s > r.s && P <= constants.R5_MAX_P) {
return 5;
}
if(P > constants.B23_MIN_P) {
r = self.r2_PT(P, self.b23_P_T(P));
if(s > r.s) {
return 2;
}
r = self.r3_PT(P, constants.R3_MIN_T);
if(s > r.s) {
return 3;
}
}
r = self.r1_PT(P, self.r4_P_Tsat(P));
if(P <= constants.B23_MIN_P && s > r.s) {
return 2;
}
r = self.r1_PT(P, constants.MIN_T);
if(s >= r.s) {
return 1;
}
}
return -1;
}
/*
Backwards equations for region 1 (P and s given)
*/
function r1_PS(P, s) {
var self=this,
T = r1_PS_T(P,s);
return self.r1_PT(P,T);
}
function r1_PS_T(P, s) {
var I = [0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 4],
J = [0, 1, 2, 3, 11, 31, 0, 1, 2, 3, 12, 31, 0, 1, 2, 9, 31, 10, 32, 32],
n = [174.78268058307, 34.806930892873, 6.5292584978455, 0.33039981775489, -1.9281382923196E-7, -2.4909197244573E-23, -0.26107636489332, 0.22592965981586, -0.064256463395226, 0.0078876289270526, 3.5672110607366E-10, 1.7332496994895E-24, 0.00056608900654837, -0.00032635483139717, 0.000044778286690632, -5.1322156908507E-10, -4.2522657042207E-26, 2.6400441360689E-13, 7.8124600459723E-29, -3.0732199903668E-31],
p_star = 1,
sigma_star = 1,
pi = P / p_star,
sigma = s / sigma_star,
T = 0;
for(var i = 0; i < 20; i++) {
T += n[i]*Math.pow(pi,I[i])*Math.pow(sigma+2,J[i]);
}
return T;
}
/*
Backwards equation for region 2 (P and s given)
*/
function r2_PS(P, s) {
var self = this,
T = r2_PS_T(P,s);
return self.r2_PT(P,T);
}
function r2_PS_T(P, s) {
var T;
if(P <= constants.R2_CRT_P) {
T = r2A_PS_T(P, s);
}
else {
if(s >= constants.R2_CRT_S) {
T = r2B_PS_T(P, s);
}
else {
T = r2C_PS_T(P, s);
}
}
return T;
}
function r2A_PS_T(P, s) {
var I = [-1.5, -1.5, -1.5, -1.5, -1.5, -1.5, -1.25, -1.25, -1.25, -1, -1, -1, -1, -1, -1, -0.75, -0.75, -0.5, -0.5, -0.5, -0.5, -0.25, -0.25, -0.25, -0.25, 0.25, 0.25, 0.25, 0.25, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.75, 0.75, 0.75, 0.75, 1, 1, 1.25, 1.25, 1.5, 1.5],
J = [-24, -23, -19, -13, -11, -10, -19, -15, -6, -26, -21, -17, -16, -9, -8, -15, -14, -26, -13, -9, -7, -27, -25, -11, -6, 1, 4, 8, 11, 0, 1, 5, 6, 10, 14, 16, 0, 4, 9, 17, 7, 18, 3, 15, 5, 18],
n = [-392359.83861984, 515265.7382727, 40482.443161048, -321.93790923902, 96.961424218694, -22.867846371773, -449429.14124357, -5011.8336020166, 0.35684463560015, 44235.33584819, -13673.388811708, 421632.6027864, 22516.925837475, 474.42144865646, -149.31130797647, -197811.26320452, -23554.39947076, -19070.616302076, 55375.669883164, 3829.3691437363, -603.91860580567, 1936.3102620331, 4266.064369861, -5978.0638872718, -704.01463926862, 338.36784107553, 20.862786635187, 0.033834172656196, -0.000043124428414893, 166.53791356412, -139.86292055898, -0.78849547999872, 0.072132411753872, -0.0059754839398283, -0.000012141358953904, 2.3227096733871E-7, -10.538463566194, 2.0718925496502, -0.072193155260427, 2.074988708112E-7, -0.018340657911379, 2.9036272348696E-7, 0.21037527893619, 0.00025681239729999, -0.012799002933781, -8.2198102652018E-6],
sigma_star = 2,
p_star = 1,
pi = P / p_star,
sigma = s / sigma_star,
T = 0;
for(var i = 0; i < 46; i++) {
T += n[i]*Math.pow(pi,I[i])*Math.pow(sigma-2,J[i]);
}
return T;
}
function r2B_PS_T(P, s) {
var I = [-6, -6, -5, -5, -4, -4, -4, -3, -3, -3, -3, -2, -2, -2, -2, -1, -1, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 5, 5, 5],
J = [0, 11, 0, 11, 0, 1, 11, 0, 1, 11, 12, 0, 1, 6, 10, 0, 1, 5, 8, 9, 0, 1, 2, 4, 5, 6, 9, 0, 1, 2, 3, 7, 8, 0, 1, 5, 0, 1, 3, 0, 1, 0, 1, 2],
n = [316876.65083497, 20.864175881858, -398593.99803599, -21.816058518877, 223697.85194242, -2784.1703445817, 9.920743607148, -75197.512299157, 2970.8605951158, -3.4406878548526, 0.38815564249115, 17511.29508575, -1423.7112854449, 1.0943803364167, 0.89971619308495, -3375.9740098958, 471.62885818355, -1.9188241993679, 0.41078580492196, -0.33465378172097, 1387.0034777505, -406.63326195838, 41.72734715961, 2.1932549434532, -1.0320050009077, 0.35882943516703, 0.0052511453726066, 12.838916450705, -2.8642437219381, 0.56912683664855, -0.099962954584931, -0.0032632037778459, 0.00023320922576723, -0.1533480985745, 0.029072288239902, 0.00037534702741167, 0.0017296691702411, -0.00038556050844504, -0.000035017712292608, -0.000014566393631492, 5.6420857267269E-06, 4.1286150074605E-08, -2.0684671118824E-08, 1.6409393674725E-09],
sigma_star = 0.7853,
p_star = 1,
pi = P / p_star,
sigma = s / sigma_star,
T = 0;
for(var i = 0; i < 44; i++) {
T += n[i]*Math.pow(pi,I[i])*Math.pow(10.0-sigma,J[i]);
}
return T;
}
function r2C_PS_T(P, s) {
var I = [-2, -2, -1, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 7, 7, 7, 7, 7],
J = [0, 1, 0, 0, 1, 2, 3, 0, 1, 3, 4, 0, 1, 2, 0, 1, 5, 0, 1, 4, 0, 1, 2, 0, 1, 0, 1, 3, 4, 5],
n = [909.68501005365, 2404.566708842, -591.6232638713, 541.45404128074, -270.98308411192, 979.76525097926, -469.66772959435, 14.399274604723, -19.104204230429, 5.3299167111971, -21.252975375934, -0.3114733441376, 0.60334840894623, -0.042764839702509, 0.0058185597255259, -0.014597008284753, 0.0056631175631027, -0.000076155864584577, 0.00022440342919332, -0.000012561095013413, 6.3323132660934E-07, -2.0541989675375E-06, 3.6405370390082E-08, -2.9759897789215E-09, 1.0136618529763E-08, 5.9925719692351E-12, -2.0677870105164E-11, -2.0874278181886E-11, 1.0162166825089E-10, -1.6429828281347E-10],
sigma_star = 2.9251,
p_star = 1,
pi = P / p_star,
sigma = s / sigma_star,
T = 0;
for(var i = 0; i < 30; i++) {
T += n[i]*Math.pow(pi,I[i])*Math.pow(2.0-sigma,J[i]);
}
return T;
}
/*
Backwards equation for region 3 (P and s given)
From : Revised Supplementary Release on Backward Equations for the Functions
T(p,h), v(p,h) and T(p,s), v(p,s) for Region 3 of the IAPWS Industrial
Formulation 1997 for the Thermodynamic Properties of Water and Steam
*/
function r3_PS(P, s) {
var self = this,
T,
rho;
if (s <= constants.R3_CRT_S) {
T = r3A_PS_T(P,s);
rho = r3A_PS_V(P,s);
}
else {
T = r3B_PS_T(P,s);
rho = r3B_PS_V(P,s);
}
return self.r3_PT(P, T, rho);
}
function r3A_PS_T(P, s) {
var I = [-12, -12, -10, -10, -10, -10, -8, -8, -8, -8, -6, -6, -6, -5, -5, -5, -4, -4, -4, -2, -2, -1, -1, 0, 0, 0, 1, 2, 2, 3, 8, 8, 10],
J = [28, 32, 4, 10, 12, 14, 5, 7, 8, 28, 2, 6, 32, 0, 14, 32, 6, 10, 36, 1, 4, 1, 6, 0, 1, 4, 0, 0, 3, 2, 0, 1, 2, ],
n = [1500420082.63875, -159397258480.424, 5.02181140217975E-4, -67.2057767855466, 1450.58545404456, -8238.8953488889, -0.154852214233853, 11.2305046746695, -29.7000213482822, 43856513263.5495, 0.00137837838635464, -2.97478527157462, 9717779473494.13, -5.71527767052398E-5, 28830.794977842, -74442828926270.3, 12.8017324848921, -368.275545889071, 6647689047791770, 0.044935925195888, -4.22897836099655, -0.240614376434179, -4.74341365254924, 0.72409399912611, 0.923874349695897, 3.99043655281015, 0.0384066651868009, -0.00359344365571848, -0.735196448821653, 0.188367048396131, 0.000141064266818704, -0.00257418501496337, 0.00123220024851555],
T_star = 760,
sigma_star = 4.4,
p_star = 100,
pi = P / p_star,
sigma = s / sigma_star,
T = 0;
for(var i = 0; i < 33; i++) {
T += n[i]*Math.pow(pi+0.24,I[i])*Math.pow(sigma-0.703, J[i]);
}
return T_star*T;
}
function r3A_PS_V(P, s) {
var I = [-12, -12, -12, -10, -10, -10, -10, -8, -8, -8, -8, -6, -5, -4, -3, -3, -2, -2, -1, -1, 0, 0, 0, 1, 2, 4, 5, 6],
J = [10, 12, 14, 4, 8, 10, 20, 5, 6, 14, 16, 28, 1, 5, 2, 4, 3, 8, 1, 2, 0, 1, 3, 0, 0, 2, 2, 0],
n = [79.5544074093975, -2382.6124298459, 17681.3100617787, -0.00110524727080379, -15.3213833655326, 297.544599376982, -35031520.6871242, 0.277513761062119, -0.523964271036888, -148011.182995403, 1600148.99374266, 1708023226634.27, 0.000246866996006494, 1.6532608479798, -0.118008384666987, 2.537986423559, 0.965127704669424, -28.2172420532826, 0.203224612353823, 1.10648186063513, 0.52612794845128, 0.277000018736321, 1.08153340501132, -0.0744127885357893, 0.0164094443541384, -0.0680468275301065, 0.025798857610164, -0.000145749861944416],
v_star = 0.0028,
sigma_star = 4.4,
p_star = 100,
pi = P / p_star,
sigma = s / sigma_star,
v = 0;
for(var i = 0; i < 28; i++) {
v += n[i]*Math.pow(pi+0.187,I[i])*Math.pow(sigma-0.755,J[i]);
}
return v_star*v;
}
function r3B_PS_T(P, s) {
var I = [-12, -12, -12, -12, -8, -8, -8, -6, -6, -6, -5, -5, -5, -5, -5, -4, -3, -3, -2, 0, 2, 3, 4, 5, 6, 8, 12, 14],
J = [1, 3, 4, 7, 0, 1, 3, 0, 2, 4, 0, 1, 2, 4, 6, 12, 1, 6, 2, 0, 1, 1, 0, 24, 0, 3, 1, 2],
n = [0.52711170160166, -40.1317830052742, 153.020073134484, -2247.99398218827, -0.193993484669048, -1.40467557893768, 42.6799878114024, 0.752810643416743, 22.6657238616417, -622.873556909932, -0.660823667935396, 0.841267087271658, -25.3717501764397, 485.708963532948, 880.531517490555, 2650155.92794626, -0.359287150025783, -656.991567673753, 2.41768149185367, 0.856873461222588, 0.655143675313458, -0.213535213206406, 0.00562974957606348, -316955725450471.0, -0.000699997000152457, 0.0119845803210767, 1.93848122022095E-05, -2.15095749182309E-05],
T_star = 860,
sigma_star = 5.3,
p_star = 100,
pi = P / p_star,
sigma = s / sigma_star,
T = 0;
for(var i = 0; i < 28; i++) {
T += n[i]*Math.pow(pi+0.76,I[i])*Math.pow(sigma-0.818,J[i]);
}
return T_star*T;
}
function r3B_PS_V(P, s) {
var I = [-12, -12, -12, -12, -12, -12, -10, -10, -10, -10, -8, -5, -5, -5, -4, -4, -4, -4, -3, -2, -2, -2, -2, -2, -2, 0, 0, 0, 1, 1, 2],
J = [0, 1, 2, 3, 5, 6, 0, 1, 2, 4, 0, 1, 2, 3, 0, 1, 2, 3, 1, 0, 1, 2, 3, 4, 12, 0, 1, 2, 0, 2, 2],
n = [5.91599780322238E-5, -0.00185465997137856, 0.0104190510480013, 0.0059864730203859, -0.771391189901699, 1.72549765557036, -0.000467076079846526, 0.0134533823384439, -0.0808094336805495, 0.508139374365767, 0.00128584643361683, -1.63899353915435, 5.86938199318063, -2.92466667918613, -0.00614076301499537, 5.76199014049172, -12.1613320606788, 1.67637540957944, -7.44135838773463, 0.0378168091437659, 4.01432203027688, 16.0279837479185, 3.17848779347728, -3.58362310304853, -1159952.60446827, 0.199256573577909, -0.122270624794624, -19.1449143716586, -0.0150448002905284, 14.6407900162154, -3.2747778718823],
v_star = 0.0088,
sigma_star = 5.3,
p_star = 100,
pi = P / p_star,
sigma = s / sigma_star,
v = 0;
for(var i = 0; i < 31; i++) {
v += n[i]*Math.pow(pi+0.298, I[i])*Math.pow(sigma-0.816, J[i]);
}
return v_star*v;
}
/*
Region 4
*/
function r4_PS(P, s) {
var self=this,
T = self.r4_P_Tsat(P);
return self.PT(P, T);
}
function r4_S_Psat(s) {
var I = [0, 1, 1, 4, 12, 12, 16, 24, 28, 32],
J = [0, 1, 32, 7, 4, 14, 36, 10, 0, 18],
n = [0.639767553612785, -1.29727445396014E1, -2.24595125848403E16, 1.77466741801846E6, 7.17079349571538E9, -3.78829107169011E17, -9.55586736431328E34, 1.87269814676188E23, 1.19254746466473E11, 1.10649277244882E36],
sigma_star = 5.2,
p_star = 22,
sigma = s / sigma_star,
p = 0;
for(var i = 0; i < 10; i++) {
p += n[i]*Math.pow(sigma-1.03, I[i])*Math.pow(sigma-0.699, J[i]);
}
return p_star*p;
}
/*
Determines which IAPWS-IF97 region a entalphy and entropy combination lie in.
h is the enthalphy in kJ/kg
s is the entropy in kJ . K^-1 . kg^1
*/
function HS(h, s) {
var region = findRegion_HS(h, s),
result = null;
switch(region) {
case 1 : result = r1_HS(h, s); break;
case 2 : result = r2_HS(h, s); break;
case 3 : result = r3_HS(h, s); break;
case 4 : result = r4_HS(h, s); break;
}
return result;
}
function findRegion_HS(h, s) {
/*
Interpolate across the saturation curve to test if below P = 0.000611 MPa line
Refer to Figure 3 in IAPWS HS document for graphical depiction
dG = dH - T*dS where dG = 0 for equillibrium reactions like phase change
*/
var B23_S = 5.260578707,
B3_S = 4.41202148223476,
B13_S = 3.778281340,
B23_H = 2812.942061,
hcheck = 273.15*(s - constants.MIN_S) + constants.MIN_H;
if((s <= 9.155759395 && h < hcheck) || s < constants.MIN_S || h < constants.MIN_H ) {
return -1;
}
/* Region 1 */
if(-0.0001545495919 <= s && s <= B13_S && b14_S_H(s) <= h && h <= b13_S_H(s)) {
return 1;
}
/* Region 2 or 3 interface */
if(5.048096828 <= s && s <= B23_S && 2563.592004 <= h && h <= B23_H) {
/* Do check using the PB23 */
var self = this,
T = b23_HS_T(h, s),
P = r2C_HS_P(h, s),
Pcheck = self.b23_T_P(T);
if(Pcheck > P) {
return 2;
}
else {
return 3;
}
}
/* Region 2 */
if((h >= B23_H || s > B23_S) && ((s >= constants.R2_CRT_S && h >= b2ab_S_Hsat(s)) || (s < constants.R2_CRT_S && h >= b2c3b_S_H(s)))) {
return 2;
}
/* Region 3 */
if((s >= B3_S && h >= b2c3b_S_H(s)) || (B13_S < s && s < B3_S && h >= b3A_S_H(s)) || (s <= B13_S && h > b13_S_H(s))) {
return 3;
}
return 4;
}
/*
Region Identification Equations
*/
/* h'_1 Equation 3 in HS Region 3 & 4 Supplementary release */
function b14_S_H(s) {
var I = [0,0,1,1,2,2,3,3,4,4,4,5,5,7,8,12,12,14,14,16,20,20,22,24,28,32,32],
J = [14,36,3,16,0,5,4,36,4,16,24,18,24,1,4,2,4,1,22,10,12,28,8,3,0,6,8],
n = [3.32171191705237E-1,6.112177063234960E-4,-8.82092478906822,-4.5562819254325E-1,-2.63483840850452E-5,-2.23949661148062E1,-4.28398660164013,-6.16679338856916E-1,-1.468230311044E1,2.84523138727299E2,-1.13398503195444E2,1.15671380760859E3,3.95551267359325E2,-1.54891257229285,1.94486637751291E1,-3.57915139457043,-3.35369414148819,-6.6442679633246E-1,3.23321885383934E4,3.31766744667084E3,-2.23501257931087E4,5.73953875852936E6,1.73226193407919E2,-3.63968822121321E-2,8.34596332878346E-7,5.03611916682674,6.55444787064505E1],
h_star = 1700,
sigma_star = 3.8,
sigma = s / sigma_star,
h_fluid = 0;
for(var i = 0; i < 27; i++) {
h_fluid += n[i]*Math.pow(sigma-1.09, I[i])*Math.pow(sigma + 0.0000366, J[i]);
}
return h_star*h_fluid;
}
function b13_S_H(s) {
var I = [0,1,1,3,5,6],
J = [0,-2,2,-12,-4,-3],
n = [0.913965547600543, -0.0000430944856041991, 60.3235694765419, 1.17518273082168E-18, 0.220000904781292, -69.0815545851641],
h_star = 1700,
sigma_star = 3.8,
sigma = s / sigma_star,
h = 0;
for(var i = 0; i < 6; i++) {
h += n[i]*Math.pow(sigma-0.884, I[i])*Math.pow(sigma-0.864, J[i]);
}
return h_star*h;
}
/*
Calculates the temperature on the region 2-3 boundary S-curve
T_B23(h,s) Equation 8 in HS Region 3 & 4 in suplementry
*/
function b23_HS_T(h, s) {
var I = [-12,-10,-8,-4,-3,-2,-2,-2,-2,0,1,1,1,3,3,5,6,6,8,8,8,12,12,14,14],
J = [10,8,3,4,3,-6,2,3,4,0,-3,-2,10,-2,-1,-5,-6,-3,-8,-2,-1,-12,-1,-12,1],
n = [6.2909626082981E-4,-8.23453502583165E-4,5.15446951519474E-8,-1.17565945784945,3.48519684726192,-5.07837382408313E-12,-2.84637670005479,-2.36092263939673,6.01492324973779,1.48039650824546,3.60075182221907E-4,-1.26700045009952E-2,-1.22184332521413E6,1.49276502463272E-1,6.98733471798484E-1,-2.52207040114321E-2,1.47151930985213E-2,-1.08618917681849,-9.36875039816322E-4,8.19877897570217E1,-1.82041861521835E2,2.61907376402688E-6,-2.91626417025961E4,1.40660774926165E-5,7.83237062349385E6],
T_star = 900,
h_star = 3000,
sigma_star = 5.3,
eta = h / h_star,
sigma = s / sigma_star,
T = 0;
for(var i = 0; i < 25; i++) {
T += n[i]*Math.pow(eta-0.727, I[i])*Math.pow(sigma-0.864, J[i]);
}
return T_star*T;
}
/* The boundary equation for HS regions 2A and 2b (Equation 2 in supplementary release for HS) */
function b2ab_S_H(s) {
return (-3498.98083432139 + 2575.60716905876*s + -421.073558227969*s*s + 27.6349063799944*s*s*s);
}
/* Equation 5 in the region 3 & 4 HS suplementary release */
function b2ab_S_Hsat(s) {
var I = [1,1,2,2,4,4,7,8,8,10,12,12,18,20,24,28,28,28,28,28,32,32,32,32,32,36,36,36,36,36],
J = [8,24,4,32,1,2,7,5,12,1,0,7,10,12,32,8,12,20,22,24,2,7,12,14,24,10,12,20,22,28],
n = [-0.524581170928788E3, -0.926947218142218E7, -0.237385107491666E3, 0.210770155812776E11, -0.239494562010986E2, 0.221802480294197E3, -0.510472533393438E7, 0.124981396109147E7, 0.200008436996201E10, -0.815158509791035E3, -0.157612685637523E3, -0.114200422332791E11, 0.662364680776872E16, -0.227622818296144E19, -0.171048081348406E32,6.60788766938091E15,1.66320055886021E22,-2.18003784381501E29,-7.87276140295618E29,1.51062329700346E31,7.95732170300541E6,1.31957647355347E15,-3.2509706829914E23,-4.18600611419248E25,2.97478906557467E34,-9.53588761745473E19,1.66957699620939E24,-1.75407764869978E32,3.47581490626396E34,-7.10971318427851E38],
h_star = 2800,
sigma1_star = 5.21,
sigma2_star = 9.2,
sigma1 = s / sigma1_star,
sigma2 = s / sigma2_star,
Hsat = 0;
for(var i = 0; i < 30; i++) {
Hsat += n[i]*Math.pow(1/sigma1-0.513, I[i])*Math.pow(sigma2-0.524, J[i]);
}
return h_star*Math.exp(Hsat);
}
/* h"_2c3b(s) Equation 6 in HS region 3 and 4 suplementary release */
function b2c3b_S_H(s) {
/* Table 17 in in IAPWS-97 HS region 3 and 4 */
var I = [0,0,0,1,1,5,6,7,8,8,12,16,22,22,24,36],
J = [0,3,4,0,12,36,12,16,2,20,32,36,2,32,7,20],
n = [1.04351280732769,-2.27807912708513,1.80535256723202,0.420440834792042,-1.0572124483466E5,4.36911607493884E24,-3.28032702839753E11,-6.7868676080427E15,7.43957464645363E3,-3.56896445355761E19,1.67590585186801E31,-3.55028625419105E37,3.96611982166538E11,-4.14716268484468E40,3.59080103867382E18,-1.16994334851995E40],
h_star = 2800,
sigma_star = 5.9,
sigma = s / sigma_star,
h_gas = 0;
for(var i = 0; i < 16; i++) {
h_gas += n[i]*Math.pow(sigma-1.02,I[i])*Math.pow(sigma-0.726,J[i]);
}
return h_star*Math.pow(h_gas,4);
}
/*
h'_3a Equation 4 in HS Region 3 and 4
Used as a boundary check between 3a and 3b when P < Pc
Function to work out the backwards (h,s) boundry for region 3A
*/
function b3A_S_H(s) {
/* Table 10 in IAPWS-97 HS region 3 and 4 */
var I = [0, 0, 0, 0, 2, 3, 4, 4, 5, 5, 6, 7, 7, 7, 10, 10, 10, 32, 32],
J = [1, 4, 10, 16, 1, 36, 3, 16, 20, 36, 4, 2, 28, 32, 14, 32, 36, 0, 6],
n = [0.822673364673336, 0.181977213534479, -0.0112000260313624, -0.000746778287048033, -0.179046263257381, 0.0424220110836657, -0.341355823438768, -2.09881740853565, -8.22477343323596, -4.99684082076008, 0.191413958471069, 0.0581062241093136, -1655.05498701029, 1588.70443421201, -85.0623535172818, -31771.4386511207, -94589.0406632871, -1.3927384708869E-6, 0.63105253224098],
h_star = 1700,
sigma_star = 3.8,
sigma = s / sigma_star,
h_fluid = 0;
for(var i = 0; i < 19; i++) {
h_fluid += n[i]*Math.pow(sigma-1.09,I[i])*Math.pow(sigma+0.0000366,J[i]);
}
return h_star*h_fluid;
}
/*
Backwards equation for region 1 (h and s given)
Calculates P and uses it in the forwards equations
*/
function r1_HS(h, s) {
var self = this,
P = r1_HS_P(h,s),
T = self.r1_PH_T(P,h);
return self.r1_PT(P,T);
}
function r1_HS_P(h, s) {
var I = [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 3, 4, 4, 5],
J = [0, 1, 2, 4, 5, 6, 8, 14, 0, 1, 4, 6, 0, 1, 10, 4, 1, 4, 0],
n = [-0.691997014660582, -18.361254878756, -9.28332409297335, 65.9639569909906, -16.2060388912024, 450.620017338667, 854.68067822417, 6075.23214001161, 32.6487682621856, -26.9408844582931, -319.9478483343, -928.35430704332, 30.3634537455249, -65.0540422444146, -4309.9131651613, -747.512324096068, 730.000345529245, 1142.84032569021, -436.407041874559],
p_star = 100,
h_star = 3400,
sigma_star = 7.6,
eta = h / h_star,
sigma = s / sigma_star,
P = 0;
for(var i = 0; i < 19; i++) {
P += n[i]*Math.pow(eta+0.05, I[i])*Math.pow(sigma+0.05, J[i]);
}
return p_star*P;
}
/*
Backwards equation for region 2 (h and s given)
Calculates P and uses it in the forwards equations
*/
function r2_HS(h, s) {
var self = this,
P = r2_HS_P(h,s);
return self.r2_PH(P,h);
}
function r2_HS_P(h, s) {
var P;
if(h <= b2ab_S_H(s)) {
P = r2A_HS_P(h,s);
}
else {
if(s >= constants.R2_CRT_S) {
P = r2B_HS_P(h,s);
}
else {
P = r2C_HS_P(h,s);
}
}
return P;
}
function r2A_HS_P(h, s) {
var I = [0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 3, 3, 3, 3, 3, 4, 5, 5, 6, 7],
J = [1, 3, 6, 16, 20, 22, 0, 1, 2, 3, 5, 6, 10, 16, 20, 22, 3, 16, 20, 0, 2, 3, 6, 16, 16, 3, 16, 3, 1],
n = [-0.0182575361923032, -0.125229548799536, 0.592290437320145, 6.04769706185122, 238.624965444474, -298.639090222922, 0.051225081304075, -0.437266515606486, 0.413336902999504, -5.16468254574773, -5.57014838445711, 12.8555037824478, 11.414410895329, -119.504225652714, -2847.7798596156, 4317.57846408006, 1.1289404080265, 1974.09186206319, 1516.12444706087, 0.0141324451421235, 0.585501282219601, -2.97258075863012, 5.94567314847319, -6236.56565798905, 9659.86235133332, 6.81500934948134, -6332.07286824489, -5.5891922446576, 0.0400645798472063],
h_star = 4200,
sigma_star = 12,
eta = h / h_star,
sigma = s / sigma_star,
P = 0;
for (var i = 0; i < 29; i++) {
P += n[i]*Math.pow(eta-0.5,I[i])*Math.pow(sigma-1.2,J[i]);
}
return 4*Math.pow(P,4); /* Corresponding pressure for h, s */
}
function r2B_HS_P(h, s) {
var I = [0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 5, 5, 6, 6, 6, 7, 7, 8, 8, 8, 8, 12, 14],
J = [0, 1, 2, 4, 8, 0, 1, 2, 3, 5, 12, 1, 6, 18, 0, 1, 7, 12, 1, 16, 1, 12, 1, 8, 18, 1, 16, 1, 3, 14, 18, 10, 16],
n = [0.0801496989929495, -0.543862807146111, 0.337455597421283, 8.9055545115745, 313.840736431485, 0.797367065977789, -1.2161697355624, 8.72803386937477, -16.9769781757602, -186.552827328416, 95115.9274344237, -18.9168510120494, -4334.0703719484, 543212633.012715, 0.144793408386013, 128.024559637516, -67230.9534071268, 33697238.0095287, -586.63419676272, -22140322476.9889, 1716.06668708389, -570817595.806302, -3121.09693178482, -2078413.8463301, 3056059461577.86, 3221.57004314333, 326810259797.295, -1441.04158934487, 410.694867802691, 109077066873.024, -24796465425889.3, 1888019068.65134, -123651009018773],
p_star = 100,
h_star = 4100,
sigma_star = 7.9,
eta = h / h_star,
sigma = s / sigma_star,
P = 0;
for (var i = 0; i < 33; i++) {
P += n[i]*Math.pow(eta-0.6, I[i])*Math.pow(sigma-1.01, J[i]);
}
return p_star*Math.pow(P, 4);
}
function r2C_HS_P(h, s) {
var I = [0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 5, 5, 5, 5, 6, 6, 10, 12, 16],
J = [0, 1, 2, 3, 4, 8, 0, 2, 5, 8, 14, 2, 3, 7, 10, 18, 0, 5, 8, 16, 18, 18, 1, 4, 6, 14, 8, 18, 7, 7, 10],
n = [0.112225607199012, -3.39005953606712, -32.0503911730094, -197.5973051049, -407.693861553446, 13294.3775222331, 1.70846839774007, 37.3694198142245, 3581.44365815434, 423014.446424664, -751071025.760063, 52.3446127607898, -228.351290812417, -960652.417056937, -80705929.2526074, 1626980172256.69, 0.772465073604171, 46392.9973837746, -13731788.5134128, 1704703926305.12, -25110462818730.8, 31774883083552.0, 53.8685623675312, -55308.9094625169, -1028615.22421405, 2042494187562.34, 273918446.626977, -2639631463126850.0, -1078908541.08088, -29649262098.0124, -1117549073234240.0],
p_star = 100,
h_star = 3500,
sigma_star = 5.9,
eta = h / h_star,
sigma = s / sigma_star,
P = 0;
for (var i = 0; i < 31; i++) {
P += n[i]*Math.pow(eta-0.7,I[i])*Math.pow(sigma-1.1,J[i]);
}
return p_star*Math.pow(P,4);
}
/*
Region 3
*/
function r3_HS(h, s) {
var self = this,
P = r3_HS_P(h, s);
return self.r2_PH(P, h);
}
function r3_HS_P(h, s) {
if(s <= constants.R3_CRT_S) {
return r3A_HS_P(h, s);
}
else {
return r3B_HS_P(h, s);
}
}
function r3A_HS_P(h, s) {
var I = [0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 6, 7, 8, 10, 10, 14, 18, 20, 22, 22, 24, 28, 28, 32, 32],
J = [0, 1, 5, 0, 3, 4, 8, 14, 6, 16, 0, 2, 3, 0, 1, 4, 5, 28, 28, 24, 1, 32, 36, 22, 28, 36, 16, 28, 36, 16, 36, 10, 28, ],
n = [7.70889828326934, -26.0835009128688, 267.416218930389, 17.2221089496844, -293.54233214597, 614.135601882478, -61056.2757725674, -65127225.1118219, 73591.9313521937, -11664650591.4191, 35.5267086434461, -596.144543825955, -475.842430145708, 69.6781965359503, 335.674250377312, 25052.6809130882, 146997.380630766, 53806931509153400000.0, 1.43619827291346E+21, 36498586616599400000.0, -2547.41561156775, 2.40120197096563E+27, -3.93847464679496E+29, 1.47073407024852E+24, -4.26391250432059E+31, 1.94509340621077E+38, 6.66212132114896E+23, 7.06777016552858E+33, 1.75563621975576E+41, 1.08408607429124E+28, 7.30872705175151E+43, 1.5914584739887E+24, 3.77121605943324E+40],
p_star = 99,
h_star = 2300,
sigma_star = 4.4,
eta = h / h_star,
sigma = s / sigma_star,
P = 0;
for(var i = 0; i < 33; i++) {
P += n[i]*Math.pow(eta-1.01,I[i])*Math.pow(sigma-0.75,J[i]);
}
return p_star*P;
}
function r3B_HS_P(h, s) {
/* Table X data from IAPWS-97 */
var I = [-12, -12, -12, -12, -12, -10, -10, -10, -10, -8, -8, -6, -6, -6, -6, -5, -4, -4, -4, -3, -3, -3, -3, -2, -2, -1, 0, 2, 2, 5, 6, 8, 10, 14, 14],
J = [2, 10, 12, 14, 20, 2, 10, 14, 18, 2, 8, 2, 6, 7, 8, 10, 4, 5, 8, 1, 3, 5, 6, 0, 1, 0, 3, 0, 1, 0, 1, 1, 1, 3, 7],
n = [1.25244360717979E-13, -0.0126599322553713, 5.06878030140626, 31.7847171154202, -391041.161399932, -9.75733406392044E-11, -18.6312419488279, 510.973543414101, 373847.005822362, 2.99804024666572E-8, 20.0544393820342, -4.98030487662829E-6, -10.230180636003, 55.2819126990325, -206.211367510878, -7940.12232324823, 7.82248472028153, -58.6544326902468, 3550.73647696481, -0.000115303107290162, -1.75092403171802, 257.98168774816, -727.048374179467, 0.000121644822609198, 0.0393137871762692, 0.00704181005909296, -82.910820069811, -0.26517881813125, 13.7531682453991, -52.2394090753046, 2405.56298941048, -22736.1631268929, 89074.6343932567, -23923456.5822486, 5687958081.29714],
p_star = 16.6,
h_star = 2800,
sigma_star = 5.3,
eta = h / h_star,
sigma = s / sigma_star,
P = 0;
for(var i = 0; i < 35; i++) {
P += n[i]*Math.pow(eta-0.681,I[i])*Math.pow(sigma-0.792,J[i]);
}
return p_star/P;
}
/*
Region 4
*/
function r4_HS(h, s) {
var self = this,
T = r4_HS_Tsat(h, s),
P = self.r4_T_Psat(T);
return self.PT(P, T);
}
/* Tsat(h,s) Equation 9 in the HS Region 3 & 4 Supplementary release */
function r4_HS_Tsat(h, s) {
var I = [0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 5, 5, 5, 5, 6, 6, 6, 8, 10, 10, 12, 14, 14, 16, 16, 18, 18, 18, 20, 28],
J = [0, 3, 12, 0, 1, 2, 5, 0, 5, 8, 0, 2, 3, 4, 0, 1, 1, 2, 4, 16, 6, 8, 22, 1, 20, 36, 24, 1, 28, 12, 32, 14, 22, 36, 24, 36],
n = [0.179882673606601, -0.267507455199603, 0.11627672261266E1, 0.147545428713616, -0.512871635973248, 0.421333567697984, 0.56374952218987, 0.429274443819153, -0.33570455214214E1, 0.108890916499278E2, -0.248483390456012, 0.30415322190639, -0.494819763939905, 0.107551674933261E1, 0.733888415457688E-1, 0.140170545411085E-1, -0.106110975998808, 0.168324361811875E-1, 0.125028363714877E1, 0.101316840309509E4, -0.151791558000712E1, 0.524277865990866E2, 0.230495545563912E5, 0.249459806365456E-1, 0.210796467412137E7, 0.366836848613065E9, -0.144814105365163E9, -0.17927637300359E-2, 0.489955602100459E10, 0.471262212070518E3, -0.829294390198652E11, -0.171545662263191E4, 0.355777682973575E7, 0.586062760258436E12, -0.129887635078195E8, 0.317247449371057057E11],
T_star = 550,
h_star = 2800,
sigma_star = 9.2,
eta = h / h_star,
sigma = s / sigma_star,
T = 0;
for(var i = 0; i < 36; i++) {
T += n[i]*Math.pow(eta-0.119, I[i])*Math.pow(sigma-1.07, J[i]);
}
return T_star*T;
};
var SteamCalculation = new SteamTable;
/* *********************************************** */
</script>
</head>
<body>
<script>
var barAbs=1;
var TempC=80;
p_Mpa = barAbs/10;
TempK = TempC + 273.15;
var h
var s;
var resultPT = SteamCalculation.PT(p_Mpa, TempK);
h=resultPT.h;
s=resultPT.s;
with (resultPT){
document.write("PT-Calculation");
document.write("<br>");
document.write("<br>");
document.write("Pressure: " +P.toFixed(8)+" MPa");document.write(" -- " +P*10+" bar<br>");
document.write("Temperature: " +T.toFixed(8)+" K");document.write(" -- " + (T-273.15) +" C<br>");
document.write("Density: " + (rho.toFixed(8)) +" kg/m^3<br>");
document.write("spec vol: " + v.toFixed(8) +" kg/m^3<br>");
document.write("spec. Internal Energy: " +u.toFixed(8)+" kJ/kg<br>");
document.write("spec. entropy: " +s.toFixed(8)+" kJ/kg<br>");
document.write("spec. enthalpy: " +h.toFixed(8)+" kJ/kg<br>");
document.write("spec. cp: " +cp.toFixed(8)+" kJ/kg.K<br>");
document.write("spec. cv: " +cv.toFixed(6)+" kJ/kg.K<br>");
document.write("speed of sound: " +w+" m/s<br>");
document.write("viscosity: " +mu.toFixed(8)+" cp<br>");
document.write("Thermal Conductivity: " +k+" W/m.K<br>");
document.write("Surface Tension: " +sig.toFixed(8)+" mN/m<br>");
document.write("Dielectric constant: " +epsilon.toFixed(8)+" <br>");
document.write("Ionisation constant: " +ic.toFixed(8)+" <br>");
};
document.write("Region = "+SteamCalculation.findRegion_PT(p_Mpa, TempK));
document.write("<br>");
document.write("<br>");
document.write("<br>");
var resultPH = SteamCalculation.PH(p_Mpa,h);
with (resultPH){
document.write("PH-Calculation");
document.write("<br>");
document.write("<br>");
document.write("Pressure: " +P.toFixed(8)+" MPa<br>");
document.write("enthalpy: " +h.toFixed(8)+" kJ/kg<br>");
document.write("Density: " + (rho.toFixed(8)) +" kg/m^3<br>");
document.write("spec vol: " + v.toFixed(8) +" kg/m^3<br>");
document.write("spec. Internal Energy: " +u.toFixed(8)+" kJ/kg<br>");
document.write("spec. entropy: " +s.toFixed(8)+" kJ/kg<br>");
document.write("spec. enthalpy: " +h.toFixed(8)+" kJ/kg<br>");
document.write("spec. cp: " +cp.toFixed(8)+" kJ/kg.K<br>");
document.write("spec. cv: " +cv.toFixed(8)+" kJ/kg.K<br>");
document.write("speed of sound: " +w.toFixed(8)+" m/s<br>");
document.write("viscosity: " +mu.toFixed(8)+" cp<br>");
document.write("Thermal Conductivity: " +k.toFixed(8)+" W/m.K<br>");
document.write("Surface Tension: " +sig.toFixed(8)+" mN/m<br>");
document.write("Dielectric constant: " +epsilon.toFixed(8)+" <br>");
document.write("Ionisation constant: " +ic.toFixed(8)+" <br>");
}
document.write("Region = "+SteamCalculation.findRegion_PH(p_Mpa, h));
document.write("<br>");
document.write("<br>");
document.write("<br>");
var resultPS = SteamCalculation.PS(p_Mpa,s);
with (resultPS){
document.write("PS-Calculation");
document.write("<br>");
document.write("<br>");
document.write("Pressure: " +P.toFixed(8)+" MPa<br>");
document.write("enthalpy: " +h.toFixed(8)+" kJ/kg<br>");
document.write("Density: " + (rho.toFixed(8)) +" kg/m^3<br>");
document.write("spec vol: " + v.toFixed(8) +" kg/m^3<br>");
document.write("spec. Internal Energy: " +u.toFixed(8)+" kJ/kg<br>");
document.write("spec. entropy: " +s.toFixed(8)+" kJ/kg<br>");
document.write("spec. enthalpy: " +h.toFixed(8)+" kJ/kg<br>");
document.write("spec. cp: " +cp.toFixed(8)+" kJ/kg.K<br>");
document.write("spec. cv: " +cv.toFixed(8)+" kJ/kg.K<br>");
document.write("speed of sound: " +w.toFixed(8)+" m/s<br>");
document.write("viscosity: " +mu.toFixed(8)+" cp<br>");
document.write("Thermal Conductivity: " +k.toFixed(8)+" W/m.K<br>");
document.write("Surface Tension: " +sig.toFixed(8)+" mN/m<br>");
document.write("Dielectric constant: " +epsilon.toFixed(8)+" <br>");
document.write("Ionisation constant: " +ic.toFixed(8)+" <br>");
}
document.write("Region = "+SteamCalculation.findRegion_PS(p_Mpa, s));
document.write("<br>");
document.write("<br>");
document.write("<br>");
var resultHS = SteamCalculation.HS(h,s);
with (resultHS){
document.write("HS-Calculation");
document.write("<br>");
document.write("<br>");
document.write("Pressure: " +P.toFixed(8)+" MPa<br>");
document.write("enthalpy: " +h.toFixed(8)+" kJ/kg<br>");
document.write("Density: " + (rho.toFixed(8)) +" kg/m^3<br>");
document.write("spec vol: " + v.toFixed(8) +" kg/m^3<br>");
document.write("spec. Internal Energy: " +u.toFixed(8)+" kJ/kg<br>");
document.write("spec. entropy: " +s.toFixed(8)+" kJ/kg<br>");
document.write("spec. enthalpy: " +h.toFixed(8)+" kJ/kg<br>");
document.write("spec. cp: " +cp.toFixed(8)+" kJ/kg.K<br>");
document.write("spec. cv: " +cv.toFixed(8)+" kJ/kg.K<br>");
document.write("speed of sound: " +w.toFixed(8)+" m/s<br>");
document.write("viscosity: " +mu.toFixed(8)+" cp<br>");
document.write("Thermal Conductivity: " +k.toFixed(8)+" W/m.K<br>");
document.write("Surface Tension: " +sig.toFixed(8)+" mN/m<br>");
document.write("Dielectric constant: " +epsilon.toFixed(8)+" <br>");
document.write("Ionisation constant: " +ic.toFixed(8)+" <br>");
}
document.write("Region = "+SteamCalculation.findRegion_HS(h, s));
document.write("<br>");
document.write("<br>");
document.write("<br>");
/*
_____________________________________________________________________________________________________________________________________
IF97-Rev.pdf
{ Basic Formulation }
This revised release replaces the corresponding release of 1997 and contains 49 pages, including this cover page.
This release has been authorized by the International Association for the Properties of Water and Steam (IAPWS) at its meeting in Lucerne, Switzerland, 26-31 August, 2007, for issue by its Secretariat. The members of IAPWS are: Argentina and Brazil, Britain and Ireland, Canada, the Czech Republic, Denmark, France, Germany, Greece, Italy, Japan, Russia, and the United States of America, and associate member Switzerland.
The formulation provided in this release is recommended for industrial use, and is called "IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam" abbreviated to "IAPWS Industrial Formulation 1997" (IAPWS-IF97). The IAPWS-IF97 replaces the previous Industrial formulation "The 1967 IFC Formulation for Industrial Use" (IFC-67) [1]. Further details about the formulation can be found in the article by W. Wagner et al. [2] and for the extended region 5 in [2a]. Additional supplementary backward equations have been adopted by IAPWS and are listed in [2b].
The material contained in this release is identical to that contained in the release on IAPWS-IF97, issued by IAPWS in September 1997, except for the basic equation for region 5. The previous basic equation for this region was replaced by a new equation of the same structure. For temperatures between 1073 K and 2273 K, this equation extends the upper range of validity of IAPWS-IF97 in pressure from 10 MPa to 50 MPa. Except for the basic equation for region 5 of IAPWS-IF97, the property calculations are unchanged.
In addition, minor editorial changes to this document, involving correction of typographical errors and updating of references, were made in the 2007 revision, and again in 2009 and 2010. In 2012, the description of the range of validity of the equation for the metastable vapor was clarified.
IAPWS also has a formulation intended for general and scientific use [3].
Further information about this release and other releases issued by IAPWS can be obtained from the Executive Secretary of IAPWS or from http://www.iapws.org.
page 2
Contents
1 Nomenclature ...3
2 Structure of the Formulation ...4
3 Reference Constants ...5
4 Auxiliary Equation for the Boundary between Regions 2 and 3 ...5
5 Equations for Region 1 ...6
5.1 Basic Equation ...6
5.2 Backward Equations ...9
5.2.1 The Backward Equation T( p,h) ...10
5.2.2 The Backward Equation T( p,s) ...11
6 Equations for Region 2 ...12
6.1 Basic Equation ...13
6.2 Supplementary Equation for the Metastable-Vapor Region ...17
6.3 Backward Equations ...20
6.3.1 The Backward Equations T( p,h) for Subregions 2a, 2b, and 2c ...22
6.3.2 The Backward Equations T( p,s) for Subregions 2a, 2b, and 2c ...25
7 Basic Equation for Region 3 ...29
8 Equations for Region 4 ...33
8.1 The Saturation-Pressure Equation (Basic Equation) ...33
8.2 The Saturation-Temperature Equation (Backward Equation) ...35
9 Basic Equation for Region 5 ...36
10 Consistency at Region Boundaries ...40
10.1Consistency at Boundaries between Single-Phase Regions ...40
10.2 Consistency at the Saturation Line ...41
11 Computing Time of IAPWS-IF97 in Relation to IFC-67 ...43
11.1 Computing-Time Investigations for Regions 1, 2, and 4 ...43
11.2 Computing-Time Investigations for Region 3 ...45
12 Estimates of Uncertainties ...46
13 References ...49
page 3
1 Nomenclature
Thermodynamic quantities:
c_p Specific isobaric heat capacity
c_v Specific isochoric heat capacity
f Specific Helmholtz free energy
g Specific Gibbs free energy
h Specific enthalpy
M Molar mass
p Pressure
R Specific gas constant
R_m Molar gas constant
s Specific entropy
T Absolute temperature{^a}
u Specific internal energy
v Specific volume
w Speed of sound
x General quantity
\beta Transformed pressure, Eq. (29a)
\gamma Dimensionless Gibbs free energy, \gamma = g/(RT )
\Delta Reduced density, \Delta = \rho/\rho* Difference in any quantity
\eta Reduced enthalpy, \eta = h/h^{*}
\theta Reduced temperature, \theta = T/T^{*}
\vartheta Transformed temperature, Eq. (29b)
\pi Reduced pressure, \pi = p/p^{*}
\rho Mass density
\sigma Reduced entropy, \sigma = s/s^{*}
\tau Inverse reduced temperature, \tau = T^{*}/T
\varphi Dimensionless Helmholtz free energy, \varphi = f/(RT)
Superscripts:
o Ideal-gas part
r Residual part
* Reducing quantity
′ Saturated liquid state
″ Saturated vapor state
Subscripts:
c Critical point max Maximum value
RMS Root-mean-square value
s Saturation state
t Triple point
tol Tolerance of a quantity
Root-mean-square deviation:
\Delta x_{RMS} = \sqrt {\frac{1}{N}\sum_{n=1}^{N}\bigg(\Delta x_{n}\bigg)^{2}}
where \Delta x_{n} can be either absolute or percentage difference between the corresponding quantities x ; N is the number of \Delta x_{n} values (depending on the property, between 10 million and 100 million points are uniformly distributed over the respective range of validity).
{^a} Note: T denotes absolute temperature on the International Temperature Scale of 1990.
page 4
2 Structure of the Formulation
The IAPWS Industrial Formulation 1997 consists of a set of equations for different regions which cover the following range of validity:
273.15 \ {\rm K} \leq T \leq 1073.15\ {\rm K}\quad p \leq 100 \ {\rm MPa} \\
1073.15 \ {\rm K} \lt T \leq 2273.15 \ {\rm K}\quad p \leq 50 \ {\rm MPa}.\\
Figure 1 shows the five regions into which the entire range of validity of IAPWS-IF97 is divided. The boundaries of the regions can be directly taken from Fig. 1 except for the boundary between regions 2 and 3; this boundary is defined by the so-called B23-equation given in Section 4. Both regions 1 and 2 are individually covered by a fundamental equation for the specific Gibbs free energy g(p, T), region 3 by a fundamental equation for the specific Helmholtz free energy f ( \rho,T ), where \rho is the density, and the saturation curve by a saturation-pressure equation p_s(T). The high-temperature region 5 is also covered by a g(p, T) equation. These five equations, shown in rectangular boxes in Fig. 1, form the so-called basic equations.
p/Mpa
A
|---+--------------+-------------------+
100 + | | / |
| | 1 | 2 / 3 |
| | | / |
| | | / |
| | | / |
| | | / |
50 + | | / |--------------//----------------+
| | | / | |
| | | / | 5 |
| | | / | |
| | | / | |
| | X | |
10 + | / | | |
| | . 4 | | |
0 |---+--------------+-------------------+--------------------------------+-----> T/K
273,15 623.15 1073.15 2273.15
Fig. 1. Regions and equations of IAPWS-IF97.
Regarding the main properties specific volume v, specific enthalpy h, specific isobaric heat capacity c_p, speed of sound w, and saturation pressure p_s, the basic equations represent the corresponding values from the "IAPWS Formulation 1995 for the Thermodynamic Properties of Ordinary Water Substance for General and Scientific Use" [3] (hereafter abbreviated to IAPWS-95) to within the tolerances specified for the development of the corresponding equations; details of these requirements and their fulfillment are given in the comprehensive paper on IAPWS-IF97 [2]. The basic equations for regions 1 and 3 also yield reasonable values for the metastable states close to the stable regions. For region 2 there is a special
page 5
equation for the metastable-vapor region. Along the region boundaries the corresponding basic equations are consistent with each other within specified tolerances; for details see Section 10.
In addition to the basic equations, for regions 1, 2, and 4 so-called backward equations are provided in the forms of T(p, h) and T(p, s) for regions 1 and 2, and T_s(p) for region 4. These backward equations are numerically consistent with the corresponding basic equations and make the calculation of properties as functions of p,h and of p,s for regions 1 and 2, and of p for region 4, extremely fast. In this way, properties such as T(p, h), h(p, s), and h^{′}(p) can be calculated without any iteration from the backward equation alone or by combination with the corresponding basic equation, for example, h(p, s) via the relation h(p, T(p, s)). As a consequence, the calculation of the industrially most important properties is on average more than five times faster than the corresponding calculation with IFC-67; for details see Section 11.
The estimates of uncertainty of the most relevant properties calculated from the corresponding equations of IAPWS-IF97 are summarized in Section 12.
3 Reference Constants
The specific gas constant of ordinary water used for this formulation is
R = 0.461 526 kJ kg^{-1} K^{-1}. ...(1)
This value results from the recommended values of the molar gas constant [4], and the molar mass of ordinary water [5, 6]. The values of the critical parameters
T_{c} = 647.096 K ...(2)
p_{c} = 22.064 MPa ...(3)
\rho_{c} = 322 kg m^{-3} ...(4)
are from the corresponding IAPWS release [7].
4 Auxiliary Equation for the Boundary between Regions 2 and 3
The boundary between regions 2 and 3 (see Fig. 1) is defined by the following simple quadratic pressure-temperature relation, the B23-equation
\pi = n_1 + n_2 \theta + n_3 \theta^{2} (5)
where \pi = p/p^{*} and \theta = T/T^{*} with p^{*} = 1 MPa and T^{*} = 1 K. The coefficients n_1 to n_3 of
Eq. (5) are listed in Table 1. Equation (5) roughly describes an isentropic line; the entropy values along this boundary line are between s = 5.047 kJ kg^{-1} K^{-1} and s = 5.261 kJ kg^{-1} K^{-1}.
6 Alternatively Eq. (5) can be expressed explicitly in temperature as
\theta = n_4 + [(\pi - n_5) / n_3 ]^{1/2}, (6)
with \theta and \pi defined for Eq. (5) and the coefficients n_3 to n_5 listed in Table 1. Equations (5) and (6) cover the range from 623.15 K at a pressure of 16.5292 MPa to 863.15 K at 100 MPa.
Table 1. Numerical values of the coefficients of the B23-equation, Eqs. (5) and (6), for defining the boundary between regions 2 and 3
\begin{array}{cccc|cccc}
\hline
i & n_i \\
\hline
1 & 0.348 051 856 289 69E+3 \\
2 & -0.116 718 598 799 75E+1 \\
3 & 0.101 929 700 393 26E-2 \\
4 & 0.572 544 598 627 46E+3 \\
5 & 0.139 188 397 788 70E+2 \\
\hline
\end{array}
For computer-program verification, Eqs. (5) and (6) must meet the following T-p point: T = 0.623 150 000E+3 K , p = 0.165 291 643E+2 MPa.
5 Equations for Region 1
This section contains all details relevant for the use of the basic and backward equations of region 1 of IAPWS-IF97. Information about the consistency of the basic equation of this region with the basic equations of regions 3 and 4 along the corresponding region boundaries is summarized in Section 10. The results of computing-time comparisons between IAPWS-IF97 and IFC-67 are given in Section 11. The estimates of uncertainty of the most relevant properties can be found in Section 12.
5.1 Basic Equation
The basic equation for this region is a fundamental equation for the specific Gibbs free energy g. This equation is expressed in dimensionless form, \gamma = g/(RT ), and reads
g(p, T) / {RT} = \gamma (\pi, \tau) = \sum_{i=1}^{34} n_i(7.1 - \pi)^{I_i} (\tau - 1.222)^{J_i} ,(7)
where \pi = p/p^{*} and \tau = T^{*}/T with p^{*} = 16.53 MPa and T^{*} = 1386 K ; R is given by Eq. (1). The coefficients ni and exponents I_i and J_i of Eq. (7) are listed in Table 2.
All thermodynamic properties can be derived from Eq. (7) by using the appropriate combinations of the dimensionless Gibbs free energy and its derivatives. Relations between the relevant thermodynamic properties and \gamma and its derivatives are summarized in Table 3. All required derivatives of the dimensionless Gibbs free energy are explicitly given in Table 4.
page 7
Since the 5th International Conference on the Properties of Steam in London in 1956, the specific internal energy and the specific entropy of the saturated liquid at the triple point have been set equal to zero:
u_t^{′} = 0 ; s_t^{′} = 0. ...(8)
In order to meet this condition at the temperature and pressure of the triple point
T_t = 273.16 K [8] p_t = 611.657 Pa [9], ...(9)
\text{the coefficients n_3 and n_4 in Eq. (7) have been adjusted accordingly. As a consequence, Eq. (7) yields for the specific enthalpy of the saturated liquid at the triple point}\\
\\
h_t^{′} = 0.611 783 \quad \text{J kg}^ \text{}{-1}\text{. (10)}
\text{Table 2. Numerical values of the coefficients and exponents of the dimensionless Gibbs free energy for region 1, Eq. (7)}
\\
\\
\begin{array}{cccc|cccc}
\hline
i & I_i & J_i & n_i & i & I_i & J_i & n_i \\
\hline
1 & 0 & -2 & 0.146 329 712 131 67 & 18 & 2 & 3 & -0.441 418 453 308 46E-5 \\
2 & 0 & -1 & - 0.845 481 871 691 14 & 19 & 2 & 17 & -0.726 949 962 975 94E-15 \\
3 & 0 & 0 & - 0.375 636 036 720 40E+1 & 20 & 3 & -4 & -0.316 796 448 450 54E-4 \\
4 & 0 & 1 & 0.338 551 691 683 85E+1 & 21 & 3 & 0 & -0.282 707 979 853 12E-5 \\
5 & 0 & 2 & - 0.957 919 633 878 72 & 22 & 3 & 6 & -0.852 051 281 201 03E-9 \\
6 & 0 & 3 & 0.157 720 385 132 28 & 23 & 4 & -5 & -0.224 252 819 080 00E-5 \\
7 & 0 & 4 & - 0.166 164 171 995 01E-1 & 24 & 4 & -2 & -0.651 712 228 956 01E-6 \\
8 & 0 & 5 & 0.812 146 299 835 68E-3 & 25 & 4 & 10 & -0.143 417 299 379 24E-12 \\
9 & 1 & -9 & 0.283 190 801 238 04E-3 & 26 & 5 & -8 & -0.405 169 968 601 17E-6 \\
10 & 1 & -7 & - 0.607 063 015 658 74E-3 & 27 & 8 & -11 & -0.127 343 017 416 41E-8 \\
11 & 1 & -1 & - 0.189 900 682 184 19E-1 & 28 & 8 & -6 & -0.174 248 712 306 34E-9 \\
12 & 1 & 0 & - 0.325 297 487 705 05E-1 & 29 & 21 & -29 & -0.687 621 312 955 31E-18 \\
13 & 1 & 1 & - 0.218 417 171 754 14E-1 & 30 & 23 & -31 & 0.144 783 078 285 21E-19 \\
14 & 1 & 3 & - 0.528 383 579 699 30E-4 & 31 & 29 & -38 & 0.263 357 816 627 95E-22 \\
15 & 2 & -3 & - 0.471 843 210 732 67E-3 & 32 & 30 & -39 & -0.119 476 226 400 71E-22 \\
16 & 2 & 0 & - 0.300 017 807 930 26E-3 & 33 & 31 & -40 & 0.182 280 945 814 04E-23 \\
17 & 2 & 1 & 0.476 613 939 069 87E-4 & 34 & 32 & -41 & -0.935 370 872 924 58E-25 \\
\hline
\end{array}
page 8
Table 3. Relations of thermodynamic properties to the dimensionless Gibbs free energy \gamma and its derivatives a when using Eq. (7)
Property Relation
Specific volume
v = (\partial g / \partial p)_{T} v(\pi ,\tau) \frac {p}{RT} = \pi \gamma_{\pi}
Specific internal energy
u = g - T (\partial g / \partial T)_{p}- p(\partial g / \partial p)_{T} \frac {u(\pi ,\tau)}{RT} = \tau \gamma_{\tau} - \pi \gamma_{\pi}
Specific entropy
s = - (\partialg/\partialT)_{p} \frac {s(\pi, \tau)}{R} = \tau \gamma_{\tau} - \gamma
Specific enthalpy
h = g - T (\partial g / \partial T)_{p} \frac { h (\pi, \tau)}{RT} = \tau \gamma_{\tau}
Specific isobaric heat capacity
c_p = (\partial h / \partial T)_{p} \frac {c_p (\pi, \tau)}{R} = - \tau^{2} \gamma_{\tau \tau}
Specific isochoric heat capacity
c_v = (\partial u / \partial T)_{v} \frac {c_v (\pi, \tau)}{R} = - \tau^{2} \gamma_{\tau \tau} + \frac {(\gamma_{\pi} - \tau \gamma_{\pi \tau})^{2}}{\gamma_{\pi \pi}}
Speed of sound
w = v[-(\partial p / \partial v)_{s}]^{1/2} \frac {w^{2} (\pi , \tau)}{RT} = \frac {\gamma_{\pi}^{2}}{{\frac {{\gamma_{\pi} - \tau \gamma_{\pi \tau}}^{2}}{\tau^{2} \gamma_{\tau \tau}}} - \gamma_{\pi \pi}}
{^a} \gamma_{\pi} = \left [\frac {\partial \gamma }{ \partial \pi}\right]_{r}, \quad
\gamma_{\pi \pi} = \left [\frac {\partial^{2} \gamma }{ \partial \pi^{2}} \right]_{\tau}, \quad
\gamma_{\tau} = \left [\frac {\partial \gamma }{ \partial \tau} \right]_{\pi}, \quad
\gamma_{\tau \tau} = \left [\frac {\partial^{2} \gamma }{\partial \tau^{2}} \right], \quad
\gamma_{\pi \tau} = \left [\frac {\partial^{2} \gamma }{\partial \pi \partial \tau} \right]
Table 4. The dimensionless Gibbs free energy \gamma and its derivatives a according to Eq. (7)
\gamma = \sum_{i=1}^{34} n_i (7.1 - \pi)^{I_i} (\tau - 1.222)^{J_i} \\
\gamma_{\pi} = \sum_{i=1}^{34}-n_i I_i (7.1 - \pi)^{{I_i}-1} (\tau - 1.222)^{J_i} \\
\gamma_{\pi \pi} = \sum_{i=1}^{34} n_i I_i(I-1)(7.1 - \pi)^{{I_i}-2} (\tau - 1.222)^{J_i} \\
\gamma_{\tau} = \sum_{i=1}^{34} n_i (7.1 - \pi)^{I_i} (\tau - 1.222)^{J_i-1} \\
\gamma_{\tau \tau} = \sum_{i=1}^{34} n_i (7.1 - \pi)^{I_i} J_i(J_i-1)(\tau - 1.222)^{J_i-2} \\
\gamma_{\pi \tau} = \sum_{i=1}^{34}-n_i I_i (7.1 - \pi)^{I_i-1} J_i (\tau - 1.222)^{J_i-1} \\
{^a} \gamma_{\pi} = [\partial \gamma / \partial \pi]_{\tau},
\gamma_{\pi \pi} = [\partial^{2} \gamma / {\partial \pi^2}]_{\tau},
\gamma_{\tau} = [\partial \gamma / \partial \tau]_{\pi},
\gamma_{\tau \tau} = [\partial^{2} \gamma /{\partial \tau^2}]_{\pi},
\gamma_{\pi \tau} = [\partial^{2} \gamma / {\partial \pi \partial \tau}]
page 9
Range of validity
Equation (7) covers region 1 of IAPWS-IF97 defined by the following range of temperature and pressure; see Fig. 1:
273.15 K \leq T \leq 623.15 K p_{s}(T) \leq p \leq 100 MPa.
In addition to the properties in the stable single-phase liquid region, Eq. (7) also yields reasonable values in the metastable superheated-liquid region close to the saturated liquid line.
Note: For temperatures between 273.15 K and 273.16 K, the part of the range of validity between the pressures on the melting line [10] and on the saturation-pressure line, Eq. (30), corresponds to metastable states.
Computer-program verification
To assist the user in computer-program verification of Eq. (7), Table 5 contains test values of the most relevant properties.
Table 5. Thermodynamic property values calculated from Eq. (7) for selected values of T and p{^a}
T = 300 K,p = 3 MPa T = 300 K,p = 80 MPa T = 500 K,p = 3 MPa
v/(m^3 kg^-1) 0.100 215 168E-2 0.971 180 894E-3 0.120 241 800E-2
h/(kJ kg^-1) 0.115 331 273E+3 0.184 142 828E+3 0.975 542 239E+3
u/(kJ kg^-1) 0.112 324 818E+3 0.106 448 356E+3 0.971 934 985E+3
s/(kJ kg^-1 K^-1) 0.392 294 792 0.368 563 852 0.258 041 912E+1
c_p /(kJ kg^-1 K^-1) 0.417 301 218E+1 0.401 008 987E+1 0.465 580 682E+1
w/(m s^-1) 0.150 773 921E+4 0.163 469 054E+4 0.124 071 337E+4
{^a} It is recommended to verify programmed functions using 8 byte real values for all three combinations of T and p given in this table.
5.2 Backward Equations
For the calculation of properties as function of p,h or of p,s without any iteration, the two backward equations require extremely good numerical consistency with the basic equation. The exact requirements for these numerical consistencies were obtained from comprehensive test calculations for several characteristic power cycles. The result of these investigations, namely the assignment of the tolerable numerical inconsistencies between the basic equation, Eq. (7), and the corresponding backward equations, is given in Eqs. (12) and (14), respectively.
page 10
5.2.1 The Backward Equation T(p, h)
The backward equation T( p,h) for region 1 has the following dimensionless form:
T(p, h)/{T^{*}} = \theta(\pi, \eta) = \sum_{i=1}^{20} n_i \pi^{I_i} (\eta + 1)^{J_i}, ...(11)
where \theta = T/T^{*}, \pi = p/p^{*}, and \eta = h/h^{*} with T^{*} = 1 K , p^{*} = 1 MPa, and h^{*} = 2500 kJ kg^{-1}. The coefficients ni and exponents I_i and J_i of Eq. (11) are listed in Table 6.
Table 6. Numerical values of the coefficients and exponents of the backward equation T( p,h) for region 1, Eq. (11)
\begin{array}{cccc|cccc}
\hline
i & I_i & J_i & n_i & i & I_i & J_i & n_i \\
\hline
1 & 0 & 0 & - 0.238 724 899 245 21E+3 & 11 & 1 & 4 & - 0.659 647 494 236 38E+1 \\
2 & 0 & 1 & 0.404 211 886 379 45E+3 & 12 & 1 & 10 & 0.939 654 008 783 63E-2 \\
3 & 0 & 2 & 0.113 497 468 817 18E+3 & 13 & 1 & 32 & 0.115 736 475 053 40E-6 \\
4 & 0 & 6 & - 0.584 576 160 480 39E+1 & 14 & 2 & 10 & - 0.258 586 412 820 73E-4 \\
5 & 0 & 22 & - 0.152 854 824 131 40E-3 & 15 & 2 & 32 & - 0.406 443 630 847 99E-8 \\
6 & 0 & 32 & - 0.108 667 076 953 77E-5 & 16 & 3 & 10 & 0.664 561 861 916 35E-7 \\
7 & 1 & 0 & - 0.133 917 448 726 02E+2 & 17 & 3 & 32 & 0.806 707 341 030 27E-10 \\
8 & 1 & 1 & 0.432 110 391 835 59E+2 & 18 & 4 & 32 & - 0.934 777 712 139 47E-12 \\
9 & 1 & 2 & - 0.540 100 671 705 06E+2 & 19 & 5 & 32 & 0.582 654 420 206 01E-14 \\
10 & 1 & 3 & 0.305 358 922 039 16E+2 & 20 & 6 & 32 & - 0.150 201 859 535 03E-16 \\
\hline
\end{array}
Range of validity
Equation (11) covers the same range of validity as the basic equation, Eq. (7), except for the metastable region (superheated liquid), where Eq. (11) is not valid.
Numerical consistency with the basic equation
For ten million random pairs of p and h covering the entire region 1, the differences \Delta T between temperatures from Eq. (11) and from Eq. (7) were calculated and the absolute maximum difference |\Delta T|_{max} and the root-mean-square difference \Delta T_{RMS} were determined.
These actual inconsistency values and the tolerated value |\Delta T|_{tol} (see the beginning of Section 5.2) amount to:
|\Delta T|_{tol} = 25 mK ; \Delta T_{RMS} = 13.4 mK; |\Delta T|_{max} = 23.6 mK. (12)
page 11
Computer-program verification
To assist the user in computer-program verification of Eq. (11), Table 7 contains the corresponding test values.
Table 7. Temperature values calculated from Eq. (11) for selected values of p and h{^a}
p/MPa h/(kJ kg^{-1}) T/K
3 500 0.391 798 509E+3
80 500 0.378 108 626E+3
80 1500 0.611 041 229E+3
{^a} It is recommended to verify the programmed equation (8 byte real values) for all three combinations of p and h given in this table.
5.2.2 The Backward Equation T(p, s)
The backward equation T(p, s) for region 1 has the following dimensionless form:
20
T(p, s) / T = \theta (\pi ,\sigma ) = \sum_{i=1}^{20} n_i \pi^{I_i} (\sigma + 2)^{J_i} , ...(13)
where \theta = T/T^{*}, \pi = p/p^{*}, and \sigma = s/s^{*} with T^{*} = 1 K , p^{*} = 1 MPa, and s^{*} = 1 kJ kg^{-1} K^{-1}. The coefficients ni and exponents I_i and J_i of Eq. (13) are listed in Table 8.
Table 8. Numerical values of the coefficients and exponents of the backward equation T( p,s) for region 1, Eq. (13)
i I_i J_i ni i I_i J_i ni
1 0 0 0.174 782 680 583 07E+3 11 1 12 0.356 721 106 073 66E-9
2 0 1 0.348 069 308 928 73E+2 12 1 31 0.173 324 969 948 95E-23
3 0 2 0.652 925 849 784 55E+1 13 2 0 0.566 089 006 548 37E-3
4 0 3 0.330 399 817 754 89 14 2 1 - 0.326 354 831 397 17E-3
5 0 11 - 0.192 813 829 231 96E-6 15 2 2 0.447 782 866 906 32E-4
6 0 31 - 0.249 091 972 445 73E-22 16 2 9 - 0.513 221 569 085 07E-9
7 1 0 - 0.261 076 364 893 32 17 2 31 - 0.425 226 570 422 07E-25
8 1 1 0.225 929 659 815 86 18 3 10 0.264 004 413 606 89E-12
9 1 2 - 0.642 564 633 952 26E-1 19 3 32 0.781 246 004 597 23E-28
10 1 3 0.788 762 892 705 26E-2 20 4 32 - 0.307 321 999 036 68E-30
page 12
Range of validity
Equation (13) covers the same range of validity as the basic equation, Eq. (7), except for the metastable region (superheated liquid), where Eq. (13) is not valid.
Numerical consistency with the basic equation
For ten million random pairs of p and s covering the entire region 1, the differences \Delta T between temperatures from Eq. (13) and from Eq. (7) were calculated and the absolute maximum difference |\Delta T|_{max} and the root-mean-square difference \Delta T_{RMS} were determined.
These actual differences and the tolerated value |\Delta T|_{tol}(see the beginning of Section 5.2) amount to:
|\Delta T|_{tol} = 25 mK ; \Delta T_{RMS} = 5.8 mK ; |\Delta T|_{max} = 21.8 mK. ...(14)
Computer-program verification
To assist the user in computer-program verification of Eq. (13), Table 9 contains the corresponding test values.
Table 9. Temperature values calculated from Eq. (13) for selected values of p and s{^a}
p/MPa s/(kJ kg^{-1} K^{-1}) T/K
3 0.5 0.307 842 258E+3
80 0.5 0.309 979 785E+3
80 3 0.565 899 909E+3
{^a} It is recommended to verify the programmed equation using 8 byte real values for all three combinations of p and s given in this table.
6 Equations for Region 2
This section contains all details relevant for the use of the basic and backward equations of region 2 of IAPWS-IF97. Information about the consistency of the basic equation of this region with the basic equations of regions 3, 4 and 5 along the corresponding region boundaries is summarized in Section 10. The auxiliary equation for defining the boundary between regions 2 and 3 is given in Section 4. Section 11 contains the results of computing- time comparisons between IAPWS-IF97 and IFC-67. The estimates of uncertainty of the most relevant properties can be found in Section 12.
page 13
6.1 Basic Equation
The basic equation for this region is a fundamental equation for the specific Gibbs free energy g. This equation is expressed in dimensionless form, \gamma = g / (RT), and is separated into two parts, an ideal-gas part \gamma^{o} and a residual part \gamma^{r}, so that
g (p, T) / {RT} = \gamma (\pi, \tau) = \gamma^{o} (\pi, \tau) + \gamma^{r} (\pi, \tau) , ...(15)
where \pi = p/p^{*} and \tau = T^{*}/T with R given by Eq. (1).
The equation for the ideal-gas part \gamma^{o} of the dimensionless Gibbs free energy reads
\gamma^{o} = ln \pi + \sum_{i=1}^{9} n_i^{o} \tau^{J_i^{o}}, ...(16)
where \pi = p/p^{*} and \tau = T^{*}/T with p^{*} = 1 MPa and T^{*} = 540 K. The coefficients n_1^{o} and n_2^{o} were adjusted in such a way that the values for the specific internal energy and specific entropy in the ideal-gas state relate to Eq. (8). Table 10 contains the coefficients n_i^o and exponents J_i^o of Eq. (16).
Table 10. Numerical values of the coefficients and exponents of the ideal-gas part \gamma^{o} of the dimensionless Gibbs free energy for region 2, Eq. (16){^a}
i J_i^o n_i^o i J_i^o n_i^o
1{^a} 0 - 0.969 276 865 002 17E+1 6 -2 0.142 408 191 714 44E+1
2{^a} 1 0.100 866 559 680 18E+2 7 -1 - 0.438 395 113 194 50E+1
3 -5 - 0.560 879 112 830 20E-2 8 2 - 0.284 086 324 607 72
4 -4 0.714 527 380 814 55E-1 9 3 0.212 684 637 533 07E-1
5 -3 - 0.407 104 982 239 28
{^a} If Eq. (16) is incorporated into Eq. (18), instead of the values for n_1^o and n_2^o given above, the following values for these two coefficients must be used: n_1^o = -0.969 372 683 930 49E+1 , n_2^o =0.100 872 759 700 06E+2.
The form of the residual part \gamma^{r} of the dimensionless Gibbs free energy is as follows:
\gamma^{r} = \sum_{i=1}^{43} n_i \pi^{I_i} (\tau - 0.5)^{J_i}, ...(17)
where \pi = p/p^{*} and \tau = T^{*}/T with p^{*} = 1 MPa and T^{*} = 540 K. The coefficients n_i and exponents I_i and J_i of Eq. (17) are listed in Table 11.
page 14
Table 11. Numerical values of the coefficients and exponents of the residual part \gamma^{r} of the dimensionless Gibbs free energy for region 2, Eq. (17)
i I_i J_i ni
1 1 0 - 0.177 317 424 732 13E-2
2 1 1 - 0.178 348 622 923 58E-1
3 1 2 - 0.459 960 136 963 65E-1
4 1 3 - 0.575 812 590 834 32E-1
5 1 6 - 0.503 252 787 279 30E-1
6 2 1 - 0.330 326 416 702 03E-4
7 2 2 - 0.189 489 875 163 15E-3
8 2 4 - 0.393 927 772 433 55E-2
9 2 7 - 0.437 972 956 505 73E-1
10 2 36 - 0.266 745 479 140 87E-4
11 3 0 0.204 817 376 923 09E-7
12 3 1 0.438 706 672 844 35E-6
13 3 3 - 0.322 776 772 385 70E-4
14 3 6 - 0.150 339 245 421 48E-2
15 3 35 - 0.406 682 535 626 49E-1
16 4 1 - 0.788 473 095 593 67E-9
17 4 2 0.127 907 178 522 85E-7
18 4 3 0.482 253 727 185 07E-6
19 5 7 0.229 220 763 376 61E-5
20 6 3 - 0.167 147 664 510 61E-10
21 6 16 - 0.211 714 723 213 55E-2
22 6 35 - 0.238 957 419 341 04E+2
23 7 0 - 0.590 595 643 242 70E-17
24 7 11 - 0.126 218 088 991 01E-5
25 7 25 - 0.389 468 424 357 39E-1
26 8 8 0.112 562 113 604 59E-10
27 8 36 - 0.823 113 408 979 98E+ 1
28 9 13 0.198 097 128 020 88E-7
29 10 4 0.104 069 652 101 74E-18
30 10 10 - 0.102 347 470 959 29E-12
31 10 14 - 0.100 181 793 795 11E-8
32 16 29 - 0.808 829 086 469 85E-10
33 16 50 0.106 930 318 794 09
34 18 57 - 0.336 622 505 741 71E-24
35 20 20 0.891 858 453 554 21
36 20 35 0.306 293 168 762 32E-12
37 20 48 - 0.420 024 676 982 08E-5
38 21 21 - 0.590 560 296 856 39E-25
39 22 53 0.378 269 476 134 57E-5
40 23 39 - 0.127 686 089 346 81E-14
41 24 26 0.730 876 105 950 61E-28
42 24 40 0.554 147 153 507 78E-16
43 24 58 - 0.943 697 072 412 10E-6
page 15
All thermodynamic properties can be derived from Eq. (15) by using the appropriate combinations of the ideal-gas part \gamma^{o}, Eq. (16), and the residual part \gamma^{r}, Eq. (17), of the dimensionless Gibbs free energy and their derivatives. Relations between the relevant thermodynamic properties and \gamma^{o} and \gamma^{r} and their derivatives are summarized in Table 12. All required derivatives of the ideal-gas part and of the residual part of the dimensionless Gibbs free energy are explicitly given in Table 13 and Table 14, respectively.
Table 12. Relations of thermodynamic properties to the ideal-gas part \gamma^{o} and the residual part \gamma^{r} of the dimensionless Gibbs free energy and their derivatives{^a} when using Eq. (15) or Eq. (18)
Property Relation
Specific volume
v = (\partial g / \partial p)_{T} v(\pi, \tau){p/ {RT} = \pi (\gamma_{\pi}^{o} + \gamma_{\pi}^{r})
Specific internal energy
u = g - T (\partial g / \partial T)_{p} - p(\partial g / \partial p)_{T} u(\pi, \tau) / {RT} = \tau (\gamma_{\tau}^{o} + \gamma_{\tau}^{r}) - \pi (\gamma_{\pi}^{o} + \gamma_{\pi}^{r})
Specific entropy
s = - (\partial g / \partial T)_{p} s(\pi, \tau) / {R} = \tau (\gamma+{\tau}^{o} + \gamma_{\tau}^{r}) - (\gamma^{o} + \gamma^{r})
Specific enthalpy
h = g - T (\partial g / \partial T)_{p} h(\pi, \tau) / {RT} = \tau (\gamma_{\tau}^{o} + \gamma_{\tau}^{r})
Specific isobaric heat capacity
c_p = (\partial h / \partial T)_{p} \frac {c_p (\pi, \tau)}{R} = -\tau^{2} (\gamma_{\tau \tau}^{o}+ \gamma_{\tau \tau}^{r})
Specific isochoric heat capacity
c_v = (\partial u / \partial T)_{v} \frac {c_v (\pi, \tau)}{R} = -\tau^{2} (\gamma_{\tau \tau}^{o} + \gamma_{\tau \tau}^{r})-{(1 + \pi \gamma_{\pi}^{r} - \tau \pi \gamma_{\pi \tau}^{r})^{2} / {1 - \pi^{2} \gamma_{\pi \pi}^{r}}}
Speed of sound
w = v [- (\partial p / \partial v)_{s}]^{1/2} w^{2} (\pi, \tau) / {RT} = {1+ 2 \pi \gamma_{\pi}^{r} + \pi^2 {\gamma_{\pi}^{r}}^{2}} / {(1 - \pi^{2} \gamma_{\pi \pi}^{r}) + {{(1 + \pi \gamma_{\pi}^{r} - \tau \pi \gamma_{\pi \tau}^{r})^{2}} / {\tau^{2} (\gamma_{\tau \tau}^{o} + \gamma_{\tau \tau}^{r})}}}
------------------------------------------
{^a} \gamma_{\pi}^{r} = [\partial \gamma^{r} / \partial \pi]_{\tau},
\gamma_{\pi \pi}^{r} = [\partial^{2} \gamma^{r} / \partial \pi^{2}]_{\tau},
\gamma_{\tau}^{r} = [\partial \gamma^{r} / \partial \tau]_{\pi},
\gamma_{\tau \tau}^{r} = [\partial^{2} \gamma^{r} / \partial \tau^{2}]_{\pi},
\gamma_{\pi \tau}^{r} = [\partial^{2} \gamma^{r} / {\partial \pi \partial \tau}],
\gamma_{\tau}^{o} = [\partial \gamma^{o} / \partial \tau]_{\pi},
\gamma_{\tau \tau}_{o} = [\partial^{2} \gamma^{o} / \partial \tau^{2}]_{\pi}
page 16
Table 13. The ideal-gas part \gamma^{o} of the dimensionless Gibbs free energy and its derivatives a according to Eq. (16)
\gamma^{o} = ln {\pi} + \sum_{i=1}^{9} n_i^{o} \tau^{J_i^{o}}
\gamma_{\pi}^{o} = 1 / \pi + 0
\gamma_{\pi \pi}^{o} = {-1} / {\pi^{2}} + 0
\gamma_{\tau}^{o} = 0 + \sum_{i=1}^{9} n_i^{o} J_i^{o} \tau^{J_i^{o}-1}
\gamma_{\tau \tau}^{o}= 0 + \sum_{i=1}^{9} n_i^{o} J_i^{o} (J_i^{o}-1) \tau^{J_i^{o}-2}
\gamma_{\pi \tau}^{o} = 0 + 0
---------------------------------------------
{^a} \gamma_{\pi}^{o} = [\partial \gamma^{o} / \partial \pi]_{\tau},
\gamma_{\pi \pi}^{o} = [\partial^{2} \gamma^{o} / \partial \pi^{2}]_{\tau},
\gamma_{\tau}^{o} = [\partial \gamma^{o} / \partial \tau]_{\pi},
\gamma_{\tau \tau}^{o} = [\partial^{2} \gamma^{o} / \partial \tau^{2}]_{\pi},
\gamma_{\pi \tau}^{o} = [\partial^{2} \gamma^{o} / {\partial \pi \partial \tau}]
Table 14. The residual part \gamma^{r} of the dimensionless Gibbs free energy and its derivatives{^a} according to Eq. (17)
\gamma^{r} = \sum_{i=1}^{43} n_i \pi^{I_i} (\tau - 0.5)^{J_i}
\gamma_{\pi}^{r} = \sum_{i=1}^{43} n_i I_i \pi^{I_i-1} (\tau - 0.5)^{J_i}
\gamma_{\pi \pi}^{r} = \sum_{i=1}^{43} n_i I_i (I-1) \pi^{I_i-2} (\tau - 0.5)^{J_i}
\gamma_{\tau}^{r} = \sum_{i=1}^{43} n_i \pi^{I_i} J_i (\tau - 0.5)^{J_i-1}
\gamma_{\tau \tau}^{r} = \sum_{i=1}^{43} n_i \pi^{I_i} J_i (J_i-1)(\tau - 0.5)^{J_i-2}
\gamma_{\pi \tau}^{r} = \sum_{i=1}^{43} ni I_i \pi^{I_i -1} J_i (\tau - 0.5)^{J_i-1}
----------------------------------------------
{^a} \gamma_{\pi}^{r} = [\partial \gamma^{r} / \partial \pi]_{\tau},
\gamma_{\pi \pi}^{r} = [\partial^{2} \gamma^{r} / \partial \pi^{2}]_{\tau},
\gamma_{\tau}^{r} = [\partial \gamma^{r} / \partial \tau]_{\pi},
\gamma_{\tau \tau}^{r} = [\partial^{2} \gamma^{r} / \partial \tau^{2}]_{\pi},
\gamma_{\pi \tau}^{r} = [\partial^{2} \gamma^{r} / {\partial \pi \partial \tau}]
page 17
Range of validity
Equation (15) covers region 2 of IAPWS-IF97 defined by the following range of temperature and pressure, see Fig. 1:
273.15 K \leq T \leq 623.15 K 0 \lt p \leq p_s(T)_{Eq.(30)}
623.15 K \lt T \leq 863.15 K 0 \lt p \leq p(T)_{Eq.(5)}
863.15 K \lt T \leq 1073.15 K 0 \lt p \leq 100 MPa
In addition to the properties in the stable single-phase vapor region, Eq. (15) also yields reasonable values in the metastable-vapor region for pressures above 10 MPa. Equation (15) is not valid in the metastable-vapor region at pressures p \leq 10 MPa; for this part of the metastable-vapor region see Section 6.2.
Note: For temperatures between 273.15 K and 273.16 K, the part of the range of validity between the pressures on the saturation-pressure line, Eq. (30), and on the sublimation line [10] corresponds to metastable states.
Computer-program verification
To assist the user in computer-program verification of Eq. (15), Table 15 contains test values of the most relevant properties.
Table 15. Thermodynamic property values calculated from Eq. (15) for selected values of T and p{^a}
T = 300 K, p = 0.0035 MPa T = 700 K, p = 0.0035 MPa T = 700 K, p = 30 MPa
v/(m^3 kg^{-1}) 0.394 913 866E+2 0.923 015 898E+2 0.542 946 619E-2
h/(kJ kg^{-1}) 0.254 991 145E+4 0.333 568 375E+4 0.263 149 474E+4
u/(kJ kg^{-1}) 0.241 169 160E+4 0.301 262 819E+4 0.246 861 076E+4
s/(kJ kg^{-1} K^{-1}) 0.852 238 967E+1 0.101 749 996E+2 0.517 540 298E+1
c_p /(kJ kg^{-1} K^{-1}) 0.191 300 162E+1 0.208 141 274E+1 0.103 505 092E+2
w/(m s^{-1}) 0.427 920 172E+3 0.644 289 068E+3 0.480 386 523E+3
{^a} It is recommended to verify programmed functions using 8 byte real values for all three combinations of T and p given in this table.
6.2 Supplementary Equation for the Metastable-Vapor Region
As for the basic equation, Eq. (15), the supplementary equation for a part of the metastable-vapor region bounding region 2 is given in the dimensionless form of the specific Gibbs free energy, \gamma = g / (RT), consisting of an ideal-gas part \gamma^{o} and a residual part \gamma^{r}, so that
g (p, T) / {RT} = \gamma (\pi ,\tau) = \gamma^{o} (\pi, \tau) + \gamma^{r} (\pi, \tau) , ...(18)
where \pi = p/p^{*} and \tau = T^{*}/T with R given by Eq. (1).
page 18
The equation for the ideal-gas part \gamma^{o} is identical with Eq. (16) except for the values of the two coefficients n_1^{o} and n_2^{o} , see Table 10. For the use of Eq. (16) as part of Eq. (18) the coefficients n1o and no2 were slightly readjusted to meet the high consistency requirement between Eqs. (18) and (15) regarding the properties h and s along the saturated vapor line; see below.
The equation for the residual part \gamma^{r} reads
\gamma^{r} = \sum_{i=1}^{13} n_i \pi^{I_i} (\tau - 0.5)^{J_i} , ...(19)
where \pi = p/p^{*} and \tau = T^{*}/T with p^{*} = 1 MPa and T^{*} = 540 K. The coefficients ni and exponents I_i and J_i of Eq. (19) are listed in Table 16.
Note: In the metastable-vapor region there are no experimental data to which an equation can be fitted. Thus, Eq. (18) is only based on input values extrapolated from the stable single-phase region 2. These extrapolations were performed with a special low-density gas equation [11] considered to be more suitable for such extrapolations into the metastable-vapor region than IAPWS-95 [3].
Table 16. Numerical values of the coefficients and exponents of the residual part \gamma^{r} of the dimensionless Gibbs free energy for the metastable-vapor region, Eq. (19)
i I_i J_i n_i
1 1 0 - 0.733 622 601 865 06E-2
2 1 2 - 0.882 238 319 431 46E-1
3 1 5 - 0.723 345 552 132 45E-1
4 1 11 - 0.408 131 785 344 55E-2
5 2 1 0.200 978 033 802 07E-2
6 2 7 - 0.530 459 218 986 42E-1
7 2 16 - 0.761 904 090 869 70E-2
8 3 4 - 0.634 980 376 573 13E-2
9 3 16 - 0.860 430 930 285 88E-1
10 4 7 0.753 215 815 227 70E-2
11 4 10 - 0.792 383 754 461 39E-2
12 5 9 - 0.228 881 607 784 47E-3
13 5 10 - 0.264 565 014 828 10E-2
All thermodynamic properties can be derived from Eq. (18) by using the appropriate combinations of the ideal-gas part \gamma^{o}, Eq. (16), and the residual part \gamma^{r}, Eq. (19), of the dimensionless Gibbs free energy and their derivatives. Relations between the relevant thermodynamic properties and \gamma^{o} and \gamma^{r} and their derivatives are summarized in Table 12.
page 19
All required derivatives of the ideal-gas part and of the residual part of the dimensionless Gibbs free energy are explicitly given in Table 13 and Table 17, respectively.
Table 17. The residual part \gamma^{r} of the dimensionless Gibbs free energy and its derivatives a according to Eq. (19)
\gamma^{r} = \sum_{i=1}^{13} n_i \pi^{I_i} (\tau - 0.5)^{J_i}
\gamma_{\pi}^{r} = \sum_{i=1}^{13} n_i I_i \pi^{I_i-1} (\tau - 0.5)^{J_i}
\gamma_{\pi \pi}^{r} = \sum_{i=1}^{13} n_i I_i (I_i-1) \pi^{I_i-2} (\tau - 0.5)^{J_i}
\gamma_{\tau}^{r} = \sum_{i=1}^{13} n_i \pi^{I_i} J_i (\tau - 0.5)^{J_i-1}
\gamma_{\tau \tau}^{r} = \sum_{i=1}^{13} n_i \pi^{I_i} J_i (J-1)(\tau - 0.5)^{J_i-2}
\gamma_{\pi \tau}^{r} = \sum_{i=1}^{13} n_i I_i \pi^{I_i -1} J_i (\tau - 0.5)^{J_i-1}
------------------------------------------------
{^a} \gamma_{\pi}^{r} = [\partial \gamma^{r} / \partial \pi]_{\tau},
\gamma_{\pi \pi}^{r} = [\partial^{2} \gamma^{r} / \partial \pi^{2}]_{\tau},
\gamma_{\tau}^{r} = [\partial \gamma^{r} / \partial \tau]_{\pi},
\gamma_{\tau \tau}^{r} = [\partial^{2} \gamma^{r} / \partial \tau^{2}]_{\pi},
\gamma_{\pi \tau}^{r} = [\partial^{2} \gamma^{r} /{\partial \pi \partial \tau}]
Range of validity
Equation (18) is valid in the metastable-vapor region from the saturated-vapor line to the 5 % equilibrium moisture line (determined from the equilibrium h′ and h′′ values calculated at the given pressure) for pressures from the triple-point pressure, see Eq. (9), up to 10 MPa.
Consistency with the basic equation
The consistency of Eq. (18) with the basic equation, Eq. (15), along the saturated vapor line is characterized by the following maximum inconsistencies regarding the properties v, h, cp, s, g, and w:
|\Delta v|max = 0.014 % |\Delta h|max = 0.043 kJ kg^{-1}
|\Delta c_p|max = 0.78 % |\Delta s|max = 0.082 J kg^{-1} K^{-1}
|\Delta g|max = 0.023 kJ kg^{-1} |\Delta w|max = 0.051 % .
These maximum inconsistencies are clearly smaller than the consistency requirements on region boundaries corresponding to the so-called Prague values [13], which are given in Section 10.
page 20
Along the 10 MPa isobar in the metastable-vapor region, the transition between Eq. (18) and Eq. (15) is not smooth, which is however, not of importance for practical calculations.
Computer-program verification
To assist the user in computer-program verification of Eq. (18), Table 18 contains test values of the most relevant properties.
Table 18. Thermodynamic property values calculated from Eq. (18) for selected values of T and pa
T = 450 K, p = 1 MPa T = 440 K, p = 1 MPa T = 450 K, p = 1.5 MPa
v/(m^3 kg^{-1}) 0.192 516 540 0.186 212 297 0.121 685 206
h/(kJ kg^{-1}) 0.276 881 115E+4 0.274 015 123E+4 0.272 134 539E+4
u/(kJ kg^{-1}) 0.257 629 461E+4 0.255 393 894E+4 0.253 881 758E+4
s/(kJ kg^{-1} K^{-1}) 0.656 660 377E+1 0.650 218 759E+1 0.629 170 440E+1
c_p /(kJ kg^{-1} K^{-1}) 0.276 349 265E+1 0.298 166 443E+1 0.362 795 578E+1
w/(m s^{-1}) 0.498 408 101E+3 0.489 363 295E+3 0.481 941 819E+3
{^a} It is recommended to verify programmed functions using 8 byte real values for all three combinations of T and p given in this table.
6.3 Backward Equations
For the calculation of properties as function of p, h or of p, s without any iteration, the two backward equations require extremely good numerical consistency with the basic equation. The exact requirements for these numerical consistencies were obtained from comprehensive test calculations for several characteristic power cycles. The result of these investigations, namely the assignment of the tolerable numerical inconsistencies between the basic equation, Eq. (15), and the corresponding backward equations, is given in Tables 23 and 28, respectively.
Region 2 is covered by three T(p, h) and three T( p, s) equations. Figure 2 shows the way in which region 2 is divided into three subregions for the backward equations. The boundary between the subregions 2a and 2b is the isobar p = 4 MPa; the boundary between the subregions 2b and 2c corresponds to the entropy line s = 5.85 kJ kg^{-1} K^{-1}.
page 21
Fig. 2. Division of region 2 of IAPWS-IF97 into the three subregions 2a, 2b, and 2c for the backward equations T(p,h) and T(p,s).
In order to know whether the T(p,h) equation for subregion 2b or for subregion 2c has to be used for given values of p and h, a special correlation equation for the boundary between subregions 2b and 2c (which approximates s = 5.85 kJ kg^{-1} K^{-1}) is needed; see Fig. 2. This boundary equation, called the B2bc-equation, is a simple quadratic pressure-enthalpy relation which reads
\pi = n_1 + n_2 \eta + n_3 \eta^{2} , ...(20)
where \pi = p/p^{*} and \eta = h/h^{*} with p^{*} = 1 MPa and h^{*} = 1 kJ kg^{-1}. The coefficients n1 to n3 of Eq. (20) are listed in Table 19. Based on its simple form, Eq. (20) does not describe exactly the isentropic line s = 5.85 kJ kg^{-1} K^{-1}; the entropy values corresponding to this p-h relation are between s = 5.81 kJ kg^{-1} K^{-1} and s = 5.85 kJ kg^{-1} K^{-1}. The enthalpy-explicit form of Eq. (20) is as follows:
\eta = n_4 + [(\pi - n_5) / n_3]^{1/2} , ...(21)
with \pi and \eta according to Eq. (20) and the coefficients n3 to n5 listed in Table 19. Equations
(20)and (21) give the boundary line between subregions 2b and 2c from the saturation state at T = 554.485 K and ps = 6.546 70 MPa to T = 1019.32 K and p = 100 MPa.
For the backward equations T( p,s) the boundary between subregions 2b and 2c is, based on the value s = 5.85 kJ kg^{-1} K^{-1} along this boundary, automatically defined for given values of p and s.
page 22
Table 19. Numerical values of the coefficients of the B2bc-equation, Eqs. (20) and (21), for defining the boundary between subregions 2b and 2c with respect to T(p,h) calculations
i n_i i n_i
1 0.905 842 785 147 23E+3 4 0.265 265 719 084 28E+4
2 - 0.679 557 863 992 41 5 0.452 575 789 059 48E+1
3 0.128 090 027 301 36E-3
For computer-program verification, Eqs. (20) and (21) must meet the following p-h point: p = 0.100 000 000E+3 MPa , h = 0.351 600 432 3E+4 kJ kg^{-1}.
6.3.1 The Backward Equations T(p, h) for Subregions 2a, 2b, and 2c
The backward equation T(p,h) for subregion 2a in its dimensionless form reads
T_{2a} (p, h)/{T^{*}} = \theta_{2a} (\pi, \eta) = \sum_{i=1}^{34} n_i \pi^{I_i} (\eta - 2.1)^{J_i}, ...(22)
where \theta = T/T^{*} , \pi = p/p^{*}, and \eta = h/h^{*} with T^{*} = 1 K , p^{*} = 1 MPa, and h^{*} = 2000 kJ kg^{-1}. The coefficients ni and exponents I_i and J_i of Eq. (22) are listed in Table 20.
Table 20. Numerical values of the coefficients and exponents of the backward equation T ( p,h ) for subregion 2a, Eq. (22)
i I_i J_i n_i i I_i J_i n_i
1 0 0 0.108 989 523 182 88E+4 18 2 7 0.116 708 730 771 07E+2
2 0 1 0.849 516 544 955 35E+3 19 2 36 0.128 127 984 040 46E+9
3 0 2 - 0.107 817 480 918 26E+3 20 2 38 - 0.985 549 096 232 76E+9
4 0 3 0.331 536 548 012 63E+2 21 2 40 0.282 245 469 730 02E+10
5 0 7 - 0.742 320 167 902 48E+1 22 2 42 - 0.359 489 714 107 03E+10
6 0 20 0.117 650 487 243 56E+2 23 2 44 0.172 273 499 131 97E+10
7 1 0 0.184 457 493 557 90E+1 24 3 24 - 0.135 513 342 407 75E+5
8 1 1 - 0.417 927 005 496 24E+1 25 3 44 0.128 487 346 646 50E+8
9 1 2 0.624 781 969 358 12E+1 26 4 12 0.138 657 242 832 26E+1
10 1 3 - 0.173 445 631 081 14E+2 27 4 32 0.235 988 325 565 14E+6
11 1 7 - 0.200 581 768 620 96E+3 28 4 44 - 0.131 052 365 450 54E+8
12 1 9 0.271 960 654 737 96E+3 29 5 32 0.739 998 354 747 66E+4
13 1 11 - 0.455 113 182 858 18E+3 30 5 36 - 0.551 966 970 300 60E+6
14 1 18 0.309 196 886 047 55E+4 31 5 42 0.371 540 859 962 33E+7
15 1 44 0.252 266 403 578 72E+6 32 6 34 0.191 277 292 396 60E+5
16 2 0 - 0.617 074 228 683 39E-2 33 6 44 - 0.415 351 648 356 34E+6
17 2 2 - 0.310 780 466 295 83 34 7 28 - 0.624 598 551 925 07E+2
page 23
The backward equation T(p,h) for subregion 2b in its dimensionless form reads
T_{2b} (p, h) / T^{*} = \theta_{2b} (\pi ,\eta) = \sum_{i=1}^{38} n_i (\pi - 2)^{I_i} (\eta - 2.6)^{J_i}, ...(23)
where \theta = T/T^{*}, \pi = p/p^{*}, and \eta = h/h^{*} with T^{*} = 1 K , p^{*} = 1 MPa, and h^{*} = 2000 kJ kg^{-1}. The coefficients ni and exponents I_i and J_i of Eq. (23) are listed in Table 21.
Table 21. Numerical values of the coefficients and exponents of the backward equation T ( p,h ) for subregion 2b, Eq. (23)
i I_i J_i ni i I_i J_i ni
1 0 0 0.148 950 410 795 16E+4 20 2 40 0.712 803 519 595 51E-4
2 0 1 0.743 077 983 140 34E+3 21 3 1 0.110 328 317 899 99E-3
3 0 2 - 0.977 083 187 978 37E+2 22 3 2 0.189 552 483 879 02E-3
4 0 12 0.247 424 647 056 74E+1 23 3 12 0.308 915 411 605 37E-2
5 0 18 - 0.632 813 200 160 26 24 3 24 0.135 555 045 549 49E-2
6 0 24 0.113 859 521 296 58E+1 25 4 2 0.286 402 374 774 56E-6
7 0 28 - 0.478 118 636 486 25 26 4 12 - 0.107 798 573 575 12E-4
8 0 40 0.852 081 234 315 44E-2 27 4 18 - 0.764 627 124 548 14E-4
9 1 0 0.937 471 473 779 32 28 4 24 0.140 523 928 183 16E-4
10 1 2 0.335 931 186 049 16E+1 29 4 28 - 0.310 838 143 314 34E-4
11 1 6 0.338 093 556 014 54E+1 30 4 40 - 0.103 027 382 121 03E-5
12 1 12 0.168 445 396 719 04 31 5 18 0.282 172 816 350 40E-6
13 1 18 0.738 757 452 366 95 32 5 24 0.127 049 022 719 45E-5
14 1 24 - 0.471 287 374 361 86 33 5 40 0.738 033 534 682 92E-7
15 1 28 0.150 202 731 397 07 34 6 28 - 0.110 301 392 389 09E-7
16 1 40 - 0.217 641 142 197 50E-2 35 7 2 - 0.814 563 652 078 33E-13
17 2 2 - 0.218 107 553 247 61E-1 36 7 28 - 0.251 805 456 829 62E-10
18 2 8 - 0.108 297 844 036 77 37 9 1 - 0.175 652 339 694 07E-17
19 2 18 - 0.463 333 246 358 12E-1 38 9 40 0.869 341 563 441 63E-14
The backward equation T(p,h) for subregion 2c in its dimensionless form reads
T_{2c} (p, h) / T^{*} = \theta_{2c} (\pi, \eta) = \sum_{i=1}^{23} n_i (\pi + 25)^{I_i} (\eta - 1.8)^{J_i} , ...(24)
where \theta = T/T^{*}, \pi = p/p^{*}, and \eta = h/h^{*} with T^{*} = 1 K , p^{*} = 1 MPa, and h^{*} = 2000 kJ kg^{-1}. The coefficients ni and exponents I_i and J_i of Eq. (24) are listed in Table 22.
page 24
Table 22. Numerical values of the coefficients and exponents of the backward equation T ( p,h ) for subregion 2c, Eq. (24)
i I_i J_i n_i
1 -7 0 - 0.323 683 985 552 42E+13
2 -7 4 0.732 633 509 021 81E+13
3 -6 0 0.358 250 899 454 47E+12
4 -6 2 - 0.583 401 318 515 90E+12
5 -5 0 - 0.107 830 682 174 70E+11
6 -5 2 0.208 255 445 631 71E+11
7 -2 0 0.610 747 835 645 16E+6
8 -2 1 0.859 777 225 355 80E+6
9 -1 0 - 0.257 457 236 041 70E+5
10 -1 2 0.310 810 884 227 14E+5
11 0 0 0.120 823 158 659 36E+4
12 0 1 0.482 197 551 092 55E+3
13 1 4 0.379 660 012 724 86E+1
14 1 8 - 0.108 429 848 800 77E+2
15 2 4 - 0.453 641 726 766 60E-1
16 6 0 0.145 591 156 586 98E-12
17 6 1 0.112 615 974 072 30E-11
18 6 4 - 0.178 049 822 406 86E-10
19 6 10 0.123 245 796 908 32E-6
20 6 12 - 0.116 069 211 309 84E-5
21 6 16 0.278 463 670 885 54E-4
22 6 20 - 0.592 700 384 741 76E-3
23 6 22 0.129 185 829 918 78E-2
Range of validity
Equations (22), (23), and (24) are only valid in the respective subregion 2a, 2b, and 2c which do not include the metastable-vapor region. The boundaries between these subregions are defined at the beginning of Section 6.3; the lowest pressure for which Eq. (22) is valid amounts to 611.2127 Pa corresponding to the saturation pressure at 273.15 K calculated from Eq. (30).
Numerical consistency with the basic equation
For ten million random pairs of p and h covering each of the subregions 2a, 2b, and 2c, the differences T between temperatures calculated from Eqs. (22) to (24), respectively, and from Eq. (15) were determined. The corresponding maximum and root-mean-square differences are
page 25
listed in Table 23 together with the tolerated differences according to the numerical consistency requirements with respect to Eq. (15).
Table 23. Maximum differences |\Delta T|_{max} and root-mean-square differences \Delta T_{RMS} between temperatures calculated from Eqs. (22) to (24), and from Eq. (15) in comparison with the tolerated differences |\Delta T|_{tol}
Subregion Equation |\Delta T|_{tol}/mK |\Delta T|_{max}/mK \Delta T_{RMS}/mK
2a 22 10 9.3 2.9
2b 23 10 9.6 3.9
2c 24 25 23.7 10.4
Computer-program verification
To assist the user in computer-program verification of Eqs. (22) to (24), Table 24 contains the corresponding test values.
Table 24. Temperature values calculated from Eqs. (22) to (24) for selected values of p and h{^a}
Equation p / MPa h/(kJ kg^{-1}) T / K
0.001 3000 0.534 433 241E+3
22 3 3000 0.575 373 370E+3
3 4000 0.101 077 577E+4
5 3500 0.801 299 102E+3
23 5 4000 0.101 531 583E+4
25 3500 0.875 279 054E+3
40 2700 0.743 056 411E+3
24 60 2700 0.791 137 067E+3
60 3200 0.882 756 860E+3
{^a} It is recommended to verify the programmed equations using 8 byte real values for all three combinations of p and h given in this table for each of the equations.
6.3.2 The Backward Equations T( p, s) for Subregions 2a, 2b, and 2c
The backward equation T(p,s) for subregion 2a in its dimensionless form reads
T_{2a} (p, s) / T^{*} = \theta_{2a} (\pi ,\sigma) = \sum_{i=1}^{46} n_i \pi^{I_i} (\sigma - 2)^{J_i} , ...(25)
where \theta = T/T^{*}, \pi = p/p^{*}, and \sigma = s/s^{*} with T^{*} = 1 K , p^{*} = 1 MPa, and s^{*} = 2 kJ kg^{-1} K^{-1}. The coefficients ni and exponents I_i and J_i of Eq. (25) are listed in Table 25.
page 26
Table 25. Numerical values of the coefficients and exponents of the backward equation T( p,s ) for subregion 2a, Eq. (25)
i I_i J_i n_i i I_i J_i n_i
1 -1.5 -24 - 0.392 359 838 619 84E+6 24 -0.25 -11 - 0.597 806 388 727 18E+4
2 -1.5 -23 0.515 265 738 272 70E+6 25 -0.25 -6 - 0.704 014 639 268 62E+3
3 -1.5 -19 0.404 824 431 610 48E+5 26 0.25 1 0.338 367 841 075 53E+3
4 -1.5 -13 - 0.321 937 909 239 02E+3 27 0.25 4 0.208 627 866 351 87E+2
5 -1.5 -11 0.969 614 242 186 94E+2 28 0.25 8 0.338 341 726 561 96E-1
6 -1.5 -10 - 0.228 678 463 717 73E+2 29 0.25 11 - 0.431 244 284 148 93E-4
7 -1.25 -19 - 0.449 429 141 243 57E+6 30 0.5 0 0.166 537 913 564 12E+3
8 -1.25 -15 - 0.501 183 360 201 66E+4 31 0.5 1 - 0.139 862 920 558 98E+3
9 -1.25 -6 0.356 844 635 600 15 32 0.5 5 - 0.788 495 479 998 72
10 -1.0 -26 0.442 353 358 481 90E+5 33 0.5 6 0.721 324 117 538 72E-1
11 -1.0 -21 - 0.136 733 888 117 08E+5 34 0.5 10 - 0.597 548 393 982 83E-2
12 -1.0 -17 0.421 632 602 078 64E+6 35 0.5 14 - 0.121 413 589 539 04E-4
13 -1.0 -16 0.225 169 258 374 75E+5 36 0.5 16 0.232 270 967 338 71E-6
14 -1.0 -9 0.474 421 448 656 46E+3 37 0.75 0 - 0.105 384 635 661 94E+2
15 -1.0 -8 - 0.149 311 307 976 47E+3 38 0.75 4 0.207 189 254 965 02E+1
16 -0.75 -15 - 0.197 811 263 204 52E+6 39 0.75 9 - 0.721 931 552 604 27E-1
17 -0.75 -14 - 0.235 543 994 707 60E+5 40 0.75 17 0.207 498 870 811 20E-6
18 -0.5 -26 - 0.190 706 163 020 76E+5 41 1.0 7 - 0.183 406 579 113 79E-1
19 -0.5 -13 0.553 756 698 831 64E+5 42 1.0 18 0.290 362 723 486 96E-6
20 -0.5 -9 0.382 936 914 373 63E+4 43 1.25 3 0.210 375 278 936 19
21 -0.5 -7 - 0.603 918 605 805 67E+3 44 1.25 15 0.256 812 397 299 99E-3
22 -0.25 -27 0.193 631 026 203 31E+4 45 1.5 5 - 0.127 990 029 337 81E-1
23 -0.25 -25 0.426 606 436 986 10E+4 46 1.5 18 - 0.821 981 026 520 18E-5
The backward equation T(p,s) for subregion 2b in its dimensionless form reads
T_{2b} (p, s) / T^{*} = \theta_{2b} (\pi ,\sigma) = \sum_{i=1}^{44} n_i \pi^{I_i} (10 - \sigma)^{J_i} , ...(26)
where \theta = T/T^{*}, \pi = p/p^{*}, and \sigma = s/s^{*} with T^{*} = 1 K , p^{*} = 1 MPa, and s^{*} = 0.7853 kJ kg^{-1} K^{-1}. The coefficients ni and exponents I_i and J_i of Eq. (26) are listed in Table 26.
page 27
Table 26. Numerical values of the coefficients and exponents of the backward equation T( p,s ) for subregion 2b, Eq. (26)
i I_i J_i n_i i I_i J_i n_i
1 -6 0 0.316 876 650 834 97E+6 23 0 2 0.417 273 471 596 10E+2
2 -6 11 0.208 641 758 818 58E+2 24 0 4 0.219 325 494 345 32E+1
3 -5 0 - 0.398 593 998 035 99E+6 25 0 5 - 0.103 200 500 090 77E+1
4 -5 11 - 0.218 160 585 188 77E+2 26 0 6 0.358 829 435 167 03
5 -4 0 0.223 697 851 942 42E+6 27 0 9 0.525 114 537 260 66E-2
6 -4 1 - 0.278 417 034 458 17E+4 28 1 0 0.128 389 164 507 05E+2
7 -4 11 0.992 074 360 714 80E+1 29 1 1 - 0.286 424 372 193 81E+1
8 -3 0 - 0.751 975 122 991 57E+5 30 1 2 0.569 126 836 648 55
9 -3 1 0.297 086 059 511 58E+4 31 1 3 - 0.999 629 545 849 31E-1
10 -3 11 - 0.344 068 785 485 26E+1 32 1 7 - 0.326 320 377 784 59E-2
11 -3 12 0.388 155 642 491 15 33 1 8 0.233 209 225 767 23E-3
12 -2 0 0.175 112 950 857 50E+5 34 2 0 - 0.153 348 098 574 50
13 -2 1 - 0.142 371 128 544 49E+4 35 2 1 0.290 722 882 399 02E-1
14 -2 6 0.109 438 033 641 67E+1 36 2 5 0.375 347 027 411 67E-3
15 -2 10 0.899 716 193 084 95 37 3 0 0.172 966 917 024 11E-2
16 -1 0 - 0.337 597 400 989 58E+4 38 3 1 - 0.385 560 508 445 04E-3
17 -1 1 0.471 628 858 183 55E+3 39 3 3 - 0.350 177 122 926 08E-4
18 -1 5 - 0.191 882 419 936 79E+1 40 4 0 - 0.145 663 936 314 92E-4
19 -1 8 0.410 785 804 921 96 41 4 1 0.564 208 572 672 69E-5
20 -1 9 - 0.334 653 781 720 97 42 5 0 0.412 861 500 746 05E-7
21 0 0 0.138 700 347 775 05E+4 43 5 1 - 0.206 846 711 188 24E-7
22 0 1 - 0.406 633 261 958 38E+3 44 5 2 0.164 093 936 747 25E-8
The backward equation T(p,s) for subregion 2c in its dimensionless form reads
T_{2c} (p, s) / T^{*} = \theta_{2c} (\pi ,\sigma) = \sum_{i=1}^{30} n \pi^{I_i} (2 - \sigma )^{J_i} , ...(27)
where \theta = T/T^{*}, \pi = p/p^{*}, and \sigma = s/s^{*} with T^{*} = 1 K , p^{*} = 1 MPa, and s^{*} = 2.9251 kJ kg^{-1} K^{-1}. The coefficients ni and exponents I_i and J_i of Eq. (27) are listed in Table 27.
page 28
Table 27. Numerical values of the coefficient s and exponents of the backward equation T( p,s ) for subregion 2c, Eq. (27)\
i I_i J_i n_i i I_i J_i n_i
1 -2 0 0.909 685 010 053 65E+3 16 3 1 - 0.145 970 082 847 53E-1
2 -2 1 0.240 456 670 884 20E+4 17 3 5 0.566 311 756 310 27E-2
3 -1 0 - 0.591 623 263 871 30E+3 18 4 0 - 0.761 558 645 845 77E-4
4 0 0 0.541 454 041 280 74E+3 19 4 1 0.224 403 429 193 32E-3
5 0 1 - 0.270 983 084 111 92E+3 20 4 4 - 0.125 610 950 134 13E-4
6 0 2 0.979 765 250 979 26E+3 21 5 0 0.633 231 326 609 34E-6
7 0 3 - 0.469 667 729 594 35E+3 22 5 1 - 0.205 419 896 753 75E-5
8 1 0 0.143 992 746 047 23E+2 23 5 2 0.364 053 703 900 82E-7
9 1 1 - 0.191 042 042 304 29E+2 24 6 0 - 0.297 598 977 892 15E-8
10 1 3 0.532 991 671 119 71E+1 25 6 1 0.101 366 185 297 63E-7
11 1 4 - 0.212 529 753 759 34E+2 26 7 0 0.599 257 196 923 51E-11
12 2 0 - 0.311 473 344 137 60 27 7 1 - 0.206 778 701 051 64E-10
13 2 1 0.603 348 408 946 23 28 7 3 - 0.208 742 781 818 86E-10
14 2 2 - 0.427 648 397 025 09E-1 29 7 4 0.101 621 668 250 89E-9
15 3 0 0.581 855 972 552 59E-2 30 7 5 - 0.164 298 282 813 47E-9
Range of validity
Equations (25), (26), and (27) are only valid in the respective subregion 2a, 2b, and 2c which do not include the metastable-vapor region. The boundaries between these subregions are defined at the beginning of Section 6.3; the lowest pressure for which Eq. (25) is valid amounts to 611.153 Pa corresponding to the sublimation pressure [10] at 273.15 K.
Numerical consistency with the basic equation
For ten million random pairs of p and s covering each of the subregions 2a, 2b, and 2c, the differences T between temperatures calculated from Eqs. (25) to (27), respectively, and from Eq. (15) were determined. The corresponding maximum and root-mean-square differences are listed in Table 28 together with the tolerated differences according to the numerical consistency requirements with respect to Eq. (15).
page 29
Table 28. Maximum differences |\Delta T|_{max} and root-mean-square differences \Delta T_{RMS} between temperatures calculated from Eqs. (25) to (27), and from Eq. (15) in comparison with the tolerated differences |\Delta T|_{tol}
Subregion Equation |\Delta T|_{tol}/mK |\Delta T|_{max}/mK \Delta T_{RMS} /mK
2a 25 10 8.8 1.2
2b 26 10 6.5 2.8
2c 27 25 19.0 8.3
Computer-program verification
To assist the user in computer-program verification of Eqs. (25) to (27), Table 29 contains the corresponding test values.
Table 29. Temperature values calculated from Eqs. (25) to (27) for selected values of p and s{^a}
Equation p / MPa s/(kJ kg^{-1} K^{-1}) T / K
0.1 7.5 0.399 517 097E+3
25 0.1 8 0.514 127 081E+3
2.5 8 0.103 984 917E+4
8 6 0.600 484 040E+3
26 8 7.5 0.106 495 556E+4
90 6 0.103 801 126E+4
20 5.75 0.697 992 849E+3
27 80 5.25 0.854 011 484E+3
80 5.75 0.949 017 998E+3
{^a} It is recommended to verify the programmed equations using 8 byte real values for all three combinations of p and s given in this table for each of the equations.
7 Basic Equation for Region 3
This section contains all details relevant for the use of the basic equation of region 3 of IAPWS-IF97. Information about the consistency of the basic equation of this region with the basic equations of regions 1, 2, and 4 along the corresponding region boundaries is summarized in Section 10. The auxiliary equation for defining the boundary between regions 2 and 3 is given in Section 4. Section 11 contains the results of computing-time
page 30
comparisons between IAPWS-IF97 and IFC-67. The estimates of uncertainty of the most relevant properties can be found in Section 12.
The basic equation for this region is a fundamental equation for the specific Helmholtz free energy f. This equation is expressed in dimensionless form, \varphi = f / (RT) , and reads
f (\rho, T) / {RT} = \varphi (\Delta , \tau) = n_1 ln \Delta + \sum_{i=2}^{40} n_i \Delta ^{I_i} \tau^{J_i} , ...(28)
where \Delta = \rho /\rho*, \tau = T^{*}/T with \rho* = \rhoc, T^{*} = Tc and R, Tc, and \rhoc given by Eqs. (1), (2), and (4). The coefficients ni and exponents I_i and J_i of Eq. (28) are listed in Table 30.
In addition to representing the thermodynamic properties in the single-phase region, Eq. (28) meets the phase-equilibrium condition (equality of specific Gibbs free energy for coexisting vapor + liquid states; see Table 31) along the saturation line for T ≥ 623.15 K to T_c. Moreover, Eq. (28) reproduces exactly the critical parameters according to Eqs. (2) to (4) and yields zero for the first two pressure derivatives with respect to density at the critical point.
Table 30. Numerical values of the coefficients and exponents of the dimensionless Helmholtz free energy for region 3, Eq. (28)
i I_i J_i n_i i I_i J_i n_i
1 - - 0.106 580 700 285 13E+1 21 3 4 - 0.201 899 150 235 70E+1
2 0 0 - 0.157 328 452 902 39E+2 22 3 16 - 0.821 476 371 739 63E-2
3 0 1 0.209 443 969 743 07E+2 23 3 26 - 0.475 960 357 349 23
4 0 2 - 0.768 677 078 787 16E+1 24 4 0 0.439 840 744 735 00E-1
5 0 7 0.261 859 477 879 54E+1 25 4 2 - 0.444 764 354 287 39
6 0 10 - 0.280 807 811 486 20E+1 26 4 4 0.905 720 707 197 33
7 0 12 0.120 533 696 965 17E+1 27 4 26 0.705 224 500 879 67
8 0 23 - 0.845 668 128 125 02E-2 28 5 1 0.107 705 126 263 32
9 1 2 - 0.126 543 154 777 14E+1 29 5 3 - 0.329 136 232 589 54
10 1 6 - 0.115 244 078 066 81E+1 30 5 26 - 0.508 710 620 411 58
11 1 15 0.885 210 439 843 18 31 6 0 - 0.221 754 008 730 96E-1
12 1 17 - 0.642 077 651 816 07 32 6 2 0.942 607 516 650 92E-1
13 2 0 0.384 934 601 866 71 33 6 26 0.164 362 784 479 61
14 2 2 - 0.852 147 088 242 06 34 7 2 - 0.135 033 722 413 48E-1
15 2 6 0.489 722 815 418 77E+1 35 8 26 - 0.148 343 453 524 72E-1
16 2 7 - 0.305 026 172 569 65E+1 36 9 2 0.579 229 536 280 84E-3
17 2 22 0.394 205 368 791 54E-1 37 9 26 0.323 089 047 037 11E-2
18 2 26 0.125 584 084 243 08 38 10 0 0.809 648 029 962 15E-4
19 3 0 - 0.279 993 296 987 10 39 10 1 - 0.165 576 797 950 37E-3
20 3 2 0.138 997 995 694 60E+1 40 11 26 - 0.449 238 990 618 15E-4
All thermodynamic properties can be derived from Eq. (28) by using the appropriate combinations of the dimensionless Helmholtz free energy and its derivatives. Relations
page 31
between the relevant thermodynamic properties and \varphi and its derivatives are summarized in Table 31. All required derivatives of the dimensionless Helmholtz free energy are explicitly given in Table 32.
Table 31. Relations of thermodynamic properties to the dimensionless Helmholtz free energy \varphi and its derivatives a when using Eq. (28)
Property Relation
Pressure
p = \rho^{2} (\partial f / \partial \rho)_{T} p (\Delta , \tau) / {\rho RT}= \Delta \varphi_{\Delta }
Specific internal energy
u = f - T (\partial f / \partial T)_{\rho} u (\Delta , \tau) / {RT} = \tau\varphi_{\tau}
Specific entropy
s = - (\partial f / \partial T)_{\rho} s (\Delta , \tau) / {R} = \tau \varphi_{\tau} - \varphi
Specific enthalpy
h = f - T (\partial f / \partial T)_{\rho} + \rho (\partial f / \partial \rho)_{T} h (\Delta , \tau) / {RT} = \tau \varphi_{\tau} + \Delta \varphi_{\Delta }
Specific isochoric heat capacity
c_v = (\partial u / \partial T)_{\rho} c_v (\Delta , \tau) / {R} = -\tau^{2} \varphi_{\tau \tau}
Specific isobaric heat capacity
c_p = (\partial h / \partial T)_{p} c_p (\Delta , \tau) / {R} = -\tau^{2} \varphi_{\tau \tau} + {(\Delta \varphi_{\Delta } - \Delta \tau \varphi_{\Delta \tau})^{2}} / {2 \Delta \varphi_{\Delta } + \Delta ^{2} \varphi_{\Delta \Delta }}
Speed of sound
w = (\partial p / \partial \rho)_{s}^{1/2} w^{2} (\Delta , \tau) / {RT} = 2 \Delta \varphi_{\Delta } + \Delta ^{2} \varphi_{\Delta \Delta } -{{(\Delta \varphi_{\Delta } - \Delta \tau \varphi_{\Delta \tau})^{2}} / {\tau^{2} \varphi_{\tau \tau}}}
Phase-equilibrium condition
(Maxwell criterion) p_{s} / {RT \rho^{′}} = \Delta ^{′} \varphi_{\Delta } (\Delta ^{′}, \tau) ;
p_{s} / {RT \rho^{''}} = \Delta ^{''} \varphi_{\Delta } (\Delta ^{''}, \tau)
p_{s} / {RT}({1/\rho_{′′}} - {1/\rho_{′}}) = \varphi(\Delta ^{′}, \tau) - \varphi(\Delta ^{''}, \tau)
{^a} \varphi_{\Delta } = [\partial \varphi / \partial \Delta ]_{\tau},
\varphi_{\Delta \Delta } = [\partial^{2} \varphi / \partial \Delta ^{2}]_{\tau},
\varphi_{\tau} = [\partial \varphi / \partial \tau]_{\Delta },
\varphi_{\tau \tau} = [\partial^{2} \varphi / \partial \tau^{2}]_{\Delta },
\varphi_{\Delta \tau} = [\partial^{2} \varphi / {\partial \Delta \partial \tau}]
page 32
Table 32. The dimensionless Helmholtz free energy equation and its derivatives a according to Eq. (28)
\varphi = n_1 ln \Delta + \sum_{i=2}^{40} n_i \Delta ^{I_i} \tau^{J_i}
\varphi_{\Delta } = n_1 / \Delta + \sum_{i=2}^{40} n_i I_i \Delta ^{I_i-1} \tau^{J_i}
\varphi_{\Delta \Delta } = -n / \Delta ^{2} + \sum_{i=2}^{40} n_i I_i(I_i-1) \Delta ^{I_i-2} \tau^{J_i}
\varphi_{\tau} = 0 + \sum_{i=2}^{40} n_i \Delta ^{I_i} J_i \tau^{J_i-1}
\varphi_{\tau \tau} = 0 + \sum_{i=2}^{40} n_i \Delta ^{I_i} J_i(J-1) \tau^{J_i-2}
\varphi_{\Delta \tau} = 0 + \sum_{i=2}^{40} n_i I_i \Delta ^{I_i-1} J_i \tau^{J_i-1}
{^a} \varphi_{\Delta } = [\partial \varphi / \partial \Delta ]_{\tau},
\varphi_{\Delta \Delta } = [\partial^{2} \varphi / \partial \Delta ^{2}]_{\tau},
\varphi_{\tau} = [\partial \varphi / \partial \tau]_{\Delta },
\varphi_{\tau \tau} = [\partial^{2} \varphi / \partial \tau^{2}]_{\Delta },
\varphi_{\Delta \tau} = [\partial^{2} \varphi / {\partial \Delta \partial \tau}]
Range of validity
Equation (28) covers region 3 of IAPWS-IF97 defined by the following range of temperature and pressure, see Fig. 1:
623.15 K \leq T \leq T(p)_{Eq.(6)} p(T)_{Eq.(5)} \leq p \leq 100 MPa .
In addition to the properties in the stable single-phase region defined above, Eq. (28) also yields reasonable values in the metastable regions (superheated liquid and subcooled steam) close to the saturated liquid and saturated vapor line.
Computer-program verification
To assist the user in computer-program verification of Eq. (28), Table 33 contains test values of the most relevant properties.
Table 33. Thermodynamic property values calculated from Eq. (28) for selected values of T and \rho{^a}
T = 650 K, \rho = 500 kg m^{-3} T = 650 K, \rho = 200 kg m^{-3} T = 750 K, \rho = 500 kg m^{-3}
p/MPa 0.255 837 018E+2 0.222 930 643E+2 0.783 095 639E+2
h/(kJ kg^{-1}) 0.186 343 019E+4 0.237 512 401E+4 0.225 868 845E+4
u/(kJ kg^{-1}) 0.181 226 279E+4 0.226 365 868E+4 0.210 206 932E+4
s/(kJ kg^{-1} K^{-1}) 0.405 427 273E+1 0.485 438 792E+1 0.446 971 906E+1
c_p /(kJ kg^{-1} K^{-1}) 0.138 935 717E+2 0.446 579 342E+2 0.634 165 359E+1
w/(m s^{-1}) 0.502 005 554E+3 0.383 444 594E+3 0.760 696 041E+3
{^a} It is recommended to verify programmed functions using 8 byte real values for all three combinations of T and \rho given in this table.
page 33
8 Equations for Region 4
This section contains all details relevant for the use of the equations for region 4 of IAPWS-IF97 (saturation line). Information about the consistency of the basic equation for this region, the saturation-pressure equation, and the basic equations of regions 1 to 3 at the corresponding region boundaries is summarized in Section 10. The results of computing-time comparisons between IAPWS-IF97 and IFC-67 are given in Section 11. The estimates of uncertainty of the saturation pressure can be found in Section 12.
The equation for describing the saturation line is an implicit quadratic equation which can be directly solved with regard to both saturation pressure ps and saturation temperature Ts.
This equation reads
\beta^{2} \vartheta^{2} + n_1 \beta^{2} \vartheta + n_2 \beta^{2} + n_3 \beta \vartheta^{2} + n_4 \beta \vartheta + n_5 \beta + n_6 \vartheta^{2} + n_7 \vartheta + n_8 = 0 , ...(29)
where \beta = (p_s / p^{*})^{1/4} ...(29a)
and \vartheta = {T_s / T^{*}} + {n_{9} / {(T_s / T^{*}) - n_{10}}} ...(29b)
with p^{*} = 1 MPa and T^{*} = 1 K; for the coefficients n1 to n10 see Table 34.
8.1 The Saturation-Pressure Equation (Basic Equation)
The solution of Eq. (29) with regard to saturation pressure is as follows:
p_s / p^{*}= [{2 C} / {-B + (B^{2} - 4 AC)^{1/2}}]^{4} ...(30)
where p^{*} = 1 MPa and
A = \vartheta^{2} + n_1 \vartheta + n_2
B = n_3 \vartheta^{2} + n_4 \vartheta + n_5
C = n_6 \vartheta^{2} + n_7 \vartheta + n_8
with \vartheta according to Eq. (29b). The coefficients ni of Eq. (30) are listed in Table 34.
page 34
Table 34. Numerical values of the coefficients of the dimensionless saturation equations, Eqs. (29) to (31)
i ni i ni
1 0.116 705 214 527 67E+4 6 0.149 151 086 135 30E+2
2 - 0.724 213 167 032 06E+6 7 - 0.482 326 573 615 91E+4
3 - 0.170 738 469 400 92E+2 8 0.405 113 405 420 57E+6
4 0.120 208 247 024 70E+5 9 - 0.238 555 575 678 49
5 - 0.323 255 503 223 33E+7 10 0.650 175 348 447 98E+3
Equations (29) to (31) reproduce exactly the p-T values at the triple point according to Eq. (9), at the normal boiling point [12] and at the critical point according to Eqs. (2) and (3).
Range of validity
Equation (30) is valid along the entire vapor-liquid saturation line from the triple-point temperature T_t to the critical temperature T_c and can be simply extrapolated to 273.15 K so that it covers the temperature range
273.15 K \leq T \leq 647.096 K .
Computer-program verification
To assist the user in computer-program verification of Eq. (30), Table 35 contains test values for three selected temperatures.
Table 35. Saturation pressures calculated from Eq. (30) for selected values of T {^a}
T/K ps/MPa
300 0.353 658 941E-2
500 0.263 889 776E+1
600 0.123 443 146E+2
{^a} It is recommended to verify the programmed equation using 8 byte real values for all three values of T given in this table.
page 35
8.2 The Saturation-Temperature Equation (Backward Equation)
The saturation-temperature solution of Eq. (29) reads
T_s / T^{*} = n_{10} + D - [(n_{10} + D)^{2} - 4(n_{9} + n_{10} D)]^{1/2} ...(31)
where T^{*} = 1 K and
D = {2 G} / {-F - (F^{2} - 4 EG)^{1/2}}
with
E = \beta^{2} + n_3 \beta + n_6
F = n_1 \beta^{2} + n_4 \beta + n_7
G = n_2 \beta^{2} + n_5 \beta + n_8
and \beta according to Eq. (29a). The coefficients n_{i} of Eq. (31) are listed in Table 34.
Range of validity
Equation (31) has the same range of validity as Eq. (30), which means that it covers the vapor-liquid saturation line according to the pressure range
611.213 Pa \leq p \leq 22.064 MPa .
The value of 611.213 Pa corresponds to the pressure when Eq. (31) is extrapolated to 273.15 K.
Consistency with the basic equation
Since the saturation-pressure equation, Eq. (30), and the saturation-temperature equation, Eq. (31), have been derived from the same implicit equation, Eq. (29), for describing the saturation line, both Eq. (30) and Eq. (31) are completely consistent with each other.
Computer-program verification
To assist the user in computer-program verification of Eq. (31), Table 36 contains test values for three selected pressures.
page 36
Table 36. Saturation temperatures calculated from Eq. (31) for selected values of p {^a}
p / MPa T_s / K
0.1 0.372 755 919E+3
1 0.453 035 632E+3
10 0.584 149 488E+3
{^a} It is recommended to verify the programmed equation using 8 byte real values for all three values of p given in this table.
9 Basic Equation for Region 5
This section contains all details relevant for the use of the equations for region 5 of IAPWS-IF97. Information about the consistency at the boundary between regions 2 and 5 is summarized in Section 10. The results of computing-time comparisons between IAPWS-IF97 and IFC-67 are given in Section 11. The estimates of uncertainty of the most relevant properties can be found in Section 12.
The basic equation for this high-temperature region is a fundamental equation for the specific Gibbs free energy g. This equation is expressed in dimensionless form, \gamma = g/(RT), and is separated into two parts, an ideal-gas part \gamma^{o} and a residual part \gamma^{r}, so that
g (p, T) / {RT} = \gamma (\pi, \tau) = \gamma^{o} (\pi, \tau) + \gamma^{r} (\pi, \tau) , ...(32)
where \pi = p/p^{*} and \tau = T^{*}/T with R given by Eq. (1).
The equation for the ideal-gas part \gamma^{o} of the dimensionless Gibbs free energy reads
\gamma^{o} = ln \pi + \sum_{i=1}^{6} n_i^{o} \tau^{J_i^{o}} , ...(33)
where \pi = p/p^{*} and \tau = T^{*}/T with p^{*} = 1 MPa and T^{*} = 1000 K. The coefficients n_1^{o}
and n_2^{o} were adjusted in such a way that the values for the specific internal energy and specific entropy in the ideal-gas state relate to Eq. (8). Table 37 contains the coefficients n_{i}^{o} and exponents J_i^{o} of Eq. (33).
page 37
Table 37. Numerical values of the coefficients and exponents of the ideal-gas part \gamma^{o} of the dimensionless Gibbs free energy for region 5, Eq. (33)
i J_i^{o} n_i^{o} i J_i^{o} n_i^{o}
1 0 - 0.131 799 836 742 01E+2 4 -2 0.369 015 349 803 33
2 1 0.685 408 416 344 34E+1 5 -1 - 0.311 613 182 139 25E+1
3 -3 - 0.248 051 489 334 66E-1 6 2 - 0.329 616 265 389 17
The form of the residual part \gamma^{r} of the dimensionless Gibbs free energy is as follows:
\gamma^{r} = \sum_{i=1}^{6} n_i \pi^{I_i} \tau^{J_i} , ...(34)
where \pi = p/p^{*} and \tau = T^{*}/T with p^{*} = 1 MPa and T^{*} = 1000 K. The coefficients ni and exponents I_i and J_i of Eq. (34) are listed in Table 38.
All thermodynamic properties can be derived from Eq. (32) by using the appropriate combinations of the ideal-gas part \gamma^{o}, Eq. (33), and the residual part \gamma^{r}, Eq. (34), of the dimensionless Gibbs free energy and their derivatives. Relations between the relevant thermodynamic properties and \gamma^{o} and \gamma^{r} and their derivatives are summarized in Table 39. All required derivatives of the ideal-gas part and of the residual part of the dimensionless Gibbs free energy are explicitly given in Table 40 and Table 41, respectively.
Table 38. Numerical values of the coefficients and exponents of the residual part \gamma^{r} of the dimensionless Gibbs free energy for region 5, Eq. (34)
i I_i J_i n_i
1 1 1 0.157 364 048 552 59E-2
2 1 2 0.901 537 616 739 44E-3
3 1 3 - 0.502 700 776 776 48E-2
4 2 3 0.224 400 374 094 85E-5
5 2 9 - 0.411 632 754 534 71E-5
6 3 7 0.379 194 548 229 55E-7
page 38
Table 39. Relations of thermodynamic properties to the ideal-gas part \gamma^{o} and the residual part \gamma^{r} of the dimensionless Gibbs free energy and their derivatives a when using Eq. (32)
Property Relation
Specific volume
v = (\partial g / \partial p)_{T} v (\pi, \tau) {p / RT} = \pi (\gamma_{\pi}^{o} + \gamma_{\pi}^{r})
Specific internal energy
u = g - T (\partial g / \partial T)_{p} - p(\partial g / \partial p)_{T} u (\pi, \tau) / {RT} = \tau (\gamma_{\tau}^{o} + \gamma_{\tau}^{r}) - \pi (\gamma_{\pi}^{o} + \gamma_{\pi}^{r})
Specific entropy
s = -(\partial g / \partial T)_{p} s (\pi, \tau) / R = \tau (\gamma_{\tau}^{o} + \gamma_{\tau}^{r}) - (\gamma^{o} + \gamma^{r})
Specific enthalpy
h = g - T (\partial g / \partial T)_{p} h (\pi, \tau) / {RT} = \tau (\gamma_{\tau}^{o} + \gamma_{\tau}^{r})
Specific isobaric heat capacity
c_p = (\partial h / \partial T)_{p} c_p (\pi, \tau) / R = -\tau^{2} (\gamma_{\tau \tau}^{o} + \gamma_{\tau \tau}^{r})
Specific isochoric heat capacity
c_v = (\partial u / \partial T)_{v} c_v (\pi, \tau) / R = -\tau^{2} (\gamma_{\tau \tau}^{o} + \gamma_{\tau \tau}^{r}) - {{(1 + \pi \gamma_{\pi}^{r} - \tau \pi \gamma_{\pi \tau}^{r})^{2}} / {1 - \pi^{2} \gamma_{\pi \pi}^{r}}}
Speed of sound
w = v [-(\partial p / \partial v) s]^{1/2} w^{2} (\pi, \tau) / {RT} = {1 + 2 \pi \gamma_{\pi}^{r} + \pi^{2} {\gamma_{\pi}^{r}}^{2}} / {(1 - \pi^{2} \gamma_{\pi \pi}^{r}) + {{(1 + \pi \gamma_{\pi}^{r} - \tau \pi \gamma_{\pi \tau}^{r})^{2}} / {\tau^{2} (\gamma_{\tau \tau}^{o} + \gamma_{\tau \tau}^{r})}}}
-----------------------------
{^a} \gamma_{\pi}^{r} = [\partial \gamma^{r} / \partial \pi]_{\tau},
\gamma_{\pi \pi}^{r} = [\partial^{2} \gamma^{r} / \partial \pi^{2}]_{\tau},
\gamma_{\tau}^{r} = [\partial \gamma^{r} / \partial \tau]_{\pi},
\gamma_{\tau \tau}^{r} = [\partial^{2} \gamma^{r} / \partial \tau^{2}]_{\pi},
\gamma_{\pi \tau}^{r} = [\partial^{2} \gamma^{r} / {\partial \pi \partial \tau}],
\gamma_{\tau}^{o} = [\partial \gamma^{o} / \partial \tau]_{\pi},
\gamma_{\tau \tau}^{o} = [\partial^{2} \gamma^{o} / \partial \tau^{2}]_{\pi}
page 39
Table 40. The ideal-gas part \gamma^{o} of the dimensionless Gibbs free energy and its derivatives {^a} according to Eq. (33)
\gamma_{o} = ln \pi + \sum_{i=1}^{6} n_i^{o} \tau^J_i^{o}
\gamma_{\pi}^{o} = 1 / \pi + 0
\gamma_{\pi \pi}^{o} = -1 / \pi^{2} + 0
\gamma_{\tau}^{o} = 0 + \sum_{i=1}^{6} n_i^o J_i^{o} \tau^{J_i^{o} - 1}
\gamma_{\tau \tau}^{o} = 0 + \sum_{i=1}^{6} n_i^{o} J_i^{o} (J_i^{o} - 1) \tau^{J_i^{o} - 2}
\gamma_{\pi \tau}^{o} = 0 + 0
{^a} \gamma_{\pi}^{o} = [\partial \gamma^{o} / \partial \pi]_{\tau},
\gamma_{\pi \pi}^{o} = [\partial^{2} \gamma^{o} / \partial \pi^{2}]_{\tau},
\gamma_{\tau}^{o} = [\partial \gamma^{o} / \partial \tau]_{\pi},
\gamma_{\tau \tau}^{o} = [\partial^{2} \gamma^{o} / \partial \tau^{2}]_{\pi},
\gamma_{\pi \tau}^{o} = [\partial^{2} \gamma^{o} / {\partial \pi \partial \tau}]
Table 41. The residual part \gamma^{r} of the dimensionless Gibbs free energy and its derivatives{^a} according to Eq. (34)
\gamma^{r} = \sum_{i=1}^{6} n_i \pi^{I_i} \tau^{J_i}
\gamma_{\pi}^{r} = \sum_{i=1}^{6} n_i I_i \pi^{I_i - 1} \tau^{J_i}
\gamma_{\pi \pi}^{r} = \sum_{i=1}^{6} n_i I_i (I_i - 1) \pi^{I_i - 2} \tau^{J_i}
\gamma_{\tau}^{r} = \sum_{i=1}^{6} n_i \pi^{I_i} J_i \tau^{J_i - 1}
\gamma_{\tau \tau}^{r} = \sum_{i=1}^{6} n_i \pi^{I_i} J_i (J_i - 1) \tau^{J_i - 2}
\gamma_{\pi \tau}^{r} = \sum_{i=1}^{6} n_i I_i \pi^{I_i - 1} J_i \tau^{J_i - 1}
{^a} \gamma_{\pi}^{r} = [\partial \gamma^{r} / \partial \pi]_{\tau},
\gamma_{\pi \pi}^{r} = [\partial^{2} \gamma^{r} / \partial \pi^{2}]_{\tau},
\gamma_{\tau}^{r} = [\partial \gamma^{r} / \partial \tau]_{\pi},
\gamma_{\tau \tau}^{r} = [\partial^{2} \gamma^{r} / \partial \tau^{2}]_{\pi},
\gamma_{\pi \tau}^{r} = [\partial^{2} \gamma^{r} / {\partial \pi \partial \tau}]
page 40
Range of validity
Equation (32) covers region 5 of IAPWS-IF97 defined by the following temperature and pressure range:
1073.15 K \leq T \leq 2273.15 K 0 \lt p \leq 50 MPa .
Equation (32) is only valid for pure undissociated water; any dissociation will have to be taken into account separately.
Computer-program verification
To assist the user in computer-program verification of Eq. (32), Table 42 contains test values of the most relevant properties.
Table 42. Thermodynamic property values calculated from Eq. (32) for selected values of T and p{^a}
T = 1500 K, p = 0.5 MPa T = 1500 K, p = 30 MPa T = 2000 K, p = 30 MPa
v/(m^3 kg^{-1}) 0.138 455 090E+1 0.230 761 299E-1 0.311 385 219E-1
h/(kJ kg^{-1}) 0.521 976 855E+4 0.516 723 514E+4 0.657 122 604E+4
u/(kJ kg^{-1}) 0.452 749 310E+4 0.447 495 124E+4 0.563 707 038E+4
s/(kJ kg^{-1} K^{-1}) 0.965 408 875E+1 0.772 970 133E+1 0.853 640 523E+1
c_p /(kJ kg^{-1} K^{-1}) 0.261 609 445E+1 0.272 724 317E+1 0.288 569 882E+1
w/(m s^{-1}) 0.917 068 690E+3 0.928 548 002E+3 0.106 736 948E+4
{^a} It is recommended to verify programmed functions using 8 byte real values for all three combinations of T and p given in this table.
10 Consistency at Region Boundaries
For any calculation of thermodynamic properties of water and steam across the region boundaries, the equations of IAPWS-IF97 have to be sufficiently consistent along the corresponding boundary. For the properties considered in this respect, this section presents the achieved consistencies in comparison to the permitted inconsistencies according to the so- called Prague values [13].
10.1 Consistency at Boundaries between Single-Phase Regions
For the boundaries between single-phase regions, the consistency investigations were performed for the following basic equations and region boundaries; see Fig. 1:
∙ Equations (7) and (28) along the 623.15 K isotherm for pressures from 16.53 MPa (ps from Eq. (30) for 623.15 K) to 100 MPa corresponding to the boundary between regions 1 and 3.
page 41
∙ Equations (15) and (28) with respect to the boundary between regions 2 and 3 defined by the B23-equation, Eq. (5), for temperatures between 623.15 K and 863.15 K.
∙ Equations (15) and (32) with respect to the 1073.15 K isotherm for p \leq 50 MPa corres-ponding to the boundary between regions 2 and 5.
The results of the consistency investigations for these three region boundaries are summarized in Table 43. In addition to the permitted inconsistencies corresponding to the Prague values [13], the actual inconsistencies characterized by their maximum and root-mean-square values, |\Delta x|_{max} and \Delta x_{RMS} , along the three boundaries are given for x = v, h, c_p , s, g, and w. It can be seen that the inconsistencies between the basic equations along the corresponding region boundaries are extremely small.
Table 43. Inconsistencies between basic equations for single-phase regions at the joint region boundary
Inconsistency Prague Regions 1/3 Regions 2/3 Regions 2/5
\Delta x value Eqs. (7)/(28) Eqs. (15)/(28) Eqs. (15)/(32)
|\Delta x|_{max} \Delta x_{RMS}{^a} |\Delta x|_{max} \Delta x_{RMS}{^a} |\Delta x|_{max} \Delta x_{RMS}{^a}
|\Delta v|/% 0.05 0.004 0.002 0.018 0.007 0.012 0.007
|\Delta h|/(kJ kg^{-1}) 0.2 0.031 0.014 0.134 0.073 0.096 0.070
|\Delta c_p|/% 1 0.195 0.058 0.353 0.169 0.074 0.049
|\Delta s|/(J kg^{-1} K^{-1}) 0.2 0.042 0.022 0.177 0.094 0.142 0.084
|\Delta g|/(kJ kg^{-1}) 0.2 0.005 0.005 0.005 0.003 0.087 0.072
|\Delta w|/% 1 {^b} 0.299 0.087 0.403 0.073 0.046 0.028
{^a} The \Delta x_{RMS} values (see Nomenclature) were calculated from about 10 000 points evenly distributed along the corresponding boundary.
{^b} The permitted inconsistency value for w is not included in the Prague values [13].
10.2 Consistency at the Saturation Line
The consistency investigations along the vapor-liquid saturation line were performed for the properties ps , Ts , and g. The calculations concern the following basic equations and ranges of the saturation line, see Fig. 1; the way of calculating the inconsistencies \Delta p_s , \Delta T_s , and \Delta g is also given:
∙Equations (7), (15) and (30) on the saturation line for temperatures from T_t = 273.15 K to 623.15 K.
page 42
\Delta p_s = p_{s, Eq.(7), Eq.(15)} - p_{s, Eq.(30)} ...(35a)
\Delta T_s = T_{s, Eq.(7), Eq.(15) - T_{s, Eq.(31)} ...(35b)
\Delta g = g_{Eq.(7)} - g_{Eq.(15)} ...(35c)
The calculation of p_s and of T_s from Eqs. (7) and (15) is made via the Maxwell criterion (phase-equilibrium condition) for given values of T or p. The g values are determined for given T values and corresponding p_s values from Eq. (30).
∙ Equations (28) and (30) on the saturation line for temperatures from 623.15 K to T_c = 647.096 K.
\Delta p_s = p_{s, Eq.(28)} - p_{s, Eq.(30)} ...(36a)
\Delta T_s = T_{s, Eq.(28)} - T_{s, Eq.(31)} ...(36b)
\Delta g = g^{′}_{Eq.(28), Eq.(30)} - g^{″}_{Eq.(28), Eq.(30)} ...(36c)
The calculation of p_s and T_s from Eq. (28) is made via the Maxwell criterion for given temperatures or pressures, respectively. The inconsistency g corresponds to the difference g^{′}(\rho^{′}, T) - g^{″}(\rho^{″}, T) which is calculated from Eq. (28) after \rho^{′} and \rho^{″} are determined from Eq. (28) by iteration for given T values and corresponding p_s values from Eq. (30).
∙ Equations (7), (15) and (28) on the saturation line at 623.15 K. This is the only point on the saturation line where the validity ranges of the fundamental equations of regions 1 to 3 meet each other.
\Delta p_s = p_{s, Eq.(7), Eq.(15)} - p_{s, Eq.(28)} ...(37a)
\Delta T_s = T_{s, Eq.(7), Eq.(15)} - T_{s, Eq.(28)} ...(37b)
\Delta g = g_{Eq.(7), Eq.(15)} - g_{Eq.(28)} ...(37c)
All three properties p_s and T_s and g are calculated via the Maxwell criterion from the corresponding equations.
The results of these consistency investigations along the saturation line are summarized in Table 44. In addition to the permitted inconsistencies corresponding to the Prague values [13], the actual inconsistencies characterized by their maximum and root-mean-square values,
|\Delta x|_{max} and \Delta x_{RMS}, for the two sections of the saturation line are given for x = p_s, T_s and g. It can be seen that the inconsistencies between the basic equations for the corresponding
single-phase region and the saturation-pressure equation are extremely small. This statement also holds for the fundamental equations, Eqs. (7), (15), and (28), among one another and not only in relation to the saturation-pressure equation, Eq. (30), see the last column in Table 44.
page 43
Table 44. Inconsistencies between the basic equations valid at the saturation line
Inconsistency Prague T_t \leq T \leq 623.15 K 623.15 K \leq T \leq T_c T = 623.15 K
\Delta x value Eqs. (7),(15)/(30) Eqs. (28)/(30) Eqs. (7),(15)/(28)
|\Delta x|_{max} \Delta x_{RMS}{^a} |\Delta x|_{max} \Delta x_{RMS}{^a}
|\Delta ps|/% 0.05 0.0069 0.0033 0.0026 0.0015 0.0041
|\Delta Ts|/% 0.02 0.0006 0.0003 0.0003 0.0002 0.0006
|\Delta g|/(kJ kg^{-1}) 0.2 0.012 0.006 0.002 0.001 0.005
{^a} The \Delta x_{RMS} values (see Nomenclature) were calculated from about 3000 points evenly distributed along the two sections of the saturation line.
11 Computing Time of IAPWS-IF97 in Relation to IFC-67
A very important requirement for IAPWS-IF97 was that its computing speed in relation to IFC-67 should be significantly faster. The computation-speed investigations of IAPWS-IF97 in comparison with IFC-67 are based on a special procedure agreed to by IAPWS.
The computing times were measured with a benchmark program developed by IAPWS; this program calculates the corresponding functions at a large number of state points well distributed proportionately over each region. The test configuration agreed on was a PC Intel 486 DX 33 processor and the MS Fortran 5.1 compiler. The relevant functions of IAPWS-IF97 were programmed with regard to short computing times. The calculations with IFC-67 were carried out with the ASME program package [14] speeded up by excluding all parts which were not needed for these special benchmark tests.
The measured computing times were used to calculate computing-time ratios IFC-67/IAPWS- IF97, called CTR values in the following. These CTR values, determined in a different way for regions 1, 2, and 4 (see Section 11.1) and for regions 3 and 5 (see Section 11.2), are the characteristic quantities for the judgment of how much faster the calculations with IAPWS-IF97 are in comparison with IFC-67. Metastable states are not included in these investigations.
11.1 Computing-Time Investigations for Regions 1, 2, and 4
The computing-time investigations for regions 1, 2, and 4, which are particularly relevant to computing time, were performed for the functions listed in Table 45. Each function is associated with a frequency-of-use value. Both the selection of the functions and the values for the corresponding frequency of use are based on a worldwide survey made among the power plant companies and related industries.
For the computing-time comparison between IAPWS-IF97 and IFC-67 for regions 1, 2, and 4, the total CTR value of these three regions together was the decisive criterion, where
page 44
the frequencies of use have to be taken into account. The total CTR value was calculated as follows: As has been described before, the computing times for each function were determined for IFC-67 and for IAPWS-IF97. Then, these values were weighted by the corresponding frequencies of use and added up for the 16 functions of the three regions. The total CTR value is obtained from the sum of the weighted computing times for IFC-67 divided by the corresponding value for IAPWS-IF97. The total CTR value for regions 1, 2, and 4 amounts to
CTR_{regions 1, 2, 4} = 5.1 ...(38)
This means that for regions 1, 2, and 4 together the property calculations with IAPWS-IF97 are more than five times faster than with IFC-67.
Table 45. Results of the computing-time investigations of IAPWS-IF97 in relation to IFC-67 for regions 1, 2, and 4 {^a}
Region{^b} Function Frequency Computing-time
of use ratio
\% IFC-67 / IF97
v( p, T) 2.9 2.7
1 h( p, T) 9.7 2.9
T(p, h) 3.5 24.8
h( p, s) 1.2 10.0
-------------------------------------------------------
\sigma region 1: 5.6{^c}
-------------------------------------------------------
v( p, T) 6.1 2.1
h( p, T) 12.1 2.9
s( p, T) 1.4 1.4
2 T(p, h) 8.5 12.4
v(p, h) 3.1 6.4
s(p, h) 1.7 4.2
T(p, s) 1.7 8.1
h(p, s) 4.9 5.6
-------------------------------------------------------
\sigma region 2: 5.0{^c}
-------------------------------------------------------
p_s(T) 8.0 1.7
4 T_s(p) 30.7 5.6
h^{′} (p) 2.25 4.4
h^{″} (p) 2.25 4.2
-------------------------------------------------------
\sigma region 4: 4.9{^c}
-------------------------------------------------------
-------------------------------------------------------
\sigma regions 1, 2 and 4: 5.1{^c}
-------------------------------------------------------
{^a} Based on the agreed PC Intel 486 DX 33 with MS Fortran 5.1 compiler.
{^b} For the definition of the regions see Fig. 1.
{^c} This CTR value is based on the computing times for the single functions weighted by the frequency-of-use values; see text.
page 45
Table 45 also contains total CTR values separately for each of regions 1, 2, and 4. In addition, CTR values for each single function are given. When using IAPWS-IF97 the functions depending on p,h and p,s for regions 1 and 2 and on p for region 4 were calculated from the backward equations alone (functions explicit in T ) or from the basic equations in combination with the corresponding backward equation.
If a faster processor than specified above is used for the described benchmark tests, similar CTR values are obtained. A corresponding statement is also valid for other compilers than the specified one.
11.2 Computing-Time Investigations for Region 3
For regions 3 and 5 the CTR values only relate to single functions and are given by the quotient of the computing time needed for IFC-67 calculation and the computing time when using IAPWS-IF97; there are no frequency-of-use values for functions relevant to these two regions.
For region 3 of IAPWS-IF97, corresponding to regions 3 and 4 of IFC-67, the computing- time investigations relate to the functions p(v, T), h(v, T), c_p(v, T), and s(v, T) where 10 \% of the test points are in region 4 of IFC-67.
Table 46 lists the CTR values obtained for the relevant functions of region 3. Roughly speaking, IAPWS-IF97 is more than three times faster than IFC-67 for this region.
Table 46. Results of the computing-time in- vestigations of IAPWS-IF97 in relation to IFC-67 for region 3{^a}
Function Computing time
ratio
IFC-67 / IF97
p(v, T) 3.8
h(v, T) 4.3
c_p(v, T) 2.9
s(v, T) 3.2
{^a} Based on the agreed PC Intel 486 DX 33 with MS Fortran 5.1 compiler.
page 46
12 Estimates of Uncertainties
Estimates have been made of the uncertainty of the specific volume, specific isobaric heat capacity, speed of sound, and saturation pressure when calculated from the corresponding equations of IAPWS-IF97. These estimates were derived from the uncertainties of IAPWS-95 [3], from which the input values for fitting the IAPWS-IF97 equations were calculated, and in addition by taking into account the deviations between the corresponding values calculated from IAPWS-IF97 and IAPWS-95. Since there is no reasonable basis for estimating the uncertainty of specific enthalpy (because specific enthalpy is dependent on the selection of the zero point, only enthalpy differences of different size are of interest), no uncertainty is given for this property. However, the uncertainty of isobaric enthalpy differences is smaller than the uncertainty in the isobaric heat capacity.
For the single-phase region, tolerances are indicated in Figs. 3 to 5 which give the estimated uncertainties in various areas. As used here "tolerance" means the range of possible values as judged by IAPWS, and no statistical significance can be attached to it. With regard to the uncertainty for the speed of sound and the specific isobaric heat capacity, see Figs. 4 and 5, it should be noted that the uncertainties for these properties increase drastically when approaching the critical point. The statement "no definitive uncertainty estimates possible" for temperatures above 1273 K is based on the fact that this range is beyond the range of validity of IAPWS-95 and the corresponding input values for IAPWS-IF97 were extrapolated from IAPWS-95. From various tests of IAPWS-95 [3] it is expected that these extrapolations yield reasonable values.
For the saturation pressure, the estimate of uncertainty is shown in Fig. 6.
Estimated uncertainties in enthalpy, in enthalpy differences in the single-phase region, and in the enthalpy of vaporization are given in IAPWS Advisory Note No. 1 [15].
page 47
Fig. 3. Uncertainties in specific volume, \Delta v /v, estimated for the corresponding equations of IAPWS-IF97. In the enlarged critical region (triangle), the uncertainty is given as percentage uncertainty in pressure, \Delta p/p. This region is bordered by the two isochores 0.0019 m3 kg^{-1} and 0.0069 m3 kg^{-1} and by the 30 MPa isobar. The positions of the lines separating the uncertainty regions are approximate.
Fig. 4. Uncertainties in specific isobaric heat capacity, \Delta c_p /c_p, estimated for the corresponding equations of IAPWS-IF97. For the definition of the triangle around the critical point, see Fig. 3. The positions of the lines separating the uncertainty regions are approximate.
page 48
Fig. 5. Uncertainties in speed of sound, \Delta w/w, estimated for the corresponding equations of IAPWS-IF97. For the definition of the triangle around the critical point, see Fig. 3. The positions of the lines separating the uncertainty regions are approximate.
Fig. 6. Uncertainties in saturation pressure, \Delta ps/ps, estimated for the saturation-pressure equation, Eq. (30).
page 49
13 References
[1]International Formulation Committee of the 6th International Conference on the Properties of Steam, The 1967 IFC Formulation for Industrial Use, Verein Deutscher Ingenieure, Düsseldorf, 1967.
[2]Wagner, W., Cooper, J. R., Dittmann, A., KiJ_ima, J., Kretzschmar, H.-J., Kruse, A., Mareš, R., Oguchi, K., Sato, H., Stöcker, I., Šifner, O., Takaishi, Y., Tanishita, I., Trübenbach, J., and Willkommen, Th., The IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam, J. Eng. Gas Turbines & Power 122, 150-182 (2000).
[2a] Wagner, W., Dauber, F., Kretzschmar, H.-J., Mareš, R., Miyagawa, K., Parry, W. T., and Span, R., The New Basic Equation for the Extended Region 5 of the Industrial Formulation IAPWS-IF97 for Water and Steam. To be submitted to J. Eng. Gas Turbines & Power.
[2b] IAPWS Advisory Note No. 2: Roles of Various IAPWS Documents Concerning the Thermo- dynamic Properties of Ordinary Water Substance (2009). Available from http://www.iapws.org
[3]IAPWS, Revised Release on the IAPWS Formulation 1995 for the Thermodynamic Properties of Ordinary Water Substance for General and Scientific Use (2009). Available from http://www.iapws.org
[4]Cohen, E. R. and Taylor, B. N., The 1986 Adjustment of the Fundamental Physical Constants, CODATA Bulletin No. 63, Committee on Data for Science and Technology, Int. Council of Scientific Unions, Pergamon Press, Oxford, 1986.
[5]Audi, G. and Wapstra, A. H., The 1993 atomic mass evaluation, (I) Atomic mass table, Nuclear Physics A 565, 1-65 (1993).
[6]IUPAC Commission on the Atomic Weights and Isotopic Abundances, Subcommittee for Isotopic Abundance Measurements, Isotopic compositions of the elements 1989, Pure Appl. Chem. 63, 991-1002 (1991).
[7]IAPWS, Release on the Values of Temperature, Pressure and Density of Ordinary and Heavy Water Substances at Their Respective Critical Points (1992). Available from http://www.iapws.org
[8]Preston-Thomas, H., The International Temperature Scale of 1990 (ITS-90), Metrologia 27, 3- 10 (1990).
[9]Guildner, L. A., Johnson, D. P., and Jones, F. E., Vapor Pressure of Water at Its Triple Point, J. Res. Natl. Bur. Stand. 80A, 505-521 (1976).
[10]IAPWS, Revised Release on the Pressure along the Melting and Sublimation Curves of Ordinary Water Substance (2008). Available from http://www.iapws.org
[11]Wagner, W. and Pruß, A., The IAPWS Formulation 1995 for the Thermodynamic Properties of Ordinary Water Substance for General and Scientific Use, J. Phys. Chem. Ref. Data 31, 387- 535 (2002).
[12]IAPWS, Revised Supplementary Release on Saturation Properties of Ordinary Water Substance (1992). Available from http://www.iapws.org
[13]Minutes of the meetings of the International Formulation Committee of ICPS in Prague, 1965.
[14]McClintock, R. B. and Silvestri, G. J., Formulations and iterative procedures for the calculation of properties of steam, The American Society of Mechanical Engineers, New York, 1968.
[15]IAPWS Advisory Note No. 1: Uncertainties in Enthalpy for the IAPWS Formulation 1995 for the Thermodynamic Properties of Ordinary Water Substance for General and Scientific Use (IAPWS-95) and the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam (IAPWS-IF97) (2003). Available from http://www.iapws.org
_____________________________________________________________________________________________________________________________________
*/
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment