Vapor-liquid equilibrium (VLE) thermodynamic calculator: 22+ cubic EOS, activity models, flash algorithms
Project description
vle-thermo
Vapor-liquid equilibrium (VLE) thermodynamic calculator with a Rust computation engine and a Python interface.
A modern Rust + Python port of two legacy thermodynamic codebases (VB6 ~15,000
lines + Pascal ~2,500 lines). The Rust core (vle-thermo crate) does the
computation; this Python package wraps it for interactive use in scripts and
Jupyter notebooks.
Install
pip install vle-thermo
Optional extras:
pip install "vle-thermo[plot]" # adds matplotlib
pip install "vle-thermo[db]" # adds `thermo` for extended component-database seeding
pip install "vle-thermo[dev]" # adds pytest, maturin
The distribution name on PyPI is vle-thermo, but the import name is
vle (following the common distribution-vs-import split, like
Pillow → import PIL or python-dateutil → import dateutil):
import vle
Status
0.1.x — the component database, CLI, and units layer work today. Numerical
kernels (flash algorithms, equation-of-state solvers, parameter regression) are
under active development. Treat 0.1.x as pre-release; semver promises begin
at 1.0.
See the roadmap for what's shipped vs. planned.
What works today
# Initialize the bundled component database (SQLite) and seed with the 15
# compounds from Chapter IV of the source thesis.
vle-db init
vle-db seed --source chapter4
# Browse and inspect
vle-db list
vle-db show methane
vle-db validate chapter4
from vle.db import list_components, get_component
for c in list_components():
print(c.name, c.tc, c.pc, c.omega)
methane = get_component("methane")
Unit-aware input/output (gauge pressure, °C, °F, psi, barg, mmHg, …):
from vle.units import ureg, Q_
T = Q_(25, "degC") # 298.15 K internally
P = Q_(3.5, "bar").to("kPa") # 350 kPa
Features (full roadmap)
- 22+ cubic equations of state — Peng-Robinson, RKS, van der Waals, Schmidt-Wenzel, Patel-Teja, and more
- 5 activity coefficient models — Wilson, van Laar, Margules, Scatchard-Hildebrand, Ideal
- 11 mixing rules — Classical (IVDW, IIVDW), Wong-Sandler, Huron-Vidal, MHV1/MHV2
- 6 saturation pressure correlations — Antoine, Riedel, Müller, RPM
- 6 flash calculation types — bubble/dew point (T/P), isothermal (Rachford-Rice), adiabatic
- Parameter regression — kij (binary interaction) and Aij (activity model)
Use it in Jupyter
A curated set of notebooks reproducing Chapter IV of the source thesis ships alongside the project at https://github.com/miguelju/vle/tree/main/notebooks. To run them in your own environment:
pip install "vle-thermo[plot]" jupyterlab
git clone https://github.com/miguelju/vle.git
cd vle/notebooks
jupyter lab
For a zero-setup option, a ready-to-run Docker image is published at
ghcr.io/miguelju/vle-thermo:
docker run --rm -p 8888:8888 ghcr.io/miguelju/vle-thermo:latest
Origin
Based on the thesis "Desarrollo de un Programa Computacional para el Cálculo del Equilibrio Líquido Vapor de Mezclas Multicomponentes bajo el Ambiente Windows" (Jackson & Mendible, Universidad Simón Bolívar, 1999), with additional models from Da Silva & Báez (1989). See the research paper (English translation) for algorithms, parameters, and their academic references.
License
MIT. See LICENSE.
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 Distributions
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 vle_thermo-0.1.2.tar.gz.
File metadata
- Download URL: vle_thermo-0.1.2.tar.gz
- Upload date:
- Size: 40.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
494bb48acca9073ed9de1b8536028a336c07ee7e4bccfa9e978e8af591f2c410
|
|
| MD5 |
ed82972f1411c7ed71baf18a39692f5c
|
|
| BLAKE2b-256 |
05ba885b5998ac72d1383582393dd80a247473ea2bbef8887e06d2ef9ea96603
|
Provenance
The following attestation bundles were made for vle_thermo-0.1.2.tar.gz:
Publisher:
release.yml on miguelju/vle
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vle_thermo-0.1.2.tar.gz -
Subject digest:
494bb48acca9073ed9de1b8536028a336c07ee7e4bccfa9e978e8af591f2c410 - Sigstore transparency entry: 1610697373
- Sigstore integration time:
-
Permalink:
miguelju/vle@61e8cc99286b707ac923be9f85b4eb1178d17dbe -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/miguelju
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@61e8cc99286b707ac923be9f85b4eb1178d17dbe -
Trigger Event:
push
-
Statement type:
File details
Details for the file vle_thermo-0.1.2-cp310-abi3-win_amd64.whl.
File metadata
- Download URL: vle_thermo-0.1.2-cp310-abi3-win_amd64.whl
- Upload date:
- Size: 154.3 kB
- Tags: CPython 3.10+, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f860abf5aabdfd41753c16c785157044350c5d341e85ec8b44ca602861614082
|
|
| MD5 |
0b8233daf2ccfb6ba60857a060bb0e5c
|
|
| BLAKE2b-256 |
420c9860f56c8f9d848c29b279a200c7fc229ec9607bb96e5c60ea62fc8108d0
|
Provenance
The following attestation bundles were made for vle_thermo-0.1.2-cp310-abi3-win_amd64.whl:
Publisher:
release.yml on miguelju/vle
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vle_thermo-0.1.2-cp310-abi3-win_amd64.whl -
Subject digest:
f860abf5aabdfd41753c16c785157044350c5d341e85ec8b44ca602861614082 - Sigstore transparency entry: 1610697494
- Sigstore integration time:
-
Permalink:
miguelju/vle@61e8cc99286b707ac923be9f85b4eb1178d17dbe -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/miguelju
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@61e8cc99286b707ac923be9f85b4eb1178d17dbe -
Trigger Event:
push
-
Statement type:
File details
Details for the file vle_thermo-0.1.2-cp310-abi3-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: vle_thermo-0.1.2-cp310-abi3-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 285.4 kB
- Tags: CPython 3.10+, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5a88a511ea6ca8b7e021aca8c9c3b108a4ca943345d68cde573622f76ec02a2b
|
|
| MD5 |
f118ecef4c7d9a4e76efd6fa5cdf9880
|
|
| BLAKE2b-256 |
ab0bbdcca5f8cb6e76946e6be60fde460485d061c888bd5629b179a32a524c09
|
Provenance
The following attestation bundles were made for vle_thermo-0.1.2-cp310-abi3-manylinux_2_28_x86_64.whl:
Publisher:
release.yml on miguelju/vle
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vle_thermo-0.1.2-cp310-abi3-manylinux_2_28_x86_64.whl -
Subject digest:
5a88a511ea6ca8b7e021aca8c9c3b108a4ca943345d68cde573622f76ec02a2b - Sigstore transparency entry: 1610697632
- Sigstore integration time:
-
Permalink:
miguelju/vle@61e8cc99286b707ac923be9f85b4eb1178d17dbe -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/miguelju
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@61e8cc99286b707ac923be9f85b4eb1178d17dbe -
Trigger Event:
push
-
Statement type:
File details
Details for the file vle_thermo-0.1.2-cp310-abi3-manylinux_2_28_aarch64.whl.
File metadata
- Download URL: vle_thermo-0.1.2-cp310-abi3-manylinux_2_28_aarch64.whl
- Upload date:
- Size: 280.6 kB
- Tags: CPython 3.10+, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cc2b75d99da764b3a7502c5f882e295a7c610b30c58d9d37b194cdae391ca766
|
|
| MD5 |
d5e56fbf5bc0ddb6c7b5143a3cc36aaa
|
|
| BLAKE2b-256 |
13b91020b06988d1c6ebae48d638961f6824e66da2e698f2247061cbb8b49e3d
|
Provenance
The following attestation bundles were made for vle_thermo-0.1.2-cp310-abi3-manylinux_2_28_aarch64.whl:
Publisher:
release.yml on miguelju/vle
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vle_thermo-0.1.2-cp310-abi3-manylinux_2_28_aarch64.whl -
Subject digest:
cc2b75d99da764b3a7502c5f882e295a7c610b30c58d9d37b194cdae391ca766 - Sigstore transparency entry: 1610697438
- Sigstore integration time:
-
Permalink:
miguelju/vle@61e8cc99286b707ac923be9f85b4eb1178d17dbe -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/miguelju
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@61e8cc99286b707ac923be9f85b4eb1178d17dbe -
Trigger Event:
push
-
Statement type:
File details
Details for the file vle_thermo-0.1.2-cp310-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: vle_thermo-0.1.2-cp310-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 246.4 kB
- Tags: CPython 3.10+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
03341aefa660d657a6228c969d395951d514d31649875d1d724135d30534b075
|
|
| MD5 |
d75820fa1e04f5d394893ed458838f69
|
|
| BLAKE2b-256 |
9aa6b40780cac75d13893b1f748dca44bc09a6b50c2371c71fc1e0daee0a49ed
|
Provenance
The following attestation bundles were made for vle_thermo-0.1.2-cp310-abi3-macosx_11_0_arm64.whl:
Publisher:
release.yml on miguelju/vle
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vle_thermo-0.1.2-cp310-abi3-macosx_11_0_arm64.whl -
Subject digest:
03341aefa660d657a6228c969d395951d514d31649875d1d724135d30534b075 - Sigstore transparency entry: 1610697564
- Sigstore integration time:
-
Permalink:
miguelju/vle@61e8cc99286b707ac923be9f85b4eb1178d17dbe -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/miguelju
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@61e8cc99286b707ac923be9f85b4eb1178d17dbe -
Trigger Event:
push
-
Statement type: