Registry / devops / thermo

thermo

JSON →
library0.6.0pypypi✓ verified 84d ago

thermo is a chemical properties component of the Chemical Engineering Design Library (ChEDL). Version 0.6.0 provides extensive pure component, mixture, and reaction properties, with correlations for thermophysical, transport, and critical properties. Released regularly via PyPI with active development.

pip install thermo
INSTALL
IMPORT
SIG · THERMO
T
thermo
devopspythonv0.6.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Chemical
from thermo import Chemical
old_module.Chemical()
Previously available via thermo.chemical, but direct from thermo is correct.
Mixture
from thermo import Mixture
thermo.mixture.Mixture()
Common mistake: accessing via submodule instead of top-level.
Reaction
from thermo import Reaction
thermo.reaction.Reaction()
Use top-level import for simplicity.

Create a Chemical object and calculate properties at specified conditions.

from thermo import Chemical # Create a chemical by CAS number, name, or formula water = Chemical('water') print(f"MW: {water.MW:.3f} g/mol") print(f"Tb: {water.Tb:.2f} K") print(f"Tc: {water.Tc:.2f} K") print(f"Pc: {water.Pc:.2f} Pa") print(f"Vc: {water.Vc:.6f} m3/mol") # Change temperature to calculate properties water.calculate(298.15) print(f"Density at 298.15 K: {water.rho:.3f} kg/m3") print(f"Viscosity at 298.15 K: {water.mu:.6f} Pa*s")
Debug
Known issues
breakingIn version 0.6.0, the Chemical class no longer auto-calculates all properties at default temperature; you must call .calculate() explicitly.
fix
After creating a Chemical object (e.g., water = Chemical('water')), call water.calculate(T) to set temperature and compute properties.
affects: >=0.6.0
deprecatedDirect access to properties like .rho, .mu, etc. without calling .calculate() first returns None or raises an AttributeError in 0.6.0.
fix
Always use .calculate(temperature) before accessing calculated properties.
affects: 0.6.0
gotchaThe Chemical constructor with only identifier may take long due to database loading; avoid creating many Chemicals in a loop.
fix
Create once and reuse, or use Chemical.from_data() if you have pre-loaded data.
affects: all
Errors
Common errors & fixes
AttributeError: 'Chemical' object has no attribute 'rho'
In version 0.6.0, properties are not auto-computed; you must call .calculate(T) first.
fix
Add water.calculate(298.15) before accessing water.rho.
ModuleNotFoundError: No module named 'thermo.chemical'
Import path changed; top-level import is now from thermo import Chemical.
fix
Use from thermo import Chemical instead of import thermo.chemical.
ValueError: Could not parse chemical identifier 'H2O'
Incorrect identifier format; some strings (like 'H2O') may not be recognized.
fix
Use a known CAS number, common name (e.g., 'water'), or molecular formula with correct capitalization (e.g., 'H2O' works). Check thermo.Chemical.search() for valid identifiers.
Upgrade
Version history
0.6.0latest on PyPI · released Oct 26, 2025
Audit
Dependencies
numpyrequiredRequired for array operations and numerical methods.
scipyrequiredRequired for interpolation and optimization routines.
pandasoptionalUsed for data handling and optional CSV/Excel output.
Agent activity
41 hits · last 30 days
node
34
Amazon
1
OpenAI (training)
1
Resources
thermo — pip install thermo · libregistry