recent advances in agglomerated multigrid · – developed agglomeration method preserving features...

40
Recent Advances in Agglomerated Multigrid Hiroaki Nishikawa, Boris Diskin, National Institute of Aerospace James L. Thomas, Dana P. Hammond NASA Langley Research Center AIAA Aerospace Sciences Meeting Wednesday January 9, 2013 Joint Fluid Dynamics and Meshing/Visualizaton Session Grapevine, TX 1 Tuesday, December 25, 12

Upload: others

Post on 18-Oct-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Recent Advances in Agglomerated Multigrid · – Developed agglomeration method preserving features of geometry (2010) – Critically assessed multigrid for diffusion (2010), identified

Recent Advances in Agglomerated Multigrid

Hiroaki Nishikawa, Boris Diskin, National Institute of Aerospace

James L. Thomas, Dana P. HammondNASA Langley Research Center

AIAA Aerospace Sciences MeetingWednesday January 9, 2013

Joint Fluid Dynamics and Meshing/Visualizaton SessionGrapevine, TX

1Tuesday, December 25, 12

Page 2: Recent Advances in Agglomerated Multigrid · – Developed agglomeration method preserving features of geometry (2010) – Critically assessed multigrid for diffusion (2010), identified

Purpose

Improve efficiency of Reynolds-Averaged Navier-Stokes (RANS) simulations for complex-geometry and complex-flow applications- Unstructured compressible flow method (FUN3D)- Spalart-Allmaras 1-equation turbulence model- Multigrid with agglomerated coarse grids

2Tuesday, December 25, 12

Page 3: Recent Advances in Agglomerated Multigrid · – Developed agglomeration method preserving features of geometry (2010) – Critically assessed multigrid for diffusion (2010), identified

Previous Work• Agglomerated multigrid methods well suited to unstructured grids

– Nonlinear multigrid from 1977 – Agglomeration methods from 1987– Speedups observed but gains fall short of gains for inviscid or laminar flows

• Current approach extends hierarchical multigrid method (1999) to unstructured grids– Assessed defect correction for compressible Euler (2010)– Developed agglomeration method preserving features of geometry (2010)– Critically assessed multigrid for diffusion (2010), identified by

Venkatakrishnan (1996) as weakest part of agglomeration– Applied to complex inviscid/laminar/turbulent flows (2010/2011)

3Tuesday, December 25, 12

Page 4: Recent Advances in Agglomerated Multigrid · – Developed agglomeration method preserving features of geometry (2010) – Critically assessed multigrid for diffusion (2010), identified

FMG Cycle

Residual

20 40 60 80

10-12

10-10

10-8

10-6

10-4

FMG Cycle

DragCoefficient

20 40 60 80-0.005

0

0.005

0.01

0.015

0.02

0.025

0.03

0.035

0.04

Vassberg and Jameson

Multigrid for Euler (2011)NACA 0012 airfoil; M= 0.5; Alpha =1.25

Subsonic NACA 0012 airfoil, Fast convergence on all 5 grids

Convergence below discretization errors after one cycle on each grid

Full Multigrid Cycle Full Multigrid Cycle

Grids: 1 52 43

4Tuesday, December 25, 12

Page 5: Recent Advances in Agglomerated Multigrid · – Developed agglomeration method preserving features of geometry (2010) – Critically assessed multigrid for diffusion (2010), identified

Multigrid for Diffusion (2010)DLR F6 Wing-Body Grids

5Tuesday, December 25, 12

Page 6: Recent Advances in Agglomerated Multigrid · – Developed agglomeration method preserving features of geometry (2010) – Critically assessed multigrid for diffusion (2010), identified

Time for coarse-grid generation is included.

Multigrid for Diffusion (2010)DLR F6 Wing-Body

Single Grid

Computer Time

Convergence 50 times faster with multigrid• Consistent coarse grid discretization• Prismatic layers• Line implicit solves and coarsening

Res

idua

l

Multigrid

6Tuesday, December 25, 12

Page 7: Recent Advances in Agglomerated Multigrid · – Developed agglomeration method preserving features of geometry (2010) – Critically assessed multigrid for diffusion (2010), identified

3D Agglomerated Multigrid (2011)

7

Subsonic Laminar20 Million nodes

Transonic RANS12 Million nodes

MultigridMultigridSingle Grid

Single Gridwhite space white space

white space

Computer Time Computer Time

Hemisphere Cylinder Wing Alone

7Tuesday, December 25, 12

Page 8: Recent Advances in Agglomerated Multigrid · – Developed agglomeration method preserving features of geometry (2010) – Critically assessed multigrid for diffusion (2010), identified

Previous Work• Agglomerated multigrid methods well suited to unstructured grids

– Nonlinear multigrid from 1977 – Agglomeration methods from 1987– Speedups observed but gains fall short of gains for inviscid or laminar flows

• Current approach extends hierarchical multigrid method (1999) to unstructured grids– Assessed defect correction for compressible Euler (2010)– Developed agglomeration method preserving features of geometry (2010)– Critically assessed multigrid for diffusion (2010), identified by

Venkatakrishnan (1996) as weakest part of agglomeration– Applied to complex inviscid/laminar/turbulent flows (2010/2011)

• Overall status– Uniformly successful for laminar and inviscid simulations– Limited success for RANS simulations

8Tuesday, December 25, 12

Page 9: Recent Advances in Agglomerated Multigrid · – Developed agglomeration method preserving features of geometry (2010) – Critically assessed multigrid for diffusion (2010), identified

Purpose - RevisitedImprove efficiency of Reynolds-Averaged Navier-Stokes (RANS) simulations for complex-geometry and complex-flow applications- Unstructured compressible flow method (FUN3D)- Spalart-Allmaras 1-equation turbulence model- Multigrid with agglomerated coarse grids

9Tuesday, December 25, 12

Page 10: Recent Advances in Agglomerated Multigrid · – Developed agglomeration method preserving features of geometry (2010) – Critically assessed multigrid for diffusion (2010), identified

Purpose - Revisited

“When there is a difficult question that you cannot answer, there is also a simpler question that you cannot answer” (Achi Brandt)

Improve efficiency of Reynolds-Averaged Navier-Stokes (RANS) simulations for complex-geometry and complex-flow applications- Unstructured compressible flow method (FUN3D)- Spalart-Allmaras 1-equation turbulence model- Multigrid with agglomerated coarse grids

9Tuesday, December 25, 12

Page 11: Recent Advances in Agglomerated Multigrid · – Developed agglomeration method preserving features of geometry (2010) – Critically assessed multigrid for diffusion (2010), identified

Purpose - Revisited

“When there is a difficult question that you cannot answer, there is also a simpler question that you cannot answer” (Achi Brandt)

Solving turbulence equations to zero residuals is one such question

Improve efficiency of Reynolds-Averaged Navier-Stokes (RANS) simulations for complex-geometry and complex-flow applications- Unstructured compressible flow method (FUN3D)- Spalart-Allmaras 1-equation turbulence model- Multigrid with agglomerated coarse grids

9Tuesday, December 25, 12

Page 12: Recent Advances in Agglomerated Multigrid · – Developed agglomeration method preserving features of geometry (2010) – Critically assessed multigrid for diffusion (2010), identified

Purpose - Revisited

“When there is a difficult question that you cannot answer, there is also a simpler question that you cannot answer” (Achi Brandt)

Solving turbulence equations to zero residuals is one such question

Improve efficiency of Reynolds-Averaged Navier-Stokes (RANS) simulations for complex-geometry and complex-flow applications- Unstructured compressible flow method (FUN3D)- Spalart-Allmaras 1-equation turbulence model- Multigrid with agglomerated coarse grids

structured (regular coarsening)

9Tuesday, December 25, 12

Page 13: Recent Advances in Agglomerated Multigrid · – Developed agglomeration method preserving features of geometry (2010) – Critically assessed multigrid for diffusion (2010), identified

Purpose - Revisited

“When there is a difficult question that you cannot answer, there is also a simpler question that you cannot answer” (Achi Brandt)

Solving turbulence equations to zero residuals is one such question

Improve efficiency of Reynolds-Averaged Navier-Stokes (RANS) simulations for complex-geometry and complex-flow applications- Unstructured compressible flow method (FUN3D)- Spalart-Allmaras 1-equation turbulence model- Multigrid with agglomerated coarse grids

Single grid

9Tuesday, December 25, 12

Page 14: Recent Advances in Agglomerated Multigrid · – Developed agglomeration method preserving features of geometry (2010) – Critically assessed multigrid for diffusion (2010), identified

Why Such a Difficult Question?Spalart-Allmaras Model

with negative turbulence variable provisions (2012)

• Nonlinear diffusion and source terms• Production source terms associated with exponentially growing

solutions are eventually balanced by other terms– Reduce diagonal positivity– Require gradients of mean flow variables

• RANS necessitates high aspect ratio, highly stretched grids– 3D grid refinements stretch computer resources– Questionable accuracy on coarse grids

• Discrete solutions depart from positivity of differential equations (provisions date to 1999)– Negative turbulence variable => zero eddy viscosity– Steady 3D flows with negative turbulence variable in far wake regions– Some first-order 3D cases are harder to solve than second-order

10Tuesday, December 25, 12

Page 15: Recent Advances in Agglomerated Multigrid · – Developed agglomeration method preserving features of geometry (2010) – Critically assessed multigrid for diffusion (2010), identified

Remainder of Talk

• Hierarchical solver with adaptive time step• Agglomerated and structured multigrid comparisons• Transonic 3D wing-body computations• Concluding remarks

11Tuesday, December 25, 12

Page 16: Recent Advances in Agglomerated Multigrid · – Developed agglomeration method preserving features of geometry (2010) – Critically assessed multigrid for diffusion (2010), identified

Contributions of this Paper

• Improved hierarchical solver with adaptive pseudo-time step• Assessment of current technology with systematic tests

– Increasing complexity and grid refinement– Structured and agglomerated grids

• Parallelization improvements• Eliminated degenerate least-square stencils (fine/coarse grids)• Term-by-term formation of Jacobians• Improved discretization in line-implicit regions

12Tuesday, December 25, 12

Page 17: Recent Advances in Agglomerated Multigrid · – Developed agglomeration method preserving features of geometry (2010) – Critically assessed multigrid for diffusion (2010), identified

Hierarchical Solver

Nonlinear Multigrid

Relaxation(Jacobian-Free Newton-Krylov)

Preconditioner

13Tuesday, December 25, 12

Page 18: Recent Advances in Agglomerated Multigrid · – Developed agglomeration method preserving features of geometry (2010) – Critically assessed multigrid for diffusion (2010), identified

Nonlinear Multigrid

• Recursive application of 2-grid cycle• Mean flow and turbulence relaxed at every level

- Loosely-coupled (meanflow, then turbulence)- Tightly-coupled

Restriction

Full Approximation Scheme V(ν1,ν2 ) Cycle

ν1 Relaxations ν2 Relaxations 2-Level Cycle

Coarse Grid:

Fine Grid:

Prolongation

Solve

14Tuesday, December 25, 12

Page 19: Recent Advances in Agglomerated Multigrid · – Developed agglomeration method preserving features of geometry (2010) – Critically assessed multigrid for diffusion (2010), identified

Jacobian-Free Newton Krylov

Target update equation is full linearization with adaptive time step (CFL)

Full linearization is through Jacobian-free matrix evaluation• Real-valued (uncertainties from round-off and constrained growth)• Complex-valued (nominally exact)

GCR combines preconditioner directions to minimize residual, generally with loose tolerance and a few projections

GCR often stabilizes divergent preconditioner subiterations

Generalized Conjugate Residual (GCR)

VΔτ

+ ∂R∂Q

⎛⎝⎜

⎞⎠⎟δQ = −R ; Q = Q +δQ

V ≡ volume R ≡ residualΔτ ≡ time step Q ≡ solution

VΔτ

+ ∂R∂Q

⎛⎝⎜

⎞⎠⎟δQ + R ≤ f R 0.5 ≤ f ≤ 0.98

15Tuesday, December 25, 12

Page 20: Recent Advances in Agglomerated Multigrid · – Developed agglomeration method preserving features of geometry (2010) – Critically assessed multigrid for diffusion (2010), identified

Preconditioner

Target update (direction) equation is approximate linearization with adaptive time step

where linearization is approximate, e.g., on primal grids:• first-order accurate inviscid terms (defect correction)• exact viscous terms

Alternating multicolor point-implicit and line-implicit subiterations, solving with loose tolerance

Can often take many subiterations to meet even minimal tolerance of

GCR combines preconditioner directions to minimize residual

where a loose tolerance is set,

Jacobian Approximations with Subiterations

VΔτ

+ ∂R∂Q

⎝⎜

⎠⎟ δQ = −R

VΔτ

+ ∂R∂Q

⎝⎜

⎠⎟ δQ + R ≤ f R 0.5 ≤ f ≤ 0.98

f ≤ 0.98

16Tuesday, December 25, 12

Page 21: Recent Advances in Agglomerated Multigrid · – Developed agglomeration method preserving features of geometry (2010) – Critically assessed multigrid for diffusion (2010), identified

Pseudo-Time Step (CFL) Adaptation• Motivated by recent work of Allmaras et al. (2011) on

robust Newton solver– Direct linear solver– CFL low in highly nonlinear regions and where allowable changes

exceeded– CFL eventually high with quadratic convergence

• Current approach evolving– CFL reduced whenever linear systems are having difficulty

reaching loose tolerance with minimal GCR projections– CFL reduced and null update nulled whenever linear systems

converging but update extremely large– Otherwise, similar to Allmaras et al. but without quadratic

convergence

17Tuesday, December 25, 12

Page 22: Recent Advances in Agglomerated Multigrid · – Developed agglomeration method preserving features of geometry (2010) – Critically assessed multigrid for diffusion (2010), identified

Evolution of Target CFL Strategy

18Tuesday, December 25, 12

Page 23: Recent Advances in Agglomerated Multigrid · – Developed agglomeration method preserving features of geometry (2010) – Critically assessed multigrid for diffusion (2010), identified

Evolution of Target CFL Strategy

Strategy CFL Target PreconditionerClydesdale 200 Dissipative Defect Correction

Quarter Horse 200 Consistent Defect Correction

Thoroughbred 10,000 Consistent Defect Correction

18Tuesday, December 25, 12

Page 24: Recent Advances in Agglomerated Multigrid · – Developed agglomeration method preserving features of geometry (2010) – Critically assessed multigrid for diffusion (2010), identified

Evolution of Target CFL Strategy

Strategy CFL Target PreconditionerClydesdale 200 Dissipative Defect Correction

Quarter Horse 200 Consistent Defect Correction

Thoroughbred 10,000 Consistent Defect Correction

• Enabled by GCR

18Tuesday, December 25, 12

Page 25: Recent Advances in Agglomerated Multigrid · – Developed agglomeration method preserving features of geometry (2010) – Critically assessed multigrid for diffusion (2010), identified

Evolution of Target CFL Strategy

Strategy CFL Target PreconditionerClydesdale 200 Dissipative Defect Correction

Quarter Horse 200 Consistent Defect Correction

Thoroughbred 10,000 Consistent Defect Correction

• Enabled by CFL adaptation

• Enabled by GCR

18Tuesday, December 25, 12

Page 26: Recent Advances in Agglomerated Multigrid · – Developed agglomeration method preserving features of geometry (2010) – Critically assessed multigrid for diffusion (2010), identified

Turbulent Test Cases (SpeedUp over Single Grid)V(3,3) ; CFL=200 (Quarter Horse CFL Target)

Based on Convergence to Machine Zero Residuals

Geometry Finest Grid Nodes

AgglomeratedMultigridSpeedUp

2D Bump in a Channel 4K 3x2D RAE Airfoil 98K 3x

2D Flat Plate 209K 9x

2D NACA 0012 Airfoil 919K 8x

2D Hemisphere Cylinder 960K 16x

3D Hemisphere Cylinder 15M 19x

3D Wing-Body-Tail (DPW4) 10M 7x

3D Wing-Body (DPW5) 15M < 1x

19Tuesday, December 25, 12

Page 27: Recent Advances in Agglomerated Multigrid · – Developed agglomeration method preserving features of geometry (2010) – Critically assessed multigrid for diffusion (2010), identified

From Quarter Horse to ThoroughbredIn Target CFL

NACA 0012; M=0.15; Alpha = 15Cycles to Machine Zero Residuals with Full Multigrid Cycle

Grid Density

Agglomerated Multigrid

V(3,3) CyclesCFL=200

Structured Multigrid

V(2,2) CyclesCFL=10,000

Grid 1 (Fine) 276 24

Grid 2 (Medium) 241 23

Grid 3 (Coarse) 216 24

20Tuesday, December 25, 12

Page 28: Recent Advances in Agglomerated Multigrid · – Developed agglomeration method preserving features of geometry (2010) – Critically assessed multigrid for diffusion (2010), identified

Transonic Wing-BodyDrag Prediction Workshop 5

Hybrid unstructured grid– prismatic near-field– tetrahedral far-field

Structured Grid Designation Nodes

L1 0.7 Million

L2 2.2 Million

L3 5.2 Million21Tuesday, December 25, 12

Page 29: Recent Advances in Agglomerated Multigrid · – Developed agglomeration method preserving features of geometry (2010) – Critically assessed multigrid for diffusion (2010), identified

Alpha

Cyc

les

to C

onve

rgen

ce

1 1.5 2 2.5 30

50

100

150

200

250

300

350

400

Alpha

Lift

1 1.5 2 2.5 30.3

0.35

0.4

0.45

0.5

0.55

0.6

0.65L1 0.7 Million NodesL2 2.5 Milllion NodesL3 5.2 Million Nodes

Transonic Wing-BodyStructured V(2,2) Multigrid Cycle; CFL=10,000

M=0.85 ; Alpha Continued [1 to 3]

Cycles to Converge Six Orders in Residual

22Tuesday, December 25, 12

Page 30: Recent Advances in Agglomerated Multigrid · – Developed agglomeration method preserving features of geometry (2010) – Critically assessed multigrid for diffusion (2010), identified

Alpha

Lift

1 1.5 2 2.5 3 3.5 40.3

0.35

0.4

0.45

0.5

0.55

0.6

0.65

0.7L1L2L3

Transonic Wing-BodyM=0.85 ; Alpha Continued [1 to 4]

With grid-refinement for alpha > 3•Lift < experiment•No improvement with multigrid

Experiment

23Tuesday, December 25, 12

Page 31: Recent Advances in Agglomerated Multigrid · – Developed agglomeration method preserving features of geometry (2010) – Critically assessed multigrid for diffusion (2010), identified

Alpha

Lift

1 1.5 2 2.5 3 3.5 40.3

0.35

0.4

0.45

0.5

0.55

0.6

0.65

0.7L1L2L3

Transonic Wing-BodyM=0.85 ; Alpha Continued [1 to 4], then decreasing

With grid-refinement, strong hysteresis (not observed in experiment)

24Tuesday, December 25, 12

Page 32: Recent Advances in Agglomerated Multigrid · – Developed agglomeration method preserving features of geometry (2010) – Critically assessed multigrid for diffusion (2010), identified

Alpha

Lift

1 1.5 2 2.5 3 3.5 40.3

0.35

0.4

0.45

0.5

0.55

0.6

0.65

0.7L1L2L3

X

Y

Zcp1.110.90.80.70.60.50.40.30.20.10-0.1-0.2-0.3-0.4-0.5-0.6-0.7-0.8-0.9

X

Y

Zcp1.110.90.80.70.60.50.40.30.20.10-0.1-0.2-0.3-0.4-0.5-0.6-0.7-0.8-0.9

Pressure Contours and Streamlines

Higher Lift Alpha=2.25

Lower Lift Alpha=2.25

25Tuesday, December 25, 12

Page 33: Recent Advances in Agglomerated Multigrid · – Developed agglomeration method preserving features of geometry (2010) – Critically assessed multigrid for diffusion (2010), identified

Concluding Remarks

• Hierarchical solver with adaptive time step control proven useful for turbulent flows– Single grid and multigrid methods– Used in comparisons/adaptation of Park (Monday AM)

• Agglomeration multigrid assessed over range of tests– V(3,3) cycle with CFL=200 – Comparable performance with structured-grid multigrid– Substantial improvement over single grid method

• Structured multigrid assessed over smaller range of tests– V(2,2) with CFL=10,000– Fast convergence for 2D and 3D comparable to inviscid

26Tuesday, December 25, 12

Page 34: Recent Advances in Agglomerated Multigrid · – Developed agglomeration method preserving features of geometry (2010) – Critically assessed multigrid for diffusion (2010), identified

Future Research

• Single grid solver– Refinements in adaptation strategy to reduce sensitivity to

selectable parameters (robust controller)• Multigrid

– Assess agglomeration multigrid with higher CFL numbers– Understand limitations observed for DPW5 grids– Apply ideal multigrid tools to assess where further inroads are

possible• Ideal relaxation (tests coarse grid correction)• Ideal coarse grid (tests relaxation)

27Tuesday, December 25, 12

Page 35: Recent Advances in Agglomerated Multigrid · – Developed agglomeration method preserving features of geometry (2010) – Critically assessed multigrid for diffusion (2010), identified

Research Possible through the NASA Fundamental Aeronautics Program

Support of cross-cutting technology development– Peter Coen (Supersonics)– Mike Rogers (Subsonic Fixed Wing)– Susan Gorton (Rotorcraft)– Mujeeb Malik (Revolutionary Computational Aerosciences)

First two authors supported by NASA contracts- NNL12AB00T “Improvements of Unstructured Finite-Volume

Solutions for Turbulent Flows”- NNL09AA00A “Efficient Iterative Solutions for Turbulent

Flows

28Tuesday, December 25, 12

Page 36: Recent Advances in Agglomerated Multigrid · – Developed agglomeration method preserving features of geometry (2010) – Critically assessed multigrid for diffusion (2010), identified

BackUp Slides Follow

29

29Tuesday, December 25, 12

Page 37: Recent Advances in Agglomerated Multigrid · – Developed agglomeration method preserving features of geometry (2010) – Critically assessed multigrid for diffusion (2010), identified

30Cycles (SIngle Grid ; No Coarse Grid Correction)

Res

idua

l

Lift

Coe

ffici

ent

0 500 1000 1500 2000 2500

10-6

10-4

10-2

100

102

104

106

-0.3

-0.2

-0.1

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

Meanflow ResidualTurbulence ResidualLift Coefficient

3.25

3.0

4.00 3.753.75 3.503.503.253.0

30Tuesday, December 25, 12

Page 38: Recent Advances in Agglomerated Multigrid · – Developed agglomeration method preserving features of geometry (2010) – Critically assessed multigrid for diffusion (2010), identified

Coarse Grids : AgMG vs StMG

Property Agglomerated Structured

Coarsening Hierarchical (3-level) Full (all levels)

Accuracy First Order InviscidSecond Order Viscous

Second Order InviscidSecond Order Viscous

Jacobians Approximate Viscous Approximate Inviscid

Restriction Conservative with Residual Averaging

Full Weighting (prolongation transpose)

Prolongation Linear --> Constant (viscous curved)

Linear (structured mapping)

Cycle / CFL V(3,3) / CFL=200 V(2,2) / CFL=10,000

31Tuesday, December 25, 12

Page 39: Recent Advances in Agglomerated Multigrid · – Developed agglomeration method preserving features of geometry (2010) – Critically assessed multigrid for diffusion (2010), identified

NACA 0012 AirfoilM=0.15; Finest Grid (919K)

Alpha Continued From [10 to 19] then [19 to -5] then [-5 to -3]

Alpha

Lift

-5 0 5 10 15 20-0.5

0

0.5

1

1.5

2

ComputationExperiment:Ladson

No evidence of hysteresis in computation

32Tuesday, December 25, 12

Page 40: Recent Advances in Agglomerated Multigrid · – Developed agglomeration method preserving features of geometry (2010) – Critically assessed multigrid for diffusion (2010), identified

Alpha

Lift

-5 0 5 10 15 20-0.5

0

0.5

1

1.5

2

ComputationExperiment:Ladson

NACA 0012 AirfoilM=0.15; Finest Grid (919K)

Alpha Continued From [10 to 19] then [19 to -5] then [-5 to -3]

Alpha

Cyc

les

to C

onve

rge

-5 0 5 10 15 20

101

102

103

MultigridSingle Grid

O(10) improvement with multigridO(10) more cycles near zero lift

33Tuesday, December 25, 12