HomeEnergy & ThermodynamicsPower Grid Flow

⚡ Power Grid Flow

Interactive electricity grid: DC power flow over a transmission network. Raise demand or trip a line and watch overloads cascade into a blackout. Real nodal power-flow solver, line loading, served-load tracking.

Energy & Thermodynamics3DAdvanced60 FPS
power-grid-flow ↗ Open standalone

About this simulation

This simulation solves the linearised DC power-flow equations on a 12-bus transmission network with 3 generators and 9 load centres. Every line has a thermal capacity, and when a line's flow exceeds it the line trips — instantly rerouting its power onto neighbouring lines, which can overload in turn and trigger a cascading blackout, exactly the failure mode behind real large-scale outages.

🔬 What it shows

A 4×3 grid of 12 buses connected by 17 transmission lines: squares are generators (capacities 220 MW, 150 MW and 150 MW), circles are demand buses with individual base loads. The network is solved via P = B·θ (a susceptance matrix with uniform line susceptance of 12, solved by Gaussian elimination), giving each line's flow f = b(θᵢ − θⱼ). Lines are coloured green under 60% loading, amber 60–90%, and red above 90%; a tripped line turns dashed grey, and any bus island left without a generator is blacked out entirely.

🎮 How to use

Raise System demand (40–170%) or lower Line capacity (60–160%) to push the grid toward its limits, or click any line directly to trip it and see how the network redistributes its power. Press Stress test to auto-ramp demand upward in 5% steps every 220ms until the grid fails, and watch Load served, Generation, Lines in service, Max line loading and Cascade depth update live. Restore grid resets every line and returns demand and capacity to 100%.

💡 Did you know?

Grid operators design around the N−1 criterion: the network must keep serving all customers even if any single line or generator fails unexpectedly. The 2003 Northeast America blackout (50 million people affected) and the 2006 European blackout both began with a single tripped line whose power redistributed onto already-loaded lines, triggering exactly the cascading sequence — trip, reroute, overload, trip again — that this simulation lets you trigger and watch unfold on a small scale.

Frequently asked questions

What is DC power flow and why does the simulation use it?

DC power flow is a linearised approximation of the full AC power-flow equations that assumes small angle differences between buses and ignores reactive power and losses. It reduces the flow problem to a simple linear system P = B·θ, where B is the network's susceptance matrix and θ is the vector of voltage angles at each bus, solvable directly by Gaussian elimination. It is the standard tool grid engineers use for fast contingency screening because it captures the essential redistribution behaviour of a real grid without the computational cost of a full AC solution.

How does a line actually "trip" and what happens afterward?

Each transmission line has a thermal capacity based on a nominal 62 MW rating scaled by the Line capacity slider. After solving the flow, the simulation checks every line's loading ratio (flow ÷ capacity); if any line exceeds 100%, the single most overloaded line is removed from the network and the DC power-flow equations are re-solved from scratch. Because power must still get from generators to loads, the tripped line's flow redistributes onto the remaining lines — which can now push previously safe lines over their own limit, repeating the cycle up to 40 times and building the "cascade depth" stat.

What causes a full blackout versus just an overloaded grid?

An overloaded grid (max line loading above about 85%) still delivers all its power but with little safety margin left. A blackout occurs when the cascading trips split the network into separate "islands" — the simulation checks network connectivity after every re-solve, and any island that ends up without a generator inside it has no way to serve its loads, so that entire island's demand is shed. The "Load served" percentage falls below 100% precisely when islanding has cut some buses off from every generator.

Why does raising demand or lowering line capacity make cascades more likely?

Raising System demand pushes more power through every line to satisfy the extra load, so the network starts closer to its collective thermal limit even before anything trips. Lowering Line capacity shrinks every line's thermal rating directly, so the same power flow that was previously safe now exceeds the (smaller) limit. Both sliders reduce the margin between normal operating flow and the trip threshold, which is exactly why the Stress test button ramps demand upward — to find the point where that margin runs out.

What is the N−1 criterion and how does it relate to real blackouts?

The N−1 criterion is the standard grid-planning rule that a transmission network must be able to lose any single line or generator and still serve all its customers without cascading failure. The 2003 Northeast America blackout and the 2006 European blackout both began with a single line trip (from a tree contact and a planned disconnection respectively) whose power rerouted onto neighbouring lines that were already running close to their limits, triggering exactly the trip-reroute-overload sequence this simulation reproduces — proof that even networks designed to N−1 standards can fail if operating margins have already eroded.

⚙ Under the hood

Transmission grid driven by a DC power-flow solver. Raise demand or trip a line and watch overloads cascade across the network into a blackout. Live line loading, served-load tracking and N−1 resilience.

Canvas 2DPower FlowNetworksCascading FailureEnergyLinear Algebra

3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)