Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
1. INTRODUCTION
Spreadsheet programs have proved to be a very useful tool in the field of business calcula-
tions for quite some time now. Recently, using spreadsheets for analysing scientific and
engineering problems have been received with significant acceptance. One of the great
benefits of using spreadsheets for numerical solutions of various problems is that they lead to a
great simplification for the solution of problems because of the nature of spreadsheet design
and its enhanced capabilities. The significant development in personal computers
capabilities in terms of memory and speed was accompanied by a great development in
transfer through the corners is essentially three-dimensional and calculating heat loss from
furnaces walls where the corners also contribute to three-dimensional heat conduction along
with convection and/or radiation from the outer surface.
It is worth mentioning that the iterative scheme built in the spreadsheets is a very
convenient tool for analysing non-linear boundary conditions such as radiation, with almost no
extra effort from the user, other than writing the proper nodal equations. This would serve in
accomplishing two purposes, first it would provide a means for analysing more complicated
problems easily, without the need for writing a program with a high level language that may
consume considerable time in designing and implementing the code. Moreover, it also
provides a method for easily obtaining a two-dimensional, a three-dimensional graph and/or a
contour plot with very little effort. Second, this would serve in providing undergraduate
engineering students with more in-depth understanding for multi-dimensional heat conduction
and enable them to analyse and solve this type of problem without going into the details of
computer programming that is beyond the scope of learning heat transfer.
2. PROBLEM DEFINITION
The problem considered in this analysis is a three-dimensional transient heat conduction prob-
lem. Heat is transferred in a 3-D system of length L, width W and depth D as shown in Fig. 1.
The governing differential equation can be found in heat transfer textbooks and is given as
2 T 2 T 2 T 1 T
+ + = (1)
X 2 Y 2 Z 2 t
where is the thermal diffusivity = k c. The equation is subject to the following boundary
conditions: at x = 0, a specified heat flux is applied to the surface with a given value of q,
q = constant (arbitrary value) Wm2, qA = qconductionW from Fouriers law of conduction,
T
q = k W m2 (2)
x
at x = L heat is transferred by both convection and radiation according to the following heat
balance equation:
qconduction, X = L = qconvection + q radiation
i.e.
k
T
X X=L
( )
= F1 2 Ts4 T f4 + h(Ts T f ) (3)
T
y = 0 insulated surface and assumed adiabatic, i.e., q = 0 or = 0 (4)
Y y=0
(a)
i,j,+1
i,j,k+1
i1,j,k i+1,j,k
i,j,k
i,j,k1
i,j1,k
(b)
Initial condition:
t = 0, T = constant (8)
Ti, j , k , t +1 =
1
B
[
(Ti 1, j , k , t +1 + Ti +1, j , k , t +1 ) + a(Ti, j 1, k , t , +1 + Ti, j +1, k , t +1 )
where
2 2
L X L X ( X ) 2
a= , b= , c= , and B = (2 a + 2 b + c) (11)
W Y D Z
The boundary conditions are expressed as
Ti +1, j , k , t +1 Ti, j , k , t +1
x = 0(X = 0) q = k
LX
that can be written as
q LX
Ti, j , k , t +1 = + Ti +1, j , k , t +1 (12)
k
x = L(X = 1)
TM , j , k , t +1 TM 1, j , k , t +1
k
LX
( ) (
= F1 2 TM4 , j , k , t +1 TR4 + h( TM , j , k , t +1 T f )
or
(
TM , j , k , t +1 = TM 1, j , k , t +1 d TM4 , j , k , t +1 TR4 ) hLX
k
(
TM , j , k , t +1 T f ) (13)
where
F1 2 LX
d=
k
Ti, N , k , t , +1 Ti, N 1, k , t +1
k
WY
(
= h Ti, N , k , t +1 T f )
Z=0 T = an arbitrary value (16)
Initial condition
It is to be noted that the arbitrary values for temperatures and heat flux are to be taken as input
data from the user. Although equation (13) is highly non-linear, no further simplification for it
is required for the spreadsheet formulation and it will be written as it is. Another numerical
formulation for the governing equation and boundary conditions may be using finite
difference controlvolume approach that involves writing the nodal equations for interior nodes,
surface and corner nodes. However, the former formulation was selected for simplicity.
The solution range for this problem is described as follows: an arbitrary number of nodes in
X, Y and Z direction was selected to be 11 (this number can be increased to have better accu-
racy). Since the spreadsheet is a two-dimensional layer, multiple ranges are selected to repre-
sent the third dimension (the depth), i.e., the range W8 to AG18 represents the XY plane for
Z = 0 (front layer), while the range W20 to AG30 represents the XY plane for Z = 0.1 and so on
until the last plane in the Z direction (rear layer) which is represented by the range W128 to
AG138. In this problem, the boundary conditions at both the front (Z = 0) and the rear (Z = W)
are specified wall temperatures, so both layers are expected to be represented as two matrices
that contain the respective temperature values.
To take care of the initial condition, a similar set of ranges is first placed in the work-sheet.
Hence the ranges starting from (F8P18) down to (F128P138) include this initial
temperature. The temperature calculated for the next time step would be expressed through the
nodal equations in the parallel range (W8AG18) down to (W128AG138) as will be
described later.
So, it is clear that the spreadsheet set-up for the current problem starts with specifying the
range for the initial conditions. The range representing the solution of the next time step would
be constructed as follows. Since the two boundary conditions corresponding to Z = 0 and Z = D
are conditions with specified temperatures, the first layer (W8AG18) is to be filled with
values of the temperature corresponding to this boundary condition, equation (16), while the
last layer (W128AG138) is to be filled with values of the temperature corresponding to Z = D,
equation (17).
The ranges (W20AG30) down to (W116AG126) contain the nodal equations along with
the boundary conditions in both X- and Y-directions. The first range will be shown in detail and
then the rest will be simply a duplication of it. This range is a square consisting of 11 rows by
11 columns. The upper row of this range (W20AG20) should contain the boundary condition
corresponding to Y = W where the heat balance between convection and conduction exists and
is given by equation (15). The corresponding nodal equation will be written in the first cell
(W20) and then it will be copied and pasted in the rest of the row (X20AG20). The lower row
(W30AG30) corresponds to the boundary condition at Y = 0, equation (14), that represents
insulated surface, i.e. zero temperature gradient in the Y-direction (TY = 0). This boundary
condition would simply be represented in the spreadsheet by selecting the first cell in the row
(W30) and writing (=W29) and then copying this cell and pasting over the range (X30AG30).
The other two boundary conditions corresponding to the X-direction are to be arranged as
follows.
The left-most column of this range (W21 to W29) that represents the condition at X = 0,
represents the case of specified heat flux. The heat balance at this surface is given by
equation (12). The spreadsheet representation of this equation for the first cell in the column
would be given by moving the cursor to the cell W21 and writing the formula:
=X21+$C$19*$C$3/$C$15 where X21 represents the temperature (Ti+1,j,k+1) and $C$19
represents the cell in the input (data) range where the numerical value of the heat flux is stored.
It is worth mentioning that the dollar sign is used to indicate an absolute cell that does not
change as we copy and paste this nodal equation along the nodes representing constant heat
flux boundary condition. The cell $C$3 represents the increment in the X-direction X while
the last term in the formula $C$16 represents the thermal conductivity k. After writing this
formula in the cell, it is copied and pasted in the whole column (W22W29). Therefore, the
first boundary condition in the X-direction is specified. To set the second boundary condition in
the X-direction where both convection and radiation heat transfer take place, equation (13), one
would move the cursor to a cell in the right-most column, for example AG21 and write the next
formula:
=AF21-($C$14*$C$19*$C$15$C$3/$C$16)*((AG21+273)^4-(AH21+273)^4)-
($C$18*$C$3/$C$16)*(AG21-AI21)
This formula is the representation of equation (13) in a spreadsheet format. This is a non-linear
equation that will be automatically solved by the spreadsheet solver without any further effort
to simplify it. This formula would be copied from this cell and then pasted in the rest of the
column to complete the boundary condition at X = 1 for all Y (i.e. over the range AG22 to
AG29). Thus all boundary conditions are specified for this range and what is left is to write the
interior nodal equations.
To write the interior nodal equation one moves the cursor to an internal node (e.g. Y21) and
write the spreadsheet form of equation (10):
=((W21+Y21)+$C$7*(X20+X22)+$C$8*(X33+X9)+$C$9*G21)/(2+2*$C$7+
2*$C$8+$C$9)
This cell is copied and pasted over the range X21 to AF29 and hence the whole range for the
current layer in the Z-direction is specified. The reader may refer to Fig. 2 that shows the
spreadsheet set-up for this layer. The data section is shown in Fig. 2(a) while the formulae are
illustrated in Fig. 2(b). The whole range (W20 to AG30) is copied and pasted over the
ranges that represent the next increments in the Z-direction (e.g. W32 to AG42, W44 to AG54
and AG116 to AG126). This represents the entire range in the three directions for the first time
step. Performing these steps would solve the current problem for only one time step (from t = 0
to t = t) and the process needs to be automated in order to advance the solution with time until
steady-state is reached. The solution is automated through the use of two macros, the first is the
DATA macro that will set the initial condition for the current problem while the second, which
is the SOLUTION macro that executes the transient solution and advances it with time till the
steady-state criteria is met and the solution macro stops.
Accuracy of the solution can be increased by decreasing the increments in X, Y and Z directions
(i.e. by increasing the number of nodes in the numerical mesh), by tightening the convergence
criteria in the built-in solver that employs GaussSiedel technique in the spreadsheet and by
tightening the steady-state criteria in the user-defined-macro that performs the transient solu-
tion of the problem as shown in Fig. 3. The built-in graphics capabilities of the spreadsheet
programs made easy the graphical presentation of the results in the form of two- or three-
dimensional plots, surface plots and contour plots through following a certain graphics wizard.
This wizard guides the user through the whole process starting from defining the range that
will be plotted through the various details that controls the type of graph, legends, titles, scales,
etc. in an easy to follow procedure.
It is worth stating that the transient solution at any time-step can be obtained and plotted by
changing the limit of the for-next loop in the user defined macro to specify how many time
increments are required, then the range is specified and the solution is plotted. Then the
Fig. 3(b). List of a macro to run the solution for specified time steps.
solution can be continued for another set of time steps or until steady state is reached by
controlling the same parameter.
Either one of the boundary conditions at X = 1 can be used (or both, of course). If the user
needs to specify only convection heat transfer, he would set the radiation shape factor (given in
C15) equal to zero, while if radiation boundary conditions are to be used alone, the heat
transfer coefficient, h (given in cell C17) is set equal to zero, or, both of them would be given
certain values to include both boundary conditions.
Illustrative example
Consider heat transfer in a cube of length 1 m where the initial temperature is uniform (T = 15C)
and the walls at Z = 0 and Z = 1 are experiencing constant temperatures equal to 0C and 100C,
respectively. q = 1000 Wm2, h = 100 W(m2C), k = 15 W(mC), and TF = TR = 20C.
Upon running the above-mentioned two macros the results are iterated until steady-state is
reached.
The graph wizard is used to obtain samples of both two-dimensional as well as three-
dimensional plots. For example, the range (F36P36) is selected to produce a two-dimensional
plot of temperature dependence on X for Y = 0.4 and Z = 0.2 as illustrated in Fig. 4(a). It is
interesting to compare between the temperature profiles corresponding to Z = 0.2 and Z = 0.6
in Fig. 4(a) and to see the temperature gradient at the rightmost column, X = 1. In early Z
locations (e.g. Z = 0.2), radiation and convection temperature is greater than the block
temperature (T = 0C at Z = 0), therefore, the temperature is higher at the boundary, while as Z
increases, the temperature increases because of both effects of the heat flux at the left (X = 0)
and the high temperature at Z = 1 to values greater than the ambient value and thus the
direction of heat transferred is reversed.
Fig. 4(a). Steady temperature distribution versus X, Y = 0.6, Z = 0.2 and 0.6.
Fig. 4(b) shows the steady temperature distribution versus Y for X = 0.4 and Z = 0.5 that is
represented by the range (J68J78). The two boundary conditions in the Y-direction are clear in
the figure where it has a flat profile at Y = 0 (adiabatic boundary condition) and decreases to a
value of 28.96 at Y = 1 (convection boundary condition).
Three-dimensional surface plots are shown in Figs 5, 6 and 7. Fig. 5 shows the steady
temperature distribution at Z = 0.3. This corresponds to the range F44 to P54. The temperature
at Y = 1, adiabatic wall condition at Y = 0 are also shown along with values of the temperature
at both X-direction boundaries. Fig. 5 also shows the ranges of temperatures so
that one can see how isotherms are organized in such a plot. Fig. 6 depicts the steady tempera-
ture distribution at another layer in the Z-direction, Z = 0.8 where values of the temperature are
higher since this layer is in the vicinity of the rear layer (Z = 1) where T = 100C. Transient
temperature was recorded and plotted in Fig. 7(a) and 7(b) for an intermediate time steps,
= 0.05 and = 0.1, respectively, at the same location, Z = 0.8 to show the increase of
temperature with time within the whole block.
The rate of heat transfer from/to each surface can be calculated from the computed tempera-
ture values. For example, the right surface (X = 1) exchanges heat with the surroundings by
convection and radiation. The formula used is
( ) (
dq = h dAs TM , jk , t +1 TF + F dAs TM4 , j , k , t +1 TR4 )
where the temperature TM,j,k,t+1 is computed from the solution. The total heat transfer is
obtained by summing all dq values according to the relation:
N K
q= dq = 1103.12 W
j =1 k =1
This procedure is repeated for all the five surfaces according to the corresponding boundary
condition (note that q = 0 at Y = 0). Then, the total energy balance is checked by considering
summation of energy in and out of the 3-D system where the algebraic summation
approaches zero. For the current solution, the net heat transfer rate from all surfaces results in
a finite value (it approaches a value of 5.29 that is less than 0.0065% of the input energy) due
to the use of a coarse grid and approximation of the derivative that leads to a truncation error
due to the finite difference approximation of the derivatives (T X and T Z which are
used in the expression of the Fourier law of conduction applied to calculate the heat transfer
rate from the surfaces at X = 0, Z = 0 and Z = 1). However, this error reduces as we use a fine
grid and a better approximation for the derivatives such as three-point approximation (which
has a truncation error of the order X 2).
7. CONCLUSIONS
Spreadsheets were used to analyse a transient three-dimensional heat conduction problem sub-
ject to different boundary conditions. The method shows how a user can easily obtain the
numerical solution by concentrating only on the physical part of the problem without the
necessity to go deep into complicated programming. Spreadsheets were also found to be a
convenient tool for handling non-linear boundary conditions such as radiation at the surface.
Energy balance was checked by calculating the rate of heat transfer from each surface and
the summation of all approaches, a small value that was 5.29 W for the coarse grid used in this
study (this value represents 0.0065% of the energy input). However, accuracy can be
improved by increasing the number of nodes and/or by using better approximations of the
derivatives used to calculate heat transfer from surfaces of specified wall temperatures.
Calculations were run suing the EXCEL spreadsheet version 7. It is to be noticed that PC
spreadsheets are a convenient tool for solving physical problems if we consider the time
required for formulating the problem, setting up the nodal network and writing the nodal
equations. The built-in solver will carry out the numerical solution and therefore eliminating
the time required for writing and implementing a code to solve the equations.
ACKNOWLEDGEMENT
The support of the King Fahd University of Petroleum and Minerals (KFUPM) to carry out this
investigation is gratefully acknowledged.
REFERENCES
[1] J. E. Eid, A methodology and tutorial for thermal modeling with PC spreadsheets, Heat
Transfer Engineering, 8(2), 95110, 1987.
[2] J. W. Baughn and M. Rossi, Two-dimensional transient heat conduction analysis using
spreadsheets, Heat Transfer Engineering, 13 (2), 7179, 1992.
[3] D. L. ONeal, The application of microcomputer spreadsheets for solving numerical heat
conduction problems, ASHRAE Trans., 93 , part 2, 13471361, 1987.
[4] T. R. Thomson, Spreadsheet analysis of heat conduction problems, Computer in Education Div.
ASEE, pp. 4751, JulySeptember, 1988.
[5] K. C. Weston, Heat transfer simulation using productivity tools, Proc. Summer Computer Simulation
Conference of the Society for Computer Simulation, pp. 260265, 1988.
[6] A. Kharab, Use of a spreadsheet program in a two-dimensional heat conduction problem, Computer
Methods in Applied Mechanics and Engineering, 122 , 173181, 1995.
[7] E. M. Mokheimer, M. A. Antar, J. Farooqi and S. M. Zubair, Analytical and numerical along with PC
spreadsheet modeling for a composite fin, Warme und Stoffubertragung, 32 , 229238, 1997.
[8] K. J. Fisher, Spreadsheet solutions to applied heat transfer problems, Journal of Engineering
Technology, pp. 3033, Spring 1995.
[9] Y. Wong, Control design using Symphony spreadsheet, Contr. Computer, 21 (1), 1822, 1993.
[10] D. J. Kerkes, Spreadsheet solution for transient fluid flow in a porous media with a moving drainage
boundary, Computational Mechanics Publications, Southampton, pp. 4962, 1991.
[11] M. A. Antar, A simplified solution technique for some fluid flow and heat transfer problems,
International Journal of Energy Research, 22 , 129198, 1998.