1Summer School on AD, Bommerholz, August 14-18,2006
Adjoint Computationfor Aerodynamic Shape Optimization in MDO context
Nicolas Gauger 1), 2)
1) DLR BraunschweigInstitute of Aerodynamics and Flow Technology
Numerical Methods Branch2) Humboldt University Berlin
Department of Mathematics
Summer School on Automatic DifferentiationUniversitätskolleg Bommerholz, August 14-18, 2006
2Summer School on AD, Bommerholz, August 14-18,2006
CollaboratorsWith contributions to this lecture:
• DLR: J. Brezillon, A. Fazzolari, M. Widhalm,
R. Dwight, R. Heinrich, N. Kroll
• Fastopt: R. Giering, Th. Kaminski
• TU Dresden: A. Walther, S. Schlenkrich, C. Moldenhauer
• Uni Trier: V. Schulz, S. Hazra
University of Trier
FastOpt
3Summer School on AD, Bommerholz, August 14-18,2006
Content of Lecture
Why adjoint approaches?
What is an adjoint approach?
Continuous and discrete adjoint approaches / solvers
Validation and Application in 2D and 3D
Algorithmic / Automated Differentiation (AD)
Coupled aero-structure adjoint approach
Validation and application in MDO context
One shot approaches
4Summer School on AD, Bommerholz, August 14-18,2006
Requirements on CFD• high level of physical modeling
– compressible flow– transonic flow– laminar - turbulent flow – high Reynolds numbers (60 million)– large flow regions with flow separation – steady / unsteady flows
• complex geometries• short turn around time
Use of CFD in Aerodynamic Aircraft Design
5Summer School on AD, Bommerholz, August 14-18,2006
Consequencessolution of 3D compressible Reynolds averaged Navier-Stokes equations turbulence models based on transport equations (2 – 6 eqn)models for predicting laminar-turbulent transition flexible grid generation techniques with high level of automation(block structured grids, overset grids, unstructured/hybrid grids)link to CAD-systemsefficient algorithms (multigrid, grid adaptation, parallel algorithms...)large scale computations ( ~ 10 - 60 million grid points)…
Use of CFD in Aerodynamic Aircraft Design
6Summer School on AD, Bommerholz, August 14-18,2006
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
7Summer School on AD, Bommerholz, August 14-18,2006
• M∞=0.85, Re=32.5x106
• coupled CFD/structural analysis for wing deformation at α ≈ 1.5°• FLOWer, kω turbulence model, fully turbulent
ValidationHiReTT Wing/Body Configuration
3.5 million grid points
8Summer School on AD, Bommerholz, August 14-18,2006
• M∞=0.85, Re=32.5x106
• coupled CFD/structural analysis for wing deformation at α ≈ 1.5°• FLOWer, kω turbulence model, fully turbulent
ValidationHiReTT Wing/Body Configuration
3.5 million grid points
9Summer School on AD, Bommerholz, August 14-18,2006
Requirementscomplex configurations
compressible Navier-Stokes equationswith accurate models for turbulence and transition
validated and efficient CFD codes
multi-point design, multi-objective optimization, MDO
large number of design variables
physical and geometrical constraintsmeshing & mesh deformation techniques ensuring grid qualityefficient optimization algorithms
automatic framework
parameterization based on CAD model
Aerodynamic Shape Optimization
10Summer School on AD, Bommerholz, August 14-18,2006
Requirementscomplex configurations
compressible Navier-Stokes equationswith accurate models for turbulence and transition
validated and efficient CFD codes
multi-point design, multi-objective optimization, MDO
large number of design variables
physical and geometrical constraintsmeshing & mesh deformation techniques ensuring grid qualityefficient optimization algorithms
automatic framework
parameterization based on CAD model
Aerodynamic Shape Optimization
⇓
⇒ Sensitivity baseddeterministic optimizationstrategies !!!
⇒
11Summer School on AD, Bommerholz, August 14-18,2006
Parametrizedairfoil
Design space
I cost
T
niiPII
,...,1
,......,=
⎟⎟⎠
⎞⎜⎜⎝
⎛−=∇−
δδ
“ “ :
Search direction
Line search
Aerodynamic Shape Optimization
12Summer School on AD, Bommerholz, August 14-18,2006
0=∂∂
+∂∂
+∂∂
yg
xf
tw
∞∞
∞−=
pMppCp 2
)(2γ
∫ +=C
yxpref
D dlnnCC
C )sincos(1 αα
∫ −=C
xypref
L dlnnCC
C )sincos(1 αα
∫ −−−=C
mxmypref
m dlyynxxnCC
C ))()((12
Compressible 2D Euler-Equations
while
⎟⎟⎟⎟⎟
⎠
⎞
⎜⎜⎜⎜⎜
⎝
⎛
+=
uHuv
puu
f
ρρρ
ρ2
⎟⎟⎟⎟⎟
⎠
⎞
⎜⎜⎜⎜⎜
⎝
⎛
+=
vHpv
vuv
g
ρρ
ρρ
2
⎟⎟⎟⎟⎟
⎠
⎞
⎜⎜⎜⎜⎜
⎝
⎛
=
Evu
w
ρρρρ
, ,
Dimensionless pressure
Drag, lift, pitching moment coefficients
Pressure (ideal gas)
)21()1( 2vEp r
−−= ργ
Governing Equations and Aerodynamic Coefficients
13Summer School on AD, Bommerholz, August 14-18,2006
• Finite Differences n design variables requiren+1 flow calculations
Metric sensitivities → pressure variation → aerodynamic sensitivity
∫∞∞
=Cref
D pCpM
C δγ
δ 22 dlnn yx )sincos( αα +
dlnnCC y
Cxp
ref
)sincos(1 αδαδ∫ ++ ,
i-th component of cost function‘s gradient
i-loopi=1,...,n
Finite Differences
Variation of i-th design variable
14Summer School on AD, Bommerholz, August 14-18,2006
High number of design variables
• Finite Differences n design variables require n+1 flow calculations
• Adjoint Approach n design variables require 1 flow and1 adjoint flow calculation
Independent of number of design variables
High accuracy
Motivation of Adjoint Approach
15Summer School on AD, Bommerholz, August 14-18,2006
16Summer School on AD, Bommerholz, August 14-18,2006
17Summer School on AD, Bommerholz, August 14-18,2006
18Summer School on AD, Bommerholz, August 14-18,2006
Convection Eq.
19Summer School on AD, Bommerholz, August 14-18,2006
How to get the gradient using adjoint theory
Let the optimization problem be stated as
and with the governing equations
with W the flow variables, X the mesh and D the design variables.
We introduce the Lagrangian multiplyer Λ and define the Lagrangian L as
( ) 0,, =DXWR
( ),,, min D
DXWI
RIL TΛ+=
20Summer School on AD, Bommerholz, August 14-18,2006
The derivatives of L with respect to the design variables D are:
( ) ( )( )Λ+= DXWRDXWIdDd
dDdL T ,,,,
How to get the gradient using adjoint theory
21Summer School on AD, Bommerholz, August 14-18,2006
( ) ( )( )
⎭⎬⎫
⎩⎨⎧
∂∂
+∂∂
+∂∂
Λ+⎭⎬⎫
⎩⎨⎧
∂∂
+∂∂
+∂∂
=
Λ+=
DR
dDdX
XR
dDdW
WRT
DI
dDdX
XI
dDdW
WI
DXWRDXWIdDd
dDdL T
,,,,
The derivatives of L with respect to the design variables D are:
How to get the gradient using adjoint theory
22Summer School on AD, Bommerholz, August 14-18,2006
( ) ( )( )
⎭⎬⎫
⎩⎨⎧
∂∂
Λ+∂∂
+⎭⎬⎫
⎩⎨⎧
∂∂
Λ+∂∂
+⎭⎬⎫
⎩⎨⎧
∂∂
Λ+∂∂
=
⎭⎬⎫
⎩⎨⎧
∂∂
+∂∂
+∂∂
Λ+⎭⎬⎫
⎩⎨⎧
∂∂
+∂∂
+∂∂
=
Λ+=
DRT
DI
dDdX
XRT
XI
dDdW
WRT
WI
DR
dDdX
XR
dDdW
WRT
DI
dDdX
XI
dDdW
WI
DXWRDXWIdDd
dDdL T
,,,,
The derivatives of L with respect to the design variables D are:
How to get the gradient using adjoint theory
23Summer School on AD, Bommerholz, August 14-18,2006
=0
The derivatives of L with respect to D are:
}
}}
The expensive component can be canceled by solving the adjoint
equation
dDdW
WRT
WI
DRT
DI
dDdX
XRT
XI
dDdL
⎭⎬⎫
⎩⎨⎧
∂∂
Λ+∂∂
+⎭⎬⎫
⎩⎨⎧
∂∂
Λ+∂∂
+⎭⎬⎫
⎩⎨⎧
∂∂
Λ+∂∂
=
Variations w. r. t. the flow variables
expensive to evaluate
Partial variations according to the design variables
relatively inexpensive
Metric sensitivities
relatively inexpensive with finite differences
How to get the gradient using adjoint theory
24Summer School on AD, Bommerholz, August 14-18,2006
After solving the adjoint equation,
the derivatives of L with respect to D are evaluated according to
⎭⎬⎫
⎩⎨⎧
∂∂
Λ+∂∂
+⎭⎬⎫
⎩⎨⎧
∂∂
Λ+∂∂
=DRT
DI
dDdX
XRT
XI
dDdL
0=∂∂
Λ+∂∂
WRT
WI
How to get the gradient using adjoint theory
25Summer School on AD, Bommerholz, August 14-18,2006
• Continuous Adjoint- optimize then discretize- hand coded adjoint solvers- time consuming in implementation- efficient in run and memory
• Discrete Adjoint / Algorithmic Differentiation (AD)- discretize then optimize- hand coding of adjoint solvers or …- … more or less automated generation- memory effort increases (way out e.g. check-pointing)
• Hybrid Adjoint- use source to source AD tools - optimize differentiated code- merge “continuous and discrete” routines
Different Adjoint Approaches
26Summer School on AD, Bommerholz, August 14-18,2006
Nomenclature
27Summer School on AD, Bommerholz, August 14-18,2006
28Summer School on AD, Bommerholz, August 14-18,2006
29Summer School on AD, Bommerholz, August 14-18,2006
30Summer School on AD, Bommerholz, August 14-18,2006
31Summer School on AD, Bommerholz, August 14-18,2006
32Summer School on AD, Bommerholz, August 14-18,2006
33Summer School on AD, Bommerholz, August 14-18,2006
0=∂∂
⎟⎠⎞
⎜⎝⎛
∂∂
−∂∂
⎟⎠⎞
⎜⎝⎛
∂∂
−∂
∂−
ywg
xwf
t
TT ψψψAdjointEuler-Equations:
Boundary conditions:
∫ ++−−=C
IKdlxypI )()( 32 ξξ δψδψδ
∫ +−+−−D
TT dAgxfygxfy )()( ξξηηηξ δδψδδψ
Adjoint volume formulation of cost function’s gradient:
Ψ: Vector of adjoint variables
)(32 Idnn yx −=+ ψψ
0=wδ,0,..., =ηξ δδ yxWall:Farfield:
Continuous Adjoint Approach
34Summer School on AD, Bommerholz, August 14-18,2006
)sincos(2)( 2 ααγ yx
refD nn
CpMCd +=
∞∞
dlnnCC
CK yC
xpref
D )sincos(1)( αδαδ∫ +=
)sincos(2)( 2 ααγ xy
refL nn
CpMCd −=
∞∞
dlnnCC
CK xC
ypref
L )sincos(1)( αδαδ∫ −=
))()((2
)(22 mxmyref
m yynxxnCpM
Cd −−−=∞∞γ
dlyynxxnCC
CKC
mxmypref
m ))()((1)( 2 ∫ −−−= δ
Drag
Pitching moment
Lift
Continuous Adjoint Approach
35Summer School on AD, Bommerholz, August 14-18,2006
Continuous adjoint• Euler implemented in FLOWer & TAU• surface formulation for gradient evaluation• one shot method (FLOWer)• coupled aero-structure adjoint (FLOWer) • Navier-Stokes (frozen μ) implemented
in FLOWer, robustness problems
Discrete adjoint• implemented in TAU • Euler & RANS with several turbulence
models• currently high memory requirements• experience with automatic differentiation
(FLOWer and TAUij) moment
pressure drag
comparison of gradients (airfoil, inviscid)
TAU-Code
Adjoint solvers
36Summer School on AD, Bommerholz, August 14-18,2006
Continuous adjoint solver FLOWer
Adjoint solver on block-structured grids
• continuous adjoint approach• implemented in FLOWer• cost functions: lift, drag & moment
and combinations • adjoint solver based on multigrid• Euler & Navier-Stokes (frozen μ)
convergence history, FLOWer
-12.4408 -9.55489 -6.66898 -3.78306 -0.897145 1.98877 4.87468 7.7606
ψ1
37Summer School on AD, Bommerholz, August 14-18,2006n-th Design Variable
-∇C
m
0 10 20 30 40 50-5
-4
-3
-2
-1
0
1
2
AdjointFinite Differences
n-th Design Variable
-∇C
L
0 10 20 30 40 50-18
-16
-14
-12
-10
-8
-6
-4
-2
0
2
AdjointFinite Differences
n-th Design Variable
-∇C
D
0 10 20 30 40 50-0.8
-0.6
-0.4
-0.2
0
0.2
0.4
0.6
0.8
AdjointFinite Differences
RAE2822M∞=0.73, α = 2.0°50 design variables(B-spline)
Validation of continuous adjoint solver in FLOWerAdjoint approach vs. finite differences‘ gradient
drag
lift
moment
finite differences: 51 calls of FLOWer MAINadjoint approach:1 call of FLOWer MAIN3 calls of FLOWer ADJOINT
38Summer School on AD, Bommerholz, August 14-18,2006
Validation of adjoint gradient based optimization
Objective function
4 Drag reduction for RAE 2822 airfoil
4 M∞ =0.73, α=2.00°
Constraints
4 Constant thickness
Approach
4 FLOWer Euler Adjoint
4 Deformation of camberline(20 Hicks-Henne functions)
Optimizer
4 Steepest Descent
4 Conjugate Gradient
4 Quasi Newton Trust Region
39Summer School on AD, Bommerholz, August 14-18,2006
Validation of adjoint gradient based optimization
Objective function
4 Drag reduction for RAE 2822 airfoil
4 M∞ =0.73, α=2.00°
Constraints
4 Constant thickness
Approach
4 FLOWer Euler Adjoint
4 Deformation of camberline(20 Hicks-Henne functions)
Optimizer
4 Steepest Descent
4 Conjugate Gradient
4 Quasi Newton Trust Region
40Summer School on AD, Bommerholz, August 14-18,2006
Orthogonalprojection
ii i
DTi
D bb
CbCb ∑=
∇+−∇=
2
123
03 =ba Ti , 2,1=i
⎪⎪⎪
⎩
⎪⎪⎪
⎨
⎧
=−=
=
∑=
+++ . 2,1
,
12
111
11
lbbabab
ab
i
l
i i
lTi
ll
},,{},,{ 321 DmL CCCaaa −∇∇∇=
)()( )(kLL XCrC ≈
0)()()(
)(
)(
)(
)( =∇=k
kT
LXk
kL
rrC
drXdC
k
},,{ 321 bbb
Schmidt - orthogonalization
:
In direction b3 the drag is reduced while thelift and pitching moment are held constant
it holdsIn direction r(k) the drag is reduced whilethe lift is held constant
.
X(k)
LC∇ DC∇−
r(k)
r
Treatment of Constraints
41Summer School on AD, Bommerholz, August 14-18,2006
Orthogonalprojection
ii i
DTi
D bb
CbCb ∑=
∇+−∇=
2
123
03 =ba Ti , 2,1=i
⎪⎪⎪
⎩
⎪⎪⎪
⎨
⎧
=−=
=
∑=
+++ . 2,1
,
12
111
11
lbbabab
ab
i
l
i i
lTi
ll
},,{},,{ 321 DmL CCCaaa −∇∇∇=
)()( )(kLL XCrC ≈
0)()()(
)(
)(
)(
)( =∇=k
kT
LXk
kL
rrC
drXdC
k
},,{ 321 bbb
Schmidt - orthogonalization
:
In direction b3 the drag is reduced while thelift and pitching moment are held constant
it holdsIn direction r(k) the drag is reduced whilethe lift is held constant
.
X(k)
LC∇ DC∇−
r(k)
r
Treatment of Constraints
A lot of other strategies andcommercial packages areavailable !!!
42Summer School on AD, Bommerholz, August 14-18,2006
Objective function
4 Drag reduction for RAE 2822 airfoil
4 M∞ =0.73, α=2.0°
Constraints
4 Lift, pitching moment and angle of attack held constant
4 Constant thickness
Approach
4 FLOWer Euler Adjoint
4 Constraints handled byfeasible direction
4 Deformation of camberline
Multi-constraint airfoil optimization RAE2822
43Summer School on AD, Bommerholz, August 14-18,2006
Objective function
4 Drag reduction for RAE 2822 airfoil
4 M∞ =0.73, α=2.0°
Constraints
4 Lift, pitching moment and angle of attack held constant
4 Constant thickness
Approach
4 FLOWer Euler Adjoint
4 Constraints handled byfeasible direction
4 Deformation of camberline
Multi-constraint airfoil optimization RAE2822
surface pressure distribution
44Summer School on AD, Bommerholz, August 14-18,2006
Objective function
4 Reduction of drag in 2 design points
Design points
4 1 : M∞=0.734, CL = 0.80 , α = 2.8°, Re=6.5x106, xtrans=3%, W1=2
4 2 : M∞=0.754, CL = 0.74 , α = 2.8°, Re=6.2x106, xtrans=3%, W2=1
Constraints
4 No lift decrease, no change in angle of incidence
4 Variation in pitching moment less than 2% in each point
4 Maximal thickness constant and at 5% chord more than 96% of initial
4 Leading edge radius more than 90% of initial
4 Trailing edge angle more than 80% of initial
Multipoint airfoil optimization RAE2822
),(2
1iid
ii MCWI α∑
=
=
45Summer School on AD, Bommerholz, August 14-18,2006
Parameterization4 20 design variables changing camberline, Hicks-Henne functions
Optimization strategy4 Constrained SQP
4 Navier-Stokes solver FLOWer, Baldwin/Lomax turbulence model
4 Gradients provided by FLOWer Adjoint, based on Euler equations
Results
Pt α Mi Clt Cdt (.10-4) Cl Cdt (.10-4) ΔCd/Cdt ΔCl/Clt ΔCm/Cmt
1 2.8 0.734 0.811 197.1 0.811 135.5 -31.2% 0% +1.6%
2 2.8 0.754 0.806 300.8 0.828 215.0 -27.4% +2.7% +2.0%
Multipoint airfoil optimization RAE2822
46Summer School on AD, Bommerholz, August 14-18,2006
1. design point 2. design point
shape geometry
Multipoint airfoil optimization RAE2822
47Summer School on AD, Bommerholz, August 14-18,2006
Objective function
4 drag reduction by constant lift
Design point
4 Mach number = 2.0
4 lift coefficient = 0.12
Constraints
4 fuselage incidence
4 minimum fuselage radius
4 wing planform unchanged
4 minimum wing thickness distribution in spanwise direction
Optimization of SCT Configuration (SCT – Supersonic Cruise Transporter)
48Summer School on AD, Bommerholz, August 14-18,2006
Approach
4 FLOWer code in Euler mode with target lift option
4 Lift kept constant by adjusting angle of attack
4 FLOWer code in Euler adjoint mode
4 Adjoint gradient formulation
4 Structured mono-block grid (MegaCads), 230.000 grid points
Optimization strategy
4 Quasi-Newton Method (BFGS algorithm)
Optimization of SCT Configuration
49Summer School on AD, Bommerholz, August 14-18,2006
Fuselage
10 sections controlled by Bezier nodes
Design variables h fuselage: 10 parametersh twist deformation: 10 parametersh camberline (8 sections): 32 parametersh thickness (8 sections): 32 parametersh angle of attack: 1 parameter .
85 parameters
Optimization of SCT Configuration
50Summer School on AD, Bommerholz, August 14-18,2006
Camberline Thickness
Deformation in8 sections
Deformation in 8 sections
Design variables h fuselage: 10 parametersh twist deformation: 10 parametersh camberline (8 sections): 32 parametersh thickness (8 sections): 32 parametersh angle of attack: 1 parameter .
85 parameters
Optimization of SCT Configuration
51Summer School on AD, Bommerholz, August 14-18,2006
Design variables h fuselage: 10 parametersh twist deformation: 10 parametersh camberline (8 sections): 32 parametersh thickness (8 sections): 32 parametersh angle of attack: 1 parameter .
85 parametersThickness and camberline
Normalised airfoil
Optimization of SCT Configuration
52Summer School on AD, Bommerholz, August 14-18,2006
11 times faster than classical approach
14.6 Drag Counts
optimized geometry
baseline geometry
Optimization of SCT Configuration
53Summer School on AD, Bommerholz, August 14-18,2006
11 times faster than classical approach
14.6 Drag Counts
optimized geometry
baseline geometry
Optimization of SCT Configuration
54Summer School on AD, Bommerholz, August 14-18,2006
and Area RuleRadius of the fuselage in freestream direction
Optimization of SCT Configuration
55Summer School on AD, Bommerholz, August 14-18,2006
Wing section and pressure distribution
η=0.24
η=0.49
η=0.92
Optimization of SCT Configuration
56Summer School on AD, Bommerholz, August 14-18,2006
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)→ See lecture of Andreas Griewank!
57Summer School on AD, Bommerholz, August 14-18,2006
FastOpt
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
ADFLOWer by TAF( )
58Summer School on AD, Bommerholz, August 14-18,2006
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
59Summer School on AD, Bommerholz, August 14-18,2006
Ma = 0.734α = 2.8°Re = 6x10^6kw turbulence model
Demonstrates convergence of discrete sensitivities including turbulence
Same sensitivity for Navier-Stokes adjoint (Wilcox kw) and tangent linear model
ADFLOWer
60Summer School on AD, Bommerholz, August 14-18,2006
Demonstrates convergence of discrete sensitivities including turbulence
Same sensitivity for Navier-Stokes adjoint (Wilcox kw) and tangent linear model
Ma = 0.734α = 2.8°Re = 6x10^6kw turbulence model
ADFLOWer
61Summer School on AD, Bommerholz, August 14-18,2006
• Adjoint version of entire design chain by ADOL-C (TU-Dresden)• TAUij (2D Euler) + mesh deformation + parameterization
Px
xdx
dxm
mC
dPdC new
new
DD
∂∂
⋅∂∂
⋅∂∂
⋅∂
∂=
)()(
and
TAUij_AD meshdefo_AD defgeo_AD
Automatic Differentiation of Entire Design Chain
Idx
xxxdx
new
oldnew
new
=∂
−∂=
∂∂ )()(
design vector (P) → defgeo → difgeo → meshdefo → flow solver → CD
xnew dx m
surface grid grid
62Summer School on AD, Bommerholz, August 14-18,2006
• 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 Entire Design Chain
63Summer School on AD, Bommerholz, August 14-18,2006
Drag reduction • RAE 2822, M = 0.73, α = 2.0°• inviscid flow, mesh 161x33 cells• 20 design variables (Hicks-Henne)• steepest descent
First Application / Validation:
Automatic Differentiation of Entire Design Chain
64Summer School on AD, Bommerholz, August 14-18,2006
Coupled Aero-Structure Adjoint
Motivation
Wing deflection up to 7% of wing span!
Deflected aerodynamicoptimal shape can beworse than the initial …
Boeing 737Boeing 737--800 at ground and in cruise (Ma = 0.76)800 at ground and in cruise (Ma = 0.76)
65Summer School on AD, Bommerholz, August 14-18,2006
Coupled Aero-Structure Adjoint
AMP wing
15 design variables(shape bumping functions based on Bernstein polynomials)
Ma=0.78alpha=2.83
Drag reduction byconstant lift
Taking into accountstatic deformation
NASTRANshell/beam model126 nodes
FLOWer MAIN/ADJOINT15 design variablesMa=0.78alpha=2.83(300.000 cells)
66Summer School on AD, Bommerholz, August 14-18,2006
A
TAD
S
TS
dR
dC
dR ψψ ~⎟
⎠⎞
⎜⎝⎛
∂∂
−∂
∂=⎟
⎠⎞
⎜⎝⎛
∂∂
Pd
dC
Pw
wC
PC
dPdC DDDD
∂∂
∂∂
+∂∂
∂∂
+∂
∂=
PR
PR
PC
dPdC ST
SAT
ADD
∂∂
−∂∂
−∂
∂= ψψ
S
TSD
A
TA
wR
wC
wR ψψ ~⎟
⎠⎞
⎜⎝⎛
∂∂
−∂
∂=⎟
⎠⎞
⎜⎝⎛
∂∂
0=AR
0=−= aKdRS
Aerodynamics, e.g Euler Eqn.:
Structure:
K: Symmetric stiffness matrixa: Aerodynamic forced: Displacement vectorP: Vector of Design variables
Coupled Aero-Structure Adjoint
Adjoint Gradient:
Aero/Structure Adjoint System:
Conventional Gradient:
::
S
A
ψψ Aerodynamic Adjoint
Structure Adjoint~: Lagged ...
67Summer School on AD, Bommerholz, August 14-18,2006
Coupled Aero-Structure Adjoint
Pad
PK
PaKd
PR
KKd
aKddR
wa
waKd
wR
wC
PC
dC
PR
dR
S
TS
S
D
DD
AA
∂∂
−∂∂
=∂
−∂=
∂∂
==∂
−∂=
∂∂
∂∂
−=∂
−∂=
∂∂
∂∂
∂∂
∂∂
∂∂
∂∂
)(
)(
)(
,
, : perturb shape by d,P → calculate change in CFD residual
: perturb shape by d,P → calculate change in drag coefficient
: treat → boundary condition∫ +∂∂
Cyx nn
wp )...sincos(... αα
: treat → boundary condition∫ ∂∂
C wp ......
… has been derived before!
68Summer School on AD, Bommerholz, August 14-18,2006
Coupled Aero-Structure Adjoint
Finite Differences:Perturb the shape by each designvariable and converge the aero-elastic loop until stationary behavior
Coupled Aero-Structure Adjoint:Each 100 iterations the laggedis updated ...
Sψ~
AMP wing
Aψ
69Summer School on AD, Bommerholz, August 14-18,2006
PR
PR
PC
dPdC ST
SAT
ADD
∂∂
−∂∂
−∂
∂= ψψ
Validation of Adjoint Gradient
Coupled Aero-Structure Adjoint
NASTRANshell/beam model126 nodes
15 design variablesMa=0.78alpha=2.83(300.000 cells)
AMP wing
70Summer School on AD, Bommerholz, August 14-18,2006
PR
PR
PC
dPdC ST
SAT
ALL
∂∂
−∂∂
−∂
∂= ψψ
Validation of Adjoint Gradient
Coupled Aero-Structure Adjoint
NASTRANshell/beam model126 nodes
15 design variablesMa=0.78alpha=2.83(300.000 cells)
AMP wing
71Summer School on AD, Bommerholz, August 14-18,2006
Coupled Aero-Structure Adjoint
AMP wing
240 design variables(control points free form deformation)
Ma=0.78alpha=2.83
Drag reduction byconstant lift ΔCD= 24.9 %
ΔCL= 0.1%
feasible direction method
72Summer School on AD, Bommerholz, August 14-18,2006
Coupled Aero-Structure Adjoint
AMP wing
240 design variables(control points free form deformation)
Ma=0.78alpha=2.83
Drag reduction byconstant lift
baseline
optimized
73Summer School on AD, Bommerholz, August 14-18,2006
Coupled Aero-Structure Adjoint
Comparison of numerical effort:(PC Pentium IV, 2.6 GHz, 2GB RAM)
• Coupled adjoint: 15 days(11 gradient and 91 state evaluations)
• Finite differences: 227 days
AMP wing
240 design variables(control points free form deformation)
Ma=0.78alpha=2.83
Drag reduction byconstant lift
74Summer School on AD, Bommerholz, August 14-18,2006
Aero-Structure MDO
FWW
CCR
D
L
−∝ ln
)1(0 ksWW λ+=
∑ −=
n
nks ))exp(ln(1
0
0
σσσβ
βλ=0.2 , σ0 =30.000 and β=40
Range R:
Weight W:
Fuel Weight F
⎟⎟⎟⎟
⎠
⎞
⎜⎜⎜⎜
⎝
⎛
−+
+=
0
1
1ln
WFks
ksCC
D
L
λ
λ
Kreisselmeier-Steinhauser:PR
Pks
dPdks AT
∂∂
+∂∂
= ψ
pksnnn zyx ∂
∂−=++ 432 ψψψ
adjoint b.c.
75Summer School on AD, Bommerholz, August 14-18,2006
AMP wing
240 design variables(control points free form deformation)
Ma=0.78alpha=2.83
Range maximization byconstant lift
Aero-Structure MDO
ΔCD = -25 %
Δks = -10 %
ΔR = +37 %
feasible direction method
76Summer School on AD, Bommerholz, August 14-18,2006
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
∫=∇V
mn
m dVxiI ))(,(w,)( δψ
Adjoint solverR*(w,ψk,xn)=0
dim x = M
n-loop n=1,…,N
m-loopm=1,…,M
All at once?
77Summer School on AD, Bommerholz, August 14-18,2006
),(),(),,( xwRxwIxwL Tψψ −=
Simultaneous Pseudo-Time stepping- One Shot Approach -
0),(0),,(0),,(
==∇=∇
xwRxwLxwL
x
w
ψψ
(state equation)
(adjoint equation)
(design equation)
University of Trier
min Ι (w,x)
s.t. R(w,x)=0
dim x = M
( )( )
⎥⎥⎥
⎦
⎤
⎢⎢⎢
⎣
⎡∇∇
⎥⎥⎥
⎦
⎤
⎢⎢⎢
⎣
⎡
∂∂∂∂∂∂∂∂
−⎥⎥⎥
⎦
⎤
⎢⎢⎢
⎣
⎡=
⎥⎥⎥
⎦
⎤
⎢⎢⎢
⎣
⎡
Δ+Δ+Δ+
−
RLL
xRwRxRLLwRLL
xw
xxww
x
wT
xxxw
Twxww
1
0////
ψψψ
( )⎥⎥⎥
⎦
⎤
⎢⎢⎢
⎣
⎡
−∇−∇−
⎥⎥⎥
⎦
⎤
⎢⎢⎢
⎣
⎡
∂∂∂∂=
⎥⎥⎥
⎦
⎤
⎢⎢⎢
⎣
⎡
ΔΔΔ −
RLL
xRIxRB
Ixw
x
wT
1
0//0
00
ψ
KKT
Newton SQPmethod
inexact Newton rSQP method
simultaneous preconditionedpseudo time stepping
78Summer School on AD, Bommerholz, August 14-18,2006
Lx∇
start geometryx0
ψk+1
x0
wk+1
xk+1
primal updatewk+1=wk-Δt·R(wk,xk)
gradient
∫ ++=∇V
mkkk
mx dVxlL ))(,,(w)( 11 δψ
k-loop dual update
ψk+1= ψk-Δt·R*(wk+1,ψk,xk)
}{ 111 LxRBLBtxx w
T
kxkkk ∇⎟
⎠⎞
⎜⎝⎛
∂∂
−∇Δ−= −−+
m-loopm=1,…,M
design update
Bk – BFGS updatesof reduced Hessian Lxx
Simultaneous Pseudo-Time stepping- One Shot Approach - University of Trier
79Summer School on AD, Bommerholz, August 14-18,2006
Optimization problem• drag reduction for RAE 2822 • inviscid flow• M=0.73, a=20
Tools• FLOWer• FLOWer adjoint
Simultaneous Pseudo-Time stepping- One Shot Approach - University of Trier
80Summer School on AD, Bommerholz, August 14-18,2006
Optimization at the cost of 4 flow simulations!
Simultaneous Pseudo-Time stepping- One Shot Approach - University of Trier