---
title: "Variational approach for one-dimensional heat conduction"
subject: "Finite Element Method"
chapter: 5
key: "semester_8/finite_element_method:variational-approach-heat-conduction"
source: https://www.bctengineer.com/q/semester_8/finite_element_method/variational-approach-heat-conduction
site: BCT Engineering
---

# Variational approach for one-dimensional heat conduction

Finite Element Method · Chapter 5: Interpolation Functions

- Asked in: year not given, 8 marks
- Video: [Variational Approach  in FEM | Introduction to Variational Methods (Part 3)](https://www.youtube.com/watch?v=gtCTefXSsk8) — Mech Ujala
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_8/finite_element_method/variational-approach-heat-conduction
- Whole chapter: https://www.bctengineer.com/md/semester_8/finite_element_method/chapter-5

## Question

Using the variational approach, derive the element equations for steady one-dimensional heat conduction in a rod of length $L$, cross-section $A$, conductivity $k$, with internal heat generation $Q$ per unit volume. Use a linear two-node element.

## Short answer

The variational functional is minimized with linear shape functions, giving element stiffness (kA/L)[[1,-1],[-1,1]] and load (QAL/2){1,1}. Nodal heat flows q1, q2 are added as natural boundary conditions. Convection at an end adds hA to stiffness and hAT_infinity to load.

## Answer

#### Governing equation and functional

Steady 1D conduction with heat generation:
$$
kA\frac{d^2T}{dx^2} + QA = 0
$$

The equivalent functional (analogous to the total potential energy) is
$$
\Pi = \int_0^L \left[\frac{kA}{2}\left(\frac{dT}{dx}\right)^2 - QA\,T\right]dx
$$
The solution of the differential equation makes $\Pi$ stationary (this can be shown by taking $\delta\Pi = 0$ and integrating by parts, which gives back the governing equation).

#### Element approximation

For a linear element with nodal temperatures $T_1$, $T_2$:
$$
T = N_1T_1 + N_2T_2,\quad N_1 = 1 - \frac{x}{L},\quad N_2 = \frac{x}{L}
$$
$$
\frac{dT}{dx} = \frac{1}{L}[-1\ \ 1]\begin{Bmatrix} T_1 \\ T_2 \end{Bmatrix} = [B]\{T\}
$$

#### Minimising the functional

Substitute into $\Pi$:
$$
\Pi = \frac{1}{2}\{T\}^T\left[\int_0^L kA\,[B]^T[B]\,dx\right]\{T\} - \{T\}^T\int_0^L QA\,[N]^T dx
$$

Setting $\dfrac{\partial\Pi}{\partial T_i} = 0$ gives $[k]\{T\} = \{f\}$, where
$$
[k] = \int_0^L kA\,[B]^T[B]\,dx = \frac{kA}{L}\begin{bmatrix} 1 & -1 \\ -1 & 1 \end{bmatrix}
$$
$$
\{f\} = \int_0^L QA\begin{Bmatrix} N_1 \\ N_2 \end{Bmatrix}dx = \frac{QAL}{2}\begin{Bmatrix} 1 \\ 1 \end{Bmatrix}
$$

#### Element equation

$$
\frac{kA}{L}\begin{bmatrix} 1 & -1 \\ -1 & 1 \end{bmatrix}\begin{Bmatrix} T_1 \\ T_2 \end{Bmatrix} = \frac{QAL}{2}\begin{Bmatrix} 1 \\ 1 \end{Bmatrix} + \begin{Bmatrix} q_1 \\ q_2 \end{Bmatrix}
$$

where $q_1$, $q_2$ are nodal heat flows at the ends (natural boundary conditions). The generated heat is shared equally between the two nodes. Convection at an end with coefficient $h$ and ambient temperature $T_\infty$ adds $hA$ to the stiffness term at that node and $hAT_\infty$ to the load.

The assembly, boundary conditions ($T$ specified at a node) and solution follow the same steps as for the bar problem.

## Check yourself

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

1. Which functional is stationary for steady 1D conduction with generation Q?
   A. Pi = integral of [ kA T^2 - QA ] dx
   B. Pi = integral of [ kA (dT/dx) + QA T ] dx
   C. Pi = integral of [ (kA/2) T - Q (dT/dx) ] dx
   D. Pi = integral of [ (kA/2)(dT/dx)^2 - QA T ] dx
   Answer: D. The functional is analogous to total potential energy: a gradient-squared 'strain energy' term minus a generation 'work' term. Its variation gives kA T'' + QA = 0. (Key point: Functional)

2. For the linear two-node element, what is [B] = dT/dx per unit nodal temperature?
   A. (L)[-1 1]
   B. [-1 1]
   C. (1/L)[1 1]
   D. (1/L)[-1 1]
   Answer: D. With N1 = 1 - x/L and N2 = x/L, dT/dx = (T2 - T1)/L. (Key point: Element approximation)

3. What does minimising the functional give for the element conductivity matrix?
   A. (kA/L)[[1,1],[1,1]]
   B. (kA L)[[1,-1],[-1,1]]
   C. (kA/L)[[1,-1],[-1,1]]
   D. (k/AL)[[2,-1],[-1,2]]
   Answer: C. [k] = integral of kA [B]^T[B] dx = (kA/L)[[1,-1],[-1,1]]. (Key point: Conductivity matrix)

4. What is the nodal load from uniform heat generation Q?
   A. QA/L at each node
   B. QAL at node 1 only
   C. (QAL/2) at each node
   D. QAL/3 at node 1 and 2QAL/3 at node 2
   Answer: C. Integral of QA N_i dx = QAL/2 for each node, so generated heat is shared equally. (Key point: Load vector)

## Related in Finite Element Method

- [Linear shape functions for one-dimensional element](https://www.bctengineer.com/question.md?key=semester_8%2Ffinite_element_method%3Alinear-bar-shape-functions) — Finite Element Method, chapter 5
- [Derive beam element stiffness matrix](https://www.bctengineer.com/question.md?key=semester_8%2Ffinite_element_method%3Abeam-element-stiffness-derivation) — Finite Element Method, chapter 3
- [Shape functions of four-node rectangular element](https://www.bctengineer.com/question.md?key=semester_8%2Ffinite_element_method%3Arectangular-element-shape-functions) — Finite Element Method, chapter 5
- [Derive bar element stiffness matrix](https://www.bctengineer.com/question.md?key=semester_8%2Ffinite_element_method%3Abar-element-stiffness-derivation) — Finite Element Method, chapter 3
- [Shape functions of eight-node serendipity element](https://www.bctengineer.com/question.md?key=semester_8%2Ffinite_element_method%3Aeight-node-serendipity-shape-functions) — Finite Element Method, chapter 7
- [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

## Related in other subjects

- [Derive one-dimensional heat equation](https://www.bctengineer.com/question.md?key=semester_4%2Fapplied_mathematics%3Aheat-eq-derive) — Applied Mathematics, chapter 3, asked 5×
- [Derive two-dimensional heat equation](https://www.bctengineer.com/question.md?key=semester_4%2Fapplied_mathematics%3Aheat-eq-2d-derive) — Applied Mathematics, chapter 3, asked 2×
- [Solve one dimensional heat equation](https://www.bctengineer.com/question.md?key=semester_3%2Fmathematics_iii%3Asolve-one-dimensional-heat-equation-two) — Mathematics III, chapter 4
- [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
