A storm falls on a paved catchment and the runoff is steered through a curb cut into a bioretention cell. How much stays in the ground, how much overflows, and how long until the garden is empty again?
Each button re-runs the full event for several values and tabulates the result.
The science
Design storm. Depth P over duration D with a bell-shaped hyetograph: cumulative fraction F(x) = x³ (10 − 15x + 6x²), x = t/D (the Beta(3,3) law; peak intensity 1.875 P/D). It is a simple stand-in for the NRCS Type II distribution, not the published table.
SCS curve-number runoff. S = 25400/CN − 254 mm, initial abstraction Ia = 0.2 S, and for cumulative rain P > Ia: Q = (P − Ia)² / (P − Ia + S). The composite CN of the catchment is the area-weighted mean of 98 (pavement) and the pervious CN; this is an approximation (the curve-number method is nonlinear). Runoff then passes a linear reservoir with lag K = 10 min before it reaches the curb cut.
Infiltration into the engineered soil. Green–Ampt: f = Ks (1 + ψ Δθ / F) with suction head ψ = 0.11 m, Δθ = n − θi, cumulative infiltration F, saturated conductivity Ks (slider). The soil then drains to the gravel at qd = Ks s³, s = relative saturation above field capacity (illustrative exponent), limited by free space in the gravel.
Gravel store and exits. Gravel (porosity 0.40) fills from the bottom. It loses water by exfiltration into the native soil at its conductivity Kn (unit gradient) and, if the underdrain is on and the water level is above the pipe invert, through an orifice Q = Cd a √(2 g h) (Cd = 0.6, a proportional to the garden area). A weir at the maximum ponding depth sends excess straight to the street (overflow). Evapotranspiration 3 mm/day.
What is conserved. Rain on the garden plus runoff in = ponding + soil water + gravel water + overflow + underdrain + exfiltration + ET; the check table verifies this to machine precision. Drawdown time is counted from the end of rain until ponding is below 1 mm (guidance is typically 24 to 48 h).
Simplifications. One-dimensional vertical flow, no preferential flow or clogging dynamics, uniform soil, no lateral flow, no frost, constant ET, schematic drawing. Typical parameters, not a design: check local standards before sizing a real facility. Assets built with Blender; scene by Three.js.