← 🛣️ Society & Infrastructure

🚦 LWR Traffic Lab

Peak density:
Shockwave speed:
Throughput:
FPS:
free flowcongestedjammed
Drag — rotate · Scroll — zoom

🚦 LWR Traffic Flow: Treating the Motorway as a Fluid

A stretch of motorway is solved as a continuous density field, the way the Lighthill-Whitham-Richards model treats traffic like a compressible fluid, so that a lane-closure bottleneck visibly triggers a shockwave — a traffic jam boundary — that crawls backward against the flow.

🔬 What It Demonstrates

A Godunov finite-volume scheme advances vehicle density ρ(x,t) using the Greenshields speed-density relation. Where a bottleneck caps the flow that can pass, density backs up and a sharp shock front forms and propagates upstream, matching the Rankine-Hugoniot jump condition.

🎮 How to Use

Raise the inflow density to add more demand, and dial up bottleneck severity to choke capacity at the cone-marked pinch point. Watch the colour-coded density ribbon and the instanced vehicles bunch into a red jam that creeps backward, then ease off the bottleneck to watch it dissolve.

💡 Did You Know?

The same Godunov numerical-flux technique used here to resolve sharp traffic shocks was originally developed for shock waves in compressible gas dynamics — traffic jams and sonic booms share the same mathematics.