Scenario
Free play: set the river with the raw-water sliders.
Plant controls
Filters (click to backwash)
Raw water
Camera
Layers
Quality
Numerical checks
The science
Chemistry and coagulation
Alum consumes alkalinity and releases CO2 (0.505 mg/L CaCO3 and 0.444 mg/L CO2 per mg/L alum), so pH = 6.35 + log10([HCO3-]/[CO2]) falls. Destabilisation efficiency is a dose and pH window around the jar-test optimum 7 + 1.5 sqrt(NTU) + 2.6 TOC (rule of thumb).
Flocculation
G = sqrt(P/(μ V)); floc growth 1 - exp(-G t/20 000); breakage above about 90 1/s; slower when cold.
Sedimentation
SOR = Q/A. Lognormal floc settling speeds (Stokes, 1/μ(T)); removal = E[min(1, v/SOR)] x destabilised fraction. Solids accumulate as a sludge blanket (6 kg/m3); above 0.5 m it sheds turbidity. The particles you see sink at their own speed, so the picture obeys the same law.
Filtration
dC/dz = -λ C, λ = λ0 (v/5.2)-0.5 (1 + 0.6 s)(1 - s2) x ripening; Carman-Kozeny clean-bed head loss times (1 + 14 s2). The water level in a filter rises with head loss.
Disinfection
Demand then first-order decay in six tanks in series (baffling factor 0.525); regulatory CT = residual x T10; Chick-Watson kill with HOCl/OCl- split from pKa(T); calibrated to 3-log Giardia at CT 100 mg·min/L (10 C, pH 7). Filtration credit 2.5 log at or below 0.3 NTU, 1 log below 1 NTU.
Honest simplifications
One flocculation train and two identical basins, perfectly mixed chlorine cells, no ammonia or by-product chemistry, closed carbonate system, constants tuned to typical textbook behaviour. Educational model, not a design or compliance tool, not affiliated with any utility or regulator. Water, sludge and media levels are drawn from the model; the Blender geometry is schematic and not to scale.