Skip to main content

Python implementation of international-standard IAPWS-IF97 steam tables

Project description

Class to model a state for liquid water or steam with the Industrial Formulation IAPWS-IF97

Incoming properties:

- T, Temperature, K
- P, Pressure, MPa
- h, Specific enthalpy, kJ/kg
- s, Specific entropy, kJ/kg·K
- x, Quality

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)


- 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
- gamma, Isoentropic exponent
- alfav, Isobaric cubic expansion coefficient, 1/K
- kt, Isothermal compressibility, 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
- Pr, Prandtl number


from iapws import IAPWS97
sat_steam=IAPWS97(P=1,x=1) #saturated steam with known P
sat_liquid=IAPWS97(T=370, x=0) #saturated liquid with known T
steam=IAPWS97(P=2.5, T=500) #steam with known P and T
print(sat_steam.h, sat_liquid.h, steam.h) #calculated enthalpy

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for iapws, version 1.0.3
Filename, size File type Python version Upload date Hashes
Filename, size iapws-1.0.3.tar.gz (39.4 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page