MaximaLabs
← The Process Simulation Handbook
Chapter 4

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

νi\nu_i
(negative for reactants, positive for products), pick a key component, and set its fractional conversion
XkeyX_{key}
. Everything follows from the extent of reaction
ξ\xi
:

ξ=XkeyFzkeyνkey,n˙i,out=n˙i,in+νiξ\xi = X_{key}\,\frac{F\,z_{key}}{|\nu_{key}|}, \qquad \dot n_{i,\text{out}} = \dot n_{i,\text{in}} + \nu_i\,\xi

The example below is benzene hydrogenation —

C6H6+3H2C6H12\text{C}_6\text{H}_6 + 3\,\text{H}_2 \rightarrow \text{C}_6\text{H}_{12}
— run at 97% conversion of benzene, with the unreacted hydrogen flashed off and recycled and a small purge to keep inerts from building up. A reactor almost never stands alone; it lives in a loop, exactly the recycle machinery from Chapter 1.

The MaximaLabs canvas: benzene and hydrogen feeds into a mixer, into a conversion reactor (RXN), into a flash separator, with a splitter recycling unreacted hydrogen and a purge.

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

ξ\xi
and an added duty
QQ
:

Fouthout=FinhinΔHrxnξ+QF_{\text{out}}\,h_{\text{out}} = F_{\text{in}}\,h_{\text{in}} - \Delta H_{\text{rxn}}\,\xi + Q

Run it adiabatically (

Q=0Q = 0
) and that
ΔHrxn\Delta H_{\text{rxn}}
shows up as a temperature change — the adiabatic temperature rise of an exothermic reaction, or the chill of an endothermic one. Hydrogenation is strongly exothermic, so the reactor outlet runs hot; the downstream flash and its temperature spec are there to manage it.

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 MaximaLabs reactor 'Theory' tab showing the extent-of-reaction, per-component mole balance, and heat-of-reaction energy-balance equations in KaTeX, with the reaction description and solved values.

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:

iaiνi=Keq(T)\prod_i a_i^{\nu_i} = K_{eq}(T)

The temperature dependence of

KeqK_{eq}
comes from the van't Hoff relation, so an exothermic reaction's equilibrium backs off as it heats up (Le Chatelier, quantified):

ln ⁣Keq(T)Kref=ΔHrxnR(1T1Tref)\ln\!\frac{K_{eq}(T)}{K_{ref}} = -\frac{\Delta H_{\text{rxn}}}{R}\left(\frac{1}{T} - \frac{1}{T_{ref}}\right)

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:

minni GRT=ini[ΔGf,i(T)RT+lnnintot+lnPP]\min_{n_i}\ \frac{G}{RT} = \sum_i n_i\left[\frac{\Delta G^\circ_{f,i}(T)}{RT} + \ln\frac{n_i}{n_{tot}} + \ln\frac{P}{P^\circ}\right]
subject toiniaij=bj(atoms of element j),ni0\text{subject to}\quad \sum_i n_i\,a_{ij} = b_j \quad(\text{atoms of element } j),\qquad n_i \ge 0
nin_i
Moles of candidate species i at the outlet — the unknowns the minimization solves for.
G/RTG/RT
Total Gibbs free energy of the mixture (dimensionless, scaled by RT) — the quantity being minimized.
ΔGf,i(T)\Delta G^\circ_{f,i}(T)
Standard Gibbs energy of formation of species i at temperature T — a tabulated thermodynamic property, not a fitted parameter.
aija_{ij}
Number of atoms of element j in one molecule of species i — fixed by each species' chemical formula.
bjb_j
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.

Worked example — SO₂ oxidation in a sulfuric-acid contact process

Roaster gas

z=(SO20.08, O20.11, N20.81)z=(\text{SO}_2\text{: }0.08,\ \text{O}_2\text{: }0.11,\ \text{N}_2\text{: }0.81)
at 100 mol/s, 700 K, 2 atm, into a Gibbs reactor given the candidate species
{SO2,SO3,O2,N2}\{\text{SO}_2,\text{SO}_3,\text{O}_2,\text{N}_2\}
— no reaction written down, just the species list. Minimizing free energy at 700 K (where SO₂ oxidation is strongly favored) converts nearly all of it:

n˙SO2,in=8.0 mol/s,n˙SO2,out=96.03×0.000710.068 mol/s\dot n_{\text{SO}_2,\text{in}} = 8.0\ \text{mol/s}, \qquad \dot n_{\text{SO}_2,\text{out}} = 96.03 \times 0.00071 \approx 0.068\ \text{mol/s}

A conversion of

(8.00.068)/8.099.2%(8.0-0.068)/8.0 \approx 99.2\%
— the equilibrium composition MaximaLabs' Gibbs solver finds directly from thermodynamics, with no SO₂+½O₂→SO₃ reaction ever specified.

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:

k(T)=k0exp ⁣(EaRT),r=k(T)icimik(T) = k_0\,\exp\!\left(-\frac{E_a}{RT}\right), \qquad r = k(T)\prod_i c_i^{\,m_i}
k(T)k(T)
Rate constant at the reactor temperature (units depend on the overall order) — grows with temperature per Arrhenius.
k0k_0
Pre-exponential (frequency) factor — the rate constant's theoretical ceiling as T→∞.
EaE_a
Activation energy (J/mol) — the energy barrier the reaction must clear; a bigger E_a makes the rate more temperature-sensitive.
R,  TR,\;T
Gas constant (8.314 J/mol/K) and absolute reactor temperature (K).
rr
Reaction rate (mol/volume/time) — what the CSTR/PFR design equation integrates against the residence time to get conversion.
ci,  mic_i,\;m_i
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.

Worked example — a kinetic CSTR

Feed

z=(ethanol: 0.5, water: 0.5)z=(\text{ethanol: }0.5,\ \text{water: }0.5)
at 5.0 mol/s, 340 K, into a 0.02 m³ CSTR with
k0=1.0×106 s1k_0=1.0\times10^6\ \text{s}^{-1}
,
Ea=40,000 J/molE_a=40{,}000\ \text{J/mol}
, first-order in ethanol. The rate constant at 340 K:

k(340)=1.0×106×exp ⁣(40,0008.314×340)0.715 s1k(340) = 1.0\times10^6 \times \exp\!\left(-\frac{40{,}000}{8.314\times340}\right) \approx 0.715\ \text{s}^{-1}

Solving the CSTR's well-mixed material balance with this rate constant, MaximaLabs reports

98.6%98.6\%
conversion of ethanol (extent
ξ2.47 mol/s\xi \approx 2.47\ \text{mol/s}
) at this volume and residence time — high conversion because the rate constant is fast (~0.7 s⁻¹) relative to the tank's holding time, not because a conversion was specified anywhere.

4.8 Try it

Reproduce it in your browser
  1. 1Open the benzene hydrogenation example and Run it.
  2. 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.
  3. 3In the Stream table, confirm the reactor outlet is nearly all cyclohexane and the leftover hydrogen carries forward to the flash.
  4. 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.
  5. 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

Practice

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.

  1. 1
    warm-up
    Ammonia synthesis runs
    N2+3H22NH3\mathrm{N_2 + 3\,H_2 \rightarrow 2\,NH_3}
    . A feed of 100 mol/s N₂ (with stoichiometric H₂) reacts at 30% N₂ conversion. Find the extent of reaction and the NH₃ produced.
  2. 2
    core
    A reaction is exothermic (
    ΔHrxn<0\Delta H_\text{rxn} < 0
    ). Using van't Hoff,
    dlnKdT=ΔHrxnRT2\frac{d\ln K}{dT} = \frac{\Delta H_\text{rxn}}{RT^2}
    , which way does the equilibrium constant
    KK
    move as temperature rises, and what dilemma does that create for ammonia synthesis?
  3. 3
    challenge
    For 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.

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