Page 59 - Introduction to Computational Fluid Dynamics
P. 59

P1: IWV/ICD
                                                                                                10:49
                                        0 521 85326 5
                                                                                   May 25, 2005
                           CB908/Date
            0521853265c02
                     38
                            2.8 Methods of Solution                            1D HEAT CONDUCTION
                            When coefficients AE i , AW i , and AP i are calculated and Su i and Sp i are suitably
                            updated to account for the effects of source linearization, boundary conditions, and
                            underrelaxation, we are ready to solve the set of equations (2.43) at an iteration
                            level l + 1. There are two extensively used methods for solving such equations.
                            2.8.1 Gauss–Seidel Method

                            The Gauss–Seidel (GS) method is extremely simple to implement on a computer.
                            The main steps are as follows:

                            1. At a given iteration level l, calculate coefficients AE, AW, AP, Su, and Sp
                                                 l
                               using temperature T for i = 2to N − 1
                            2. Hence, execute a DO loop:

                               100      FCMX = 0
                                      DO1I=2,N-1
                                      TL = T(I)
                                      ANUM = AE(I) T(I+1) + AW(I) T(I-1) + SU(I)
                                                   ∗
                                                                   ∗
                                      ADEN = AE(I) + AW(I) + SP(I)
                                      T(I) = ANUM / ADEN
                                      FC = (T(I) - TL) / TL
                                      IF (ABS(FC).GT.FCMX) FCMX = ABS(FC)
                               1      CONTINUE

                            3. If FCMX > CC, go to step 1.

                               The method is also called a point-by-point method because each node i is visited
                            in succession. The method is very reliable but requires a large number of iterations
                            and hence considerable computer time, particularly when N is large.


                            2.8.2 Tridiagonal Matrix Algorithm

                            In the tridiagonal matrix algorithm (TDMA), Equation 2.43 is rewritten as
                                                    T i = a i T i+1 + b i T i−1 + c i ,        (2.69)

                            where

                                            AE i                AW i                 Su i
                                    a i =          ,     b i =         ,     c i =         .   (2.70)
                                          AP i + Sp i         AP i + Sp i         AP i + Sp i
                               Note that since Sp i ≥ 0, a i and b i can only be fractions. Equation 2.69 represents
                            (N − 2) simultaneous algebraic equations. In matrix form, these equations can be
                            written as [A] [T] = [C], where the coefficient matrix [A] will appear as shown
   54   55   56   57   58   59   60   61   62   63   64