block-structured adaptive mesh renementcalhoun/ · structured amr turbulent v-flame Œ p. 2/21....

24
Block-Structured Adaptive Mesh Refinement Lecture 4 Geometry – Embedded Boundary – Software support embedded boundaries Turbulent V-Flame – p. 1/21

Upload: others

Post on 16-Jul-2020

5 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Block-Structured Adaptive Mesh Renementcalhoun/ · structured AMR Turbulent V-Flame Œ p. 2/21. Approaches to geometry Curvilinear adaptive grids ... r˚ r˜ dx = Z V r˜ dx Youngs

Block-Structured Adaptive MeshRefinement

Lecture 4Geometry

– Embedded Boundary– Software support embedded boundaries

Turbulent V-Flame – p. 1/21

Page 2: Block-Structured Adaptive Mesh Renementcalhoun/ · structured AMR Turbulent V-Flame Œ p. 2/21. Approaches to geometry Curvilinear adaptive grids ... r˚ r˜ dx = Z V r˜ dx Youngs

Approaches to geometry

Curvilinear adaptive grids

Over set grid – generalizes curvilinear

Embedded boundary or CartesianGrid methods

Grid generation is tractable –CART3DDiscretization issues arewell-understood away fromboundary

Straightforward coupling tostructured AMR

Turbulent V-Flame – p. 2/21

Page 3: Block-Structured Adaptive Mesh Renementcalhoun/ · structured AMR Turbulent V-Flame Œ p. 2/21. Approaches to geometry Curvilinear adaptive grids ... r˚ r˜ dx = Z V r˜ dx Youngs

Approaches to geometry

Curvilinear adaptive grids

Over set grid – generalizes curvilinear

Embedded boundary or CartesianGrid methods

Grid generation is tractable –CART3DDiscretization issues arewell-understood away fromboundary

Straightforward coupling tostructured AMR

-0.60 -0.55 -0.50 -0.45 -0.40 -0.35

-0.10

-0.05

0.00

0.05

0.10

Turbulent V-Flame – p. 2/21

Page 4: Block-Structured Adaptive Mesh Renementcalhoun/ · structured AMR Turbulent V-Flame Œ p. 2/21. Approaches to geometry Curvilinear adaptive grids ... r˚ r˜ dx = Z V r˜ dx Youngs

Approaches to geometry

Curvilinear adaptive grids

Over set grid – generalizes curvilinear

Embedded boundary or CartesianGrid methods

Grid generation is tractable –CART3DDiscretization issues arewell-understood away fromboundary

Straightforward coupling tostructured AMR

Turbulent V-Flame – p. 2/21

Page 5: Block-Structured Adaptive Mesh Renementcalhoun/ · structured AMR Turbulent V-Flame Œ p. 2/21. Approaches to geometry Curvilinear adaptive grids ... r˚ r˜ dx = Z V r˜ dx Youngs

Approaches to geometry

Curvilinear adaptive grids

Over set grid – generalizes curvilinear

Embedded boundary or CartesianGrid methods

Grid generation is tractable –CART3DDiscretization issues arewell-understood away fromboundary

Straightforward coupling tostructured AMR References

Chern and Colella, 1987

Youngs et al., 1990

Berger and Leveque, 1991

Pember et al., 1994

Johansen and Colella 1998

Colella et al., to appear

Turbulent V-Flame – p. 2/21

Page 6: Block-Structured Adaptive Mesh Renementcalhoun/ · structured AMR Turbulent V-Flame Œ p. 2/21. Approaches to geometry Curvilinear adaptive grids ... r˚ r˜ dx = Z V r˜ dx Youngs

PreliminariesPrimary variables defined at cell centers

Λc – Volume fraction of cut cell ≡ Vc/h2

α – aperture ≡ edge length

Solve multiphysics applications using EB &AMR

Develop solvers for classical PDEs

Decompose applications into compo-nent processes

IssuesAccuracy

Stability

h

hαB

αS

Λ

Turbulent V-Flame – p. 3/21

Page 7: Block-Structured Adaptive Mesh Renementcalhoun/ · structured AMR Turbulent V-Flame Œ p. 2/21. Approaches to geometry Curvilinear adaptive grids ... r˚ r˜ dx = Z V r˜ dx Youngs

EB – Conservation Laws

Ut + ~F (U) = 0

Finite volume discretizaton

∫ tn+1

tn

∫C

Ut + ~F dx dt = 0

h2ΛcUn+1 = h2ΛcU

n + ∆t(∑

s

αsFs + αBFB)

or

Un+1 = Un +∆t

h2Λc(∑

s

αsFs + αBFB)

where Fs and FB are explicitly computed fluxes

How to compute fluxes

How to handle small-cell stability

C

Turbulent V-Flame – p. 4/21

Page 8: Block-Structured Adaptive Mesh Renementcalhoun/ · structured AMR Turbulent V-Flame Œ p. 2/21. Approaches to geometry Curvilinear adaptive grids ... r˚ r˜ dx = Z V r˜ dx Youngs

Fluxes – version 1There are several variations on how to do these things

A simple way to compute fluxes

Extend state to compute fluxes usingGodunov scheme for all edges of a cut cell

Volume weighted sum of values in aneighborhood of point

Modify Godonov scheme to use"essential" stencil for edges with αs = 0

FB computed by solving Riemann problemin local coordinates to boundary

FB

Turbulent V-Flame – p. 5/21

Page 9: Block-Structured Adaptive Mesh Renementcalhoun/ · structured AMR Turbulent V-Flame Œ p. 2/21. Approaches to geometry Curvilinear adaptive grids ... r˚ r˜ dx = Z V r˜ dx Youngs

Update

One could update using

Un+1,cu = Un +∆t

h2Λc

∑s

αsFs + αBFB

This defines a conservative update but the timestep for cut cells decreases as Λc decreases.

We would like a conservative update that is sta-ble at full-cell CFL

Define a reference state

Un+1,ref = Un +∆t

h2

∑s

Fs

which represents update as though there wereno boundary in the cut cell

C

Turbulent V-Flame – p. 6/21

Page 10: Block-Structured Adaptive Mesh Renementcalhoun/ · structured AMR Turbulent V-Flame Œ p. 2/21. Approaches to geometry Curvilinear adaptive grids ... r˚ r˜ dx = Z V r˜ dx Youngs

Update cont’dDefine

δM = h2Λc(Un+1,cu − Un+1,ref )

Compute stable update

Un+1,p = Un+1,ref +δM

h2

Redistribute (1 − Λc)δM to neighboring cells

Volume weighted

Mass weighted (gas dynamics)

Λ δM 1 − Λ δM

Recover full CFL time stepTurbulent V-Flame – p. 7/21

Page 11: Block-Structured Adaptive Mesh Renementcalhoun/ · structured AMR Turbulent V-Flame Œ p. 2/21. Approaches to geometry Curvilinear adaptive grids ... r˚ r˜ dx = Z V r˜ dx Youngs

Enhancements to base algorithm

Extended states (Colella et al., to appear)

Extrapolate along normal direction

Do not use data in adjacent cell

Fluxes (Johansen and Colella, JCP 1998)

Interpolate fluxed to centroid of edges

Higher-order boundary flux in normal direction

Turbulent V-Flame – p. 8/21

Page 12: Block-Structured Adaptive Mesh Renementcalhoun/ · structured AMR Turbulent V-Flame Œ p. 2/21. Approaches to geometry Curvilinear adaptive grids ... r˚ r˜ dx = Z V r˜ dx Youngs

AnalysisModified equation

∂Umod

∂t+ ∂ ~F (Umod) = τ

τ localized

O(h2) interior

O(h/Λ) at boundary

Error

O(h2) is boundary is noncharacteristic

O(h) in L∞ and O(h2) in L1 if boundary is characteristic

Turbulent V-Flame – p. 9/21

Page 13: Block-Structured Adaptive Mesh Renementcalhoun/ · structured AMR Turbulent V-Flame Œ p. 2/21. Approaches to geometry Curvilinear adaptive grids ... r˚ r˜ dx = Z V r˜ dx Youngs

Poisson equation

Solve elliptic PDE on embedded boundary

∆φ = ρ

Want a cell-centered finite volume discretiza-tion

∇ · ∇φ = ρ

so ∇φ acts like a flux

∑s

αs∂φ

∂n s+ αB

∂φ

∂nB= Λch

Turbulent V-Flame – p. 10/21

Page 14: Block-Structured Adaptive Mesh Renementcalhoun/ · structured AMR Turbulent V-Flame Œ p. 2/21. Approaches to geometry Curvilinear adaptive grids ... r˚ r˜ dx = Z V r˜ dx Youngs

EB Poisson discretizationEvalute ∂φ/∂n using Johansen–Colella fluxLeads to well-conditioned linear system withapproximately "elliptic" spectral properties

Modified equation gives

∆φh = ρ + τ

where τ is first-order near boundary andsecond-order away from boundary

Smoothing property of inverse operator giveserror, φ − φh = ∆−1τ = O(h2)

However the matrix is notSymmetric

M-Matrix

Turbulent V-Flame – p. 11/21

Page 15: Block-Structured Adaptive Mesh Renementcalhoun/ · structured AMR Turbulent V-Flame Œ p. 2/21. Approaches to geometry Curvilinear adaptive grids ... r˚ r˜ dx = Z V r˜ dx Youngs

Extension to three dimensionsTwo possible approaches to extend Johansen–Colella flux to threedimension

Linear interpolation is unstable; but, bilinear is stable

Turbulent V-Flame – p. 12/21

Page 16: Block-Structured Adaptive Mesh Renementcalhoun/ · structured AMR Turbulent V-Flame Œ p. 2/21. Approaches to geometry Curvilinear adaptive grids ... r˚ r˜ dx = Z V r˜ dx Youngs

Poisson solution error – 3D

grid ‖ε‖∞

p∞ ‖ε‖2 p2 ‖ε‖1 p1

163 4.80 × 10−4 — 5.17 × 10−5 — 1.83 × 10−5 —323 1.06 × 10−4 2.17 1.25 × 10−5 2.05 4.41 × 10−6 2.05643 2.43 × 10−5 2.13 3.07 × 10−6 2.02 1.09 × 10−6 2.02

Turbulent V-Flame – p. 13/21

Page 17: Block-Structured Adaptive Mesh Renementcalhoun/ · structured AMR Turbulent V-Flame Œ p. 2/21. Approaches to geometry Curvilinear adaptive grids ... r˚ r˜ dx = Z V r˜ dx Youngs

Nodal Projection

Projection performs the decomposition

V = Ud + ∇φ

For cut cells, view as extension of finite elementbasis extended to cover all of the cut cell

Projection uses homogeneous Neumann bound-ary conditions at cut cell boundaries

Gives a weak form∫Ω

∇φ · ∇χ dx =

∫Ω

V · ∇χ dx

Youngs et al. – Full potential adaptive transonicflow solver

Turbulent V-Flame – p. 14/21

Page 18: Block-Structured Adaptive Mesh Renementcalhoun/ · structured AMR Turbulent V-Flame Œ p. 2/21. Approaches to geometry Curvilinear adaptive grids ... r˚ r˜ dx = Z V r˜ dx Youngs

Multiphysics application

Industrial burnerLow Mach numbercombustion formuationAxisymmetric flow

k − ε turbulence modelLaw of the wall

Discrete ordinates radia-tion

burner axis

.762 m

.381 m

1.651 m

.219 m

.3 m

1.0668 m

burner swirling air

naturalgas

Turbulent V-Flame – p. 15/21

Page 19: Block-Structured Adaptive Mesh Renementcalhoun/ · structured AMR Turbulent V-Flame Œ p. 2/21. Approaches to geometry Curvilinear adaptive grids ... r˚ r˜ dx = Z V r˜ dx Youngs

Burner simulation results

Temperature K

CO2 mass frac

CO mass frac

CH4 mass frac

Radial velocity m/sec

Axial velocity m/sec

Turbulent V-Flame – p. 16/21

Page 20: Block-Structured Adaptive Mesh Renementcalhoun/ · structured AMR Turbulent V-Flame Œ p. 2/21. Approaches to geometry Curvilinear adaptive grids ... r˚ r˜ dx = Z V r˜ dx Youngs

Burner experimental comparisons

0.0 0.2 0.4

r (m)

-20.0

0.0

20.0

40.0

Axia

l velo

city (

m/s

)

measured

unsteady

steady

0.0 0.2 0.4

r (m)

0.0

5.0

10.0

Tang. velo

city (

m/s

)

measured

unsteady

steady

0.0 0.2 0.4

r (m)

0.0

500.0

1000.0

1500.0

2000.0

Tem

p (

K)

measured

unsteady

steady

0.0 0.2 0.4

r (m)

0.0

2.0

4.0

CO

(%

mol)

measured

unsteady

steady

0.0 0.2 0.4

r (m)

0.0

5.0

10.0

CO

2 (

% m

ol)

measured

unsteady

steady

0.0 0.2 0.4

r (m)

0.0

5.0

10.0

15.0

20.0

O2

(%

mol)

measured

unsteady

steady

Turbulent V-Flame – p. 17/21

Page 21: Block-Structured Adaptive Mesh Renementcalhoun/ · structured AMR Turbulent V-Flame Œ p. 2/21. Approaches to geometry Curvilinear adaptive grids ... r˚ r˜ dx = Z V r˜ dx Youngs

AMR considerationsEmbedded boundary + structured AMR is basically straightforward

If coarse / fine boundaries aren’t near the embedded boundary thereis basically nothing to do

When coarse / fine boundaries intersect cut cellsModify hyperbolic redistribution

Follows basic AMR design principlesKeep track of redistributions across coarse / fine boundaryAdjust data to correct errors (analogous to reflux)

Modify Johansen – Colella flux formulaeDrop to first-order for hyperbolic if necessaryUse first-order least squares fit to define boundary flux for ellipticSince these modifications are localized to a co-dimension 2 subset

of the domain they do not effect accuracy

Turbulent V-Flame – p. 18/21

Page 22: Block-Structured Adaptive Mesh Renementcalhoun/ · structured AMR Turbulent V-Flame Œ p. 2/21. Approaches to geometry Curvilinear adaptive grids ... r˚ r˜ dx = Z V r˜ dx Youngs

Embedded Boundary SoftwareGrid generation software – Cart3D

Component based approach

Fix-up triangulations

Generate cut cell informationhttp://people.nas.nasa.gov/ aftosmis/cart3d/cart3Dhome.html

Turbulent V-Flame – p. 19/21

Page 23: Block-Structured Adaptive Mesh Renementcalhoun/ · structured AMR Turbulent V-Flame Œ p. 2/21. Approaches to geometry Curvilinear adaptive grids ... r˚ r˜ dx = Z V r˜ dx Youngs

Packages supporting EB discretizationsEBChombo – LBNL

BEARCLAW – Univ. of Washington and Univ. of North Carolina

CART3D – NASA Ames

It is beyond the scope of this lecture to discuss EB software issues in detail

We can examine the analogs of some of the data structures discussedbefore

Turbulent V-Flame – p. 20/21

Page 24: Block-Structured Adaptive Mesh Renementcalhoun/ · structured AMR Turbulent V-Flame Œ p. 2/21. Approaches to geometry Curvilinear adaptive grids ... r˚ r˜ dx = Z V r˜ dx Youngs

EB Software Design – EBChombo

We generalize rectangular array abstrac-tions to represent more general generalgraphs that map into the rectangular lat-tice Z

D. The nodes of the graph arethe control volumes, while the arcs of thegraph are the faces across which fluxesare defined.

BoxLib EB ChomboZD – EBIndexSpace

Index IntVect VolIndex, FaceIndex

Region of ZD Box EBISBox

Union of rectangles BoxArray EBISLayout

Rectangular array Fab EBCellFAB, EBFaceFAB

Looping construct FabIterator VoFIterator, FaceIterator

Turbulent V-Flame – p. 21/21