Staged-separation (distillation) column solver: McCabe–Thiele, Ponchon–Savarit, FUG shortcut, and rigorous MESH methods, built on vle-thermo
Project description
stages-thermo
A staged-separation (distillation) learning library and fast steady-state
column solver, built on vle-thermo.
import stages — walk the full pedagogical ladder of column methods
(McCabe–Thiele → Ponchon–Savarit → Fenske–Underwood–Gilliland shortcut →
rigorous MESH), each implemented from scratch and anchored to its textbook
equations, with a granular, batch-capable API ("numpy for distillation
columns"). All thermodynamics come from vle-thermo; this package adds none of
its own.
pip install stages-thermo # import name is `stages`
pip install "stages-thermo[plot]" # + matplotlib for the staircase diagrams
Status:
0.1.xships the first rung of the ladder — the binary McCabe–Thiele layer (Milestone 1): equilibrium curves from real thermodynamics, minimum reflux by geometric pinch detection (tangent pinches included), stage stepping with Murphree efficiency, total reflux, N(R), staircase plotting, and the binary column material balances. Multicomponent and rigorous MESH solvers land milestone by milestone — see the repo'sROADMAP.md. The API may still move before1.0.
import stages
# Real thermodynamics from vle-thermo: Peng–Robinson benzene–toluene at 1 atm
# (light component first; units K / kPa absolute / mole fractions).
sys = stages.ThermoSystem.peng_robinson(["benzene", "toluene"])
curve = stages.EquilibriumCurve.from_thermo(sys, 101.325)
# Minimum reflux by pinch detection — tangent pinches included …
r = stages.rmin(curve, x_distillate=0.95, x_bottoms=0.05, z_feed=0.50, q=1.0)
# … then the full construction. Rich result objects, never bare numbers:
design = stages.mccabe_thiele(curve, 0.95, 0.05, 0.50, reflux=1.5 * r.r_min)
print(f"N = {design.n_stages:.2f} stages, feed stage {design.feed_stage}, "
f"R_min = {r.r_min:.3f}")
design.stages # every (x, y) stage corner
design.staircase # the full polyline, ready to plot
design.rectifying # operating lines as slope/intercept
r.pinch, r.tangent # where the pinch sits, and whether it's a tangent pinch
# The staircase diagram (requires the [plot] extra):
# from stages import plotting
# plotting.plot_mccabe_thiele(design, curve, show_rmin=True)
Strongly non-ideal systems go through the γ-φ route — the same construction, different thermodynamics:
# van Laar methanol–water (the system validated in vle's Chapter IV notebooks).
mw = stages.ThermoSystem.van_laar(["methanol", "water"], 0.5853, 0.3458)
curve_mw = stages.EquilibriumCurve.from_thermo(mw, 101.325)
The executable learning path lives in the repo's notebooks/ —
01-mccabe-thiele.ipynb designs benzene–toluene and methanol–water columns
end-to-end, with exercises.
The native core is a Rust crate (stages-thermo on crates.io) with PyO3
bindings; wheels are abi3 (cp310-abi3-*), so one wheel per (OS, arch) covers
CPython 3.10+.
License
MIT © Miguel Roberto Jackson Ugueto
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 stages_thermo-0.1.0.tar.gz.
File metadata
- Download URL: stages_thermo-0.1.0.tar.gz
- Upload date:
- Size: 43.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cecde4e5addc66f8afa0566d014a235535ec59352d648e77c932adf15d614a29
|
|
| MD5 |
c5d1f91499417f3d1ddab6f3ac3f0484
|
|
| BLAKE2b-256 |
0ce655f69d23cc1213ea0ff2add3373793a4c809699f942480bfcb9f6569cd76
|
Provenance
The following attestation bundles were made for stages_thermo-0.1.0.tar.gz:
Publisher:
release.yml on miguelju/stages-thermo
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
stages_thermo-0.1.0.tar.gz -
Subject digest:
cecde4e5addc66f8afa0566d014a235535ec59352d648e77c932adf15d614a29 - Sigstore transparency entry: 2094430653
- Sigstore integration time:
-
Permalink:
miguelju/stages-thermo@d46ea41510ea34d2788a9e735e9ce7b16ac0c83a -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/miguelju
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@d46ea41510ea34d2788a9e735e9ce7b16ac0c83a -
Trigger Event:
push
-
Statement type:
File details
Details for the file stages_thermo-0.1.0-cp310-abi3-win_amd64.whl.
File metadata
- Download URL: stages_thermo-0.1.0-cp310-abi3-win_amd64.whl
- Upload date:
- Size: 289.5 kB
- Tags: CPython 3.10+, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0d45748f2d5425b8dab739a79fb3cb414aec1d253558203f9cb413b965ec6da9
|
|
| MD5 |
932afa88813c15dc396b8196c2744275
|
|
| BLAKE2b-256 |
58db928b62c181a9b21c1db40549941d15079707c3b028b1445c20b24b69b63e
|
Provenance
The following attestation bundles were made for stages_thermo-0.1.0-cp310-abi3-win_amd64.whl:
Publisher:
release.yml on miguelju/stages-thermo
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
stages_thermo-0.1.0-cp310-abi3-win_amd64.whl -
Subject digest:
0d45748f2d5425b8dab739a79fb3cb414aec1d253558203f9cb413b965ec6da9 - Sigstore transparency entry: 2094431282
- Sigstore integration time:
-
Permalink:
miguelju/stages-thermo@d46ea41510ea34d2788a9e735e9ce7b16ac0c83a -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/miguelju
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@d46ea41510ea34d2788a9e735e9ce7b16ac0c83a -
Trigger Event:
push
-
Statement type:
File details
Details for the file stages_thermo-0.1.0-cp310-abi3-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: stages_thermo-0.1.0-cp310-abi3-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 404.5 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.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3aa21661c49fd2e679ee540dd1efb2635e1b2db57ec14278b434df71a04f6f3c
|
|
| MD5 |
59ed5217fa8363a8fc12055b4a03a25a
|
|
| BLAKE2b-256 |
19b67a2117c7a79e8dffc7543f831276190f9811124760818ea2d6c0ada1f1b9
|
Provenance
The following attestation bundles were made for stages_thermo-0.1.0-cp310-abi3-manylinux_2_28_x86_64.whl:
Publisher:
release.yml on miguelju/stages-thermo
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
stages_thermo-0.1.0-cp310-abi3-manylinux_2_28_x86_64.whl -
Subject digest:
3aa21661c49fd2e679ee540dd1efb2635e1b2db57ec14278b434df71a04f6f3c - Sigstore transparency entry: 2094431912
- Sigstore integration time:
-
Permalink:
miguelju/stages-thermo@d46ea41510ea34d2788a9e735e9ce7b16ac0c83a -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/miguelju
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@d46ea41510ea34d2788a9e735e9ce7b16ac0c83a -
Trigger Event:
push
-
Statement type:
File details
Details for the file stages_thermo-0.1.0-cp310-abi3-manylinux_2_28_aarch64.whl.
File metadata
- Download URL: stages_thermo-0.1.0-cp310-abi3-manylinux_2_28_aarch64.whl
- Upload date:
- Size: 391.7 kB
- Tags: CPython 3.10+, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c9a34b5dc109586ca9d859098f48a17897015813f37ed5fe2434e003b90a0061
|
|
| MD5 |
d8b9845fbe9f0bfc7682bef55d25f053
|
|
| BLAKE2b-256 |
b3fb450d1a77a0fd00002a2248c964e37e120c21a446fed200488551801cf67a
|
Provenance
The following attestation bundles were made for stages_thermo-0.1.0-cp310-abi3-manylinux_2_28_aarch64.whl:
Publisher:
release.yml on miguelju/stages-thermo
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
stages_thermo-0.1.0-cp310-abi3-manylinux_2_28_aarch64.whl -
Subject digest:
c9a34b5dc109586ca9d859098f48a17897015813f37ed5fe2434e003b90a0061 - Sigstore transparency entry: 2094432539
- Sigstore integration time:
-
Permalink:
miguelju/stages-thermo@d46ea41510ea34d2788a9e735e9ce7b16ac0c83a -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/miguelju
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@d46ea41510ea34d2788a9e735e9ce7b16ac0c83a -
Trigger Event:
push
-
Statement type:
File details
Details for the file stages_thermo-0.1.0-cp310-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: stages_thermo-0.1.0-cp310-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 366.2 kB
- Tags: CPython 3.10+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
57d3edbce3fc25b445e12fe0b06bcd047ef4e6c44f8600752faf8b3ee2572566
|
|
| MD5 |
fac06bdfbbffc7515195611d91f76331
|
|
| BLAKE2b-256 |
e6d6d8b80fc12c5be22517ead31c382159a01d7e3938c8d6b9881c349fa50958
|
Provenance
The following attestation bundles were made for stages_thermo-0.1.0-cp310-abi3-macosx_11_0_arm64.whl:
Publisher:
release.yml on miguelju/stages-thermo
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
stages_thermo-0.1.0-cp310-abi3-macosx_11_0_arm64.whl -
Subject digest:
57d3edbce3fc25b445e12fe0b06bcd047ef4e6c44f8600752faf8b3ee2572566 - Sigstore transparency entry: 2094431559
- Sigstore integration time:
-
Permalink:
miguelju/stages-thermo@d46ea41510ea34d2788a9e735e9ce7b16ac0c83a -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/miguelju
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@d46ea41510ea34d2788a9e735e9ce7b16ac0c83a -
Trigger Event:
push
-
Statement type: