MaximaLabs
Back to gallery
Permian Basin, Texas, USA

Produced-water scale removal: precipitation + thickener dewatering — a BRINE process flowsheet

Oilfield produced water carries the classic mineral-scale ions — barium and strontium against sulfate (barite BaSO₄ / celestine SrSO₄, the notorious hard sulfate scales that plug tubing and need milling to remove) plus calcium against carbonate and sulfate (calcite / gypsum). A precipitation stage throws every over-saturated scale mineral at once — the precipitator unit op keyed on its CRC-cited solubility-product table, with each mineral removing BOTH its metal cation and its anion from the water — and a gravity thickener then dewaters the slurry into a dense underflow sludge and a clarified overflow. The barium (the worst offender) comes out essentially completely as barite.

Modeling assumptions & limitations

  1. 1Equilibrium Ksp precipitation (B-dot activity, a dilute-liquor solution-volume estimate from the water flow); the minerals precipitate in the solubility-table order, so a sulfate-limited water partitions the sulfate to the least-soluble minerals first (barite and celestine before gypsum) — the physically right ranking, but a screening equilibrium, not a kinetic scale-tendency (Oddo-Tomson / ScaleChem) index. A real scale-management study adds antiscalant dosing and induction-time kinetics; this sizes the removable inventory.

107 views 0 forks

PW
feed
clarified
sludge
Scale
solid
liquor
over
under
Thick
Sludge
Clean Water
What this showcases
  • Rigorous BRINE thermodynamics, solved by the same engine every simulation runs on.
  • 2 unit operations modeled: Scale, Thick.
  • Focus areas: Produced water, Scale removal, Barite, Precipitation, Thickener.
  • Verified fast convergence — a real, measured solve time, not an estimate.
Specification
Thermodynamics
BRINE
Components
water, ba, sr, ca, so4, co3
Unit operations
ScaleThick
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("produced-water-scale-removal")
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

Butte, Montana, USA

Acid-mine-drainage neutralization: staged lime precipitation

Acidic, metal-laden mine water (dissolved ferric iron, aluminium, nickel and zinc over a sulfate background) is cleaned in a two-stage lime-neutralization circuit — the classic hydrometallurgy / water-treatment precipitation train. Stage 1 doses to pH 4.5, where ferric iron (Fe(OH)3, pKsp 38.6) and aluminium (Al(OH)3, pKsp 33.0) drop out as a sludge while the base metals stay dissolved; stage 2 raises the liquor to pH 9.5, where nickel (Ni(OH)2) and zinc (Zn(OH)2) precipitate, leaving a clarified effluent. Both stages are the new precipitator unit op wrapping the codebase's CRC-cited metal-hydroxide solubility-product chemistry (thermo/electrolytes.hydroxide_precipitation) — dose to a pH setpoint, read off what drops out — the same selective-precipitation workflow a real neutralization plant runs.

Antofagasta, Chile

Copper recovery from a leach residue: CCD washing + hydroxide precipitation

A leach residue leaves a heap/tank-leach circuit as a slurry — insoluble gangue solids carrying entrained copper-sulfate pregnant liquor that would be lost to tailings if simply thickened. A counter-current-decantation (CCD) wash train recovers it: the residue is washed with clean water flowing counter-current to the solids across a chain of thickeners, so the dissolved copper is displaced into a pregnant-liquor overflow while the washed solids go to tailings. The new ccd_washer unit op models the whole train in one block via the classic counter-current washing equation f = (R-1)/(R^(N+1)-1) (Perry's §18; Coulson & Richardson Vol. 2): five stages at a wash ratio near 4 recover ~99.9% of the dissolved copper, leaving only ~0.08% with the tailings. The pregnant liquor is then dosed to pH 8, where the copper drops as Cu(OH)2 sludge (the precipitator op on the CRC-cited solubility-product chemistry), leaving a barren raffinate for recycle.

Cooling-water effluent treatment plant

Cooling-tower blowdown treatment — lime dosing and what it will not remove

The stream cooling-water-utility-circuit sends to effluent, treated. Concentrated blowdown (4 cycles on a hard makeup, plus zinc from a corrosion-inhibitor programme) is dosed with lime to pH 10.5, and the metals that can drop as hydroxides do. A separate flowsheet on purpose. This runs on the brine electrolyte package with the ions as real components; the cooling loop runs on steam with water alone. Carrying hardness as flowsheet components changes the thermodynamics of every stream it touches, so the loop keeps its water model and the treatment plant gets the one it needs — which is also how the two are engineered and operated in a real plant. The result is mostly a lesson in what hydroxide precipitation cannot do. Magnesium goes from 2100 to 10 ppm-equivalent (99.5% removed) and zinc is essentially complete, leaving a sludge that is 91% Mg(OH)2 and 9% Zn(OH)2. Calcium does not move at all — it enters at 0.0042 mole fraction and leaves at 0.0042. That is correct, not a failure to converge: Ca(OH)2 is far too soluble to precipitate at this pH, and removing calcium needs carbonate — soda-ash softening — which is a different reagent and a different chemistry from the one dosed here. A treatment report claiming lime alone softens a blowdown is describing something this model will not reproduce. Sulfate likewise passes straight through: it leaves with the clarified water, which is why blowdown salinity is a discharge-consent question rather than something a precipitation stage fixes. Bounded: equilibrium Ksp at a dosed pH (see ``), with no self-consistent pH from the metal hydrolysis itself, a dilute-liquor volume estimate, and B-dot activities. The lime reagent is a circuit condition rather than a tracked feed, and the gypsum a real lime circuit throws is not modelled. Sludge dewatering is absent deliberately: the precipitator's solid outlet carries no entrained water, so a thickener placed after it would be splitting a dry stream and reporting a 'recovered water' that is 100% hydroxide.

Antwerp, Belgium

Solids train (crystallize → filter → dry)

An MSMPR crystallizer feeds a cake filter and dryer — the crystal size and cake moisture propagate on the stream's solids payload (pharma / minerals workflow).

Pharmaceutical crystallization / API finishing, Cork, Ireland

Crystallization with agglomeration (distributed CSD)

An MSMPR crystallizer solved with the rigorous distributed population balance (not just moments): the full crystal-size distribution is computed on a size grid, and an agglomeration (aggregation) kernel combines fine crystals into larger ones — coarsening the mass-weighted mean size (d43) and broadening the distribution (CV rises above the growth-only MSMPR value of ~1.0) while conserving mass exactly. The distribution, its coefficient of variation, and d43 propagate on the solid stream into the filter and dryer — the gPROMS/gCRYSTAL capability the moment model structurally cannot provide.

Ludwigshafen, Germany

Crystallization + granulation finishing

A continuous MSMPR crystallizer, cake filter, and dryer feed a granulator that grows the dried crystals into free-flowing granules — the finished-product train after the mother liquor and dryer vapor leave.

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