# iapws._iapws module¶

Miscelaneous IAPWS standards. This module include:

iapws._iapws._Ice(T, P)[source]

Basic state equation for Ice Ih

Parameters: T (float) – Temperature, [K] P (float) – Pressure, [MPa] prop – Dict with calculated properties of ice. The available properties are: rho: Density, [kg/m³] h: Specific enthalpy, [kJ/kg] u: Specific internal energy, [kJ/kg] a: Specific Helmholtz energy, [kJ/kg] g: Specific Gibbs energy, [kJ/kg] s: Specific entropy, [kJ/kgK] cp: Specific isobaric heat capacity, [kJ/kgK] alfav: Cubic expansion coefficient, [1/K] beta: Pressure coefficient, [MPa/K] xkappa: Isothermal compressibility, [1/MPa] ks: Isentropic compressibility, [1/MPa] gt: [∂g/∂T]P gtt: [∂²g/∂T²]P gp: [∂g/∂P]T gpp: [∂²g/∂P²]T gtp: [∂²g/∂T∂P] dict

Notes

Raise NotImplementedError if input isn’t in limit:

• T ≤ 273.16
• P ≤ 208.566
• State below the melting and sublimation lines

Examples

>>> st1 = _Ice(100, 100)
>>> st1["rho"], st1["h"], st1["s"]
941.678203297 -483.491635676 -2.61195122589

>>> st2 = _Ice(273.152519,0.101325)
>>> st2["a"], st2["u"], st2["cp"]
-0.00918701567 -333.465403393 2.09671391024

>>> st3 = _Ice(273.16,611.657e-6)
>>> st3["alfav"], st3["beta"], st3["xkappa"], st3["ks"]
0.000159863102566 1.35714764659 1.17793449348e-04 1.14161597779e-04


References

IAPWS, Revised Release on the Equation of State 2006 for H2O Ice Ih September 2009, http://iapws.org/relguide/Ice-2009.html

iapws._iapws._Liquid(T, P=0.1)[source]

Supplementary release on properties of liquid water at 0.1 MPa

Parameters: T (float) – Temperature, [K] P (float) – Pressure, [MPa] Although this relation is for P=0.1MPa, can be extrapoled at pressure 0.3 MPa prop – Dict with calculated properties of water. The available properties are: h: Specific enthalpy, [kJ/kg] u: Specific internal energy, [kJ/kg] a: Specific Helmholtz energy, [kJ/kg] g: Specific Gibbs energy, [kJ/kg] s: Specific entropy, [kJ/kgK] cp: Specific isobaric heat capacity, [kJ/kgK] cv: Specific isochoric heat capacity, [kJ/kgK] w: Speed of sound, [m/s²] rho: Density, [kg/m³] v: Specific volume, [m³/kg] vt: [∂v/∂T]P, [m³/kgK] vtt: [∂²v/∂T²]P, [m³/kgK²] vp: [∂v/∂P]T, [m³/kg/MPa] vtp: [∂²v/∂T∂P], [m³/kg/MPa] alfav: Cubic expansion coefficient, [1/K] xkappa : Isothermal compressibility, [1/MPa] ks: Isentropic compressibility, [1/MPa] mu: Viscosity, [Pas] k: Thermal conductivity, [W/mK] epsilon: Dielectric constant, [-] dict

Notes

Raise NotImplementedError if input isn’t in limit:

• 253.15 ≤ T ≤ 383.15
• 0.1 ≤ P ≤ 0.3

Examples

>>> st1 = _Liquid(260)
>>> st1["rho"], st1["h"], st1["s"]
997.0683602710492 -55.86223174460868 -0.20998554842619535


References

IAPWS, Revised Supplementary Release on Properties of Liquid Water at 0.1 MPa, http://www.iapws.org/relguide/LiquidWater.html

iapws._iapws._Supercooled(T, P)[source]

Guideline on thermodynamic properties of supercooled water

Parameters: T (float) – Temperature, [K] P (float) – Pressure, [MPa] prop – Dict with calculated properties of water. The available properties are: L: Ordering field, [-] x: Mole fraction of low-density structure, [-] rho: Density, [kg/m³] s: Specific entropy, [kJ/kgK] h: Specific enthalpy, [kJ/kg] u: Specific internal energy, [kJ/kg] a: Specific Helmholtz energy, [kJ/kg] g: Specific Gibbs energy, [kJ/kg] alfap: Thermal expansion coefficient, [1/K] xkappa : Isothermal compressibility, [1/MPa] cp: Specific isobaric heat capacity, [kJ/kgK] cv: Specific isochoric heat capacity, [kJ/kgK] w: Speed of sound, [m/s²] dict

Notes

Raise NotImplementedError if input isn’t in limit:

• Tm ≤ T ≤ 300
• 0 < P ≤ 1000

The minimum temperature in range of validity is the melting temperature, it depend of pressure

Raise RuntimeError if solution isn’t founded

Examples

>>> liq = _supercooled(235.15, 0.101325)
>>> liq["rho"], liq["cp"], liq["w"]
968.09999 5.997563 1134.5855


References

iapws, guideline on thermodynamic properties of supercooled water, http://iapws.org/relguide/Supercooled.html

iapws._iapws._Sublimation_Pressure(T)[source]

Sublimation Pressure correlation

Parameters: T (float) – Temperature, [K] P – Pressure at sublimation line, [MPa] float

Notes

Raise NotImplementedError if input isn’t in limit:

• 50 ≤ T ≤ 273.16

Examples

>>> _Sublimation_Pressure(230)
8.947352740189152e-06


References

IAPWS, Revised Release on the Pressure along the Melting and Sublimation Curves of Ordinary Water Substance, http://iapws.org/relguide/MeltSub.html.

iapws._iapws._Melting_Pressure(T, ice='Ih')[source]

Melting Pressure correlation

Parameters: T (float) – Temperature, [K] ice (string) – Type of ice: Ih, III, V, VI, VII. Below 273.15 is a mandatory input, the ice Ih is the default value. Above 273.15, the ice type is unnecesary. P – Pressure at sublimation line, [MPa] float

Notes

Raise NotImplementedError if input isn’t in limit:

• 251.165 ≤ T ≤ 715

Examples

>>> _Melting_Pressure(260)
8.947352740189152e-06
>>> _Melting_Pressure(254, "III")
268.6846466336108


References

IAPWS, Revised Release on the Pressure along the Melting and Sublimation Curves of Ordinary Water Substance, http://iapws.org/relguide/MeltSub.html.

iapws._iapws._Viscosity(rho, T, fase=None, drho=None)[source]

Equation for the Viscosity

Parameters: rho (float) – Density, [kg/m³] T (float) – Temperature, [K] fase (dict, optional for calculate critical enhancement) – phase properties drho (float, optional for calculate critical enhancement) – [∂ρ/∂P]T at reference state, μ – Viscosity, [Pa·s] float

Examples

>>> _Viscosity(998, 298.15)
0.0008897351001498108
>>> _Viscosity(600, 873.15)
7.743019522728247e-05


References

IAPWS, Release on the IAPWS Formulation 2008 for the Viscosity of Ordinary Water Substance, http://www.iapws.org/relguide/viscosity.html

iapws._iapws._ThCond(rho, T, fase=None, drho=None)[source]

Equation for the thermal conductivity

Parameters: rho (float) – Density, [kg/m³] T (float) – Temperature, [K] fase (dict, optional for calculate critical enhancement) – phase properties drho (float, optional for calculate critical enhancement) – [∂ρ/∂P]T at reference state, k – Thermal conductivity, [W/mK] float

Examples

>>> _ThCond(998, 298.15)
0.6077128675880629
>>> _ThCond(0, 873.15)
0.07910346589648833


References

IAPWS, Release on the IAPWS Formulation 2011 for the Thermal Conductivity of Ordinary Water Substance, http://www.iapws.org/relguide/ThCond.html

iapws._iapws._Tension(T)[source]

Equation for the surface tension

Parameters: T (float) – Temperature, [K] σ – Surface tension, [N/m] float

Notes

Raise NotImplementedError if input isn’t in limit:

• 248.15 ≤ T ≤ 647
• Estrapolate to -25ºC in supercooled liquid metastable state

Examples

>>> _Tension(300)
0.0716859625
>>> _Tension(450)
0.0428914992


References

IAPWS, Revised Release on Surface Tension of Ordinary Water Substance June 2014, http://www.iapws.org/relguide/Surf-H2O.html

iapws._iapws._Dielectric(rho, T)[source]

Equation for the Dielectric constant

Parameters: rho (float) – Density, [kg/m³] T (float) – Temperature, [K] epsilon – Dielectric constant, [-] float

Notes

Raise NotImplementedError if input isn’t in limit:

• 238 ≤ T ≤ 1200

Examples

>>> _Dielectric(999.242866, 298.15)
78.5907250
>>> _Dielectric(26.0569558, 873.15)
1.12620970


References

IAPWS, Release on the Static Dielectric Constant of Ordinary Water Substance for Temperatures from 238 K to 873 K and Pressures up to 1000 MPa, http://www.iapws.org/relguide/Dielec.html

iapws._iapws._Refractive(rho, T, lr=0.5893)[source]

Equation for the refractive index

Parameters: rho (float) – Density, [kg/m³] T (float) – Temperature, [K] lr (float, optional) – Light Wavelength, [μm] n – Refractive index, [-] float

Notes

Raise NotImplementedError if input isn’t in limit:

• 0 ≤ ρ ≤ 1060
• 261.15 ≤ T ≤ 773.15
• 0.2 ≤ λ ≤ 1.1

Examples

>>> _Refractive(997.047435, 298.15, 0.2265)
1.39277824
>>> _Refractive(30.4758534, 773.15, 0.5893)
1.00949307


References

IAPWS, Release on the Refractive Index of Ordinary Water Substance as a Function of Wavelength, Temperature and Pressure, http://www.iapws.org/relguide/rindex.pdf

iapws._iapws._Kw(rho, T)[source]

Equation for the ionization constant of ordinary water

Parameters: rho (float) – Density, [kg/m³] T (float) – Temperature, [K] pKw – Ionization constant in -log10(kw), [-] float

Notes

Raise NotImplementedError if input isn’t in limit:

• 0 ≤ ρ ≤ 1250
• 273.15 ≤ T ≤ 1073.15

Examples

>>> _Kw(1000, 300)
13.906565


References

IAPWS, Release on the Ionization Constant of H2O, http://www.iapws.org/relguide/Ionization.pdf

iapws._iapws._Conductivity(rho, T)[source]

Equation for the electrolytic conductivity of liquid and dense supercrítical water

Parameters: rho (float) – Density, [kg/m³] T (float) – Temperature, [K] K – Electrolytic conductivity, [S/m] float

Notes

Raise NotImplementedError if input isn’t in limit:

• 600 ≤ ρ ≤ 1200
• 273.15 ≤ T ≤ 1073.15

Examples

>>> _Conductivity(1000, 373.15)
1.13


References

IAPWS, Electrolytic Conductivity (Specific Conductance) of Liquid and Dense Supercritical Water from 0°C to 800°C and Pressures up to 1000 MPa, http://www.iapws.org/relguide/conduct.pdf

iapws._iapws._D2O_Viscosity(rho, T, fase=None, drho=None)[source]

Equation for the Viscosity of heavy water

Parameters: rho (float) – Density, [kg/m³] T (float) – Temperature, [K] fase (dict, optional for calculate critical enhancement) – phase properties drho (float, optional for calculate critical enhancement) – [∂ρ/∂P]T at reference state, μ – Viscosity, [Pa·s] float

Examples

>>> _D2O_Viscosity(998, 298.15)
0.0008897351001498108
>>> _D2O_Viscosity(600, 873.15)
7.743019522728247e-05


References

IAPWS, Release on the IAPWS Formulation 2020 for the Viscosity of Heavy Water, http://iapws.org/relguide/D2Ovisc.pdf

iapws._iapws._D2O_ThCond(rho, T, fase=None, drho=None)[source]

Equation for the thermal conductivity of heavy water

Parameters: rho (float) – Density, [kg/m³] T (float) – Temperature, [K] fase (dict, optional for calculate critical enhancement) – phase properties drho (float, optional for calculate critical enhancement) – [∂ρ/∂P]T at reference state, k – Thermal conductivity, [W/mK] float

Examples

>>> _D2O_ThCond(998, 298.15)
0.6077128675880629
>>> _D2O_ThCond(0, 873.15)
0.07910346589648833


References

IAPWS, Release on the IAPWS Formulation 2021 for the Thermal Conductivity of Heavy Water, http://iapws.org/relguide/D2OThCond.pdf

iapws._iapws._D2O_Tension(T)[source]

Equation for the surface tension of heavy water

Parameters: T (float) – Temperature, [K] σ – Surface tension, [N/m] float

Notes

Raise NotImplementedError if input isn’t in limit:

• 269.65 ≤ T ≤ 643.847

Examples

>>> _D2O_Tension(298.15)
0.07186
>>> _D2O_Tension(573.15)
0.01399


References

IAPWS, Release on Surface Tension of Heavy Water Substance, http://www.iapws.org/relguide/surfd2o.pdf

iapws._iapws._D2O_Sublimation_Pressure(T)[source]

Sublimation Pressure correlation for heavy water

Parameters: T (float) – Temperature, [K] P – Pressure at sublimation line, [MPa] float

Notes

Raise NotImplementedError if input isn’t in limit:

• 210 ≤ T ≤ 276.969

Examples

>>> _Sublimation_Pressure(245)
3.27390934e-5


References

IAPWS, Revised Release on the IAPWS Formulation 2017 for the Thermodynamic Properties of Heavy Water, http://www.iapws.org/relguide/Heavy.html.

iapws._iapws._D2O_Melting_Pressure(T, ice='Ih')[source]

Melting Pressure correlation for heavy water

Parameters: T (float) – Temperature, [K] ice (string) – Type of ice: Ih, III, V, VI, VII. Below 276.969 is a mandatory input, the ice Ih is the default value. Above 276.969, the ice type is unnecesary. P – Pressure at melting line, [MPa] float

Notes

Raise NotImplementedError if input isn’t in limit:

• 254.415 ≤ T ≤ 315

Examples

>>> _D2O__Melting_Pressure(260)
8.947352740189152e-06
>>> _D2O__Melting_Pressure(254, "III")
268.6846466336108


References

IAPWS, Revised Release on the Pressure along the Melting and Sublimation Curves of Ordinary Water Substance, http://iapws.org/relguide/MeltSub.html.

iapws._iapws._Henry(T, gas, liquid='H2O')[source]

Equation for the calculation of Henry’s constant

Parameters: T (float) – Temperature, [K] gas (string) – Name of gas to calculate solubility liquid (string) – Name of liquid solvent, can be H20 (default) or D2O kw – Henry’s constant, [MPa] float

Notes

The gas availables for H2O solvent are He, Ne, Ar, Kr, Xe, H2, N2, O2, CO, CO2, H2S, CH4, C2H6, SF6 For D2O as solvent He, Ne, Ar, Kr, Xe, D2, CH4

Raise NotImplementedError if input gas or liquid are unsupported

Examples

>>> _Henry(500, "He")
1.1973
>>> _Henry(300, "D2", "D2O")
1.6594


References

IAPWS, Guideline on the Henry’s Constant and Vapor-Liquid Distribution Constant for Gases in H2O and D2O at High Temperatures, http://www.iapws.org/relguide/HenGuide.html

iapws._iapws._Kvalue(T, gas, liquid='H2O')[source]

Equation for the vapor-liquid distribution constant

Parameters: T (float) – Temperature, [K] gas (string) – Name of gas to calculate solubility liquid (string) – Name of liquid solvent, can be H20 (default) or D2O kd – Vapor-liquid distribution constant, [-] float

Notes

The gas availables for H2O solvent are He, Ne, Ar, Kr, Xe, H2, N2, O2, CO, CO2, H2S, CH4, C2H6, SF6

For D2O as solvent He, Ne, Ar, Kr, Xe, D2, CH4

Raise NotImplementedError if input gas or liquid are unsupported

Examples

>>> _Kvalue(600, "He")
3.8019
>>> _Kvalue(300, "D2", "D2O")
14.3520


References

IAPWS, Guideline on the Henry’s Constant and Vapor-Liquid Distribution Constant for Gases in H2O and D2O at High Temperatures, http://www.iapws.org/relguide/HenGuide.html