Reactors
Everything so far moved molecules around and split them by phase. A reactor is the first node that changes what the molecules are. How you model it depends on what you know: sometimes you know the reaction and how far it goes, sometimes only that it reaches equilibrium, sometimes not even which reactions occur. MaximaLabs gives you four reactor models for exactly that spread of knowledge.
4.1 Four models, four things you might know
In rough order of how much you have to supply:
- Stoichiometric / conversion — you know the reaction and set how far it goes (a fixed conversion of a key component).
- Equilibrium — you know the reaction but let thermodynamics set how far it goes, from an equilibrium constant.
- Gibbs — you don't specify reactions at all; you give the possible species and let free-energy minimization find the equilibrium mix.
- Kinetic (CSTR / PFR) — you have a rate law, so reactor size and residence time set the conversion.
4.2 The stoichiometric reactor
The most direct model: give the stoichiometry
The example below is benzene hydrogenation —

The 'Benzene hydrogenation' example: two feeds → mixer → conversion reactor → flash → recycle + purge. The reactor is one node; the process around it closes the hydrogen balance.
4.3 The heat of reaction
Reactions release or absorb energy, and the reactor's energy balance carries it. For extent
Run it adiabatically (
4.4 See the math
As with every unit, click the reactor and open Theory to see the exact equations — the extent of reaction, the per-component mole balance, and the heat-of-reaction energy balance — rendered alongside the reactor's solved conversion and duty:

The reactor's 'show the math' (ParamEditor ▸ Theory): extent of reaction ξ, the mole balance ṅ_out = ṅ_in + νξ, and the energy balance with ΔH_rxn — the equations MaximaLabs just solved for this reactor.
4.5 The equilibrium reactor
When a reaction runs to thermodynamic equilibrium rather than a fixed conversion, you supply the reaction and an equilibrium constant, and MaximaLabs solves for the extent that satisfies the law of mass action:
The temperature dependence of
This is exactly what the ammonia synthesis loop from Chapter 1 uses — only ~10% converts per pass because equilibrium (not conversion) caps it, which is exactly why it needs the big recycle.
4.6 The Gibbs reactor
Sometimes you don't know the reactions — combustion and reforming produce dozens of species through networks no one writes out by hand. The Gibbs reactor sidesteps that entirely: give it the candidate species and it finds the composition that minimizes total Gibbs free energy subject to conserving atoms:
- Moles of candidate species i at the outlet — the unknowns the minimization solves for.
- Total Gibbs free energy of the mixture (dimensionless, scaled by RT) — the quantity being minimized.
- Standard Gibbs energy of formation of species i at temperature T — a tabulated thermodynamic property, not a fitted parameter.
- Number of atoms of element j in one molecule of species i — fixed by each species' chemical formula.
- Total moles of element j available (from the feed) — conserved regardless of which reactions actually occur.
No reaction equations required — just thermodynamics and a mass balance. It's the natural model for a reformer, a combustor, or a syngas equilibrium.
Roaster gas
A conversion of
4.7 The kinetic reactor (CSTR / PFR)
When conversion is set by rate and residence time rather than equilibrium, use the kinetic reactor. You give an Arrhenius rate law and a reactor volume, and the model solves the CSTR or PFR design equation for the outlet:
- Rate constant at the reactor temperature (units depend on the overall order) — grows with temperature per Arrhenius.
- Pre-exponential (frequency) factor — the rate constant's theoretical ceiling as T→∞.
- Activation energy (J/mol) — the energy barrier the reaction must clear; a bigger E_a makes the rate more temperature-sensitive.
- Gas constant (8.314 J/mol/K) and absolute reactor temperature (K).
- Reaction rate (mol/volume/time) — what the CSTR/PFR design equation integrates against the residence time to get conversion.
- Molar concentration of component i and its reaction order — the exponents you supply per the rate law's kinetics.
A CSTR is one well-mixed volume (outlet = tank composition); a PFR integrates the rate along the reactor length. Either way, the size you draw becomes the conversion you get. The refinery hydrocracker example uses a lumped first-order kinetic network in exactly this form.
Feed
Solving the CSTR's well-mixed material balance with this rate constant, MaximaLabs reports
4.8 Try it
- 1Open the benzene hydrogenation example and Run it.
- 2Click the RXN reactor and read its params: the stoichiometry (−1 benzene, −3 H₂, +1 cyclohexane), the key component, and the 0.97 conversion. Open Theory to see the extent and energy-balance equations.
- 3In the Stream table, confirm the reactor outlet is nearly all cyclohexane and the leftover hydrogen carries forward to the flash.
- 4Drop the conversion to 0.80 and re-run — more unreacted benzene survives, and the recycle/purge rebalances. Watch how the loop from Chapter 1 absorbs the change.
- 5For the equilibrium contrast, open the ammonia loop — same idea, but thermodynamics (not a fixed conversion) sets how far it goes.
Pick the reactor model that matches your knowledge — a conversion you measured, an equilibrium you trust, a species list, or a rate law — and the solver does the rest. Next: separations, where the flash of Chapter 3 becomes a whole column.
4.9 Exercises
Work each problem yourself first, then reveal the solution to check it. Where a problem says so, reproduce it live in MaximaLabs — the solver is the answer key.
- 1warm-upAmmonia synthesis runs. A feed of 100 mol/s N₂ (with stoichiometric H₂) reacts at 30% N₂ conversion. Find the extent of reaction and the NH₃ produced.
- 2coreA reaction is exothermic (). Using van't Hoff,, which way does the equilibrium constantmove as temperature rises, and what dilemma does that create for ammonia synthesis?
- 3challengeFor a normal positive-order reaction, does a CSTR or a PFR need more volume to reach the same conversion? Explain from the rate, then check it by dropping both reactor types with the same kinetics on the canvas and comparing the required volumes.