Discontinuous Galerkin Methods Li, Yang FerienAkademie 2008 Contents Li, Yang Methods of solving PDEs Introduction of DG Methods Working with 1-Dimension FerienAkademie 2008 Methods of solving PDEs Li, Yang FerienAkademie 2008 Finite Difference Method Finite Volume Method Finite Element Method PDEs Methods of solving PDEs Li, Yang FerienAkademie 2008 E.g. 1D scalar conservation law u f g, x t x with initial conditions and boundary conditions on the boundary How to get the unknown solution u ( x, t ) approximate solution uh ( x, t ) ? flux f (u ) Is it satisfied the equation? prescribed force g ( x, t ) Methods of solving PDEs Li, Yang FerienAkademie 2008 Finite Difference Method k 1 duh ( x , t ) f h ( x , t ) f h ( x k k 1 dt h h k k 1 , t) g ( xk , t ) a grid xk , k 1...N p local grid size h k x k 1 x k assume: 2 2 i 0 i 0 x [ x k 1 , x k 1 ] : uh ( x, t ) ai (t )( x x k )i , f h ( x, t ) bi (t )( x x k )i uh f h g ( x, t ) Residual: Rh ( x, t ) t x Methods of solving PDEs Li, Yang Finite Difference Method Simple to implement FerienAkademie 2008 Element-based discretization to ensure geometry flexibility Ill-suited to deal with complex geometries Methods of solving PDEs Li, Yang FerienAkademie 2008 Finite Volume Method k k u f (u ) x D : Rh ( x, t ) g ( x, t ) t x The actual k numerical scheme 1 ( xk element staggered grid D [ x , x will]depend , x k 1/ 2 upon 2 problem geometry solution is approximated on the element by a and mesh k construction. constant u (t ) Difficult when highk order k du k 1/ 2 k 1/ 2 k k Divergence Theorem h f f h g reconstruction. k 1/ 2 k k 1/ 2 dt Reconstruction of uh ( x) Solution uh p a (x x i 0 i k i ) To find the p+1 unknown coefficients need information at least from p+1 cells x k 1 ) Methods of solving PDEs Li, Yang FerienAkademie 2008 Finite Element Method Np assume the local solution: x D k : uh ( x) bn n ( x) n 1 element Dk [ x k , x k 1 ] locally defined basis function n ( x) global representation of uh : K uh ( x ) u ( x k ) N k ( x ) k 1 where N i ( x j ) ijis the basis function. define a space of test functions,Vh , and require the residual is orthogonal to all test functions: uh f h ( g h )h ( x)dx 0, h Vh t x Methods of solving PDEs Li, Yang FerienAkademie 2008 Finite Element Method Classical choice: the spaces spanned by the basis functions and test functions are the same. K h ( x) v( x k ) N k ( x) k 1 Easy to extend to highh Vh The semi-discrete Since the residual has to vanish for all order approximation by scheme becomes u f adding additional ( h h g h )N j ( x)dximplicit 0, and M must be degrees of freedom to t inverted x the element. du h M Sf h Mg h dt j dN Mij N i ( x) N j ( x)dx, Sij N i ( x) dx dx Introduction of DG Methods Li, Yang FerienAkademie 2008 The Discontinuous Galerkin method is somewhere between a finite element and a finite volume method and has many good features of both, utilizing a space of basis and test functions that mimics the finite element method but satisfying the equation in a sense closer to the finite volume method. It provides a practical framework for the development of high-order accurate methods using unstructured grids. The method is well suited for large-scale time-dependent computations in which high accuracy is required. An important distinction between the DG method and the usual finite-element method is that in the DG method the resulting equations are local to the generating element. The solution within each element is not reconstructed by looking to neighboring elements. Its compact formulation can be applied near boundaries without special treatment, which greatly increases the robustness and accuracy of any boundary condition implementation. Introduction of DG Methods Li, Yang FerienAkademie 2008 From FEM and FVM to DG-FEM maintain the definition of elements as in the FEM D k [ x k , x k 1 ] but new definition of vector of unknowns u h [u1 , u 2 , u 2 , u 3 , , u K 1 , u K , u K , u K 1 ]T Assume the local solution in each element is: (likewise for the flux) k 1 k 1 x x x x k k k k 1 k i k x D : uh ( x) u k u u li ( x) k 1 k 1 k x x x x i 0 Define The space of basis functions: Vh K k 1 l k 1 i i 0 The local residual is: k k u f x D k : Rh ( x, t ) h h g ( x, t ), t x Introduction of DG Methods Li, Yang FerienAkademie 2008 Require that the residual is orthogonal to all test functions h Vh : D k R ( x , t ) l h i ( x)dx 0 k Similar to FVM, use Gauss’ theorem: k j uhk k j k k k k x k 1 l f gl dx [ f h l j ]x k Dk t j h x j introduce the numerical flux, f , as the unique value to be used at the interface and obtained by coming information from both elements. Dk k j k 1 uhk k l j f hk j gl kj dx [ f l kj ]xxk t x Weak Form applying Gauss’ theorem again: Dk k x k 1 j xk Rh ( x, t )l ( x)dx [( f f )l ] k j k h Strong Form Introduction of DG Methods Li, Yang FerienAkademie 2008 More general form Consider the nonlinear, scalar, conservation law: u f (u ) 0, x [ L, R] t x subject to appropriate initial conditions u ( x, 0) u0 ( x). The boundary conditions are provided when the boundary is an inflow boundary: u ( L, t ) g1 (t ) when f h (u ( L, t )) 0, u ( R, t ) g 2 (t ) when f h (u ( R, t )) 0, We still assume that the global solution can be well approximated by a space of piecewise polynomial functions, defined on the union of D k , and require the residual to be orthogonal to space of the test K k functions, h k 1h Vh Introduction of DG Methods Li, Yang FerienAkademie 2008 recover the locally defined weak formulation: k uhk k d k k k h ˆ ( f ( u ) ) dx n f Dk t h h h dx Dk h dx, and the strong form: uhk f hk (uhk ) k Dk ( t x )h dx D k k k ˆ n ( f ( u ) f ) h h h dx, k Assume that all local test functions can be represented by using a local polynomial basis, n ( x) , as Np x D k : hk ( x) ˆnk n ( x) and leads to N p equations as: n 1 uhk k k d n ˆ ( f ( u ) ) dx n f Dk t n h h dx Dk n dx, uhk f hk (uhk ) Dk ( t x ) n dx D k k ˆ n ( f ( u ) f ) n dx, h h k Working with 1-Dimension Li, Yang FerienAkademie 2008 E.g. Choose the basis functions: Jacobi polynomials Integral: Gaussian quadrature Time: 4th order explicit RK method Simple algorithm steps: Generate simple mesh Construct the matrices Solve the equation system Working with 1-Dimension Li, Yang FerienAkademie 2008 Working with 1-Dimension Li, Yang FerienAkademie 2008 Reference Li, Yang FerienAkademie 2008 Jan S Hesthaven, Tim Warburton: Nodal Discontinuous Galerkin Methods: Algorithms, Analysis, and Applications, Springer Cockburn B, Shu CW: TVB Runge-Kutta local projection discontinuous Galerkin finite element method for conservation laws II: general framework, MATHEMATICS OF COMPUTATION, v52 (1989), pp.411-435. http://lsec.cc.ac.cn/lcfd/DGM_mem.html http://www.wikipedia.org/ http://www.nudg.org/