MaximaLabs
All unit operations

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.

Mi,j:  li,j1+vi,j+1+fi,jli,jvi,j=0M_{i,j}:\; l_{i,j-1} + v_{i,j+1} + f_{i,j} - l_{i,j} - v_{i,j} = 0
Ei,j:  yi,j=Ki,jxi,jE_{i,j}:\; y_{i,j} = K_{i,j}\, x_{i,j}
Sj:  iyi,j1=0S_j:\; \sum_i y_{i,j} - 1 = 0
Hj:  Lj1hj1L+Vj+1hj+1V+FjhFLjhjLVjhjVQj=0H_j:\; L_{j-1}h^L_{j-1} + V_{j+1}h^V_{j+1} + F_j h^F - L_j h^L_j - V_j h^V_j - Q_j = 0
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)]

Example flowsheets that use it

Stop fighting legacy software. Build your first flowsheet in 60 seconds.