🌡️Boundary Value Problems and Partial Differential Equations
Parabolic Equations: Heat and Diffusion
The heat equation, explicit FTCS and its stability limit, implicit and Crank–Nicolson schemes, von Neumann analysis, consolidation
Manchester, 1947
John Crank and Phyllis Nicolson, mathematicians at the University of Manchester, are computing temperatures in a material that generates heat as it reacts — a problem from industrial chemistry. The governing equation is the heat equation, and the obvious numerical approach, stepping forward in time with differences in space, works beautifully — until the time step is made a little too large, at which point the computed temperatures develop wild oscillations and grow without limit.
The stable steps are so small that a hand computation would take forever. Crank and Nicolson publish A practical method for numerical evaluation of solutions of partial differential equations of the heat-conduction type: average the explicit and implicit difference formulas, centring the scheme in time. Their method is stable for any time step and second-order accurate.
It became the default method for diffusion problems in engineering — heat, mass transfer, groundwater, consolidation, option pricing. Later users discovered its one weakness, which this lesson will show: with large steps and sharp initial data, it rings.
The heat equation describes diffusion: of heat through a wall, of a chemical through a membrane, of excess pore pressure through a clay layer. It is parabolic: information spreads instantly but is smoothed out — sharp features decay, and the fast (short-wavelength) components decay fastest. Discretise space with central differences on a grid of spacing , and the PDE becomes a large system of ODEs, — the method of lines. The eigenvalues of range from about to : the semi-discrete system is stiff (lesson 9-4), and stiffer the finer the grid.
Derivation
The heat equation from a slab of material, and the eigenvalues of its grid
The equation. Take a slice of a bar of length , cross-section , density and specific heat . Its stored heat rises at the rate at which heat flows in through one face and out through the other; Fourier's law gives each flow as :
The same balance of storage against flux differences gives diffusion of a chemical (Fick's law) and Terzaghi's pore pressure below.
The eigenvalues. is lesson 3-3's second-difference matrix, , whose eigenvalues lesson 4-1 found exactly:
The slowest, , is about (on a unit interval), whatever the grid; the fastest is almost . Forward Euler is stable only if every lies in its disc, which for the fastest mode means — exactly the limit that the Fourier analysis below finds.
💡Explicit FTCS and its stability limit
Forward Euler in time, central differences in space (FTCS):
Von Neumann analysis substitutes a Fourier mode and finds the amplification factor . For the most oscillatory mode , so stability needs : . Halve the grid spacing and the time step must shrink fourfold. On a 50-cell slab, is fine and gives an error of — a rounding-sized disturbance in the highest mode grows by per step.
Derivation
Von Neumann's calculation, written out
Put a single Fourier mode, with and , into FTCS (written for grid point ). The neighbours are the same mode shifted, , so every term carries the common factor :
using and .
is real and never above 1. It is at least for every mode exactly when , i.e. . The most dangerous mode is the sawtooth, , alternating sign from point to point.
The -scheme. The same substitution with the implicit part on the left gives , , the formula in the box below. For the numerator can never exceed the denominator in size, so for every . For Crank–Nicolson and large , : the ringing in the warning below.
The θ-scheme: θ = 0 explicit FTCS, θ = 1 backward Euler (fully implicit), θ = ½ Crank–Nicolson. For θ ≥ ½ |G| ≤ 1 for every r: unconditionally stable. Each implicit step solves a tridiagonal system — O(n) work.
⚠Crank–Nicolson rings
For short wavelengths and large , Crank–Nicolson's (lesson 9-4's trapezoidal rule exactly): sharp features do not decay, they flip sign every step. A slab at 100 °C whose faces are suddenly cooled to 0 °C, stepped with : the exact temperature next to the face after is 8 °C; backward Euler gives 9.9 °C; Crank–Nicolson gives 57.7 °C — a spurious oscillation, error 50 °C. With the problem disappears. Remedies: smaller steps at the start, a few backward-Euler steps first (Rannacher smoothing), or a fully implicit scheme.
Heat, like gravity, penetrates every substance of the universe, its rays occupy all parts of space.
📐Terzaghi consolidation
When a building is placed on saturated clay, the load is first carried by the pore water as excess pore pressure . Water slowly squeezes out through the clay's drained faces, the load transfers to the soil skeleton, and the ground settles. Karl Terzaghi showed in 1925 that obeys the heat equation, , with the coefficient of consolidation . For a 10 m clay layer drained top and bottom with m²/year, a backward-Euler solution gives the degree of consolidation at time factor (2.5 years) and at — 10.6 years for 90% of the settlement — matching Terzaghi's series to three digits. Settlement predictions for embankments and foundations on clay are exactly this calculation.
💡Where you will use this
Geotechnical Engineering: consolidation settlement, transient groundwater flow. Thermal design: transient heating of turbine blades, rocket nozzle walls, re-entry heat shields, concrete curing. Rocket Propulsion: ablative liners and propellant-grain heating. Chemical and environmental: diffusion of contaminants. In 2-D and 3-D, implicit steps need sparse solvers (Units 3–4) — or alternating-direction implicit (ADI) methods that keep each solve tridiagonal.
📚Further reading
- Randall LeVeque, Finite Difference Methods for Ordinary and Partial Differential Equations (SIAM, 2007), chapter 9, 'Diffusion Equations and Parabolic Problems' — the method of lines, von Neumann analysis and Crank–Nicolson.
- K. W. Morton and D. F. Mayers, Numerical Solution of Partial Differential Equations (2nd ed., Cambridge University Press, 2005) — parabolic problems first, with careful stability theory.
- John Crank and Phyllis Nicolson, 'A practical method for numerical evaluation of solutions of partial differential equations of the heat-conduction type', Proceedings of the Cambridge Philosophical Society 43(1), 50–67 (1947).
↓But there is a problem
Diffusion smooths everything; errors decay along with the solution, and implicit methods are stable at any step. Remove the diffusion, and none of that holds.
In 1922 Lewis Fry Richardson published a book describing how weather could be forecast by computing the equations of the atmosphere. To show it worked, he had computed one six-hour forecast for a single point over Europe — by hand, during his service in an ambulance unit in the First World War, over many weeks. His result: a pressure rise of 145 hPa in six hours. The barometer had barely moved.