You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A .NET implementation is availible thanks to the work of rogerlew here: XSteamNET.
XSteam provides (mostly) accurate steam and water properties from 0 -
1000 bar and from 0 - 2000 °C according to the IAPWS release IF-97. For
accuracy of the functions in different regions see IF-97 Page 4
Also includes thermal conductivity and viscosity, which are not part of
the IF97 release.
Some effort has been made to include the refined function of more recent releases
and also functions for calculations on heavy water. This includes:
IAPWS R4
IAPWS R14
Contributors to pyXSteam
In chronological order:
IAPWS
Magnus Holmgren
drunsinn
mohit0749
gonmolina
xjtu-blacksmith
Requirements
There are no requirements for installing pyXSteam with Python 3.6 and up.
Tests require numpy, demos require numpy and matplotlib
Install
run python3 setup.py install
To run unittests you need two additional packages: pytest and numpy. After installing both, just run pytest in
the base directory. The tests use some fixed values from the documentation to make sure that every coefficient
and formula works as intended.
To test if setup was successful, run python3 bin/pyXSteamDemo.py. This will require numpy and matplotlib to be installed.
Nomenclature
All Functions follow the same naming schema: First the wanted property,
then a underscore _, then the wanted input properties Example:
t_ph is temperature as a function of pressure and enthalpy. For a list
of valid functions se below:
Property
Description
t
Temperature (°C or °F)
p
Pressure (bar or psi)
h
Enthalpy (kJ/kg or btu/lb)
v
Specific volume (m3/kg or ft^3/lb)
rho
Density (kg/m3 or lb/ft^3)
s
Specific entropy (kJ/(kg °C) or btu/(lb °F))
u
Specific internal energy (kJ/kg or btu/lb)
Cp
Specific isobaric heat capacity (kJ/(kg °C) or btu/(lb °F))
Cv
Specific isochoric heat capacity (kJ/(kg °C) or btu/(lb °F))
w
Speed of sound (m/s or ft/s)
my
Viscosity (N s/m^2 or lbm/ft/hr)
tc
Thermal Conductivity (W/(m °C) or btu/(h ft °F))
st
Surface Tension (N/m or lb/ft)
x
Vapor fraction
vx
Vapor Volume Fraction
Usage
Simple Example:
from pyXSteam.XSteam import XSteam
steamTable = XSteam(XSteam.UNIT_SYSTEM_MKS)
print(steamTable.hL_p(220.0))
By using the unitSystem Parameter, you can tell XSteam witch Unit System you are using.