Page 315 - Numerical Methods for Chemical Engineering
P. 315

304     6 Boundary value problems



                   Weighted-residual methods and the Galerkin formulation of FEM

                   We now examine how the FEM solves transport-type PDEs such as (6.9) using an unstruc-
                   tured grid. First, we collect in the PDE all nonzero terms and bring them to one side of the
                   equation to define a residual function that is zero everywhere and at all times for the true
                   solution,
                                       ∂ϕ               2
                              R(t,r) =   + ∇ · (ϕv) −  ∇ ϕ − s(r, t,ϕ) = 0           (6.194)
                                       ∂t
                   We can multiply (6.194) by any weight function w(r) and integrate over the domain   to
                   obtain a weighted residual that similarly must be zero at all times for the true solution,

                                             ∂ϕ               2
                     '               '
                       w(r)R(t,r)dr =  w(r)     + ∇ · (ϕv) −  ∇ ϕ − s(r, t,ϕ) dr = 0  (6.195)
                                             ∂t

                   Let us consider the time-independent problem
                          '             '
                                                           2
                            w(r)R(r)dr =   w(r)[∇ · (ϕv) −  ∇ ϕ − s(r,ϕ)]dr = 0      (6.196)

                   Equation (6.196) forms the basis of a numerical method if we parameterize a trial form
                                             N
                   for ϕ(r) by some vector ϕ ∈   of coefficients ϕ p . In FEM, these coefficients are the
                   field values at each node p. We then choose N weight functions w p (r) to generate a set of
                   algebraic equations
                                                  '
                                           f p (ϕ) =  w p (r)R(r)dr = 0              (6.197)

                   What weight functions should we use? One choice originates from seeking to minimize the
                   integral
                                                            '
                                                         2         2
                                                     	R	 =    |R(r)| dr              (6.198)
                                                         2
                                       minimize {ϕ p }

                   for which the first-order optimality conditions yield
                                      2       '             '
                                 ∂ 	R	 2   ∂         2             ∂ R
                             0 =        =       |R(r)| dr = 2  R(r)   dr             (6.199)
                                  ∂ϕ p    ∂ϕ p                    ∂ϕ p

                   Thus, the least-squares weight functions are w p = ∂ R/∂ϕ p . These may be difficult to
                   compute and thus simpler methods are often favored in practice.
                     In the collocation method, we define the weight functions to be Dirac delta functions
                   centered on each node, so that the residual must be zero at each node. Unfortunately, even
                   though the residual is zero at each node, it may be large between nodes, especially with
                   strong convection. In simple geometries, accuracy is improved when the nodes are placed
                   at the zeros of orthogonal polynomials (see Chapter 4). This orthogonal collocation method
                   is discussed in Villadsen & Michelsen (1978).
                     Here, we use the Galerkin method, which is based upon writing the trial form of the
                   solution as a linear combination of each nodal value multiplied by a corresponding global
   310   311   312   313   314   315   316   317   318   319   320