Skip to main content

pipeline status

coverage report

XSteamPython

Port of XSteam tables into Python originally released by Magnus Holmgren.

XSteam provides steam and water properties according to IAPWS release IF-97. The range of applicability is from 0-1000 bar and 0-2000 °C.

Some transport properties (thermal conductivity and viscosity) are also available and based upon IAPWS 1998.

Installation

Two options are available. The first is to install from PyPI using pip

pip install XSteamPython

Or by cloning and running

python setup.py install

Requirements

XSteamPython only requires that SciPy be installed.

For development, all dependencies are contained in requirements.txt.

Usage

>>> import XSteamPython as stm
>>> enthalpy=stm.h_pT(101.0, 300.0)
>>> print(enthalpy)
3074.515918340631
>>> stm.switchUnits()
Using English units
>>> enthalpy=stm.h_pT(14.7, 70.0)
>>> print(enthalpy)
38.11798524502647
>>> dir(stm)
['Boundaries', 'Constants', 'Convert', 'P_hs', 'Pr_pT', 'Pr_ph', 'Psat_T', 'Psat_s', 'Region1', 'Region2', 'Region3', 'Region4', 'Region5', 'Regions', 'T_hs', 'T_ph', 'T_ps', 'Tsat_p', 'Tsat_s', 'Viscosity', 'XSteamPython', '__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__path__', '__spec__', 'cpL_T', 'cpL_p', 'cpV_T', 'cpV_p', 'cp_pT', 'cp_ph', 'cp_ps', 'cvL_T', 'cvL_p', 'cvV_T', 'cvV_p', 'cv_pT', 'cv_ph', 'cv_ps', 'englishUnits', 'hL_T', 'hL_p', 'hV_T', 'hV_p', 'h_Tx', 'h_pT', 'h_ps', 'h_px', 'kappa_pT', 'kappa_ph', 'math', 'my_pT', 'my_ph', 'my_ps', 'rhoL_T', 'rhoL_p', 'rhoV_T', 'rhoV_p', 'rho_pT', 'rho_ph', 'rho_ps', 'sL_T', 'sL_p', 'sV_T', 'sV_p', 's_pT', 's_ph', 'st_p', 'st_t', 'surfaceTension_T', 'switchUnits', 'tcL_T', 'tcL_p', 'tcV_T', 'tcV_p', 'tc_hs', 'tc_pT', 'tc_pTrho', 'tc_ph', 'uL_T', 'uL_p', 'uV_T', 'uV_p', 'u_pT', 'u_ph', 'u_ps', 'vL_T', 'vL_p', 'vV_T', 'vV_p', 'v_pT', 'v_ph', 'v_ps', 'vx_ph', 'vx_ps', 'wL_T', 'wL_p', 'wV_T', 'wV_p', 'w_pT', 'w_ph', 'w_ps', 'x_ph', 'x_ps']

Note that calling stm.switchUnits() changes from SI to English units and vice versa. Default is SI units.

Syntax

The syntax for function calling is first the wanted property, followed by an underscore followed by input property(ies). Example:

h_pT(101.0, 300.0)

The example will return enthalpy given a pressure (101 kPa) and temperature (300 °C).

Property Key
T Temperature (°C or °F)
p Pressure (kPa or psi)
h Enthalpy (kJ/kg or btu/lb)
v Specific volume (m**3/kg or ft**3/lb)
rho Density (kg/m**3 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 heat capacity constant pressure (kJ/(kg°C) or btu/(lb°F))
Cv Specific heat capacity constant volume (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)
Pr Prandtl number
kappa Heat capacity ratio
tc Thermal Conductivity (W/(m*°C) or btu/(h*ft*°F))
st Surface Tension (N/m or lb/ft)
x Vapor fraction (dmnls)
vx Vapor Volume Fraction (dmnls)

Some functions can have a little extra after the wanted property

Tag Key
L Liquid phase
V Vapor phase
sat At saturation

Release files for XSteamPython 1.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for XSteamPython 1.0.3
File Size Uploaded
XSteamPython-1.0.3.tar.gz 39.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for XSteamPython 1.0.3
File Interpreter ABI Platform
XSteamPython-1.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 82.1 kB

Release files / XSteamPython-1.0.3.tar.gz

Download URL XSteamPython-1.0.3.tar.gz
Size 39.6 kB
Tags Source
SHA-256 checksum
How to use checksums
1cdbc8cc5f1d44deadfae91c6f4e0f4921d1cd103e926a9992b121eecfeff297
BLAKE2b-256 checksum
How to use checksums
1984ae8395145e98e2b30ea7896a3b73dd815de242522aebfe28ffc1f2eeb757
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.1

Release files / XSteamPython-1.0.3-py3-none-any.whl

Download URL XSteamPython-1.0.3-py3-none-any.whl
Size 42.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f87761c3874a8f1f5c1100451adf2a861252fe254ed830553e92d1a5a73c9152
BLAKE2b-256 checksum
How to use checksums
b45da71755d64d8c089d37f7c4ae196a97e9da1527949821b4d492607d0e2eb7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.1

Release history Release notifications | RSS feed

This release

1.0.3 This release

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page