Page 202 - Numerical Methods for Chemical Engineering
P. 202

Accuracy and stability of single-step methods                       191



                  that are continually introduced do not accumulate but remain manageable, as their effects
                  become less and less important at later times. By contrast, if any |µ j | > 1, round-off errors
                  grow exponentially and may drown out the true response with random noise.


                  Stiff systems from discretized PDEs

                  These issues of stability and error rejection become very important for stiff systems, as
                  the time step must be chosen to accommodate the largest eigenvalue (fastest mode). We
                  have seen above an example of a stiff system from chemical kinetics, but another important
                  source of stiff systems is the simulation of time-dependent PDEs such as the diffusion
                  equation
                                                        2
                                                  ∂ϕ   ∂ ϕ
                                                     =                              (4.173)
                                                  ∂t   ∂x 2
                  The finite difference method yields the linear ODE system, ϕ j ≡ ϕ(x j ),
                                                                  1
                                  dϕ j   ϕ j−1 − 2ϕ j + ϕ j+1
                                      =                    ˙ ϕ =−     Aϕ
                                   dt         ( x) 2            ( x) 2
                                                                      
                                                   2  −1
                                                 −1   2   −1          
                                                
                                                                       
                                                      −1    2   ...                 (4.174)
                                                                      
                                            A =                       
                                                           ...  ...
                                                                      
                                                                   −1 
                                                               −1    2
                  The eigenvalues and eigenvectors Aw [k]  = λ k w [k]  of this diffusion matrix are

                                  kπ                    kπ j
                             2                [k]
                     λ k = 4 sin             w  j  = sin         k = 1, 2,..., N    (4.175)
                                2(N + 1)               N + 1
                  The largest (fastest mode) eigenvalue occurs for k = N,

                                     Nπ              [N]      Nπ j
                                2
                       λ N = 4 sin          ≈ 4    w  j  = sin      ≈ sin(π j)      (4.176)
                                   2(N + 1)                   N + 1
                  The wavelength of this eigenvector is the spacing of the grid; i.e., it describes variations on
                  the smallest length scale that can be resolved by the grid (Figure 3.5). The smallest (slowest)
                  eigenvalue occurs for k = 1,
                                                      2
                                  π              π         π    [1]       π j

                             2
                     λ 1 = 4 sin         ≈ 4            =      w  j  = sin          (4.177)
                               2(N + 1)       2(N + 1)    N  2           N + 1
                  The slowest mode eigenvector describes variations across the entire domain on the largest
                  length scale that can be resolved by the grid.
                    The condition number in the limit of large N is
                                                         4N 2
                                                   λ N
                                               κ =    ≈                             (4.178)
                                                   λ 1    π
                  Unless the number of grid points is very small, the set of first order ODEs obtained from
                  discretizing a partial differential equation is very stiff.
   197   198   199   200   201   202   203   204   205   206   207