Page 137 - Computational Fluid Dynamics for Engineers
P. 137

4.5  Finite-Difference  Methods  for  Elliptic  Equations             123



               DO 30 L=1,II
               ELEMENTS OF DELTA MATRIX, SEE EQ.  (4.4.20C)
               DELTA(K,L,J) = DELTA(K,L,J)-BM(L,K)*E(L,J-1)
               ELEMENTS OF W-VECTOR, SEE EQ.  (4.4.21B)
               W(K,J) = W(K,J) -BM(L,K) *W(L,J-1)
           30 CONTINUE

              BACKWARD  SWEEP
              DO 80 K=l,II
               UT(K) = W(K,JJ)
               DO 80 L=1,II
                 DM(K,L) = DELTA(K,L,JJ)
           80 CONTINUE
              SEE  EQ.  (4.4.22A)
              CALL  GAUSS(II,1,DM,UT)
              SEE  EQ.  (4.4.22B)  ", "
              DO 90 J=JJ-1,1,-1
               DO 100 K=l,II
                  U(K, J+l) = UT(K)
                  UT(K) = W(K,J)-E(K,J)*U(K,J+1)
                  DO 100  L=l, II
                   DM(K,L) = DELTA(K,L,J)
          100  CONTINUE
               CALL  GAUSS(II,1,DM,UT)
           90 CONTINUE
              DO 110 K=1,II
               U(K,1) = UT(K)
          110 CONTINUE
              RETURN
              END



         be taken  to ensure that  sufficient  accuracy  is obtained  in  a  "reasonable"  number
         of  iterations.
            A  useful  point-iteration  method  is  the  Gauss-Seidel  or  successive  iteration
         method;  the  Laplace  difference  equations  are  written  as

              U       Ux  U       U        U  U      +  U         h
               hj   ~    \ i-lJ  + i+lj)  + V  \ iJ-l  hj+l)    ° ^       (4  5  27)
                                       /
                               1  <  i  < ,  1 <  j  <  J
         In  this  scheme  the  evaluation  of  the  new  iterates  is  not  completely  arbitrary.
         First  compute  u ^  and  then,  in  order,  the  other  elements  on  the  coordi-
         nate  lines  with  j  =  1.  Next,  u^ 2  is  determined,  etc.  By  slight  changes  in
         the  scheme,  the  calculations  could  start  at  either  of the  other  three  corners  of
         the  rectangle  (Fig.  4.7).  However,  all  of  these  methods  have  the  same  rate  of
         convergence.
            The  rate  of  convergence  for  the  Gauss-Seidel  scheme  is

                                      2
                                                         4
                                  =  26 TT 2  ( 1  +  1 )  +  0(6 )       (4.5.28)
                              R GS
   132   133   134   135   136   137   138   139   140   141   142