MaximaLabs
Back to gallery
Refinery hydrotreater, co-processing case

Co-hydrogenation: vegetable oil co-processed in a gasoil hydrotreater — a PENG-ROBINSON process flowsheet

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.

Modeling assumptions & limitations

  1. 1The pathway split is a stated screening INPUT, not a prediction. The co-processing literature reports both routes operating on sulfided NiMo/CoMo, with their balance set by catalyst and conditions (Huber, O'Connor & Corma, Appl. Catal. A 329
  2. 2120; Donnis et al., Top. Catal. 52
  3. 3229; Kubicka & Kaluza, Appl. Catal. A 372
  4. 4199); the 60/30/10 numbers are illustrative within that picture, and the n-C₁₇/n-C₁₈ ratio of a real product is what should replace them.
  5. 5The triglyceride record carries no ideal-gas heat-capacity correlation and no heat of formation, so no heat of reaction is booked: every reactor is temperature-specified and its duty is sensible heat only, not the exotherm a real bed removes with quench gas.
  6. 6Water-gas shift and CO methanation, which move CO and CO₂ around in a real loop, are not modelled; CO accumulates until the purge carries it out.
  7. 7The oil is one triglyceride and the gasoil one paraffin plus one sulfur species; there is no aromatic saturation, no cracking and no hydroisomerization. The atom balances are exact; the hydrogen bookkeeping follows from them.

5 views 0 forks

Gasoil
VEG OIL
H2 Makeup
H2 MIX
MIX
Fired Heater
HDO
Decarboxylation
Decarbonylation
HDS
Effluent Cooler
HOT HP SEP
COOL
COLD HP SEP
Amine WASH
ACID GAS
Recycle Split
Purge
Recycle COMP
Liquid MIX
Water KO
SOUR Water
Letdown
LP SEP
LP GAS
Strip Steam
liq
gas
gas
rich
Stripper
Stripper Overhead
Coprocessed Diesel
What this showcases
  • Rigorous PENG-ROBINSON thermodynamics, solved by the same engine every simulation runs on.
  • 9 unit operations modeled: 3× Liquid MIX, 3× COOL, 4× HDS, 3× LP SEP, 2× Water KO, Recycle Split, Recycle COMP, Letdown, Stripper.
  • Focus areas: Co-processing, Hydrotreating, HDO, Decarboxylation, Renewable diesel, H2 recycle, Desulfurization.
Specification
Thermodynamics
PENG-ROBINSON
Components
triolein_ooo, n_hexadecane, dibenzothiophene, h2, n_octadecane, n_heptadecane, propane, water, co2, co, h2s, biphenyl
Unit operations
3× Liquid MIX3× COOL4× HDS3× LP SEP2× Water KORecycle 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("vegetable-oil-gasoil-co-hydrogenation")
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

Port Arthur, Texas, USA

Diesel hydrotreater with closed H2 recycle + amine wash

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.

Renewable-fuels refinery, Norco, Louisiana, USA

Renewable diesel & SAF: HEFA hydrotreating train

The HEFA (Hydroprocessed Esters and Fatty Acids) pathway to sustainable aviation fuel and renewable diesel from fats/oils/greases: a triglyceride feed (triolein) plus a large hydrogen excess is hydrodeoxygenated (HDO) to n-paraffins + propane + water, the paraffins are hydrocracked/isomerized toward the jet range, the H₂-rich recycle gas and the HDO process water are knocked out, the light ends are stabilized, and a two-column fractionation splits the product into light naphtha, a jet-range SAF cut, and renewable-diesel bottoms.

LNG receiving and export terminal

LNG front end and storage: guard beds, tank boil-off, driver limit

The parts of a 5.2 Mtpa LNG train that are not the cold box, and the four questions they answer that no bulk unit can — at real capacity, so the vessel sizes and duties are ones an engineer can check against their own plant. Guard beds: a sulfur-carbon bed takes mercury from 200 to 0.01 µg/Nm³ — the brazed-aluminium limit, because mercury attacks the plate-fin cold box by liquid-metal embrittlement — on a 4.8 m x 6.6 m bed with 4.2 years of life from a capacity balance — inside the 3-5 year window these non-regenerable beds are actually replaced on, which is what a turnaround plan needs. A 4A molecular sieve then dries the gas to 0.1 ppmv, the only route to a cryogenic water spec (a glycol contactor tops out near a −30 °C dew point), on a 4.9 m x 5.1 m bed running a 13.8 h cycle for 1.3 MW of regeneration duty. Storage: the LNG goes to a tank whose boil-off rate comes from a 0.05%/day guarantee but whose boil-off composition comes from a real equilibrium flash — and that is the interesting part, because the vapour leaves at ~11 mol% nitrogen against 1.1% in the feed. Nitrogen and methane are far more volatile at 113 K, so the boil-off is light and the stored liquid weathers heavier: nobody specified that, the flash found it. Recondensing: the boil-off goes back into the send-out LNG rather than to a flare, and the unit reports the LNG:BOG ratio (1999) against the minimum the energy balance demands (3.8), which is the constraint a terminal is actually operated against. The driver: a gas turbine burning plant fuel gas, rated 97.5 MW at ISO conditions, delivers only 84.5 MW at 35 °C — 5.5 MW short of its 90 MW refrigeration load, and flagged as such. That derate is computed from two physical effects (a fixed-geometry compressor swallows a fixed volume so mass flow follows air density, and hotter air costs more to compress), not from a vendor curve, and it comes out at 0.66%/K — mid-band for industrial machines. It is why a tropical LNG train makes less product in summer.

Ichthys LNG, Darwin, Northern Territory, Australia

Gas-condensate LNG train: condensate, LPG and LNG

The LNG plant that is also a liquids plant, at real capacity: this is one 4.4 Mtpa train (a two-train plant is two of these), not a scaled-down sketch. A condensate-rich field arrives by trunkline as a two-phase stream: the slug catcher drops ~20 mol% of it out as raw condensate before a single molecule reaches the cold end, and the plant then runs two trains side by side off one feed. Liquids: the raw condensate is let down to an MP flash that strips the dissolved methane (without it the stabilizer's shortcut total condenser tries to condense methane at 8 bar, which is not a real stabilizer overhead), then stabilized to a C₅/C₆ product. Gas: sweetened and dried, chilled to 245 K to knock out an NGL cut, and the NGL demethanized and split by a deethanizer / depropanizer / debutanizer sequence into commercial propane (~98 mol%) and butane (~98 mol%) LPG plus a natural-gasoline bottoms. LNG: the lean gas goes to the same APCI C3MR cold end as the 'c3mr-lng-liquefaction' showcase — propane precool, mixed-refrigerant MCHE to 120 K, JT letdown to a 1.5 bar end-flash drum. Five sold products come out of one flowsheet, each a stream the solver computed. Watch the end-flash boil-off: it leaves at ~13 mol% nitrogen against 1 mol% in the feed, because the flash drum is where an LNG train actually rejects its nitrogen — nobody specified that, the flash found it. Dehydration is the real molecular-sieve bed, not a stand-in: a 4A sieve sized by length-of-unused-bed, which is what actually takes the gas to the <=0.1 ppmv the cold box needs — 95 t of sieve on a 5.5 x 5.5 m bed, a 17.5 h cycle and 1.4 MW of regeneration duty, with 0.47 bar of Ergun pressure drop. The AGRU spec is checked against the physics rather than assumed: 99.9% CO₂ removal leaves 33 ppmv, and at the coldest point in the train (115.9 K) the solid-CO₂ solubility limit is 232 ppmv on the measured-data basis — a 7x margin, so the sweetening spec demonstrably clears freeze-out instead of merely looking tight.

NGL recovery plant, Permian Basin, Texas, USA

Deep ethane recovery with propane-refrigerated feed chilling

Associated gas is chilled by an external propane refrigeration package before a demethanizer recovers ethane and heavier as NGL bottoms from a methane-rich residue gas overhead — the cryogenic-chilling role Ortloff's CCS/GSP processes play ahead of the turboexpander in a real deep-ethane-recovery plant. The mechanical refrigeration loop itself (compressor/condenser/valve) isn't separately modeled here; the chiller's duty is represented directly as the feed's cooled outlet temperature (the same honest-simplification pattern used for LNG cold-box examples elsewhere in this library).

Reference model

Gas compressor air-cooled aftercooler (fin-fan)

A natural-gas booster compressor followed by an air-cooled (fin-fan) aftercooler — the standard way to reject compression heat where no cooling water is available. The compressor raises the gas from 8 to 24 atm (hot discharge ~150 °C); the air cooler then rejects that heat to ambient air, cooling the gas back to 49 °C. Unlike a plain cooler, the air_cooler op closes the air side: from the process duty and the 35 °C design ambient it solves the air mass flow (a 15 °C air rise) and reports the fan power from the given fan static pressure. Honest scope: screening air-side model (fixed cp_air, ideal-gas air density, no fin/row geometry rating); an air cooler cannot cool below ambient, so the 49 °C target sits safely above the 35 °C air inlet.

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