MaximaLabs
Back to gallery
Reference model

Batch campaign: a batch step inside a continuous flowsheet — a NRTL process flowsheet

Fine chemicals and pharma run batches, but a flowsheet is written in mol/s. These two unit ops reconcile that: they integrate the real batch physics over the batch, then report the products as the RATE that campaign delivers, so a batch step sits inside a continuous flowsheet the way a plant actually runs one. The batch reactor esterifies ethanol with acetic acid to ethyl acetate and water. It reaches 63.2% conversion and stops, and that number is not a specification — it is the equilibrium. The reaction is reversible with an equilibrium constant of 4 (the forward and reverse pre-exponentials are given as 5.0e4 and 1.25e4), and solving K = x(0.10+x)/(0.45-x)^2 = 4 for an equimolar charge carrying 10% water gives an extent of 0.285, which is 63.3% of the acid. Fischer esterification really does plateau there; a model that ran to completion would be describing a different reaction. Turnaround time costs throughput exactly as reaction time does. Two hours of reaction plus one hour of turnaround is a 3-hour cycle and 2922 batches a year, and the reactor is only reacting for 67% of the time it is occupied. That fraction is the number that decides whether you need a second reactor, and it is invisible to a steady-state model. The batch still then takes the crude and recovers the ethyl acetate — the distillate comes off essentially pure, from a pot that started at 28.5 mol% ester — on its own longer 4-hour cycle, so the two units run at genuinely different campaign rates. Bounded: the flowsheet sees each unit's CYCLE AVERAGE, not the transient. A real plant has a surge tank between these two smoothing the pulses, and neither the concentration profile during the batch nor the still's changing overhead composition is visible downstream.

193 views 0 forks

Charge
RX
Still
Product
Residue
What this showcases
  • Rigorous NRTL thermodynamics, solved by the same engine every simulation runs on.
  • 2 unit operations modeled: RX, Still.
  • Focus areas: Batch, Esterification, Equilibrium, Campaign, Pharma.
Specification
Thermodynamics
NRTL
Components
ethanol, acetic_acid, ethyl_acetate, water
Unit operations
RXStill
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("batch-esterification-campaign")
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

Reference model (Luyben & Yu 2006)

Methyl acetate esterification via reactive distillation

Acetic acid and methanol esterify over the reactive stages of a column into methyl acetate and water — a genuine quadruple-azeotrope system where reactive distillation intensifies what would otherwise need several conventional columns. Reactive Distillation Design and Control, Luyben & Yu, Wiley (2006), pp. 147-164.

Contact process (H2SO4 plant)

Sulfuric acid: catalytic SO2 oxidation (contact process)

The heart of a sulfuric-acid plant: roaster/burner gas (SO₂ in excess air) is oxidized to SO₃ over a vanadium-pentoxide catalyst bed, then the SO₃ is absorbed to make acid. The converter is a Gibbs-minimization reactor (Aspen RGibbs equivalent) that finds the SO₂ ⇌ SO₃ equilibrium from first-principles formation energies — no assumed conversion — so it captures the real design tension of the contact process: the reaction SO₂ + ½O2 → SO₃ is exothermic, so a lower bed temperature drives the equilibrium toward SO₃ (higher conversion) while a higher temperature is needed for catalyst activity. At 700 K this converts ~99% of the SO₂; raise the sensitivity temperature and watch the equilibrium conversion fall — the reason real plants use multiple catalyst beds with interstage cooling. The SO₃-rich gas then goes to an absorption tower (modeled as SO₃ capture into the acid product, leaving a spent tail gas of N₂ + excess O₂). Formation-energy source: CRC Handbook / NIST-JANAF (ΔHf°/ΔGf° for SO₂ and SO₃).

Reference model (CN104628563A)

Patent benchmark: methyl lactate synthesis (CN104628563A)

Real patent replication, not an invented process: CN104628563A's acid-catalyzed lactate-ester route — lactic acid esterified with excess methanol, then purified by vacuum distillation — reproduced here as a continuous flowsheet. The patent's own worked methyl-lactate example reports 98.8% esterification conversion and 99.6% product purity at 120 degC/3h. This flowsheet's reactor conversion is set directly to the patent's reported 98.8% (not fitted); the vacuum column (0.2 atm, matching the patent's vacuum-distillation purification step) then splits the methanol and reaction water off the ester completely — zero methyl lactate leaves overhead — and delivers 97.8 mol% methyl lactate in the bottoms at 389.9 K. The property method is the whole story here, exactly as it was on the sulfolane extractive column. Written on Peng-Robinson, this example did not converge at all: every pair in a methanol / water / lactic-acid / methyl-lactate mixture is hydrogen-bonding, which van der Waals mixing cannot represent, and the column returned a partial profile carrying 2.60 mol/s of methyl lactate out of a column fed 1.98 — 32% more product than the reactor made, a 0.26 component-balance residual. (That wrong profile is where this example's previously-published 98.75% purity was read from; the number was retracted at the test level and is now corrected here.) A plain activity model cannot be used either, for a data reason rather than a physics one: neither lactic acid nor methyl lactate carries a regressed ideal-gas-Cp correlation, and the gamma-phi enthalpy path raises on that where a cubic quietly falls back to a corresponding-states estimate. PSRK is a cubic whose mixing is driven by UNIFAC, so it has both — and it converges to a 2.7e-06 component-balance residual, with methyl lactate and lactic acid each leaving in exactly the amount the reactor made.

Blue-H2 / CCS plant, Teesside, United Kingdom

Blue hydrogen: SMR + water-gas-shift + CO2 capture

A low-carbon (blue) hydrogen train: steam-methane reforming converts natural gas + steam to syngas (CH₄ + H₂O <=> CO + 3H2) at 1123 K, a water-gas-shift reactor converts the CO with more steam to extra H₂ + CO₂ (CO + H₂O <=> CO₂ + H₂), the gas is cooled, the process water knocked out, and 96% of the CO₂ is captured as a pure stream for sequestration/EOR (the CCS that makes the hydrogen 'blue'). Both reactors are solved to real chemical equilibrium (partial-pressure basis) rather than a fixed conversion, and each reactor's Keq is COMPUTED from its species' formation properties with ideal-gas Cp(T) integrated to the reactor temperature ('keq_from_gibbs') rather than typed in: 80.0% CH₄ conversion at 1123 K and an 11x CO knock-down at 620 K are what the thermodynamics give, not numbers chosen to look right. (This card previously stated Keq = 800 for the reformer where the formation properties say 500, and claimed ~85% conversion on the strength of it.).

Light naphtha isomerization unit, Corpus Christi, Texas, USA

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.

Biorefinery, glycerol valorisation

Bio-acrylic: glycerol to acrylic acid and butyl acrylate

Biodiesel glycerol (5 mol% in water, the dilute crude a transesterification plant actually sells) is vaporised and dehydrated over an acid catalyst at 553 K to acrolein, oxidised with air at 573 K to acrylic acid, quenched, dewatered in a vacuum column, and esterified with n-butanol to n-butyl acrylate: the two-step route from a renewable C₃ to the acrylic monomer, written out so its water, oxygen and carbon bookkeeping can be checked end to end. Each reaction is a conversion reactor with an exact element balance: dehydration (glycerol → acrolein + 2 H₂O), the competing C-C cleavage that every gas-phase dehydration catalyst shows (glycerol → acetaldehyde + CO + H₂ + H₂O), selective oxidation (acrolein + 1/2 O₂ → acrylic acid), over-oxidation (acrolein + 3/2 O₂ → acetic acid + CO₂), and esterification (acrylic acid + n-butanol → n-butyl acrylate + H₂O). A knock-out flash after dehydration rejects most of the water before the oxidiser; the quench liquid goes to a 0.15 atm acrylic-acid column (vacuum because acrylic acid polymerises when hot, which is also why its inhibitor profile is the question the column-inhibition analysis answers on this column); a caustic wash takes the unreacted acids out of the ester before a 0.2 atm butyl-acrylate column. What the flowsheet shows is where the water goes: 102 mol/s of it arrive with 5 mol/s of glycerol, the dehydration makes two more per acrolein, and nearly all of it has to be removed before the acid is concentrated, which is the energy cost that decides whether a bio-acrylic plant is viable. Solved: the vacuum column delivers a crude acid of 87 mol% acrylic acid (11% water, 2% acetic) and loses about 7% of the acid overhead with the water; the ester column delivers 94 mol% n-butyl acrylate, the balance unreacted butanol.

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