Central Difference Scheme

Category: CFD Solver Methods | Revised 2026-10-01
CAE visualization for central difference theory - technical simulation diagram
Central Difference Scheme

Theory: gradients from both neighbours

Overview

🙋

Using central differencing in CFD, I got impossible wiggles in the temperature field. Is it a bug?

🎓

Not a bug — a property of central differencing. It computes a gradient from the difference between the two neighbours: second-order accurate, with no artificial diffusion. But when flow (convection) is strong relative to diffusion, the downstream value acts on the node in the wrong direction, and the solution zigzags point to point. The guide is whether the cell Péclet number exceeds 2. Refine the grid or blend in an upwind-type scheme.

Discretised equation

$$ u\frac{d\phi}{dx} = \Gamma\frac{d^2\phi}{dx^2} \ \Rightarrow\ \left(\frac{2\Gamma}{h^2}\right)\phi_i = \left(\frac{\Gamma}{h^2} + \frac{u}{2h}\right)\phi_{i-1} + \left(\frac{\Gamma}{h^2} - \frac{u}{2h}\right)\phi_{i+1} $$

The 1D steady convection–diffusion equation discretised with central differences for both convection and diffusion. The second coefficient on the right turns negative when flow is strong.

Cell Péclet condition

$$ Pe_c = \frac{u\,h}{\Gamma} \le 2 \quad \Leftrightarrow \quad \frac{\Gamma}{h^2} - \frac{u}{2h} \ge 0, \qquad \phi_{exact} = \frac{e^{Pe\,x} - 1}{e^{Pe} - 1} $$

If all coefficients are non-negative, the solution is a weighted average of neighbours and cannot oscillate; that condition is cell Péclet ≤ 2. On the right is the exact solution used below, with global Péclet number $Pe = uL/\Gamma$.

Coffee Break Trivia

The idea of ‘upwind’

Central-difference oscillation has troubled numerical analysts since the 1950s. In 1952 Courant, Isaacson and Rees proposed differencing with upstream (upwind) values, where information comes from, and the trade — no oscillation, but only first-order accuracy — became known. In the 1980s Harten formalised the conditions for non-oscillatory schemes (TVD), and limited schemes that lean upwind only where changes are steep spread widely. The convection-scheme options in today's general-purpose CFD rest on this long debate.

Worked example: 1D convection–diffusion

Steady convection–diffusion on [0, 1] with 0 at the left, 1 at the right and global Péclet 50, solved with central differencing (CDS) and first-order upwinding (UDS). The exact solution rises steeply near the right end:

CellsCell PeCDS minimumCDS max errorUDS max error
105.0−0.4290.4360.160
202.5−0.1110.1930.204
252.00.0000.1350.198
501.00.0000.0350.132
1000.50.0000.0080.077
2000.250.0000.0020.042
🙋

At 10 cells, the non-oscillating upwind scheme has the smaller error.

🎓

Right. On a coarse grid, central differencing drives a solution that should stay between 0 and 1 down to −0.43 — like a temperature below absolute zero, physically impossible. But from 25 cells, where cell Péclet reaches 2, the oscillation disappears and error falls with the square of spacing. At 100 cells central gives 0.008 and upwind 0.077 — a factor of ten. Upwind is first order, so refinement shrinks its error only slowly. It's a trade between ‘stable but crude’ and ‘accurate but conditional’.

Example 2: order of convergence

At Péclet 10 with refinement, central differencing's observed order approached 2.00 and upwinding's 0.97 (at 200 cells, 0.0001 versus 0.0090).

Choosing a scheme

  1. Estimate the cell Péclet distribution from velocity, spacing and diffusivity (viscosity).
  2. For steady RANS, default to second-order upwind-type or limited schemes.
  3. In LES, numerical diffusion damps turbulent eddies, so use central-type schemes (blending a little upwind if needed).
  4. For steep changes (shocks, thin layers) use limiters that suppress oscillation.
  5. Refine the grid and confirm results don't change.
Coffee Break Trivia

“The clean result was wrong”

A CFD study of mixing in a pipe gave a clean, non-oscillating concentration field, yet mixing progressed far faster than in the experiment. First-order upwinding had been used for stability, and numerical diffusion was several times the real diffusion. Switching to a second-order scheme reproduced the slower mixing seen experimentally. A non-oscillating result looks reassuring, but numerical diffusion may be over-mixing. The cruder the upwind result, the more it needs checking with grid refinement.

Common mistakes

Mistakes and fixes

MistakeEffectFix
Central differencing on coarse gridsOscillation, out-of-range valuesKeep cell Péclet ≤ 2
Staying first-order upwindOver-mixing by numerical diffusionSecond-order schemes
Upwinding in LESEddies dampedCentral-type schemes
Mistaking oscillation for physicsWrong conclusionsCheck with other grids
No oscillation, so correctNumerical diffusion missedCheck grid convergence
🙋

I'd like to learn related topics.

🎓

Try convergence order with the Richardson extrapolation tool. For scheme comparisons see upwind schemes; basics, finite volume fundamentals; time direction, time integration in CFD; high-accuracy methods, spectral methods; and pressure solution, the coupled pressure–velocity solver.

Related Simulators

Experience the theory firsthand with the interactive simulator for this field

All Simulators

Related fields

Thermal AnalysisV&V · Quality AssuranceStructural Analysis
Rate this article
Thank you for your feedback!
Helpful
More details
Report error
Helpful
0
More details
0
Report error
0