Notes on Numerical Analysis Study on Heat Conduction

7
[Type text] Numerical Analysis Study on Heat Conduction (Notes on Reactor Hydrodynamics Lecture) This notes summarize a numerical method study for heat conduction. In this notes, the study limited to 1-D cases for the steady-state and the unsteady- state condition. Discussion about the steady 1-D condition continued by the unsteady condition which both finally derived to the discretized equation, including the boundary condition. In this notes, the fully implicit method is choosen as the method in unsteady problem while omitting the discussion about its superior characteristic compare with explicit or Crank-Nicholson method. Then the numerical solution of the linear algebraic equation which is the Tri Diagonal Matrix Algorithm, this algorithm is on progress to be coded. The programming flow given at the last part of the report. A. Steady 1-D Conduction Basic Equation and Discretization The governing differential equation explaining the steady 1-D conduction is (1) To discretize eq.1 above, the equation is integrated over the one dimensional integration volume as shown in the figure.1 Figure.1 One dimensional mesh discretization By integration we have (2) (3) By applying difference equation for point e and w, we have Tsdipura’s notes Page 1

Transcript of Notes on Numerical Analysis Study on Heat Conduction

Page 1: Notes on Numerical Analysis Study on Heat Conduction

[Type text]

Numerical Analysis Study on Heat Conduction

(Notes on Reactor Hydrodynamics Lecture)

This notes summarize a numerical method study for heat conduction. In this notes, the

study limited to 1-D cases for the steady-state and the unsteady-state condition. Discussion

about the steady 1-D condition continued by the unsteady condition which both finally

derived to the discretized equation, including the boundary condition. In this notes, the fully

implicit method is choosen as the method in unsteady problem while omitting the

discussion about its superior characteristic compare with explicit or Crank-Nicholson

method. Then the numerical solution of the linear algebraic equation which is the Tri

Diagonal Matrix Algorithm, this algorithm is on progress to be coded. The programming flow

given at the last part of the report.

A. Steady 1-D Conduction

Basic Equation and Discretization

The governing differential equation explaining the steady 1-D conduction is

(1)

To discretize eq.1 above, the equation is integrated over the one dimensional integration

volume as shown in the figure.1

Figure.1 One dimensional mesh discretization

By integration we have

(2)

(3)

By applying difference equation for point e and w, we have

Tsdipura’s notes Page 1

Page 2: Notes on Numerical Analysis Study on Heat Conduction

[Type text]

(4)

Then we arrange the variable as follow

The question can be written as

(5)

Where

Boundary Condition

For one dimensional problem, there is one grid point on each of the two boundaries. The

other grid points usually called the internal points (fig.2). A disretization equation like eq.2

can be written for each control volume involving internal points and we have the necessary

equations for all the unknown temperatures at the internal grid points. However,two

equation which involve the boundary point need additional condition. This condition

provided by boundary condition.

Typically, three kinds of boundary conditions are encountered in heat condition :

- Given boundary temperature, where no additional equation needed.

- Given boundary heat flux

- Boundary heat flux specified via a heat transfer coefficient and the temperature of the

surrounding fluid.

Except for the first boundary condition, we need to construct an additional equation for the

boundary point, TB. This equation achieved by integrating the differential equation over the

half control volume shown in the fig.2. ,

Figure.2. Boundary ‘half control volume’

The integration are as follow

Tsdipura’s notes Page 2

Page 3: Notes on Numerical Analysis Study on Heat Conduction

[Type text]

(6)

Knowing that the heat transfer are

(7)

We have

(8)

Further implementation of eq.8, depends on the boundary condition given. If the value of qB

itself is given, the required equation for TB becomes

(9)

where

And if the heat flux qB is given in terms of a heat transfer coefficient h and surrounding fluid

temperature Tf such that

(10)

Then the equation for TB becomes

(11)

(12)

Where

B. Unsteady 1-D Conduction

Tsdipura’s notes Page 3

Page 4: Notes on Numerical Analysis Study on Heat Conduction

[Type text]

Basic Equation and Discretization

The governing differential equation explaining the unsteady 1-D conduction is

(13)

In this phase of development, we assume to be constant. The task should be worked in

this problem can be stated as follow : given the grid-point values of T at time t, find the

values of T at time t+∆t.

The discretization equation derived by integrating eq.21 over the control volume as shown

in the fig.1. and over the time intercal from t to t+∆t as follow

(14)

For the left hand side, we shall assume that the value of T prevails throughout the control

volume to give

(15)

Where and are the value of T at time t and t+∆t, respectively. While for the right hand

side, as we already done in the steady case, we have

(16)

At this point we ned an assumption about how T value at each grid (TP,TE,TW for instance)

vary with time from from t to t+∆t. General formula which proposed is

(17)

Where f is a weighting factor between 0 and 1. Integrating eq.24 using formula from eq.25

become

Tsdipura’s notes Page 4

Page 5: Notes on Numerical Analysis Study on Heat Conduction

[Type text]

(18)

Rearranging eq.26, we have the same structure as we seen in the steady problem as follow

(19)

Where

Certain specific values of the weighting factor,f, bring the discretization equation reduces to

one of the well-known schemes for parabolic differential equations. In particular, f=0 leasd

to the explicit scheme, f=0.5 to the Crank-Nicholson scheme, and f=1 to the fully implicit

scheme.

At this report we choose the fully implicit scheme, f=1, so the differential equation become

as follow

(20)

Where

C. Solution of the Linear Algebraic Equations

The solution of the discretization equations for the one-dimensional situation turns into an

algorithm usually called Tri Diagonal Matrix Algorithm (TDMA). The TDMA refers to the fact

that when the matrix of the coefficient of these equations is written, all the element is zero

except the tridiagonal element of the matrix.

For convenience, we use different index for the discretized eq.5 (for the steady condition) or

eq.20 (for unsteady condition) as follow

(21)

For i=1,2,3,…N

Where we suppose that the grid points in fig.1 were numbered 1,2,3,…,N , with points 1 and

N denoting the boundary points. To account for the special form of the boundary-points

equations, let us set

Tsdipura’s notes Page 5

Page 6: Notes on Numerical Analysis Study on Heat Conduction

[Type text]

(22)

so that the temperatures T0 and TN+1 will not have any meaningful role to play. These

condition imply that T1 is known in terms of T2. For the equation for i=2, T2 is related to T1 ,

and T3 , but since T1 can be eliminated (expressed in terms of T2) that makes T2 can be

expressed in terms of T3. This elimination can be continued until TN is formally expressed in

terms of TN+1 , but since TN+1 has no meaningful existence ( value is zero) we actually obtain

the numerical value of TN at this stage. This process called forward elimination. After having

TN, we can trace back to obtain TN-1 from TN , TN-2 from TN-1, and so on until we have T1 from T2

which means that we already solve the problem. The later process called back substitution.

In forward elimination process we seek a relation

(23)

After we have just obtained

(24)

Substitution of eq.16 to eq.13 leads to

Which can be arrange to look like eq.15, and we have the recurrence relations

(25)

(26)

For the first grid point, i=1, where we start the recurrence process we have

(27)

While in the last grid point, i=N, because bN=0 we have

(28)

Where we can start the back substitution using eq.24.

D. Programming Flow

Tsdipura’s notes Page 6

Page 7: Notes on Numerical Analysis Study on Heat Conduction

[Type text]

In the programming code the procedure will be as follow

Input :

- Geometrical input : material length, mesh number or mesh width

- Material input : material conductivity (k), heat capacity (c), heat source density (S)

- Time mesh, ∆t, for unsteady problem

- Boundary condition and initial condition

Preliminary calculation :

- Calculation of ai, bi, ci, di from the above input. (as in eq.5 an eq.20 for steady and

unsteady problem, respectively)

Start the TDMA procedure.

- Calculate P1 and Q1 from eq.27

- Calculate Pi and Qi for i=1,2,3,…,N using the recurrence relation of eq. 25 and eq.26

- Set eq.28

- Calculate TN-1 ,TN-2,…,T2, T1 using eq.24

Tsdipura’s notes Page 7