Solution of Scalar Convection-Diffusion Equation Using

Document Sample
Solution of Scalar Convection-Diffusion Equation Using Powered By Docstoc
					Solution of Scalar Convection-Diffusion Equation
Using FEMLAB
A.Yazdani
L. Shojai

A.Yazdani@lboro.ac.uk


Department of Chemical Engineering,
Loughborough University,
Loughborough, LE11 3TU,
UK


FEMLAB Conference, October 2005, Boston, USA.




                                                   1
Overview


   Convection-Diffusion, its importance and applications.

   General modelling and governing equations.

   Numerical methods and their advantages and disadvantages.

   One dimensional problem and FEMLAB presentation.

   Two dimensional problem and FEMLAB presentation.




                                                               2
Why Convection-Diffusion?


   Modelling of the systems involving a combination of the processes
   by which a matter is transported as a result of ordered motions
   (convection) or random motions (diffusion) or both, appear in the
   study of:

   Pollutant dispersion in a river estuary
   Vorticity transport in the incompressible Navier-Stokes equations
   Atmospheric pollution
   Semi-conductor equations
   Groundwater transport




                                                                       3
Model problems


The steady linear problem on a bounded domain is formulated as:
                       r
      − ε∇.(a∇u ) + ∇.(b u ) + cu = S in Ω                        (1)

with boundary conditions

                           ∂u
      u = u B on ∂ Ω D ,      = 0 on ∂ Ω N                        (2)
                           ∂n

                                                           r
We assume incompressibility of the velocity field b and also assume
that a ( x ) ≥ 1, c ( x ) ≥ 0 and ε is a small positive constant.




                                                                        4
Numerical difficulties with simple difference schemes


  Unrealistic oscillations
  Instability

  These difficulties appear in the form of boundary and internal layers
  where abrupt changes happen to the solution and its derivatives in very
  narrow regions, e.g. convection-dominated cases. Careless refinement
  of the mesh size may lead to a huge number of degrees of freedom,
  making the discretization intractable.




                                                                        5
Existing treatments and methods


 Streamline-upwinding technique
 Petrov-Galerkin approach
 Artificial diffusivity method
 Stabilized methods

 Stabilized finite element methods are formed by adding to the standard
 Galerkin method variational terms that are mesh-dependent, consistent
 and numerically stabilizing. The most recent development of them is the
 residual- free bubble method.




                                                                       6
Why we use FEMLAB presentation?


  FEMLAB is user friendly and graphically rich

  FEMLAB is well suited for different modules and applications

  FEMLAB is a versatile multi-physics modelling tool

  FEMLAB is easy to handle with pre- and post-processing

  FEMLAB is powerful coping with complex geometries

  FEMLAB is equipped with newly developed models and techniques


                                                                  7
The 1-D test problem


Consider the one dimensional convection-diffusion boundary value
problem:
      d 2u    du
         2
           −b    = S ( x ) in Ω = [0,1]                            (3)
      dx      dx


subject to the given boundary conditions: u(0)=1, u(1)=0. This is an
idealized steady state scalar problem with no source term, for which we
have the analytic solution as:
              e bx − e b
     u ( x) =            .                                         (4)
               1− e  b




                                                                      8
FEMLAB presentation, 1-D


  Setting b=50 and using predefined cubic Lagrange element over the
  domain refined to 30 equi-length partitions, FEMLAB returns with the
  solution within 0.032 seconds:




                                                                     9
The exact solution presentation, 1-D


  The analytic solution in this case is as follows:




                                                      10
Comparison and analysis



   For convection dominated problems with intermediate values of
   convection coefficient, e.g. b=50 as is the case here, FEMLAB is
   accurate and reliable.

   It can be easily verified that if we choose the mesh size to be the same
   size as the ratio between convection and diffusion, then the lower order
   elements such as cubic Lagrange element are efficient enough even for
   larger values of convection coefficient.




                                                                       11
The 2-D test problem


The two dimensional test problem we would like to study is:
       ∂ 2u ∂ 2u   ∂u ∂u
           + 2 − b( − ) = 0                                             (5)
       ∂x 2 ∂y     ∂x ∂y

over the domain Ω =[0,1]×[0,1] subject to the Dirichlet boundary conditions:

       ⎧u ( x,1) = 0 = u (1, y )
       ⎪
       ⎨u ( x,0) = 1 = u (0, y)
       ⎪u (0,1) = 0.5 = u (1,0)                                         (6)
       ⎩




                                                                          12
The Analytic solution


    The exact solution to the 2-D problem is:
                                           −b         b( x+ y )
                     ∞
                           (1 − ( − 1 ) e ) 8 n π e
                                       n    2             2
     u ( x, y ) =   ∑
                    n =1              An
                           sinh(         )( b 2 + 4 n 2 π 2 )                        (7)
                                     2
                              A n (1 − y )                          A n (1 − x )
      sin( n π x ) sinh(                   ) + sin( n π y ) sinh(                )
                                   2                                    2

  where An = 2b2 + 4n2π 2 > 0 .




                                                                                      13
FEMLAB presentation, 2-D


  Again, setting b=50 FEMLAB solves the equation (5) within 4.438
  seconds which makes use of predefined quintic Lagrange element with
  3976 triangular (default) elements, which is illustrated at various layers
  of y:




                                                                          14
The exact solution presentation, 2-D


  The exact solution may be studied and interpreted for different values
  of y, for this case we look at, y=0.5, x=0..1:




                                                                      15
The exact solution presentation, 2-D


  For the case y=0.7, x=0..1:




                                       16
The exact solution presentation,2-D


  And for the case y=0.7, x=0.8..1:




                                      17
Comparison and analysis


  Unlike the 1-D case, it is not so easy to invent a range of 2-D problems
  with ready analytical solutions. In this idealized case FEMLAB result
  is accurate and reliable as expected.

   This example shows that the FEMLAB solution (as seen in previous
  figures) is able to capture subgrid scales of the problem up to a
  reasonable degree.




                                                                        18
19
20
21
Conclusions


  In this report a case convection-dominated equation studied and the
  solution presented using FEMLAB. It was found that FEMLAB is a
  quite powerful modelling and multiphysics tool which is updated with
  novel techniques based on substantial theories. FEMLAB showed to be
  very flexible in terms of mesh generation, pre-conditioning and post-
  processing and well equipped with multi-scale methods which are
  going to become a cornerstone in the area of computational mechanics
  and engineering.




                                                                     22
Thank You!



             23