Flow Lab

Syllabus / Module 9: Classical PDEs: Heat, Waves & Potentials

Lesson 9.11

Nonlinear Waves: Burgers' Equation & Shocks

Inviscid Burgers, characteristics crossing, shocks, Rankine–Hugoniot, rarefaction fans, viscous Burgers and Cole–Hopf.

Written byClaude Sonnet

🌊
Why this matters for simulation: Burgers is Navier–Stokes stripped to its nonlinear core; shocks are what supersonic aircraft create.

By the end of this lesson you can…

  • Solve $u_t + u\,u_x = 0$ by characteristics and compute the breaking time $t^* = -1/\min u_0'$ and where it happens.
  • Find the speed of a shock from the Rankine-Hugoniot condition, and explain why the answer depends on which conservation law you believe.
  • Solve a Riemann problem: pick the shock or the rarefaction fan with the entropy condition.
  • Solve the viscous Burgers shock as a tanh wave, compute its thickness, and check Cole-Hopf numerically.
  • Explain why a scheme must be in conservation form to get shock speeds right.
  • Implement a conservative Godunov step for Burgers and measure the shock position and mass.
On this page
·
  1. Characteristics that carry their own speed
  2. Weak solutions and the jump condition
  3. Fans, shocks and the entropy condition
  4. Viscous Burgers and the shock thickness
  5. Cole-Hopf: Burgers is secretly the heat equation
  6. Why the scheme must be conservative
  7. The lab
  8. Computing it
  9. Concept checks
  10. Problems
  11. What comes next
  12. Key Takeaways

9.3 Solving the Heat Equation: Separation of Variables ended with a warning: everything in that lesson rested on superposition, and one innocent change breaks it. Put the speed of the wave equal to the solution itself and the equation ut+u ux=0u_t + u\,u_x = 0 is Burgers’ equation. It is the transport equation of 9.10 First-Order PDEs: Advection & Characteristics with c=uc = u, and the nonlinear core of the Navier-Stokes momentum equation (the term u⋅∇u\mathbf u \cdot \nabla \mathbf u in 11.4 Viscosity & the Navier–Stokes Equations). 11.12 Compressible Flow & Shocks already used it to show why air forms shocks. This lesson takes Burgers as the subject: the life of a wave from smooth data to a shock, the shock with viscosity added, and the numerical lesson, because a shock is where a careless scheme gives a confident wrong answer.

▶ Video Characteristics of a sine wave leaning toward each other and crossing, the stationary shock they form, a step down and a step up, a shock thickened by viscosity, and a non-conservative scheme leaving a shock where it startedcaptions only
Transcript
  1. Put the speed of a wave equal to the solution itself and you get Burgers' equation: u t plus u u x equals zero. Along a curve moving at speed u, the solution does not change, so every characteristic is a straight line: x equals x naught plus t times u zero of x naught. Tall parts run fast, low parts slowly. Take a sine wave: the lines lean right where it is positive, left where it is negative, all toward x equals pi.
  2. When do the lines meet? The map from x naught to x has slope one plus t u zero prime. While it stays positive, each point has one foot and the solution is smooth. It first reaches zero at t star, minus one over the smallest u zero prime. For the sine, the steepest slope is minus 1, so t star is 1, at x equals pi. The profile steepens and at time 1 stands vertical. A bump breaks at 1.5396, a Gaussian at 1.1658. Smooth data, and the wave still breaks: a linear equation never does that.
  3. After breaking, the solution gives up smoothness but not meaning: the integral form of the conservation law needs no derivative. Across a jump it demands the Rankine-Hugoniot condition: the shock speed is the average of the two states. The sine data are antisymmetric about pi, so the shock stays at pi, and lines from both sides run into it and end. Its height shrinks: 0.9477 at time 2, 0.7596 at time 3, 0.6186 at time 4, roughly pi over t plus 1. The shock dissipates the wave with no friction in the equation.
  4. Now a step. Start with u equal to 1 on the left and 0 on the right. Fast lines overtake slow ones, so there is one shock, moving at one half. Turn it around, 0 on the left and 1 on the right. The lines spread apart and leave an empty wedge, filled by a rarefaction fan. A jump at one half would also satisfy Rankine-Hugoniot, so the entropy condition decides: characteristics must run into a shock from both sides. Here they run away, so the jump is rejected and the fan wins.
  5. But which conservation law? Multiply the equation by 2u and you find that u squared is conserved too, with flux two thirds u cubed. For smooth solutions it is the same equation. For a jump from 1 down to 0, the first law gives a shock speed of one half, the second two thirds. They agree where the solution is smooth and disagree at shocks, so u t plus u u x alone is incomplete. Physics must choose the quantity really conserved, mass, momentum or energy. Here, it is u.
  6. Add viscosity, nu u x x, and the vertical front rounds off. In a travelling wave the two end states are roots of a quadratic, and their sum fixes the speed: the Rankine-Hugoniot speed, whatever nu is. The wave is a tanh that must fall, so there is no expansion shock, the entropy condition again. The thickness from 10 to 90 percent is 8.789 nu over the jump. For a drop from 1 to 0 and nu 0.02, that is 0.1758. Halve nu and the width halves. A real shock in air is far too thin to resolve, so a simulation has to capture it.
  7. Burgers hides a secret. Write u as psi x, let psi be minus 2 nu times the log of phi, and the nonlinear terms cancel, leaving phi t equals nu phi x x. That is the heat equation. Solve it with Fourier modes and transform back: u equals minus 2 nu phi x over phi. For the sine wave with nu 0.05, a direct finite difference solution stays within 0.0037 of this exact answer at time 1. At x equals pi over 2 the exact value is 0.7255 for nu 0.05, closing in on the inviscid 0.7391 as nu shrinks.
  8. Now the numerical lesson. Step from 1 to 0 at minus one half, 200 cells, run to time 1. The shock belongs at 0. Godunov puts it at 0.0002 with mass 1.0000. Rusanov, 0.0007. Roe, 0.0002. The non-conservative upwind scheme, which differences u u x directly, leaves the shock at minus 0.5000, and half the mass has vanished: cells ahead of the jump are zero and never change. Crisp, stable, wrong, and no warning. Entropy matters too: Roe with no entropy fix freezes a transonic fan into a jump, with error 0.8000.
  9. To recap. Characteristics are straight lines, and smooth data breaks at t star. Shocks move at the average of the two states, and entropy gives shocks for steps down and fans for steps up. Viscosity gives a tanh, and Cole-Hopf makes the whole thing linear. And a scheme must be in conservation form to get shocks right. That last fact was used but never derived: each cell changes only by the fluxes through its faces. Next, the finite volume method derives it from control volumes.

Characteristics that carry their own speed

Along a curve dx/dt=udx/dt = u, the chain rule gives du/dt=ut+u ux=0du/dt = u_t + u\,u_x = 0, exactly as in the transport lesson. The value uu is constant along the curve, so the curve has constant slope: a straight line,

x=x0+t u0(x0).x = x_0 + t\,u_0(x_0).

Each line has its own slope, set by the value it carries: tall parts travel fast. The solution is implicit: u(x,t)=u0(x0)u(x,t) = u_0(x_0) where x0x_0 solves the equation above, the foot of the line through (x,t)(x,t).

When does this recipe fail? The map x0↦x=x0+t u0(x0)x_0 \mapsto x = x_0 + t\,u_0(x_0) has derivative 1+t u0′(x0)1 + t\,u_0'(x_0). As long as that is positive the map is one-to-one and every (x,t)(x,t) has exactly one foot. If u0′u_0' is negative somewhere, the derivative reaches zero at the first time

t∗=1max⁡(−u0′)=−1min⁡u0′.t^* = \frac{1}{\max(-u_0')} = -\frac{1}{\min u_0'}.

At t∗t^* neighbouring lines meet and the profile becomes vertical; afterwards the implicit equation has three roots, and no single-valued uu follows it: the wave has broken. Fast fluid has caught slow fluid.

Example: the sine wave. For u0=sin⁡xu_0 = \sin x, u0′=cos⁡xu_0' = \cos x has minimum −1-1 at x0=πx_0 = \pi, so t∗=1t^* = 1. The breaking point is x=π+1⋅0=πx = \pi + 1\cdot 0 = \pi, where u0=0u_0 = 0 and the line stands still.

Example: a bump. For u0=1/(1+x2)u_0 = 1/(1+x^2), u0′=−2x/(1+x2)2u_0' = -2x/(1+x^2)^2. Setting its derivative to zero gives the steepest point at x0=1/3x_0 = 1/\sqrt3, where u0=3/4u_0 = 3/4 and u0′=−9/(83)u_0' = -9/(8\sqrt3). Hence t∗=83/9=1.5396t^* = 8\sqrt3/9 = 1.5396, and the breaking point is x=1/3+t∗⋅3/4=3x = 1/\sqrt3 + t^*\cdot 3/4 = \sqrt3. Only the front breaks.

Breaking needs a decreasing part of u0u_0; a profile that increases everywhere never breaks, its lines fan apart. Up to t∗t^* the solution is as smooth as u0u_0, then the slope is infinite, from perfectly smooth data, with no viscosity involved. Linear equations never do that.

Weak solutions and the jump condition

After breaking we give up smoothness but not the solution. The PDE is the local form of a conservation law: with F(u)=u2/2F(u) = u^2/2,

ut+F(u)x=0⟺ddt∫abu dx=F(u(a))−F(u(b)).u_t + F(u)_x = 0 \qquad\Longleftrightarrow\qquad \frac{d}{dt}\int_a^b u\,dx = F(u(a)) - F(u(b)).

The integral form needs no derivative of uu. A weak solution may have jumps but satisfies the integral form on every interval (2.10 Green, Stokes & the Divergence Theorem). For a jump at x=s(t)x = s(t) from uLu_L to uRu_R the Rankine-Hugoniot condition, derived in 11.12 Compressible Flow & Shocks, is

s˙ (uR−uL)=F(uR)−F(uL)⟹s˙=uL+uR2.\dot s\,(u_R - u_L) = F(u_R) - F(u_L) \qquad\Longrightarrow\qquad \dot s = \frac{u_L + u_R}{2}.

The shock moves at the average of the two states; it is the curve where lines from both sides end.

The sine wave after t∗=1t^* = 1. The data are antisymmetric about x=πx = \pi, so the shock stays there, speed 0=(uL+uR)/20 = (u_L + u_R)/2. Its left value comes from the line that started at x0=π−εx_0 = \pi - \varepsilon and carries sin⁡ε\sin\varepsilon, so x0+tsin⁡x0=πx_0 + t\sin x_0 = \pi becomes

ε=t sin⁡ε,uL(t)=sin⁡ε=−uR(t).\varepsilon = t\,\sin\varepsilon, \qquad u_L(t) = \sin\varepsilon = -u_R(t).

Solving numerically, the shock height is uL=0.9477u_L = 0.9477 at t=2t = 2, 0.75960.7596 at t=3t = 3 and 0.61860.6186 at t=4t = 4. For large tt, write ε=π−δ\varepsilon = \pi - \delta: π−δ=tδ\pi - \delta = t\delta gives uL≈π/(t+1)u_L \approx \pi/(t+1) (0.6280.628 at t=4t = 4). Shocks dissipate the wave, decaying like 1/t1/t, though the equation has no friction.

Which conservation law? The PDE ut+u ux=0u_t + u\,u_x = 0 is also (u2)t+23(u3)x=0(u^2)_t + \tfrac23(u^3)_x = 0 for smooth uu, because multiplying by 2u2u gives the same equation. Both are conservation laws. For a jump from uL=1u_L = 1 to uR=0u_R = 0 the first gives s˙=1/2\dot s = 1/2 and the second gives s˙=23(1−0)/(1−0)=2/3\dot s = \tfrac23(1 - 0)/(1 - 0) = 2/3. They agree for smooth solutions and disagree at shocks. Physics must choose: the conserved quantity is the one the problem conserves (mass, momentum, energy). The non-conservative form ut+u ux=0u_t + u\,u_x = 0 is incomplete at a shock. Here we take uu as the conserved density.

Fans, shocks and the entropy condition

A Riemann problem has u=uLu = u_L for x<x0x \lt x_0 and u=uRu = u_R for x>x0x \gt x_0. The data have no length scale, so the solution depends only on ξ=(x−x0)/t\xi = (x - x_0)/t, with two outcomes.

Step down, uL>uRu_L \gt u_R. Take uL=1u_L = 1, uR=0u_R = 0. Fast lines on the left overtake slow ones on the right: one shock of speed (1+0)/2=1/2(1 + 0)/2 = 1/2. Starting at x0=−0.5x_0 = -0.5, the shock is at x=0x = 0 at t=1t = 1.

Step up, uL<uRu_L \lt u_R. Take uL=0u_L = 0, uR=1u_R = 1. The lines spread apart and leave a wedge with none. The rarefaction fan fills it, constant along lines through the corner:

u(x,t)=x−x0tforuL t≤x−x0≤uR t.u(x,t) = \frac{x - x_0}{t} \quad\text{for}\quad u_L\,t \le x - x_0 \le u_R\,t.

Check: ut=−(x−x0)/t2u_t = -(x-x_0)/t^2 and u ux=(x−x0)/t2u\,u_x = (x-x_0)/t^2.

A problem. A jump moving at speed (0+1)/2=1/2(0 + 1)/2 = 1/2 also satisfies Rankine-Hugoniot, so weak solutions are not unique. The entropy condition (the Lax condition, name from memory) removes the bad one: characteristics must run into a shock from both sides,

uL>s˙>uR.u_L \gt \dot s \gt u_R .

An expansion shock has lines leaving it on both sides, so any disturbance turns it into a fan. In gas dynamics this is the second law (11.12 Compressible Flow & Shocks). The sharper justification is next: add a little viscosity and let it go to zero; the viscous equation never selects an expansion shock.

Viscous Burgers and the shock thickness

With viscosity, Burgers becomes

ut+u ux=ν uxx.u_t + u\,u_x = \nu\,u_{xx}.

It is parabolic, like the heat equation of 9.2 The Heat (Diffusion) Equation, so solutions stay smooth: the vertical front is rounded off. Look for a travelling wave u=φ(x−ct)u = \varphi(x - ct) joining uLu_L on the left to uRu_R on the right. Substituting, −cφ′+φφ′=νφ′′-c\varphi' + \varphi\varphi' = \nu\varphi'', which integrates once to

ν φ′=12φ2−cφ+K.\nu\,\varphi' = \tfrac12\varphi^2 - c\varphi + K .

At both ends φ′=0\varphi' = 0, so uLu_L and uRu_R must be the two roots of 12φ2−cφ+K\tfrac12\varphi^2 - c\varphi + K. The sum of the roots gives c=(uL+uR)/2c = (u_L + u_R)/2: the viscous wave moves at the Rankine-Hugoniot speed, whatever ν\nu. With 12φ2−cφ+K=12(φ−uL)(φ−uR)\tfrac12\varphi^2 - c\varphi + K = \tfrac12(\varphi - u_L)(\varphi - u_R), the equation νφ′=12(φ−uL)(φ−uR)\nu\varphi' = \tfrac12(\varphi - u_L)(\varphi - u_R) separates, and the solution is

u(x,t)=uL+uR2−uL−uR2 tanh⁡ ⁣((uL−uR) (x−ct)4ν).u(x,t) = \frac{u_L + u_R}{2} - \frac{u_L - u_R}{2}\,\tanh\!\left(\frac{(u_L - u_R)\,(x - ct)}{4\nu}\right).

Two facts follow. Between the roots φ′\varphi' is negative, so the wave must fall, uL>uRu_L \gt u_R: no expansion shock, the entropy condition again. And the thickness: the tanh goes from 10%10\% to 90%90\% of its jump over

Δx10-90=8 artanh⁡(0.8) νuL−uR=8.789 νuL−uR.\Delta x_{10\text{-}90} = \frac{8\,\operatorname{artanh}(0.8)\,\nu}{u_L - u_R} = \frac{8.789\,\nu}{u_L - u_R}.

Thickness is proportional to ν\nu and inversely proportional to the jump. For uL=1u_L = 1, uR=0u_R = 0, ν=0.02\nu = 0.02 it is 0.17580.1758; halving ν\nu halves it. By finite differences this tanh satisfies the PDE to a residual of 1.6×10−71.6\times10^{-7} (ν=0.02\nu = 0.02).

Cole-Hopf: Burgers is secretly the heat equation

The last lesson recalled, from memory, that Burgers turns back into the heat equation. Here is the check. Write u=ψxu = \psi_x and integrate the equation once in xx: ψt+12ψx2=νψxx\psi_t + \tfrac12\psi_x^2 = \nu\psi_{xx}. Let ψ=−2νln⁡φ\psi = -2\nu\ln\varphi. Then ψt=−2νφt/φ\psi_t = -2\nu\varphi_t/\varphi, ψx2/2=2ν2φx2/φ2\psi_x^2/2 = 2\nu^2\varphi_x^2/\varphi^2 and ψxx=−2ν(φxx/φ−φx2/φ2)\psi_{xx} = -2\nu(\varphi_{xx}/\varphi - \varphi_x^2/\varphi^2). The φx2\varphi_x^2 terms cancel on both sides and what is left is

φt=ν φxx,u=−2ν φxφ.\varphi_t = \nu\,\varphi_{xx}, \qquad u = -2\nu\,\frac{\varphi_x}{\varphi}.

The Cole-Hopf transformation (the name and the formula I carried from memory; the algebra above is what I rely on) makes a nonlinear equation exactly linear. Solve the heat equation by the Fourier methods of 9.3 Solving the Heat Equation: Separation of Variables and transform back. For u0=sin⁡xu_0 = \sin x, φ0∝ecos⁡x/(2ν)\varphi_0 \propto e^{\cos x/(2\nu)}: expand it in cosines, damp mode kk by e−νk2te^{-\nu k^2 t}, take −2νφx/φ-2\nu\varphi_x/\varphi.

Superposition holds for φ\varphi, not for uu: φ1+φ2\varphi_1 + \varphi_2 gives a weighted average of u1u_1 and u2u_2, not their sum.

The lab compares this exact solution with a direct finite-difference solution of the viscous PDE (ν=0.05\nu = 0.05, 200200 cells): the maximum difference is 0.00370.0037 at t=1t = 1 and 0.00310.0031 at t=2t = 2, a discretisation error. At x=π/2x = \pi/2, t=1t = 1 the exact value is 0.72550.7255 for ν=0.05\nu = 0.05 and 0.73640.7364 for ν=0.01\nu = 0.01, closing in on the inviscid 0.73910.7391 (from x0+sin⁡x0=π/2x_0 + \sin x_0 = \pi/2).

Why the scheme must be conservative

On a grid with spacing hh, consider the update

ujn+1=ujn−Δth(Fj+1/2−Fj−1/2),u_j^{n+1} = u_j^n - \frac{\Delta t}{h}\left(F_{j+1/2} - F_{j-1/2}\right),

where Fj+1/2F_{j+1/2} is a numerical flux from the neighbours of the face between cells jj and j+1j+1. This is the conservation form. Summed over all cells the fluxes cancel in pairs, so ∑jh ujn\sum_j h\,u_j^n changes only by what crosses the ends: the discrete integral law. I recall (from memory, the Lax-Wendroff theorem) that if such a consistent scheme converges, the limit is a weak solution, with the right shock speed. The form uj−Δthuj(uj−uj−1)u_j - \frac{\Delta t}{h}u_j(u_j - u_{j-1}), which differences ut+u uxu_t + u\,u_x directly, has no such guarantee.

The lab runs the step from 11 to 00 at x0=−0.5x_0 = -0.5 on [−1,1][-1,1], 200200 cells, to t=1t = 1, where the shock belongs at x=0x = 0:

schemeshock positionmass ∫u dx\int u\,dx (exact 1.00001.0000)width in cells
Godunov0.00020.00021.00001.00002.172.17
Rusanov0.00070.00071.00001.00002.612.61
Roe, no entropy fix0.00020.00021.00001.00002.172.17
non-conservative upwind−0.5000-0.50000.50000.50000.800.80

Godunov uses the exact Riemann solution at each face, Rusanov (local Lax-Friedrichs) adds viscosity proportional to the largest speed, Roe linearises with the speed (a+b)/2(a+b)/2. The non-conservative scheme is stuck: cells ahead of the jump have u=0u = 0, so uj−λuj(… )u_j - \lambda u_j(\dots) never changes them, and half the mass disappears. The profile is crisp, stable and plausible, with the wrong speed: no oscillation, no warning.

A caveat: on the sine wave the non-conservative scheme does well at t=2t = 2 (peak 0.93760.9376 against Godunov 0.93920.9392, mass 3×10−163\times10^{-16}), because the shock sits still and has no speed to get wrong. Test on a moving shock.

Rarefactions: the entropy fix. Roe is conservative, so it gets shocks right, but on a transonic fan with uL=−1u_L = -1, uR=1u_R = 1 the speed (a+b)/2(a+b)/2 is zero at the jump and the flux is f(a)f(a): the initial jump never moves, an expansion shock. At t=0.8t = 0.8 its L1L^1 error is 0.80000.8000, exactly tt (the area ∫−tt(1−∣x∣/t) dx\int_{-t}^{t}(1 - |x|/t)\,dx), against 0.03290.0329 for Godunov and 0.03040.0304 for Rusanov. Godunov’s flux returns 00 when uL<0<uRu_L \lt 0 \lt u_R, the sonic point. Conservation fixes the speed of shocks; entropy fixes which jumps may exist.

On the sine wave at t=2t = 2 Godunov’s peak is 0.93920.9392 against the exact shock height 0.94770.9477 (the shock is smeared over about two cells), mass stays at round-off (10−1610^{-16}), and the L1L^1 error is 0.01780.0178 at t=2t = 2, 0.01640.0164 at t=3t = 3 and 0.01810.0181 at t=4t = 4.

The lab

◆ Interactive Burgers lab: five problems, five schemes, exact solutions dashed, characteristics in the x-t plane

Loading simulation…

All runs: 200200 cells, CFL 0.50.5, forward Euler. Try, in order:

  1. Sine to t=2t = 2 with Godunov: peak 0.93920.9392 against the exact 0.94770.9477, mass zero. Set the stop time to 11 and the profile is nearly vertical; in the x-t plane the lines run into the red shock at x=πx = \pi.
  2. Shock, non-conservative: the shock does not move. Switch to Godunov: it arrives at 0.00020.0002.
  3. Step up with Godunov, Rusanov, and Roe: Godunov and Roe agree (L1=0.0174L^1 = 0.0174, no sonic point), Rusanov is more rounded (0.01980.0198). Then transonic fan, Roe shows the frozen jump (0.80000.8000).
  4. Viscous shock, central flux with ν=0.04,0.02,0.01\nu = 0.04, 0.02, 0.01: measured 10-90%10\text{-}90\% widths 0.35320.3532, 0.17400.1740, 0.08450.0845 against the tanh values 0.35160.3516, 0.17580.1758, 0.08790.0879 (a 4%4\% error at 8.88.8 cells across).
  5. Sine with ν=0.05\nu = 0.05: the dashed curve is the Cole-Hopf solution; the scheme follows it within 0.00370.0037 at t=1t = 1.

Computing it

🐍 PythonLab: breaking time by scanning, and the height of the sine shock by bisection
⌘/Ctrl + Enter
🧪 Coding exerciseExercise: a conservative Godunov step, checked against the shock speed and the mass
⌘/Ctrl + Enter

With 100100 cells the Godunov shock sits at 0.00040.0004 with mass 1.00001.0000, the non-conservative one at −0.5000-0.5000 with mass 0.50000.5000, and the transonic fan at x=0.4x = 0.4 reads 0.51660.5166 (the exact fan gives 0.50.5).

Concept checks

✅ Concept check

A wave starts as $u_0(x) = 0.4\sin(5x)$ and obeys $u_t + u\,u_x = 0$. When does it first break?

✅ Concept check

A scheme for $u_t + u\,u_x = 0$ is stable, produces no oscillations, and converges for smooth data. At a shock from $1$ to $0$ it keeps the jump where it started. What went wrong?

✅ Concept check

For $u_L = 0$ and $u_R = 1$, a jump moving at speed $1/2$ satisfies the Rankine-Hugoniot condition. Why is it not the solution?

✅ Concept check

A viscous Burgers shock goes from $u_L = 1$ to $u_R = 0$. For $\nu = 0.005$, what is its $10\text{-}90\%$ thickness? (Use $8.789\,\nu/(u_L - u_R)$.)

Problems

✏️ Pen & paperBreak a Gaussian●○○

For ut+u ux=0u_t + u\,u_x = 0 with u0=e−x2u_0 = e^{-x^2}, find the breaking time and the place where it happens.

Show worked solution

u0′=−2x e−x2u_0' = -2x\,e^{-x^2} has derivative (4x2−2)e−x2(4x^2 - 2)e^{-x^2}, zero at x0=1/2x_0 = 1/\sqrt2, where u0′=−2 e−1/2=−0.8578u_0' = -\sqrt2\,e^{-1/2} = -0.8578. So t∗=e1/2/2=1.1658t^* = e^{1/2}/\sqrt2 = 1.1658, and the breaking point is x=x0+t∗u0(x0)=12+12=2=1.4142x = x_0 + t^*u_0(x_0) = \tfrac{1}{\sqrt2} + \tfrac{1}{\sqrt2} = \sqrt2 = 1.4142. The front breaks; the rising back does not.

✏️ Pen & paperTwo conservation laws, two shock speeds●●○

A jump joins uL=3u_L = 3 to uR=1u_R = 1. (a) Find its speed for ut+(u2/2)x=0u_t + (u^2/2)_x = 0. (b) Find it for the law (u2)t+(23u3)x=0(u^2)_t + (\tfrac23u^3)_x = 0. (c) Both come from ut+u ux=0u_t + u\,u_x = 0 when uu is smooth. Why do they differ?

Show worked solution

(a) s˙=(3+1)/2=2\dot s = (3 + 1)/2 = 2.

(b) s˙=23(27−1)9−1=52/38=136=2.1667\dot s = \dfrac{\tfrac23(27 - 1)}{9 - 1} = \dfrac{52/3}{8} = \dfrac{13}{6} = 2.1667.

(c) Multiplying by 2u2u is legitimate for smooth uu (chain rule) but changes what is called conserved. At a jump the chain rule fails, so the two integral laws give different jumps.

✏️ Pen & paperA Riemann problem●●○

Solve ut+u ux=0u_t + u\,u_x = 0 with u=−0.5u = -0.5 for x<0x \lt 0 and u=1.5u = 1.5 for x>0x \gt 0. Give u(1,2)u(1,2) and the region where the fan is active at t=2t = 2. Why is the jump of speed 0.50.5 rejected?

Show worked solution

uL<uRu_L \lt u_R, so the solution is a fan: u=x/tu = x/t for −0.5 t≤x≤1.5 t-0.5\,t \le x \le 1.5\,t, constant outside. At t=2t = 2 the fan spans −1≤x≤3-1 \le x \le 3 and u(1,2)=1/2u(1,2) = 1/2. The competing jump has speed 0.50.5, but uL=−0.5<0.5<1.5=uRu_L = -0.5 \lt 0.5 \lt 1.5 = u_R: characteristics leave it on both sides, violating the entropy condition.

✏️ Pen & paperResolving a shock on the grid●●●

A shock from 11 to 00 is to be resolved by the viscous equation on a grid with h=0.01h = 0.01, with a 10-90%10\text{-}90\% width of 33 cells. (a) What viscosity does that need? (b) What is the cell Peclet number uLh/νu_L h/\nu? (c) What does air, with ν≈1.5×10−5\nu \approx 1.5\times10^{-5} m2^2/s, say about resolving real shocks at h=0.01h = 0.01 m?

Show worked solution

(a) Width 0.03=8.789ν/10.03 = 8.789\nu/1, so ν=0.03/8.789=3.41×10−3\nu = 0.03/8.789 = 3.41\times10^{-3}.

(b) uLh/ν=0.01/0.00341=2.93u_Lh/\nu = 0.01/0.00341 = 2.93. Above 22 a central difference of the advection term is no longer a weighted average of neighbours, so wiggles become possible (from memory, the usual cell-Peclet criterion); the lab’s ν=0.01\nu = 0.01 case has cell Peclet 11 and stays clean.

(c) The physical width is of order 8.789×1.5×10−5/U8.789\times1.5\times10^{-5}/U metres, far below a centimetre. The scheme’s numerical viscosity decides the width, so it must give the right speed (conservation) and direction (entropy).

What comes next

Everything numerical here rested on one fact that was used but not derived: each cell changes only by the fluxes through its faces, so what leaves one cell enters the next. The next lesson, 10.10 The Finite Volume Method (10.10), derives that from the integral law on a control volume, which carries to 2D and to the compressible equations. It also takes up what is left open: these schemes are first-order, so shocks smear over two or three cells; limiters raise the order without bringing back oscillations. Not proved here: the Lax-Wendroff theorem (from memory).

Key Takeaways

  • For ut+u ux=0u_t + u\,u_x = 0 the characteristics are straight lines x=x0+t u0(x0)x = x_0 + t\,u_0(x_0) carrying u0(x0)u_0(x_0); the solution is smooth until t∗=−1/min⁡u0′t^* = -1/\min u_0' (11 for sin⁡x\sin x, 1.53961.5396 for 1/(1+x2)1/(1+x^2), 1.16581.1658 for e−x2e^{-x^2}), when smooth data goes vertical.
  • Weak solutions obey the integral law across jumps: s˙=(uL+uR)/2\dot s = (u_L + u_R)/2. The sine wave gets a stationary shock at π\pi of height uL=0.9477u_L = 0.9477 at t=2t = 2, decaying roughly like π/(t+1)\pi/(t+1).
  • Which law is conserved matters: uu and u2u^2 give different speeds (1/21/2 against 2/32/3 for 1→01\to0). Physics chooses.
  • The entropy condition uL>s˙>uRu_L \gt \dot s \gt u_R keeps compressive shocks and replaces expansion jumps by fans u=(x−x0)/tu = (x - x_0)/t.
  • Viscous Burgers has an exact tanh wave at the inviscid speed with 10-90%10\text{-}90\% thickness 8.789 ν/(uL−uR)8.789\,\nu/(u_L-u_R). Cole-Hopf, u=−2νφx/φu = -2\nu\varphi_x/\varphi, turns it into φt=νφxx\varphi_t = \nu\varphi_{xx} (checked to 0.00370.0037 against a direct solution).
  • A scheme must be in conservation form: on the 1→01\to0 step conservative schemes put the shock at 0.00020.0002 to 0.00070.0007 with mass 1.00001.0000; non-conservative upwind leaves it at −0.5000-0.5000 with mass 0.50000.5000. Roe without an entropy fix freezes a transonic fan into a jump (L1L^1 error 0.80000.8000 against 0.03290.0329).
  • Next: 10.10 The Finite Volume Method derives the conservative flux form from control volumes.
Finished this lesson?

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

Where this leads

These later lessons build directly on this one: