Bonneville Spillway Operator puts you in charge of dam operations on the Columbia River. Balance hydropower generation, downstream flood risk, fish-passage requirements, and reservoir storage across changing inflow scenarios. Engineering-accurate within a stylized interface.
Each turn (one day or one week, depending on time-step): observe inflow forecast and reservoir level, choose spillway gate openings and turbine flow. Generate revenue from power, lose points for flood-stage exceedance downstream and missed fish-ladder windows. Ten-year campaign rewards consistent balance.
Stylized after the real Bonneville Dam on the Columbia River (Cascade Locks, OR). Reservoir geometry, turbine count, and spillway capacity follow public USACE data; tradeoffs between objectives are real-world.
Spring snowmelt with high salmon-run flow requirements: high inflow forces spill, but the regulatory floor for fish passage limits spillway openings. Dam managers face this every May–June.
Ten-year campaign awards a "career bronze/silver/gold" based on aggregate performance. Going golden requires anticipating inflow uncertainty rather than reacting.
Soft-fail only — overtopping or spillway overload triggers a critical penalty and ends the campaign. The model does not simulate physical breach.
The simulation runs a small set of first-principles equations every tick. Units are kept in the operator's own working system — flow in kcfs (thousands of cubic feet per second), power in MW, pool elevation in ft, time in minutes. Reservoir geometry, turbine count and spillway capacity follow public USACE data for Bonneville (nameplate ≈ 1077 MW, Francis units, flip-lip deflectors). Here is what each meter is actually computing.
The pool is a bathtub. Net storage change is inflow minus everything leaving:
The powerhouse uses the standard hydraulic-power equation P = ρ·g·Q·H·η, with water density ρ = 1000 kg/m³ and g = 9.81 m/s². Rather than convert units every frame, the code folds the kcfs→m³/s and ft→m conversions plus ρg and the ÷10⁶ (W→MW) into a single constant:
The 0.0846 is that lumped unit-conversion constant (it represents ρg with the imperial-to-SI and W-to-MW factors baked in). Efficiency η is 0.86 for the baseline Francis units, 0.90 after a Kaplan retrofit. Net head is H = poolElev − tailwater − 0.015·Q (a 0.015 ft/kcfs penstock head-loss term), tailwater rising with total discharge along a linearised rating curve capped at +18 ft. Generation is clipped to the nameplate ceiling, and revenue accrues as genMW · (dt/60) · $42/MWh.
Spilled water plunges into the stilling basin and entrains air, driving nitrogen/oxygen supersaturation downstream — the mechanism behind gas-bubble trauma in salmon. The model uses the familiar square-root-of-spill form, floored at 100% saturation:
Regulatory thresholds mirror the real EPA/ODEQ regime: harm to fish begins above 115% (110% during a DEQ inspection window), monetary penalties accrue above 120%, and 130% is a hard shutdown.
With a fish ladder installed, passage each tick scales with attraction flow and inverse TDG harm:
This is an operations model, not a CFD or fisheries-population model: the pool is treated as a single well-mixed volume, tailwater and TDG use algebraic rating relations rather than routed hydraulics, and salmon are a flow-and-gas response curve rather than individual agents. It is calibrated to give the real tradeoffs — spill for fish attraction versus TDG kill, turbine flow for revenue versus pool drawdown — not certified numbers.
Built by a practicing dam-safety and hydraulics engineer. For the real calculators behind spillway and outlet hydraulics, see the free weir, orifice & open-channel tools at pe-calc.com, or HydroComplete for stormwater design software.
Sign in with GitHub to share strategies, ask questions, or report a bug.