🔋 Renewable Microgrid: 24-Hour Energy Balance (2D)
2D microgrid lab: a real sinusoidal solar curve, stochastic wind, and a two-peak household demand curve run on a repeating 24-hour clock, while an honest battery kWh model charges on surplus and discharges on deficit — with a live generation-vs-demand chart, a scrolling state-of-charge trace and a blackout indicator that fires the instant demand outruns generation and storage together.
This 2D companion trades the 3D version's systems-level scene for a plain, readable 24-hour energy-balance chart: solar output follows a real sinusoidal daylight curve between sunrise and sunset, wind wanders with a smoothed stochastic random walk the way real wind actually behaves, and household demand follows a genuine two-peak curve for the morning and evening. A battery model does honest kWh bookkeeping — charging on every kilowatt of surplus and discharging on every kilowatt of deficit, capped by real charge/discharge power limits and round-trip efficiency — and the moment demand outruns what generation and the battery together can supply, a blackout indicator fires and the deficit is logged, exactly the failure mode that real microgrid sizing exists to avoid.
2D microgrid energy-balance simulator with a real 24-hour solar curve, stochastic wind, a two-peak demand curve and a battery state-of-charge model with genuine kWh bookkeeping, charted live alongside a blackout indicator.
2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install