thermo-utils is a command-line thermodynamics calculator for chemical engineering. It covers pure fluids, heat effects, flow devices, mixtures, phase equilibrium, chemical equilibrium and surface phenomena, and is accurate enough for design work. You only type the substance name: Tc, Pc, ω, Cp, ΔHf, Psat and the other data come from built-in databanks.
Screenshots
Main menu |
Property change between two states |
Installation
pipx install thermo-utils
or uv tool install thermo-utils, or pip install thermo-utils inside a virtual environment.
Usage
Run thermo-utils to open the interactive menu (Esc exits; the program closes after showing a result), or run a calculation directly:
thermo-utils delta water T1=25C P1=1atm T2=300C P2=20bar
thermo-utils pump water T1=25C P1=1atm P2=50bar efficiency=0.75 flow=10kg/s
thermo-utils diagram ethanol,water P=1atm --plot --open
thermo-utils gibbs CH4,H2O,CO,CO2,H2 T=1000 P=1 feed=CH4=2,H2O=3
thermo-utils list # every calculation and its inputs
thermo-utils info ammonia # databank values of a substance
- Units: type them with the value (
25C,10atm,300cm3/mol,5kmol/h), with no space so no quotes are needed. Without a unit the defaults are K, bar, cm³/mol and J/mol. Output units can be changed in the menu (u) or with--T-unit,--P-unit,--E-unit,--V-unit. - Substances: English names, formulas or CAS numbers (
water,H2O,7732-18-5), right after the calculation name. Mixtures are comma separated (ethanol,water). - Devices:
pump,compressor,turbineandvalveare shortcuts fordevice kind=.... - Plots: saved as PNG in
./thermo-plots(or$THERMO_UTILS_PLOTS) and opened on request.
Calculations
Pure fluids
- PVT with ideal gas, virial, van der Waals, RK, SRK, Peng-Robinson, fitted Peng-Robinson and reference EOS, with a side-by-side comparison
- State properties: V, Z, H, S, U, G, A, Cp, Cv, φ, fugacity, κ, β, μJT, speed of sound
- Property changes ΔH, ΔS, ΔU, ΔG, ΔA between two states, including phase change, with the residual-property path
- Saturation (Psat, Tsat, ΔHvap)
Heat effects
- Sensible and latent heats (Riedel, Watson)
- Adiabatic flame temperature
Flow devices
- One-step devices: compressor, pump, turbine and valve, with efficiency and power for a given flow
Mixtures
- Fugacity of species in mixtures (PR, SRK, virial) and the Lewis-Randall rule
- Activity coefficients and excess properties: Margules, van Laar, Wilson, NRTL, UNIQUAC, UNIFAC, UNIFAC-Dortmund
- Margules and van Laar fits from P-x-y data (CSV)
Phase equilibrium
- VLE: bubble/dew P and T and flash, using γ-φ, modified Raoult, Raoult or φ-φ, for multicomponent mixtures
- Pxy, Txy and xy diagrams with azeotrope detection
- LLE with the binodal curve, SLE (eutectic), solubility of solids, osmotic pressure
Chemical equilibrium
- K(T), ΔG° and ΔH° with rigorous ΔCp integration and the van 't Hoff plot
- Equilibrium conversion of one reaction: ideal gas, gas with virial φ̂, ideal liquid or UNIFAC
- Multi-reaction equilibrium by Gibbs energy minimization (no need to write the reactions)
Surface phenomena
- Surface tension σ(T) with surface entropy and enthalpy (databank, Brock-Bird, parachor)
- Kelvin equation (vapor pressure over drops, bubbles and pores)
- Adsorption isotherms (Langmuir, Freundlich, BET with specific surface area) fitted to CSV data
- Gibbs adsorption isotherm (Szyszkowski fit), micellization (CMC, ΔG°mic)
Accuracy
| Model | Use | Typical error |
|---|---|---|
| Reference EOS (CoolProp) | ~120 common fluids (water, CO₂, hydrocarbons, refrigerants, air gases...) | < 0.1 % in density and enthalpy |
| Fitted Peng-Robinson (Twu α + volume translation) | any substance in the databank | ~1 % in Psat, ~2 % in liquid density |
| Peng-Robinson / SRK | any substance in the databank | 1-5 % for gases, 5-30 % for liquid volumes |
| Virial (Pitzer) | gases at low to moderate pressure | < 1-2 % when Vr > 2 |
| UNIFAC / NRTL / UNIQUAC (ChemSep) | liquid mixtures | azeotropes within ~0.5 K for common systems |
The auto model uses the reference EOS when available and the fitted Peng-Robinson otherwise. Its α function and volume shift are fitted to the databank vapor pressure and liquid density of each substance.
Every result starts with the equations used in the calculation. H, S, U, G and A share one reference state (ideal gas at 298.15 K and 1 bar), so differences between models are meaningful. Data come from chemicals, thermo and CoolProp.
Contributing
Contributions are very welcome! thermo-utils still has a lot of room to grow, and I'd be happy to get your help. Found a wrong result, a missing substance or a bug? Have an idea for a new calculation? Open an issue or send a pull request.
Metadata
Release files for thermo-utils 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| thermo_utils-0.2.0.tar.gz | 47.4 kB | With provenance | Details for thermo_utils-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| thermo_utils-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for thermo_utils-0.2.0-py3-none-any.whl |
Total release size: 100.8 kB
Release files / thermo_utils-0.2.0.tar.gz
| Download URL | thermo_utils-0.2.0.tar.gz |
|---|---|
| Size | 47.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
773630aa765f07a370637044f13b2b416b1fb0cf70aff28988aa042b78edc7cc
|
|
BLAKE2b-256 checksum How to use checksums |
ea80c085db37825e2b0c3fede13e5bf9922c4a613288f55080cb7e1816aef4a3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.
Transparency logRelease files / thermo_utils-0.2.0-py3-none-any.whl
| Download URL | thermo_utils-0.2.0-py3-none-any.whl |
|---|---|
| Size | 53.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8bd331759276b2915b1864b5b21b86706744158b379238e4dd1556cccb10fb15
|
|
BLAKE2b-256 checksum How to use checksums |
2816ad42af2e2460ee4f40618e8481e47cf90d58d69c0031fa7ea45638e47f09
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.
Transparency logSecurity for thermo-utils 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for thermo_utils-0.2.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.