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.
Equation 1 |
Boundary Conditions
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 2 |
Equation 3 |
Equation 4 |
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.
4 comments:
Very Elegant and useful work !!
Sorry I have a problem with your finite difference derivative approximation with respect to space (delta x). Could you please prove how this equation is obtained through differentiation of the function du/dt (when the function u is not physically-stated in the first instance)?
Hey! I've noticed when you make the diffusity too high of the timesteps too small or too large it starts to behave funny. May I ask why this is as I'm not learned enough to understand. Thanks.
*or
Post a Comment