Page 426 - Applied Numerical Methods Using MATLAB
P. 426

HYPERBOLIC PDE  415
              In order for this equation to be solvable, the boundary conditions u(0,t) =
            b 0 (t) and u(x f ,t) = b xf (t) as well as the initial conditions u(x, 0) = i 0 (x) and

            ∂u/∂t| t=0 (x, 0) = i (x) should be provided.
                            0
            9.3.1  The Explicit Central Difference Method
            In the same way as with the parabolic PDEs, we replace the second derivatives
            on both sides of Eq. (9.3.1) by their three-point central difference approximation
            (5.3.1) as
                       k
                                          k
               u k i+1  − 2u + u k i−1  u k+1  − 2u + u k−1  x f      T
                       i
             A                 =  i       i   i    with  x =   , t =     (9.3.2)
                      x 2               t 2                  M        N
            which leads to the explicit central difference method:
                                                                   t 2
                 k+1
                                                 k−1
                               k
                         k
                                             k
               u    = r(u   + u  ) + 2(1 − r)u − u      with r = A       (9.3.3)
                 i       i+1   i−1           i   i                  2
                                                                   x
                     −1                                       1
              Since u  = u(x i , − t) is not given, we cannot get u directly from this
                     i                                        i
            formula (9.3.3) with k = 0:
                                                        0
                             1
                            u = r(u 0  + u 0  ) + 2(1 − r)u − u −1       (9.3.4)
                             i      i+1   i−1           i   i
            Therefore, we approximate the initial condition on the derivative by the central
            difference as                  −1
                                       1
                                      u − u
                                       i   i  = i (x i )                 (9.3.5)

                                        2 t      0
                                        −1
            and make use of this to remove u  from Eq. (9.3.3):
                                        i
                        1
                                                  0
                                                        1

                       u = r(u 0  + u 0  ) + 2(1 − r)u − (u − 2i (x i ) t)
                        i     i+1   i−1           i     i    0
                            1
                        1       0     0            0
                       u =   r(u   + u  ) + (1 − r)u + i (x i ) t        (9.3.6)
                        i       i+1   i−1          i   0
                            2
                                                                   1
              We use Eq. (9.3.6) together with the initial conditions to get u and then go
                                                                   i
            on with Eq. (9.3.3) for k = 1, 2,.... Note the following facts:
              ž We must have r ≤ 1 to guarantee the stability.
              ž The accuracy of the solution gets better as r becomes larger so that  x
                decreases.
            It is therefore reasonable to select r = 1.
              The stability condition can be obtained by substituting Eq. (9.2.4) into
            Eq. (9.3.3) and applying the Jury test [P-3]:
                                              2
                                        −1
             λ = 2r cos(π/P ) + 2(1 − r) − λ ,  λ + 2(r(1 − cos(π/P )) − 1)λ + 1 = 0
   421   422   423   424   425   426   427   428   429   430   431