Distillation column simulation
feed -> distillate + bottoms
Governing equations
The exact equations the solver works for a distillation column — the same math shown in the app's "Theory" panel, not a black box.
- M
- Material-balance residual on a stage — in minus out; driven to zero at convergence (the 'M' of MESH)
- l
- liquid flow leaving a stage [mol/s]
- v
- vapour flow leaving a stage [mol/s]
- f
- feed flow onto a stage [mol/s]
- E
- Equilibrium residual — the K-value relation y=Kx, satisfied at convergence (the 'E')
- K
- equilibrium ratio K=y/x — how strongly a component favours the vapour; K>1 climbs toward the distillate, K<1 sinks toward the bottoms
- y
- vapour mole fraction on a stage
- x
- liquid mole fraction on a stage
- S
- Summation residual — the mole fractions on a stage must add to 1 (the 'S')
- H
- energy-balance (entHalpy) residual on a stage — closed at convergence (the 'H')
- L
- internal liquid traffic between stages [mol/s] — set by the reflux
- V
- internal vapour traffic between stages [mol/s] — set by the boilup
- h^L
- liquid molar enthalpy [J/mol]
- h^V
- vapour molar enthalpy [J/mol]
- h^F
- feed molar enthalpy [J/mol]
- Q
- reboiler/condenser duty [W] — the energy in and out that drives the whole separation
- j
- stage index (1 = top)
- i
- component index
Parameters
n_stages [int >=3], feed_stage [int, 1..n_stages-2], reflux_ratio [>0], distillate_to_feed [0..1, fraction of feed taken overhead, e.g. 0.3-0.6 — PREFER this], pressure [Pa]; (distillate_rate [mol/s, < feed flow] is the absolute alternative); condenser ['total' (default, liquid distillate) | 'partial' (vapor distillate, +1 stage)]; multiple feeds: connect several inlets and give feed_stages [list, one stage per inlet]; fidelity ['rigorous' (default, MESH solve) | 'shortcut' (fast Fenske-Underwood-Gilliland sizing — Aspen DSTWU equivalent; requires light_key + heavy_key [feed component ids], optional recovery_lk_distillate/recovery_hk_bottoms [0..1, default 0.99]; sizes N/R from the key split, no per-stage profile)]; method ['auto' (default: Newton, inside-out fallback) | 'newton' | 'inside_out' | 'ns' (component-flow Naphtali-Sandholm — closes the exact feed-vs-products material balance for a near-pinch or trace-supercritical-light column the reduced-form solvers over-produce the light key on; several× slower, so use only when a column's component balance doesn't close)]