iapws.iapws97 module

IAPWS-IF97 standard implementation

iapws97

The module implement the fundamental equation for the five regions (rectangular boxes) and the backward equation (marked in grey).

IAPWS97: Global module class with all the functionality integrated

Fundamental equations:
Backward equations:
Boundary equations:

References:

IAPWS, Revised Release on the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam August 2007, http://www.iapws.org/relguide/IF97-Rev.html

IAPWS, Revised Supplementary Release on Backward Equations for Pressure as a Function of Enthalpy and Entropy p(h,s) for Regions 1 and 2 of the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam, http://www.iapws.org/relguide/Supp-PHS12-2014.pdf

IAPWS, 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, http://www.iapws.org/relguide/Supp-Tv%28ph,ps%293-2014.pdf

IAPWS, Revised Supplementary Release on Backward Equations p(h,s) for Region 3, Equations as a Function of h and s for the Region Boundaries, and an Equation Tsat(h,s) for Region 4 of the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam, http://www.iapws.org/relguide/Supp-phs3-2014.pdf

IAPWS, Revised Supplementary Release on Backward Equations for Specific Volume as a Function of Pressure and Temperature v(p,T) for Region 3 of the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam, http://www.iapws.org/relguide/Supp-VPT3-2016.pdf

IAPWS, Revised Advisory Note No. 3: Thermodynamic Derivatives from IAPWS Formulations, http://www.iapws.org/relguide/Advise3.pdf

Wagner, W; Kretzschmar, H-J: International Steam Tables: Properties of Water and Steam Based on the Industrial Formulation IAPWS-IF97; Springer, 2008; doi: 10.1007/978-3-540-74234-0

iapws.iapws97._h13_s(s)[source]
Parameters:s (float) – Specific entropy, [kJ/kgK]
Returns:h – Specific enthalpy, [kJ/kg]
Return type:float

Notes

Raise NotImplementedError if input isn’t in limit:

  • s(100MPa,623.15K) ≤ s ≤ s’(623.15K)

References

IAPWS, Revised Supplementary Release on Backward Equations p(h,s) for Region 3, Equations as a Function of h and s for the Region Boundaries, and an Equation Tsat(h,s) for Region 4 of the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam, http://www.iapws.org/relguide/Supp-phs3-2014.pdf. Eq 7

Examples

>>> _h13_s(3.7)
1632.525047
>>> _h13_s(3.5)
1566.104611
iapws.iapws97._P23_T(T)[source]
Parameters:T (float) – Temperature, [K]
Returns:P – Pressure, [MPa]
Return type:float

References

IAPWS, Revised Release on the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam August 2007, http://www.iapws.org/relguide/IF97-Rev.html, Eq 5

Examples

>>> _P23_T(623.15)
16.52916425
iapws.iapws97._t_P(P)[source]
Parameters:P (float) – Pressure, [MPa]
Returns:T – Temperature, [K]
Return type:float

References

IAPWS, Revised Release on the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam August 2007, http://www.iapws.org/relguide/IF97-Rev.html, Eq 5

Examples

>>> _t_P(16.52916425)
623.15
iapws.iapws97._t_hs(h, s)[source]
Parameters:
  • h (float) – Specific enthalpy, [kJ/kg]
  • s (float) – Specific entropy, [kJ/kgK]
Returns:

T – Temperature, [K]

Return type:

float

Notes

Raise NotImplementedError if input isn’t in limit:

  • 5.048096828 ≤ s ≤ 5.260578707
  • 2.563592004e3 ≤ h ≤ 2.812942061e3

References

IAPWS, Revised Supplementary Release on Backward Equations p(h,s) for Region 3, Equations as a Function of h and s for the Region Boundaries, and an Equation Tsat(h,s) for Region 4 of the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam, http://www.iapws.org/relguide/Supp-phs3-2014.pdf. Eq 8

Examples

>>> _t_hs(2600, 5.1)
713.5259364
>>> _t_hs(2800, 5.2)
817.6202120
iapws.iapws97._PSat_T(T)[source]
Parameters:T (float) – Temperature, [K]
Returns:P – Pressure, [MPa]
Return type:float

Notes

Raise NotImplementedError if input isn’t in limit:

  • 273.15 ≤ T ≤ 647.096

References

IAPWS, Revised Release on the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam August 2007, http://www.iapws.org/relguide/IF97-Rev.html, Eq 30

Examples

>>> _PSat_T(500)
2.63889776
iapws.iapws97._TSat_P(P)[source]
Parameters:P (float) – Pressure, [MPa]
Returns:T – Temperature, [K]
Return type:float

Notes

Raise NotImplementedError if input isn’t in limit:

  • 0.00061121 ≤ P ≤ 22.064

References

IAPWS, Revised Release on the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam August 2007, http://www.iapws.org/relguide/IF97-Rev.html, Eq 31

Examples

>>> _TSat_P(10)
584.149488
iapws.iapws97._PSat_h(h)[source]

Define the saturated line, P=f(h) for region 3

Parameters:h (float) – Specific enthalpy, [kJ/kg]
Returns:P – Pressure, [MPa]
Return type:float

Notes

Raise NotImplementedError if input isn’t in limit:

  • h’(623.15K) ≤ h ≤ h’’(623.15K)

References

IAPWS, 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, http://www.iapws.org/relguide/Supp-Tv%28ph,ps%293-2014.pdf, Eq 10

Examples

>>> _PSat_h(1700)
17.24175718
>>> _PSat_h(2400)
20.18090839
iapws.iapws97._PSat_s(s)[source]

Define the saturated line, P=f(s) for region 3

Parameters:s (float) – Specific entropy, [kJ/kgK]
Returns:P – Pressure, [MPa]
Return type:float

Notes

Raise NotImplementedError if input isn’t in limit:

  • s’(623.15K) ≤ s ≤ s’’(623.15K)

References

IAPWS, 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, http://www.iapws.org/relguide/Supp-Tv%28ph,ps%293-2014.pdf, Eq 11

Examples

>>> _PSat_s(3.8)
16.87755057
>>> _PSat_s(5.2)
16.68968482
iapws.iapws97._h1_s(s)[source]
Parameters:s (float) – Specific entropy, [kJ/kgK]
Returns:h – Specific enthalpy, [kJ/kg]
Return type:float

Notes

Raise NotImplementedError if input isn’t in limit:

  • s’(273.15K) ≤ s ≤ s’(623.15K)

References

IAPWS, Revised Supplementary Release on Backward Equations p(h,s) for Region 3, Equations as a Function of h and s for the Region Boundaries, and an Equation Tsat(h,s) for Region 4 of the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam, http://www.iapws.org/relguide/Supp-phs3-2014.pdf. Eq 3

Examples

>>> _h1_s(1)
308.5509647
>>> _h1_s(3)
1198.359754
iapws.iapws97._h3a_s(s)[source]
Parameters:s (float) – Specific entropy, [kJ/kgK]
Returns:h – Specific enthalpy, [kJ/kg]
Return type:float

Notes

Raise NotImplementedError if input isn’t in limit:

  • s’(623.15K) ≤ s ≤ sc

References

IAPWS, Revised Supplementary Release on Backward Equations p(h,s) for Region 3, Equations as a Function of h and s for the Region Boundaries, and an Equation Tsat(h,s) for Region 4 of the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam, http://www.iapws.org/relguide/Supp-phs3-2014.pdf. Eq 4

Examples

>>> _h3a_s(3.8)
1685.025565
>>> _h3a_s(4.2)
1949.352563
iapws.iapws97._h2ab_s(s)[source]

Define the saturated line boundary between Region 4 and 2a-2b, h=f(s)

Parameters:s (float) – Specific entropy, [kJ/kgK]
Returns:h – Specific enthalpy, [kJ/kg]
Return type:float

Notes

Raise NotImplementedError if input isn’t in limit:

  • 5.85 ≤ s ≤ s”(273.15K)

References

IAPWS, Revised Supplementary Release on Backward Equations p(h,s) for Region 3, Equations as a Function of h and s for the Region Boundaries, and an Equation Tsat(h,s) for Region 4 of the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam, http://www.iapws.org/relguide/Supp-phs3-2014.pdf. Eq 5

Examples

>>> _h2ab_s(7)
2723.729985
>>> _h2ab_s(9)
2511.861477
iapws.iapws97._h2c3b_s(s)[source]

Define the saturated line boundary between Region 4 and 2c-3b, h=f(s)

Parameters:s (float) – Specific entropy, [kJ/kgK]
Returns:h – Specific enthalpy, [kJ/kg]
Return type:float

Notes

Raise NotImplementedError if input isn’t in limit:

  • sc ≤ s ≤ 5.85

References

IAPWS, Revised Supplementary Release on Backward Equations p(h,s) for Region 3, Equations as a Function of h and s for the Region Boundaries, and an Equation Tsat(h,s) for Region 4 of the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam, http://www.iapws.org/relguide/Supp-phs3-2014.pdf. Eq 6

Examples

>>> _h2c3b_s(5.5)
2687.693850
>>> _h2c3b_s(4.5)
2144.360448
iapws.iapws97._Region1(T, P)[source]

Basic equation for region 1

Parameters:
  • T (float) – Temperature, [K]
  • P (float) – Pressure, [MPa]
Returns:

prop

Dict with calculated properties. The available properties are:

  • v: Specific volume, [m³/kg]
  • h: Specific enthalpy, [kJ/kg]
  • s: Specific entropy, [kJ/kgK]
  • cp: Specific isobaric heat capacity, [kJ/kgK]
  • cv: Specific isocoric heat capacity, [kJ/kgK]
  • w: Speed of sound, [m/s]
  • alfav: Cubic expansion coefficient, [1/K]
  • kt: Isothermal compressibility, [1/MPa]

Return type:

dict

References

IAPWS, Revised Release on the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam August 2007, http://www.iapws.org/relguide/IF97-Rev.html, Eq 7

Examples

>>> _Region1(300,3)["v"]
0.00100215168
>>> _Region1(300,3)["h"]
115.331273
>>> _Region1(300,3)["h"]-3000*_Region1(300,3)["v"]
112.324818
>>> _Region1(300,80)["s"]
0.368563852
>>> _Region1(300,80)["cp"]
4.01008987
>>> _Region1(300,80)["cv"]
3.91736606
>>> _Region1(500,3)["w"]
1240.71337
>>> _Region1(500,3)["alfav"]
0.00164118128
>>> _Region1(500,3)["kt"]
0.00112892188
iapws.iapws97._Backward1_T_Ph(P, h)[source]

Backward equation for region 1, T=f(P,h) :param P: Pressure, [MPa] :type P: float :param h: Specific enthalpy, [kJ/kg] :type h: float

Returns:T – Temperature, [K]
Return type:float

References

IAPWS, Revised Release on the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam August 2007, http://www.iapws.org/relguide/IF97-Rev.html, Eq 11

Examples

>>> _Backward1_T_Ph(3,500)
391.798509
>>> _Backward1_T_Ph(80,1500)
611.041229
iapws.iapws97._Backward1_T_Ps(P, s)[source]
Parameters:
  • P (float) – Pressure, [MPa]
  • s (float) – Specific entropy, [kJ/kgK]
Returns:

T – Temperature, [K]

Return type:

float

References

IAPWS, Revised Release on the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam August 2007, http://www.iapws.org/relguide/IF97-Rev.html, Eq 13

Examples

>>> _Backward1_T_Ps(3,0.5)
307.842258
>>> _Backward1_T_Ps(80,3)
565.899909
iapws.iapws97._Backward1_P_hs(h, s)[source]
Parameters:
  • h (float) – Specific enthalpy, [kJ/kg]
  • s (float) – Specific entropy, [kJ/kgK]
Returns:

P – Pressure, [MPa]

Return type:

float

References

IAPWS, Revised Supplementary Release on Backward Equations for Pressure as a Function of Enthalpy and Entropy p(h,s) for Regions 1 and 2 of the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam, http://www.iapws.org/relguide/Supp-PHS12-2014.pdf, Eq 1

Examples

>>> _Backward1_P_hs(0.001,0)
0.0009800980612
>>> _Backward1_P_hs(90,0)
91.92954727
>>> _Backward1_P_hs(1500,3.4)
58.68294423
iapws.iapws97._Region2(T, P)[source]

Basic equation for region 2

Parameters:
  • T (float) – Temperature, [K]
  • P (float) – Pressure, [MPa]
Returns:

prop

Dict with calculated properties. The available properties are:

  • v: Specific volume, [m³/kg]
  • h: Specific enthalpy, [kJ/kg]
  • s: Specific entropy, [kJ/kgK]
  • cp: Specific isobaric heat capacity, [kJ/kgK]
  • cv: Specific isocoric heat capacity, [kJ/kgK]
  • w: Speed of sound, [m/s]
  • alfav: Cubic expansion coefficient, [1/K]
  • kt: Isothermal compressibility, [1/MPa]

Return type:

dict

References

IAPWS, Revised Release on the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam August 2007, http://www.iapws.org/relguide/IF97-Rev.html, Eq 15-17

Examples

>>> _Region2(700,30)["v"]
0.00542946619
>>> _Region2(700,30)["h"]
2631.49474
>>> _Region2(700,30)["h"]-30000*_Region2(700,30)["v"]
2468.61076
>>> _Region2(700,0.0035)["s"]
10.1749996
>>> _Region2(700,0.0035)["cp"]
2.08141274
>>> _Region2(700,0.0035)["cv"]
1.61978333
>>> _Region2(300,0.0035)["w"]
427.920172
>>> _Region2(300,0.0035)["alfav"]
0.00337578289
>>> _Region2(300,0.0035)["kt"]
286.239651
iapws.iapws97.Region2_cp0(Tr, Pr)[source]

Ideal properties for Region 2

Parameters:
  • Tr (float) – Reduced temperature, [-]
  • Pr (float) – Reduced pressure, [-]
Returns:

prop

Array with ideal Gibbs energy partial derivatives:

  • g: Ideal Specific Gibbs energy [kJ/kg]
  • gp: ∂g/∂P|T
  • gpp: ∂²g/∂P²|T
  • gt: ∂g/∂T|P
  • gtt: ∂²g/∂T²|P
  • gpt: ∂²g/∂T∂P

Return type:

array

References

IAPWS, Revised Release on the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam August 2007, http://www.iapws.org/relguide/IF97-Rev.html, Eq 16

iapws.iapws97._P_2bc(h)[source]
Parameters:h (float) – Specific enthalpy, [kJ/kg]
Returns:P – Pressure, [MPa]
Return type:float

References

IAPWS, Revised Release on the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam August 2007, http://www.iapws.org/relguide/IF97-Rev.html, Eq 20

Examples

>>> _P_2bc(3516.004323)
100.0
iapws.iapws97._hbc_P(P)[source]
Parameters:P (float) – Pressure, [MPa]
Returns:h – Specific enthalpy, [kJ/kg]
Return type:float

References

IAPWS, Revised Release on the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam August 2007, http://www.iapws.org/relguide/IF97-Rev.html, Eq 21

Examples

>>> _hbc_P(100)
3516.004323
iapws.iapws97._hab_s(s)[source]
Parameters:s (float) – Specific entropy, [kJ/kgK]
Returns:h – Specific enthalpy, [kJ/kg]
Return type:float

References

IAPWS, Revised Supplementary Release on Backward Equations for Pressure as a Function of Enthalpy and Entropy p(h,s) for Regions 1 and 2 of the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam, http://www.iapws.org/relguide/Supp-PHS12-2014.pdf, Eq 2

Examples

>>> _hab_s(7)
3376.437884
iapws.iapws97._Backward2a_T_Ph(P, h)[source]
Parameters:
  • P (float) – Pressure, [MPa]
  • h (float) – Specific enthalpy, [kJ/kg]
Returns:

T – Temperature, [K]

Return type:

float

References

IAPWS, Revised Release on the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam August 2007, http://www.iapws.org/relguide/IF97-Rev.html, Eq 22

Examples

>>> _Backward2a_T_Ph(0.001,3000)
534.433241
>>> _Backward2a_T_Ph(3,4000)
1010.77577
iapws.iapws97._Backward2b_T_Ph(P, h)[source]
Parameters:
  • P (float) – Pressure, [MPa]
  • h (float) – Specific enthalpy, [kJ/kg]
Returns:

T – Temperature, [K]

Return type:

float

References

IAPWS, Revised Release on the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam August 2007, http://www.iapws.org/relguide/IF97-Rev.html, Eq 23

Examples

>>> _Backward2b_T_Ph(5,4000)
1015.31583
>>> _Backward2b_T_Ph(25,3500)
875.279054
iapws.iapws97._Backward2c_T_Ph(P, h)[source]
Parameters:
  • P (float) – Pressure, [MPa]
  • h (float) – Specific enthalpy, [kJ/kg]
Returns:

T – Temperature, [K]

Return type:

float

References

IAPWS, Revised Release on the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam August 2007, http://www.iapws.org/relguide/IF97-Rev.html, Eq 24

Examples

>>> _Backward2c_T_Ph(40,2700)
743.056411
>>> _Backward2c_T_Ph(60,3200)
882.756860
iapws.iapws97._Backward2_T_Ph(P, h)[source]
Parameters:
  • P (float) – Pressure, [MPa]
  • h (float) – Specific enthalpy, [kJ/kg]
Returns:

T – Temperature, [K]

Return type:

float

iapws.iapws97._Backward2a_T_Ps(P, s)[source]
Parameters:
  • P (float) – Pressure, [MPa]
  • s (float) – Specific entropy, [kJ/kgK]
Returns:

T – Temperature, [K]

Return type:

float

References

IAPWS, Revised Release on the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam August 2007, http://www.iapws.org/relguide/IF97-Rev.html, Eq 25

Examples

>>> _Backward2a_T_Ps(0.1,7.5)
399.517097
>>> _Backward2a_T_Ps(2.5,8)
1039.84917
iapws.iapws97._Backward2b_T_Ps(P, s)[source]
Parameters:
  • P (float) – Pressure, [MPa]
  • s (float) – Specific entropy, [kJ/kgK]
Returns:

T – Temperature, [K]

Return type:

float

References

IAPWS, Revised Release on the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam August 2007, http://www.iapws.org/relguide/IF97-Rev.html, Eq 26

Examples

>>> _Backward2b_T_Ps(8,6)
600.484040
>>> _Backward2b_T_Ps(90,6)
1038.01126
iapws.iapws97._Backward2c_T_Ps(P, s)[source]
Parameters:
  • P (float) – Pressure, [MPa]
  • s (float) – Specific entropy, [kJ/kgK]
Returns:

T – Temperature, [K]

Return type:

float

References

IAPWS, Revised Release on the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam August 2007, http://www.iapws.org/relguide/IF97-Rev.html, Eq 27

Examples

>>> _Backward2c_T_Ps(20,5.75)
697.992849
>>> _Backward2c_T_Ps(80,5.75)
949.017998
iapws.iapws97._Backward2_T_Ps(P, s)[source]
Parameters:
  • P (float) – Pressure, [MPa]
  • s (float) – Specific entropy, [kJ/kgK]
Returns:

T – Temperature, [K]

Return type:

float

iapws.iapws97._Backward2a_P_hs(h, s)[source]
Parameters:
  • h (float) – Specific enthalpy, [kJ/kg]
  • s (float) – Specific entropy, [kJ/kgK]
Returns:

P – Pressure, [MPa]

Return type:

float

References

IAPWS, Revised Supplementary Release on Backward Equations for Pressure as a Function of Enthalpy and Entropy p(h,s) for Regions 1 and 2 of the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam, http://www.iapws.org/relguide/Supp-PHS12-2014.pdf, Eq 3

Examples

>>> _Backward2a_P_hs(2800,6.5)
1.371012767
>>> _Backward2a_P_hs(2800,9.5)
0.001879743844
>>> _Backward2a_P_hs(4100,9.5)
0.1024788997
iapws.iapws97._Backward2b_P_hs(h, s)[source]
Parameters:
  • h (float) – Specific enthalpy, [kJ/kg]
  • s (float) – Specific entropy, [kJ/kgK]
Returns:

P – Pressure, [MPa]

Return type:

float

References

IAPWS, Revised Supplementary Release on Backward Equations for Pressure as a Function of Enthalpy and Entropy p(h,s) for Regions 1 and 2 of the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam, http://www.iapws.org/relguide/Supp-PHS12-2014.pdf, Eq 4

Examples

>>> _Backward2b_P_hs(2800,6)
4.793911442
>>> _Backward2b_P_hs(3600,6)
83.95519209
>>> _Backward2b_P_hs(3600,7)
7.527161441
iapws.iapws97._Backward2c_P_hs(h, s)[source]
Parameters:
  • h (float) – Specific enthalpy, [kJ/kg]
  • s (float) – Specific entropy, [kJ/kgK]
Returns:

P – Pressure, [MPa]

Return type:

float

References

IAPWS, Revised Supplementary Release on Backward Equations for Pressure as a Function of Enthalpy and Entropy p(h,s) for Regions 1 and 2 of the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam, http://www.iapws.org/relguide/Supp-PHS12-2014.pdf, Eq 5

Examples

>>> _Backward2c_P_hs(2800,5.1)
94.39202060
>>> _Backward2c_P_hs(2800,5.8)
8.414574124
>>> _Backward2c_P_hs(3400,5.8)
83.76903879
iapws.iapws97._Backward2_P_hs(h, s)[source]
Parameters:
  • h (float) – Specific enthalpy, [kJ/kg]
  • s (float) – Specific entropy, [kJ/kgK]
Returns:

P – Pressure, [MPa]

Return type:

float

iapws.iapws97._Region3(rho, T)[source]

Basic equation for region 3

Parameters:
  • rho (float) – Density, [kg/m³]
  • T (float) – Temperature, [K]
Returns:

prop

Dict with calculated properties. The available properties are:

  • v: Specific volume, [m³/kg]
  • h: Specific enthalpy, [kJ/kg]
  • s: Specific entropy, [kJ/kgK]
  • cp: Specific isobaric heat capacity, [kJ/kgK]
  • cv: Specific isocoric heat capacity, [kJ/kgK]
  • w: Speed of sound, [m/s]
  • alfav: Cubic expansion coefficient, [1/K]
  • kt: Isothermal compressibility, [1/MPa]

Return type:

dict

References

IAPWS, Revised Release on the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam August 2007, http://www.iapws.org/relguide/IF97-Rev.html, Eq 28

Examples

>>> _Region3(500,650)["P"]
25.5837018
>>> _Region3(500,650)["h"]
1863.43019
>>> p = _Region3(500, 650)
>>> p["h"]-p["P"]*1000*p["v"]
1812.26279
>>> _Region3(200,650)["s"]
4.85438792
>>> _Region3(200,650)["cp"]
44.6579342
>>> _Region3(200,650)["cv"]
4.04118076
>>> _Region3(200,650)["w"]
383.444594
>>> _Region3(500,750)["alfav"]
0.00441515098
>>> _Region3(500,750)["kt"]
0.00806710817
iapws.iapws97._h_3ab(P)[source]

Define the boundary between Region 3a-3b, h=f(P)

Parameters:P (float) – Pressure, [MPa]
Returns:h – Specific enthalpy, [kJ/kg]
Return type:float

Examples

>>> _h_3ab(25)
2095.936454
iapws.iapws97._tab_P(P)[source]

Define the boundary between Region 3a-3b, T=f(P)

Parameters:P (float) – Pressure, [MPa]
Returns:T – Temperature, [K]
Return type:float

References

IAPWS, Revised Supplementary Release on Backward Equations for Specific Volume as a Function of Pressure and Temperature v(p,T) for Region 3 of the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam, http://www.iapws.org/relguide/Supp-VPT3-2016.pdf, Eq. 2

Examples

>>> _tab_P(40)
693.0341408
iapws.iapws97._top_P(P)[source]

Define the boundary between Region 3o-3p, T=f(P)

Parameters:P (float) – Pressure, [MPa]
Returns:T – Temperature, [K]
Return type:float

References

IAPWS, Revised Supplementary Release on Backward Equations for Specific Volume as a Function of Pressure and Temperature v(p,T) for Region 3 of the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam, http://www.iapws.org/relguide/Supp-VPT3-2016.pdf, Eq. 2

Examples

>>> _top_P(22.8)
650.0106943
iapws.iapws97._twx_P(P)[source]

Define the boundary between Region 3w-3x, T=f(P)

Parameters:P (float) – Pressure, [MPa]
Returns:T – Temperature, [K]
Return type:float

References

IAPWS, Revised Supplementary Release on Backward Equations for Specific Volume as a Function of Pressure and Temperature v(p,T) for Region 3 of the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam, http://www.iapws.org/relguide/Supp-VPT3-2016.pdf, Eq. 2

Examples

>>> _twx_P(22.3)
648.2049480
iapws.iapws97._tef_P(P)[source]

Define the boundary between Region 3e-3f, T=f(P)

Parameters:P (float) – Pressure, [MPa]
Returns:T – Temperature, [K]
Return type:float

References

IAPWS, Revised Supplementary Release on Backward Equations for Specific Volume as a Function of Pressure and Temperature v(p,T) for Region 3 of the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam, http://www.iapws.org/relguide/Supp-VPT3-2016.pdf, Eq. 3

Examples

>>> _tef_P(40)
713.9593992
iapws.iapws97._txx_P(P, xy)[source]

Define the boundary between 3x-3y, T=f(P)

Parameters:
  • P (float) – Pressure, [MPa]
  • xy (string) – Subregions options: cd, gh, ij, jk, mn, qu, rx, uv
Returns:

T – Temperature, [K]

Return type:

float

References

IAPWS, Revised Supplementary Release on Backward Equations for Specific Volume as a Function of Pressure and Temperature v(p,T) for Region 3 of the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam, http://www.iapws.org/relguide/Supp-VPT3-2016.pdf, Eq. 1

Examples

>>> _txx_P(25,"cd")
649.3659208
>>> _txx_P(23,"gh")
649.8873759
>>> _txx_P(23,"ij")
651.5778091
>>> _txx_P(23,"jk")
655.8338344
>>> _txx_P(22.8,"mn")
649.6054133
>>> _txx_P(22,"qu")
645.6355027
>>> _txx_P(22,"rx")
648.2622754
>>> _txx_P(22.3,"uv")
647.7996121
iapws.iapws97._Backward3a_v_Ph(P, h)[source]
Parameters:
  • P (float) – Pressure, [MPa]
  • h (float) – Specific enthalpy, [kJ/kg]

References

IAPWS, 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, http://www.iapws.org/relguide/Supp-Tv%28ph,ps%293-2014.pdf, Eq 4

Returns:v – Specific volume, [m³/kg]
Return type:float

Examples

>>> _Backward3a_v_Ph(20,1700)
0.001749903962
>>> _Backward3a_v_Ph(100,2100)
0.001676229776
iapws.iapws97._Backward3b_v_Ph(P, h)[source]
Parameters:
  • P (float) – Pressure, [MPa]
  • h (float) – Specific enthalpy, [kJ/kg]
Returns:

v – Specific volume, [m³/kg]

Return type:

float

References

IAPWS, 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, http://www.iapws.org/relguide/Supp-Tv%28ph,ps%293-2014.pdf, Eq 5

Examples

>>> _Backward3b_v_Ph(20,2500)
0.006670547043
>>> _Backward3b_v_Ph(100,2700)
0.002404234998
iapws.iapws97._Backward3_v_Ph(P, h)[source]
Parameters:
  • P (float) – Pressure, [MPa]
  • h (float) – Specific enthalpy, [kJ/kg]
Returns:

v – Specific volume, [m³/kg]

Return type:

float

iapws.iapws97._Backward3a_T_Ph(P, h)[source]
Parameters:
  • P (float) – Pressure, [MPa]
  • h (float) – Specific enthalpy, [kJ/kg]
Returns:

T – Temperature, [K]

Return type:

float

References

IAPWS, 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, http://www.iapws.org/relguide/Supp-Tv%28ph,ps%293-2014.pdf, Eq 2

Examples

>>> _Backward3a_T_Ph(20,1700)
629.3083892
>>> _Backward3a_T_Ph(100,2100)
733.6163014
iapws.iapws97._Backward3b_T_Ph(P, h)[source]
Parameters:
  • P (float) – Pressure, [MPa]
  • h (float) – Specific enthalpy, [kJ/kg]
Returns:

T – Temperature, [K]

Return type:

float

References

IAPWS, 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, http://www.iapws.org/relguide/Supp-Tv%28ph,ps%293-2014.pdf, Eq 3

Examples

>>> _Backward3b_T_Ph(20,2500)
641.8418053
>>> _Backward3b_T_Ph(100,2700)
842.0460876
iapws.iapws97._Backward3_T_Ph(P, h)[source]
Parameters:
  • P (float) – Pressure, [MPa]
  • h (float) – Specific enthalpy, [kJ/kg]
Returns:

T – Temperature, [K]

Return type:

float

iapws.iapws97._Backward3a_v_Ps(P, s)[source]
Parameters:
  • P (float) – Pressure, [MPa]
  • s (float) – Specific entropy, [kJ/kgK]
Returns:

v – Specific volume, [m³/kg]

Return type:

float

References

IAPWS, 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, http://www.iapws.org/relguide/Supp-Tv%28ph,ps%293-2014.pdf, Eq 8

Examples

>>> _Backward3a_v_Ps(20,3.8)
0.001733791463
>>> _Backward3a_v_Ps(100,4)
0.001555893131
iapws.iapws97._Backward3b_v_Ps(P, s)[source]
Parameters:
  • P (float) – Pressure, [MPa]
  • s (float) – Specific entropy, [kJ/kgK]
Returns:

v – Specific volume, [m³/kg]

Return type:

float

References

IAPWS, 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, http://www.iapws.org/relguide/Supp-Tv%28ph,ps%293-2014.pdf, Eq 9

Examples

>>> _Backward3b_v_Ps(20,5)
0.006262101987
>>> _Backward3b_v_Ps(100,5)
0.002449610757
iapws.iapws97._Backward3_v_Ps(P, s)[source]
Parameters:
  • P (float) – Pressure, [MPa]
  • s (float) – Specific entropy, [kJ/kgK]
Returns:

v – Specific volume, [m³/kg]

Return type:

float

iapws.iapws97._Backward3a_T_Ps(P, s)[source]
Parameters:
  • P (float) – Pressure, [MPa]
  • s (float) – Specific entropy, [kJ/kgK]
Returns:

T – Temperature, [K]

Return type:

float

References

IAPWS, 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, http://www.iapws.org/relguide/Supp-Tv%28ph,ps%293-2014.pdf, Eq 6

Examples

>>> _Backward3a_T_Ps(20,3.8)
628.2959869
>>> _Backward3a_T_Ps(100,4)
705.6880237
iapws.iapws97._Backward3b_T_Ps(P, s)[source]
Parameters:
  • P (float) – Pressure, [MPa]
  • s (float) – Specific entropy, [kJ/kgK]
Returns:

T – Temperature, [K]

Return type:

float

References

IAPWS, 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, http://www.iapws.org/relguide/Supp-Tv%28ph,ps%293-2014.pdf, Eq 7

Examples

>>> _Backward3b_T_Ps(20,5)
640.1176443
>>> _Backward3b_T_Ps(100,5)
847.4332825
iapws.iapws97._Backward3_T_Ps(P, s)[source]
Parameters:
  • P (float) – Pressure, [MPa]
  • s (float) – Specific entropy, [kJ/kgK]
Returns:

T – Temperature, [K]

Return type:

float

iapws.iapws97._Backward3a_P_hs(h, s)[source]
Parameters:
  • h (float) – Specific enthalpy, [kJ/kg]
  • s (float) – Specific entropy, [kJ/kgK]
Returns:

P – Pressure, [MPa]

Return type:

float

References

IAPWS, Revised Supplementary Release on Backward Equations p(h,s) for Region 3, Equations as a Function of h and s for the Region Boundaries, and an Equation Tsat(h,s) for Region 4 of the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam, http://www.iapws.org/relguide/Supp-phs3-2014.pdf. Eq 1

Examples

>>> _Backward3a_P_hs(1700,3.8)
25.55703246
>>> _Backward3a_P_hs(2000,4.2)
45.40873468
>>> _Backward3a_P_hs(2100,4.3)
60.78123340
iapws.iapws97._Backward3b_P_hs(h, s)[source]
Parameters:
  • h (float) – Specific enthalpy, [kJ/kg]
  • s (float) – Specific entropy, [kJ/kgK]
Returns:

P – Pressure, [MPa]

Return type:

float

References

IAPWS, Revised Supplementary Release on Backward Equations p(h,s) for Region 3, Equations as a Function of h and s for the Region Boundaries, and an Equation Tsat(h,s) for Region 4 of the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam, http://www.iapws.org/relguide/Supp-phs3-2014.pdf. Eq 1

Examples

>>> _Backward3b_P_hs(2400,4.7)
63.63924887
>>> _Backward3b_P_hs(2600,5.1)
34.34999263
>>> _Backward3b_P_hs(2700,5.0)
88.39043281
iapws.iapws97._Backward3_P_hs(h, s)[source]
Parameters:
  • h (float) – Specific enthalpy, [kJ/kg]
  • s (float) – Specific entropy, [kJ/kgK]
Returns:

P – Pressure, [MPa]

Return type:

float

iapws.iapws97._Backward3_sat_v_P(P, x)[source]
Parameters:
  • T (float) – Temperature, [K]
  • P (float) – Pressure, [MPa]
  • x (integer) – Vapor quality, [-]
Returns:

v – Specific volume, [m³/kg]

Return type:

float

Notes

The vapor quality (x) can be 0 (saturated liquid) or 1 (saturated vapour)

iapws.iapws97._Backward3_v_PT(P, T)[source]
Parameters:
  • T (float) – Temperature, [K]
  • P (float) – Pressure, [MPa]
Returns:

v – Specific volume, [m³/kg]

Return type:

float

References

IAPWS, Revised Supplementary Release on Backward Equations for Specific Volume as a Function of Pressure and Temperature v(p,T) for Region 3 of the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam, http://www.iapws.org/relguide/Supp-VPT3-2016.pdf, Table 2 and 10

iapws.iapws97._Backward3x_v_PT(P, T)[source]
Parameters:
  • T (float) – Temperature, [K]
  • P (float) – Pressure, [MPa]
  • x (char) – Region 3 subregion code
Returns:

v – Specific volume, [m³/kg]

Return type:

float

References

IAPWS, Revised Supplementary Release on Backward Equations for Specific Volume as a Function of Pressure and Temperature v(p,T) for Region 3 of the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam, http://www.iapws.org/relguide/Supp-VPT3-2016.pdf, Eq. 4-5

Examples

>>> _Backward3x_v_PT(630,50,"a")
0.001470853100
>>> _Backward3x_v_PT(670,80,"a")
0.001503831359
>>> _Backward3x_v_PT(710,50,"b")
0.002204728587
>>> _Backward3x_v_PT(750,80,"b")
0.001973692940
>>> _Backward3x_v_PT(630,20,"c")
0.001761696406
>>> _Backward3x_v_PT(650,30,"c")
0.001819560617
>>> _Backward3x_v_PT(656,26,"d")
0.002245587720
>>> _Backward3x_v_PT(670,30,"d")
0.002506897702
>>> _Backward3x_v_PT(661,26,"e")
0.002970225962
>>> _Backward3x_v_PT(675,30,"e")
0.003004627086
>>> _Backward3x_v_PT(671,26,"f")
0.005019029401
>>> _Backward3x_v_PT(690,30,"f")
0.004656470142
>>> _Backward3x_v_PT(649,23.6,"g")
0.002163198378
>>> _Backward3x_v_PT(650,24,"g")
0.002166044161
>>> _Backward3x_v_PT(652,23.6,"h")
0.002651081407
>>> _Backward3x_v_PT(654,24,"h")
0.002967802335
>>> _Backward3x_v_PT(653,23.6,"i")
0.003273916816
>>> _Backward3x_v_PT(655,24,"i")
0.003550329864
>>> _Backward3x_v_PT(655,23.5,"j")
0.004545001142
>>> _Backward3x_v_PT(660,24,"j")
0.005100267704
>>> _Backward3x_v_PT(660,23,"k")
0.006109525997
>>> _Backward3x_v_PT(670,24,"k")
0.006427325645
>>> _Backward3x_v_PT(646,22.6,"l")
0.002117860851
>>> _Backward3x_v_PT(646,23,"l")
0.002062374674
>>> _Backward3x_v_PT(648.6,22.6,"m")
0.002533063780
>>> _Backward3x_v_PT(649.3,22.8,"m")
0.002572971781
>>> _Backward3x_v_PT(649,22.6,"n")
0.002923432711
>>> _Backward3x_v_PT(649.7,22.8,"n")
0.002913311494
>>> _Backward3x_v_PT(649.1,22.6,"o")
0.003131208996
>>> _Backward3x_v_PT(649.9,22.8,"o")
0.003221160278
>>> _Backward3x_v_PT(649.4,22.6,"p")
0.003715596186
>>> _Backward3x_v_PT(650.2,22.8,"p")
0.003664754790
>>> _Backward3x_v_PT(640,21.1,"q")
0.001970999272
>>> _Backward3x_v_PT(643,21.8,"q")
0.002043919161
>>> _Backward3x_v_PT(644,21.1,"r")
0.005251009921
>>> _Backward3x_v_PT(648,21.8,"r")
0.005256844741
>>> _Backward3x_v_PT(635,19.1,"s")
0.001932829079
>>> _Backward3x_v_PT(638,20,"s")
0.001985387227
>>> _Backward3x_v_PT(626,17,"t")
0.008483262001
>>> _Backward3x_v_PT(640,20,"t")
0.006227528101
>>> _Backward3x_v_PT(644.6,21.5,"u")
0.002268366647
>>> _Backward3x_v_PT(646.1,22,"u")
0.002296350553
>>> _Backward3x_v_PT(648.6,22.5,"v")
0.002832373260
>>> _Backward3x_v_PT(647.9,22.3,"v")
0.002811424405
>>> _Backward3x_v_PT(647.5,22.15,"w")
0.003694032281
>>> _Backward3x_v_PT(648.1,22.3,"w")
0.003622226305
>>> _Backward3x_v_PT(648,22.11,"x")
0.004528072649
>>> _Backward3x_v_PT(649,22.3,"x")
0.004556905799
>>> _Backward3x_v_PT(646.84,22,"y")
0.002698354719
>>> _Backward3x_v_PT(647.05,22.064,"y")
0.002717655648
>>> _Backward3x_v_PT(646.89,22,"z")
0.003798732962
>>> _Backward3x_v_PT(647.15,22.064,"z")
0.003701940009
iapws.iapws97._Region4(P, x)[source]

Basic equation for region 4

Parameters:
  • P (float) – Pressure, [MPa]
  • x (float) – Vapor quality, [-]
Returns:

prop

Dict with calculated properties. The available properties are:

  • T: Saturated temperature, [K]
  • P: Saturated pressure, [MPa]
  • x: Vapor quality, [-]
  • v: Specific volume, [m³/kg]
  • h: Specific enthalpy, [kJ/kg]
  • s: Specific entropy, [kJ/kgK]

Return type:

dict

iapws.iapws97._Backward4_T_hs(h, s)[source]
Parameters:
  • h (float) – Specific enthalpy, [kJ/kg]
  • s (float) – Specific entropy, [kJ/kgK]
Returns:

T – Temperature, [K]

Return type:

float

References

IAPWS, Revised Supplementary Release on Backward Equations p(h,s) for Region 3, Equations as a Function of h and s for the Region Boundaries, and an Equation Tsat(h,s) for Region 4 of the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam, http://www.iapws.org/relguide/Supp-phs3-2014.pdf. Eq 9

Examples

>>> _Backward4_T_hs(1800,5.3)
346.8475498
>>> _Backward4_T_hs(2400,6.0)
425.1373305
>>> _Backward4_T_hs(2500,5.5)
522.5579013
iapws.iapws97._Region5(T, P)[source]

Basic equation for region 5

Parameters:
  • T (float) – Temperature, [K]
  • P (float) – Pressure, [MPa]
Returns:

prop

Dict with calculated properties. The available properties are:

  • v: Specific volume, [m³/kg]
  • h: Specific enthalpy, [kJ/kg]
  • s: Specific entropy, [kJ/kgK]
  • cp: Specific isobaric heat capacity, [kJ/kgK]
  • cv: Specific isocoric heat capacity, [kJ/kgK]
  • w: Speed of sound, [m/s]
  • alfav: Cubic expansion coefficient, [1/K]
  • kt: Isothermal compressibility, [1/MPa]

Return type:

dict

References

IAPWS, Revised Release on the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam August 2007, http://www.iapws.org/relguide/IF97-Rev.html, Eq 32-34

Examples

>>> _Region5(1500,0.5)["v"]
1.38455090
>>> _Region5(1500,0.5)["h"]
5219.76855
>>> _Region5(1500,0.5)["h"]-500*_Region5(1500,0.5)["v"]
4527.49310
>>> _Region5(1500,30)["s"]
7.72970133
>>> _Region5(1500,30)["cp"]
2.72724317
>>> _Region5(1500,30)["cv"]
2.19274829
>>> _Region5(2000,30)["w"]
1067.36948
>>> _Region5(2000,30)["alfav"]
0.000508830641
>>> _Region5(2000,30)["kt"]
0.0329193892
iapws.iapws97.Region5_cp0(Tr, Pr)[source]

Ideal properties for Region 5

Parameters:
  • Tr (float) – Reduced temperature, [-]
  • Pr (float) – Reduced pressure, [-]
Returns:

prop

Array with ideal Gibbs energy partial derivatives:

  • g: Ideal Specific Gibbs energy, [kJ/kg]
  • gp: [∂g/∂P]T
  • gpp: [∂²g/∂P²]T
  • gt: [∂g/∂T]P
  • gtt: [∂²g/∂T²]P
  • gpt: [∂²g/∂T∂P]

Return type:

array

References

IAPWS, Revised Release on the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam August 2007, http://www.iapws.org/relguide/IF97-Rev.html, Eq 33

iapws.iapws97._Bound_TP(T, P)[source]

Region definition for input T and P

Parameters:
  • T (float) – Temperature, [K]
  • P (float) – Pressure, [MPa]
Returns:

region – IAPWS-97 region code

Return type:

float

References

Wagner, W; Kretzschmar, H-J: International Steam Tables: Properties of Water and Steam Based on the Industrial Formulation IAPWS-IF97; Springer, 2008; doi: 10.1007/978-3-540-74234-0. Fig. 2.3

iapws.iapws97._Bound_Ph(P, h)[source]

Region definition for input P y h

Parameters:
  • P (float) – Pressure, [MPa]
  • h (float) – Specific enthalpy, [kJ/kg]
Returns:

region – IAPWS-97 region code

Return type:

float

References

Wagner, W; Kretzschmar, H-J: International Steam Tables: Properties of Water and Steam Based on the Industrial Formulation IAPWS-IF97; Springer, 2008; doi: 10.1007/978-3-540-74234-0. Fig. 2.5

iapws.iapws97._Bound_Ps(P, s)[source]

Region definition for input P and s

Parameters:
  • P (float) – Pressure, [MPa]
  • s (float) – Specific entropy, [kJ/kgK]
Returns:

region – IAPWS-97 region code

Return type:

float

References

Wagner, W; Kretzschmar, H-J: International Steam Tables: Properties of Water and Steam Based on the Industrial Formulation IAPWS-IF97; Springer, 2008; doi: 10.1007/978-3-540-74234-0. Fig. 2.9

iapws.iapws97._Bound_hs(h, s)[source]

Region definition for input h and s

Parameters:
  • h (float) – Specific enthalpy, [kJ/kg]
  • s (float) – Specific entropy, [kJ/kgK]
Returns:

region – IAPWS-97 region code

Return type:

float

References

Wagner, W; Kretzschmar, H-J: International Steam Tables: Properties of Water and Steam Based on the Industrial Formulation IAPWS-IF97; Springer, 2008; doi: 10.1007/978-3-540-74234-0. Fig. 2.14

iapws.iapws97.prop0(T, P)[source]

Ideal gas properties

Parameters:
  • T (float) – Temperature, [K]
  • P (float) – Pressure, [MPa]
Returns:

prop

Dict with calculated properties. The available properties are:

  • v: Specific volume, [m³/kg]
  • h: Specific enthalpy, [kJ/kg]
  • s: Specific entropy, [kJ/kgK]
  • cp: Specific isobaric heat capacity, [kJ/kgK]
  • cv: Specific isocoric heat capacity, [kJ/kgK]
  • w: Speed of sound, [m/s]
  • alfav: Cubic expansion coefficient, [1/K]
  • kt: Isothermal compressibility, [1/MPa]

Return type:

dict

class iapws.iapws97.IAPWS97(**kwargs)[source]

Class to model a state of liquid water or steam with the IAPWS-IF97

Parameters:
  • T (float) – Temperature, [K]
  • P (float) – Pressure, [MPa]
  • h (float) – Specific enthalpy, [kJ/kg]
  • s (float) – Specific entropy, [kJ/kgK]
  • x (float) – Vapor quality, [-]
  • l (float, optional) – Wavelength of light, for refractive index, [μm]

Notes

Definitions options:

  • T, P: Not valid for two-phases region
  • P, h
  • P, s
  • h, s
  • T, x: Only for two-phases region
  • P, x: Only for two-phases region
Returns:prop

The calculated instance has the following properties:

  • P: Pressure, [MPa]
  • T: Temperature, [K]
  • g: Specific Gibbs free energy, [kJ/kg]
  • a: Specific Helmholtz free energy, [kJ/kg]
  • v: Specific volume, [m³/kg]
  • rho: Density, [kg/m³]
  • h: Specific enthalpy, [kJ/kg]
  • u: Specific internal energy, [kJ/kg]
  • s: Specific entropy, [kJ/kg·K]
  • cp: Specific isobaric heat capacity, [kJ/kg·K]
  • cv: Specific isochoric heat capacity, [kJ/kg·K]
  • Z: Compression factor, [-]
  • fi: Fugacity coefficient, [-]
  • f: Fugacity, [MPa]
  • gamma: Isoentropic exponent, [-]
  • alfav: Isobaric cubic expansion coefficient, [1/K]
  • xkappa: Isothermal compressibility, [1/MPa]
  • kappas: Adiabatic compresibility, [1/MPa]
  • alfap: Relative pressure coefficient, [1/K]
  • betap: Isothermal stress coefficient, [kg/m³]
  • joule: Joule-Thomson coefficient, [K/MPa]
  • deltat: Isothermal throttling coefficient, [kJ/kg·MPa]
  • region: Region
  • v0: Ideal specific volume, [m³/kg]
  • u0: Ideal specific internal energy, [kJ/kg]
  • h0: Ideal specific enthalpy, [kJ/kg]
  • s0: Ideal specific entropy, [kJ/kg·K]
  • a0: Ideal specific Helmholtz free energy, [kJ/kg]
  • g0: Ideal specific Gibbs free energy, [kJ/kg]
  • cp0: Ideal specific isobaric heat capacity, [kJ/kg·K]
  • cv0: Ideal specific isochoric heat capacity [kJ/kg·K]
  • w0: Ideal speed of sound, [m/s]
  • gamma0: Ideal isoentropic exponent, [-]
  • w: Speed of sound, [m/s]
  • mu: Dynamic viscosity, [Pa·s]
  • nu: Kinematic viscosity, [m²/s]
  • k: Thermal conductivity, [W/m·K]
  • alfa: Thermal diffusivity, [m²/s]
  • sigma: Surface tension, [N/m]
  • epsilon: Dielectric constant, [-]
  • n: Refractive index, [-]
  • Prandt: Prandtl number, [-]
  • Pr: Reduced Pressure, [-]
  • Tr: Reduced Temperature, [-]
  • Hvap: Vaporization heat, [kJ/kg]
  • Svap: Vaporization entropy, [kJ/kg·K]
Return type:dict

Examples

>>> water=IAPWS97(T=170+273.15, x=0.5)
>>> water.Liquid.cp, water.Vapor.cp, water.Liquid.w, water.Vapor.w
4.3695 2.5985 1418.3 498.78
>>> water=IAPWS97(T=325+273.15, x=0.5)
>>> water.P, water.Liquid.v, water.Vapor.v, water.Liquid.h, water.Vapor.h
12.0505 0.00152830 0.0141887 1493.37 2684.48
>>> water=IAPWS97(T=50+273.15, P=0.0006112127)
>>> water.cp0, water.cv0, water.h0, water.s0, water.w0
1.8714 1.4098 2594.66 9.471 444.93
Attributes:
Gruneisen
Hvap
IntP
Ks
Kt
Liquid
P
Pr
Prandt
Svap
T
Tr
Vapor
Z
Z_rho
a
a0
alfa
alfap
alfav
betap
betas
calculable

Check if class is calculable by its kwargs

cp
cp0
cp0_cv
cp_cv
cv
cv0
dhdP_T
dhdP_rho
dhdT_P
dhdT_rho
dhdrho_P
dhdrho_T
dpdT_rho
dpdrho_T
drhodP_T
drhodT_P
epsilon
f
fi
g
g0
gamma
gamma0
h
h0
hInput
joule
k
kappa
ks
kt
mu
n
nu
phase
region
rho
s
s0
sigma
u
u0
v
v0
w
w0
x

Methods

__call__(**kwargs) Invoke the solver.
calculo() Calculate procedure
derivative(z, x, y, fase) Wrapper derivative for custom derived properties where x, y, z can be: P, T, v, u, h, s, g, a
fill(fase, estado) Fill phase properties
M = 18.015257
Pc = 22.064
Tc = 647.096
rhoc = 322.0
Tt = 273.16
Tb = 373.1243
f_accent = 0.3443
dipole = 1.85498
status = 0
msg = 'Unknown variables'
_thermo = ''
region = None
Liquid = None
Vapor = None
T = None
P = None
v = None
rho = None
phase = None
x = None
Tr = None
Pr = None
sigma = None
v0 = None
h0 = None
u0 = None
s0 = None
a0 = None
g0 = None
cp0 = None
cv0 = None
cp0_cv = None
w0 = None
gamma0 = None
h = None
u = None
s = None
a = None
g = None
Hvap = None
Svap = None
kwargs = {'P': 0.0, 'T': 0.0, 'h': None, 'l': 0.5893, 's': None, 'v': 0.0, 'x': None}
calculable

Check if class is calculable by its kwargs

calculo()[source]

Calculate procedure

fill(fase, estado)[source]

Fill phase properties

derivative(z, x, y, fase)[source]

Wrapper derivative for custom derived properties where x, y, z can be: P, T, v, u, h, s, g, a

class iapws.iapws97.IAPWS97_PT(P, T)[source]

Derivated class for direct P and T input

Attributes:
Gruneisen
Hvap
IntP
Ks
Kt
Liquid
P
Pr
Prandt
Svap
T
Tr
Vapor
Z
Z_rho
a
a0
alfa
alfap
alfav
betap
betas
calculable

Check if class is calculable by its kwargs

cp
cp0
cp0_cv
cp_cv
cv
cv0
dhdP_T
dhdP_rho
dhdT_P
dhdT_rho
dhdrho_P
dhdrho_T
dpdT_rho
dpdrho_T
drhodP_T
drhodT_P
epsilon
f
fi
g
g0
gamma
gamma0
h
h0
hInput
joule
k
kappa
ks
kt
mu
n
nu
phase
region
rho
s
s0
sigma
u
u0
v
v0
w
w0
x

Methods

__call__(**kwargs) Invoke the solver.
calculo() Calculate procedure
derivative(z, x, y, fase) Wrapper derivative for custom derived properties where x, y, z can be: P, T, v, u, h, s, g, a
fill(fase, estado) Fill phase properties
class iapws.iapws97.IAPWS97_Ph(P, h)[source]

Derivated class for direct P and h input

Attributes:
Gruneisen
Hvap
IntP
Ks
Kt
Liquid
P
Pr
Prandt
Svap
T
Tr
Vapor
Z
Z_rho
a
a0
alfa
alfap
alfav
betap
betas
calculable

Check if class is calculable by its kwargs

cp
cp0
cp0_cv
cp_cv
cv
cv0
dhdP_T
dhdP_rho
dhdT_P
dhdT_rho
dhdrho_P
dhdrho_T
dpdT_rho
dpdrho_T
drhodP_T
drhodT_P
epsilon
f
fi
g
g0
gamma
gamma0
h
h0
hInput
joule
k
kappa
ks
kt
mu
n
nu
phase
region
rho
s
s0
sigma
u
u0
v
v0
w
w0
x

Methods

__call__(**kwargs) Invoke the solver.
calculo() Calculate procedure
derivative(z, x, y, fase) Wrapper derivative for custom derived properties where x, y, z can be: P, T, v, u, h, s, g, a
fill(fase, estado) Fill phase properties
class iapws.iapws97.IAPWS97_Ps(P, s)[source]

Derivated class for direct P and s input

Attributes:
Gruneisen
Hvap
IntP
Ks
Kt
Liquid
P
Pr
Prandt
Svap
T
Tr
Vapor
Z
Z_rho
a
a0
alfa
alfap
alfav
betap
betas
calculable

Check if class is calculable by its kwargs

cp
cp0
cp0_cv
cp_cv
cv
cv0
dhdP_T
dhdP_rho
dhdT_P
dhdT_rho
dhdrho_P
dhdrho_T
dpdT_rho
dpdrho_T
drhodP_T
drhodT_P
epsilon
f
fi
g
g0
gamma
gamma0
h
h0
hInput
joule
k
kappa
ks
kt
mu
n
nu
phase
region
rho
s
s0
sigma
u
u0
v
v0
w
w0
x

Methods

__call__(**kwargs) Invoke the solver.
calculo() Calculate procedure
derivative(z, x, y, fase) Wrapper derivative for custom derived properties where x, y, z can be: P, T, v, u, h, s, g, a
fill(fase, estado) Fill phase properties
class iapws.iapws97.IAPWS97_Px(P, x)[source]

Derivated class for direct P and x input

Attributes:
Gruneisen
Hvap
IntP
Ks
Kt
Liquid
P
Pr
Prandt
Svap
T
Tr
Vapor
Z
Z_rho
a
a0
alfa
alfap
alfav
betap
betas
calculable

Check if class is calculable by its kwargs

cp
cp0
cp0_cv
cp_cv
cv
cv0
dhdP_T
dhdP_rho
dhdT_P
dhdT_rho
dhdrho_P
dhdrho_T
dpdT_rho
dpdrho_T
drhodP_T
drhodT_P
epsilon
f
fi
g
g0
gamma
gamma0
h
h0
hInput
joule
k
kappa
ks
kt
mu
n
nu
phase
region
rho
s
s0
sigma
u
u0
v
v0
w
w0
x

Methods

__call__(**kwargs) Invoke the solver.
calculo() Calculate procedure
derivative(z, x, y, fase) Wrapper derivative for custom derived properties where x, y, z can be: P, T, v, u, h, s, g, a
fill(fase, estado) Fill phase properties
class iapws.iapws97.IAPWS97_Tx(T, x)[source]

Derivated class for direct T and x input

Attributes:
Gruneisen
Hvap
IntP
Ks
Kt
Liquid
P
Pr
Prandt
Svap
T
Tr
Vapor
Z
Z_rho
a
a0
alfa
alfap
alfav
betap
betas
calculable

Check if class is calculable by its kwargs

cp
cp0
cp0_cv
cp_cv
cv
cv0
dhdP_T
dhdP_rho
dhdT_P
dhdT_rho
dhdrho_P
dhdrho_T
dpdT_rho
dpdrho_T
drhodP_T
drhodT_P
epsilon
f
fi
g
g0
gamma
gamma0
h
h0
hInput
joule
k
kappa
ks
kt
mu
n
nu
phase
region
rho
s
s0
sigma
u
u0
v
v0
w
w0
x

Methods

__call__(**kwargs) Invoke the solver.
calculo() Calculate procedure
derivative(z, x, y, fase) Wrapper derivative for custom derived properties where x, y, z can be: P, T, v, u, h, s, g, a
fill(fase, estado) Fill phase properties