Find a Guide

Finite Difference Method for Heat Transfer

Nodal Network

One way to solve second order partial differential equations is by using approximate methods. One such method is using finite-differences! Finite-difference approximation can be used to determine temperatures at discrete nodal points of a system. Imagine a nodal network overlayed on a surface (like in Figure 1).

Fig. 1 - Nodal network visualization.

This nodal network uses a $ m $, $ n $ notation such that at the location of focus, temperature is indicated by $ T_{m,n} $. Finite-difference approximation is used to represent temperature derivatives in a domain. It should be noted the accuracy of the solution is dependent on how the nodal is constructed. What you are working with is a mesh, and for each intersecting point in this mesh, you have a node.

You can imagine, if this mesh was finer, you would get more accurate results because the nodes would be closer together. However, if the mesh is coarse, the nodes would be further apart, so at a given point on the mesh, it may not be as accurate!

Using Figure 1, we can write out what the position-related temperature derivative would be for a node before and after the node of focus, $ (m,n) $.

$$ \frac{\partial T}{\partial x} \vert_{m-1/2,n} = \frac{T_{m,n} - T_{m-1,n}}{\Delta x} $$
$$ \frac{\partial T}{\partial x} \vert_{m+1/2,n} = \frac{T_{m,n} - T_{m+1,n}}{\Delta x} $$

With these in mind, we can approximate the change in the change of temperature given a change in x.

$$ \frac{\partial^2 T}{\partial x}^2 \vert_{m,n} \approx \frac{\frac{\partial T}{\partial x} \vert_{m+1/2,n} - \frac{\partial T}{\partial x} \vert_{m-1/2,n}}{\Delta x} $$
$$ \Rightarrow \frac{\partial^2 T}{\partial x}^2 \vert_{m,n} \approx \frac{T_{m+1,n} + T_{m-1,n} - 2T_{m,n}}{(\Delta x)^2} $$

We can do a similar approach for finding $ \frac{\partial^2 T}{\partial y}^2 \vert_{m,n} $.

$$ \Rightarrow \frac{\partial^2 T}{\partial y}^2 \vert_{m,n} \approx \frac{T_{m,n+1} + T_{m,n-1} - 2T_{m,n}}{(\Delta y)^2} $$

Now if we were to use a nodal network where $ \Delta x = \Delta y $ and assume no generation ($ \dot{q} = 0 $), then we can reduce the second order PDE to

[ 1 ]

$$ \frac{\partial^2 T}{\partial x}^2 + \frac{\partial^2 T}{\partial y}^2 = 0 $$
$$ \Rightarrow T_{m,n+1} + T_{m,n-1} + T_{m+1,n} + T_{m-1,n} - 4T_{m,n} = 0 $$

Energy-Balance Method

For this next section, we are going to talk about incorporating the energy-balance method with finite-difference approximations. For removing the dependence of heat flow, we will assume that all heat flow is into the nodal region of interest. So $ \dot{E}_{in} \neq 0 $ and $ \dot{E}_{out} = 0 $. So, the energy balance equation becomes

[ 2 ]

$$ \dot{E}_{in} + \dot{E}_g = 0 $$

Conduction

Let's start by applying the energy-balance method for conduction.

This image shows 5 squares in the shape of a plus sign. The central square is the node in focus and the other 4 nodes are thermally connected by conduction.

Fig. 2 - Example of conduction in a nodal network.

We will first look at an example where an interior nodal point exchanges heat with 4 adjacent nodes via conduction. We can then write the energy balance equation as the summation of heat transferred from each adjacent node and the heat generation.

[ 3 ]

$$ \sum_{i = 1}^4 q_{(i)\rightarrow(m,n)} + \dot{q} (\Delta x • \Delta y • l) = 0 $$

Here, $ \sum_{i = 1}^4 q_{(i)\rightarrow(m,n)} $ is $ \dot{E}_{in} $ and $ \dot{q} (\Delta x • \Delta y • l) $ is $ \dot{E}_g $. Additionally, $ l $ is the depth. Now each $ q_{(i)\rightarrow(m,n)} $ can be approximated by finite-difference method. This leaves us with

[ 4 ]

$$ q_{(m-1,n)\rightarrow(m,n)} = k(\Delta y • l) \frac{T_{m-1,n} - T_{m,n}}{\Delta x} $$

In Eq. (4), this was the heat transfer between the point $ (m-1,n) $ and the focus node $ (m,n) $. Notice for $ q_{(m-1,n)\rightarrow(m,n)} $, the temperature difference is between nodes that are a distance $ \Delta x $ apart. This is why the temperature difference is divided by $ \Delta x $. Now since it's conduction we are dealing with, we must include the thermal conductivity constant $ k $. This is multiplied with the depth $ l $ and the length $ \Delta y $ of contact it has with the focus node.

Putting this all together for the other 3 nodes, and assuming $ \Delta x = \Delta y $, we get

[ 5 ]

$$ T_{m,n+1} + T_{m,n-1} + T_{m+1,n} + T_{m-1,n} + \frac{\dot{q}(\Delta x)^2}{k} - 4T_{m,n} = 0 $$

Convection

Let's now turn our focus to convection using the energy-balance method. Let's say we have a nodal network where an external corner of a surface has convection heat transfer.

This image shows an external corner with convection on the open sides.

Fig. 3 - Example of convection in a nodal network.

We can then write the energy-balance equation as

[ 6 ]

$$ q_{(m-1,n) \rightarrow (m,n)} + q_{(m,n-1) \rightarrow (m,n)} + q_{(\infty) \rightarrow (m,n)} = 0 $$ $$ \Rightarrow k(\frac{\Delta y}{2} • l) \frac{T_{m-1,n} - T_{m,n}}{\Delta x} + k(\frac{\Delta x}{2} • l) \frac{T_{m,n-1} - T_{m,n}}{\Delta y} + h(\frac{\Delta x}{2} • l)(T_{\infty} - T_{m,n}) + h(\frac{\Delta y}{2} • l)(T_{\infty} - T_{m,n}) $$

Now with $ \Delta x = \Delta y $, we can summarize Eq. (6) as

[ 7 ]

$$ T_{m-1,n} + T_{m,n-1} + 2\frac{h \Delta x}{k} T_{\infty} - 2(\frac{h \Delta x}{k} + 1) T_{m,n} = 0 $$

Relation to Resistance

Now let's look at an example where two materials are joined together, then their heat transfer will be affected by the resistance of the adjoining material; this will need to be accounted for!

This image shows two materials adjoined. The connecting material has a given resistance associated.

Fig. 4 - Example of resistance in a nodal network.

With Figure 4, we can write the heat transfer between points $ (m,n) $ and $ (m,n-1) $ as

[ 8 ]

$$ q_{(m,n-1) \rightarrow (m,n)} = \frac{T_{m,n-1} - T_{m,n}}{R_{tot}} $$, where

$$ R_{tot} = \frac{\Delta y / 2}{k_A (\Delta x • l)} + \frac{R_{t,c}^"}{\Delta x • l} + \frac{\Delta y / 2}{k_B (\Delta x • l)} $$

That was a lot of material to cover, but practice will help solidify these concepts! It is especially handy with these methods because computers are terrific for computing values in incremental changes.

Find a Guide