High Order Discontinuous Galerkin Methods for Aerodynamics Per-Olof Persson Massachusetts Institute of Technology Collaborators: J. Peraire, J. Bonet, N. C. Nguyen, A. Mohnot Symposium on Recent Developments and Emerging Trends in Computational Design, Analysis and Optimization WPAFB, OH January 30, 2007 1
Outline Background Introduction to High-Order DG Cost and efficiency issues Robustness, RANS and shocks Deformable domains 2
Application Areas DNS/LES/DES applications Accurate RANS for engineering applications Drag prediction Rotor dynamics Hypersonics Fluid/Structure Interaction, Flapping flight Computational aeroacoustics Direct simulation using the compressible Navier-Stokes equations Accurate computation of noise sources 3
Numerical Schemes Three fundamental requirements: High-order/Low dispersion Unstructured meshes Stability for convervation laws 4
Numerical Schemes Three fundamental requirements: FVM High-order/Low dispersion Unstructured meshes Stability for convervation laws 5
Numerical Schemes Three fundamental requirements: FVM FDM High-order/Low dispersion Unstructured meshes Stability for convervation laws 6
Numerical Schemes Three fundamental requirements: FVM FDM FEM High-order/Low dispersion Unstructured meshes Stability for convervation laws 7
Numerical Schemes Three fundamental requirements: FVM FDM FEM DG High-order/Low dispersion Unstructured meshes Stability for convervation laws 8
Discontinuous Galerkin: Problems High-order geometry representation and mesh generation High CPU/memory requirements (compared to FVM or high-order FDM) Low tolerance to under-resolved features (no robustness) The challenge is to make DG methods competitive for real-world problems 9
Example: Aeroacoustics and K-H Instability Inspired by calculations of Munz et al (2003) (linearized) Nonlinear behavior: Large scale acoustic wave interacts with small scale flow features, leading to vorticity generation p = 7 (8th order accuracy), 100-by-20 square elements 10
Example: Flow around Wedge Box Simple but representative geometry Well-studied aeroacoustics test case Low Mach number flow, high order methods required to capture and propagate acoustic waves 11
Example: Solid Dynamics Cast governing equations as system of first order conservation laws Account for involutions by appropriate selection of approximating spaces Curl-free deformation tensor Use High-Order DG Lagrangian non-dissipative Neo- Hookean material 12
Outline Background Introduction to High-Order DG Cost and efficiency issues Robustness, RANS and shocks Deformable domains 13
The Discontinuous Galerkin Method (Reed/Hill 1973, Lesaint/Raviart 1974, Cockburn/Shu 1989-, etc) Consider non-linear hyperbolic system in conservative form: u t + F i (u) = 0 Triangulate domain into simplicial elements Use space of element-wise polynomials of degree p Solve weighted residual formulation Error O(h p+1 ) for smooth problems κ n Reduces to finite volume method for p = 0 u L u R κ 14
Nodal Basis and Curved Boundaries Nodal basis within each element sparse element connectivities Isoparametric treatment of curved elements (not only at boundaries) Important research topic: Isotropic mesh Meshing/Node placement for DG W1 wing Anisotropic mesh 15
Viscous Discretization Treat the viscous terms by rewriting as a system of first order equations: u t + F i (u) F v (u, σ) = 0 σ u = 0 Discretize using DG, various formulations and numerical fluxes such as: The BR1 scheme (Bassi/Rebay 97): Averaging of fluxes, connections between non-neighboring elements The BR2 scheme (Bassi/Rebay 98): Different lifting operator for each edge, compact connectivities The LDG scheme (Cockburn/Shu 98): Upwind/Downwind, sparse connectivities, some far connections The CDG scheme (Peraire/Persson 06): Modification of LDG for local dependence sparse and compact 16
Outline Background Introduction to High-Order DG Cost and efficiency issues Robustness, RANS and shocks Deformable domains 17
Sparsity Patterns CDG : 1 2 3 4 LDG : BR2 : and and 1 4 2 2 3 3 1 4 18
Implicit DG Memory Requirements Example: Navier-Stokes + S-A in 3-D, p = 4, 10, 000 tetrahedra DOFs = 6 35 10, 000 = 2, 100, 000 Jacobian: 1.20 10 9 matrix entries = 9.6GB Observations: For p 2, 6 tetrahedra cheaper than 1 hex (!) p = 2 and p = 3 optimal for tetrahedra Storage 10 4 10 3 Memory Requirements Fixed resolution r, 3 D M CDG Simplex M CDG Block 10 2 0 2 4 6 8 Polynomial order p 19
Matrix Storage and Operations Block matrix representation fundamental for high performance Up to factors of 10 difference between optimized matrix libraries and hand-coded for-loops Compromise between general purpose and application specific format The CDG scheme is well-suited for a compact block storage format With a general format (e.g. compressed column), it is hard to take advantage of the block structure 20
Convergence of Iterative Solvers Convergence of various solvers with block-diagonal preconditioner Block Jacobi great when it works, but unreliable Krylov solvers comparable convergence Focus on GMRES(20) Error 10 8 10 7 10 6 10 5 NACA, t=10 3 Error 10 8 10 7 10 6 10 5 10 4 NACA, t=10 1 Block Jacobi QMR CGS GMRES(20) GMRES 10 4 10 3 10 3 10 2 10 2 0 10 20 30 40 50 60 # Matrix Vector products 10 1 0 50 100 150 200 250 300 350 400 450 500 # Matrix Vector products 21
Preconditioners for Krylov Methods Performance of Krylov methods greatly improved by preconditioning Various standard methods: Block-diagonal: A blockdiag(a) Block-Incomplete LU: A LŨ p-multigrid (low-degree) preconditioner Highly efficient combination (Persson/Peraire 06) Use block-ilu(0) as post-smoother for coarse scale correction In particular, convergence is almost independent of Mach number 22
Mach Number Dependence The ILU(0)/Coarse scale preconditioner appears to make convergence almost independent of Mach number Individually, ILU(0) and coarse corrections perform poorly for low Mach Clearly, ILU(0) is an efficient smoother and reduces errors in high frequencies (within and between the elements) # GMRES Iterations 10 3 10 2 10 1 NACA, t=1.0 10 0 10 3 10 2 10 1 10 0 Mach Number Block diagonal ILU(0) p0 correction ILU(0)/p0 23
Outline Background Introduction to High-Order DG Cost and efficiency issues Robustness, RANS and shocks Deformable domains 24
Artificial Viscosity Idea High-order discretization might be unstable when features are unresolved (Gibbs oscillations) Unrealistic to require the mesh to resolve all features (Persson/Peraire 06) Add a small amount of viscosity to original equations so that unresolved features can be represented by approximating space u t + F (u, u) = ( ν u) ε 2ε ε ν 25
Resolution SA Turbulence Model 1.0 Velocity 0.8 0.6 Eddy viscosity Eddy Viscosity Profile 0.4 0.2 0.0 Shear stress R θ = 10 4 0 4 8 (from Spalart-Allmaras 1992) Benign at the wall High resolution required at boundary layer edge 30 25 26
Resolution SA Turbulence Model Eddy Viscosity Profile: 1 1 0.8 0.8 0.6 0.6 0.4 0.2 hfill 0.4 0.2 0 0 2 4 6 8 10 y/δ Coarse Mesh 0 0 2 4 6 8 10 y/δ Fine Mesh 27
Resolution SA Turbulence Model Eddy Viscosity Profile: 1 0.8 In the transition region ν ν 0.6 0.4 0.2 0 0 2 4 6 8 10 y/ δ * ε ν y (ν + ν) 2 ν y 2 + C ν ε ν ν ε 2 ε ν!!! ( ) ν 2 y Detailed structure of ν in transition region likely to have small effect on overall solution 28
Artificial Viscosity vs. Limiting Low order schemes: Width δ s to capture a discontinuity: Modern Finite Volume Schemes: δ s 2h Artificial Viscosity Methods: δ s 4h High order schemes: Limiting: δ s 2h (Not obvious how to exploit increased resolution) Artificial Viscosity Methods: δ s 4h/p (Easy to extend to high order) h h/p 29
Example: Transonic Flow over NACA Airfoil NACA 0012, M = 0.8, p = 4 Pressure Shock stabilization by artificial viscosity with non-linear sensor (Persson/Peraire 06) Implicit steady-state solution with Newton solver Entropy Sensor 30
Example: Supersonic Flow over NACA Airfoil NACA 0012, M = 1.5, p = 4 Mach Shock stabilization by artificial viscosity with non-linear sensor (Persson/Peraire 06) Implicit steady-state solution with Newton solver Sensor 31
Proposed Approach Use Artificial Viscosity with a Non-Linear Sensor Select Parameters based on Available Resolution DG implementation Consistent Treatment of High Order Terms (CDG) Do not exploit nature of Discontinuous Approximation Artificial Viscosity Models: Shocks Viscosity Model: Laplacian form (ν 1 U) Sensor: Density Eddy Viscosity Equation Viscosity Model: Laplacian form (ν 2 ν) Sensor: ν 32
Sensor Determine regularity of the solution based on rate of decay of expansion coefficients Periodic Fourier case: f(x) = k= g k e ikx If f(x) has m continuous derivatives g k k (m+1) For simplices: Use orthonormal Koornwinder basis within each element 33
M = 0.2, Re = 1.02 10 7 Example: Flat Plate Eddy Viscosity Sensor p = 4 34
Example: Flat Plate Velocity Skin friction 30 25 20 Lawofthewall Exp. data p =4, grid C p =2, grid B p =1, grid A 6 x 10 3 5 4 Exp. data p =4, grid C p =2, grid B p =1, grid A u + 15 C f 3 10 2 5 1 0 10 0 10 1 10 2 10 3 10 4 + y 0 0 2 4 6 8 10 Re x x 10 6 p = 1, 2, 4 (constant h/p) 35
Example: Flat Plate Output: Drag on (0.0148 x 4.687) 10 4 10 5 p =1 C D error 10 6 p =2 10 7 p =3 10 8 p =4 A B C Grid Convergence rate h p 36
Example: RAE2822 M = 0.675, α = 2.31 o, Re = 6.5 10 6 p = 2 (constant h/p) p = 4 C L = 0.6144 C D = 0.0104 C L = 0.6131 C D = 0.0103 37
Example: RAE2822 M = 0.675, α = 2.31 o, Re = 6.5 10 6 p = 2 (constant h/p) p = 4 C L = 0.6144 C D = 0.0104 C L = 0.6131 C D = 0.0103 38
Example: RAE2822 C p C f 1.5 p =4 p =2 x 10 3 6 p =4 p =2 1 5 4 0.5 C p 0 C f 3 2 1 0 0.5 1 0 0.2 0.4 0.6 0.8 1 x/c 1 2 3 0 0.2 0.4 0.6 0.8 1 x/c 39
M = 0.85, Re = 1.85 10 6 Example: NACA0012 p = 3 (constant h) p = 4 C D = 0.05347 C D = 0.05346 40
M = 0.85, Re = 1.85 10 6 Example: NACA0012 p = 3 (constant h) p = 4 C D = 0.05347 C D = 0.05346 41
Example: NACA0012 1 0.75 p =4 p =3 p =2 4 x 10 3 3 p =4 p =3 p =2 0.5 0.25 C p 0 0.25 0.5 0.75 C f 2 1 0 1 0 0.2 0.4 0.6 0.8 1 x/c p = 2 C D = 0.05185 p = 3 C D = 0.05347 p = 4 C D = 0.05346 1 0 0.2 0.4 0.6 0.8 1 x/c 42
Example: NACA0012 Sensor for ν p = 3 p = 4 43
Example: NACA0012 Mach Number Shock Sensor p = 4 44
Outline Background Introduction to High-Order DG Cost and efficiency issues Robustness, RANS and shocks Deformable domains 45
Background and Applications Deformable domains important in many applications: Rotor-stator flows Flapping flight Fluid-structure interaction Several attempts using Arbitrary Lagrangian-Eulerian (ALE) formulations Equations discretized on a deforming grid, time-dependent metric At most third order accuracy in space and time demonstrated Alternative approach [Visbal/Gaitonde 02] in finite difference setting Map from fixed reference domain to real time-varying domain We use a mapping approach, however in a DG setting and with a conservative formulation for free-stream preservation 46
ALE Formulation Map from fixed reference domain V to physical deformable domain v(t) A point X in V is mapped to a point x(t) = G(X, t) in v(t) Introduce the mapping deformation gradient G and the mapping velocity v X as nda G = X G v X = G t X NdA G, g, v X x 2 v and set g = det(g) V X 2 x 1 X 1 47
Transformed Equations The system of conservation laws in the physical domain v(t) U x t + x F x (U x, x U x ) = 0 x can be written in the reference configuration V as where U X t + X F X (U X, X U X ) = 0 X U X = gu x, F X = gg 1 F x U X G 1 v X and x U x = X (g 1 U X )G T = (g 1 X U X U X X (g 1 ))G T Proof. See paper (only a few lines) 48
Geometric Conservation Law A constant solution in v(t) is not necessarily a solution of the discretized equations in V, due to inexact integration of the Jacobian g The time evolution of g is g t X (gg 1 v X ) = 0, X which in general is non-zero Visbal and Gaitonde added corrections to cancel the errors Our approach solves instead the convervative system (ḡg 1 U X ) t X F X = 0 X ḡ t X (gg 1 v X ) = 0 X 49
Mappings for Deformable Domains Need mapping x = G(X, t) given the boundary deformations Common approach in ALE settings: Move boundary mesh nodes, update interior nodes by mesh smoothing (Laplacian, spring analogy, etc) Would require interpolation in both space and time to obtain G, v X Stability and accuracy of scheme unclear Can also solve PDEs (usually elliptic) for x in the interior In this work, we use a blending technique which gives explicit expressions for x = G(X, t) Easy to differentiate to obtain G, v X 50
Blending of Meshes Our approach forms a smooth weighted combination of two meshes, displaced according to each boundary deformation Original Mesh Rigidly Moved Mesh Blended Mesh 51
Example: Euler Vortex Propagate an Euler vortex on a variable domain with x(ξ, η, t) = ξ + 2.0 sin(2πξ/20) sin(πη/7.5) sin(1.0 2πt/t 0 ) y(ξ, η, t) = η + 1.5 sin(2πξ/20) sin(πη/7.5) sin(2.0 2πt/t 0 ) Deformed meshes used for visualization only, everything is computed on the reference mesh 52
Example: Euler Vortex, Convergence Optimal order of convergence O(h p+1 ) for mapped scheme 10 0 2 1 10 2 p=1 L 2 error 10 4 p=2 p=3 10 6 10 8 p=4 p=5 6 1 10 1 10 0 Element size h Mapped Unmapped 53
Example: Free-stream Preservation Solve with initial free-stream solution u 0 (x, y) = u L 2 -error of error u(x, y, T ) u 0 with and without ḡ equation 10 0 p=1 p=1 L 2 error 10 5 p=2 p=2 p=3 p=3 p=4 10 10 p=5 p=4 p=5 10 15 10 1 10 0 Element size h 54 With Free stream Preservation Without Free stream Preservation
Example: Flow around Oscillating Cylinder Oscillating unit circle, y c (t) = A sin(2πft) with A = 4/3,f = 0.1. Reynolds number 400, Mach 0.2, degree p = 4 approximation Compare rigid and blended mappings Rigid Mapping Blended Mapping 55
Example: Flow around Oscillating Cylinder Good agreement between different mappings of the same domain deformation Rigid Mapping Blended Mapping 10 10 5 5 0 0 Drag Lift 5 0 5 10 15 20 25 30 35 Time Drag Lift 5 0 5 10 15 20 25 30 35 Time 56
Example: Heaving and Pitching Foil in Wake NACA 0012 foil heaving and pitching in wake of D-section cylinder Both oscillate y(t) = A sin(2πft), foil pitching θ = a sin(2πft + π/2) Based on experimental study [Gopalkrishnan et al 94] 57
Example: Heaving and Pitching Foil in Wake Thrust/Drag of combined cylinder/foil highly dependent on location/phase Future work: Parametric study to identify different modes of interaction Lift Drag 3 2 Lift (cylinder) Lift (foil) 3 2 Drag (cylinder) Drag (foil) 1 1 0 1 0 2 1 3 0 2 4 6 8 10 12 14 16 18 Time 2 0 2 4 6 8 10 12 14 16 18 Time 58
Example: Pitching Airfoil HT13 airfoil attached to translating and heaving point by torsional spring Fluid properties: Re = 5000, M = 0.2 Forced vertical motion r z (t) = r 0 sin ωt (at leading edge) Moment equation: I θ + Cθ S r z (t) + M aero = 0 I moment of inertia, C spring stiffness, S = mx c static unbalance M aero moment from fluid r z (t) θ 59
Example: Pitching Airfoil Low Amplitude 0.3 0.2 0.1 0 0.1 0.2 0.3 r z θ M D L 0 10 20 30 40 50 60 70 80 90 100 Time High Amplitude 1.5 1 0.5 0 0.5 r z θ 1 M D L 1.5 0 10 20 30 40 50 60 70 80 90 100 Time 60
Conclusions Important steps toward a practical DG solver for real-world problems Efficient discretizations and solvers Artificial viscosity approach for producing grid independent RANS solutions and sub-cell shock capturing Effect of grid distortion not fully understood (grid generation?) RANS is much harder than Euler/Laminar NS Optimal accuracy for deformable domains by mapping approach Current work: Extensions for LES/DES, parallelization for large scale 3-D problems, shock capturing for solids, etc 61