You are on page 1of 76

DEVELOPEMENT OF AN UNSTEADY HEAT

CONDUCTION SOLVER USING FINITE VOLUME


METHODOLOGY

A PROJECT REPORT

Submitted By

BG107ME014 DEEPAK KONGOT


BG107ME033 PARTHO MUKHERJEE
BG107ME048 SARAN S
BG107ME059 VARUN S

in partial fulfillment for the award of the degree of


BACHELOR OF TECHNOLOGY
IN
MECHANICAL ENGINEERING

AMRITA SCHOOL OF ENGINEERING, BANGALORE

AMRITA VISHWA VIDYAPEETHAM

BANGALORE, 560035

MAY 2011
AMRITA VISHWA VIDYAPEETHAM
AMRITA SCHOOL OF ENGINEERING, BANGALORE, 560035

BONAFIDE CERTIFICATE
This is to certify that the project report entitled “DEVELOPEMONT OF AN

UNSTEADY HEAT CONDUCTION SOLVER USING FINITE VOLUME

METHODOLOGY” submitted by

BG107ME014 DEEPAK KONGOT


BG107ME033 PARTHO MUKHERJEE
BG107ME048 SARAN S
BG107ME059 VARUN S
In partial fulfilment of the requirements for the award of the degree of Bachelor of

Technology in MECHANICAL ENGINEERING is a bonafide record of the

work carried out under my guidance and supervision at Amrita School of

Engineering, Bangalore.

Mr. Vivek M Prof. S. R. Nagaraja


Assistant Professor Chairperson
Mechanical Department Mechanical Department

The project report was evaluated by us on

INTERNAL EXAMINER EXTERNAL EXAMINER


ACKNOWLEDGEMENT
We wish to place on record, our sincere thanks to Dr. S.G. RAKESH, Principal,
AMRITA SCHOOL OF ENGINEERING, Bangalore, for having permitted us to
undertake this work.

We also wish to express our sincere thanks to Prof. S.R. NAGARAJA, H.O.D,
Department of Mechanical Engineering, AMRITA SCHOOL OF ENGINEERING,
Bangalore, for his encouragement and support that he extended towards this dissertation
work.

We would like to express our sincere thanks to VIVEK M, our guide, Assistant Professor,
Department of Mechanical Engineering, AMRITA SCHOOL OF ENGINEERING,
Bangalore for his continuous motivation and support throughout our dissertation work.
We shall be forever grateful for all his patience while dealing with our constantly
recurring doubts.

Last but not the least, we would like to thank all of them who gave valuable suggestions
within the organization and our student friends without whose good wishes this
dissertation work would not have been completed successfully.

i
ABSTRACT
Due to their complexity certain engineering problems cannot be solved using
analytical methods. Numerical methods are adopted in such cases to obtain an
approximate solution. In this project, a 2D unsteady conduction solver code is
developed using finite volume methodology. Results obtained from the code are
benchmarked against analytical solutions, if available. Otherwise the code results
are compared with results obtained using commercial CFD code called Fluent.
The benchmarked code is used to simulate a quenching process of an aluminium
square rod and the surface hardness variation is predicted.

ii
CONTENTS
Acknowledgement i

Abstract ii

List of Figures vi

List of Tables viii

List of Symbols ix

1. Introduction

1.1 About the project 1

1.2 Objective 2

2. Finite Volume Method

2.1 Introduction 3

2.2 How does FVM work? 4

2.3 Solution Methodology 6

2.3.1 Direct Method 6

2.3.2 Indirect Method 7

3. Heat Conduction

3.1 Introduction 8

3.2 Steady and transient heat transfer 8

3.3 Multi dimensional heat transfer 9

3.4 General heat conduction equation 10

3.4.1 Rectangular coordinates 10

3.5 Boundary and initial condition 13

3.5.1 Dirichlet boundary condition 14

3.5.2 Neumann boundary condition 14

iii
3.5.2.1 Specified heat flux boundary conditions 15

3.5.2.2 Insulated boundary condition 16

3.5.3 Convection boundary condition 17

3.6 Discretisation of heat conduction equation using FVM 19

3.6.1 Steady state without heat generation 19

3.6.2 Unsteady state without heat generation 20

4. Solution Algorithm

4.1 Introduction 22

4.2 Solution algorithm for steady state conduction problem 22

4.3 Solution algorithm for unsteady state conduction problem 22

4.4 Boundary treatment 25

5. Benchmark problems and results

5.1 Introduction 28

5.2 Physical domain and assumptions 28

5.3 Steady state heat conduction solver 29

5.3.1 Problem description 29

5.3.2 Analytical solutions 30

5.3.3 Numerical solution and benchmark 30

5.4 Unsteady state heat conduction solver 34

5.4.1 Problem 1: Dirichlet and insulated boundaries 34

5.4.1.1 Problem description 34

5.4.1.2 Analytical solution 35

5.4.1.3 Numerical solution and benchmark 35

5.4.2 Problem 2: Dirichlet,insulated and heat flux boundaries 36

5.4.2.1 Problem description 36

iv
5.4.2.2 Benchmark solutions 37

5.4.2.3 Numerical solutions 38

5.4.3 Problem 3: Dirichlet,insulated and convective boundaries 44

5.4.3.1 Problem description 44

5.4.3.2 Benchmark solution 45

5.4.3.3 Numerical solution 45

6. Application of solver: Simulation of quenching process

6.1 Introduction 51

6.2 Problem description 51

6.3 Mathematical description of problem 51

6.4 Numerical analysis and solution 52

7. Conclusions and future scope of work

7.1 Conclusion 55

7.2 Future scope of work 55

REFERENCES 56

v
LIST OF FIGURES
Fig. No. Particulars Page No.

2.1 Discretisation Technique 5

3.1 3-D Heat Conduction through a rectangular 10


element
3.2 Specified temperature boundary conditions on 14
both sides of the wall
3.3 Specified heat flux boundary conditions on both 15
sides of the wall
3.4 Plane wall with insulation and specified 16
boundary condition
3.5 Convection boundary conditions on the two 18
surfaces of a plane wall
4.1 Solution algorithm for steady state conduction 23

4.2 Solution algorithm for unsteady state 24


conduction
4.3 Schematic representation of a flat plate under 26
different boundary conditions.
4.4 Schematic representation of a flat plate 27
discretised into 9*9 cells
5.1 Square domain 28

5.2 Problem Figure 29

5.3 Error percentage variation along x=0.5 line 31

5.4 Error percentage variation along y=0.5 line 31

5.5 Temperature distribution along x=0.5 line 32

5.6 Temperature distribution along y=0.5 line 33

5.7 Temperature contour plot of the plate at steady 33


state
5.8 Problem Figure 34

5.9 Comparison of numerical and analytical 35


solutions at various time instants
5.10 Problem Figure 37

5.11 Comparison of Fluent and code solutions at 38


various time instants

vi
5.12 Position of points 39

5.13 Numerical and Fluent results at pt1,pt2 and pt3 39


are plotted for 25000 s
5.14 Numerical and Fluent results at pt4 plotted for 40
25000 s
5.15 Numerical and Fluent results at pt5 plotted for 40
25000 s
5.16 Temperature contour plot at time t=10s 41

5.17 Temperature contour plot at time t=100s 41

5.18 Temperature contour plot at time t=1000s 42

5.19 Temperature contour plot at time t=10000s 43

5.20 Temperature contour plot at steady state 43

5.21 Problem Figure 44

5.22 Comparison of Fluent and code solution at 45


various time instants
5.23 Numerical and Fluent results at pt1,pt2 and pt3 46
are plotted for 25000 s
5.24 Numerical and Fluent results at pt4 plotted for 47
25000 s
5.25 Numerical and Fluent results at pt5 plotted for 47
25000 s
5.26 Temperature contour plot at time t=10s 48

5.27 Temperature contour plot at time t=100s 49

5.28 Temperature contour plot at time t=1000s 49

5.29 Temperature contour plot at time t=10000s 50

5.30 Temperature contour plot at steady state 50

6.1 Temperature variation at P with different cell 53


numbers
6.2 Temperature variation at P with different bath 54
temperatures
6.3 Hardness variation at P with different bath 54
temperatures

vii
LIST OF TABLES
Table No. Particulars Page No.

5.1 Maximum deviation table in steady state 32


problem
5.2 Maximum deviation table in unsteady state 36
problem I
5.3 Properties of aluminium 36

5.4 Maximum deviation table in unsteady state 38


problem II
5.5 Maximum deviation table in unsteady state 46
problem III
6.1 Domain parameters 52

6.2 Boundary Conditions 52

viii
LIST OF SYMBOLS

G A vector quantity


n Unit normal vector

dA  Control Area

dV  Control Volume

 Divergence Operator

 A scalar function

P Cell centre being scrutinized

T- Temperature

W- Neighbouring west cell centre

E- Neighbouring east cell centre

N- Neighbouring north cell centre

S- Neighbouring south cell centre

w- West face centre of a cell

e- East face centre of a cell

n- North face centre of a cell

s- South face centre of a cell

dV p - Volume of the cell

dA p -Area of the control surface

dAn -control area along the north face

dAs -control area along the south face

ix
dAe -control area along the east face

dAw -control area along the west face

TE - temperature at the east cell centre

TW -temperature at the west cell centre

TS -temperature at the south cell centre

TN -temperature at the north cell centre

x  Length of each cell along x axis

y  Length of each cell along y axis

z  Length of each cell along z axis

x  Distance between two cell centres along x axis

y  Distance between two cell centres along y axis

0
Q  Rate of heat conduction

o
G  Total heat generated

o
g Heat generated per unit volume

m  Mass of a small rectangular element

k  Thermal conductivity of the material

c Specific heat of a material

  density of a material

t time

t  Small time step

  Thermal diffusivity of the material

x
q Heat flux

Ti  Initial temperature

h Convective heat transfer coefficient

T  Ambient temperature

i, j  Coordinates of cell centres after discretisation

H  Vickers hardness

A, B -Experimental constants to determine hardness

xi
CHAPTER 1

INTRODUCTION
INTRODUCTION MAY, 2011

1.1 ABOUT THE PROJECT

Computational Fluid Dynamics[1] and Heat Transfer is a fast growing branch in


thermal and fluid engineering which deals with numerical methods of obtaining
approximate solutions to fluid flow and heat transfer problems. Numerical
methodologies are applied to solve the Partial Differential Equations governing
the physical phenomena. Of the many methodologies used Finite Difference
method (FDM) and Finite Volume Method (FVM) are commonly used in fluid
flow and heat transfer problems. Due to its versatility and ability to handle 3-D
and complex geometries, Finite Volume Method is widely adopted in commercial
softwares.

Our interest in this project is to solve a 2-D unsteady conduction heat transfer
problem, which is usually exhibited in solids. Relatively simple heat conduction
problems involving simple geometries with simple boundary condition can be
solved analytically, but many problems encountered in practice involve
complicated geometries with complex boundary conditions or variable properties
and cannot be solved analytically. In such cases, sufficiently approximate
solutions are sought for.

In this project an attempt is made to understand the Finite Volume Methodology


and apply the methodology to develop a generalised finite volume solver to solve
2-D unsteady state conduction problem. A steady state solver is first developed
using C++ and benchmarked using analytical solutions. Then the developed code
is extended to solve 2-D unsteady conduction. The unsteady solver is
benchmarked for Dirichlet and Neumann boundary conditions [2], against
analytical solutions if it exists. For test problems for which analytical solutions do
not exist, code results are benchmarked against Fluent results. Having the code
benchmarked it was used to numerically simulate the quenching of a heated
aluminium square rod. The transient surface temperature history was obtained
using which its surface hardness variation is predicted.

MECHANICAL ENGINEERING, ASE, BANGALORE 1


INTRODUCTION MAY, 2011

1.2 OBJECTIVE

Thus the objective of the project is summarised below.

1. To develop a 2-D unsteady conduction heat transfer problem solver in


Cartesian co-ordinates using Finite Volume Methodology.

2. To benchmark the code for both Dirichlet and Neumann boundary conditions.

3. To use the solver developed to simulate the quenching process of a square


metal plate under different bath temperatures and predict the transient variation of
hardness of the metal plate using the temperature history.

MECHANICAL ENGINEERING, ASE, BANGALORE 2


CHAPTER 2

FINITE VOLUME METHODOLOGY


FINITE VOLUME METHODOLOGY MAY, 2011

2.1 INTRODUCTION

“Necessity is the mother of all invention” and it was in late 20th century that
engineers realized that an analytical solution available does not address a real life
heat transfer problems accurately. An “approximate” solution of a realistic model
of a physical problem is usually more accurate than the “exact” solution of a crude
mathematical model. These “approximate” solutions are what are known as
numerical solutions. The most famous numerical methods adopted are Finite
Difference Method(FDM), Finite Element Method(FEM) and Finite Volume
Method(FVM).

Finite Volume Method is capable of solving both diffusion as well as convection


problems. It is used in most of the Computational Fluid Dynamics software
packages. Most common example of a diffusion process is perfume after being
sprayed from the can. When the contents are sprayed at one end of the room, the
molecules diffuse and reaches the other end of the room naturally through
diffusion process because of the difference in the concentration and thus we
perceive the smell. Heat, similarly can be considered to be a source which diffuses
in a body due to temperature difference. Finite Volume Methodology primarily
deals with fluid flow problems, (the Navier Stokes being the underlying equation
for a fluid flow) where conduction and convection both exists but such is the
nature of heat transfer that it can readily be solved using Finite Volume
methodology. A normal conduction process (steady or unsteady) is a diffusion
problem.

Finite Volume Methodology coupled with high speed computers are found to be a
very handy tool for the engineers who now can devote themselves to the better
modelling of a real life problem than to search for a crude analytical solution
which have mathematical sophistication and it is not worth all that effort.

2.2 HOW DOES FINITE VOLUME METHOD WORK?

The Finite Volume Methodology has the following general procedure to solve a

MECHANICAL ENGINEERING, ASE, BANGALORE 3


FINITE VOLUME METHODOLOGY MAY, 2011

given physical problem.

1. The perquisite to solving a problem is to define the physical domain of interest


and model the problem well.

2. After having chosen a physical domain of interest next aim would be to


simplify that model to be able to solve by eliminating the details which are not
critical, the model should not be oversimplified so that its far from resemblance to
the actual physical problem as that would generate inaccurate results.

3. Identify the type of boundary conditions to be used and choose the appropriate
governing equations. In case of transient problems the initial conditions should be
identified as well. Choosing proper boundary and initial conditions are important
since it determines the correctness of the solutions we obtain.

4. Then comes discretisation, physical domain is divided into number of small


finite control volumes. Control Volumes are fixed in space which represents a
small part of the system to which physical laws can be easily applied. The centre
of these control volumes are what are known as cell centres and we obtain discrete
solutions at each of these. With increase in the number of control volumes the
accuracy of the results obtained increase. Also, during the transient analysis where
time has to be discretised as well, it adds itself as an extra dimension.

5. Our next step is to convert the governing Partial Differential Equations to


simpler equations of algebraic form, and this is where the infinitesimally small
control volumes come into picture, using the “Gauss Divergence Theorem” the
volume integral gets converted into area integral by integrating the governing
equation over the control volume. Divergence basically is a vector operator that
measures the magnitude of a vector field’s source or sink at a given point in terms
of scalar, it is a local measure of a flow’s outgoingness, or in other words the total
flux of some source entering or leaving the system, in our case it the small control
volume and the source being heat.

MECHANICAL ENGINEERING, ASE, BANGALORE 4


FINITE VOLUME METHODOLOGY MAY, 2011


The Gauss Divergence Theorem for a vector quantity G is given by
   
   GdV   G  ndA (2.1)

The Gauss Divergence Theorem when applied to a scalar function  is given by

   
  
     dV    dA
 ( 2.2)
 
Where , n are the divergence operator and unit normal vector of a control area
dA of the control volume dV . Once converted to area integral, Taylor Series
expansion is used to represent the derivatives. This has been explained below for
an arbitrary cell with its cell centre at point P the cell to its right is termed as east
cell, the one in the left is termed as west cell, the one on the top is termed as north
cell and the one in bottom is termed as south cell.

Fig. 2.1 Discretisation Technique [3]

W , E, N , S are the adjacent cell centres and w, e, n, s are face. xw,xe , y n , y s , are

the distance between cell centres. x, y are length of face in x and y direction

respectively. Thus for discretisation of governing equation (   )  0 over a
small volume with its centre at P to solve for a scalar  is explained below

 
   ( )dV P   dAP (2.3)

Where dVP is the volume of the cell and dAP is the control surface.

MECHANICAL ENGINEERING, ASE, BANGALORE 5


FINITE VOLUME METHODOLOGY MAY, 2011

As the volume consists of four control surfaces the RHS is expanded to four
integrals

  ( ) n dAn   ( ) s dAs   ( ) dAw   ( ) e dAe (2.4)


w

( ) n , ( ) s , ( ) e , ( ) w are gradients of  at north, south, east, west

areas(faces) and dAn , dAs , dAw , dAe are control areas. These gradient’s are
approximated using Taylor’s Series with truncation error of order two.

TE  TP
( ) e  ( 2.5)
xe
TP  TW
( ) w  ( 2 .6 )
x w
T P  TS ( 2 .7 )
( ) s 
y s
T N  TS ( 2.8)
( ) n 
y n

6. A solution methodology to solve the following set of algebraic equation was


adopted.

7. An algorithm to implement the iteration technique on a computer was deviced,


since manual calculations are too tedious to perform.

2.3 SOLUTION METHODOLOGY

Solutions to the problems are obtained by solving the system of linear equation or
by solving one single equation. Methods for the solution of linear equation falls in
two categories, Direct Method and Indirect method.

2.3.1 DIRECT METHOD

A system of linear equation can always be written in matrix form as-

Ax  b (2.9)

MECHANICAL ENGINEERING, ASE, BANGALORE 6


FINITE VOLUME METHODOLOGY MAY, 2011

Where A is the coefficient matrix, b is right hand side of the equation and x
represents the solution vector we search for. To solve for x we simply rearrange
the equation by taking the coefficient matrix to the other side and writing it in
inverse form

x  A1b (2.10)

If the matrix is simple enough then direct method proves to be the best tool, but as
the matrix gets more complex and lengthier it becomes difficult to find the inverse
for the A matrix, also sparse matrix where the elements are flooded by zeros can’t
be easily solved. This would then need an algorithm which would be able to find
the inverse, but then the logic involved and the coding is too cumbersome and is
not worth all that effort, since for complex matrices even the computer would
take longer time to generate the inverse. When the problem is addressed this way
it is said to have been solved by direct method.

2.3.2 INDIRECT METHOD

Indirect methods include the iteration technique which we has been mentioned
earlier, either normal iterative methods or Gauss-Jacobi, Gauss-Seidel are adopted
to solve the system of linear equation. Indirect methods can further be classified
into line solvers and point solvers. Solving simultaneously for different points
along a line in a single iteration is known as a line solver, whereas point solvers
monitor a single point at a time and solve for it.

An iterative method is a mathematical procedure that generates a sequence of


improving approximate solutions for a class of problems. An iterative method is
called convergent, if the corresponding sequence converges, for given initial
approximations. Errors incurred are due to truncation error by eliminating higher
order terms in Taylor Series expansion and round off errors during iteration run
on the computer.

MECHANICAL ENGINEERING, ASE, BANGALORE 7


CHAPTER 3

HEAT CONDUCTION
HEAT CONDUCTION MAY,2011

3.1 INTRODUCTION

Heat conduction is defined as the transfer of thermal energy from the more
energetic particles of a medium to the adjacent less energetic particle. It can take
place in liquids and gases as well as solids provided that there is no bulk motion
involved. Unlike temperature, heat transfer has direction as well as magnitude,
and thus it is a vector quantity. The general convention is that heat transfer in the
positive direction of a coordinate axis is positive and in the opposite direction it is
negative. Therefore, a positive quantity indicates heat transfer in the positive
direction and a negative quantity indicates heat transfer in the negative direction.

The driving force for any form of heat transfer is the temperature difference, and
the larger the temperature difference, the larger the rate of heat transfer. Heat
conduction problems involve finding out the temperature distribution throughout
the medium in steady state problems, and transient case involves finding the
temperature as a function of time. This can be done by choosing a suitable
coordinate system such as the rectangular, cylindrical, or spherical coordinates,
depending on the geometry involved, and a convenient reference point (the
origin). Our focus is restricted to rectangular coordinates only as the problem
chosen is for a domain of square section.

3.2 STEADY AND TRANSIENT HEAT TRANSFER

Heat transfer problems are can be solved as steady (also called steady state) or
transient (also called unsteady). The term steady implies no change with time at
any point within the medium, while transient implies variation with time or time
dependence. Therefore, the temperature or heat flux remains unchanged with time
during steady heat transfer through a medium at any location, although both
quantities may vary from one location to another. During transient heat transfer,
the temperature normally varies with time as well as position. In the special case
of variation with time, but not with positions, the temperature of the medium
changes uniformly with time. Such heat transfer systems are called lumped

MECHANICAL ENGINEERING, ASE, BANGALORE 8


HEAT CONDUCTION MAY,2011

systems. A domain at an initial condition when exposed to a new boundary


condition goes through a transient state and as t approaches a very large value, the
domain reaches a steady state. Based on the interest the problem may be solved as
steady or unsteady case. In the case of steady state problems, i.e when temperature
distribution is of interest, the problem is solved as steady state problem. On the
other hand if temperature distribution as function of time is required then unsteady
form may be used.

3.3 MULTIDIMENSIONAL HEAT TRANSFER

Heat transfer problems are also classified as being one-dimensional, two


dimensional or three dimensional, depending on the relative magnitudes of heat
transfer rates in different directions and the level of accuracy desired. In most of
the case the heat transfer through a medium is three dimensional, that is the
temperature varies along all three primary directions within the medium
throughout the heat transfer process. The temperature distribution throughout the
medium at a specified time as well as the heat transfer rate at any location in this
general case can be described by a set of three coordinates such as the x, y, and z
in the rectangular (or Cartesian) coordinate system; the r,  and z in the cylindrical
coordinate system; and the r, and  in the spherical (or polar) coordinate system.
The temperature in a medium, in some cases, varies mainly in two primary
directions, and the variation of temperature in the third direction (and thus heat
transfer in that direction) is negligible. A heat transfer problem in that case is said
to be two-dimensional. The heat transfer problem is said to be one-dimensional if
the temperature varies in one direction only and thus heat is transferred in one
direction, and thus heat transfer in other directions are negligible or zero. The rate
of heat conduction through a medium in a specified direction (say, in the x-
direction) is proportional to the temperature difference across the medium and the
area normal to the direction of heat transfer, but is inversely proportional to the
distance in that direction.

MECHANICAL ENGINEERING, ASE, BANGALORE 9


HEAT CONDUCTION MAY,2011

This is expressed in the differential form by Fourier’s law of heat conduction for
one-dimensional heat conduction as

dT
Qcond  kA (3.1)
dx
where k is the thermal conductivity of the material (W/mK), and dT is the
dx
temperature gradient. The thermal conductivity ‘k’ can be a function of
temperature. Heat is conducted in the direction of decreasing temperature, and
thus the temperature gradient is negative when heat is conducted in the positive x-
direction. The negative sign in the above equation ensures that heat transfer has an
opposite sign of the temperature gradient. This project is aimed in solving only 2D
problems in Cartesian coordinates with constant thermal conductivity.

3.4 GENERAL HEAT CONDUCTION EQUATION

Most of the heat transfer problems encountered in practice are multidimensional


and therefore we develop the governing differential equation in rectangular,
cylindrical and spherical coordinates.

3.4.1 RECTANGULAR COORDINATES


o
Volume element Q z  z
o
Q y  y y
o
Qx z
o x
g xyz o
Q x  x z
o
x o y
Qy x Q z
Fig. 3.1 3D heat conduction through a rectangular volume element

MECHANICAL ENGINEERING, ASE, BANGALORE 10


HEAT CONDUCTION MAY,2011

Consider a small rectangular element of length Δx, width Δy and height Δz as


shown in the figure 3.1. Assume the density of the body ρ (kg/m and specific heat
is C. An energy balance on this element during a small time interval can be

    
expressed as

 
Rate of heat Rate of heat Rate of heat Rate of change of energy
Conduction at - conduction + heat generation = content of the element
x,y,z at x+δx , y+δy inside the
z+δz element
or

o o o o o o o Eelement
Q x  Q y  Q z  Qx  x  Q y  y  Q z  z  G gen  (3.2)
t
the volume of the element is V
element
= xyz , the change in the energy
content of the element and the rate of heat generation within the element can be
expressed as

Eelement  Et t  Et  mCTt t  Tt   CxyzTt t  Tt  (3.3)

o
G element  gVelement  gxyz (3.4)
o o
Where G, g is total heat generated and heat generated per unit volume respectively.

Substituting into equation 3.4, we get

o o o o o o
 T  Tt 
Q x  Q y  Q z  Qxx  Q yy  Q z z  gxyz  Cxyz t t  (3.5)
 t 

Dividing equation 3.5 by xyz gives

o o o o o o
1 Q xx  Q x 1 Q yy  Q y 1 Q z z  Q o T T
    g  C t t t (3.6)
yz x xz y xy z t

MECHANICAL ENGINEERING, ASE, BANGALORE 11


HEAT CONDUCTION MAY,2011

Noting that the heat transfer areas of the element for heat conduction in the x, y,
and z directions are
Ax  zy, Ay  xz, and Az  xy, respectively, and taking the limit as

x, y, z and using fourier’s law and t  0 , yields

  T    T    T  o T
k  k    k   g  C (3.7)
x  x  y  y  z  z  t

The above equation is the general equation for heat conduction in rectangular
coordinates.

In case of constant thermal conductivity, it reduces to


o
  2T    2T    2T  g 1 T
 2    2    2    (3.8)
 x   y   z  k  t

 k 
where the property     is the thermal diffusivity of the material and the
 C 
above equation is called as Fourier-Biot Equation, and it reduces to the below
forms under specified conditions:

o
  2T    2T    2T  g
1. Steady-state :  2    2    2    0 (3.9)
( Poisson’s Equation)  x   y   z  k

2. Transient, no heat generation


( Diffusion equation) :
  2T    2T    2T  1 T
 2    2    2   (3.10)
 x   y   z   t

3. Steady-state, no heat generation


( Laplace equation) :
  2T    2T    2T 
 2    2    2   0 (3.11)
 x   y   z 

MECHANICAL ENGINEERING, ASE, BANGALORE 12


HEAT CONDUCTION MAY,2011

3.5 BOUNDARY AND INITIAL CONDITIONS

The heat conduction equations above were developed using an energy balance on
a differential element inside the medium, and they remain the same regardless of
the thermal conditions on the surfaces of the medium, which means the
differential equations do not incorporate any information related to the conditions
on the surfaces such as the surface temperature or a specified heat flux. But we
know that the heat flux and the temperature distribution in a medium depend on
the conditions at the surfaces, and the description of a heat transfer problem in a
medium is not complete without a full description of the thermal conditions at the
bounding surfaces of the medium. The mathematical expression of the thermal
conditions at the boundaries are called the Boundary conditions.

For a one dimensional problem, two boundary conditions are required to be


specified. For two dimensional problems four boundary conditions are required
and for three dimensional problems six boundary conditions are to be specified.
The temperature at any point on the wall at a specified time also depends on the
condition of the wall at the beginning of the heat conduction process. Such a
condition, which is usually specified at time t = 0, is called the initial condition,
which is a mathematical expression for the temperature distribution of the
medium initially. Only one initial condition for a heat conduction problem is
required regardless of the dimension since the conduction equation is first order in
time.

In rectangular coordinates, the initial condition specified in the general form for a
3D problem is
T ( x, y, z,0)  f ( x, y, z) (3.11)

Where the function f ( x, y, z ) represents the temperature distribution throughout


the medium at time t  0. When the medium is initially at a uniform temperature
of Ti , the initial condition can be expressed as T ( x, y, z,0)  Ti .

MECHANICAL ENGINEERING, ASE, BANGALORE 13


HEAT CONDUCTION MAY,2011

The most common boundary conditions in heat transfer problems are

3.5.1 DIRICHLET BOUNDARY CONDITIONS

The boundary condition is also called as Specified Temperature Boundary


Condition. The temperature of an exposed surface can usually be measured
directly and easily. Therefore, one of the easiest ways to specify the thermal
conditions on a surface is to specify the temperature. For one-dimensional heat
transfer of thickness L, the specified temperature boundary conditions can be
expressed as

T (0, t )  T1 (3.12)

T ( L, t )  T2 (3.13)

where T1 and T2 are the specified temperatures at surfaces at x  0 and


.xL respectively. The specified temperatures can be constants, which is the
case for steady heat condition, or may vary with time.

T1 T ( x, t ) T2

0 L x

Fig. 3.2 Sp ecified temperature boundary conditions on both sides of the wall.

3.5.2 NEUMANN BOUNDARY CONDITIONS

MECHANICAL ENGINEERING, ASE, BANGALORE 14


HEAT CONDUCTION MAY,2011

The Neumann boundary conditions includes Specified heat flux boundary


conditions and Convection boundary conditions.

3.5.2.1 SPECIFIED HEAT FLUX BOUNDARY CONDITIONS

When there is sufficient information about energy interactions at a surface, it


may be possible to determine the rate of heat transfer and thus the heat flux q o

(heat transfer rate per unit surface area,( W / m 2 ) on that surface, and this
information can be used as one of the boundary conditions. The heat flux in the
positive x-direction anywhere in the medium, including the boundaries, can be
expressed by Fourier’s law of heat conduction as

T
W / m 
o
q  k 2

x
Then the boundary condition at a boundary is obtained by setting the specified
 T 
heat flux equal to  k   at that boundary. The sign of the specified heat flux is
 x 
determined by inspection : positive if the heat flux is in the positive direction of
the coordinate axis, and negative if it is in the opposite direction.

Heat flux

 T (0, t )   T ( L, t ) 
q0  k   qL   k  
 x   x 

Conduction

Heat flux

0 L x

Fig. 3.3 Specified heat flux boundary conditions on both sides of the wall

MECHANICAL ENGINEERING, ASE, BANGALORE 15


HEAT CONDUCTION MAY,2011

T (0, t )  T1 (3.14)

T
k ( L, t )  T2 (3.15)
x

3.5.2.2 INSULATED BOUNDARY CONDITION

Some surfaces are commonly insulated in practice in order to minimize heat loss
or heat gain through them. Insulation reduces heat transfer but does not totally
eliminate it unless its thickness is infinity. Heat transfer through a properly
insulated surface can be taken to be zero since adequate insulation reduces heat
transfer through a surface to negligible levels. Therefore, a well-insulated surface
can be modelled as a surface with a specified heat flux of zero. Then the boundary
condition on a perfectly insulated surface (at x = 0, for example) can be expressed
as

T 0, t 
k 0 (3.16)
x

Insulation T ( x, t ) T2

0 L x

Fig. 3.4 Plane wall with insulation and specified boundary condition

MECHANICAL ENGINEERING, ASE, BANGALORE 16


HEAT CONDUCTION MAY,2011

On an insulated surface, the first derivative of temperature with respect to the


space variable (the temperature gradient) in the direction normal to the insulated
surface is zero. This condition also implies that the temperature function must be
perpendicular to an insulated surface since the slope of temperature at the surface
must be zero.

T 0, t 
k  0 , T ( L, t )  T2 (3.17)
x

3.5.3 CONVECTION BOUNDARY CONDITION (ROBINS/MIXED


BOUNDARY CONDITIONS)

Convection boundary condition is the most common boundary condition


encountered in practice since most heat transfer surfaces are exposed to an
environment at a specified temperature and it is based on a surface energy balance
equation expressed as follows

 Heat conduction at the surface in a selected direction = Heat convection at the


surface in the same direction
The one-dimensional heat transfer equation in the x-direction in a plate of
thickness L, the convection boundary conditions on both the surfaces are
expressed as below
T 0, t 
k
x
 h1 T 1

T 0, t  (3.18)

And

T L, t 
k  h2 T L, t   T 2  (3.19)
x

Where h1 and h2 are the convection heat transfer coefficients and T 1 and T 2 are

the temperature of the surrounding medium on the two sides of the plate. The

MECHANICAL ENGINEERING, ASE, BANGALORE 17


HEAT CONDUCTION MAY,2011

direction of heat transfer is selected to be positive x-direction at both surfaces. But


the expressions are equally applicable when heat transfer is in the opposite
direction at one or both sufaces since reversing the direction of heat transfer at a
surface simply reverses the signs of both conduction and convection terms at that
surfaces. This is equivalent to multiplying the equation by -1, which has no effect
on the quantity. Being able to select either direction as the direction of heat
transfer is certainly a relief since often the surface temperature is not known and
thus the direction of heat transfer at a surface in advance.

A surface has zero thickness and thus no mass, and it cannot store any energy.
Therefore, the entire net heat entering the surface from one side must leave the
surface from the other side. The convection boundary condition states that heat
continues to flow from a body to the surrounding medium at the same rate, and it
just changes vehicles at the surface from conduction to convection (or vice versa
in the other direction). Once the solution T x, t  is obtained the surface temperature
can be calculated by substituting the value of x at the surface into the solution.

h1 h2
T1 T 2

0 L x

Fig. 3.5 Convection boundary conditions on the two surfaces of a plane wall.

MECHANICAL ENGINEERING, ASE, BANGALORE 18


HEAT CONDUCTION MAY,2011

3.6 DISCRETISATION OF HEAT CONDUCTION EQUATION


USING FINITE VOLUME METHODOLOGY

3.6.1 STEADY STATE WITHOUT HEAT GENERATION


 
The governing equation is .(kT )  0 ,

Where k is the conductivity and T is the temperature.

Referring to fig. 2.1 and integrating by gauss divergence theorem, the volume
integral reduces to area integral.
 
  (kT )dV 
  (kT )  ndA  0
 T   T 
  k  y   k  y
 x  w  x  e
(3.20)
 T   T 
  k  x   k  x
 x  s  y  n

Where w,e,s and n represent the west, east, south and north face centres
respectively.

Using taylor series expansion and neglecting the higher order terms we get,

 T   T  Tw 
    P 
 x  w  x w 
(3.21)

 T   T  TP 
    E  (3.22)
 x  e  xe 
 T   T  TS 
    P  (3.23)
 y  s  y s 
 T   T  TP 
    N  (3.24)
 y  n  y n 

Where W,E,S and N represent the west, east, south and north cell centres
respectively.

MECHANICAL ENGINEERING, ASE, BANGALORE 19


HEAT CONDUCTION MAY,2011

Using equations (3.19).(3.20),(3.21) and (3.22), equation (3.18) can be rewritten


as

 TP  TW   T  TS   T  TP   T  TP 
 y   P x   E y   N x (3.25)
 x w   y s   xe   y n 

If the grid size is uniform, x  y , the above equation reduces to

 1 1 1 1   TW T T T 
TP         S  E  N  (3.26)
 x w y s xe y n   x w y s xe y n 

And if cell centres are equidistant, xw  xn  xe  xs ; so the equation further
reduces to

TP  (TW  TS  TE  TW ) / 4 (3.27)

3.6.2 UNSTEADY STATE WITHOUT HEAT GENERATION

Heat conduction equation for the unsteady state is given by

T  
c  .(kT ) (3.28)
t

Where  ,c, and k are density , specific heat capacity and thermal conductivity
respectively.

Integrating equation (3.26), the LHS becomes

n 1
 TP
n
T T TP
 c t .dV  c t VP  c t
VP

And the RHS becomes,


 
  (kT )dV 
  (kT )  ndA

MECHANICAL ENGINEERING, ASE, BANGALORE 20


HEAT CONDUCTION MAY,2011

Approximating the gradients by equations (3.19), (3.20), (3.21), (3.22) we get,

T T  T T  T T   T  TP  Vc T
  P W y   P S x   E P y   N x  (3.29)
 x w   y s   xe   y n  k t

k
Where =  is the thermal diffusivity and V is the volume of the cell, since it
c
is 2D analysis the volume thus becomes V  x.y

The final equation therefore becomes

t
(TE  TW  TN  TS  4TP )  TPn  TPn1 (3.30)
V

When the transient conditions prevail then the temperature at time step n will
affect the temperature at (n+1)th time step.

MECHANICAL ENGINEERING, ASE, BANGALORE 21


CHAPTER 4

SOLUTION ALGORITHM
SOLUTION ALGORITHM MAY, 2011

4.1 INTRODUCTION
Having discretised the equation for a 2-D steady and unsteady state conduction
problem in Cartesian co-ordinates using Finite Volume Methodology, the actual
implementation is done by solving for a standard set of problems first with varied
boundary condition to build confidence in the code developed and apply use the
solver to solve a practical problem. This would need a foolproof algorithm and
compiler on which we can run it. We have chosen “Dev Cpp” as the compiler
which uses C++ programming language. The solution algorithm to solve the set of
equations is explained in this chapter.

4.2 SOLUTION ALGORITHM FOR STEADY STATE


CONDUCTION PROBLEM

The solution methodology adopted here is the point solver wherein the
temperature at one cell centre is obtained by solving the respective discretised
equation (3.24). And a convergence criteria is adopted to break out of the loop
when the desired level of accuracy has been achieved. The algorithm used in the
code is illustrated in the Fig. 4.1. Cell centres are identified as i, j , therefore
T (i, j ) would be the temperature at the cell centre. The convergence criteria is
given by

Told (i, j )  T (i, j )


100  0.01% (4.1)
Told (i, j )

4.3 SOLUTION ALGORITHM FOR UNSTEADY STATE


CONDUCTION PROBLEM

While solving for the unsteady state conduction problem, the explicit scheme was
used over the implicit scheme due to its simplicity in execution. In this scheme the
temperature at point at time is computed using temperature at its neighbouring

MECHANICAL ENGINEERING, ASE, BANGALORE 22


SOLUTION ALGORITHM MAY, 2011

Start

Define length L of the 2-D rectangular


domain

Define number of cells to discretise the


model

Cell centre locations and the cell sizes


are calculated

4 boundary conditions are specified

Initialise T(i,j) with initial guesses


and set

Update boundary cells first if the


conditions are not Dirichlet.

Update
Solve for interior cells’ T(i,j) using
equation (3.24)

NEXT
Compute error(i,j)
ITERATION

N
If
max(err(i,j)

T(i,j) written in a file

Stop

Fig. 4.1 Solution algorithm for steady state conduction

MECHANICAL ENGINEERING, ASE, BANGALORE 23


SOLUTION ALGORITHM MAY, 2011

Start

Define length L of the 2-D rectangular domain

Define number of cells to discretise the model

Cell centre locations and the cell sizes are calculated

4 boundary conditions are specified

Choose time step satisfying the equation (4.2)

T(i,j) with initial condition

Update boundary cells Update

Solve for interior cells T(i,j) using equation (3.28 )

Write solution at current time


NEXT TIME
t STEP

If
max(err(i,j)

Steady solution is reached

Write steady solution

Stop

Fig 4.2 Solution algorithm for unsteady state conduction

MECHANICAL ENGINEERING, ASE, BANGALORE 24


SOLUTION ALGORITHM MAY, 2011

cell at time t where t is the time step. i.e. TPn 1 is computed using

TEn , TWn , TSn , TNn as given by the equation (3.28 ).

While solving an unsteady problem, time is marched in discrete intervals called


time steps and this parameter has a great effect on the stability of the numerical
scheme. Stability of the method ensures that the solution at every time step is
converging with the errors being in control. To ensure this stability t should be
chosen should satisfy the criteria given by equation (4.2 )

 1 1  1
t     (4.2)
 x y 2
2
 2

The algorithm adopted is illustrated in Fig. 4.2

4.4 BOUNDARY TREATMENT


Boundary conditions are called the jury of the problem and are those which
determine the solution. Correct implementation of the boundary conditions greatly
influence the accuracy and physical relevance of the solution. And while
discretisation, these boundary cells are treated as cells of “zero” volume and cell
centres neighbouring them are usually at a closer distance compared to usual
distance between cell centres of interior cells. Discretisation and implementation
of boundary conditions are pictured clearly in the subsequent section

Consider a flat square domain having all types of boundary condition at the
boundaries.

Boundary Conditions

Left Face T (0, y)  Tb (4.3)

dT (1, y)
Right Face k  h[T (1, y)  T ] (4.4)
dx

MECHANICAL ENGINEERING, ASE, BANGALORE 25


SOLUTION ALGORITHM MAY, 2011

dT ( x,0)
Bottom Face k  qo (4.5)
dy

dT ( x,1)
Top Face 0 (4.6)
dy

Insulated

1m

1m

x
Heat Flux

Fig. 4.3 Schematic representation of a flat plate under different boundaries

If the above domain is discretised into nine cells (twenty five cells if zero volume
cells also considered)

Left Face T (1, j )  Tb (4.7)

T (5,1)  T (4,1)
Right Face k  h[T (1, j )  T ] (4.8)
x 2

h x
T (5,1)  T (4,1)  ( [T (1, j )  T ]  )
k 2 (4.8a)

MECHANICAL ENGINEERING, ASE, BANGALORE 26


SOLUTION ALGORITHM MAY, 2011

q0y
Bottom Face T (i,1)   T (i,1) (4.9)
2k

Top Face T (i,5)  T (i,4) (4.10)

(1,4)

(1,3)

j
(1,2)

i
(2,1) (3,1) (4,1)

Fig. 4.4 Schematic representation of a flat plate discretised to 9*9 cells

It may be noted that from equation (4.8),(4.9) and (4.10) that the boundary
conditions are not of Dirichlet type, T at boundaries get updates using temperature
from its neighbouring cell. Thus for non-Dirichlet type boundary conditions the
boundary temperature should get updated every iteration in steady solver or every
time step in unsteady state solver, this is brought in the flowchart shown in the
Fig. (4.2).

MECHANICAL ENGINEERING, ASE, BANGALORE 27


CHAPTER 5

BENCHMARK PROBLEMS AND RESULTS


BENCHMARK PROBLEMS AND RESULTS MAY, 2011

5.1 INTRODUCTION

Using the solution methodology discussed in the previous chapter, a conduction


solver is developed to solve for steady state and transient temperature for a square
rod. The solver developed is validated with different hypothetical test problems
(having all types of boundary conditions). Test problems are selected such that its
analytical solution may be derived. If not possible, the problem is solved using the
commercial CFD software Fluent and solution obtained is used as benchmark.
The test problems solved, the results obtained and its benchmarks are discussed in
this chapter.

5.2 PHYSICAL DOMAIN AND ASSUMPTIONS

The code is developed to solve 2D equation in Cartesian coordinates for a square


domain as shown in Fig.5.1.

Y
X

l (m)

Fig. 5.1 Square domain

The assumptions made in development of the solver are:

i. Governing equation is in 2D and in Cartesian coordinates


ii. No volumetric heat generation
iii. All properties of the material like conductivity, density and specific heat
are constants and independent of temperature

MECHANICAL ENGINEERING, ASE, BANGALORE 28


BENCHMARK PROBLEMS AND RESULTS MAY, 2011

The solver initially developed solved the steady form of conduction equation and
its solution was benchmarked. Then the solver is extended to solve the unsteady
form. The steady state solver was validated using the test problem and the
unsteady one with three test problems. The problems descriptions and comparison
of their benchmark solutions with our solutions are discussed below.

5.3 STEADY STATE HEAT CONDUCTION SOLVER

5.3.1 PROBLEM DESCRIPTION

Problem involves square plate of side 1m and made of hypothetical material of


conductivity, k  1W mK subjected to boundary conditions as shown in Fig.5.2.

Fig.5.2 Problem figure

Boundary conditions are,

T(0,y)=T(l,y)=T(x,0)= 0 o C (5.1)

 x 
T(x,l)= To sin   (5.2)
 l 

MECHANICAL ENGINEERING, ASE, BANGALORE 29


BENCHMARK PROBLEMS AND RESULTS MAY, 2011

5.3.2 ANALYTICAL SOLUTIONS

This problem can be solved analytically using the method of separable variables.
The choice of the boundary condition is to reduce the analytical solution to a one
term solution as 2D steady state conduction solutions are generally series solution.
The analytical solution for this problem [5] is given by eqn.5.3.

To sin(x) sinh(y)
T ( x, y)  (5.3)
sinh 

5.3.3 NUMERICAL SOLUTION AND BENCHMARK

This solution obtained using the developed solver is compared with the analytical
solution given by eqn.5.3. The initial guesses was taken to be 0 o C and a
convergence criteria was specified based on the relative absolute error defined in
eqn.(4.1) to be 1  10 6.

The code was run with 9  9, 23  23 and 49  49 cells (not including boundary
cells) and the deviation of solution from analytical solution is plotted along the
lines x=0.5 and y=0.5 as shown in Fig.5.3 and Fig.5.4.

It may be noted that with increase in number of cells the accuracy of the solutions
get better. But increasing the number of cells beyond a limit is not a good practise
as it increases no of calculations and lowers the speed of solver. So it is always
better to mesh the surface with optimum number of cells which could ensure both
accuracy and speed.

The comparison of numerical solution for different grid sizes with analytical
solution is made along the lines x=0.5 and y=0.5 and are shown in Fig.5.5 and
Fig.5.6 respectively

MECHANICAL ENGINEERING, ASE, BANGALORE 30


BENCHMARK PROBLEMS AND RESULTS MAY, 2011

0.9

0.8

0.7

0.6
Error %

9 cells
0.5
23 cells
0.4
49 cells
0.3

0.2

0.1

0
0 0.2 0.4 0.6 0.8 1
y co-ordinate (m)

Fig.5.3 Error percentage variation along x=0.5 line

0.04

0.035

0.03

0.025
error %

9 cells
0.02
23 cells
0.015 49 cells

0.01

0.005

0
0 0.2 0.4 0.6 0.8 1
x co-ordinate (m)

Fig.5.4 Error percentage variation along y=0.5 line

MECHANICAL ENGINEERING, ASE, BANGALORE 31


BENCHMARK PROBLEMS AND RESULTS MAY, 2011

It may be noted from Fig.5.4 and Fig.5.5 that there is a good agreement with
analytical solution. The maximum deviations of numerical solutions from
analytical solutions for different grid sizes are given in table 5.1.

100
90
80
Temperature(celsius)

70 Analytical
60
9 cells
50
23 cells
40
30 49 cells

20
10
0
0 0.2 0.4 0.6 0.8 1
y-coordinate(m)

Fig.5.5 Temperature distribution along the line x=0.5

The temperature contour plot of the steady state temperature is shown in Fig.5.7.

The contour plot shows the mid region close to the top boundary has the highest
temperature and temperature gradually reduces towards other boundaries as
expected.

This benchmarks the steady state code developed and the code is extended to
solve unsteady form of equations.

Table 5.1: Maximum deviation table in steady state problem

No of cells Maximum deviation from analytical solution

99 0.904%

23  23 0.188%

49  49 0.046%

MECHANICAL ENGINEERING, ASE, BANGALORE 32


BENCHMARK PROBLEMS AND RESULTS MAY, 2011

25

20
Temperature(celcius)

15 analytical
9 cells
10 23 cells
49 cells
5

0
0 0.2 0.4 0.6 0.8 1
x co-ordinate(m)

Fig.5.6 Temperature distribution along the line y=0.5

0.9

0.8 T
100
90
0.7 80
70
60
0.6
50
40
0.5 30
20
10
0.4 0

0.3

0.2

0.1

0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

Fig.5.7 Temperature contour plot of the plate at steady state ( o C )

MECHANICAL ENGINEERING, ASE, BANGALORE 33


BENCHMARK PROBLEMS AND RESULTS MAY, 2011

5.4 UNSTEADY STATE HEAT CONDUCTION SOLVER

Unsteady state heat conduction solver developed is tested with three benchmark
problems covering all types of boundary conditions which are detailed below.

5.4.1 PROBLEM 1: DIRICHLET AND INSULATED BOUNDARY


CONDITIONS

5.4.1.1 PROBLEM DESCRIPTION

The physical domain used is the same, with a square plate of side 1m and having a
hypothetical thermal diffusivity,   1 m 2 s .

Fig.5.8 Problem figure

The boundary conditions used are:

T(0,y,t) = 0 o C (5.4)

T(1,y,t) = 1 o C (5.5)

dT dT
( x,0, t )  ( x,1, t )  0 (5.6)
dy dy

MECHANICAL ENGINEERING, ASE, BANGALORE 34


BENCHMARK PROBLEMS AND RESULTS MAY, 2011

5.4.1.2 ANALYTICAL SOLUTION

The boundary conditions used were so chosen so that the derivation of analytical
solution is possible. The top and bottom boundaries are insulated so that the
problem which is 2D in space would reduce to 1D in space as heat flow can be
along x direction only. Thus by using these boundary conditions the solution T
which is a function of (x,y,t) is reduced to a function of (x,t) only.

The analytical solution is obtained by method of separable variables and is given


by eqn.5.7[6]


(1) n ( n ) 2 t
T ( x, t )  T0  (T1  T0 ) x  2(T1  T0 ) e sin(nx) (5.7)
n 1 n

5.4.1.3 NUMERICAL SOLUTION AND BENCHMARK

The problem was run with 8  8 cells and with t =2.5  10 3 s (from eqn.(4.2 ).
The solutions along the x coordinate was obtained for various time steps and were
compared with analytical solutions as shown in Fig.5.9.

1
0.9
0.8
Analytical(0.025s)
Temperature (Celcius)

0.7 Analytical(0.1s)
0.6 Analytical(0.2s)
0.5 Analytical(0.63s)
0.4 FVM(0.025s)
0.3 FVM(0.1s)
0.2 FVM(0.2s)
0.1 FVM(0.63s)
0
0 0.2 0.4 0.6 0.8 1
x co-ordinates (m)

Fig.5.9 Comparison of analytical and numerical solutions at various time instants

MECHANICAL ENGINEERING, ASE, BANGALORE 35


BENCHMARK PROBLEMS AND RESULTS MAY, 2011

Fig.5.9 shows good agreement between the code results and the benchmark
results. The maximum deviations of numerical solutions from analytical solutions
at the noted time steps are shown in table 5.2.

Table 5.2: Maximum deviation table in unsteady state problem I

Maximum deviation from analytical solution


Time
0.025 s 0.742%
0.1 s 0.613%
0.2 s 0.143%
0.63 s 0.0085%

It may be seen that with progress in temperature the right boundary temperature
diffuses into the solid and at steady state the expected linear profile is obtained.
So we conclude that our solver works with a good accuracy and can be used in
any problem with Dirichlet boundary conditions.

5.4.2 PROBLEM 2: DIRICHLET, INSULATED & HEAT FLUX


BOUNDARY CONDITIONS

5.4.2.1 PROBLEM DISCRIPTION

The physical domain used is the same, with an aluminium square plate of side 1m
as shown in Fig.5.10. Properties of aluminium used in the problem are tabulated
in table 5.3

Table 5.3: Properties of aluminium

Density,  2719 kg m 3
Specific heat, c 871 J kgK
Conductivity, k 202.4 W mK

MECHANICAL ENGINEERING, ASE, BANGALORE 36


BENCHMARK PROBLEMS AND RESULTS MAY, 2011

10,000 W m 2

T(0,y,t)=373K T(x,y,0)=273K insulated

insulated

Fig.5.10 Problem figure

The boundary conditions used are:

T(0,y,t) = 373 K (5.8)

dT dT
( x,0, t )  (1, y, t )  0 (5.9)
dy dx

dT
( x,1, t )  10000 W m 2 (5.10)
dy

T(x,y,0)=273 K (5.11)

5.4.2.2 BENCHMARK SOLUTIONS

As the analytical solution cannot be obtained, the problem was solved with
commercial CFD code Fluent and their results were used to compare our code
results.

MECHANICAL ENGINEERING, ASE, BANGALORE 37


BENCHMARK PROBLEMS AND RESULTS MAY, 2011

5.4.2.3 NUMERICAL SOLUTIONS

The problem was run with 19  19 cells and with t =0.1s (from eqn(4.2)). The
solution along the line y=0.5 is obtained for various time steps and are compared
with Fluent solutions as shown in Fig.5.11.

410 num 10s

num 100s
390
num
370 1000s
num
Temperature(K)

20000s
350 num
10000s
flu 10s
330
flu 100s
310
flu 1000s

290 flu 20000s

flu 10000s
270
0 0.2 0.4 0.6 0.8 1
x coordinate(m)

Fig.5.11 Comparison of Fluent and code solution at various time instants

The maximum deviations of the numerical solution from fluent solution at the
noted time steps are shown in table 5.4.

Table 5.4: Maximum deviation table in unsteady state problem II

Time steps Maximum deviation from Fluent solution


10s 1.01%
100s 0.8%
1000s 0.05%
10000s 0.0043%
20000s 0.0036%

MECHANICAL ENGINEERING, ASE, BANGALORE 38


BENCHMARK PROBLEMS AND RESULTS MAY, 2011

Further to check the reliability of the code, numerical solution at five different
points on the plate against the corresponding Fluent solutions for a certain time
interval was compared. The points under consideration are shown in Fig.5.12.

pt2(0.475,0.925)

pt1(0.075,0.475 pt5(0.475,0.475) pt3(0.925,0.475)


)

pt4(0.475,0.075)

Fig.5.12 Position of points

410

390
num pt1
370
temperature(K)

num pt2
350
num pt3
330 flu pt1
flu pt2
310
flu pt3
290

270
10 100 1000 10000 100000
time (s)

Fig.5.13 Numerical and Fluent results at three different points pt1, pt2 and pt3 are
plotted for 25000 seconds

MECHANICAL ENGINEERING, ASE, BANGALORE 39


BENCHMARK PROBLEMS AND RESULTS MAY, 2011

390

370
temperature(K)

350

330 num pt4


flu pt4
310

290

270
10 100 1000 10000 100000
time(sec)

Fig.5.14 Numerical and Fluent results at pt4 plotted for 25000 seconds

390

370
temperature(K)

350

330 num pt5


flu pt5
310

290

270
10 100 1000 10000 100000
time(sec)

Fig.5.15 Numerical and Fluent results at pt5 plotted for 25000 seconds

MECHANICAL ENGINEERING, ASE, BANGALORE 40


BENCHMARK PROBLEMS AND RESULTS MAY, 2011

As the thermal diffusivity was small in this problem it took more than 26000
seconds to reach the steady state. So the temperature histories of the points were
plotted on a logarithmic scale for better visualisation.

From Fig.5.13-5.15 and Fig.5.11, shows a good agreement between the code
results and the benchmark results. This proves that our code works for Dirichlet,
insulated and heat flux boundary conditions with good accuracy.

The temperature contour plot of the unsteady and steady state temperature at
different time instants are shown from Fig.5.16 to Fig.5.20.

Fig.5.16 Temperature contour plot at time t=10 seconds (K)

MECHANICAL ENGINEERING, ASE, BANGALORE 41


BENCHMARK PROBLEMS AND RESULTS MAY, 2011

Fig.5.17 Temperature contour plot at time t=100 seconds (K)

Fig.5.18 Temperature contour plot at time t=1000s (K)

MECHANICAL ENGINEERING, ASE, BANGALORE 42


BENCHMARK PROBLEMS AND RESULTS MAY, 2011

Fig.5.19 Temperature contour plot at time t=10000s (K)

Fig.5.20 Temperature contour plot at steady state (K)

MECHANICAL ENGINEERING, ASE, BANGALORE 43


BENCHMARK PROBLEMS AND RESULTS MAY, 2011

Initially highest temperature was observed at the left boundary (Fig.5.16) and
gradually it diffused to the other boundaries (Fig.5.17 & 5.18). After certain
period of time due to the effect of heat flux highest temperature was observed to
be shifted to the top part of the plate (Fig.5.19). After 25000 seconds the plate
reaches the steady state as shown in the Fig.5.20.

5.4.3 PROBLEM 3: DIRICHLET, INSULATED & CONVECTIVE


BOUNDARY CONDITIONS

5.4.3.1 PROBLEM DESCRIPTION

The physical domain and material used are same as the previous problem with
properties shown in table 5.3.

h  10W m2 K , t  273K

T (0, y, t )  373K T ( x, y,0)  303K


insulated

insulated

Fig.5.21 Problem figure

The boundary conditions are,

T(0,y,t)=373 K (5.12)

dT dT
( x,0, t )  (1, y, t )  0 (5.13)
dy dx

T(x,y,0)=303 K (5.14)

MECHANICAL ENGINEERING, ASE, BANGALORE 44


BENCHMARK PROBLEMS AND RESULTS MAY, 2011

5.4.3.2 BENCHMARK SOLUTION

As the analytical solution cannot be obtained for this problem also code results are
compared with Fluent results.

5.4.3.3 NUMERICAL SOLUTION

The problem was run with 17  17 cells and with t =0.1s (from eqn.(4.2) ). The
soluiotn along the x coordinate is obtained for various time steps and are
compared with analytical solution as shown in Fig.5.22.

380

370 num 10s


num 100s
360
num 1000s
temperature(K)

350 num 10000s


340 num20000s
flu 10s
330
flu 100s
320 flu 1000s
310 flu 10000s
flu 20000s
300
0 0.2 0.4 0.6 0.8 1
x coordinate(m)

Fig.5.22 Comparison of Fluent and code solution at various time instants

The maximum deviations of numerical solution from analytical solution at the


noted time steps are shown in table 5.5

MECHANICAL ENGINEERING, ASE, BANGALORE 45


BENCHMARK PROBLEMS AND RESULTS MAY, 2011

Table 5.5: Maximum deviation table in unsteady state problem III

Time steps Maximum deviation from analytical solution


10s 0.32%
100s 0.28%
1000s 0.096%
10000s 0.014%
20000s 0.004%

Further to check the reliability of the code, same like previous problem, numerical
solution at five different points on the plate against the corresponding Fluent
solutions for a certain time interval was compared. The points under consideration
are shown in Fig.5.12.

393

373
flu pt1
temperature(K)

353
flu pt2

333 flu pt3


num pt1
313
num pt2

293 num pt3

273
10 100 1000 10000
time(s)

Fig.5.23 Numerical and Fluent results at pt1, pt2 and pt3 are plotted for 25000s

MECHANICAL ENGINEERING, ASE, BANGALORE 46


BENCHMARK PROBLEMS AND RESULTS MAY, 2011

393

temperature(K) 373

353

333 num pt4


flu pt4
313

293

273
10 100 1000 10000
time(s)

Fig.5.24 Numerical and Fluent results at pt4 plotted for 25000s

393

373
temperature (K)

353

333 num pt5


flu pt5
313

293

273
10 100 1000 10000
time (S)

Fig.5.25 Numerical and Fluent results at pt5 plotted for 25000s

Like the previous problem the thermal diffusivity was small in this case also and it
took more than 26000 seconds to reach the steady state. So the temperature
histories of the points were plotted on a logarithmic scale for better visualisation.

MECHANICAL ENGINEERING, ASE, BANGALORE 47


BENCHMARK PROBLEMS AND RESULTS MAY, 2011

From Fig.5.23-5.25 and Fig.5.22, it can be seen that a good agreement exists
between the code results and the benchmark results. This proves that our code
works for Dirichlet, insulated and convective boundary conditions with good
precision.

The temperature contour plots of the unsteady and steady state temperature at
different time instants are shown from Fig.5.26 to Fig.5.30.

5.5 CONCLUSION

Thus the code has been tested for all type of boundary conditions and was found
to predict with good accuracy.

Fig.5.26 Temperature (K) contour plot at time t=10s

MECHANICAL ENGINEERING, ASE, BANGALORE 48


BENCHMARK PROBLEMS AND RESULTS MAY, 2011

Fig.5.27 Temperature (K) contour plot at time t=100s

Fig.5.28 Temperature (K) contour plot at time t=1000s

MECHANICAL ENGINEERING, ASE, BANGALORE 49


BENCHMARK PROBLEMS AND RESULTS MAY, 2011

Fig.5.29 Temperature (K) contour plot at time t=10000s

Fig.5.30 Temperature (K) contour plot at steady state

MECHANICAL ENGINEERING, ASE, BANGALORE 50


CHAPTER 6

APPLICATION OF SOLVER: SIMULATION OF


QUENCHING PROCESS
APPLICATION OF SOLVER: SIMULATION OF QUENCHING PROCESS MAY, 2011

6.1 INTRODUCTION

Thus the 2D unsteady heat conduction solver has been developed and validated
against benchmark problems and thus building the confidence in the methodology
and the solver developed. Having developed, the code has been used to simulate a
physical problem and analyse the results. The code has been used to simulate
quenching process of an heated aluminium rod. After solving for its surface
temperature history (called the cooling curve), its surface hardness has been
predicted using experimental correlation relating Vickers hardness and
temperature. Simulations have been done for different bath temperature and based
on the results conclusions are drawn.

6.2 PROBLEM DESCRIPTION

The problem involves simulation of quenching of aluminium square rod heated to


523K. Quenching is a process of sudden cooling of a heated metal to modify
surface properties by immersing in a liquid bath. Here the liquid used is water at
atmospheric conditions. The quenching process is to be simulated and the surface
hardness of metal at a point for different bath temperatures is to be predicted.
Properties of metal are shown in table 5.3.

6.3 MATHEMATICAL DESCRIPTION OF PROBLEM

Mathematically this problem may be formulated as a 2D unsteady heat conduction


problem which is initially at 523K. The boundary conditions would be convective
type with a specified ‘h’ and bath temperature, T  . Here the T  would be a
parameter which is varied to analyse its effect.

Quench media is chosen to be water at atmospheric conditions. Thus due to the


immersion of rod, vapour formation is expected. The two phase boiling occur near
the metal surface and the phenomenon is very complex to model. The heat
transfer rate in this is captured by the parameter ‘h’ and thus choosing appropriate
correlation to calculate ‘h’ is deterministic in getting physically realisable
solutions.

MECHANICAL ENGINEERING, ASE, BANGALORE 51


APPLICATION OF SOLVER: SIMULATION OF QUENCHING PROCESS MAY, 2011

Marco Fontecchio[7] has done a study in determining heat transfer coefficient for
quenching process. He had obtained heat transfer coefficient as a function of
temperature for quenching of an aluminium probe heated to 773K in varying bath
temperatures (278K, 298K, 313K, 353K). These have been obtained
experimentally. The current work uses the ‘h’ obtained by him for different bath
temperatures he used. He shows that ‘h’ was a function of surface temperature and
the bath temperature. In the current analysis for a particular bath temperature, the
heat conduction coefficient corresponding to surface temperature 373K has been
used. Also to maintain the similarity, the V/A=0.238 is maintained in the current
domain.

Thus summary of the boundary conditions and domain parameters are shown in
table 6.1 and 6.2.

Table 6.1: Domain parameters

Square plate material Aluminium


Side 0.952m
Volume/surface area 0.238
Table 6.2: Boundary Conditions

T h

278K 1150 W m 2 K
298K 900 W m 2 K
313K 750 W m 2 K
353K 550 W m 2 K

6.4 NUMERICAL ANALYSIS AND SOLUTION

The unsteady problem was solved with the first set of boundary conditions (h=
1150 W m 2 K , T  =278K) with convergence criteria of t =0.1s. A mesh
independent study was done by monitoring the surface temperature history at

MECHANICAL ENGINEERING, ASE, BANGALORE 52


APPLICATION OF SOLVER: SIMULATION OF QUENCHING PROCESS MAY, 2011

point P(0.952,0.476) for different grid size (7  7, 17  17, 27  27, 37  37 and 47 


47) and its simulation results up to 1000s are shown in Fig.6.1.

528

478
7*7
Temperature(K)

428 17*17
27*27
378 37*37
47*47
328

278
1 10 100 1000
time(s)

Fig.6.1: Temperature variation at P with different cell numbers

From Fig.6.1, it was found 47  47 and 37  37 cells were almost similar with a
maximum deviation of 0.399%. Thus further analysis was done with 47  47 cells.

The cooling curves are shown for different T  in Fig.6.2.

Fig.6.2, shows the variation of temperature at point P with different bath


temperatures. We observe that when bath temperature is 278K temperature drop is
greater. This behaviour is due to high value of coefficient of convection and high
temperature difference between medium and the metal.

Using this the surface Vickers hardness history was obtained using the relation
given in eqn.6.1 ( from [8])

H  Ae  BT (6.1)

Where H is Vickers hardness, A is a constant with value 65.1 kg mm 2 and B is a

constant with value 1.843  10 3 K 1 .

MECHANICAL ENGINEERING, ASE, BANGALORE 53


APPLICATION OF SOLVER: SIMULATION OF QUENCHING PROCESS MAY, 2011

528

Temperature (K) 478

428 278 K
298 K
378 313 K
353 K
328

278
1 10 100 1000
time (s)

Fig.6.2 : Temperature variation at P with different bath temperatures (K)

.Hardness histories for different T  are shown in Fig.6.3. It shows that material
quenched in a bath of 278K hardens faster compared to other bath temperatures.
Thus it can be analysed with lower bath temperature higher hardness is achievable
at shorter times.

39
Vickers surface hardness(kg/mm^2)

37

35
278 K
33 298 K
31 313 K
353 k
29

27

25
1 10 100 1000
time(s)

Fig.6.3 : Hardness variation at P with different bath temperatures

MECHANICAL ENGINEERING, ASE, BANGALORE 54


CHAPTER 7

CONCLUSIONS AND FUTURE SCOPE OF WORK


CONCLUSIONS AND FUTURE SCOPE OF WORK MAY, 2011

7.1 CONCLUSIONS

The following conclusions and observations have been made from the project
work carried out.

1. FVM proves to be reliable method to predict the temperature distribution


in both steady and unsteady conduction problems with good accuracy.
2. With increase in number of cells i.e decrease in cell size the accuracy is
improved.
3. In unsteady problems, time step chosen without satisfying the stability
criteria resulted in error growth with no solution.
4. Dirichlet boundary condition influences the initial solution as compared to
Neumann conditions as the Neumann boundaries get updated from the
interior cells unlike Dirichlet.
5. When the boundary condition imposed was insulated, the isotherms were
always perpendicular to those boundaries.
6. Thermal diffusivity,α, influences the time to reach steady state. In the
steady state test problem α was 1 m 2 s , steady state was reached in 0.63

seconds. In the unsteady state test problem, α was 8.55  10 5 m 2 s and


it took more than 25000 seconds to reach steady state.

7.2 FUTURE SCOPE OF WORK


1. The developed 2D heat conduction (diffusion) solver may be extended to
3D to solve three dimensional problems
2. The developed diffusion solver can be extended to include convection
terms to solve convection diffusion problems which with further
modifications can be used to solve fluid flow problems.
3. The heat transfer coefficient used in the quenching problem was assumed
to be constant which is not true in the physical scenario. A temperature
dependant heat transfer coefficient may be used to predict the transient
behaviour more accurately.

MECHANICAL ENGINEERING, ASE, BANGALORE 55


REFERENCES

1. Date A. W., “Introduction to Computational Fluid Dynamics”, 1st Edition


Cambridge University Press, 2005.

2. Sharma A., “Computational Fluid Dynamics and Heat Transfer”, Lecture


Notes, Indian Institute of Technology Bombay, 2007.

3. http://www.informaworld.com/smpp/section?content=a783893984&fullte
xt=713240928

4. Cengel Y.A., “Heat and Mass Transfer-A Practical Approach” 3rd Edition,
Tata McGraw Hills, 2006.

5. Kakac S. and Yener Y., “Heat Conduction” 3rd Edition, Taylor & Francis
Inc., 1995.

6. Jeong J.H., Jhon M.S., Halow J.S., Osdol J.V., “Computer Physics
Communications” Vol. 153, pp. 71-84, 2003.

7. Fontecchio M., Maniruzaman M. and Sisson R. D. Jr., “Quench factor


analysis and heat transfer coefficient calculations for 6061 aluminium
alloy probes quenched in distilled water”, International Journal of Heat
and Mass Transfer, Vol. 38, pp.863-873, 1995.

8. Westbrook J.H., “Temperature dependence of the hardness of pure


metals”, Transactions of the American Society of Metals, Vol. 45, pp. 221-
248, 1953.

MECHANICAL ENGINEERING, ASE, BANGALORE 56

You might also like