anadaptivediscontinuousgalerkin reducedbasiselementmethod...
TRANSCRIPT
An adaptive discontinuous Galerkinreduced basis element method:
application to aerodynamic flows
Masayuki Yano
University of Toronto
Acknowledgment: NSERC
AIAA Aviation 2017Denver, United States
9 June 2017
Problem statement
CFD problem:geometry +flow condition
⇒ state u ⇒ output J(u)
Goal: find J(u) as accurately, efficiently, and reliably as possible.
Claim: automatic error control is a key to achieve this goal.
This talk: focus on discretization (and not modeling) error1. error estimation2. efficient approximation spaces (i.e. mesh, order, . . . )
1
Example 1: adaptive finite element
start from a crude meshgenerate sequence of “optimal” spaces informed by error estimate
V0 → V1 → · · · → Vn.
⇒ ⇒
+ error estimate+ high efficiency relative to “best-practice” meshes− best suited for single-/few-query scenarios
⇒ no reuse of information across cases
2
Example 2: projection-based model reduction (e.g. POD)
designed for parametrized problems in many-query scenariosoffline: collect n snapshots u1, . . . , un
online: approximate solution in Vn ≡ spanuini=1
+ potential for significant online speedup− reduced model is case-specific (i.e. geometry & parametrization)⇒ significant offline training for each case (n ∼ 100+ runs)
Q.
can we eliminate case-specific training and use trainingknowledge across different cases?
3
Example 2: projection-based model reduction (e.g. POD)
designed for parametrized problems in many-query scenariosoffline: collect n snapshots u1, . . . , un
online: approximate solution in Vn ≡ spanuini=1
+ potential for significant online speedup− reduced model is case-specific (i.e. geometry & parametrization)⇒ significant offline training for each case (n ∼ 100+ runs)
Q. can we eliminate case-specific training and use trainingknowledge across different cases?
3
Library-based localized model reduction
Idea: forgo reduction of a specific case,and focus on reducible & reusable features.
Library of reducible featuresExample 1: boundary layers (BLs)− BLs require high resolution− BLs are similarly shaped (Blasius, . . .).
Example 2: trailing edge singularity...
Vision: an intelligent CFD solver for many-query scenarios thatlearns reducible features and accelerates computation.
4
Formulation
DiscretizationReduced basis element (RBE)StabilityError estimation and adaptationRelated work
Formulation
DiscretizationReduced basis element (RBE)StabilityError estimation and adaptationRelated work
Discontinuous Galerkin (DG) method
PDE: steady conservation laws
∇ · F inv(u) +∇ · F visc(u,∇u) = S(u,∇u) in Ω ; (+BCs).
DG: introduce a discontinuous FE space Vn;find un ∈ Vn s.t.
Rn(un, vn) = 0 ∀vn ∈ Vn,x
y
uh(x, y)
Thwhere
Rn(un, vn) = −∫
Ωh
∇vn · F inv(un)dx+
∫Σh
v+n F
inv(· · · )ds+ · · · .
Features:Flexible choice of FE spacesStability for conservation laws
5
Polynomial FE spaces: adaptivity
FE space:
Vn = Vh,p = v ∈ L2(Ω)︸ ︷︷ ︸discontinuous
: (v gq)|κ ∈ Pp(κref)︸ ︷︷ ︸polynomial in
each reference element
, κref ∈ Th,ref︸ ︷︷ ︸tessellation
.
h-adaptivity: uh → u as h→ 0
p-adaptivity: up → u as p→∞
Polynomial spaces with good general approximability in each κ. 6
Formulation
DiscretizationReduced basis element (RBE)StabilityError estimation and adaptationRelated work
Reduced basis element (RBE) [Maday & Rønquist, 2005; . . .]
Idea. Construct spaces with feature-specific approximability.
Discontinuous non-polynomial FE space
Vn = v ∈ L2(Ω) : (v gq)|κ ∈ FEn(κref), κref ∈ Th,ref.
where
FEn(κref) =
RBEN(κref), κ ∈ reducible regionPp(κref), otherwise
.
Reduced basis elements (RBEN) are1. tailored for a specific reducible feature (e.g. BLs)2. hierarchical (N = 1, 2, . . . ).
· · ·7
RBE: offline training
Key: RBEs are not prescribed but are identified through training.
Step 1. Solve training cases
Step 2. Extract BL functions in reference element κref
· · · · · ·Step 3. Identify BL modes using POD → RBEN
· · ·8
RBE: offline training
Step 3 (alternate). Extract 1d wall-normal BL modes
i. Sample BL profile in wall-normal direction
ii. Apply POD to 1d functions → RBE1dN1d
iii. Tensorize RBE1dN1d
with polynomials
RBEN(κref) = RBE1dN1d
(κref,1d)⊗ Pp1d(κref,1d)
9
Formulation
DiscretizationReduced basis element (RBE)StabilityError estimation and adaptationRelated work
Stability
For entropy variables, the discontinuous Galerkin method is stable.[Barth, 1999; Harten 1983; Hughes et al 1986]
Linear equations: energy stability
‖un(T )‖2M ≤ ‖un(0)‖2
M + (inflow data).
Nonlinear equations: (generalized) entropy stability
U(un(T )) ≤ U(un(0)) + (inflow data).
Remarks:RBE: test space does not have good general approximability⇒ entropy stability is crucial.
10
Formulation
DiscretizationReduced basis element (RBE)StabilityError estimation and adaptationRelated work
Output error estimation: dual-weighted residual (DWR)
Adjoint ψ: quantifies sensitivity of output J(u) to disturbances:
R′n(un; vn, ψn) = J ′n(un; vn) ∀vn ∈ Vadjn .
Global error estimate: [Becker & Rannacher, 1996; Ainsworth & Oden, 1998]
E ≡ J(u)− Jn(un) ≈ −Rn(un, ψn).
Element-wise error indicator:
ηκ ≡ |Rn(un, ψn|κ)|, κ ∈ Th.
Note: we also train RBEs for the adjoint.11
Adaptation
EmploySolve︸ ︷︷ ︸DG-RBE
→ Estimate︸ ︷︷ ︸DWR
→ Mark︸︷︷︸fixed-fraction
→ Refine.
Refine: increase dof in a manner equivalent to isotropic p refinement
reducible: RBEN(κ); set N ≡ n21d ← (n1d + 1)2
otherwise: Pp(κ); set p← p+ 1.
12
Formulation
DiscretizationReduced basis element (RBE)StabilityError estimation and adaptationRelated work
Related work
Viscous-inviscid couplingPotential/Euler-IBL [Le Balleur 1978–; Drela & Giles 1987; . . . ]
6= mathematical reduction; error estimation wrt full equation
FEM with non-polynomial, special basis functionsPUM, XFEM, GFEM, DEM, . . .
[Babuška 1994–; Belytschko 1999–; Farhat 2001–; . . . ]
6= analytical functions vs empirical training
Reduced basis element methodsRBE [Maday & Rønquist 2005–; . . . ]
Static-condensation RBE [Patera, Knezevic, & Huynh 2013–; . . . ]
Localized RB multiscale method [Ohlberger & Schindler 2015–]
13
Numerical results
Training setupEuler flow over airfoilLaminar airfoilFlat plate
Numerical results
Training setupEuler flow over airfoilLaminar airfoilFlat plate
Randomized training: NACA 4-digit family
parameter rangecamber 00, 14, 24thickness [0.06, 0.12]M∞ [0.2, 0.5]α [0, 3]Rec [3000, 6000]
boundary layer and trailing edge
Note: only 10 training solves; we train the features, not the case.
14
Numerical results
Training setupEuler flow over airfoilLaminar airfoilFlat plate
NACA 2410 Euler: setup
Case: M∞ = 0.3, α = 1
primal (Mach) adjoint (x-momentum)
RBE Library:1. Euler trailing edge elements (⇐ 10 random NACA cases)
Note: RBE regions are prescribed.
15
NACA 2410 Euler: convergence
103 104
dof
10-4
10-3c d
err
or
1 count
uniform (p=1)ani-hp adaptRBE-adapt
ani-hp adaptation: discrete optimization[Houston 2006; Ceze & Fidkowski 2012]
RBE-adaptation: <1% error using 1012 dof.16
NACA 2410 Euler: convergence with error estimate
103 104
dof
10-4
10-3c d
err
or
1 count
uniform (p=1)ani-hp adaptRBE-adapt
ani-hp adaptation: discrete optimization[Houston 2006; Ceze & Fidkowski 2012]
RBE-adaptation: <1% error using 1012 dof.16
NACA 2410 Euler: dof distribution (error level: 1 count)
p adapt (p ∈ [1, 8])
TE dof: 198
RBE adaptTE dof: 31
Significant TE DOF reduction ⇒ as if singularity does not exist
17
Numerical results
Training setupEuler flow over airfoilLaminar airfoilFlat plate
NACA 2410 laminar: setup
Case: M∞ = 0.3, α = 1, Rec = 5000
primal (Mach) adjoint (x-momentum)
RBE Library:1. NS trailing edge elements (⇐ 10 NACA cases)2. NS boundary layer elements (⇐ 10 NACA cases)
18
NACA 2410 laminar: convergence
103 104
dof
10-4
10-3
10-2
10-1
c d e
rror
1% error
uniform (p=1)ani-hp adaptRBE-adapt
RBE-adaptation: <1% error using 908 dof.
19
NACA 2410 laminar: dof distribution (error level: 1%)
p adapt (p ∈ [1, 7])
BL dof: 693TE dof: 146
RBE adaptationBL dof: 162TE dof: 111
BL DOF reduction ⇒ as if singular perturbation does not exist
20
Numerical results
Training setupEuler flow over airfoilLaminar airfoilFlat plate
Flat plate: setup
Case: M∞ = 0.3, ReL = 5000
primal (Mach) adjoint (x-momentum)
RBE Library:1. NS boundary layer elements (⇐ 10 NACA cases)
note: using existing library; no cases-specific training.
21
Flat plate: convergence
102 103 104
dof
10-4
10-3
10-2
10-1
c d e
rror
1% error
uniform (p=1)ani-hp adaptRBE-adapt
RBE on per with “state-of-the-art” ani-hp adaptation
22
Flat plate: dof distribution (error level: 1%)
p adaptationBL dof: 339LE dof: 164
RBE adaptationBL dof: 84LE dof: 89
+ significant reduction in boundary layer− leading/trailing edge singularities not efficiently resolved
23
Library update
Idea: “learn” from the flat plate (FP) casesidentify reducible and reusable featuresadd the features to the RBE library
RBE Library:1. NS boundary layer elements (⇐ 10 NACA cases)2. NS flat leading-edge elements (⇐ 5 FP cases)3. NS flat trailing-edge elements (⇐ 5 FP cases)
24
Flat plate, new library: dof distribution (error level: 1%)
Old library: NACA boundary layer only
RBE-adapt (BL only)BL dof: 84LE dof: 89TE dof: 74
Updated library: NACA boundary layer & FP leading/trailing edges
RBE-adapt (BL+LE+TE)BL dof: 120LE dof: 13TE dof: 20
+ significant reduction in LE (89→ 13) and TE (74→ 20) dofs.25
Perspectives and summary
DG-RBE method in CFD workflow
Classical adaptive FEM:
case 2
case 1...
case 3
...
...
solver solution 2...
solution 1...
solution 3...
26
DG-RBE method in CFD workflow
Library-based adaptive RBE method:
case 2
case 1...
case 3
...
...
acceleratedsolver
? solution 2...
solution 1...
solution 3...RBE library
Accelerated solve:known, reducible features: apply RBEunknown or irreducible features: apply hp-adaptation⇒ add reducible feature to library for future use
27
Summary
Idea: eliminate case-specific training anduse training knowledge across different cases.⇒ library of RBEs for reducible & reusable features
Ingredients:
RBE library + DG + error estimate + adaptivity.
Open questions: can wedynamically identify features?perform seamless hp/RBE switching?mine existing CFD database to construct a library?
...
28
Backup
POD eigenvalues and modes
Eigenvalues:primal adjoint
0 10 20 30 40n
10-10
10-8
10-6
10-4
10-2
100
6n
comp 1comp 2comp 3comp 4
0 10 20 30 40n
10-8
10-6
10-4
10-2
100
6n
comp 1comp 2comp 3comp 4
Modes: primal, component 2
· · ·29
Anisotropy detection
Discrete localized error sampling [Houston 2006-, Ceze & Fidkowski 2011-]
1. consider i = 1, . . . , nconfig split configurations
2. solve local problems (primal only)
find uin ∈ V in s.t. Rn(uin, vn) = 0 ∀vn ∈ V in
3. estimate local error (implicit local Galerkin orthogonality)
ηκi ≡ |Rn(uin, ψn|κ) = infvin∈Vi
n
|Rn(uin, (ψn − vin)|κ)
4. select configuration
i? ≡ maxi=1,...,nconfig
|ηκi/ηκ||dofκi |/|dofκ|
30
Perspective: general vs specialized spectrum
adaptive FEMglobal-snapshotmodel reduction
adaptive RBE
“bad” lib. “good” lib.
approximation space Vngeneral specific
offline/training costnone high
marginal evaluation costhigh low (?)
scenarios: # queriessingle many
31
Perspective: general vs specialized spectrum
adaptive FEMglobal-snapshotmodel reduction
adaptive RBE
“bad” lib. “good” lib.
approximation space Vngeneral specific
offline/training costnone high
marginal evaluation costhigh low (?)
scenarios: # queriessingle many
31
Perspective: general vs specialized spectrum
adaptive FEMglobal-snapshotmodel reduction
adaptive RBE
“bad” lib. “good” lib.
approximation space Vngeneral specific
offline/training costnone high
marginal evaluation costhigh low (?)
scenarios: # queriessingle many
31
Perspective: general vs specialized spectrum
adaptive FEMglobal-snapshotmodel reduction
adaptive RBE
“bad” lib. “good” lib.
approximation space Vngeneral specific
offline/training costnone high
marginal evaluation costhigh low (?)
scenarios: # queriessingle many
31
Adjoint approximation
Adjoint approximability is critical for1. effective error estimate2. accurate prediction (i.e. implicit “output superconvergence”)
|J(u)− Jn(un)| = infvn∈Vn
|Rn(un, ψ − vn)|
Two optionsO1 Construct an adjoint-specific RBE spaces
Vadjn = v ∈ L2(Ω) : (v gq)|κ ∈ FEadj
n (κref), κref ∈ Th,ref.
O2 Include both primal and adjoint solution in POD processing
FEadjn = FE = POD(uBL
1 , . . . , uBLm ∪ ψBL
1 , . . . , ψBLm )
32
Adjoint approximation
Adjoint approximability is critical for1. effective error estimate2. accurate prediction (i.e. implicit “output superconvergence”)
|J(u)− Jn(un)| = infvn∈Vn
|Rn(un, ψ − vn)|
Two optionsO1 Construct an adjoint-specific RBE spaces
Vadjn = v ∈ L2(Ω) : (v gq)|κ ∈ FEadj
n (κref), κref ∈ Th,ref.
O2 Include both primal and adjoint solution in POD processing
FEadjn = FE = POD(uBL
1 , . . . , uBLm ∪ ψBL
1 , . . . , ψBLm )
32
RBE: implementation
Note: evaluation of Rn(wn, vn) requires evaluation of basis functionsat quadrature points.
Approach:1. Represent RBE basis as piecewise high-order polynomials
φRBEi (x) =
∑j
wijφpolyj (x), x ∈ κsub ⊂ κref ;
2. Apply piecewise Gauss quadrature
Remark: Gauss quadrature is non-optimal for the specialized basis⇒ hyper-reduction can be applied [Ryckelynck 2005; . . . ]
33