A Python thermodynamic property wrapper for fluids and mixtures.
Project description
ThermoProp
ThermoProp is a Python thermodynamic property wrapper for fluids, mixtures, and ideal gases.
It provides a clean interface around:
- CoolProp
- PYroMat
- NumPy
- SciPy
Why ThermoProp?
ThermoProp provides a unified API around CoolProp and PYroMat.
Instead of remembering backend-specific syntax such as:
CP.PropsSI(...)
pm.get(...)
users can write:
from thermoprop import Fluid
water = Fluid(
"water",
pressure=101325,
temperature=300,
)
print(water.density)
print(water.enthalpy)
with a consistent interface for pure fluids, mixtures, and ideal gases.
Installation
pip install thermoprop
Features
Fluid
Fluid is a CoolProp-based real-fluid wrapper.
It supports:
- Pure fluids
- Fluid mixtures
- Pressure-temperature states
- Pressure-enthalpy states
- Pressure-quality states
- Temperature-quality states
- Density-based states
- Mass-fraction and mole-fraction mixtures
IdealGas
IdealGas is a PYroMat-based ideal-gas wrapper.
It supports:
- Pure ideal gases
- Ideal-gas mixtures
- Temperature states
- Enthalpy states
- Internal-energy states
- Pressure-density closure
- Cp, Cv, gamma, entropy, Gibbs energy, and speed of sound
Pure Fluid Example
from thermoprop import Fluid
water = Fluid(
"water",
pressure=101325,
temperature=300,
)
print(water.density)
print(water.enthalpy)
print(water.phase)
Pressure-Enthalpy Example
from thermoprop import Fluid
water = Fluid(
"water",
pressure=101325,
enthalpy=2.7e6,
)
print(water.temperature)
print(water.quality)
print(water.phase)
Mixture Example
from thermoprop import Fluid
air_like = Fluid(
{"nitrogen": 0.79, "oxygen": 0.21},
basis="mole",
pressure=101325,
temperature=300,
)
print(air_like.density)
print(air_like.specific_heat_cp)
Ideal Gas Example
from thermoprop import IdealGas
nitrogen = IdealGas(
"gn2",
pressure=101325,
temperature=300,
)
print(nitrogen.density)
print(nitrogen.specific_heat_ratio)
print(nitrogen.speed_of_sound)
Common Properties
from thermoprop import Fluid
fluid = Fluid(
"water",
pressure=101325,
temperature=300,
)
print(fluid.pressure)
print(fluid.temperature)
print(fluid.density)
print(fluid.enthalpy)
print(fluid.entropy)
print(fluid.specific_heat_cp)
print(fluid.specific_heat_cv)
print(fluid.specific_heat_ratio)
print(fluid.speed_of_sound)
print(fluid.dynamic_viscosity)
print(fluid.conductivity)
Source Code
GitHub:
https://github.com/saakethramoju/ThermoProp
License
ThermoProp is released under the GNU General Public License v3.0.
See LICENSE and THIRD_PARTY_LICENSES.md.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file thermoprop-0.1.4.tar.gz.
File metadata
- Download URL: thermoprop-0.1.4.tar.gz
- Upload date:
- Size: 17.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.18 {"installer":{"name":"uv","version":"0.11.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6a8dd472fd7784dbfea05e3cceec8929d8b46d8edc23c42a3c320b3e9778d549
|
|
| MD5 |
526112232c9e5fad5d6cf9ecae5d18f1
|
|
| BLAKE2b-256 |
824c6849f814c8ff98235468472aa22dca0b9d203da04a896d2672f6d100a18d
|
File details
Details for the file thermoprop-0.1.4-py3-none-any.whl.
File metadata
- Download URL: thermoprop-0.1.4-py3-none-any.whl
- Upload date:
- Size: 18.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.18 {"installer":{"name":"uv","version":"0.11.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
67202be432f62f1bf7705dd47fde9648e1e386d40d9ca4a4ecccff6add62cf51
|
|
| MD5 |
74271bf5400f59eaa9aa6546893f956d
|
|
| BLAKE2b-256 |
380b176a4eba16b996c6781eca0f2c36a9ed5fb2c20ccdd7a7877284e19aaad6
|