How to simulate crude unit: why a cdu needs pumparounds
A pumparound draws liquid off a tray, cools it, and returns it a few trays higher. It removes no material — its entire job is heat. This example solves the same atmospheric crude unit twice, with its two pumparounds and without, and the difference is not a matter of degree. **With them the rigorous column converges and cuts correctly**: every product is dominated by the pseudocomponent it is named for (naphtha cut_1, kerosene cut_2, diesel cut_3 at 0.857, residue cut_4 at 0.677), the cut ladder spans 134 K, the pumparound duty reads back as exactly the -7.00 MW specified, and the reboiler sits at +2.25 MW against a 1.25 MW condenser. It solves in about 5 seconds. **Without them the rigorous energy-balance MESH does not converge at all** at this operating point — it stalls at a residual of 7.9e-3 with a component balance off by 0.45. That is the honest result, and it is the whole point: the feed arrives at 660 K from the fired heater carrying far more enthalpy than the overhead condenser's 1.26 MW can remove, and with no pumparound to take the rest there is no operating point for the solver to find. What comes back instead is FlowSim's screening carve, the fallback model, which **has no rigorous stage energy balance** — and it says so, in a warning on the result. Its answer is worth looking at precisely because it is the degraded one: the naphtha cut comes back dominated by the second-lightest pseudocomponent rather than the lightest, the residue by cut_3 rather than cut_4, the ladder collapses from 134 K to 85 K, and the reboiler duty goes negative at -5.23 MW — the column asking to be cooled rather than heated. Those numbers are the carve's, not a rigorous solution's, and this example is built so you can see the difference between the two rather than be handed one as the other. A pumparound is only meaningful against a rigorous stage energy balance, so this example runs `ns_energy` and `rigorous_draws`: under constant molal overflow the vapour rates are PINNED, and removing heat provably cannot move an internal flow. Specifying a pumparound therefore switches the energy balance on for you. **Bounded — read the size before you scale it up.** This is 12 stages on 4 pseudocomponents because that is what the rigorous-energy path can currently afford: the same column at Brent's full 20 stages and 8 cuts did not converge in 48 minutes, against 115 s on the constant-molal-overflow path. The cost is the flash inner loop, which profiling puts at 82% of the solve, evaluated once per unknown per Jacobian (332 unknowns at that size) by finite differences — and on petroleum pseudocomponents that loop is pure Python, because CoolProp has no entries for them. Analytic K-value derivatives are the fix at this size; the dense Jacobian's O(n^3) factorization is what binds at full commercial scale. Both are known, and this example is deliberately small rather than quietly slow.
- 1Open the ready-made model
Open the "Crude unit: why a CDU needs pumparounds" model in the MaximaLabs workspace — no install, no license. It loads live on the canvas, ready to edit and run.
- 2Confirm the thermodynamics
This process is modeled with the PENG-ROBINSON property package — already selected, so the phase equilibrium and enthalpy are physically consistent from the first run.
- 3Review the flowsheet
The flowsheet chains Preflash, Fired Heater, CDU. Every block is a real, solvable unit op you can reconfigure on the canvas.
- 4Run 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.
- 5Read 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.
- Thermodynamics
- PENG-ROBINSON
- Components
- —
- Unit operations
- PreflashFired HeaterCDU
Opens live on the canvas — free, no install.
Explore the model & flowsheetFrequently asked questions
- What does the Crude unit: why a CDU needs pumparounds model simulate?
- A pumparound draws liquid off a tray, cools it, and returns it a few trays higher. It removes no material — its entire job is heat. This example solves the same atmospheric crude unit twice, with its two pumparounds and without, and the difference is not a matter of degree. **With them the rigorous column converges and cuts correctly**: every product is dominated by the pseudocomponent it is named for (naphtha cut_1, kerosene cut_2, diesel cut_3 at 0.857, residue cut_4 at 0.677), the cut ladder spans 134 K, the pumparound duty reads back as exactly the -7.00 MW specified, and the reboiler sits at +2.25 MW against a 1.25 MW condenser. It solves in about 5 seconds. **Without them the rigorous energy-balance MESH does not converge at all** at this operating point — it stalls at a residual of 7.9e-3 with a component balance off by 0.45. That is the honest result, and it is the whole point: the feed arrives at 660 K from the fired heater carrying far more enthalpy than the overhead condenser's 1.26 MW can remove, and with no pumparound to take the rest there is no operating point for the solver to find. What comes back instead is FlowSim's screening carve, the fallback model, which **has no rigorous stage energy balance** — and it says so, in a warning on the result. Its answer is worth looking at precisely because it is the degraded one: the naphtha cut comes back dominated by the second-lightest pseudocomponent rather than the lightest, the residue by cut_3 rather than cut_4, the ladder collapses from 134 K to 85 K, and the reboiler duty goes negative at -5.23 MW — the column asking to be cooled rather than heated. Those numbers are the carve's, not a rigorous solution's, and this example is built so you can see the difference between the two rather than be handed one as the other. A pumparound is only meaningful against a rigorous stage energy balance, so this example runs `ns_energy` and `rigorous_draws`: under constant molal overflow the vapour rates are PINNED, and removing heat provably cannot move an internal flow. Specifying a pumparound therefore switches the energy balance on for you. **Bounded — read the size before you scale it up.** This is 12 stages on 4 pseudocomponents because that is what the rigorous-energy path can currently afford: the same column at Brent's full 20 stages and 8 cuts did not converge in 48 minutes, against 115 s on the constant-molal-overflow path. The cost is the flash inner loop, which profiling puts at 82% of the solve, evaluated once per unknown per Jacobian (332 unknowns at that size) by finite differences — and on petroleum pseudocomponents that loop is pure Python, because CoolProp has no entries for them. Analytic K-value derivatives are the fix at this size; the dense Jacobian's O(n^3) factorization is what binds at full commercial scale. Both are known, and this example is deliberately small rather than quietly slow.
- Which thermodynamic method does it use?
- The PENG-ROBINSON property package — already selected. You can switch the method on the canvas before running.
- Which unit operations are in the flowsheet?
- It chains Preflash, Fired Heater, CDU. 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. Crude unit: why a CDU needs pumparounds 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
Hydrocracking reaction section
A refinery hydrocracker: heavy VGO (modeled as n-dodecane) plus excess H₂ is cracked over catalyst into lighter products via a discrete lumped first-order kinetic network, then flashed to knock out recycle H₂/light gas from the liquid product (Peng-Robinson). Conversion is set by reactor temperature and LHSV.
Hydrocracking fractionation train
The standard downstream train a hydrocracker reaction section feeds into: a high-pressure separator knocks the H₂-rich recycle gas off the reactor effluent, a letdown valve drops the liquid to low pressure for a second flash (LPG-range off-gas), then a fractionator (crude_distillation, one side draw) splits what remains into light naphtha, a kerosene/diesel cut, and unconverted oil bottoms. A textbook train topology (Gary & Handwerk-style HP-sep → letdown → LP-sep → fractionator), not a replication of any specific published paper's numbers — the reaction lumps/kinetics are the same illustrative n-paraffin network as the 'hydrocracker-unit' example, not a real assay.
C5/C6 isomerization: why the colder catalyst wins
The light end of a gasoline pool. Straight-chain C₅/C₆ paraffins have poor octane, their branched isomers have good octane, and the reaction between them is a simple reversible exothermic rearrangement. Which means the equilibrium gets worse as the reactor gets hotter — and that single fact, not activity, is the technology choice in this unit. Run the built-in temperature sweep: this light straight-run naphtha reaches 74.9% iso-C₅ and 67.2% iso-C₆ at 400 K (the chlorided-alumina window) and only 65.3% and 57.6% at 530 K (the zeolitic window). A chlorided-alumina catalyst does not beat a zeolite by being more active; it beats it by approaching a better equilibrium. That is also why the two are not interchangeable in a revamp — a zeolitic unit cannot be pushed to alumina octane by running harder, only by running colder than its catalyst allows. Two things the flowsheet shows directly: moles are conserved exactly (one molecule in, one molecule out — 100.00000 mol/s out for 100 in, the module's own gate), and the benzene and cyclohexane in the feed pass through untouched at 4.00% and 6.00%, because a component named in no pair is not something this block pretends to convert. Only two pairs are written (n-pentane/isopentane and n-hexane/2-methylpentane) and that is deliberate: pairs are applied in sequence over a shared mole pool, so two pairs sharing one normal would let the second redistribute what the first already converted. A real C₆ network (n-hexane / 2-MP / 3-MP / 2,2-DMB / 2,3-DMB, each with its own equilibrium) is a coupled problem this block does not solve — see the.
Claus sulfur recovery unit (SRU): the 2:1 ratio that sets the ceiling
The back end of the amine train, and the unit that keeps a refinery's sulfur out of the atmosphere. Acid gas off an amine regenerator (60% H₂S, 36% CO₂) is part-burned in a reaction furnace, then reacted over two catalyst beds with sulfur condensed between them. The whole design follows from one number. The furnace burns a fraction phi of the H₂S to SO₂ (H₂S + 3/2 O₂ → SO₂ + H₂O); the Claus reaction then consumes them at 2:1 (2 H₂S + SO₂ → 3 S + 2 H₂O). Burn exactly one third and the effluent arrives at precisely 2 H₂S per SO₂, so neither reagent is left over — which is why air demand, not catalyst, is the manipulated variable in every real Claus plant. Off-ratio, the excess reagent walks straight through to the tail gas and recovery is capped by a stoichiometric ceiling min(3phi, 3(1-phi)/2) that no amount of catalyst can beat. Run the built-in combustion-fraction sweep to see it: recovery peaks at 95.3% at phi = 1/3 and falls away symmetrically — 85.8% at phi = 0.30 and also 85.8% at phi = 0.40, 71.5% at phi = 0.25 and also at phi = 0.50, because the ceiling's two branches cross at one third. Air demand is not symmetric though (128.6 vs 171.4 mol/s at those same two points), so over-firing costs blower duty on top of the lost sulfur. At the design point the unit makes 57.17 mol/s of liquid sulfur from 60 mol/s of H₂S against a 142.9 mol/s air demand, and the 2.84 mol/s of sulfur reaching the tail gas is still at exactly 2:1 H₂S/SO₂ — the unconverted reagents leave in the ratio they were fed, which is what a tail-gas treating unit downstream is sized for. The sulfur atom balance closes exactly (60.000 mol/s S in, 57.165 as liquid sulfur + 2.835 in the tail gas). Staging is why two beds get to 95%: each converts a fraction of what is left, so X_total = 1 - (1-X_thermal)*prod(1-X_i) — 0.65 thermal then 0.70 and 0.55 catalytic.
FCC riser: the gasoline optimum
A fluid catalytic cracking riser — the unit that makes most of a refinery's gasoline — showing the one result that decides how you run it. Gas oil cracks to gasoline, but gasoline overcracks to gas and coke, and the catalyst deactivates as coke lays down. Those three together mean gasoline goes through a MAXIMUM in contact time: past the optimum, running the riser harder destroys product while conversion keeps climbing. Open the sensitivity and the curve draws itself — that hump is the whole point. A first-order network (all hydrocracker can express) makes gasoline rise monotonically with conversion and would recommend exactly the wrong operation. The cat/oil ratio is computed, not chosen: cracking is endothermic and the only heat source is the sensible heat of hot regenerated catalyst, so the circulation follows from a heat balance and lands in the real 5-10 band. That is the number tying the riser to the regenerator an operator actually turns — raise the regenerator temperature and watch it fall. The rate constants here are illustrative and are NOT any real feed's kinetics. The unit op deliberately ships none: an FCC lump matrix is regressed from one feed on one catalyst, it is licensor-proprietary, and a fabricated one would decide the answer while looking authoritative. A riser without constants fails validation and says why. Bring your own regression and this becomes your riser. Bounded: three lumps (no per-cut gasoline detail), isothermal riser (a real one drops 30-60 K as the endotherm bites), no catalyst/vapour slip, and no regenerator — coke burn and the air rate are a separate unit this does not model.
Hydrotreater HP separator (Chao-Seader)
The high-pressure separator on a hydrotreater: reactor effluent — mostly hydrogen, with light ends and liquid product — is flashed hot and at pressure to recover recycle gas overhead, then let down to release the dissolved gas from the product. This runs on Chao-Seader, the semi-empirical K-value method refiners actually use for hydrogen-rich hydrocarbon systems, and which the app offers but no example used. It is not a relabelled cubic: K = gamma*nu/phi builds the liquid fugacity from the Curl-Pitzer corresponding-states correlation and the activity from regular-solution theory, with SRK supplying only the vapour fugacity. On this feed it lands at 89.2% vaporised and 61.7% recycle-gas hydrogen, against Peng-Robinson's 91.7% / 59.3% and SRK's 90.4% / 60.2% — a real, if modest, difference on the number a recycle-compressor is sized from. Honest about what is approximate: the package ships as Chao-Seader, and the Grayson-Streed 1963 special coefficients for hydrogen are a documented follow-up rather than transcribed, so the HYDROGEN K itself comes from the general correlation and is approximate — it saturates the solver's K bound here. Read the hydrocarbon splits and the phase fractions, which is what the method is good at; do not read the H₂ K-value as rigorous. Chao-Seader is a K-value method only, so enthalpy and density come from the inherited SRK — the pairing Aspen also uses.