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
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: python setup.py test but make sure numpy is installed
To test if setup was successful, run python3 bin/pyXSteamDemo.py. This will require numpy and matplotlib to be installed.
There are still (as of v0.4.2) some Errors in the speed of sound functions (w_ps), so be warned that they exceed the Error Range. Apart form accuracy errors, there should be no warnings.
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 bellow:
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.