---
title: "1D conduction with generation using FDM"
subject: "Applied Computational Fluid Dynamics"
chapter: 3
key: "semester_7/applied_computational_fluid_dynamics:steady-conduction-fdm-slab-numerical"
source: https://www.bctengineer.com/q/semester_7/applied_computational_fluid_dynamics/steady-conduction-fdm-slab-numerical
site: BCT Engineering
---

# 1D conduction with generation using FDM

Applied Computational Fluid Dynamics · Chapter 3: Discretization Methods

- Asked in: year not given, 8 marks
- Video: [Numerical Solution of the Steady 1D Heat Conduction Equation with Generation](https://www.youtube.com/watch?v=PXzYDXEVEjI) — MECH 346 – Heat Transfer
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_7/applied_computational_fluid_dynamics/steady-conduction-fdm-slab-numerical
- Whole chapter: https://www.bctengineer.com/md/semester_7/applied_computational_fluid_dynamics/chapter-3

## Question

A plane wall of thickness 0.1 m and thermal conductivity 20 W/m·K generates heat uniformly at $10^{6}$ W/m³. The faces are held at 100 °C (x = 0) and 200 °C (x = 0.1 m). Using the finite difference method with four equal intervals (three interior nodes), set up the nodal equations and find the temperatures at the interior nodes. Compare with the exact solution.

## Short answer

Using central difference FDM with Δx=0.025 m, three interior nodes yield equations: 2T1-T2=131.25, -T1+2T2-T3=31.25, -T2+2T3=231.25. Solving gives T1=171.875°C, T2=212.5°C, T3=221.875°C, matching exact quadratic solution exactly. Maximum temperature 222.5°C at x=0.07 m.

## Answer

#### Governing equation and discretisation
Steady 1D conduction with generation:
$$
k\frac{d^2T}{dx^2}+\dot q=0
$$
Central difference at an interior node $i$:
$$
k\frac{T_{i+1}-2T_i+T_{i-1}}{\Delta x^2}+\dot q=0\ \Rightarrow\ -T_{i-1}+2T_i-T_{i+1}=\frac{\dot q\Delta x^2}{k}
$$

```text
 x=0     0.025    0.05    0.075    0.1
 (0)------(1)------(2)------(3)------(4)
 100 C                               200 C
```

Data: $\Delta x=0.1/4=0.025$ m.
$$
\frac{\dot q\Delta x^2}{k}=\frac{10^6\times(0.025)^2}{20}=31.25\ \text{K}
$$
with $T_0=100$ and $T_4=200$.

#### Nodal equations
- Node 1: $2T_1-T_2=31.25+100=131.25$
- Node 2: $-T_1+2T_2-T_3=31.25$
- Node 3: $-T_2+2T_3=31.25+200=231.25$

In matrix form:
$$
\begin{bmatrix}2&-1&0\\-1&2&-1\\0&-1&2\end{bmatrix}\begin{bmatrix}T_1\\T_2\\T_3\end{bmatrix}=\begin{bmatrix}131.25\\31.25\\231.25\end{bmatrix}
$$

#### Solution (elimination)
From node 1: $T_1=(131.25+T_2)/2$. From node 3: $T_3=(231.25+T_2)/2$. Substitute in node 2:
$$
-\frac{131.25+T_2}{2}+2T_2-\frac{231.25+T_2}{2}=31.25\ \Rightarrow\ T_2-181.25=31.25
$$
$$
T_2=212.5\ ^\circ\text{C},\quad T_1=\frac{131.25+212.5}{2}=171.875\ ^\circ\text{C},\quad T_3=\frac{231.25+212.5}{2}=221.875\ ^\circ\text{C}
$$

#### Exact solution
$$
T(x)=T_0+(T_L-T_0)\frac xL+\frac{\dot q}{2k}x(L-x)
$$
At $x=0.025$: $100+25+25000\times0.025\times0.075=171.875$. Similarly 212.5 and 221.875 at 0.05 and 0.075.

| Node | $x$ (m) | FDM (°C) | Exact (°C) |
|---|---|---|---|
| 1 | 0.025 | 171.875 | 171.875 |
| 2 | 0.050 | 212.5 | 212.5 |
| 3 | 0.075 | 221.875 | 221.875 |

The two agree exactly because the exact solution is a quadratic, and the central difference formula for $d^2T/dx^2$ has an error proportional to $T''''$, which is zero here.

The maximum temperature is found from $dT/dx=1000+25000(0.1-2x)=0$, giving $x=0.07$ m, between nodes 2 and 3 (just before node 3), with $T_{max}=100+70+25000\times0.07\times0.03=222.5$ °C.

**Answer:** $T_1=171.9$ °C, $T_2=212.5$ °C, $T_3=221.9$ °C (equal to the exact values); $T_{max}=222.5$ °C at $x=0.07$ m.

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. The central-difference nodal equation for steady conduction with generation is:
   A. T_{i+1} + T_{i-1} = 2T_i
   B. -T_{i-1} + 2T_i - T_{i+1} = q dx^2/k
   C. T_i = q dx^2/k
   D. T_{i+1} - T_i = q dx/k
   Answer: B. Substituting the second-difference formula in k T'' + q = 0 gives this equation. (Key point: Nodal equation)

2. The value of q dx^2 / k with dx = 0.025 m is:
   A. 12.5 K
   B. 62.5 K
   C. 31.25 K
   D. 3.125 K
   Answer: C. 10^6 x 0.000625 / 20 = 31.25 K. (Key point: Source term value)

3. Node 1 equation is 2T1 - T2 = 131.25 because:
   A. The boundary temperature 200 is added
   B. The generation is ignored
   C. T0 = 100 is moved to the right side: 31.25 + 100
   D. T1 = 100
   Answer: C. The known boundary value T0 = 100 goes to the right-hand side. (Key point: Boundary nodes in equations)

4. The interior temperatures T1, T2, T3 are:
   A. 150, 175, 190 C
   B. 171.875, 212.5, 221.875 C
   C. 130, 160, 190 C
   D. 200, 212.5, 100 C
   Answer: B. Solving the three equations gives T2 = 212.5, T1 = 171.875, T3 = 221.875 C. (Key point: Results)

5. Why does FDM match the exact solution exactly here?
   A. The mesh is very fine
   B. Boundary values are zero
   C. The exact solution is quadratic, and the central-difference error involves the fourth derivative, which is zero
   D. Heat generation is zero
   Answer: C. A quadratic has T'''' = 0, so the second-order truncation error vanishes. (Key point: Agreement with exact)

## Related in Applied Computational Fluid Dynamics

- [Explicit scheme for transient conduction](https://www.bctengineer.com/question.md?key=semester_7%2Fapplied_computational_fluid_dynamics%3Aexplicit-ftcs-stability-numerical) — Applied Computational Fluid Dynamics, chapter 3
- [Compare FDM, FVM and FEM](https://www.bctengineer.com/question.md?key=semester_7%2Fapplied_computational_fluid_dynamics%3Afdm-fvm-fem-comparison) — Applied Computational Fluid Dynamics, chapter 3
- [Plane Poiseuille flow from Navier-Stokes](https://www.bctengineer.com/question.md?key=semester_7%2Fapplied_computational_fluid_dynamics%3Aplane-poiseuille-flow-numerical) — Applied Computational Fluid Dynamics, chapter 2

## Related in other subjects

- [Plane wall with internal heat generation](https://www.bctengineer.com/question.md?key=semester_5%2Fheat_transfer%3Aplane-wall-with-heat-generation) — Heat Transfer, chapter 2
- [Composite wall conduction using finite elements](https://www.bctengineer.com/question.md?key=semester_8%2Ffinite_element_method%3Acomposite-wall-heat-conduction) — Finite Element Method, chapter 3
- [Plane wall with temperature dependent conductivity](https://www.bctengineer.com/question.md?key=semester_5%2Fheat_transfer%3Avariable-thermal-conductivity-plane-wall) — Heat Transfer, chapter 2
- [Heat flow through composite plane wall, three layers](https://www.bctengineer.com/question.md?key=semester_2%2Ffundamental_of_thermodynamics_and_heat_transfer%3Acomposite-plane-wall-three-layers) — Fundamental of Thermodynamics & Heat Transfer, chapter 7
