Mo 2019
Mo 2019
FIGURE 5.1 A two-dimensional numerical mesh for the finite difference discretization.
i–1 Δx i Δx i+1
j+1
Δy
(i, j)
j
Δy
j–1
FIGURE 5.2 Heat balance considerations for the two-dimensional internal nodal points.
Based on the Fourier’s law of heat conduction, the heat balance is given
by
@T @T @T @T
kA 2 kA 1 kA 2 kA 1 qb ΔV 5 0
@x left @x right @y bottom @y top
ð5:2Þ
Following the first-order differencing scheme discussed earlier, the tem-
perature gradient at the left and right is discretized as follows:
Ti21; j 2 Ti;j Ti; j 2 Ti11;j Ti; j21 2 Ti;j Ti; j 2 Ti;j11
kΔy 2 kΔy 1 kΔx 2 kΔx 1 qb Δ xΔy 5 0
Δx Δx Δy Δy
ð5:3Þ
Simplifying the equation gives
Ti21; j 2 2Ti;j 1 Ti11;j Ti; j21 2 2Ti;j 1 Ti;j11
kAx 1 kAy 1 qb ΔxΔy 5 0 ð5:4Þ
Δx Δy
where Ax and Ay are the area where heat conduction flux is passing through
in x and y direction, respectively. Based on Eq. (5.4), one can notice that
governing equation is now discretized into algebraic equation which depends
on temperature difference among nodal points (or the temperature stored in
the cells of the spreadsheet).
Similar to the one-dimensional case, we could also rearrange the equation
in form as following:
ai;j Ti;j 5 ai11;j Ti11;j 1 ai21;j Ti21;j 1 ai;j11 Ti;j11 1 ai;j21 Ti;j21 1 S ð5:5Þ
where ai,j, ai21,j, ai11,j, ai,j11, ai,j21, and S are the coefficients of the
equation which could be easily implemented in spreadsheet. Details of the
implementation could be demonstrated in the following problem
examples.
Two-Dimensional and Transient Heat Conduction Chapter | 5 91
q = 0 W/m2
Th = 160ºC Tc = 60ºC
q = 0 W/m2
FIGURE 5.3 A schematic of the two-dimensional heat condition in a square steel column.
92 Demystifying Numerical Models
meshes are therefore in square shape of 2.5 mm 3 2.5 mm. In other word, Ax
and Ay are identical and Δx is equal to Δy. Moreover, there is no internal
heat generation within the column. The governing equation could be simpli-
fied as follows:
Ti21; j 2 2Ti;j 1 Ti11;j Ti; j21 2 2Ti;j 1 Ti;j11
kA 1 kA 50 ð5:7Þ
Δx Δx
kA
Dividing the equation by Δx and rearrange the equation give
Ti21; j 1 Ti11;j 1 Ti; j21 1 Ti;j11
Ti;j 5 ð5:8Þ
4
which is simply an arithmetic average of the temperature at the four-
neighboring nodal points. One should also notice that this statement is also
valid for three-dimensional case. For three-dimensional problem, with square
mesh and constant thermal properties, the temperature is the arithmetic
average of all 6 four-neighboring nodal temperature. Eq. (5.8) can also be
implemented easily in spreadsheet by calculating the average of the four-
neighboring cells, as shown in Fig. 5.4. For heat transfer problem with
non-uniform meshes, the discretized formulation would be similar to the
equation 5.8 while the area and spacing of the mesh are not constant.
In this problem, two types of boundary conditions are adopted in the
numerical procedure. Unlike the boundary condition introduced in the
Δx Δx Δx Δx
0 1 2 0 1 2
qb
Tb Δx Δx
FIGURE 5.5 Mesh arrangement at the constant temperature and heat flux boundary condition
with additional imaginary node.
Using Eq. (5.10) the boundary condition can be implemented in the addi-
tional node. Figs. 5.6 and 5.7 demonstrate how the formulation be implemen-
ted as the boundary condition in the spreadsheet.
After implementing the formulation, all the cells are correlated to each
other. This also forms a set of simultaneous equations governing all cells
with appropriate physical interpretations. The solution can now be obtained
by iterative procedures. In most of the spreadsheet, iterative option requires
user to enable the iteration functionality. For Microsoftr excel users, the
option can be enabled by following the file menu and select option. Under
the Formulas tab, user can enable the iterative calculation and specify the
maximum iteration number and maximum change as the convergence target
as shown in Fig. 5.8.
After enabling the iterative calculation the spreadsheet will carry out
the iterative process and obtain a converged solution as shown in
Fig. 5.9. Depend on the hardware of the computer, such iterative process
normally takes less than a few seconds to complete. Comparing to solv-
ing the solution by matrix operation, the iterative method appears to be
faster and more convenient. In fact, similar procedure could be also
implemented for one-dimensional heat conduction problem. It depends
totally on user preference if direct or iterative method is adopted in any
given problem.
Two-Dimensional and Transient Heat Conduction Chapter | 5 95
FIGURE 5.9 Converaged solution for the temperature distribution within the square steel
column.
t=n+1
T ni–1,j
+1 n+1
T i,j T ni ++ 1,j
1
t=n
n
T i–1, j T i,n j T in+ 1,j
Δt
t=1
Δt Δx Δx
t=0
i–1, j i, j i + 1, j
FIGURE 5.10 Notation for the spatial and temporal temperature change in transient problem.
t=n+1
T ni–1,j
+1 T ni,j+ 1 T ni ++ 1,j
1
t=n
n
Ti–1, j Ti,n j T in+ 1,j
i–1, j i, j i + 1, j
FIGURE 5.12 Graphrical presentation of the implicit scheme.
100 Demystifying Numerical Models
Δx2
Tin11 5 τðTi21
n
1 Ti11
n
Þ 1 ð1 2 2τÞTin 1 qb τ ð5:20Þ
k
For all internal points, Eq. (5.20) solves the temperature at next time step
directly from the present temperature value. This could also consider as an
extrapolation of new temperature from the present value. On the other hand,
for the implicit method, the formulation becomes
ðTin11 2 Tin Þ Δx2
5 ðTi21
n11
2 2Tin11 1 Ti11
n11
Þ 1 qb ð5:21Þ
τ k
Arranging the equation gives
Δx2
ð1 1 2τÞTin11 5 τðTi21
n11
1 Ti11
n11
Þ 1 qb τ 1 Tin ð5:22Þ
k
As discussed, the formulation reveals that implicit method requires itera-
tive process to obtain the new temperature on the right-hand side of the
equation. Comparing both methods, we can understand that explicit method
is relatively more straight-forward and easier to be implemented in
spreadsheet.
Nevertheless, the choice of time step for explicit method must be careful.
Otherwise, no realistic result or even divergence situation could occur. As
shown in Eq. (5.20), the coefficient for present temperature value (i.e., Tin ) is
12τ. From the physical viewpoint the present temperature should have a
positive effect on the future temperature. For example, if the heat conduction
has resulted a temperature rise in the element, the temperature at next time
step is equal to the temperature rise plus previous temperature. Thus the
coefficient must be positive to avoid unrealistic calculation. In other word, to
maintain stability or realistic explicit calculation, the criteria could be
expressed as
kΔt 1
ð1 2 2τÞ $ 0 or τ5 # ð5:23Þ
ρCΔx 2 2
With the given thermal property and mesh spacing, one should carefully
choose the time step size to avoid instability occur. On the other hand, unre-
alistic calculation will not occur for the implicit method (see also
Eq. (5.22)).
to support the structure a furnace. One side of the steel bar is exposed to
high temperature of 160 C due to the heat loss from the combustion cham-
ber. The other side is exposed to a constant temperature of 60 C which is
adjacent to a recovery heat exchanger. All other surfaces of the steel bar are
covered by insulation where heat loss is negligible. The thermal conductivity
and capacity are of 54 W/m K and 0.465 kJ/kg K, respectively. The density
of steel column is 7750 kg/m3. Initially the steel bar has a uniform tempera-
ture of 60oC. We aim to determine the time for the steel bar to achieve stea-
dy state temperature distribution using both methods.
Again, although the problem is one-dimensional, readers could notice
that the temperature distribution within the steel bar at the steady state condi-
tion exhibits as a linear function as follows:
x
TðxÞ 5 160 2 3 ð160 2 60Þ ð5:24Þ
0:05
To simplify the calculation, we adopt a total of 10 mesh points to discre-
tize the problem. The mesh spacing equals to 5 cm/10 5 0.5 cm or 0.005 m.
For the boundary condition, identical boundary treatment can be adopted
directly in this case (see Eq. (5.9)).
With the boundary condition, all internal nodal points can now be evalu-
ated based on the explicit method. Using the explicit method, the temperature
at the next time step is given by
Tin11 5 τðTi21
n
1 Ti11
n
Þ 1 ð1 2 2τÞTin ð5:25Þ
For the time step, we should first evaluate the maximum allowable time
step based on the stability criteria. Using the given thermal properties and
the mesh spacing, the stability criteria is evaluated as
ρCΔx2
Δt # 5 0:8 s ð5:26Þ
2k
For simplicity, we could choose the time step as 0.5 s. Afterward, we can
now implement Eq. (5.26) for the first node at the first-time step. Details of
the implementation in the spreadsheet are shown in Fig. 5.13.
Applying the same formulation for the rest of the mesh nodes, we can
obtain the temperature distribution within the steel bar at the first-time step
(i.e., t 5 0.5 s) as shown in Fig. 5.14. One could notice that temperature rise
only occurs in the first grid node. This is because only the first grid node is
subject to the heat transfer from the boundary condition. Other nodal points
have no energy input from neighboring points since all temperatures in pre-
vious time step are 60oC.
To obtain the temperature in other time step, one could simply apply for-
mulation to other rows in the spreadsheet. This can be done by simply
highlighting the first row of our time step (i.e., t 5 0.5 s) then drag the
AutoFill Handle down to the bottom of the spreadsheet (Fig. 5.15).
FIGURE 5.13 Implementation of explicit method for the first grid node.
FIGURE 5.14 Applying the explicit method for the whole domain at the first time step.
FIGURE 5.15 Temperature distribution for the first 10 s based on explicit method.
104 Demystifying Numerical Models
FIGURE 5.16 The steady state temperature distribution predicted by the explicit method.
As depicted in the picture, one could notice that all internal points
record a temperature rise during the first 10 s of heat conduction. The rate
of such temperature rise depends on the thermal diffusivity of the steel bar.
Comparing to our steady state result the temperature distribution is yet to
achieve steady state. Further applying the formulation at more time step,
we could obtained a steady state temperature distribution at 120 s
(Fig. 5.16).
As demonstrated, the explicit method calculation is a simple time march-
ing. With the time step of 0.5 s, it takes 240-time steps to obtain steady state
solution. To accelerate the calculation, one could change the time step to be
0.8 s. The same time-distribution would be obtained. However, using a time
step higher than 0.8 s (e.g., 1.0 s) would cause a diverged solution as shown
in Fig. 5.17.
Aiming to compare both methods, another spreadsheet is used to solve
the transient problem with implicit method. Using the implicit method, the
temperature at the next time step is given by
τ 1
Tin11 5 ðT n11 1 Ti11
n11
Þ1 Tn ð5:27Þ
ð1 1 2τÞ i21 ð1 1 2τÞ i
For the time step, for the sack of comparison, we choose the time step as
0.5 s (Fig. 5.18).
Similar to the explicit method, we firstly implement the formulation in
the first node at the first-time step. As the implicit method requires future
values in the calculation, one should be reminded to the enable the iterative
process option in the spreadsheet. Applying the formulation to the first row,
we could obtain the temperature distribution for the first-time step.
Two-Dimensional and Transient Heat Conduction Chapter | 5 105
FIGURE 5.17 A divergence problem occurred when 1.0 s time step is employed.
FIGURE 5.18 Implementation of implicit method for the first grid node.
Comparing the result with the explicit method, one can notice that tem-
perature rise occurs not only at the first node but also at three other nodes.
The temperature change in other nodes is caused by the heat conduction
from the first node which sequentially transfers to other nodes. Such heat
conduction effect is neglected in explicit method which imposes some
numerical error in each time step (Fig. 5.19).
106 Demystifying Numerical Models
FIGURE 5.19 Applying the implicit method for the whole domain at the first time step.
FIGURE 5.20 The steady state temperature distribution predicted by the implicit method.
FIGURE 5.21 A divergence problem occurred when 1.0 s time step is employed.