Cars as a continuum
The Lighthill-Whitham-Richards (LWR) model, published independently by Lighthill and Whitham and by Richards in 1955-56, makes a bold simplifying move: instead of tracking every car individually, it treats traffic as a continuous, compressible fluid described by a single field, the vehicle density k(x, t) — vehicles per unit length of road at position x and time t. This throws away all information about individual drivers and lane changes, but it captures the large-scale phenomena that actually matter to a commuter: how congestion forms, how it spreads, and how fast a jam's back edge moves relative to the road.
Conservation of vehicles, and the fundamental diagram
The model rests on one exact physical law — cars are not created or destroyed on an ordinary stretch of road — and one empirical closure relation:
∂k/∂t + ∂q/∂x = 0 conservation of vehicles (a continuity equation) q(k) = k · v(k) flow = density × speed (the fundamental diagram) v(k) = v_max · (1 - k/k_jam) simplest closure: speed falls linearly with density
The fundamental diagram q(k) is the empirical heart of the whole theory: flow starts at zero (no cars, no flow), rises as density increases and cars start moving, peaks at some critical density where the road carries its maximum possible throughput, then falls back to zero as density approaches jam density k_jam, where cars are packed bumper to bumper and cannot move at all. Substituting the closure relation into conservation of vehicles turns the model into a single first-order nonlinear PDE for k(x,t) known as the LWR equation, a member of the same mathematical family (scalar hyperbolic conservation laws) as the equations describing shock waves in gas dynamics.
Kinematic waves: why disturbances travel backward
A given density value propagates along the road at the kinematic wave speed c(k) = dq/dk, not at the traffic's own velocity v(k) — a crucial distinction. In light traffic, c(k) is close to v_max and positive: information travels forward, roughly with the cars. But past the critical density, on the congested branch of the fundamental diagram, dq/dk turns negative. A small increase in density there makes the flow rate decrease, and the disturbance this creates propagates backward relative to the road — this is exactly the familiar experience of brake lights rippling toward you from far ahead, faster than you are driving, well before you reach the actual cause of the slowdown.
Shockwaves at bottlenecks
Because the LWR equation is nonlinear, characteristic curves carrying different density values can converge and cross — a mathematical inevitability whenever fast-moving light traffic runs up behind slower, denser traffic ahead, exactly what happens at a lane closure, an on-ramp merge or a stalled vehicle. When characteristics cross, the smooth solution breaks down and a genuine discontinuity — a shockwave — must form. Its propagation speed is fixed not by the PDE locally but by a global conservation argument, the Rankine-Hugoniot condition:
s = (q_right - q_left) / (k_right - k_left) s = shock (jam-boundary) propagation speed subscripts "left"/"right" = the free-flow and congested states either side of the front
A negative s means the shock — the back edge of a jam — moves upstream, against the direction of travel, exactly what drivers observe as a jam that seems to grow backward toward them even while the front of the jam, where cars finally clear the bottleneck, can stay stationary or creep slowly forward. Where a shockwave would otherwise require characteristics to diverge instead — going from a dense state to a sparse one, as when a red light turns green — the correct physical solution is instead a smooth rarefaction fan spreading the transition continuously in space, which is why traffic released from a red light thins out gradually rather than departing as an abrupt wall.
What the model gets right, and what it leaves out
LWR correctly predicts the qualitative existence and backward propagation of stop-and-go waves, the location and behaviour of shockwaves at bottlenecks, and the capacity-limiting role of the critical density — remarkable, given that it contains no information about individual driver reaction time, following distance or lane-changing behaviour. What it misses is exactly that microscopic detail: it cannot reproduce the spontaneous "phantom" jams that emerge from driver overreaction on an otherwise uniform road with no bottleneck at all, which require a car-following or cellular-automaton model (like Nagel-Schreckenberg) with an explicit reaction delay to capture. In practice, traffic engineers use LWR for macroscopic corridor and freeway planning, and switch to microscopic or cellular models when the question is about the emergence of jams from individual driver behaviour itself.
Frequently asked questions
Why does a traffic jam move backward even though every car is moving forward?
The jam is a density pattern, not a set of cars — individual cars enter the back of the jam, crawl through it, and exit the front, but the boundary of the congested region itself propagates upstream because each driver reacts to the car ahead with a delay. The LWR model captures this exactly: the wave speed dq/dk is negative in the congested branch of the fundamental diagram, so the disturbance travels backward relative to the road even while every vehicle's own velocity stays positive.
What is the fundamental diagram of traffic flow?
It is the empirical relationship q = k · v(k) between traffic flow (vehicles per hour) and density (vehicles per kilometre). Flow rises from zero at zero density, peaks at a critical density where the road carries maximum throughput, then falls back to zero at jam density where cars are bumper to bumper and cannot move. The LWR model uses this single curve, together with conservation of vehicles, as its entire closure assumption.
What triggers a shockwave in the LWR model?
Any local jump in density where fast-moving traffic runs into slower traffic ahead — a lane closure, an on-ramp merge, a crash, or simply a sudden brake. Because the LWR equation is a nonlinear conservation law, characteristics carrying different density values can converge and cross; when they do, the smooth solution breaks down and a discontinuous shock front forms and propagates at a speed set by the Rankine-Hugoniot jump condition.
Try it live
Everything above runs in your browser — open LWR Traffic Flow and change the parameters while it is running. Nothing is installed, nothing is uploaded, the whole model lives in one tab.
▶ Open LWR Traffic Flow simulation