Page 184 - Computational Fluid Dynamics for Engineers
P. 184

5.8  Numerical  Dissipation  and  Dispersion:  Artificial  Viscosity  171



         accuracy  determined  by  the  truncation  and  round-off  errors,  it  is  useful  to  dis-
         cuss  the  numerical  dissipation  and  dispersion  errors  these  equations  have.  The
         numerical  dissipation  arises  as  a result  of the  even  derivative  term  that  appears
         in the truncation  error  and  the  numerical  dispersion  arises as  a result  of the  odd
         derivative  term  that  appears  in  the  truncation  error.  The  numerical  solutions
         can be distorted  by either  (or both)  of these errors. With the concept  of  artificial
         viscosity,  however,  the  stability  of the  numerical  solutions  can  be  improved,  as
         will  be  discussed  in  Chapters  10 and  12.
            Consider  the  one-dimensional  wave  equation  given  by  Eq.  (5.1.1), that  is
                                  du     du
                                            =  0   c>  0                    (5.1.1)
                                  dt     dx
         Using  a  first-order  forward  difference  in  time  and  a  first-order  backward  differ-
         ence  in  space,  this  equation  can  be  written  as
                                ,n+l   nin
                                U,           W
                                          + c-         =  0                (5.8.1)
                                   At            Ax
         This  is  a  first-order  accurate  method  with  truncation  error  of  0(At,  Ax).
            We  use  Taylor's  series  expansion,  see  Eq.  (4.3.1),  and  write


             ,n+l             At  +                                       (5.8.2a)
                    «' +   ai\         w).
                         (du\ n  .
                                          2
                                       &r J.    2                         (5.8.2b)
                 — u 4
            Substituting  the  above  relations  into  Eq.  (5.8.1)  and  rearranging,  we  get
                                                   3
             du\ n       (du\ n           At     d uY    {Atf    'cPuY    (Ax)
                                      2
                                                                     2
                                           2
             dt)i       C \dx) i    dt ).  ~2~   \dt 3  J     +  Ox ).  °  2
                                    3
                                   'd uY    (Ax)
                                      3
                                    dx  I    6                             (5.8.3)
         The  left-hand  side  of  this  equation  corresponds  to  Eq.  (5.1.1)  and  the  right-
        hand  side  is the truncation  error  associated  with  Eq.  (5.8.1). The  importance  of
        terms  in the  truncation  error  can  be  better  appreciated  if  we  first  differentiate
         Eq.  (5.8.3)  with  respect  to  t;  multiply  Eq.  (5.8.3)  with  c  after  differentiating
        with  respect  to  x  and  subtracting  the  resulting  equation  from  the  equation
         differentiated  with  respect  to  t,  we  obtain

                        2      U 2  u         3       3
                       d U  _  2 ,d i   At  d  u   +  d c  u   +0{At)
                       W   =  c  dx^  +  Y  W         Wo~x
                                                 3
                                        3
                                Ax     d u 2   2d u    _.  A  .
                              +      c^^-c —,+0(Ax)   3                    (5.8.4)
                                        2
                                      dx dt
                                                 dx
   179   180   181   182   183   184   185   186   187   188   189