Numerical Methods for PDEs

numerical diffusion

Picture using a low-order scheme to push a sharp pulse — a tall narrow spike — across a grid. After many steps the spike comes out shorter and wider, smeared as if it had been blurred. Nothing in the original PDE asked for this smearing; the scheme invented it. That spurious, scheme-induced smoothing is numerical diffusion: the numerical method behaves as though the equation had an extra diffusion term that is not really there.

Where does the fake diffusion come from? Straight out of the truncation error. The leading error term of a first-order scheme like upwind advection turns out to look exactly like a second-derivative term, d^2u/dx^2, with a small positive coefficient proportional to the mesh size — and a positive second-derivative term IS a diffusion term. So the scheme is silently, accurately solving a slightly different equation, u_t + a u_x = (numerical viscosity) u_xx, which diffuses. Its cousin, when the leading error term is instead a third derivative (an odd-order term), is numerical dispersion: different Fourier modes travel at slightly wrong speeds, so a sharp front does not just blur, it sheds trailing wiggles. The modified equation is the tool that exposes exactly which of these a scheme suffers.

There is a genuine trade-off here, not a pure defect. A little numerical diffusion is stabilizing and smooths out the spurious oscillations that plague unstable or high-order schemes near a shock — that is precisely why robust upwind methods are dissipative on purpose. But too much smears every sharp feature into mush, destroying shocks and contact discontinuities you cared about. Higher-order schemes reduce numerical diffusion but tend to overshoot near discontinuities, which is the tension that flux limiters and TVD schemes are designed to manage.

Advect a square pulse with first-order upwind: after a few hundred steps the sharp edges have rounded into smooth ramps and the height has dropped — the modified equation shows the scheme added an effective viscosity of (a h /2)(1 - c), where c is the Courant number, vanishing only when c is exactly 1.

First-order upwind smears a square pulse; the smearing is the scheme's hidden viscosity.

Numerical diffusion is not always bad — it is the stabilizing ingredient that lets upwind and TVD schemes capture shocks without oscillating. The skill is adding just enough near shocks and none in smooth regions.

Also called
artificial diffusionnumerical dissipationnumerical dispersion人工耗散數值色散