Environment · Simulator 086
Rain falling on a roof can fill a tank for flushing toilets, washing and watering. Choose a climate, a roof and a tank, and decide how much water to use each day. Run a year day by day and see when the tank overflows, when it runs dry, and why the timing of rain matters as much as the total.
Each millimetre of rain on one square metre of roof is one litre of water. Some is lost to splashing, evaporation and the first dirty flush, so the harvest is
inflow (L) = rainfall (mm) × roof area (m²) × runoff coefficient
Every day the model adds the inflow to the tank, spills anything above the capacity (overflow), then draws the day's demand. If the tank holds less than the demand, the gap is a shortage:
storage(t+1) = min(capacity, storage(t) + inflow) − supply, supply = min(demand, available)
Reliability is the share of days when the full demand is met; water saved is the share of the year's demand supplied by the tank. A bigger tank helps only if there is surplus rain to store; a bigger roof helps only if the tank can hold what it collects.
Rain is generated day by day from monthly averages: a seasonal monsoon pattern (about 750 mm, most of it from June to September), an even temperate pattern (about 600 mm spread through the year), and a dry winter-rain pattern (about 300 mm). Each month always receives its average total; the random seed changes which days are wet and how the rain is split between them.
One idealized year starting with an empty tank on 1 January, no evaporation from the tank, and constant daily demand. Real designs use many years of measured rainfall and allow for water quality and first-flush diversion.
A school roof of 400 m² in a place with 900 mm of rain a year (runoff coefficient 0.8) serves toilets that use 1,500 L per school day, 200 days a year. Could the roof supply all of it in principle? What else decides whether it does?
Yearly harvest = 900 × 400 × 0.8 = 288,000 L; demand = 1,500 × 200 = 300,000 L. So even in principle the roof falls about 4% short, and in practice the tank size and the timing of the rain decide how much less it supplies: rain during holidays or in a few big storms is lost to overflow unless the tank is large.