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

82         Process Modelling and Simulation with Finite Element Methods

             Before moving in to explain the implementation of boundary conditions we
          shall work through a simple ODE to highlight the concepts we discussed so far.
          Following the worked example should guide you through the weak formulation
          and finding approximate numerical solutions to a given second order ODE.

          Exercise 2.4: A worked example offinite element calculations in detail
          To elaborate  the  concepts described  above  a  simple ODE is  solved using  the
          variational principles that forms the core to FEM.  The problem is simple. Solve
          the second order ODE

                                   d 'u         2
                                   y+4u =8x                           (2.28)
                                   dx
          subjected to boundary conditions
                                 u(0) = U(X /4) = 0

          using the weak formulation.
             This simple second order ODE has an analytic solution (Prove it!)

                                                                      (2.29)


          Since we know the analytic solution, a comparison would give the error of the
          approximate solution we find.
             The first step for the weak formulation is to assume a weight function and a
          trial function.  Take U(x) as the trial  function and  q5  (x) as the weight function.
          We discuss the exact forms of these functions later. The trial function U(x) forms
          a solution to the ODE. Therefore, if we  substitute U(x) in (2.28), the resulting
          equation gives the residual:

                                                                      (2.30)


          Subsequent  steps  really  amount  to  the  minimization  of  this  residual.  The
          minimization process starts by evaluating the weighted residual. To evaluate the
          weighted residual, multiply  (2.30) by  q5  (x) and integrate over the domain (i.e.
          05 x 5 n/4).


                                                                      (2.31)
   90   91   92   93   94   95   96   97   98   99   100