MaximaLabs
All guides

How to simulate methanol synthesis reactor duty (python script mode, lhhw kinetics)

A CO/H₂ 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.

FEED
ƒ(x)
RX
OUT
  1. 1
    Open the ready-made model

    Open the "Methanol synthesis reactor duty (Python Script Mode, LHHW kinetics)" model in the MaximaLabs workspace — no install, no license. It loads live on the canvas, ready to edit and run.

  2. 2
    Confirm the thermodynamics

    This process is modeled with the PENG-ROBINSON property package over carbon_monoxide, h2 — already selected, so the phase equilibrium and enthalpy are physically consistent from the first run.

  3. 3
    Review the flowsheet

    The flowsheet chains RX. Every block is a real, solvable unit op you can reconfigure on the canvas.

  4. 4
    Run the simulation

    Click Run. The deterministic solver converges the material and energy balances (recycles included) and fills the live stream table — the AI never invents a number.

  5. 5
    Read the results and iterate

    Inspect the converged streams, tweak a spec, and re-run — or ask the AI copilot to explain a result or diagnose a failed solve in plain English.

What you'll build
Thermodynamics
PENG-ROBINSON
Components
carbon_monoxide, h2
Unit operations
RX
Open this model in the workspace

Opens live on the canvas — free, no install.

Explore the model & flowsheet

Frequently asked questions

What does the Methanol synthesis reactor duty (Python Script Mode, LHHW kinetics) model simulate?
A CO/H₂ 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.
Which thermodynamic method does it use?
The PENG-ROBINSON property package, over carbon_monoxide, h2 — already selected. You can switch the method on the canvas before running.
Which unit operations are in the flowsheet?
It chains RX. Every block is a real, solvable unit operation you can reconfigure, add to, or remove.
Do I need to install software or buy a license?
No. Methanol synthesis reactor duty (Python Script Mode, LHHW kinetics) runs entirely in your browser on MaximaLabs — free, no install, no license. Open the model to load it live and run the deterministic solver.

More guides like this

Ludwigshafen, Germany

Polymerization reactor comparison: CSTR cascade vs. tubular (PFR)

The same monomer feed, split 50/50 into two trains at equal total reactor volume: a 3-stage CSTR cascade (each stage blending its own new polymer with the MWD already carried by the stream from the stage before it) versus a single tubular (PFR) reactor. Both converge to a real, different Mn/Mw/PDI — the PFR reaches higher conversion at the same total volume, but its cumulative polydispersity is measurably broader than the cascade's, because chain length drifts continuously with conversion along the tube while each CSTR stage makes its own local production under one fixed monomer concentration. See the 'Polymerization Reactors' docs page for the full reasoning.

Amarillo, Texas, USA

Helium liquefaction (Linde-Hampson cycle)

A Joule-Thomson liquefaction loop: helium is compressed, aftercooled, precooled well below its ~40-51 K JT-inversion temperature, then throttled through a valve into a flash drum that draws off liquid helium while the cold vapor recycles back to the compressor suction — the same JT-cycle physics as the platform's LNG/refrigeration loops, run on a fluid whose inversion curve makes precooling mandatory before the throttle can cool it at all.

Brevik, Norway (Heidelberg Materials Norcem — first full-scale cement CCS)

Cement kiln calcination + CO2 liquefaction

Preheated limestone (CaCO₃) enters an indirectly-heated rotary kiln that calcines it toward CaO, releasing a CO₂-rich off-gas; the gas passes a knockout drum, then is compressed and cooled to liquefy the CO₂ for transport/storage.

Mont Belvieu NGL fractionation complex, Texas, USA

NGL fractionation: single-shell Petlyuk dividing-wall column

A natural-gas-liquids cut (ethane / propane / n-butane) split into three on-spec products by ONE thermally-coupled dividing-wall column instead of two columns in series. This uses the native Petlyuk unit op: a prefractionator whose reflux and boilup are supplied by the main column (the single condenser + single reboiler), solved by an outer Wegstein loop that converges the bidirectional vapor/liquid coupling to self-consistency — the coupling legacy sequential-modular solvers approximate with two connected columns whose recycle fails to converge.

Pekin, Illinois, USA

Ethanol–water distillation

An 8-stage column concentrating ethanol overhead toward the azeotrope (the headline demo).

Tray efficiency — real trays vs ideal stages

The same ethanol–water column solved with a Murphree vapor tray efficiency of 0.7 instead of ideal equilibrium stages. A real sieve/valve tray never reaches full vapor-liquid equilibrium — the vapor leaving it only partly approaches the equilibrium composition with the tray liquid, mixing in un-equilibrated vapor from the tray below: y = E·K·x + (1−E)·y_below (Murphree 1925). At E = 0.7 each of these 12 trays does 70% of an ideal stage's work, so the overhead ethanol is lower than an equilibrium column of the same tray count would predict — which is exactly why a real column needs more trays than a shortcut (ideal-stage) calculation says. Both HYSYS and Aspen RadFrac expose this per-tray efficiency; set murphree_efficiency back to 1.0 to recover the ideal-stage column. The efficiency auto-selects the component-flow Naphtali-Sandholm solver (the reduced-form solvers carry no explicit per-tray VLE row to apply an efficiency to).

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