The Heat Equation describes how temperature changes through a heated or cooled medium over time and space. In one dimension, the heat equation is
|1D Heat Equation|
We will model a long bar of length 1 at an initial uniform temperature of 100 C, with one end kept at 100 C.
Finite Difference Approximations
The central and forward difference approximations for the 1st derivative wrt time and the 2nd derivative wrt space are
|Forward and central difference approximations|
Substituting these relationships into the heat equation and rearranging gives an equation that describes the temperature u at position x along the bar and time t+Δt.
Now lets define the initial and boundary conditions. The left-hand side (i.e. x=0) of the bar is kept at a fixed temperature of 100 C , while the initial temperature is 0 C.
We also need a boundary condition on the right hand side of the bar at x=1. The rate of change of temperature with respect to distance on right hand side of the bar is 0.
A central difference approximation to this boundary condition is
Rearranging this gives
Equation 4 describes the boundary condition on the right-hand side of the bar in a form that can implemented in Excel
To summarize, now we have
- Equation 1 - the finite difference approximation to the Heat Equation
- Equation 4 - the finite difference approximation to the right-hand boundary condition
- The boundary condition on the left u(1,t) = 100 C
- The initial temperature of the bar u(x,0) = 0 C
Rows represents the distance along the bar, with time increasing as you go down.
If you want the Mathcad implementation, then click here.