When a cloud edge crosses a solar field, output can fall by more than half in a minute. How big is that ramp, and how much battery does it take to hide it from the grid?
Each button simulates whole days headless (04:00 to 22:00) with the current settings and tabulates the result.
The science
Sun and clear sky. Declination δ = 23.45° sin(360(284+n)/365), hour angle ω = 15°(h − 12), cos θz = sin φ sin δ + cos φ cos δ cos ω. Clear-sky global horizontal irradiance (Haurwitz): GHIcs = 1098 cos θz exp(−0.057 / cos θz) W/m².
Clouds. A moving value-noise field gives a local cloud fraction N (0 to 1) for each of ten 30 m wide sections; the whole pattern is advected at wind speed u. Clear-sky index (Kasten–Czeplak form, kt = 1 − 0.75 N3.4) gives GHI = kt · GHIcs; the diffuse fraction follows the Erbs correlation. Both are empirical fits [перевірити за джерелом]. Shadow edges are shifted by the cloud height over tan(elevation), the same offset used to draw the clouds.
Plane of array and power. POA = beam · Rb + diffuse · (1 + cos β)/2 + albedo · GHI · (1 − cos β)/2 with the Duffie–Beckman incidence angle. Cell temperature Tc = Tamb + (NOCT − 20)/800 · G (NOCT = 45 °C), DC power P = PSTC (G/1000)(1 + γ(Tc − 25)), γ = −0.35 %/K, inverter efficiency 0.97 and AC limit PSTC/1.25 (clipping).
Battery ramp limiter. Grid power follows PV but may change by at most R per minute: Pg ← clamp(Ppv, Pg − R dt, Pg + R dt); the battery takes Pb = Ppv − Pg within its power rating and 10–95 % state of charge, with one-way efficiency √0.9. Ledger: Epv − Egrid = ΔEstored + Eloss.
Simplifications: a single plane-of-array model per section, no spectral or angle-of-incidence losses, no soiling or wiring loss, cloud field is a texture-like noise, not real cloud physics, ambient temperature is a fixed daily cosine, no battery degradation, and the grid-code ramp value is illustrative. Assets built with Blender; scene by Three.js.