Flow Lab

Syllabus / Module 15: Applications: Biology, Chemistry & Society

Lesson 15.7

Traffic Flow

The LWR model as a conservation law, fundamental diagram, traffic shocks and rarefactions, car-following ODE models.

Written byClaude Sonnet

🌊
Why this matters for simulation: Traffic is a 1D compressible 'fluid' of cars — shocks and all.

By the end of this lesson you can…

  • Derive the LWR conservation law for car density and find the capacity and critical density of the Greenshields flux.
  • Compute characteristic speeds and explain why waves travel backward above the critical density.
  • Use the Rankine-Hugoniot speed to find how fast a red-light queue grows, and the rarefaction fan to find the discharge at a green light.
  • Write Godunov's flux for a concave flux, measure its convergence order, and find where its time step limit bites.
  • Derive the linear stability threshold of the optimal-velocity car-following model on a ring road.
  • Say what LWR cannot do, and name the toolbox of Module 15: conservation, stability, bifurcation and stiffness.
On this page
·
  1. Cars as a conserved fluid
  2. Characteristics, forward and backward
  3. A red light: the shock
  4. A green light: the rarefaction fan
  5. Godunov’s scheme for traffic
  6. The ring road and the limit of LWR
  7. What both models leave out
  8. Module 15 in one table
  9. Where this goes next
  10. The exercise: Godunov flux, step and the stability threshold
  11. Concept checks
  12. Problems
  13. Key Takeaways

15.6 Neuron Models ended by dropping diffusion. Here there is none: cars on a road obey a pure conservation law with a nonlinear flux, so information travels only along characteristics, can pile up into shocks, and can open into fans. Everything from 9.10 First-Order PDEs: Advection & Characteristics, 9.11 Nonlinear Waves: Burgers' Equation & Shocks and 10.10 The Finite Volume Method returns, with a twist: the shock is a traffic jam, and its speed can be negative. We then ask where the continuum picture fails, using one ODE per car, and close Module 15 with its toolbox.

▶ Video Cars as a conserved fluid, the fundamental diagram, a red light making a shock and a green light making a fan, the Godunov scheme, and stop-and-go waves on a ring roadcaptions only
Transcript
  1. The last lesson ended by dropping diffusion. Here there is none. Cars on a road obey a pure conservation law: the cars on a stretch change only by crossing its ends, so rho t plus q x equals zero, with flux q equal to density times speed. Let speed depend on density alone and the flux is nonlinear: the Lighthill-Whitham-Richards model. With no diffusion, information travels only along characteristics, so waves can pile into shocks and open into fans. The twist is that a traffic jam can move backward.
  2. The simplest speed law is Greenshields' straight line: speed falls from v max to zero as density rises to rho max. The flux is a parabola, zero on an empty road and zero when cars are parked, with its maximum at the critical density, half of rho max. That maximum is the capacity, v max rho max over 4. Take 20 metres per second and 0.125 cars per metre: capacity is 0.625 cars per second, 2250 cars per hour, at 62.5 cars per kilometre and 10 metres per second. With both maxima 1, capacity is 0.25.
  3. Expand the flux and rho is constant along lines whose speed is q prime, v max times 1 minus 2 rho over rho max. Two facts. Waves are slower than the cars, so a driver overtakes them. And q prime changes sign at the critical density: in dense traffic waves travel backward, so the front of a jam dissolves while its back grows. At rho max the wave speed is minus v max. Smooth data, 0.4 plus 0.1 sine of 2 pi x, break when characteristics first cross, at t star equal 0.7958.
  4. A red light. Integrating over a box around a jump gives the Rankine-Hugoniot speed: flux difference over density difference, which for Greenshields is v max times 1 minus the sum of the two densities over rho max. Traffic at 0.3 of rho max meets a stopped queue at rho max: the speed is minus 0.3 v max, minus 6 metres per second, so the tail of the queue moves up the road. After a 30 second red it is 180 metres long, holding 22.5 cars: 15.75 arrived, plus 6.75 already there. Godunov puts the shock at minus 0.141.
  5. A green light: the queue sits upstream, the road ahead is empty. Characteristics run at minus v max on the left and plus v max on the right, so they fan apart, leaving density rho max over 2 times 1 minus x over v max t. At the light itself the density is half of rho max for all time, so the queue discharges at capacity, 0.625 cars per second, never faster. Godunov agrees: the central flux is 0.25, with the neighbouring cells at 0.5100 and 0.4900.
  6. Godunov's flux is the exact Riemann flux at each face: the minimum of q over the interval when density rises, the maximum when it falls, and the capacity when the interval straddles the critical density. On smooth data it is first order: observed orders 0.972, 0.983, 0.992 as the grid doubles from 100 to 800. The fan is slower, 0.717 to 0.786. The time step matters too. In a jam test the first undershoot appears at 1.26, densities go negative at 1.37, and the run overflows at 1.38.
  7. LWR says drivers adopt the right speed instantly. Real drivers lag. The optimal velocity model puts one equation on each car: acceleration is a times the speed its headway allows. Linearise around uniform flow and a wave has lambda squared plus a lambda equal to a V prime times e to the i k minus 1. Long waves grow exactly when V prime exceeds a over 2, that is, above the critical density. With a equal 0.8 it is 0.63246. At 0.62 every mode decays; at 0.8 the fastest mode grows at 0.031487.
  8. Run 100 cars at density 0.8, seeded at 10 to the minus 3, to time 2500. Uniform flow is gone: the cars stop and go. The mean flux is 0.15125 against the uniform 0.16, a 5.5 percent drop. Speeds run from nearly stopped to 0.437, over twice the equilibrium 0.2. The pattern drifts backward at 0.5980, close to the LWR speed of minus 0.6. And the minimum headway is 0.823, below 1: cars overlap. A Godunov solution can only translate and sharpen. LWR explains what happens once a jam exists, not why it forms.
  9. That closes Module 15: seven systems, one toolbox. What is conserved? Where is the equilibrium, and are its eigenvalues stable? How does it bifurcate as a parameter moves? And what step does the fastest scale demand? Module 16 turns this toolbox into builds: a solver you assemble, then a full speed browser simulation. Two capstones exist, the wind tunnel and the flight simulator. Next is the Reaction-Diffusion Pattern Lab: a Gray-Scott map of F and k, painted seeds, and an implicit option for the stiff step.

Cars as a conserved fluid

Let ρ(x,t)\rho(x,t) be the number of cars per unit length and vv their speed, so the flux is q=ρvq = \rho v. Cars on a stretch [a,b][a,b] change only by crossing the ends:

ddt∫abρ dx=q(a)−q(b)⟹ρt+qx=0.\frac{d}{dt}\int_a^b \rho\,dx = q(a) - q(b) \quad\Longrightarrow\quad \rho_t + q_x = 0.

This is exactly the integral law of 2.10 Green, Stokes & the Divergence Theorem and the 1D continuity equation of 11.2 Conservation of Mass: The Continuity Equation. It becomes a model when we say how fast drivers go. The Lighthill-Whitham-Richards (LWR) model (names and the 1950s date from memory) assumes speed is a function of density alone, v=v(ρ)v = v(\rho). The simplest choice is Greenshields’ straight line (also from memory),

v=vmax(1−ρρmax),q(ρ)=vmax ρ(1−ρρmax),v = v_{max}\Bigl(1 - \frac{\rho}{\rho_{max}}\Bigr), \qquad q(\rho) = v_{max}\,\rho\Bigl(1 - \frac{\rho}{\rho_{max}}\Bigr),

with free speed vmaxv_{max} and bumper-to-bumper density ρmax\rho_{max}. The graph of qq against ρ\rho is the fundamental diagram: a parabola, zero at ρ=0\rho = 0 (empty road) and at ρmax\rho_{max} (parked cars), with maximum at the critical density ρmax/2\rho_{max}/2. That maximum is the road’s capacity vmaxρmax/4v_{max}\rho_{max}/4.

Example. Take vmax=20v_{max} = 20 m/s (72 km/h) and ρmax=0.125\rho_{max} = 0.125 cars/m (8 m per car). Capacity is 20×0.125/4=0.62520 \times 0.125/4 = 0.625 cars/s, which is 22502250 cars/hour, reached at 62.562.5 cars/km and a speed of 1010 m/s. (Real lanes carry about 20002000 cars/hour, from memory, so the numbers are plausible, but the straight-line law is a guess, not a measurement.) Below I use units with vmax=ρmax=1v_{max} = \rho_{max} = 1, so q=ρ(1−ρ)q = \rho(1-\rho), capacity 0.250.25.

Characteristics, forward and backward

Expand the flux: ρt+q′(ρ) ρx=0\rho_t + q'(\rho)\,\rho_x = 0, with

q′(ρ)=vmax(1−2ρρmax).q'(\rho) = v_{max}\Bigl(1 - \frac{2\rho}{\rho_{max}}\Bigr).

As in 9.10 First-Order PDEs: Advection & Characteristics, ρ\rho is constant along lines dx/dt=q′(ρ)dx/dt = q'(\rho). Two facts matter. First, q′=v+ρ v′(ρ)q' = v + \rho\,v'(\rho) and v′<0v' \lt 0, so waves travel slower than the cars: a driver overtakes the wave. Second, q′q' changes sign at the critical density. In sparse traffic, information moves forward; in dense traffic, backward, so a driver at the back of a jam learns about the jam only by running into it, while the jam’s front edge dissolves behind. At ρ=ρmax\rho = \rho_{max} the speed is −vmax-v_{max}, far faster than real jam fronts (about 1515 to 2020 km/h, from memory), one visible flaw of the straight line.

Since q′′=−2vmax/ρmaxq'' = -2v_{max}/\rho_{max} is negative, a higher density travels slower. Unlike Burgers’ equation, denser parts lag. Smooth data ρ0=0.4+0.1sin⁡2πx\rho_0 = 0.4 + 0.1\sin 2\pi x breaks when 1+t min⁡(q′(ρ0)′)=01 + t\,\min(q'(\rho_0)') = 0, at t∗=1/(4π×0.1)=0.7958t^* = 1/(4\pi \times 0.1) = 0.7958.

A red light: the shock

Integrating over a box containing a jump at x=s(t)x = s(t) (the derivation of 9.11 Nonlinear Waves: Burgers' Equation & Shocks) gives the Rankine-Hugoniot speed

s˙=qL−qRρL−ρR,for Greenshieldss˙=vmax(1−ρL+ρRρmax),\dot s = \frac{q_L - q_R}{\rho_L - \rho_R}, \qquad\text{for Greenshields}\qquad \dot s = v_{max}\Bigl(1 - \frac{\rho_L + \rho_R}{\rho_{max}}\Bigr),

the average of the characteristic speeds on the two sides because qq is quadratic. A jump is physical only if characteristics enter it from both sides: q′(ρL)>s˙>q′(ρR)q'(\rho_L) \gt \dot s \gt q'(\rho_R), the entropy condition. For a concave flux this means ρL<ρR\rho_L \lt \rho_R: density may jump up as you move downstream, never down. Cars decelerate abruptly into a jam; they cannot jump out of one.

Example: a red light. Traffic of density 0.3ρmax0.3\rho_{max} meets the stopped queue at ρmax\rho_{max} behind a red light. Then s˙=vmax(1−0.3−1)=−0.3 vmax=−6\dot s = v_{max}(1 - 0.3 - 1) = -0.3\,v_{max} = -6 m/s: the tail of the queue moves backward, up the road, at 66 m/s. After a 3030 s red the queue is 180180 m long. Check by counting cars: the queue holds 0.125×180=22.50.125 \times 180 = 22.5 cars. They arrived at flux q=20×0.125×0.3×0.7=0.525q = 20\times0.125\times0.3\times0.7 = 0.525 cars/s for 3030 s (15.7515.75 cars), plus the 0.0375×180=6.750.0375 \times 180 = 6.75 cars already on that stretch. Total 22.522.5. The shock speed is conservation of cars written as a speed.

◆ Interactive Red light: density 0.3 meets a queue. The heavy line in the x-t plot is the shock; the dots are the Godunov solution

Loading simulation…

A green light: the rarefaction fan

Now the queue sits upstream (ρL=ρmax\rho_L = \rho_{max}) and the road ahead is empty (ρR=0\rho_R = 0). Characteristic speeds are −vmax-v_{max} on the left and +vmax+v_{max} on the right, so they fan apart, leaving a wedge with no characteristics, exactly as in Burgers. Characteristics through the corner (0,0)(0,0) carry constant ρ\rho with q′(ρ)=x/tq'(\rho) = x/t:

ρ(x,t)=ρmax2(1−xvmax t),∣x∣<vmax t.\rho(x,t) = \frac{\rho_{max}}{2}\Bigl(1 - \frac{x}{v_{max}\,t}\Bigr), \qquad |x| \lt v_{max}\,t.

At the light itself, x=0x = 0, the density is ρmax/2\rho_{max}/2 for all time: the queue discharges at capacity, 0.6250.625 cars/s, not at free flow. The front of the queue releases backward at −vmax-v_{max}. This is why a long queue clears slowly: a road feeds cars through a bottleneck at capacity, never faster.

◆ Interactive Green light: a queue meets an empty road. Press the green-light preset and watch the fan and the flux at x = 0

Loading simulation…

Godunov’s scheme for traffic

The finite-volume update of 10.10 The Finite Volume Method is ρˉjn+1=ρˉjn−ΔtΔx(Fj+1/2−Fj−1/2)\bar\rho_j^{n+1} = \bar\rho_j^n - \frac{\Delta t}{\Delta x}(F_{j+1/2} - F_{j-1/2}), with Godunov’s flux the exact Riemann flux at the face. For any flux, that is the minimum of qq over [ρL,ρR][\rho_L, \rho_R] if ρL≤ρR\rho_L \le \rho_R, and the maximum of qq over [ρR,ρL][\rho_R, \rho_L] otherwise. With concave qq:

F(ρL,ρR)={min⁡(q(ρL),q(ρR))ρL≤ρR,q(ρmax/2)ρR≤ρmax/2≤ρL,max⁡(q(ρL),q(ρR))otherwise.F(\rho_L,\rho_R) = \begin{cases}\min\bigl(q(\rho_L), q(\rho_R)\bigr) & \rho_L \le \rho_R, \\ q(\rho_{max}/2) & \rho_R \le \rho_{max}/2 \le \rho_L, \\ \max\bigl(q(\rho_L), q(\rho_R)\bigr) & \text{otherwise.}\end{cases}

The middle case is the green light: a sonic point, where the flux is capacity. Godunov’s method gets it right automatically.

Checks (grid N=400N = 400 on [−1,1][-1,1], ν=Δt vmax/Δx=0.9\nu = \Delta t\,v_{max}/\Delta x = 0.9, time 0.470.47; sim and an independent numpy marcher agree to every digit shown):

  • Red light, ρ=0.3\rho = 0.3 meeting 11: where ρ\rho crosses 0.650.65, the shock is at x=−0.14067x = -0.14067; exact −0.3×0.47=−0.141-0.3 \times 0.47 = -0.141.
  • Jam front, 0.20.2 meeting 0.90.9: shock at −0.04667-0.04667; exact −0.047-0.047.
  • Green light: the flux through the central face is 0.250.25 exactly, with the two cells beside it at 0.51000.5100 and 0.49000.4900.

Convergence. The table gives the L1L^1 error against the exact solution (cell averages by sampling) with ν=0.9\nu = 0.9, for smooth data 0.4+0.1sin⁡2πx0.4 + 0.1\sin 2\pi x on a periodic unit road at t=0.5t = 0.5, before breaking, and for the green-light fan on [−1,1][-1,1] at t=0.47t = 0.47.

NN100100200200400400800800
smooth error (10−410^{-4})13.29913.2996.7786.7783.4303.4301.7251.725
smooth order0.9720.9720.9830.9830.9920.992
fan error (10−310^{-3})16.09816.0989.7969.7965.8065.8063.3673.367
fan order0.7170.7170.7550.7550.7860.786

Smooth data give first order (4.1 Local Error, Global Error & Order). The fan converges more slowly, with orders creeping upward; I did not run finer grids to see whether they reach 11 (I suspect the kinks at the fan edges). For a 0.25→0.90.25 \to 0.9 shock, the error divided by the jump times Δx\Delta x is 0.026,0.118,0.025,0.0500.026, 0.118, 0.025, 0.050 cells for N=100,…,800N = 100, \dots, 800: a fraction of a cell, erratic rather than a power law.

The time step. Information must not cross more than one cell per step, so νmax⁡∣q′∣≤1\nu \max|q'| \le 1. Test a jam of density 11 on 0.45<x<0.50.45 \lt x \lt 0.5 in traffic of density 0.10.1 on a periodic unit road, N=100N = 100, to t=2t = 2. A stable monotone scheme never makes new extrema, so no density can fall below 0.10.1. At ν=0.9,1.0,1.2\nu = 0.9, 1.0, 1.2 the minimum is 0.10.1 to 10−1210^{-12}. The first undershoot appears at ν=1.26\nu = 1.26; at 1.31.3 the minimum is 0.099920.09992; at 1.371.37 it is −0.160-0.160 (negative cars); at 1.381.38 the run overflows. Sim and numpy agree. The bound ν≤1\nu \le 1 is conservative, but violating it is real (10.5 Wave Equation Numerics & the CFL Condition).

The ring road and the limit of LWR

LWR says drivers instantly adopt the speed V(ρ)V(\rho). Real drivers take time. The optimal-velocity model (Bando and coauthors, 1990s, from memory) puts one ODE on each car: car ii relaxes toward the speed its headway hi=xi+1−xih_i = x_{i+1} - x_i allows,

x¨i=a(V(hi)−x˙i),V(h)=vmax(1−hminh)  (h>hmin), V=0 otherwise.\ddot x_i = a\bigl(V(h_i) - \dot x_i\bigr), \qquad V(h) = v_{max}\Bigl(1 - \frac{h_{min}}{h}\Bigr)\ \ (h \gt h_{min}),\ V = 0\ \text{otherwise.}

This VV is the Greenshields law in headway (ρ=1/h\rho = 1/h, ρmax=1/hmin\rho_{max} = 1/h_{min}). Uniform flow is the same equilibrium in both models; they differ only through the response rate aa, the reciprocal of the driver’s lag. Set vmax=hmin=1v_{max} = h_{min} = 1.

Stability. Put xj=j h+yjx_j = j\,h + y_j and linearise: y¨j=a(V′(yj+1−yj)−y˙j)\ddot y_j = a\bigl(V'(y_{j+1} - y_j) - \dot y_j\bigr) with V′=V′(h)=ρ2V' = V'(h) = \rho^2. A wave yj=eikj+λty_j = e^{ikj + \lambda t} has

λ2+aλ=aV′(eik−1).\lambda^2 + a\lambda = a V'\bigl(e^{ik} - 1\bigr).

For long waves, λ=iV′k+μk2+…\lambda = iV'k + \mu k^2 + \dots, with μ=V′2/a−V′/2\mu = V'^2/a - V'/2 (substitute and match powers of kk). The first term is a wave moving at the LWR characteristic speed; the second decides growth. Uniform flow is unstable to long waves exactly when V′(h)>a/2V'(h) \gt a/2, i.e. above the critical density

ρc=a2 vmaxhmin.\rho_c = \sqrt{\frac{a}{2\,v_{max}h_{min}}}.

I read the factor V′2/aV'^2/a as the cost of driver lag: as a→∞a \to \infty the model tends to LWR, and the criterion holds at every density. This resembles Whitham’s sub-characteristic condition (from memory), but I did not derive the link.

Numbers (ring of N=100N = 100 cars, a=0.8a = 0.8, so ρc=0.63246\rho_c = 0.63246; “Jacobian” is the numpy eigenvalue of the full 200×200200 \times 200 linearisation, “sim” is the RK4 car simulation with Δt=0.05\Delta t = 0.05 seeded at amplitude 10−610^{-6}, rate fitted from t=40t = 40 to 8080):

ρ\rhomost unstable mode mmRe λ\lambda (quadratic)Jacobiansim
0.620.6211−3.019×10−5-3.019\times10^{-5}
0.650.65555.679×10−45.679\times10^{-4}5.679×10−45.679\times10^{-4}
0.80.812120.0314870.0314870.0314870.0314870.0314870.031487
0.80.8117.475×10−47.475\times10^{-4}7.475×10−47.475\times10^{-4}

Below ρc\rho_c every mode decays; above it the fastest mode is not the longest. At m=1m = 1, μk2=7.58×10−4\mu k^2 = 7.58\times10^{-4} against 7.475×10−47.475\times10^{-4}, so the long-wave expansion is good to about 1.4%1.4\%. The pattern moves relative to the road at v−h Imλ/k=0.2−1.25×0.6384=−0.5980v - h\,\mathrm{Im}\lambda/k = 0.2 - 1.25 \times 0.6384 = -0.5980, against the LWR characteristic speed q′(0.8)=−0.6q'(0.8) = -0.6: it moves backward.

Where it ends. Seed mode 1212 at 10−310^{-3} at ρ=0.8\rho = 0.8 and run to t=2500t = 2500 (RK4, Δt=0.05\Delta t = 0.05; independent check with scipy’s DOP853, rtol 10−910^{-9}). Averaged over the last 500500 time units: flux 0.151250.15125 against the equilibrium 0.160.16, a 5.5%5.5\% drop; speeds range from about 2×10−42\times10^{-4} (stopped) to 0.4370.437 (over twice the equilibrium 0.20.2); minimum headway 0.8230.823. That last number is below hmin=1h_{min} = 1: cars overlap, since the model has no collision avoidance. I ran one seed; I did not test how the average depends on it.

◆ Interactive Ring road: raise the density past the critical value and stop-and-go waves grow from noise; the LWR curve beside it stays smooth

Loading simulation…

The picture is the honest limit of LWR. A Godunov solution on the same ring, started from the same density, can only translate and sharpen: a monotone scheme creates no new maxima. LWR cannot turn a smooth uniform flow into stop-and-go traffic, though a lag makes real ones do so (a circular-track experiment with real cars, from memory, found this). LWR is for what happens when a jam exists (queue growth, discharge), not why one forms.

What both models leave out

One lane, one kind of driver, no lane changes or on-ramps, and a speed law chosen by hand. The numbers above belong to equation sets, not to roads.

Module 15 in one table

Seven lessons, seven systems, one toolbox.

lessonwhat is conserved or balancedwhat loses stabilitywhat limits the step
populationbirths against deathsAllee threshold, harvesting foldEuler turns logistic into a map
predator-preyLV: HHHopf of Rosenzweig-MacArthurEuler spirals outward
epidemicsS+I+RS + I + RR0S=1R_0 S = 1final size by Newton
chemical kineticsatomsBrusselator Hopf at b=1+a2b = 1 + a^2Robertson stiffness
reaction-diffusionspecies with fluxesTuring bandexplicit diffusion limit
neuronschargeHH Hopf at 9.77549.7754, FHN at 0.331280.3312836.436.4 per ms on the upstroke
trafficcarsV′(h)=a/2V'(h) = a/2ν≤1\nu \le 1

The same four questions were asked each time. What is conserved, so the model is a balance? Where is the equilibrium, and do the eigenvalues of its Jacobian lie in the left half-plane (7.7 Nonlinear Systems & Linearization)? As a parameter moves, how does it bifurcate (3.9 Bifurcations)? And what step does the fastest scale demand (4.5 Stability Regions & Stiffness)? Entries in the table are quoted from those lessons, not re-derived here.

Where this goes next

That ends the models. Module 16 turns the toolbox into builds: longer pages with a solver you assemble step by step, then a full-speed browser simulation. Two capstones already exist, 16.1 Capstone: 2D Virtual Wind Tunnel and 16.2 Capstone: 6-DOF Flight Simulator with Autopilot. The next one in the plan, 16.3 Capstone: Reaction–Diffusion Pattern Lab, returns to this module’s 15.5 Reaction–Diffusion & Turing Patterns: a Gray-Scott pattern lab that explores the whole (F,k)(F, k) map, takes painted seeds and adds an implicit option for the stiff step.

The exercise: Godunov flux, step and the stability threshold

The playground marches a red and a green light with the Godunov update (written without comparisons) and reports the shock position and the discharge flux. In the exercise you write the flux, the step, the growth rate of a ring-road mode and the critical density.

🐍 PythonRed light and green light with Godunov's scheme
⌘/Ctrl + Enter
🧪 Coding exerciseExercise: Godunov flux, step, ring-road growth rate and critical density
⌘/Ctrl + Enter

Concept checks

✅ Concept check

A road has $v_{max} = 30$ m/s and $\rho_{max} = 0.2$ cars/m, with the Greenshields law. What is its capacity, in cars per second?

✅ Concept check

Traffic at density $0.3\rho_{max}$ runs into a stopped queue at $\rho_{max}$. How does the back of the queue move?

✅ Concept checkselect all that apply

Select all true statements about the Greenshields LWR model.

✅ Concept check

For the optimal-velocity ring with $v_{max} = h_{min} = 1$ and $a = 0.5$, what is the critical density above which uniform flow is unstable?

✅ Concept check

Why can the LWR model not produce stop-and-go waves from a nearly uniform flow?

Problems

✏️ Pen & paperCapacity and wave speed●○○

A road has vmax=25v_{max} = 25 m/s and ρmax=0.16\rho_{max} = 0.16 cars/m (Greenshields). Find the capacity in cars per hour, the critical density, and the wave speed at ρ=0.12\rho = 0.12 cars/m.

Show worked solution

Capacity =vmaxρmax/4=25×0.16/4=1= v_{max}\rho_{max}/4 = 25 \times 0.16/4 = 1 car/s =3600= 3600 cars/hour, at the critical density ρmax/2=0.08\rho_{max}/2 = 0.08 cars/m (speed 12.512.5 m/s). At ρ=0.12\rho = 0.12, ρ/ρmax=0.75\rho/\rho_{max} = 0.75 and q′=25(1−1.5)=−12.5q' = 25(1 - 1.5) = -12.5 m/s: waves move backward at 12.512.5 m/s while the cars still move forward at v=25×0.25=6.25v = 25 \times 0.25 = 6.25 m/s.

✏️ Pen & paperA jam front●●○

With vmax=20v_{max} = 20 m/s, free traffic of density 0.4ρmax0.4\rho_{max} meets a slower stream of density 0.8ρmax0.8\rho_{max}. Find the shock speed, check the entropy condition, and say how long the front takes to move 200200 m upstream.

Show worked solution

s˙=20(1−0.4−0.8)=−4\dot s = 20(1 - 0.4 - 0.8) = -4 m/s. Characteristic speeds are q′(0.4)=20(1−0.8)=4q'(0.4) = 20(1 - 0.8) = 4 and q′(0.8)=20(1−1.6)=−12q'(0.8) = 20(1 - 1.6) = -12 m/s; 4>−4>−124 \gt -4 \gt -12, so characteristics enter the shock from both sides. Moving 200200 m upstream takes 200/4=50200/4 = 50 s.

✏️ Pen & paperHow slow must drivers be to stay stable?●●●

For the optimal-velocity model with V(h)=1−1/hV(h) = 1 - 1/h on a ring at ρ=0.8\rho = 0.8: (a) find V′V'; (b) find the response rate aca_c above which the long-wave instability disappears; (c) is a=1.5a = 1.5 stable?

Show worked solution

(a) V′(h)=1/h2=ρ2=0.64V'(h) = 1/h^2 = \rho^2 = 0.64. (b) Stability needs V′<a/2V' \lt a/2, so ac=2V′=1.28a_c = 2V' = 1.28. (c) a=1.5>1.28a = 1.5 \gt 1.28, so long waves decay. (The criterion comes from the long-wave limit k→0k \to 0. Short waves of a finite ring were not examined here.)

Key Takeaways

  • Cars obey ρt+q(ρ)x=0\rho_t + q(\rho)_x = 0; Greenshields’ q=vmaxρ(1−ρ/ρmax)q = v_{max}\rho(1 - \rho/\rho_{max}) has capacity vmaxρmax/4v_{max}\rho_{max}/4 at the critical density ρmax/2\rho_{max}/2 (a modelling guess, not a law).
  • Characteristic speeds q′=vmax(1−2ρ/ρmax)q' = v_{max}(1 - 2\rho/\rho_{max}) are slower than the cars and negative above critical density: jams move backward.
  • A red light is a shock of speed vmax(1−ρL/ρmax−ρR/ρmax)v_{max}(1 - \rho_L/\rho_{max} - \rho_R/\rho_{max}) (for 0.30.3 meeting ρmax\rho_{max}, −0.3 vmax-0.3\,v_{max}), checked by counting 22.522.5 cars in a 180180 m queue; a green light is a fan that discharges at capacity.
  • Godunov’s flux is the min or max of qq over the interval; it converged at order 0.970.97 to 0.990.99 on smooth data, more slowly on a fan, and holds shocks to a fraction of a cell.
  • The time step bound ν≤1\nu \le 1 is conservative but real: undershoot at 1.261.26, negative density at 1.371.37, overflow at 1.381.38 on the jam test.
  • On a ring the optimal-velocity model has the same equilibrium as LWR but loses stability when V′(h)>a/2V'(h) \gt a/2; the measured growth rate 0.0314870.031487 matches the Jacobian, and the pattern moves at −0.598-0.598, near the LWR speed −0.6-0.6.
  • LWR cannot grow a jam from smooth flow, because it has no driver lag; the car model can, at the cost of overlapping cars.
  • Module 15’s toolbox: conservation, equilibrium stability, bifurcation and a step limit from the fastest scale. Next is the first capstone of Module 16, the reaction-diffusion pattern lab.
Finished this lesson?

Mark it complete to track your progress (saved in this browser). Reading every section does this for you.