MaximaLabs
Back to gallery
Port Arthur, Texas, USA

Diesel hydrotreater with closed H2 recycle + amine wash — a PENG-ROBINSON process flowsheet

Diesel (an n-hexadecane carrier with a dibenzothiophene sulfur slice) and hydrogen react over a trickle-bed-equivalent reactor (dibenzothiophene + 2 H₂ → biphenyl + H₂S, the direct-desulfurization route; C₁₂H₈S + 2 H₂ balances, and the 3 H₂ this example once carried destroyed two hydrogen atoms per molecule) after a fired-heater preheat, at a treat-gas rate of ~3 mol H₂ per mol oil (~380 Nm3/m3) — the hydrogen excess that keeps the catalyst wet with H₂, not the 0.06 stoichiometric need. The effluent is cooled to 520 K (a real unit's feed/effluent exchange) before the hot high-pressure separator takes the gas off; a cold separator at 290 K condenses the carried-over oil; an amine wash (a fixed-recovery separator — the same simplification the carbon-capture example uses, not a full electrolyte amine model) scrubs H₂S from the recycle gas, and a compressor closes the loop with a 3% purge. The separator liquids are let down to 3 atm: a low-pressure separator flashes off the dissolved hydrogen and most of the H₂S as sour gas, and a six-stage steam stripper (Kremser, ~10 mol% stripping steam) finishes the desulfurized diesel. Every hydrogen atom is accounted for: makeup = reaction consumption + purge + sour gas + stripper overhead. History, because it changed the solver: this flowsheet used to run 6 mol/s of makeup on 50 mol/s of oil. All of that hydrogen dissolved in the hot liquid, both separators produced no gas, and the recycle the stream table showed was a stale tear iterate the loop had accepted as converged — the flowsheet now clears an edge its unit did not feed, so a loop can no longer converge onto a stream it fabricated. The refluxed stripper column that fed on it, asked to hold supercritical H₂S in a 600 K bottoms under a 239 K H₂S reflux, lost a fifth of its hydrogen and was gated unconverged for the same reason.

348 views 0 forks

OIL FEED
H2 Makeup
MIX
Fired Heater
HDT Reactor
Effluent Cooler
HOT HP SEP
COOL
COLD HP SEP
Amine Absorber
H2S Product
Recycle Split
Purge
Recycle COMP
Liquid MIX
Letdown
LP SEP
SOUR GAS
Strip Steam
liq
gas
gas
rich
Stripper
Stripper Overhead
Hydrotreated Diesel
What this showcases
  • Rigorous PENG-ROBINSON thermodynamics, solved by the same engine every simulation runs on.
  • 9 unit operations modeled: 2× Liquid MIX, 3× COOL, HDT Reactor, 3× LP SEP, Amine Absorber, Recycle Split, Recycle COMP, Letdown, Stripper.
  • Focus areas: Hydrotreating, Desulfurization, H2 recycle, Amine treating, Recycle.
Specification
Thermodynamics
PENG-ROBINSON
Components
n_hexadecane, dibenzothiophene, biphenyl, h2, h2s, water
Unit operations
2× Liquid MIX3× COOLHDT Reactor3× LP SEPAmine AbsorberRecycle SplitRecycle COMPLetdownStripper
Open in workspace

Opens in a new tab, loaded straight into the app — no setup.

Read the step-by-step guide
Python SDK

Reproduce this exact result from Python — the real client.get_example() → run_and_wait() path, not a mockup.

from flowsim.sdk import FlowSimClient

client = FlowSimClient()
example = client.get_example("refinery-hydrotreater")
sim = client.create_simulation(example["title"], example["flowsheet"])
result = client.run_and_wait(sim["id"])

print(result["status"])              # "converged"
streams = client.streams(sim["id"])

Related models

Refinery hydrotreater, co-processing case

Co-hydrogenation: vegetable oil co-processed in a gasoil hydrotreater

Rapeseed-type vegetable oil (modelled as triolein) co-processed at 7.3 wt% in a sulfur-bearing gasoil (n-hexadecane carrier with a dibenzothiophene slice) over a sulfided hydrotreating catalyst at 70 bar and 613-633 K, the way refineries put renewable carbon into diesel without a separate HVO unit. The triglyceride leaves by three routes, each written as its own conversion reactor with an exact element balance: hydrodeoxygenation (triolein + 15 H₂ → 3 n-C₁₈ + propane + 6 H₂O), decarboxylation (triolein + 6 H₂ → 3 n-C₁₇ + propane + 3 CO₂) and decarbonylation (triolein + 9 H₂ → 3 n-C₁₇ + propane + 3 CO + 3 H₂O); the glycerol backbone becomes propane in all three, and the double bonds are saturated in the same step. The gasoil is desulfurized in parallel (dibenzothiophene + 2 H₂ → biphenyl + H₂S). The effluent goes through a hot and a cold high-pressure separator; an amine wash (a fixed-recovery separator) takes H₂S and CO₂ out of the recycle gas, a 5% purge bleeds the CO and propane the wash cannot, and the recycle compressor closes the hydrogen loop. The separator liquids lose their water in a knock-out, are let down to 3 bar, flashed, and steam-stripped into the co-processed diesel. What the split costs in hydrogen is the point of the example: at 60% HDO, 30% decarboxylation and 10% decarbonylation the oil consumes 11.7 mol H₂ per mol triglyceride, against 15 for pure HDO and 6 for pure decarboxylation; with the 2.97 mol/s the desulfurization takes, chemical consumption is 14.67 mol/s, and the hydrogen leaving in the purge, the flash gas and the stripper overhead is set against the 30 mol/s makeup. The split leaves its fingerprint in the product: the diesel carries n-C₁₇ and n-C₁₈ in a 0.67 mole ratio, which is the measurement a refinery uses to infer the route.

Gorgon LNG, Barrow Island, Western Australia

High-CO2 LNG with amine capture and CO2 reinjection

One 5.3 Mtpa LNG train on a reservoir whose gas is 14 mol% CO₂, where the CO₂ is not vented but compressed to dense phase and injected — 2.8 Mtpa of it, at 200 bar, which is the scale that makes this a storage project rather than a gesture. Two things make this different from every other LNG example here. First, the acid-gas removal is real chemistry, in the same flowsheet as the cryogenics: per-node thermo_overrides run the absorber, the rich/lean loop and the stripper on the 'enrtl-mdea-pz' electrolyte package (MDEA protonation + piperazine carbamate/dicarbamate speciation) while the gas train and the cold end run Peng-Robinson — the amine unit and the MCHE are not two models bolted together, they are one solve. Second, the CO₂ goes somewhere: the stripper overhead is knocked back, two-stage compressed with interstage cooling and drying, and pumped to 200 bar as a ~96 mol% dense-phase stream ready for a reinjection well, rather than leaving as a vent. The sweet gas is water-washed, dried and liquefied in the C3MR cold end to LNG at ~116 K.

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.

Erlangen, Germany

LOHC hydrogen release (methylcyclohexane dehydrogenation)

A liquid organic hydrogen carrier (LOHC) power train: methylcyclohexane (MCH) is preheated and catalytically dehydrogenated (MCH → toluene + 3H2, endothermic, equilibrium-limited to ~90% single-pass conversion) to release hydrogen for downstream power generation. A flash drum separates the H₂-rich gas from the liquid; a distillation column then recovers the unreacted MCH overhead and recycles it to the reactor feed, closing a real tight liquid recycle loop, while spent toluene leaves the bottoms (to be re-hydrogenated back to MCH off-site, closing the supply-chain loop — out of scope for this dehydrogenation-side flowsheet). Screening-fidelity note: MCH and toluene are genuinely close-boiling (relative volatility ~1.4 under this thermo package at column conditions), so the recycle carries real toluene along with the recovered MCH rather than a sharp cut — a production column would use more stages to purify it further; this shows the recycle topology and its convergence, not an optimized column design.

Reference model

Recycle loop

A mixer/heater/splitter loop with a tear stream — exercises Wegstein recycle convergence.

Reference model (ChemSep)

Propane refrigeration cycle

A single-stage vapor-compression refrigeration loop: propane vapor is compressed, condensed to subcooled liquid, throttled through a valve, and superheated back to vapor in the evaporator before recycling — a small makeup feed and purge close the mass balance (inspired by ChemSep's Refrigeration_* reference cases).

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