26
Shock Capturing for High-Order Discontinuous Galerkin Simulation of Transient Flow Problems Per-Olof Persson Department of Mathematics, University of California, Berkeley Mathematics Department, Lawrence Berkeley National Laboratory SIAM Conference on Computational Science and Engineering Boston, Massachusetts February 27, 2013

Shock Capturing for High-Order Discontinuous Galerkin ...persson.berkeley.edu/pub/persson13siamcse_shock.pdfShock Capturing for High-Order Discontinuous Galerkin Simulation of Transient

Embed Size (px)

Citation preview

Page 1: Shock Capturing for High-Order Discontinuous Galerkin ...persson.berkeley.edu/pub/persson13siamcse_shock.pdfShock Capturing for High-Order Discontinuous Galerkin Simulation of Transient

Shock Capturing for High-Order Discontinuous GalerkinSimulation of Transient Flow Problems

Per-Olof Persson

Department of Mathematics, University of California, BerkeleyMathematics Department, Lawrence Berkeley National Laboratory

SIAM Conference on Computational Science and EngineeringBoston, Massachusetts

February 27, 2013

Page 2: Shock Capturing for High-Order Discontinuous Galerkin ...persson.berkeley.edu/pub/persson13siamcse_shock.pdfShock Capturing for High-Order Discontinuous Galerkin Simulation of Transient

Motivation

High-order methods for fluids and structures are getting

sufficiently mature to handle realistic problems

Three major issues remain:

Computational cost, compared toFVM/FDM/etcNonlinear stability, robustness (forshocks, turbulence modeling,under-resolved features)High-order CAD and meshes

Our goal is to address these

challenges by a range of new

developments, and ultimately to

make these methods competitive

for real-world problems

Page 3: Shock Capturing for High-Order Discontinuous Galerkin ...persson.berkeley.edu/pub/persson13siamcse_shock.pdfShock Capturing for High-Order Discontinuous Galerkin Simulation of Transient

Discontinuous Galerkin Discretization for Fluids

High-order nodal-DG method for unstructured simplex meshes

Compressible Navier-Stokes equations, Roe’s numerical fluxes

CDG fluxes for second-order terms [Peraire/Persson 2008],

=⇒ High level of sparsity in Jacobian matrices

Implicit time integration by matrix-based Newton-Krylov solversL-stable Diagonally Implicit Runge-Kutta(DIRK) methodsBlock-ILU(0) preconditioners andautomatic element ordering[Persson/Peraire ’08]Implicit-Explicit Runge-Kutta schemesfor LES-type problems [Persson ’11]

1

1

2

2

3

3

4

4

and

and

CDG :

LDG :

BR2 :

Page 4: Shock Capturing for High-Order Discontinuous Galerkin ...persson.berkeley.edu/pub/persson13siamcse_shock.pdfShock Capturing for High-Order Discontinuous Galerkin Simulation of Transient

Parallel Solvers

Implicit solvers typically required because of CFL restrictions from

viscous effects, low Mach numbers, and adaptive/anisotropic gridsJacobian matrices are large even at p = 2 or p = 3, however:

They are required for non-trivial preconditionersThey are very expensive to recompute

Distributed parallel solvers developed in [Persson ’09]

Parallelization to 1000’s of

processes by domain

decomposition

Close to perfect speedup for

time accurate simulations

Page 5: Shock Capturing for High-Order Discontinuous Galerkin ...persson.berkeley.edu/pub/persson13siamcse_shock.pdfShock Capturing for High-Order Discontinuous Galerkin Simulation of Transient

Artificial Viscosity for Underresolved Features

Cannot resolve all solution features (shocks, RANS, singularities)

Low dissipation makes DG sensitive to underresolution

Detect by sensors and add viscosity [Persson/Peraire 2006]

Enables shock capturing with sub-cell resolution and robust

solution of Spalart-Alamaras RANS model

Mach Sensor

Page 6: Shock Capturing for High-Order Discontinuous Galerkin ...persson.berkeley.edu/pub/persson13siamcse_shock.pdfShock Capturing for High-Order Discontinuous Galerkin Simulation of Transient

Shock Sensor

Regularity of solution determined from the decay rate of

expansion coefficients in orthogonal basis

Example: Periodic Fourier case: f (x) =∑∞

k=−∞ gkeikx

If f (x) has m continuous derivatives→ |gk| ∼ k−(m+1)

For simplices: Expand solution in orthonormal Koornwinder basis:

u =

N(p)∑i=1

uiψi, u =

N(p−1)∑i=1

uiψi, se = log10

((u − u, u − u)e

(u, u)e

)Determine elemental piecewise constant εe

εe =

0 if se < s0 − κε02

(1 + sin π(se−s0)

)if s0 − κ ≤ se ≤ s0 + κ

ε0 if se > s0 + κ

.

where ε0 ∼ h/p, s0 ∼ 1/p4 and κ empirical

Page 7: Shock Capturing for High-Order Discontinuous Galerkin ...persson.berkeley.edu/pub/persson13siamcse_shock.pdfShock Capturing for High-Order Discontinuous Galerkin Simulation of Transient

Nonlinear stabilization using artificial viscosity

Highly sensitive yet selective sensor

General, applicable to any type of under-resolved features

Allows for full Newton convergence of coupled system

(Navier-Stokes + sensor)

Page 8: Shock Capturing for High-Order Discontinuous Galerkin ...persson.berkeley.edu/pub/persson13siamcse_shock.pdfShock Capturing for High-Order Discontinuous Galerkin Simulation of Transient

Continuous viscosity for moving shocks

Element-wise sensor gives discontinuous artificial viscosity, which

introduces new oscillations, in particular for moving features

Enforce continuity by simple approach: Node-wise maximum from

neighboring elements, P1 interpolation between nodes

Page 9: Shock Capturing for High-Order Discontinuous Galerkin ...persson.berkeley.edu/pub/persson13siamcse_shock.pdfShock Capturing for High-Order Discontinuous Galerkin Simulation of Transient

Effect of varying levels of sensor smoothness

Consider three levels of smoothness:1 Piecewise constant2 C0 piecewise linear3 C2 spline

Significant improvement with

continuity, but only minor differences

with higher levels of smoothness

0.5 0.55 0.6 0.65 0.7 0.75 0.80

0.001

0.002

0.003

0.004

0.005

0.006

0.007

0.008

0.009

0.01

Piecewise constant

C0

C2

0.5 0.55 0.6 0.65 0.7 0.75 0.8

−0.4

−0.2

0

0.2

0.4

0.6

0.8

1

1.2

1.4

1.6

Piecewise constant

C0

C2

Page 10: Shock Capturing for High-Order Discontinuous Galerkin ...persson.berkeley.edu/pub/persson13siamcse_shock.pdfShock Capturing for High-Order Discontinuous Galerkin Simulation of Transient

Sensor continuity in 2-D

Similar advantages in higher dimensions

C0 continuity by node-wise maximum from neighboring elements,

P1 interpolation between nodes

Piecewise constant C0 continuous

Page 11: Shock Capturing for High-Order Discontinuous Galerkin ...persson.berkeley.edu/pub/persson13siamcse_shock.pdfShock Capturing for High-Order Discontinuous Galerkin Simulation of Transient

Solver considerations

The interpolated sensor widens the stencil and complicates thecalculation of exact Jacobians

For time-accurate solutions, it is sufficient to couple the sensorweakly to the Navier-Stokes equationsUse constant sensor per timestep, based on last solutionFor steady-state solutions, increase time-steps adaptively

Additional stabilization and robustness:

Penalize jumps for viscous terms (C11 in LDG/CDG)L-stable time integrators, adaptivity in ∆t and order of accuracy

Implicit solver efficiency:

For time-accurate solutions, reuse Jacobian matrices for severalstages and/or timestepsMajority of time spent in Krylov solvers

Page 12: Shock Capturing for High-Order Discontinuous Galerkin ...persson.berkeley.edu/pub/persson13siamcse_shock.pdfShock Capturing for High-Order Discontinuous Galerkin Simulation of Transient

Parallel performance and timings

Sample run on a single node / 16 cores (double mach reflection)

Only one Jacobian evaluation per timestep

Page 13: Shock Capturing for High-Order Discontinuous Galerkin ...persson.berkeley.edu/pub/persson13siamcse_shock.pdfShock Capturing for High-Order Discontinuous Galerkin Simulation of Transient

Example: Woodward-Colella forward-facing step

Ma = 3, p = 3

3rd order accurate

implicit DIRK3 scheme

Small elements at

corner singularity

handled efficiently by

implicit solver

Top: Mesh

Middle: Density

Bottom: Artificial

viscosity

2 refinements

Page 14: Shock Capturing for High-Order Discontinuous Galerkin ...persson.berkeley.edu/pub/persson13siamcse_shock.pdfShock Capturing for High-Order Discontinuous Galerkin Simulation of Transient

Example: Woodward-Colella forward-facing step

Ma = 3, p = 3

3rd order accurate

implicit DIRK3 scheme

Small elements at

corner singularity

handled efficiently by

implicit solver

Top: Mesh

Middle: Density

Bottom: Artificial

viscosity

3 refinements

Page 15: Shock Capturing for High-Order Discontinuous Galerkin ...persson.berkeley.edu/pub/persson13siamcse_shock.pdfShock Capturing for High-Order Discontinuous Galerkin Simulation of Transient

Woodward-Colella double mach reflection

Hypersonic flow, Ma = 10

Polynomial degree p = 3

3rd order accurate implicit

DIRK3 scheme

Top: Density

Bottom: Artificial viscosity

Page 16: Shock Capturing for High-Order Discontinuous Galerkin ...persson.berkeley.edu/pub/persson13siamcse_shock.pdfShock Capturing for High-Order Discontinuous Galerkin Simulation of Transient

Implosion

Unit square, initial conditions

zero velocity and pressure /

density jump along a diagonal

Left: Density

Right: Artificial viscosity

Page 17: Shock Capturing for High-Order Discontinuous Galerkin ...persson.berkeley.edu/pub/persson13siamcse_shock.pdfShock Capturing for High-Order Discontinuous Galerkin Simulation of Transient

Implosion

Good test for symmetry, using low quality

unstructured mesh

Page 18: Shock Capturing for High-Order Discontinuous Galerkin ...persson.berkeley.edu/pub/persson13siamcse_shock.pdfShock Capturing for High-Order Discontinuous Galerkin Simulation of Transient

3-D Transonic Flow over Tapered Wing

Freestream Ma = 0.8, AoA = 3◦

Right: Mesh, p = 3

Down: Artificial viscosity

Bottom right: Pressure

Page 19: Shock Capturing for High-Order Discontinuous Galerkin ...persson.berkeley.edu/pub/persson13siamcse_shock.pdfShock Capturing for High-Order Discontinuous Galerkin Simulation of Transient

Turbulent flow, RANS modeling

Turbulence models, such as the Spalart-Allmaras one-equation

model, often have small features that cannot be resolved

Use sensor and artificial viscosity to regularize solution

Example: S-A, sense ν, apply Laplacian viscosity to turbulence

model equation [Nguyen/Persson/Peraire 2007]

Page 20: Shock Capturing for High-Order Discontinuous Galerkin ...persson.berkeley.edu/pub/persson13siamcse_shock.pdfShock Capturing for High-Order Discontinuous Galerkin Simulation of Transient

Flow over flat plate

Standard test problem

S-A turbulence model, p = 3

0 2 4 6 8 10 12 14

x 106

0

1

2

3

4

5

6x 10

−3

Present studyExperiment

10−1

100

101

102

103

104

0

5

10

15

20

25

30

Present studyExperiment

Page 21: Shock Capturing for High-Order Discontinuous Galerkin ...persson.berkeley.edu/pub/persson13siamcse_shock.pdfShock Capturing for High-Order Discontinuous Galerkin Simulation of Transient

Detached Eddy Simulation (DES)

DES [Spalart 1997]: Hybrid RANS/LES model for separated flow

Edge of boundary layer moving – use continuous sensor and AV

Example: Flow around cylinder, Re = 1 million, Mach = 0.2

URANS DES

Page 22: Shock Capturing for High-Order Discontinuous Galerkin ...persson.berkeley.edu/pub/persson13siamcse_shock.pdfShock Capturing for High-Order Discontinuous Galerkin Simulation of Transient

Delayed Detached Eddy Simulation (DDES)

Standard DES suffers grid grid-induced separation problems

Example: Flat plate over-refined stream-wise

DDES: Switch the subgrid scale formulation in S-A to d

Recovers RANS boundary layer without affecting LES region

d = d − fdmax(0, d − CDES∆)

fd = 1− tanh([8rd]3)

rd =ν + ν

(Ui,jUi,j)0.5k2d2

0 0.02 0.04 0.06 0.08 0.10

1

2x 10

−4

RANSDESDDES

Page 23: Shock Capturing for High-Order Discontinuous Galerkin ...persson.berkeley.edu/pub/persson13siamcse_shock.pdfShock Capturing for High-Order Discontinuous Galerkin Simulation of Transient

Cylinder – Detached Eddy Simulation

Model problem: Flow

over cylinder,

Re = 2 · 106

Top: Mach number

Bottom: Eddy viscosity

Page 24: Shock Capturing for High-Order Discontinuous Galerkin ...persson.berkeley.edu/pub/persson13siamcse_shock.pdfShock Capturing for High-Order Discontinuous Galerkin Simulation of Transient

Cylinder – Unsteady RANS

URANS highly

dissipative for

separated flows

Page 25: Shock Capturing for High-Order Discontinuous Galerkin ...persson.berkeley.edu/pub/persson13siamcse_shock.pdfShock Capturing for High-Order Discontinuous Galerkin Simulation of Transient

Cylinder – Delayed Detached Eddy Simulation

Model problem: Flow

over cylinder,

Re = 3 · 106

Top right: Mach

Bottom right: Eddy

visc.

Below: CD and CL

0 10 20 30 40 50 60 70 80−2

−1

0

1

2

3

4

Time

Drag

Lift

Page 26: Shock Capturing for High-Order Discontinuous Galerkin ...persson.berkeley.edu/pub/persson13siamcse_shock.pdfShock Capturing for High-Order Discontinuous Galerkin Simulation of Transient

Conclusions and summary

Artificial viscosity based nonlinear stabilization:

Highly selective, general purpose, sensorC0 continuous artificial viscositySensor weakly coupled to equations – linearization not required

Implicit solver allows for adaptivity, additional stabilization, without

impairing the CFL condition

Reuse Jacobian matrices for efficient time integration

Delayed Detached Eddy Simulation for separated turbulent flow

Current work includes:

3D applicationsFurther performance improvements in solvers