Skip to content

Latest commit

 

History

10 Commits

Folders and files

Repository files navigation

Infinite Reflux

Infinite Reflux is a Python toolkit for:

  1. generating binary vapor-liquid equilibrium (VLE) curves, and
  2. using those curves in McCabe–Thiele stage-stepping diagrams.

It supports arbitrary user-specified binary mixtures via parameterized models or tabulated data.

Scope and limitations

  • Binary mixtures only (McCabe–Thiele is a binary method).
  • No external thermodynamic database is bundled.
  • Accuracy depends on the selected model and your supplied data.
  • Azeotropic behavior is allowed; the equilibrium curve may cross y=x.

Installation

pip install -e .

CLI usage

1) Built-in distiller-friendly example (ethanol/water table)

infinite-reflux continuous \
  --xF 0.10 --xD 0.80 --xB 0.03 --q 1.0 --R 4.0 \
  --output continuous_example.png

2) tabulated_xy input mode (required)

Provide a JSON config like examples/acetone_methanol_tabulated_xy.json.

infinite-reflux continuous \
  --vle-config examples/acetone_methanol_tabulated_xy.json \
  --xF 0.35 --xD 0.90 --xB 0.08 --q 1.0 --R 2.7 \
  --output acetone_methanol.png

3) constant_alpha input mode (required)

infinite-reflux batch \
  --alpha 2.2 \
  --light-component benzene --heavy-component toluene \
  --xD 0.92 --xB 0.25 --R 2.8 \
  --output benzene_toluene_batch.png

alpha uses the convention that the chosen axis/light component is more volatile, so alpha > 1 is required.

Configuration schema (--vle-config JSON)

{
  "name": "Mixture Name",
  "component_a": "component 1",
  "component_b": "component 2",
  "axis_component": "component 1",
  "pressure": 1.0,
  "pressure_units": "atm",
  "vle_model": "tabulated_xy",
  "model_parameters": {
    "x": [0.0, 0.5, 1.0],
    "y": [0.0, 0.7, 1.0]
  }
}

Supported vle_model values:

  • tabulated_xy: user-provided tabulated equilibrium points.
  • constant_alpha: constant relative volatility model.

Python API

from infinite_reflux import MixtureSpec, generate_vle_curve

spec = MixtureSpec(
    name="Benzene/Toluene",
    component_a="benzene",
    component_b="toluene",
    axis_component="benzene",
    vle_model="constant_alpha",
    model_parameters={"alpha": 2.2},
)
vle = generate_vle_curve(spec)

Then pass vle into generate_continuous_diagram(...) or generate_batch_diagram(...).

About

A compact, self-contained Python code base for generating McCabe-Thiele diagrams.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages