automated extension of fixed-point pde solvers for optimal

24
Slide 1 Oxford, June 1st, 2006 Nico Gauger and Andreas Griewank 3rd European Workshop on Automatic Differentiation Automated extension of fixed-point PDE solvers for optimal design with bounded retardation Nico Gauger 1),2) , Andreas Griewank 2) 1) DLR Braunschweig Institute of Aerodynamics and Flow Technology Numerical Methods Branch 2) Humboldt University Berlin Department of Mathematics

Upload: others

Post on 03-Apr-2022

8 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Automated extension of fixed-point PDE solvers for optimal

Slide 1

Oxford, June 1st, 2006 Nico Gauger and Andreas Griewank3rd European Workshop on Automatic Differentiation

Automated extension of fixed-point PDE solversfor optimal design with bounded retardation

Nico Gauger1),2), Andreas Griewank2)

1) DLR BraunschweigInstitute of Aerodynamics and Flow TechnologyNumerical Methods Branch

2) Humboldt University BerlinDepartment of Mathematics

Page 2: Automated extension of fixed-point PDE solvers for optimal

Slide 2

Oxford, June 1st, 2006 Nico Gauger and Andreas Griewank3rd European Workshop on Automatic Differentiation

CollaboratorsWith contributions to this talk:

• HU Berlin: J. Riehme

• Fastopt: R. Giering, Th. Kaminski

• TU Dresden: C. Moldenhauer, S. Schlenkrich,

A. Walther

FastOpt

Page 3: Automated extension of fixed-point PDE solvers for optimal

Slide 3

Oxford, June 1st, 2006 Nico Gauger and Andreas Griewank3rd European Workshop on Automatic Differentiation

OutlineMEGAFLOW Software (FLOWer, TAU)ADFLOWerAutomatic differentiation of entire design chainAll-at-Once / One-Shot / Piggy-BackFeasibility studyGoals

Automated extension of fixed-point PDE solversfor optimal design with bounded retardation

Page 4: Automated extension of fixed-point PDE solvers for optimal

Slide 4

Oxford, June 1st, 2006 Nico Gauger and Andreas Griewank3rd European Workshop on Automatic Differentiation

MEGAFLOW Software

Structured RANS solver FLOWer

block-structured grids moderate complex configurationsfast algorithms (unsteady flows)design optionadjoint option

Unstructured RANS solver TAU

hybrid grids very complex configurationsgrid adaptation fully parallel softwareadjoint option

Page 5: Automated extension of fixed-point PDE solvers for optimal

Slide 5

Oxford, June 1st, 2006 Nico Gauger and Andreas Griewank3rd European Workshop on Automatic Differentiation

Algorithmic Differentiation (AD)

Work in progress and results

• ADFLOWer generated with TAF (3D Navier-Stokes,k-w), first verifications and validation

• Adjoint version of TAUij (2D Euler) + mesh deformationand parameterization with ADOL-C, validated and tested

• First and second derivatives of a “FLOWer-Derivate”(2D Euler) + mesh deformation and parameterizationgenerated with TAPENADE, used for All-at-Once (Piggy-Back)

Page 6: Automated extension of fixed-point PDE solvers for optimal

Slide 6

Oxford, June 1st, 2006 Nico Gauger and Andreas Griewank3rd European Workshop on Automatic Differentiation

FastOptADFLOWer by TAF( )

Test configuration2d NACA0012k-omega (Wilcox) turbulence modelcell-centred metric2000 time steps on fine gridtarget sensitivity: d lift/ d alpha

StepsModifications of FLOWer code (TAF Directives, slight recoding, etc...)tangent-linear code (verification) adjoint codeefficient adjoint code

Major challengememory management (all variables in one big field 'variab')complicates detailed analysis and handling of deallocation

(Gauger,Giering,Kaminski)

Page 7: Automated extension of fixed-point PDE solvers for optimal

Oxford, June 1st, 2006 Nico Gauger and Andreas Griewank3rd European Workshop on Automatic Differentiation

TAF CPUs Code lines solve rel CPU solve memoryNominal 166000 1.0 57tangent 293 268000 3.3 75adjoint 253 310000 6.3 489

Usually better for larger configurations

Ma = 0.734α = 2.8°Re = 6x10^6kw turbulence model

ADFLOWer

(Gauger,Giering,Kaminski)

Page 8: Automated extension of fixed-point PDE solvers for optimal

Oxford, June 1st, 2006 Nico Gauger and Andreas Griewank3rd European Workshop on Automatic Differentiation

Ma = 0.734α = 2.8°Re = 6x10^6kw turbulence model

ADFLOWer

(Gauger,Giering,Kaminski)

Demonstrates convergence of discrete sensitivities including turbulence

Same sensitivity for Navier-Stokes adjoint (Wilcox kw) and tangent linear model

Page 9: Automated extension of fixed-point PDE solvers for optimal

Oxford, June 1st, 2006 Nico Gauger and Andreas Griewank3rd European Workshop on Automatic Differentiation

Demonstrates convergence of discrete sensitivities including turbulence

Same sensitivity for Navier-Stokes adjoint (Wilcox kw) and tangent linear model

ADFLOWer

(Gauger,Giering,Kaminski)

Ma = 0.734α = 2.8°Re = 6x10^6kw turbulence model

Page 10: Automated extension of fixed-point PDE solvers for optimal

Slide 10

Oxford, June 1st, 2006 Nico Gauger and Andreas Griewank3rd European Workshop on Automatic Differentiation

• Adjoint version of entire design chain by ADOL-C (TU-Dresden)• TAUij (2D Euler) + mesh deformation + parameterization

design vector (P) → defgeo → difgeo → meshdefo → flow solver → CD

xnew dx m

surface grid grid

Px

xdx

dxm

mC

dPdC new

new

DD

∂∂⋅

∂∂⋅

∂∂

⋅∂∂

=)(

)(Id

xxx

xdx

new

oldnew

new

=∂−∂

=∂∂ )()(and

TAUij_AD meshdefo_AD defgeo_AD

(Gauger,Walther)

Automatic Differentiation of Entire Design Chain

Page 11: Automated extension of fixed-point PDE solvers for optimal

Slide 11

Oxford, June 1st, 2006 Nico Gauger and Andreas Griewank3rd European Workshop on Automatic Differentiation

• Run time (2000 fixed-point iterations)- primal: 2 minutes- adjoint: 16 minutes

• Tape size: 340 MB (reverse accumulation approach!)[Christianson in 94]

• Run time memory- primal: 8 MB- adjoint: 45 MB

Automatic Differentiation of TAUij (fixed-point solver)

(Schlenkrich,Walther)

Page 12: Automated extension of fixed-point PDE solvers for optimal

Slide 12

Oxford, June 1st, 2006 Nico Gauger and Andreas Griewank3rd European Workshop on Automatic Differentiation

Automatic Differentiation of Entire Design Chain

Drag reduction • RAE 2822, M = 0.73, α = 2.0°• inviscid flow, mesh 161x33 cells• 20 design variables (Hicks-Henne)• steepest descent

(Gauger,Moldenhauer)

First Application / Validation:

Page 13: Automated extension of fixed-point PDE solvers for optimal

Slide 13

Oxford, June 1st, 2006 Nico Gauger and Andreas Griewank3rd European Workshop on Automatic Differentiation

∫=∇V

mn

m dVxiI ))(,(w,)( δψ

I∇

start geometryx0

ψ

x0

w

xn+1

k-loop

k-loop

Adjoint Based Optimization

min Ι (w,x)s.t. R(w,x)=0

optimizationstrategy

RANS solverR(wk,xn)=0

gradient

Adjoint solverR*(w,ψk,xn)=0

dim x = M

n-loop n=1,…,N

m-loopm=1,…,M

“All-at-Once”!

∫=∇V

mn

m dVxiI ))(,(w,)( δψ

Page 14: Automated extension of fixed-point PDE solvers for optimal

Slide 14

Oxford, June 1st, 2006 Nico Gauger and Andreas Griewank3rd European Workshop on Automatic Differentiation

Activities on “All-at-Once”

• MEGADESIGN (BMWi Project) (Ends 2007):

Aerodynamic shape optimization using simultaneous pseudo-timestepping (published in JCP 2005: Hazra, Schulz, Brezillon, Gauger)

• Optimization with PDE (DFG-SPP 1253) (Starts this Year):

Multilevel parameterizations and fast multigrid methods for shape optimization (Gauger / Schulz)

Automated extension of fixed point PDE solvers with bounded retardation (Gauger / Griewank / Slawig)

Page 15: Automated extension of fixed-point PDE solvers for optimal

Slide 15

Oxford, June 1st, 2006 Nico Gauger and Andreas Griewank3rd European Workshop on Automatic Differentiation

Problem: s.t.

where and are state and design variables

Available:

Code for and

Contractive fixed-point iteration:

and

Shifted Lagrangian:

Lagrangian is formed w.r.t.

),(min uyf ,0),( =uycny ℜ∈ mu ℜ∈

),( uyf ),(),(),(1

uycuycy

yuyG−

⎟⎟⎠

⎞⎜⎜⎝

⎛∂∂

−≈

)(, 1,2 mnCfG +ℜ∈ 1),( <≤∂∂ ρuyGy

,),(),(),,( yyLagrangianuyfyuyGuyyN TT +≡+≡0),(),( =−≡ yuyGuyc

Automated extension of fixed-point PDE solversfor optimal design with bounded retardation

Page 16: Automated extension of fixed-point PDE solvers for optimal

Slide 16

Oxford, June 1st, 2006 Nico Gauger and Andreas Griewank3rd European Workshop on Automatic Differentiation

⎥⎥⎥⎥

⎢⎢⎢⎢

=

⎥⎥⎥⎥

⎢⎢⎢⎢

−+

+

+

+

)()()(

)(

,,1

,,

,,

,

1

1

1

1

kkkukk

kkku

kkky

kky

k

k

k

k

uyyNHuuyyNuyyN

uyN

uuyystates

adjoint states

adjoint designs

designs

positive definite matrix preconditioner0>kH

Strategy: differentiate → iterate

“Piggy-back”: automated extension to coupled iteration:

Automated extension of fixed-point PDE solversfor optimal design with bounded retardation

(Griewank)

Page 17: Automated extension of fixed-point PDE solvers for optimal

Slide 17

Oxford, June 1st, 2006 Nico Gauger and Andreas Griewank3rd European Workshop on Automatic Differentiation

Jacobian of the extended iteration:

Whenever we can define such that

⎟⎟⎟

⎜⎜⎜

−−−=

∂∂

=−−−

+++

uuTuuy

yuTyyy

uy

kkk

kkk

NHIGHNHNGNGG

uyyuyyJ

1*

1*

1*

*

111*

0

),,(),,(

H

constGJ

GJ

yy

<≈−−

))(log())(log(

)(1)(1 **

ρρ

ρρ

Automated extension of fixed-point PDE solversfor optimal design with bounded retardation

(Griewank)

we have bounded retardation

Page 18: Automated extension of fixed-point PDE solvers for optimal

Slide 18

Oxford, June 1st, 2006 Nico Gauger and Andreas Griewank3rd European Workshop on Automatic Differentiation

where

( ) ⎟⎟⎠

⎞⎜⎜⎝

⎛ −−⎟⎟⎠

⎞⎜⎜⎝

⎛−−=

−−

IGIG

NNNN

IIGGH uTy

uuuy

yuyyTy

Tu

11 )(,)()(

λλλ

0))()1det(( *

Eigenvalues of are the zeros of the equation*J

=+− λλ HH

)1/()(* λλ −> HH 1−≤λ

Necessary condition for contractivity:

for

Automated extension of fixed-point PDE solversfor optimal design with bounded retardation

(Griewank)

Page 19: Automated extension of fixed-point PDE solvers for optimal

Slide 19

Oxford, June 1st, 2006 Nico Gauger and Andreas Griewank3rd European Workshop on Automatic Differentiation

)1/()(* λλ −> HH 1−≤λ

Necessary condition for contractivity:

for

Usually not satisfied by reduced Hessian

Promising alternative: )1(−H

)1(H

[Griewank 05]

Automated extension of fixed-point PDE solversfor optimal design with bounded retardation

(Griewank)

Page 20: Automated extension of fixed-point PDE solvers for optimal

Slide 20

Oxford, June 1st, 2006 Nico Gauger and Andreas Griewank3rd European Workshop on Automatic Differentiation

Transonic case: NACA 0012 at Ma = 0.8 with α = 2°

Cost function: glide ratio

“FLOWer-Derivate” (2D Euler) + mesh deformation +parameterization

First and second derivatives by AD tool TAPENADE

Geometric constraint: constant thickness

Camberline/Thickness decomposition,20 Hicks-Henne coefficients define camberline

Feasibility Study

(Gauger,Griewank,Riehme)

Page 21: Automated extension of fixed-point PDE solvers for optimal

Slide 21

Oxford, June 1st, 2006 Nico Gauger and Andreas Griewank3rd European Workshop on Automatic Differentiation

min CD/CL (Inverse Glide Ratio)

Wing Shapes

NACA 0012

Ma = 0.8 with α = 2°

Results

Simulation -Piggy-back -

original -optimized -

(Gauger,Griewank,Riehme)

Page 22: Automated extension of fixed-point PDE solvers for optimal

Slide 22

Oxford, June 1st, 2006 Nico Gauger and Andreas Griewank3rd European Workshop on Automatic Differentiation

Globalization: enforce convergence by line search w.r.t.

augmented Lagrangian

With , the directional derivative is given by

⎟⎟⎟

⎜⎜⎜

−−−

⎟⎟⎟

⎜⎜⎜

−−−−−−−−−−

⎟⎟⎟

⎜⎜⎜

−−−

−=⎟⎟⎟

⎜⎜⎜

−−−

⎟⎟⎟

⎜⎜⎜

∇∇∇

−−−u

y

yuu

yuyyy

uyyyT

u

y

u

y

T

u

y

y

NHyNyG

HNGNGIINGINGI

NHyNyG

NHyNyG

ppp

111 )2/()2/()2/()()2/()2/()2/()(

βαβββαβα

yG

yyNyuyyNyuyGuyyp Ty −+−+−=

2

2

2

2),,()2(),()2(:),,( βα

which is a definite quadratic form for contractive

and suitable weights ., ℜ∈βα

))(21( Tyyy GGG +=

(Griewank)

Automated extension of fixed-point PDE solversfor optimal design with bounded retardation

Page 23: Automated extension of fixed-point PDE solvers for optimal

Slide 23

Oxford, June 1st, 2006 Nico Gauger and Andreas Griewank3rd European Workshop on Automatic Differentiation

For suitable choices and the smallest eigenvalue of

must converge to a KKT point.

⎟⎟⎟

⎜⎜⎜

−−−−−−−−−−

HNGNGIINGINGI

yuu

yuyyy

uyyy

)2/()2/()2/()()2/()2/()2/()(

βαβββαβα

[ ] [ ] [ ]),(),,(),(,)1(,, ,1

*,,,111 kkkukkkykkkkkkkkkk uyyNHuyyNuyGuyyuyy −+++ −+−= γγ

can be bounded away from zero. Then one can design a line

search procedure for determining such that the iterates

βα , H

Automated extension of fixed-point PDE solversfor optimal design with bounded retardation

(Griewank)

Page 24: Automated extension of fixed-point PDE solvers for optimal

Slide 24

Oxford, June 1st, 2006 Nico Gauger and Andreas Griewank3rd European Workshop on Automatic Differentiation

Goals:Full fidelity optimization without model reductionAutomated adjoint generation with verifiable resultsBounded retardation of the original convergence rate Bounded increase of computational effort per stepBounded increase in overall storage requirementEfficient storage and linear algebra for the preconditioner of the combined iterationSelective evaluation or approximation of second derivativesStability with respect to the design parameterization

Automated extension of fixed-point PDE solversfor optimal design with bounded retardation