High Order Discontinuous Galerkin Methods for...
Transcript of High Order Discontinuous Galerkin Methods for...
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 prop-
agate 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:
ut +∇ · Fi(u) = 0
• Triangulate domain into simplicial elements
• Use space of element-wise polynomials of degree p
• Solve weighted residual formulation
• ErrorO(hp+1) for smooth problems
• Reduces to finite volume method for p = 0
∂κ
κ
n
uL
uR
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:
Meshing/Node placement for DG
W1 wing
Isotropic mesh
Anisotropic mesh
15
Viscous Discretization
• Treat the viscous terms by rewriting as a system of first order equations:
ut +∇ · Fi(u)−∇ · Fv(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
and
and
CDG :
LDG :
BR2 :
1
23
4
1
1
2
2
3
3
4
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 · 109 matrix entries = 9.6GB
• Observations:
– For p ≥ 2, 6 tetrahedra
cheaper than 1 hex (!)
– p = 2 and p = 3 optimal for
tetrahedra
0 2 4 6 810
2
103
104
Polynomial order p
Sto
rage
Memory Requirements − Fixed resolution r, 3−D
MCDG
Simplex
MCDG
Block
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)
0 10 20 30 40 50 6010
2
103
104
105
106
107
108
# Matrix−Vector products
Err
or
NACA, ∆ t=10−3
0 50 100 150 200 250 300 350 400 450 50010
1
102
103
104
105
106
107
108
# Matrix−Vector products
Err
or
NACA, ∆ t=10−1
Block JacobiQMRCGSGMRES(20)GMRES
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 ≈ LU
– 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)
10−3
10−2
10−1
100
100
101
102
103
Mach Number
# G
MR
ES
Iter
atio
ns
NACA, ∆ t=1.0
Block diagonalILU(0)p0−correctionILU(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
0 4 80.0
0.2
0.4
0.6
0.8
1.0
Velocity
viscosityEddy
Shearstress
1 10 100 1000 100000
5
10
15
20
25
30
Rθ = 104
(from Spalart-Allmaras 1992)
Eddy Viscosity Profile
• Benign at the wall
• High resolution required at boundary
layer edge
26
Resolution – SA Turbulence Model
Eddy Viscosity Profile:
0 2 4 6 8 10
0
0.2
0.4
0.6
0.8
1
y/δ ∗
Coarse Mesh
hfill
0 2 4 6 8 100
0.2
0.4
0.6
0.8
1
y/δ ∗
Fine Mesh
27
Resolution – SA Turbulence Model
Eddy Viscosity Profile:
0 2 4 6 8 100
0.2
0.4
0.6
0.8
1
y/ δ*�
ε
In the transition region ν ∼ ν
∂ν
∂y∼ (ν + ν)
∂2ν
∂y2+ C
(∂ν
∂y
)2
ν
ε∼ νν
ε2⇒ ε ∼ ν !!!
Detailed structure of ν in transition region likely to have small effect on overall solution
28
Artificial Viscosity vs. Limiting
Width δs to capture a discontinuity:
• Low order schemes:
– 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
• Shock stabilization by artificial
viscosity with non-linear sensor
(Persson/Peraire 06)
• Implicit steady-state solution with
Newton solver
Pressure
Entropy Sensor
30
Example: Supersonic Flow over NACA Airfoil
• NACA 0012, M = 1.5, p = 4
• Shock stabilization by artificial
viscosity with non-linear sensor
(Persson/Peraire 06)
• Implicit steady-state solution with
Newton solver
Mach
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=−∞
gkeikx
If f(x) has m continuous derivatives → |gk| ∼ k−(m+1)
• For simplices: Use orthonormal Koornwinder basis within each element
33
Example: Flat Plate
• M = 0.2, Re = 1.02 · 107
Eddy Viscosity Sensor
p = 4
34
Example: Flat Plate
Velocity Skin friction
100
101
102
103
104
0
5
10
15
20
25
30
y
u
Law of the wallExp. datap =4, grid Cp =2, grid Bp =1, grid A
+
+
0 2 4 6 8 10
x 106
0
1
2
3
4
5
6x 10
−3
Rex
Cf
Exp. datap =4, grid Cp =2, grid Bp =1, grid A
p = 1, 2, 4 (constant h/p)
35
Example: Flat Plate
Output: Drag on (0.0148 ≤ x ≤ 4.687)
A B C10
−8
10−7
10−6
10−5
10−4
CD
err
or
Grid
p =1
p =2
p =3
p =4
Convergence rate∼ hp
36
Example: RAE2822
• M = 0.675, α = 2.31o, Re = 6.5 · 106
p = 2 (constant h/p) p = 4
CL = 0.6144 CD = 0.0104 CL = 0.6131 CD = 0.0103
37
Example: RAE2822
• M = 0.675, α = 2.31o, Re = 6.5 · 106
p = 2 (constant h/p) p = 4
CL = 0.6144 CD = 0.0104 CL = 0.6131 CD = 0.0103
38
Example: RAE2822
Cp Cf
0 0.2 0.4 0.6 0.8 1
−1.5
−1
−0.5
0
0.5
1
x/c
Cp
p =4p =2
0 0.2 0.4 0.6 0.8 1−3
−2
−1
0
1
2
3
4
5
6
x 10−3
x/c
Cf
p =4p =2
39
Example: NACA0012
• M = 0.85, Re = 1.85 · 106
p = 3 (constant h) p = 4
CD = 0.05347 CD = 0.05346
40
Example: NACA0012
• M = 0.85, Re = 1.85 · 106
p = 3 (constant h) p = 4
CD = 0.05347 CD = 0.05346
41
Example: NACA0012
0 0.2 0.4 0.6 0.8 1
−1
−0.75
−0.5
−0.25
0
0.25
0.5
0.75
1
x/c
Cp
p =4p =3p =2
0 0.2 0.4 0.6 0.8 1−1
0
1
2
3
4 x 10−3
x/c
Cf
p =4p =3p =2
p = 2 CD = 0.05185
p = 3 CD = 0.05347
p = 4 CD = 0.05346
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 vX as
G = ∇XG
vX =∂G∂t
∣∣∣∣X
and set g = det(G)
X1
X2
NdA
V
x1
x2
nda
vG , g, vX
47
Transformed Equations
• The system of conservation laws in the physical domain v(t)
∂Ux
∂t
∣∣∣∣x
+ ∇x · Fx(Ux, ∇xUx) = 0
can be written in the reference configuration V as
∂UX
∂t
∣∣∣∣X
+ ∇X · FX(UX , ∇XUX) = 0
where
UX = gUx , FX = gG−1Fx −UXG−1vX
and
∇xUx = ∇X(g−1UX)G−T = (g−1∇XUX −UX∇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
−∇X · (gG−1vX) = 0 ,
which in general is non-zero
• Visbal and Gaitonde added corrections to cancel the errors
• Our approach solves instead the convervative system
∂(gg−1UX)
∂t
∣∣∣∣X
−∇X · FX = 0
∂g
∂t
∣∣∣∣X
−∇X · (gG−1vX) = 0
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, vX
– 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, vX
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/t0)
y(ξ, η, t) = η + 1.5 sin(2πξ/20) sin(πη/7.5) sin(2.0 · 2πt/t0)
• Deformed meshes used for visualization only, everything is computed on
the reference mesh
52
Example: Euler Vortex, Convergence
• Optimal order of convergence O(hp+1) for mapped scheme
10−1
100
10−8
10−6
10−4
10−2
100
Element size h
L 2−er
ror
p=1
p=2
p=3
p=4
p=5
12
1
6
MappedUnmapped
53
Example: Free-stream Preservation
• Solve with initial free-stream solution u0(x, y) = u∞
• L2-error of error u(x, y, T )− u0 with and without g equation
10−1 10010−15
10−10
10−5
100
Element size h
L 2−erro
r
p=1p=1
p=2p=2
p=3 p=3
p=4
p=4p=5
p=5
With Free−stream PreservationWithout Free−stream Preservation
54
Example: Flow around Oscillating Cylinder
• Oscillating unit circle, yc(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
0 5 10 15 20 25 30 35−5
0
5
10
Time
DragLift
Blended Mapping
0 5 10 15 20 25 30 35−5
0
5
10
Time
DragLift
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
0 2 4 6 8 10 12 14 16 18−3
−2
−1
0
1
2
3
Time
Lift (cylinder)Lift (foil)
Drag
0 2 4 6 8 10 12 14 16 18−2
−1
0
1
2
3
Time
Drag (cylinder)Drag (foil)
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 rz(t) = r0 sin ωt (at leading edge)
• Moment equation: Iθ + Cθ − Srz(t) + Maero = 0
– I moment of inertia, C spring stiffness, S = mxc static unbalance
– Maero moment from fluid
rz(t) θ
59
Example: Pitching Airfoil
Low Amplitude
0 10 20 30 40 50 60 70 80 90 100
−0.3
−0.2
−0.1
0
0.1
0.2
0.3
Time
rz
θMDL
High Amplitude
0 10 20 30 40 50 60 70 80 90 100−1.5
−1
−0.5
0
0.5
1
1.5
Time
rz
θMDL
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