Sie sind auf Seite 1von 3

Eng9977 - CFD Appendix

1
1.1

Program Hints
How to Test a TDMA
For nodes i = 1 ! n: 1. Dene a temperature distribution, i.e. specify the values of Ti . 2. Specify the values of the coe cients aEi and aWi . 3. Set: aPi = aEi + aWi 4. Dene: bi = aPi Ti aEi Ti+1 aWi Ti
1

This is a re-arranged version of the discretized equation for one-dimensional heat conduction. The bi terms have been dened such that all discretized equations will be satised when the correct T distribution is used. 5. Set the T eld to some incorrect value. 6. Solve using the TDMA. The solver should return the initially specied T distribution.

1.2

Using a TDMA in Two-Dimensions


The discretized equations for two-dimensional heat conduction have the following form: aPi;j Ti;j = aEi;j Ti+1;j + aNi;j Ti;j +1 + aWi;j Ti
1;j

+ aSi;j Ti;j

+ bi;j

Note: the equation becomes tridiagonal along an i line when o-line terms are lumped into a b term: aPi;j Ti;j = aEi;j Ti+1;j + aWi;j Ti 1;j + bi;j where: bi;j = bi;j + aNi;j Ti;j +1 + aSi;j Ti;j The T terms are the latest available values. A TDMA can be used on each i line with latest available o-line terms lumped into b . The solver would have to include iterations as the tridiagonal form of the discretized equation at each node would not be strictly correct as incorrect (or unconverged) values of o-line temperatures are included.
1

Eng9977 - CFD Appendix

The convergence rate of the solver can be increased by following the same procedure for the j lines: aPi;j Ti;j = aNi;j Ti;j +1 + aSi;j Ti;j 1 + bi;j where: bi;j = bi;j + aEi;j Ti+1;j + aWi;j Ti
1;j

and a TDMA would be used on each j line with latest available o-line terms lumped into b .

The sweeps of the i and j lines would continue until a converged solution is obtained.

1.3

How to Test a Two-Dimensional TDMA


For nodes i = 1 ! n, j = 1 ! m:

1. Dene a temperature distribution, i.e. specify the values of Ti;j . 2. Specify the values of the coe cients aEi;j , aNi;j ; aWi;j and aSi;j . 3. Set: aPi;j = aEi;j + aNi;j + aWi;j + aSi;j 4. Dene: bi;j = aPi;j Ti;j aEi;j Ti+1;j aNi;j Ti;j +1 aWi;j Ti
1;j

aSi;j Ti;j

This is a re-arranged version of the discretized equation for two-dimensional heat conduction. The bi;j terms have been dened such that all discretized equations will be satised when the correct T distribution is used. 5. Set the T eld to some incorrect value. 6. Solve using the TDMA. The solver should return the initially specied T distribution.

Eng9977 - CFD Appendix

1.4

How to Test a 1D Steady-State Heat Conduction Program


So...you have written your program to solve steady-state one-dimensional heat conduction problems. Does it work? Before applying your program to a problem (or trying to sell it) you have to be sure it works. To validate the program you can test it against known solutions: h(1)
W m2 C 1010

1010 1010 1010 1010 1010 50 10 1010 10 10

Tf (1) ( C) 0 100 100 0 100 100 0 20 100 0

h(n)

W m2 C 1010

1010 1010 1010 1010 1010 10 50 10 10 100

Tf (n) ( C) 0 100 0 100 100 100 20 0 1012 0

W m C

q _

W m3

100 100 100 100 100 100 100 100 100 100

0 0 0 0 105 105 0 0 105 105

The analytical solution is:

T (x) =

qL _ 2 2k

x2 L2

Ts;2

Ts;1 x Ts;1 + Ts;2 + 2 L 2

(1)

when the two surface temperatures, Ts;1 and Ts;2 are known. For a convection boundary condition the same expression can be used but the surface temperatures are dened through energy balances at the two surfaces: h1 (T1;1 h2 (Ts;2 And for a specied heat ux:
" qs; 1 =

Ts;1 ) =

qL _

T1;2 ) = qL _

k (Ts;2 Ts;1 ) 2L k (Ts;2 Ts;1 ) 2L

(2)

qL _

" qs; _ 2 = qL

k (Ts;2 Ts;1 ) 2L k (Ts;2 Ts;1 ) 2L

(3)

Das könnte Ihnen auch gefallen