Numerical Methods for Transient Heat Conduction
Theory: three choices of the θ method
Overview
For transient conduction, should I choose an explicit or implicit scheme?
Each has a different weakness. Explicit steps are cheap, but the time step has a strict limit beyond which the solution blows up. Backward Euler is unconditionally stable but first-order, with large errors at large steps. Crank–Nicolson is second-order and accurate, but with sudden changes it can oscillate and produce physically impossible temperatures. Let's compare all three on the same sudden-quench problem.
The θ-method
θ = 0 is explicit, θ = 1 backward Euler and θ = 1/2 Crank–Nicolson.
Stability and amplification factor
Explicit needs r ≤ 1/2. Crank–Nicolson's amplification factor approaches −1 for short-wavelength components at large steps: sharp components barely decay and flip sign every step. That is the source of the oscillation.
Crank and Nicolson
The Crank–Nicolson method was published in 1947 by Britain's John Crank and Phyllis Nicolson as a practical way to solve heat-conduction-type equations numerically — before electronic computers were widespread, as a way to gain accuracy while reducing desk-calculator labour. Around the same time, the instability of explicit schemes came to be explained by von Neumann's stability analysis. Both ideas still underpin time integration in many thermal codes.
Worked example: quenching a 100 °C slab
Thickness 1, diffusivity 1, initial 100 °C, both faces held at 0 °C, 20 cells (Δx = 0.05); centre temperature compared at t = 0.1. The exact value is 47.449 °C.
Explicit
| r | Steps | Centre temperature |
|---|---|---|
| 0.40 | 100 | 47.22 °C |
| 0.50 | 80 | 46.87 °C |
| 0.52 | 77 | 164.6 °C (diverged) |
Backward Euler and Crank–Nicolson
| r | Steps | Backward Euler: centre (error) | CN: centre (error) | CN: minimum after first step |
|---|---|---|---|---|
| 0.4 | 100 | 47.67 (+0.22) | 47.45 (−0.003) | 70.8 °C |
| 2 | 20 | 48.55 (+1.10) | 47.44 (−0.011) | 23.6 °C |
| 10 | 4 | 52.28 (+4.83) | 47.14 (−0.31) | −28.4 °C |
Crank–Nicolson gets the centre nearly right, yet near the surface it goes below 0 °C.
Early in the quench, temperature changes sharply near the surface. That sharp change is made of short-wavelength components, which Crank–Nicolson at large steps barely damps — they just flip sign and persist. So the first step shows −28 °C, a value that can never occur for faces at 0 °C and initial 100 °C. Where the solution is smooth, like the centre, it's accurate, so watching average values alone hides the problem. With temperature-dependent properties or phase change, such impossible values derail the calculation. Backward Euler damps these components strongly and doesn't oscillate, but smears everything and is less accurate. In practice, a few initial backward Euler steps followed by Crank–Nicolson is common.
Choosing and cautions
- Explicit: keep r ≤ 1/2 (1/4 in 2D, 1/6 in 3D); the smallest element governs.
- Even with implicit schemes, check results don't change with time step.
- Using Crank–Nicolson with sudden changes, start with backward Euler steps.
- Check for physically impossible values (outside initial and boundary bounds).
- For nonlinear problems, consider adaptive time stepping.
“Solidification where it shouldn't”
In a casting thermal analysis, right after molten metal filled the mould, a few points at the mould interface dropped instantly below solidus and odd solidification spread from there. The cause was Crank–Nicolson oscillation at a large time step: the sharp interface change swung temperatures briefly downward, and the solidification check reacted. Switching the first few steps to backward Euler removed the unnatural solidification.
Common mistakes
Mistakes and fixes
| Mistake | Effect | Fix |
|---|---|---|
| Explicit with r > 1/2 | Divergence | Respect the limit |
| Implicit step too large | Large error | Vary step to check |
| CN on sudden changes | Impossible temperatures | Start with backward Euler |
| Checking averages only | Oscillation missed | Check min and max |
| Ignoring smallest element | Local blow-up | Set step by smallest size |
I'd like to learn related topics.
Try the transient conduction tool and 1D conduction tool. Related pages include transient conduction with heat generation, periodic heating, NAFEMS T3 and MMS convergence rate.
Related Topics
Experience the theory firsthand with the interactive simulator for this field
All Simulators