Page 217 - Computational Fluid Dynamics for Engineers
P. 217

Problems                                                              205



                          u
                            ——J—W,      m=—,      77=—,    C =  T
                                 dx  fj,
         so that  Eqs.  (P6.1.1)  and  (P6.1.2)  can  be  written  as





                               du*{0,Q
                                        =  0,   «*(1,C)  =  0            (P6.1.4a)
                                  dr/
                               du*(j],0)
                                        =  0,   u*(»7,l)  =  0           (P6.1.4b)

         Compare  your  results  with  the  analytical  solution  given  by





         where
                             X n£=(2n+1)^,      n  =  0,1,2,...
         Take  m  — 2,  zi?7 =  zl£  =  0.002  and  a  convergence  criterion  of
                                        +1)          10 7
                                 max K^     -  "Wl  <  "                  (P6.1.6)
                                  i,j  '-7      '-7
        Note  that  Subroutine  GAUSS  (Table  4.2)  remains  unchanged.  Note  also  the
        subroutine  POISSON  requires  changes  given  below,
             SUBROUTINE  P0ISS0N(II,JJ,TX,TY,F,U)
             DIMENSION  A(100,100),B(100,100),C(100,100),D(100,100),E(100,100)
             DIMENSION  DELTA(100,100,100), DELTT(100,100),  BM(100,100)
             DIMENSION  DM(100,100),F(100,100),W(100,100),UT(100),U(100,100)
        C  ELEMENTS OF DIAGONAL  VECTORS  IN THE BLOCK MATRICES A,B AND C
             DO 5 1=1,11
             DO 5 J=1,JJ
               A(I,J) =  -TX
               B(I,J) = 1.
               C(I,J) = -TX
               D(I,J) = -TY
               E(I,J) = -TY
            5  CONTINUE
             DO 6 1=1,11
               B(I,1) = l.-4./3.*TY
               E(I,1) = -2./3.*TY
            6  CONTINUE
             DO 7 J=1,JJ
               B(1,J) = B(l,J)-4./3.*TX
               C(1,J) = -2./3.*TX
            7  CONTINUE

        The  remaining  statements  in this  subroutine  are the  same  as those  in  Table  4.3
        starting  with
   212   213   214   215   216   217   218   219   220   221   222