Page 47 - Process Modelling and Simulation With Finite Element Methods
P. 47

34          Process Modelling and Simulation with Finite Element Methods

         This assumes that the derivative does not change over the step of size h, which is
         only actually true for a linear function.  For any function with curvature, this is a
         lousy assumption.  Consider, for instance, how far wrong we go with a large step
         size  in  Figure  1.2.  So  clearly,  one  important  point  in  improving  on  Euler’s
         Method  is  to  be  able  to  use  big  steps,  since it requires  small  steps  for good
          accuracy.  Euler’s  method  is  called  “first  order”  accurate,  as  the  error  only
         decreases as the first power of h.
                                                I





                                4   1-2   I   2    4


                       Figure 1.2 Curvature effects are lost in the Euler  method.
         Runge-Kutta methods

          So if we want to use big step sizes, we need a “higher order method”, one that
         reduces the error faster as step size decreases.  A k-th order method  has  error
         which  diminishes  as  hk.  Given  that  it  is  curvature  that  we  know  we  are
         neglecting,  we  can  estimate  the  curvature of  the  graph  y(x)  by  evaluating  the
          slope f(x)  at  several  intermediate points  between  x,  and  xn+1.  Second  order
         accuracy is obtained  by  using  the initial derivative to estimate a point halfway
         across the interval, then using the midpoint derivative across the full width of the
         interval.




                                                                      (1.11)

                             Yn+l - - yn +k, +0(h3)

         The upshot is that by making two function evaluations, we have  saved a whole
         order in  accuracy.  So, for instance, with  a first order method,  N  calculations
          gives us an error O(l/N), but for a second order method, 2N calculations gives
          us error O( 1/4N2).  It would take N2 calculations to do so well with a first order
         method.
         Higher order Runge-Kutta methods

          Can we do better?  Clearly, we can use a three midpoint method to achieve third
          order accuracy, a four midpoint method  for fourth order accuracy, etc.  When
   42   43   44   45   46   47   48   49   50   51   52