Numerical methods- Steady-state-1D-and-2D-Part- I

76
Lectures on Heat Transfer -- NUMERICAL METHODS IN STEADY STATE 1D and 2D HEAT CONDUCTION by Dr. M. Thirumaleshwar Dr. M. Thirumaleshwar formerly: Professor, Dept. of Mechanical Engineering, St. Joseph Engg. College, Vamanjoor, Mangalore India

Transcript of Numerical methods- Steady-state-1D-and-2D-Part- I

Page 1: Numerical methods- Steady-state-1D-and-2D-Part- I

Lectures on Heat Transfer --NUMERICAL METHODS IN STEADY

STATE 1D and 2D HEAT CONDUCTION

by

Dr. M. ThirumaleshwarDr. M. Thirumaleshwarformerly:

Professor, Dept. of Mechanical Engineering,St. Joseph Engg. College, Vamanjoor,

MangaloreIndia

Page 2: Numerical methods- Steady-state-1D-and-2D-Part- I

Preface

• This file contains slides on NUMERICAL METHODS IN STEADY STATE 1D and 2D HEAT CONDUCTION.

• The slides were prepared while teaching Heat Transfer course to the M.Tech. Heat Transfer course to the M.Tech. students in Mechanical Engineering Dept. of St. Joseph Engineering College, Vamanjoor, Mangalore, India, during Sept. – Dec. 2010.

Aug. 2016 2MT/SJEC/M.Tech.

Page 3: Numerical methods- Steady-state-1D-and-2D-Part- I

• It is hoped that these Slides will be useful to teachers, students, researchers and professionals working in this field.

• For students, it should be particularly useful to study, quickly review the subject, useful to study, quickly review the subject, and to prepare for the examinations.

• ���������� ���� ��� ������

Aug. 2016 3MT/SJEC/M.Tech.

Page 4: Numerical methods- Steady-state-1D-and-2D-Part- I

References• 1. M. Thirumaleshwar: Fundamentals of Heat &

Mass Transfer, Pearson Edu., 2006• https://books.google.co.in/books?id=b2238B-

AsqcC&printsec=frontcover&source=gbs_atb#v=onepage&q&f=false

• 2. Cengel Y. A. Heat Transfer: A Practical Approach, 2nd Ed. McGraw Hill Co., 2003

Aug. 2016 MT/SJEC/M.Tech. 4

Approach, 2nd Ed. McGraw Hill Co., 2003• 3. Cengel, Y. A. and Ghajar, A. J., Heat and

Mass Transfer - Fundamentals and Applications, 5th Ed., McGraw-Hill, New York, NY, 2014.

Page 5: Numerical methods- Steady-state-1D-and-2D-Part- I

References… contd.

• 4. Incropera , Dewitt, Bergman, Lavine: Fundamentals of Heat and Mass Transfer, 6th

Ed., Wiley Intl.• 5. M. Thirumaleshwar: Software Solutions to • 5. M. Thirumaleshwar: Software Solutions to

Problems on Heat Transfer – CONDUCTION-Part-II, Bookboon, 2013

• http://bookboon.com/en/software-solutions-problems-on-heat-transfer-cii-ebook

Aug. 2016 MT/SJEC/M.Tech. 5

Page 6: Numerical methods- Steady-state-1D-and-2D-Part- I

NUMERICAL METHODS IN STEADY STATE 1D and 2D HEAT CONDUCTION

• Why Numerical methods? – Advantages –Finite difference formulation from differential eqns – 1D steady state conduction in cartesian coordinates –

Aug. 2016 MT/SJEC/M.Tech. 6

conduction in cartesian coordinates –formulation by energy balance method –different BC’s – Problems

Page 7: Numerical methods- Steady-state-1D-and-2D-Part- I

NUMERICAL METHODS IN SYEADY STATE 1D and 2D HEAT CONDUCTION

• Why Numerical methods?• Analytical solutions obtained for temperature distribution

are known as ‘exact solutions’ since temperature at any point in the solid is obtained by applying the equations derived.

Aug. 2016 MT/SJEC/M.Tech. 7

derived. • However, following points in connection with the

analytical solutions must be noted:• (i) Analytical solutions are suitable for simple geometries

such as a plane wall, cylinder or sphere; for irregulargeometries, analytical solutions become difficult.

Page 8: Numerical methods- Steady-state-1D-and-2D-Part- I

• (ii) Even in simple geometries, if there is variation of thermal conductivity with temperature, or if the heat transfer coefficient varies over the surface, or if there is radiation heat transfer involved at the surfaces, severe nonlinearities are introduced and analytical solutions become highly complicated or

Aug. 2016 MT/SJEC/M.Tech. 8

solutions become highly complicated or impossible.

• (iii) Also, analytical solutions, even if available for certain problems, are so complicated with the presence of infinite series, Bessel functions etc.that the user gets intimidated from using them.

Page 9: Numerical methods- Steady-state-1D-and-2D-Part- I

• In such cases, popular alternative method is ‘numerical solution’.

• Here, the differential equation is substituted by a set of algebraic equations and simultaneous solution of these algebraic equations gives the temperatures at selected, ‘discrete points’ in the system.

Aug. 2016 MT/SJEC/M.Tech. 9

system. • While in an analytical solution, temperature is

obtained at any point in the body, in a numerical solution temperatures are obtained only at selected, discrete points or ‘nodes’.

Page 10: Numerical methods- Steady-state-1D-and-2D-Part- I

• By selecting these nodes close enough, sufficiently accurate results are obtained.

• Advantages of numerical methods:• easy to apply, with the availability of high

speed computers• desired accuracy can be obtained by

controlling the no. of nodes or ‘mesh size’.

Aug. 2016 MT/SJEC/M.Tech. 10

controlling the no. of nodes or ‘mesh size’.• variation in area, thermal conductivity or heat

transfer coefficients, and complicated boundary conditions can be easily taken in to account.

Page 11: Numerical methods- Steady-state-1D-and-2D-Part- I

• mathematical model for a numerical solution is more likely to be a better representative of the actual system.

• parametric study to observe the effect of variation of different parameters on the solution, or ‘what – if’ analysis, is easier

Aug. 2016 MT/SJEC/M.Tech. 11

solution, or ‘what – if’ analysis, is easier with numerical methods in conjunction with high speed computers.

Page 12: Numerical methods- Steady-state-1D-and-2D-Part- I

• Generally used numerical techniques are:

• ‘finite difference’, ‘finite element’, ‘boundary element’ and ‘energy balance or control volume’ methods.

• We shall adopt energy balance method

Aug. 2016 MT/SJEC/M.Tech. 12

• We shall adopt energy balance methodsince it is intuitively easier to apply energy balance on control volumes and does not involve complicated mathematical formulations.

Page 13: Numerical methods- Steady-state-1D-and-2D-Part- I

Finite difference formulation from differential equations:

• However, as an example, for one case, let us obtain the finite difference form of equation directly from the differential equation mathematically:

Aug. 2016 MT/SJEC/M.Tech. 13

equation mathematically:• We have, for one dimensional, steady

state heat conduction with heat generation:

d2 T x( )

dx2

q g x( )

k0 in 0 <x < L......(8.1)

Page 14: Numerical methods- Steady-state-1D-and-2D-Part- I

• Now, let us divide the region 0 < x < L into M sub-

Aug. 2016 MT/SJEC/M.Tech. 14

• Now, let us divide the region 0 < x < L into M sub-regions. See Fig. 8.1. Then, size of each sub-region is:

∆ xL

M....... 8.2( )

So, there are M+1 nodes, starting from m = 0 to m = M,as shown in Fig. 8.1.

Page 15: Numerical methods- Steady-state-1D-and-2D-Part- I

• To represent the first and second derivatives in terms of finite differences, we proceed as follows:

• Consider locations (m + ½) and (m – ½) as shown.

• First derivative of temperature dT/dx at these locations is written in terms of finite differences

Aug. 2016 MT/SJEC/M.Tech. 15

locations is written in terms of finite differences as:

dT x( )

dx m1

2

Tm 1

Tm

∆ x.....(8.3 a)

and, dT x( )

dx m1

2

Tm

Tm 1

∆ x.....(8.3 b)

Page 16: Numerical methods- Steady-state-1D-and-2D-Part- I

• Then, the second derivative d2T/dx2 at node m is approximated as:

i.e. d2 T x( )

dx2m

Tm 1 2 Tm. Tm 1

∆ x( )2

......(8.4)

d2 T x( )

dx2m

dT x( )

dx m1

2

dT x( )

dx m1

2

∆ x

Aug. 2016 MT/SJEC/M.Tech. 16

dx m ∆ x( )

Substituting eqn. (8.4) in eqn. (8.1):

Tm 1 2 Tm. Tm 1

∆ x( )2

q m.

k0 ......(8.5)

where, qm is the energy generation rate at node m, and m = 1,2,3.....M-1

Page 17: Numerical methods- Steady-state-1D-and-2D-Part- I

• Eqn. (8.5) is the finite difference form of representation of the differential equation given by eqn. (8.1).

• It is valid for the ‘interior nodes’ i.e. nodes 1,2….M-1.

• Eqn. (8.5) provides (m-1) simultaneous algebraic equations for temperature.

Aug. 2016 MT/SJEC/M.Tech. 17

algebraic equations for temperature. • We need two more equations to solve M+1 node

temperatures; these two equations are obtained by finite difference representation of boundary conditions at nodes m = 0 and m = M, as will be shown later.

Page 18: Numerical methods- Steady-state-1D-and-2D-Part- I

One-dimensional, steady state heat conduction in Cartesian coordinates:

• Now, we shall develop the finite difference formulation using the ‘energy balance’ approach.

• Here, the medium in question is sub-divided into many sub-volumes; centre of each sub-volume is known as a ‘node’ and each node represents the average properties of the sub-volume

Aug. 2016 MT/SJEC/M.Tech. 18

is known as a ‘node’ and each node represents the average properties of the sub-volume around it.

• These nodes are imagined to be connected to each other by ‘conducting rods’.

• It is assumed that temperature between adjacent nodes varies linearly.

Page 19: Numerical methods- Steady-state-1D-and-2D-Part- I

• Consider one-dimensional, steady state heat conduction in a plane wall of thickness L, with heat generation rate qg(x) and constant thermal conductivity k. Now, let us divide the region 0 < x < L into M sub-regions. Then, thickness of each sub-region is: ∆x = L/M.

Aug. 2016 MT/SJEC/M.Tech. 19

region is: ∆x = L/M. • So, there are totally (M+1) nodes, starting

from m = 0 to m = M, as shown in Fig. 8.2.

Page 20: Numerical methods- Steady-state-1D-and-2D-Part- I

• Coordinate of node ‘m’ is: x = m.∆x. and let temperature of node ‘m’ be Tm.

• Remembering that each node represents the sub-volume around it (of thickness ∆x), it is clear that interior nodes 1,2…M-1 represent full sub-volumes whereas

Aug. 2016 MT/SJEC/M.Tech. 20

represent full sub-volumes whereas boundary nodes 0 and M represent half volumes (of thickness ∆x/2).

Page 21: Numerical methods- Steady-state-1D-and-2D-Part- I

Aug. 2016 MT/SJEC/M.Tech. 21

Page 22: Numerical methods- Steady-state-1D-and-2D-Part- I

• To get the difference equation for the interior nodes, let us write an energy balance for the volume element represented by node m.

• Assuming that all heat conduction is intothe element, we can write, for steady state conditions:

Aug. 2016 MT/SJEC/M.Tech. 22

conditions:• Rate of heat conduction from left + Rate of

heat conduction from right + Rate of heat generation inside the element = 0.

• i.e.

Page 23: Numerical methods- Steady-state-1D-and-2D-Part- I

where, qm is the heat generation rate per unit volume for sub-volume represented by node m (assumed const. for the entire wall), A is the heat transfer area

Q left Q right q m A. ∆ x. 0 .....(8.6)

Aug. 2016 MT/SJEC/M.Tech. 23

wall), A is the heat transfer area perpendicular to the direction of heat flow (const. for the wall), and A.∆x is the volume of the element.

Page 24: Numerical methods- Steady-state-1D-and-2D-Part- I

• So, writing the energy balance, with the direction of all heat flow into the element,

k A.Tm 1 Tm

∆ x. k A.

Tm 1 Tm

∆ x. q m A. ∆ x. 0 .....(8.7)

i.e. Tm 1

2 Tm

. Tm 1

q m ∆ x( )2.

k0 .......(8.8)

where, q is the energy generation rate at

Aug. 2016 MT/SJEC/M.Tech. 24

where, qm is the energy generation rate at node m, and m = 1,2,3.....M-1

Note that eqn. (8.8) is identical to eqn. (8.5) derived earlier mathematically by consideration of definition of first and second derivatives.

Page 25: Numerical methods- Steady-state-1D-and-2D-Part- I

• Again, eqn. (8.8) is applicable only to M-1 interior nodes; we will need two more equations to solve M unknown node temperatures. These two equations are obtained by writing energy balance at the two boundary nodes 0 and M.

• Writing in terms of thermal resistances, eqn. (8.7) can be written as:Tm 1 Tm

Rm 1 m,

Tm 1 Tm

Rm 1 m,

q m A. ∆ x. 0 .....(8.9)

Aug. 2016 MT/SJEC/M.Tech. 25

m 1 m, m 1 m,

where Rm 1 m,

∆ x

k A.m 1 m,

= thermal resistance between nodes m-1 and m

Rm 1 m,∆ x

k A. m 1 m,

= thermal resistance between nodes m+1 and m

q m = energy gen. rate at node m

A ∆ x. = volume of element about node m

Page 26: Numerical methods- Steady-state-1D-and-2D-Part- I

• Eqn. (8.9) is more general and allows for the variation of thermal conductivity and cross-sectional area with position. When k and A are constants, eqn. (8.9) reduces to eqn. (8.8).

• Boundary conditions:

Aug. 2016 MT/SJEC/M.Tech. 26

• Boundary conditions:• Most commonly encountered boundary

conditions are: prescribed temperature, prescribed heat flux, convection and radiation boundary conditions.

Page 27: Numerical methods- Steady-state-1D-and-2D-Part- I

• (i) Prescribed temperatures at the boundaries:

• Let the temperatures at x = 0 and x = L be given as To and TM respectively.

• Then, T(o) = To and T(L) = TM, give the two additional equations required to solve for M+1 unknown node temperatures.

Aug. 2016 MT/SJEC/M.Tech. 27

for M+1 unknown node temperatures. • In this case, there is no need to write

energy balance for volume elements at the boundaries, since the temperatures at the boundaries are known.

Page 28: Numerical methods- Steady-state-1D-and-2D-Part- I

• To develop finite difference equations for the other boundary conditions:

• Apply energy balance to the volume elements of nodes at the boundaries, i.e. nodes 0 and M (See Fig. 8.3).

Aug. 2016 MT/SJEC/M.Tech. 28

Page 29: Numerical methods- Steady-state-1D-and-2D-Part- I

• Then, energy balance for the volume element for node ‘0’ on the left boundary of the wall is given by:

Q left k A.T 1 T 0

∆ x. q o

A ∆ x.

2. 0 .....(8.10)

Let us now apply eqn. (8.10) to get difference equationsfor boundary nodes ‘0’ and ‘M’:

(ii) Prescribed heat flux at the boundaries:

Aug. 2016 MT/SJEC/M.Tech. 29

(ii) Prescribed heat flux at the boundaries:Then, from eqn. (8.10):

For node ‘0’: q left A. k A.T 1 T 0

∆x. q o

A ∆x.

2. 0 ....(8.11)

i.e. 2 T 1. 2 T 0

.∆x( )

2q o.

k

2 ∆x. q left.

k0 .....(8.12)

Page 30: Numerical methods- Steady-state-1D-and-2D-Part- I

• For node ‘M’: Replace the subscript ‘0’ by ‘M’ and subscript ‘1’ by ‘M-1’:

q right A. k A.TM 1 T M

∆x. q M

A ∆x.

2. 0 ....(8.13)

i.e. 2 TM 1. 2 TM

.∆x( )

2q M.

k

2 ∆x. q right.

k0 .....(8.14)

Eqns. (8.12) and (8.14) are finite difference representation of

Aug. 2016 MT/SJEC/M.Tech. 30

Eqns. (8.12) and (8.14) are finite difference representation ofthe prescribed heat flux conditions at nodes ‘0’ and ‘M’respectively.

For insulated boundary condition and for a plane ofthermal symmetry:

This is a special case of prescribed heat flux condition. Now, qleft = qright = 0. Then, eqns. (8.12) and (8.14) become:

Page 31: Numerical methods- Steady-state-1D-and-2D-Part- I

• Equations (8.15) and (8.16) for an insulated boundary or a plane of thermal

2 T 1. 2 T 0

.∆ x( )

2q o

.

k0 .....(8.15)

2 TM 1

. 2 TM

.∆ x( )

2q M

.

k0 .....(8.16)

Aug. 2016 MT/SJEC/M.Tech. 31

insulated boundary or a plane of thermal symmetry can be obtained more easily by applying the ‘mirror image concept’:

• Here, the insulated boundary or the plane of thermal symmetry is considered as a mirror.

Page 32: Numerical methods- Steady-state-1D-and-2D-Part- I

• Thus, for the node ‘0’, insulated left face becomes a mirror and reflects node 1; then, node ‘0’ has the reflected node ‘1’ on its left and node ‘1’ on its right and we write the difference equation as if the node ‘0’ is an internal node. Then, applying eqn.

Aug. 2016 MT/SJEC/M.Tech. 32

(8.8) for an internal node, putting m = 0, we get:

Tm 1

2 Tm

. Tm 1

q m ∆ x( )2.

k0 .......(8.8)

Page 33: Numerical methods- Steady-state-1D-and-2D-Part- I

• Put m= 0 and T-1 = T1:

i.e. 2 T 1. 2 T 0

.q o ∆ x( )

2.

k0 ....(8.17)

Equation (8.17) is the same as eqn. (8.15).

Similarly, for node ‘M’, right hand surface which is insulated becomes the mirror and node ‘M-1’ is reflected

Aug. 2016 MT/SJEC/M.Tech. 33

insulated becomes the mirror and node ‘M-1’ is reflected further to the right of node ‘M’ and now, considering node ‘M’ as an internal node, putting m = M, and M+1 = M-1, eqn. (8.8) becomes:

i.e. 2 TM 1

. 2 TM

.∆ x( )

2q M

.

k0 .....(8.18)

Eqn. (8.18) is the same as eqn. (8.16).

Page 34: Numerical methods- Steady-state-1D-and-2D-Part- I

• (iii) Convection boundary condition:• Let the boundaries at x = 0 and x = L be subjected to

convection to a fluid at a temperature of Ta with a heat transfer coeff. of h.

• Then, eqn. (8.10) becomes:• For node ‘0’:

h A. T a T 0. k A.

T 1 T 0

∆ x. q o

A ∆ x.

2. 0 ... 8.19( )

Aug. 2016 MT/SJEC/M.Tech. 34

a 0 ∆ xo 2

i.e. 2 T 1. 2 T 0

. 1h ∆ x.

k.

∆ x( )2

q o.

k

2 h. ∆ x.

kT a

. 0 ...(8.20)

For node ‘M’: Replace the subscript ‘0’ by ‘M’ and subscript ‘1’ by ‘M-1’:

We get:

Page 35: Numerical methods- Steady-state-1D-and-2D-Part- I

• Equations (8.20) and (8.22) are finite

h A. T a T M. k A.

TM 1

TM

∆ x. q M

A ∆ x.

2. 0 ... 8.21( )

i.e. 2 TM 1. 2 T M

. 1h ∆ x.

k.

∆ x( )2

q M.

k

2 h. ∆ x.

kT a

. 0 ...(8.22)

Aug. 2016 MT/SJEC/M.Tech. 35

• Equations (8.20) and (8.22) are finite difference representations for convective boundary conditions at nodes ‘0’ and ‘M’ respectively.

Page 36: Numerical methods- Steady-state-1D-and-2D-Part- I

(iv) Radiation boundary condition:• Let the surrounding temperature be Ta,

emissivity of the surface ε, and σ, the Stefan Boltzmann constant.

• Then, eqn. (8.10) becomes:

Aug. 2016 MT/SJEC/M.Tech. 36

• For node ‘0’:

ε σ. A. T a4 T 0

4. k A.T 1 T 0

∆ x. q o

A ∆ x.

2. 0 ....(8.23)

Page 37: Numerical methods- Steady-state-1D-and-2D-Part- I

• For node ‘M’: Replace the subscript ‘0’ by ‘M’ and subscript ‘1’ by ‘M-1’:

ε σ. A. T a4 T M

4. k A.TM 1 T M

∆ x. q M

A ∆ x.

2. 0 ....(8.24)

(v) Combined convection and radiationboundary condition:Let the combined heat transfer coefficient be h and

Aug. 2016 MT/SJEC/M.Tech. 37

Let the combined heat transfer coefficient be hcomb andthe fluid temperature be Ta. Then, eqn. (8.10) becomes:

For node ‘0’: h comb A. T a T 0. k A.

T 1 T 0

∆ x. q o

A ∆ x.

2. 0 ... 8.25( )

i.e. 2 T 1. 2 T 0

. 1h comb ∆ x.

k.

∆ x( )2

q o.

k

2 h comb. ∆ x.

kT a

. 0 ...(8.26)

Page 38: Numerical methods- Steady-state-1D-and-2D-Part- I

• For node ‘M’: Replace the subscript ‘0’ by ‘M’ and subscript ‘1’ by ‘M-1’:

h comb A. T a T M. k A.

TM 1

TM

∆ x. q M

A ∆ x.

2. 0 ... 8.27( )

i.e. 2 TM 1. 2 T M

. 1h comb ∆ x.

k.

∆ x( )2

q M.

k

2 h comb. ∆ x.

kT a

. 0 ...(8.28)

(vi) Interface boundary condition:

Aug. 2016 MT/SJEC/M.Tech. 38

(vi) Interface boundary condition:

Node ‘m’ is at the interface between two solids in‘perfect thermal contact’. i.e. there is no contact resistanceand both the surfaces are at the same temperature at theinterface node ‘m’. This situation is shown in Fig. 8.4.

Page 39: Numerical methods- Steady-state-1D-and-2D-Part- I

Aug. 2016 MT/SJEC/M.Tech. 39

• The finite difference formulation for this boundary condition is given by:

k A A.T

m 1T

m

∆ x. k B A.

Tm 1

Tm

∆ x. q

A m,A ∆ x.

2. q

B m,A ∆ x.

2. 0 ....(8.29)

Page 40: Numerical methods- Steady-state-1D-and-2D-Part- I

• With contact resistance:• If there is a contact resistance Rc at the

interface, we use the resistance concept to write the difference equation. (See eqn. (8.9)). Now, at the interface, there is a temperature drop. Let the temperature at the interface drop from T to T .

Aug. 2016 MT/SJEC/M.Tech. 40

the interface drop from Tc1 to Tc2.• Then, we can write:

k A A.Tm 1 Tc 1

∆ x. k B A.

Tm 1 Tc 2

∆ x. qA m,

A ∆ x.

2. qB m,

A ∆ x.

2. 0 .....(8.30)

Page 41: Numerical methods- Steady-state-1D-and-2D-Part- I

• And, temperature drop at the interface is calculated as:

∆ T c Tc 1 Tc 2 QRc

A. ....(8.31)

where Q is the heat flow rate through the interface(i.e. between nodes (m-1) and (m+1)) and (Rc/A) is

Aug. 2016 MT/SJEC/M.Tech. 41

(i.e. between nodes (m-1) and (m+1)) and (Rc/A) isthe interface thermal resistance.

Page 42: Numerical methods- Steady-state-1D-and-2D-Part- I

• Example 8.1: One face of a slab of thickness 1 cm (k = 20 W/(m.C)), is maintained at 40 C and the other surface is subjected to a convection heat transfer with a fluid at 100 C with a heat transfer coeff. of 4000 W/(m2.C).There is uniform internal heat generation in the slab at a rate of 8 x 107 W/m3.

Aug. 2016 MT/SJEC/M.Tech. 42

• (a) Dividing the slab into 5 equally spaced sub-regions, find the temperatures at the different nodes. Assume one dimensional, steady state conduction.

• (b) If the left surface is insulated, what is the temperature on that surface in steady state?

Page 43: Numerical methods- Steady-state-1D-and-2D-Part- I

Aug. 2016 MT/SJEC/M.Tech. 43

Note that there are 6 nodes, numbered as: 0,1,2,3,4, and 5. Out of these,nodes '0'and '5'are boundary nodes and the nodes 1,2,3 and 4 are internalnodes. Temperature of node '0'is given, i.e. T0 = 40 C, for the first part ofthe problem.

Page 44: Numerical methods- Steady-state-1D-and-2D-Part- I

• Fig. Ex. 8.1 shows the schematic of finite difference nodes for this problem.

Aug. 2016 MT/SJEC/M.Tech. 44

Apply eqn. (8.8) for interior nodes, 1,2,3 and 4:

Tm 1 2 Tm. Tm 1

q g ∆x( )2.

k0 .......(8.8)

We have:q g ∆x( )

2.

k16=

Page 45: Numerical methods- Steady-state-1D-and-2D-Part- I

Node 0: T 0 40 C....by data.....(a)

Node 1: T 0 2 T 1. T 2 16 0 .....(b)

Node 2: T 1 2 T 2. T 3 16 0 ....(c)

Node 3: T 2 2 T 3. T 4 16 0 ....(d)

Aug. 2016 MT/SJEC/M.Tech. 45

Node 4: T 3 2 T 4. T 5 16 0 .....(e)

For Node 5: here, we have convection boundary condition. So, applyeqn.(8.22):

2 TM 1. 2 T M

. 1h ∆x.

k.

∆x( )2

q M.

k

2 h. ∆x.

kT a. 0 ...(8.22)

Page 46: Numerical methods- Steady-state-1D-and-2D-Part- I

• Equations (a) to (f) have to be solved simultaneously to get 6 nodal temperatures. Of course, in this case temp. at node '0' is already

Here, q M q g

Then, for M = 5, we get:

2 T 4. 2.8 T 5

. 16 80 0 .....(f)

Aug. 2016 MT/SJEC/M.Tech. 46

course, in this case temp. at node '0' is already known.

• We shall discuss the different methods of solving coupled algebraic equations, later.

• But, now, we will use 'Solve block' of Mathcad to solve these 6 equations simultaneously.

Page 47: Numerical methods- Steady-state-1D-and-2D-Part- I

• We start with assumed or trial values for all the variables i.e. for the temperatures at nodes 1 to 5.

• Then, in the solve block, immediately below 'Given' write all the constraint equations. Then, the command 'Find(T0,T1,T2...T5)' immediately gives a vector of temperature values:

T 1 50 T 2 50 T 3 50 T 4 50 T 5 50 ....trial values of temperatures

Given

Aug. 2016 MT/SJEC/M.Tech. 47

T 0 40 C....by data.....(a)

T 0 2 T 1. T 2 16 0 .....(b)

T 1 2 T 2. T 3 16 0 ....(c)

T 2 2 T 3. T 4 16 0 ....(d)

T 3 2 T 4. T 5 16 0 .....(e)

2 T 4. 2.8 T 5

. 16 80 0 .....(f)

Page 48: Numerical methods- Steady-state-1D-and-2D-Part- I

Temp Find T 0 T 1, T 2, T 3, T 4, T 5, ...'Temp' is the vector containing values of temperatures T0, T1 ...T5

Therefore,

Temp

40

93.333

130.667

152

157.333

=T 0 40 C

C

Aug. 2016 MT/SJEC/M.Tech. 48

157.333

146.667

i.e. Temperatures at different nodes are:

T 1 93.333 C

T 2 130.667 C

T 3 152 C

T 4 157.333 C

T 5 146.667 C

Page 49: Numerical methods- Steady-state-1D-and-2D-Part- I

• Same result is obtained if we solve these eqns by Engineering Equation Solver (EES) too:

• Enter the eqns. In the ‘Equations Window’ – press ^F to see Formatted eqns – and, press F2; Results appear in the ‘Solution Window’, as shown below:

Aug. 2016 MT/SJEC/M.Tech. 49

Page 50: Numerical methods- Steady-state-1D-and-2D-Part- I

Plot temp. distribution with EES:

Aug. 2016 MT/SJEC/M.Tech. 50

Page 51: Numerical methods- Steady-state-1D-and-2D-Part- I

• To draw the temp. distribution with Mathcad:

• In the above, temperatures at various nodes are contained in vector 'Temp'.

• In Mathcad, elements of the vector are generally counted starting from zero. i.e. zeroth element of vector Temp gives value of T0 = 40, element numbered 1 gives value of T1 = 93.333 , and so on.

Aug. 2016 MT/SJEC/M.Tech. 51

on.• To draw the graph, first we define a range

variable i = 0 to 5. Then choose x-y graph from the graph pallete and on the x-axis place holder fill up ‘i’ and in the y-axis place holder fill up ‘Tempi’.

• Click anywhere outside the graph and immediately the graph appears.

Page 52: Numerical methods- Steady-state-1D-and-2D-Part- I

i 0 1, 5.. ...define the range variable i, varying from 0 to 5 with an increment of 1

Aug. 2016 MT/SJEC/M.Tech. 52

Page 53: Numerical methods- Steady-state-1D-and-2D-Part- I

• (b) When left surface is insulated:• Now, the node '0' is on an insulated boundary. Difference

equation for node '0' is obtained now, treating it as an internal node if the insulated surface is imagined to be a mirror i.e. node '1' extends to the left of node '0' and eqn. (8.8) is applicable.

i.e. Tm 1

2 Tm

. Tm 1

q m ∆x( )2.

k0 .......(8.8)

Aug. 2016 MT/SJEC/M.Tech. 53

For m = 0: T 1 2 T o. T 1

q g ∆x( )2.

k0

From mirror image concept: T 1 T 1

Therefore, for node '0', we get: 2 T 1. 2 T 0

. 16 0 .....(a')

Page 54: Numerical methods- Steady-state-1D-and-2D-Part- I

• Equations for other nodes remain unchanged.

• Therefore, solving eqn (a') along with (b),(c),(d),(e) and (f) simultaneously will give the temperatures at nodes 0 to 5.

• Use ‘Solve block'to solve the set of algebraic equations (a') to (f)

Aug. 2016 MT/SJEC/M.Tech. 54

algebraic equations (a') to (f) simultaneously, in Mathcad. Start with assumed or trial values of temperatures:

Page 55: Numerical methods- Steady-state-1D-and-2D-Part- I

T 0 50 T 1 50 T 2 50 T 3 50 T 4 50 T 5 50 ....trial values of temperatures

Given

2 T 1. 2 T 0

. 16 0 .....(a')

T 0 2 T 1. T 2 16 0 .....(b)

T 1 2 T 2. T 3 16 0 ....(c)

Aug. 2016 MT/SJEC/M.Tech. 55

T 2 2 T 3. T 4 16 0 ....(d)

T 3 2 T 4. T 5 16 0 .....(e)

2 T 4. 2.8 T 5

. 16 80 0 .....(f)

Temp Find T 0 T 1, T 2, T 3, T 4, T 5, ...'Temp' is the vector containing values of temperatures T0, T1 ...T5

Page 56: Numerical methods- Steady-state-1D-and-2D-Part- I

Therefore,

Temp

500

492

468

428

372

300

=T 0 500 C

T 1 492 C

Aug. 2016 MT/SJEC/M.Tech. 56

i.e. Temperatures at different nodes are:T 2 468 C

T 3 428 C

T 4 372 C

T 5 300 C

Page 57: Numerical methods- Steady-state-1D-and-2D-Part- I

• Same result is obtained if we solve these eqns by Engineering Equation Solver (EES) too:

• Enter the eqns. In the ‘Equations Window’ –press ^F to see Formatted eqns – and, press F2; Results appear in the ‘Solution Window’, as shown below:

Aug. 2016 MT/SJEC/M.Tech. 57

Page 58: Numerical methods- Steady-state-1D-and-2D-Part- I

Plot temp. distribution with EES:

Aug. 2016 MT/SJEC/M.Tech. 58

Page 59: Numerical methods- Steady-state-1D-and-2D-Part- I

• Let us compare these values with those obtained from analytical solution.

• Analytical solution for temp. distribution is:

T x( )q g L2.

2 k.1

x

L

2.

q g L.

hT a .....(k)

Then, temperatures at nodes '0' to 5 are obtained by putting corresponding x values in T(x)::

Temperatures fromAnalytical solution

Temperatures from numerical solution

Aug. 2016 MT/SJEC/M.Tech. 59

Node 0: T 0( ) 500= C T 0 500 C

Node 1: T 0.002( ) 492= C T 1 492 C

Node 2: T 0.004( ) 468= C T 2 468 C

Node 3: T 0.006( ) 428= C T 3 428 C

Node 4: T 0.008( ) 372= C T 4 372 C

Node 5: T 0.01( ) 300= C T 5 300 C

Page 60: Numerical methods- Steady-state-1D-and-2D-Part- I

• So, we see that values of temperatures obtained by numerical methods match extremely well with the values obtained by 'exact' analytical solution.

• i.e. even with only 5 equal divisions

Aug. 2016 MT/SJEC/M.Tech. 60

• i.e. even with only 5 equal divisions of the slab, we get very accurate solution by numerical method.

Page 61: Numerical methods- Steady-state-1D-and-2D-Part- I

• Homework:• Example 8.2: Consider a slab of thickness, L = 1

cm. Thermal conductivity of the slab material varies linearly with temperature as: k(T) = 26.679 (1 + 8.621 x 10-4 T), W/(m.C), where T is in deg. C. Surface at x = 0 is insulated and the other surface at x = L is subjected to a convection heat transfer with a fluid at 100 C with a heat transfer coeff. of 4000

Aug. 2016 MT/SJEC/M.Tech. 61

with a heat transfer coeff. of 4000 W/(m2.C).There is uniform internal heat generation in the slab at a rate of 8 x 107 W/m3. Dividing the slab into 5 equally spaced sub-regions, find the temperatures at the different nodes. Assume one-dimensional, steady state conduction.

Page 62: Numerical methods- Steady-state-1D-and-2D-Part- I

• Example 8.3: A straight fin of rectangular cross-section has length L = 3 cm, thickness t = 0.5 cm and width w = 10 cm. Thermal conductivity of fin material, k = 20 W/(m.C). Temperature at the base of the fin is T0 = 200 C and there is negligible heat transfer from the tip of the fin. The fin dissipates heat from its surfaces into the surroundings at 25 C with a heat transfer coeff. of 15 W/(m2.C). Using the finite difference

Aug. 2016 MT/SJEC/M.Tech. 62

of 15 W/(m2.C). Using the finite difference method with 10 equally spaced sub-divisions, each of length �x = 0.3 cm, determine:

• (a) temperatures at the nodes• (b) rate of heat transfer from the fin, and• (c) fin efficiency

Page 63: Numerical methods- Steady-state-1D-and-2D-Part- I

• Solution:

Aug. 2016 MT/SJEC/M.Tech. 63

Note that there are 11 nodes, numbered as: 0,1,2,3,4,…10. Out ofthese, nodes '0'and '10'are boundary nodes and the other nodesare internal nodes. Temperature of node '0'is given, i.e. T0 = 200 C.

Page 64: Numerical methods- Steady-state-1D-and-2D-Part- I

• Fig. Ex. 8.3 shows the schematic of finite difference nodes for this problem.

Aug. 2016 MT/SJEC/M.Tech. 64

Page 65: Numerical methods- Steady-state-1D-and-2D-Part- I

• Difference equations for internal nodes:• Consider a typical internal node 'm' and write an energy balance for

the differential volume represented by node 'm'. Remember that all heat flows are into the control volume.

k A c.

Tm 1 Tm

∆ x. k A c

.Tm 1 Tm

∆ x. h 2 w. 2 t.( ) ∆ x.( ). T a T m

. 0

i.e. Tm 1 2 Tm. Tm 1

2 h. w t( ). ∆ x( )2. T a T m

.

k A c.

0 ....eqn. (A)

Aug. 2016 MT/SJEC/M.Tech. 65

c

Eqn. (A) gives the finite difference equation for the internalnodes, m = 1,2,....9.

We have:

Tm 1 2 Tm. Tm 1

2 h. w t( ). ∆ x( )2. T a T m

.

k A c.

0 ....eqn. (A)

Putting m =1 etc.,

Page 66: Numerical methods- Steady-state-1D-and-2D-Part- I

Node 1: T 0 2 T 1. T 2 2.835 10 3. T 1

. 0.071 0 .....(b)

Node 2: T 1 2 T 2. T 3 2.835 10 3. T 2

. 0.071 0 .....(c)

Node 3: T 2 2 T 3. T 4 2.83510 3. T 3

. 0.071 0 .....(d)

Node 4: T 3 2 T 4. T 5 2.83510 3. T 4

. 0.071 0 .....(e)

Node 5: T 4 2 T 5. T 6 2.83510 3. T 5

. 0.071 0 .....(f)

Aug. 2016 MT/SJEC/M.Tech. 66

Node 6: T 5 2 T 6. T 7 2.83510 3. T 6

. 0.071 0 .....(g)

Node 7: T 6 2 T 7. T 8 2.835 10 3. T 7

. 0.071 0 .....(h)

Node 8: T 7 2 T 8. T 9 2.835 10 3. T 8

. 0.071 0 .....(i)

Node 9: T 8 2 T 9. T 10 2.835 10 3. T 9

. 0.071 0 .....(j)

Page 67: Numerical methods- Steady-state-1D-and-2D-Part- I

• Difference equations for boundary nodes:• For node '0': By data, temp. of node '0' is the temp. of base surface:

i.e. T 0 200 C.........(a)

For node 10: Consider the half-volume surrounding node '10' and write the energy balance, with all heat flow lines into the volume:

k A c.

T 9 T 10

∆ x. h 2 w. 2 t.( )

∆ x

2.. T a T 10

. 0

Aug. 2016 MT/SJEC/M.Tech. 67

c ∆ x 2 a 10

i.e. T 9 T 10h w t( ). ∆ x( )

2.

k A c.

T a T 10. 0

i.e. T 9 T 10 1.418 10 3. T 10. 0.035 0 .....(k)

Page 68: Numerical methods- Steady-state-1D-and-2D-Part- I

• Equations (a) to (k) give 10 equations for the 10 node temperatures. Solving these equations simultaneously, we get the node temperatures.

• We use ‘Solve block'of Mathcad to solve these equations.

• We start with assumed or trial values for all the variables i.e. for the temperatures at nodes 0 to

Aug. 2016 MT/SJEC/M.Tech. 68

variables i.e. for the temperatures at nodes 0 to 10. Then, in the solve block, immediately below 'Given' write all the constraint equations. Then, the command 'Find(T0,T1,T2...T10)' immediately gives a vector of temperature values:

Page 69: Numerical methods- Steady-state-1D-and-2D-Part- I

Aug. 2016 MT/SJEC/M.Tech. 69

Page 70: Numerical methods- Steady-state-1D-and-2D-Part- I

Aug. 2016 MT/SJEC/M.Tech. 70

Temp Find T 0 T 1, T 2, T 3, T 4, T 5, T 6, T 7, T 8, T 9, T 10,

Page 71: Numerical methods- Steady-state-1D-and-2D-Part- I

...'Temp' is the vector containing values of temperatures T0, T1 ...T10Therefore,

Temp

00

1

2

3

4

5

6

7

8

200

195.707

191.899

188.563

185.691

183.274

181.306

179.78

178.694

=

Aug. 2016 MT/SJEC/M.Tech. 71

8

9

10

178.694

178.043

177.826

Page 72: Numerical methods- Steady-state-1D-and-2D-Part- I

• Same result is obtained if we solve these eqns by Engineering Equation Solver (EES) too:

• Enter the eqns. In the ‘Equations Window’ – press ^F to see Formatted eqns – and, press F2; Results appear in the ‘Solution Window’, as shown below:

Aug. 2016 MT/SJEC/M.Tech. 72

Page 73: Numerical methods- Steady-state-1D-and-2D-Part- I

Plot the temp. distribution with EES:

Aug. 2016 MT/SJEC/M.Tech. 73

Page 74: Numerical methods- Steady-state-1D-and-2D-Part- I

• Analytical solution: For the case of a fin, with an insulated end, analytical expression for temp. distribution along the length is:

For fin: P 2 w. 2 t. ....perimeter, and mh P.

k A c.

i.e. m 17.748= 1/m....fin parameter

T x( ) T a T 0 T acosh m L x( ).( )

cosh m L.( ). ....temp. distribn. in a fin with insulated end

Temperatures fromAnalytical solution

Temperatures from numerical solution

Node 0: T 0( ) 200= T 0 200 C

Node 1: T 0.003( ) 195.706= T 1 195.707 C

Node 2: T 0.006( ) 191.896= T 191.899 C

Aug. 2016 MT/SJEC/M.Tech. 74

Node 2: T 0.006( ) 191.896= T 2 191.899 C

Node 3: T 0.009( ) 188.559= T 3 188.563 C

Node 4: T 0.012( ) 185.686= T 4 185.691 C

Node 5: T 0.015( ) 183.269= T 5 183.274 C

Node 6: T 0.018( ) 181.3= T 6 181.306 C

Node 7: T 0.021( ) 179.775= T 7 179.78 C

Node 8: T 0.024( ) 178.688= T 8 178.694 C

Node 9: T 0.027( ) 178.038= T 9 178.043 C

Node 10: T 0.03( ) 177.821= T 10 177.826 C

Page 75: Numerical methods- Steady-state-1D-and-2D-Part- I

• We observe that values of temps. obtained by numerical methods match extremely well with the values obtained by 'exact' analytical solution. i.e. with only 10 equal divisions of the fin length, we get very accurate solution by numerical method.

Heat transferred by the fin, Q fin:

Qfin must be equal to the amount of heat entering into the fin at its base.Write the heat balance for the half- volume around node '0':

Q finT 1 T 0

h 2 w. 2 t.( ). ∆ x. T a T 0. 0

Aug. 2016 MT/SJEC/M.Tech. 75

Q fin ∆ x

k A c.

h 2 w. 2 t.( ).2

. T a T 0. 0

i.e. Q finT 0 T 1

∆ x

k A c.

h 2 w. 2 t.( ). ∆ x

2. T a T 0

.

i.e. Q fin 15.137= W.....Ans.

Page 76: Numerical methods- Steady-state-1D-and-2D-Part- I

• Fin efficiency is the ratio of actual heat transferred by the fin to the max. heat that would be transferred if the entire fin surface were at the base temp.

η fQ fin

Q max

Q max h 2 w. 2 t.( ). L. T 0 T a. W....max. heat tr., if the entire fin were at base temp.

Aug. 2016 MT/SJEC/M.Tech. 76

i.e. Q max 16.538= W....max. heat tr. by fin

Therefore, η fQ fin

Q max

i.e. η f 0.915= = 91.5%....fin efficiency.....Ans.