Computational Fluid Dynamics · Chapter 3 of 10 · Intermediate

The Finite Volume Method for Diffusion

Integrate the diffusion equation over one control volume and a partial differential equation becomes a tidy relation between a node and its neighbours. Do it for every cell and you have a solvable system.

01

Readiness check

This chapter builds the method on the simplest equation. Tick only what you can do closed-notes.

  • Recall Fourier's law and steady conduction.
  • Integrate a derivative over an interval.
  • Set up and solve a small linear system.
  • Recognise a tridiagonal matrix.
  • Relate flux to a gradient over a distance.
0 or 1 weak itemsContinue with this chapter.
2 weak itemsRevisit conduction in Heat Transfer, Chapter 2.
3 or more weak itemsReview the transport equation in Chapter 2.
02

The core idea

Integrating the diffusion equation over a control volume turns gradients into face fluxes, giving each node an equation aPφP = aWφW + aEφE + Su in terms of its neighbours.

aW = ΓwA/δxWP, aE = ΓeA/δxPEaP = aW + aE − SPaPφP = aWφW + aEφE + Su

The finite volume method places a node at the centre of each control volume and integrates the governing equation over that volume. The diffusion term, a second derivative, integrates to the difference of the fluxes at the two faces, each approximated as the diffusion coefficient times the gradient between adjacent nodes. The result is one linear equation per node linking it to its west and east neighbours, with coefficients aW and aE set by the conductance Γ·A/δx across each face. Boundary cells use the half-distance to the wall, and any source adds to the right side. Assembled, these equations form a tridiagonal system solved in Chapter 6.

The skill works when: you write each face flux as a conductance times a node difference and assemble aP from the neighbours.
The skill breaks down when: the boundary half-distance is forgotten, or the source is added to the wrong side.
The concept. A one-dimensional grid: node P sits inside its control volume with faces w and e. The diffusion flux at each face is a conductance Γ·A/δx times the difference between neighbouring nodes.
03

The skills, taught in order

Five skills set up the grid, integrate the equation, build the coefficients, handle boundaries, and add sources.

3.1 The finite volume steps

The method is always the same: divide the domain into control volumes, integrate the governing equation over each, approximate the face fluxes from nodal values, and assemble one algebraic equation per node. Integration over the volume is what makes the scheme conservative.

3.2 Grid and nodes

A node sits at the centre of each control volume; faces lie halfway between nodes. Distances δx between nodes set the gradients. A uniform grid keeps the coefficients simple, but the method handles non-uniform grids too.

3.3 The diffusion coefficients

The flux at a face is the diffusion coefficient times the area over the node spacing, so aW = ΓwA/δxWP and aE = ΓeA/δxPE. The central coefficient is aP = aW + aE − SP, so that a uniform field is reproduced exactly.

CoefficientExpressionMeaning
aWΓwA/δxWPwest-face conductance
aEΓeA/δxPEeast-face conductance
aPaW + aE − SPcentral, balances the neighbours

3.4 Boundary conditions

A boundary node lies a half-cell from the wall, so its boundary-face conductance uses δx/2, giving 2Γ A/δx. A fixed wall value enters through a modified source: SP = −2Γ A/δx and Su = (2Γ A/δx)φwall. This keeps the system closed at the edges.

3.5 Source terms

A volumetric source, such as heat generation, integrates to S = Su + SPφP over the cell, where a constant generation contributes Su = qV. Linearising any nonlinear source into this form keeps the equation linear and the matrix well behaved.

Engineering connection: the same coefficient assembly, with a convection term added, gives the convection-diffusion discretization of Chapter 4.

04

Worked example 1: one-dimensional conduction

A rod of length 0.5 m (k = 1000 W/m·K, area A = 0.01 m²) has its ends held at 100 °C and 500 °C with no internal source. Using five equal control volumes, set up the coefficients and find the nodal temperatures.

Figure 1. Five control volumes between fixed-temperature ends. With no source, the finite volume solution is the exact linear profile, with nodal temperatures rising by 80 °C per cell.
  1. ProblemFind the five nodal temperatures for the rod in Figure 1.
  2. Given / findL = 0.5 m, k = 1000 W/m·K, A = 0.01 m², TA = 100 °C, TB = 500 °C, 5 cells. Find T1 to T5.
  3. AssumptionsSteady conduction, constant k, no source; uniform grid δx = 0.1 m.
  4. ModelInterior coefficients aW = aE = kA/δx; boundary nodes use the half-distance, adding 2kA/δx through the source.
  5. EquationsaW = aE = kA/δx = 1000(0.01)/0.1 = 100interior: 200 TP = 100 TW + 100 TE
  6. SolveThe boundary nodes give 300 T1 = 100 T2 + 20 000 and 300 T5 = 100 T4 + 100 000. Solving the tridiagonal system gives T = [140, 220, 300, 380, 460] °C.
  7. CheckThe result is the exact linear profile T = 100 + 800x at the cell centres (x = 0.05, 0.15, ...), which conduction without a source must produce. The implied heat rate kA(TB − TA)/L = 8000 W is uniform.
  8. ConclusionFor pure diffusion on a uniform grid the finite volume method is exact. The coefficient pattern generalises to every later problem.
Result. T = [140, 220, 300, 380, 460] °C, the exact linear profile.
05

Worked example 2: conduction with a source

A plate of thickness 2 cm (k = 0.5 W/m·K, A = 1 m²) generates heat uniformly at q = 1000 kW/m³, with faces held at 100 °C and 200 °C. Using five control volumes, find the nodal temperatures.

Figure 2. With internal heat generation the profile bows upward above the end temperatures: the source Su = qAδx adds to every cell, and the interior gets hotter than the boundaries.
  1. ProblemFind the five nodal temperatures for the heated plate in Figure 2.
  2. Given / findL = 0.02 m, k = 0.5 W/m·K, A = 1 m², q = 1×10⁶ W/m³, TA = 100 °C, TB = 200 °C, 5 cells. Find T1 to T5.
  3. AssumptionsSteady conduction, constant k, uniform source; δx = 0.004 m.
  4. ModelaW = aE = kA/δx, with a per-cell source Su = qAδx; boundary nodes add the half-cell conductance through the source.
  5. EquationsaW = aE = 0.5(1)/0.004 = 125Su = qAδx = 10⁶(1)(0.004) = 4000
  6. SolveInterior: 250 TP = 125 TW + 125 TE + 4000; boundaries add 250·Twall to Su and use aP = 375. Solving gives T = [150, 218, 254, 258, 230] °C.
  7. CheckThe interior temperatures exceed both wall values, as internal generation requires, and the profile is the expected downward parabola added to the linear baseline. The peak sits near the middle, shifted by the unequal end temperatures.
  8. ConclusionA source term simply adds to the right side of each cell equation. The same assembly handles generation, reaction, or any volumetric source.
Result. T = [150, 218, 254, 258, 230] °C, bowed above the end values by the source.
06

Misconceptions and diagnostics

MistakeSymptomDiagnostic questionCorrection
Full δx at a boundaryWrong boundary temperatures"Is the wall a half-cell from the node?"Use δx/2, giving 2Γ A/δx at the boundary face.
aP not the sum of neighboursA uniform field is not reproduced"Does aP = aW + aE − SP?"Build aP from the neighbour coefficients so a constant solution is exact.
Source on the wrong sideSign or magnitude error in the result"Is Su on the right-hand side?"Volumetric sources add to the right side as Su = qV.
Forgetting to multiply by areaCoefficients off by the cross-section"Did I include A in Γ A/δx?"The conductance is Γ times area over spacing.
07

Practice ladder

Level 1 · Direct skill

For k = 200 W/m·K, A = 0.02 m², δx = 0.05 m, find the interior coefficients aW, aE, and aP (no source).

Show answer

aW = aE = kA/δx = 200(0.02)/0.05 = 80. aP = 80 + 80 = 160.

Level 2 · Mixed concept

For the Worked Example 1 rod, what is the heat rate through the rod, and is it the same at every face?

Show answer

q = kA(TB − TA)/L = 1000(0.01)(400)/0.5 = 8000 W. With no source it is uniform, the same across every face.

Level 3 · Independent problem

A cell has a source q = 5×10⁵ W/m³, A = 1 m², δx = 0.01 m. Find Su for that cell.

Show answer

Su = qAδx = 5×10⁵ (1)(0.01) = 5000 W. This adds to the right-hand side of that cell's equation.

Level 4 · Transfer to real engineering

Take a real conduction problem (a wall, a fin, a chip) and describe how you would set up its control volumes, coefficients, and boundary conditions.

What good work looks like

A sensible grid, conductances Γ A/δx for each face, boundary half-cells with modified sources, and any volumetric source added to the right side.

08

Working with AI, and proving it yourself

Use AI as an examiner, not a solver

"Check that my aP equals the sum of the neighbour coefficients minus SP."
"Give me three cells; I will write their diffusion coefficients."
"Solve this conduction problem." Assembling the coefficients yourself is the skill.
"What are the nodal temperatures?" Building and solving the system is the point.

Portfolio task

Discretize a one-dimensional diffusion problem with the finite volume method: set up the grid, coefficients, boundary conditions, and any source, solve the system, and compare to the analytic solution.

Must include: a coefficient table, a boundary treatment, a solved profile, and an analytic comparison.
09

Retrieval and spaced review

Closed notes. Answer out loud, then reveal.

1. What are the steps of the finite volume method?

Divide into control volumes, integrate over each, approximate face fluxes, assemble one equation per node.

2. Write the diffusion coefficients.

aW = ΓwA/δxWP, aE = ΓeA/δxPE, aP = aW + aE − SP.

3. How is a boundary node handled?

It lies a half-cell from the wall, so the boundary face uses 2Γ A/δx, entering through a modified source.

4. Where does a source go?

On the right-hand side, Su = qV for a constant volumetric source.

5. Why is the method exact for 1D diffusion?

Linear gradients are captured exactly by node differences on a uniform grid.

TodayFinish this quiz and Levels 1 and 2 of the ladder.
+1 dayRe-derive the coefficient assembly from a blank page.
+3 daysDiscretize two new diffusion problems.
+7 daysCarry the method into convection, Chapter 4.
+30 daysSolve the assembled system with the TDMA in Chapter 6.
10

Textbook mapping

ItemMapping
Primary sourceVersteeg and Malalasekera, An Introduction to Computational Fluid Dynamics, Chapter 4 (Finite Volume Method for Diffusion)
Cross-referencePatankar, Ch. 3 · Heat Transfer, Ch. 2
Core topics3.1 The FVM steps · 3.2 Grid and nodes · 3.3 Diffusion coefficients · 3.4 Boundary conditions · 3.5 Source terms
Engineering connectionThe same assembly, plus a convection term, gives the next chapter's scheme.
Read nextChapter 4: Convection-Diffusion and Schemes.