MaximaLabs
All examples
Simulation gallery

Methanol synthesis reactor duty (Python Script Mode, LHHW kinetics)

Python Script ModeLHHW kineticsSandboxed PythonCustom block
See it live
Open this exact flowsheet in the workspace, already solved — tweak a spec and re-run.
Launch interactive model

A CO/H2 syngas feed enters a custom block written in real, sandboxed Python (flowsim/sandbox/) rather than the AST-restricted equation grammar — the case equation mode structurally can't express: a Langmuir-Hinshelwood-Hougen-Watson rate law (a forward kinetic term over a competitive-adsorption denominator, each term Arrhenius/ van't-Hoff temperature-dependent) evaluated inside a real Python loop over the adsorbing species, driving the exothermic reactor's temperature rise. Partial pressures are computed from the real inlet pressure (pinned via inputs) and representative mole fractions (script_params — composition itself can't be pinned into a script, only flow/T/P, so the fractions are illustrative constants, not read from the flowsheet's actual feed). The kinetic/adsorption/heat-of-reaction constants are likewise illustrative (chosen for a physically plausible rate and duty, not fit to a specific published dataset) — the point is the execution model, not a validated methanol-synthesis kinetic scheme.

The flowsheet

The solved topology — every unit op's real duty, conversion, or split, read straight off a genuine converged solve.

FEED
ƒ(x)
RX
OUT

The stream table

Every stream's flow, temperature, pressure, and composition — real converged numbers, not placeholders.

See it live
Open this exact flowsheet in the workspace, already solved — tweak a spec and re-run.
Launch interactive model

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