mathematical details of adjoint-based shape optimization ... · mathematical details of...

57
Introduction Design Using the Euler Equations Design Using the RANS Equations Continuous turbulent adjoint Conclusions Mathematical details of adjoint-based shape optimization for the Euler and Reynolds-Averaged Navier-Stokes equations (With thanks to Francisco Palacios, Jeff Fike, and Joaquim Martins) Juan J. Alonso Department of Aeronautics and Astronautics, Stanford University OPTPDE 2011 July 5th, 2011 - Bilbao, Spain Juan J. Alonso Mathematical details of adjoint solvers

Upload: dinhtram

Post on 27-Apr-2018

238 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: Mathematical details of adjoint-based shape optimization ... · Mathematical details of adjoint-based shape ... Transonic NACA-0012 ... “Airfoil geometry parameterization through

IntroductionDesign Using the Euler Equations

Design Using the RANS EquationsContinuous turbulent adjoint

Conclusions

Mathematical details of adjoint-based shapeoptimization for the Euler and

Reynolds-Averaged Navier-Stokes equations(With thanks to Francisco Palacios, Jeff Fike, and Joaquim Martins)

Juan J. Alonso

Department of Aeronautics and Astronautics, Stanford University

OPTPDE 2011July 5th, 2011 - Bilbao, Spain

Juan J. Alonso Mathematical details of adjoint solvers

Page 2: Mathematical details of adjoint-based shape optimization ... · Mathematical details of adjoint-based shape ... Transonic NACA-0012 ... “Airfoil geometry parameterization through

IntroductionDesign Using the Euler Equations

Design Using the RANS EquationsContinuous turbulent adjoint

Conclusions

Optimal design in aerodynamicsAlternatives for sensitivity calculations

Outline

1 IntroductionOptimal design in aerodynamicsAlternatives for sensitivity calculations

2 Design Using the Euler Equations

3 Design Using the RANS EquationsSpalart-Allmaras Turbulence Model

4 Continuous adjoint for the Spalart–Allmaras modelAnalytical formulationTransonic RAE-2822Transonic NACA-0012Optimization of a transonic airfoil

5 Conclusions

Juan J. Alonso Mathematical details of adjoint solvers

Page 3: Mathematical details of adjoint-based shape optimization ... · Mathematical details of adjoint-based shape ... Transonic NACA-0012 ... “Airfoil geometry parameterization through

IntroductionDesign Using the Euler Equations

Design Using the RANS EquationsContinuous turbulent adjoint

Conclusions

Optimal design in aerodynamicsAlternatives for sensitivity calculations

Introduction to Optimization

Non-linear program

minimize I(~x)

~x ∈ RNx

subject to gm(~x) ≥ 0, m = 1,2, . . . ,Ng

I: objective function, output (e.g. structural weight).xn: vector of design variables, inputs (e.g. aerodynamic shape);bounds can be set on these variables.gm: vector of constraints (e.g. element von Mises stresses); ingeneral these are nonlinear functions of the design variables.

Juan J. Alonso Mathematical details of adjoint solvers

Page 4: Mathematical details of adjoint-based shape optimization ... · Mathematical details of adjoint-based shape ... Transonic NACA-0012 ... “Airfoil geometry parameterization through

IntroductionDesign Using the Euler Equations

Design Using the RANS EquationsContinuous turbulent adjoint

Conclusions

Optimal design in aerodynamicsAlternatives for sensitivity calculations

Optimization Methods

Intuition: decreases with increasing dimensionality.

Grid or random search: the cost of searching thedesign space increases rapidly with the number ofdesign variables.Evolutionary/Genetic algorithms: good for discre-te design variables and very robust; are they feasiblewhen using a large number of design variables?

Nonlinear simplex: simple and robust but inefficientfor more than a few design variables.

Gradient-based: the most efficient for a large num-ber of design variables; assumes the objective fun-ction is “well-behaved”. Convergence only guaran-teed to a local minimum.

Juan J. Alonso Mathematical details of adjoint solvers

Page 5: Mathematical details of adjoint-based shape optimization ... · Mathematical details of adjoint-based shape ... Transonic NACA-0012 ... “Airfoil geometry parameterization through

IntroductionDesign Using the Euler Equations

Design Using the RANS EquationsContinuous turbulent adjoint

Conclusions

Optimal design in aerodynamicsAlternatives for sensitivity calculations

Aerodynamic shape optimization

Shape optimization problem

Find Smin ∈ Sad such that

J(Smin) = minS∈SadJ(S),

where J(S) =R

S j(U,~n, ~x) ds.

Cost function j : drag/lift coefficients,deviation from pressure distribution, sonicboom intensity measures, total pressureloss, entropy increase. . .

Surface parameterized by a suitablenumber of shape functions.

Figure 1: Generic wing with parameterizing control points1.

Figure 2: Flow diagram in aerodynamic optimization2.

1 J.E. Hicken, “Efficient algorithms for future aircraft design”.2 M. Khurana, “Airfoil geometry parameterization throughshape optimizer and computational fluid dynamics”.

Juan J. Alonso Mathematical details of adjoint solvers

Page 6: Mathematical details of adjoint-based shape optimization ... · Mathematical details of adjoint-based shape ... Transonic NACA-0012 ... “Airfoil geometry parameterization through

IntroductionDesign Using the Euler Equations

Design Using the RANS EquationsContinuous turbulent adjoint

Conclusions

Optimal design in aerodynamicsAlternatives for sensitivity calculations

Gradient-Based Optimization: Design Cycle

Analysis computes objectivefunction and constraints (e.g.aero-structural solver)Optimizer uses the sensitivityinformation to search for theoptimum solution(e.g. sequential quadraticprogramming)Sensitivity calculation is usuallythe bottleneck in the designcycle, particularly for largedimensional design spaces.Accuracy of the sensitivities isimportant, specially near theoptimum.

Juan J. Alonso Mathematical details of adjoint solvers

Page 7: Mathematical details of adjoint-based shape optimization ... · Mathematical details of adjoint-based shape ... Transonic NACA-0012 ... “Airfoil geometry parameterization through

IntroductionDesign Using the Euler Equations

Design Using the RANS EquationsContinuous turbulent adjoint

Conclusions

Optimal design in aerodynamicsAlternatives for sensitivity calculations

Sensitivity Analysis Methods

Finite Differences: very popular; easy, but lacks robustness andaccuracy; run solver Nx times.

dfdxn≈ f (xn + h)− f (x)

h+O(h)

Complex-Step Method: relatively new; accurate and robust;easy to implement and maintain; run solver Nx times.

dfdxn≈ Im [f (xn + ih)]

h+O(h2)

Algorithmic/Automatic/Computational Differentiation:accurate; ease of implementation and cost varies.(Semi)-Analytic Methods: efficient and accurate; longdevelopment time; cost can be independent of Nx .

Juan J. Alonso Mathematical details of adjoint solvers

Page 8: Mathematical details of adjoint-based shape optimization ... · Mathematical details of adjoint-based shape ... Transonic NACA-0012 ... “Airfoil geometry parameterization through

IntroductionDesign Using the Euler Equations

Design Using the RANS EquationsContinuous turbulent adjoint

Conclusions

Optimal design in aerodynamicsAlternatives for sensitivity calculations

Finite-Difference Derivative Approximations

From Taylor series expansion,

f (x + h) = f (x) + hf ′(x) + h2 f ′′(x)

2!+ h3 f ′′′(x)

3!+ . . . .

Forward-difference approximation:

⇒ df (x)

dx=

f (x + h)− f (x)

h+O(h).

f (x) 1,234567890123484f (x + h) 1,234567890123456

∆f 0,000000000000028

x x+h

f(x)

f(x+h)

Juan J. Alonso Mathematical details of adjoint solvers

Page 9: Mathematical details of adjoint-based shape optimization ... · Mathematical details of adjoint-based shape ... Transonic NACA-0012 ... “Airfoil geometry parameterization through

IntroductionDesign Using the Euler Equations

Design Using the RANS EquationsContinuous turbulent adjoint

Conclusions

Optimal design in aerodynamicsAlternatives for sensitivity calculations

Complex-Step Derivative Approximation

Can also be derived from a Taylor series expansion about x with acomplex step ih:

f (x + ih) = f (x) + ihf ′(x)− h2 f ′′(x)

2!− ih3 f ′′′(x)

3!+ . . .

⇒ f ′(x) =Im [f (x + ih)]

h+ h2 f ′′′(x)

3!+ . . .

⇒ f ′(x) ≈ Im [f (x + ih)]

h

No subtraction! Second order approximation. (Martins, Sturdza,Alonso, ACM Trans. Math. Soft., 2003)

Juan J. Alonso Mathematical details of adjoint solvers

Page 10: Mathematical details of adjoint-based shape optimization ... · Mathematical details of adjoint-based shape ... Transonic NACA-0012 ... “Airfoil geometry parameterization through

IntroductionDesign Using the Euler Equations

Design Using the RANS EquationsContinuous turbulent adjoint

Conclusions

Optimal design in aerodynamicsAlternatives for sensitivity calculations

Simple Numerical Example

Step Size, h

Norm

aliz

ed

Err

or,

Complex-StepForward-DifferenceCentral-Difference

Estimate derivative atx = 1,5 of the function,

f (x) =ex

√sin3x + cos3x

Relative error defined as:

ε =

∣∣f ′ − f ′ref

∣∣∣∣f ′ref

∣∣

Juan J. Alonso Mathematical details of adjoint solvers

Page 11: Mathematical details of adjoint-based shape optimization ... · Mathematical details of adjoint-based shape ... Transonic NACA-0012 ... “Airfoil geometry parameterization through

IntroductionDesign Using the Euler Equations

Design Using the RANS EquationsContinuous turbulent adjoint

Conclusions

Optimal design in aerodynamicsAlternatives for sensitivity calculations

Would You Like Second Derivatives?

Unfortunately, complex step formulations are also subject tosubtractive cancellation when used for second derivatives? What canyou do? If you are interested, we have recently developed a methodbased on hyper-dual numbers that gives exact second derivatives,independently of the step, h!Hyper-dual numbers have one real part and three non-real parts:

x = x0 + x1ε1 + x2ε2 + x3ε1ε2

ε21 = ε22 = 0ε1 6= ε2 6= 0

ε1ε2 = ε2ε1 6= 0

With these definitions, the Taylor series expansion truncates exactlyat the second-derivative term.

Juan J. Alonso Mathematical details of adjoint solvers

Page 12: Mathematical details of adjoint-based shape optimization ... · Mathematical details of adjoint-based shape ... Transonic NACA-0012 ... “Airfoil geometry parameterization through

IntroductionDesign Using the Euler Equations

Design Using the RANS EquationsContinuous turbulent adjoint

Conclusions

Optimal design in aerodynamicsAlternatives for sensitivity calculations

Hyper-Dual NumbersIn other words:

f (x +h1ε1 +h2ε2 +0ε1ε2) = f (x)+h1f ′(x)ε1 +h2f ′(x)ε2 +h1h2f ′′(x)ε1ε2

There is no truncation error and no subtractive cancellation error(because of the definition of the hyper-dual numbers, see Fike andAlonso, AIAA-2011-3847). Evaluate a function with a hyper-dual step:

f (~x + h1ε1~ei + h2ε2~ej + ~0ε1ε2)

Derivative information can be found by examining the non-real parts:

∂f (~x)

∂xi=ε1part [f (~x + h1ε1~ei + h2ε2~ej + ~0ε1ε2)]

h1

∂f (~x)

∂xj=ε2part [f (~x + h1ε1~ei + h2ε2~ej + ~0ε1ε2)]

h2

∂2f (~x)

∂xi∂xj=ε1ε2part [f (~x + h1ε1~ei + h2ε2~ej + ~0ε1ε2)]

h1h2Juan J. Alonso Mathematical details of adjoint solvers

Page 13: Mathematical details of adjoint-based shape optimization ... · Mathematical details of adjoint-based shape ... Transonic NACA-0012 ... “Airfoil geometry parameterization through

IntroductionDesign Using the Euler Equations

Design Using the RANS EquationsContinuous turbulent adjoint

Conclusions

Optimal design in aerodynamicsAlternatives for sensitivity calculations

Challenges in Large-Scale Sensitivity Analysis

There are efficient methods to obtain sensitivities of manyfunctions with respect to a few design variables - Direct Method.There are efficient methods to obtain sensitivities of a fewfunctions with respect to many design variables - Adjointmethod.Unfortunately, there are no known methods to obtain sensitivitiesof many functions with respect to many design variables.This is the curse of dimensionality.

Juan J. Alonso Mathematical details of adjoint solvers

Page 14: Mathematical details of adjoint-based shape optimization ... · Mathematical details of adjoint-based shape ... Transonic NACA-0012 ... “Airfoil geometry parameterization through

IntroductionDesign Using the Euler Equations

Design Using the RANS EquationsContinuous turbulent adjoint

Conclusions

Optimal design in aerodynamicsAlternatives for sensitivity calculations

Symbolic Development of the Adjoint MethodLet I be the cost (or objective) function

I = I(w ,F)

where

w = flow field variablesF = grid variables

The first variation of the cost function is

δI =∂I∂w

T

δw +∂I∂F

T

δF

The flow field equation and its first variation are

R(w ,F) = 0

δR = 0 =

[∂R∂w

]δw +

[∂R∂F

]δF

Juan J. Alonso Mathematical details of adjoint solvers

Page 15: Mathematical details of adjoint-based shape optimization ... · Mathematical details of adjoint-based shape ... Transonic NACA-0012 ... “Airfoil geometry parameterization through

IntroductionDesign Using the Euler Equations

Design Using the RANS EquationsContinuous turbulent adjoint

Conclusions

Optimal design in aerodynamicsAlternatives for sensitivity calculations

Symbolic Development of the Adjoint MethodIntroducing a Lagrange Multiplier, ψ, and using the flow field equationas a constraint

δI =∂I∂w

T

δw +∂I∂F

T

δF − ψT[

∂R∂w

]δw +

[∂R∂F

]δF

=

∂I∂w

T

− ψT[∂R∂w

]δw +

∂I∂F

T

− ψT[∂R∂F

]δF

By choosing ψ such that it satisfies the adjoint equation[∂R∂w

]T

ψ =∂I∂w

,

we have

δI =

∂I∂F

T

− ψT[∂R∂F

]δF

Juan J. Alonso Mathematical details of adjoint solvers

Page 16: Mathematical details of adjoint-based shape optimization ... · Mathematical details of adjoint-based shape ... Transonic NACA-0012 ... “Airfoil geometry parameterization through

IntroductionDesign Using the Euler Equations

Design Using the RANS EquationsContinuous turbulent adjoint

Conclusions

Optimal design in aerodynamicsAlternatives for sensitivity calculations

Symbolic Development of the Adjoint Method

The expression for each component of the gradient no longerdepends on δw and, therefore, no flow re-evaluation is need (as is thecase in finite-difference methods). Variations with respect to theshape δF can be computed with relatively little computational effort.

This reduces the gradient calculation for an arbitrarily large number ofdesign variables at a single design point to

One Flow Solution+ One Adjoint Solution

independently of the number of design parameters.

Juan J. Alonso Mathematical details of adjoint solvers

Page 17: Mathematical details of adjoint-based shape optimization ... · Mathematical details of adjoint-based shape ... Transonic NACA-0012 ... “Airfoil geometry parameterization through

IntroductionDesign Using the Euler Equations

Design Using the RANS EquationsContinuous turbulent adjoint

Conclusions

Optimal design in aerodynamicsAlternatives for sensitivity calculations

Design Cycle

sectionsplanform

Shape & GridModification

repeated untilConvergence

Design Cycle

Flow Solver

Adjoint Solver

Gradient CalculationAerodynamics

Structure

Juan J. Alonso Mathematical details of adjoint solvers

Page 18: Mathematical details of adjoint-based shape optimization ... · Mathematical details of adjoint-based shape ... Transonic NACA-0012 ... “Airfoil geometry parameterization through

IntroductionDesign Using the Euler Equations

Design Using the RANS EquationsContinuous turbulent adjoint

Conclusions

Outline

1 IntroductionOptimal design in aerodynamicsAlternatives for sensitivity calculations

2 Design Using the Euler Equations

3 Design Using the RANS EquationsSpalart-Allmaras Turbulence Model

4 Continuous adjoint for the Spalart–Allmaras modelAnalytical formulationTransonic RAE-2822Transonic NACA-0012Optimization of a transonic airfoil

5 Conclusions

Juan J. Alonso Mathematical details of adjoint solvers

Page 19: Mathematical details of adjoint-based shape optimization ... · Mathematical details of adjoint-based shape ... Transonic NACA-0012 ... “Airfoil geometry parameterization through

IntroductionDesign Using the Euler Equations

Design Using the RANS EquationsContinuous turbulent adjoint

Conclusions

Design Using the Euler EquationsThe following is a simplified version of the derivation of the adjointequations and gradient computation formulae. In a body-fittedcoordinate system, the Euler equations can be written in conservationlaw form as

∂W∂t

+∂Fi

∂ξi= 0 in D, (1)

whereW = Jw ,

andFi = Sij fj .

The vector of conserved variables is typically given by:

w =

ρρu1ρu2ρu3ρE

fj =

ρuj

ρu1uj + pδ1jρu2uj + pδ2jρu3uj + pδ3j

ρujH

Juan J. Alonso Mathematical details of adjoint solvers

Page 20: Mathematical details of adjoint-based shape optimization ... · Mathematical details of adjoint-based shape ... Transonic NACA-0012 ... “Airfoil geometry parameterization through

IntroductionDesign Using the Euler Equations

Design Using the RANS EquationsContinuous turbulent adjoint

Conclusions

Design Using the Euler EquationsAssuming that the surface being designed, BW , conforms to thecomputational plane ξ2 = 0, the flow tangency condition can bewritten as

U2 = 0 on BW . (2)Introduce the cost function

I =12

∫ ∫BW

(p − pd )2 dξ1dξ3.

A variation in the shape will cause a variation δp in the pressure andconsequently a variation in the cost function

δI =

∫ ∫BW

(p − pd ) δp dξ1dξ3. (3)

Since p depends on w through the equation of state the variation δpcan be determined from the variation δw . Define the Jacobians

Ai =∂fi∂w

, Ci = SijAj . (4)

Juan J. Alonso Mathematical details of adjoint solvers

Page 21: Mathematical details of adjoint-based shape optimization ... · Mathematical details of adjoint-based shape ... Transonic NACA-0012 ... “Airfoil geometry parameterization through

IntroductionDesign Using the Euler Equations

Design Using the RANS EquationsContinuous turbulent adjoint

Conclusions

Formulation of the Design ProblemThe weak form of the equation for δw in the steady state becomes∫

D

∂ψT

∂ξiδFidD =

∫B

(niψT δFi )dB,

where we have integrated the governing equations by parts and

δFi = Ciδw + δSij fj .

Adding to the variation of the cost function

δI =

∫ ∫BW

(p − pd ) δp dξ1dξ3

−∫D

(∂ψT

∂ξiδFi

)dD

+

∫B

(niψ

T δFi)

dB, (5)

which should hold for an arbitrary choice of ψ.Juan J. Alonso Mathematical details of adjoint solvers

Page 22: Mathematical details of adjoint-based shape optimization ... · Mathematical details of adjoint-based shape ... Transonic NACA-0012 ... “Airfoil geometry parameterization through

IntroductionDesign Using the Euler Equations

Design Using the RANS EquationsContinuous turbulent adjoint

Conclusions

Formulation of the Design ProblemIn particular, the choice that satisfies the adjoint equation

∂ψ

∂t− CT

i∂ψ

∂ξi= 0 in D, (6)

subject to far field boundary conditions

niψT Ciδw = 0,

and solid wall conditions

S21ψ2 + S22ψ3 + S23ψ4 = (p − pd ) on BW , (7)

yields and expression for the gradient that is independent of thevariation in the flow solution δw :

δI = −∫D

∂ψT

∂ξiδSij fjdD

−∫ ∫

BW

(δS21ψ2 + δS22ψ3 + S23ψ4) p dξ1dξ3. (8)

Juan J. Alonso Mathematical details of adjoint solvers

Page 23: Mathematical details of adjoint-based shape optimization ... · Mathematical details of adjoint-based shape ... Transonic NACA-0012 ... “Airfoil geometry parameterization through

IntroductionDesign Using the Euler Equations

Design Using the RANS EquationsContinuous turbulent adjoint

Conclusions

Formulation of the Design Problem

The volume integral in blue can be evaluated with ease (however, oneneeds to compute δSij using mesh perturbations). The surfaceintegral in red is also easily evaluated. Note that there are otherformulations where the volume integral can be converted to a surfaceintegral (see next lecture) and the gradient evaluation is simpifiedconsiderably.

Juan J. Alonso Mathematical details of adjoint solvers

Page 24: Mathematical details of adjoint-based shape optimization ... · Mathematical details of adjoint-based shape ... Transonic NACA-0012 ... “Airfoil geometry parameterization through

IntroductionDesign Using the Euler Equations

Design Using the RANS EquationsContinuous turbulent adjoint

Conclusions

Why use the adjoint approach?

Figure 3: CFD as a design tool3.

3 P. Castonguay, S. Nadarajah, “Effect of shape parameterization on aerodynamic shape optimization”.

Juan J. Alonso Mathematical details of adjoint solvers

Page 25: Mathematical details of adjoint-based shape optimization ... · Mathematical details of adjoint-based shape ... Transonic NACA-0012 ... “Airfoil geometry parameterization through

IntroductionDesign Using the Euler Equations

Design Using the RANS EquationsContinuous turbulent adjoint

Conclusions

Spalart-Allmaras Turbulence Model

Outline

1 IntroductionOptimal design in aerodynamicsAlternatives for sensitivity calculations

2 Design Using the Euler Equations

3 Design Using the RANS EquationsSpalart-Allmaras Turbulence Model

4 Continuous adjoint for the Spalart–Allmaras modelAnalytical formulationTransonic RAE-2822Transonic NACA-0012Optimization of a transonic airfoil

5 Conclusions

Juan J. Alonso Mathematical details of adjoint solvers

Page 26: Mathematical details of adjoint-based shape optimization ... · Mathematical details of adjoint-based shape ... Transonic NACA-0012 ... “Airfoil geometry parameterization through

IntroductionDesign Using the Euler Equations

Design Using the RANS EquationsContinuous turbulent adjoint

Conclusions

Spalart-Allmaras Turbulence Model

Viscous turbulent flows

Large Reynolds numbers: the laminarmotion becomes unstable and the fluidturns turbulent (most applications ofindustrial interest).

Figure 4: Flow transitions (experimental observations).

Turbulent flows are computationallychallenging because:

– Fluid properties exhibit random spatialfluctuations.

– Strong dependence from initialconditions.

– Contain a wide range of scales (eddies).

Figure 5: DNS simulation of a turbulent flow.

Juan J. Alonso Mathematical details of adjoint solvers

Page 27: Mathematical details of adjoint-based shape optimization ... · Mathematical details of adjoint-based shape ... Transonic NACA-0012 ... “Airfoil geometry parameterization through

IntroductionDesign Using the Euler Equations

Design Using the RANS EquationsContinuous turbulent adjoint

Conclusions

Spalart-Allmaras Turbulence Model

Reynolds Averaged Navier–Stokes equations

Flow quantities are expressed as the sum of time fluctuations over small timesscales about a steady or slowly varying mean flow:

ui = ui + u′i , ρ = ρ+ ρ′, p = p + p′, T = T + T ′, . . .

Averaging of the Navier–Stokes equations yields for the mean flow:

Navier–Stokes equations

• ∂∂t ρ+ ∂

∂xi(ρui ) = 0

• ∂∂t (ρui ) + ∂

∂xj(ρuj ui ) = − ∂

∂xip

+ ∂∂xj

tji

• ∂∂t (ρE) + ∂

∂xj

`ρuj H

´=

∂∂xj

(ui tij )

− ∂∂xj

qj

RANS equations

• ∂∂t ρ+ ∂

∂xi(ρui ) = 0

• ∂∂t (ρui ) + ∂

∂xj(ρuj ui ) = − ∂

∂xip

+ ∂∂xj

ht ji − ρu′i u

′j

i• ∂∂t (ρE) + ∂

∂xj

“ρuj H + 1

2ρu′i u′i

”=

∂∂xj

hui

“t ji − ρu′i u

′j

”i− ∂∂xj

hqj + ρu′j H

′ − tji u′i + 12ρu′j u

′i u′i

iNew terms require additional modeling to close the RANS equations.

Juan J. Alonso Mathematical details of adjoint solvers

Page 28: Mathematical details of adjoint-based shape optimization ... · Mathematical details of adjoint-based shape ... Transonic NACA-0012 ... “Airfoil geometry parameterization through

IntroductionDesign Using the Euler Equations

Design Using the RANS EquationsContinuous turbulent adjoint

Conclusions

Spalart-Allmaras Turbulence Model

Turbulent Spalart–Allmaras modelThe Spalart–Allmaras model solves an addition convection-diffusion equation(with a source term):8<: ∂t ν +∇ · ~T cv − T s = 0 in Ω,

ν = 0 on S,ν∞ = σ∞ν∞ on Γ∞.

~T cv (U, ν) = − ν+νσ∇ν + ~v ν

T s(U, ν, dS) = cb1Sν − cw1fw“νdS

”2+

cb2σ|∇ν|2

Coupling to the main stream flow:

µtur = ρνfv1 → µ1tot = µdyn + µtur µ2

tot =µdyn

Prd+µtur

Prt

Figure 8: Ratio µtur/µdyn for a RAE-2822 profile in transonic conditions.

Juan J. Alonso Mathematical details of adjoint solvers

Page 29: Mathematical details of adjoint-based shape optimization ... · Mathematical details of adjoint-based shape ... Transonic NACA-0012 ... “Airfoil geometry parameterization through

IntroductionDesign Using the Euler Equations

Design Using the RANS EquationsContinuous turbulent adjoint

Conclusions

Analytical formulationTransonic RAE-2822Transonic NACA-0012Optimization of a transonic airfoil

Outline

1 IntroductionOptimal design in aerodynamicsAlternatives for sensitivity calculations

2 Design Using the Euler Equations

3 Design Using the RANS EquationsSpalart-Allmaras Turbulence Model

4 Continuous adjoint for the Spalart–Allmaras modelAnalytical formulationTransonic RAE-2822Transonic NACA-0012Optimization of a transonic airfoil

5 Conclusions

Juan J. Alonso Mathematical details of adjoint solvers

Page 30: Mathematical details of adjoint-based shape optimization ... · Mathematical details of adjoint-based shape ... Transonic NACA-0012 ... “Airfoil geometry parameterization through

IntroductionDesign Using the Euler Equations

Design Using the RANS EquationsContinuous turbulent adjoint

Conclusions

Analytical formulationTransonic RAE-2822Transonic NACA-0012Optimization of a transonic airfoil

Complete system of equations and boundaryconditions

Navier–Stokes equations:

8>>><>>>:RU (U, ν) = ∇ · ~Fc −∇ ·

“µ1

tot~Fv1 + µ2

tot~Fv2

”= 0 in Ω

~v = 0 on S∂nT = 0 on S(W )+ = W∞ on Γ∞

~Fci =

0BBBB@ρvi

ρvi v1 + Pδi1ρvi v2 + Pδi2ρvi v3 + Pδi3

ρvi H

1CCCCA , ~Fv1i =

0BBBB@·τi1τi2τi3

vjτij

1CCCCA , ~Fv2i =

0BBBB@····

Cp∂i T

1CCCCA , i = 1, . . . , 3

τij = ∂j vi + ∂i vj −2

3δij∇ ·~v, µdyn =

µ1T 3/2

T + µ2, µ

1tot = µdyn + µtur , µ

2tot =

µdyn

Prd+µtur

Prt

Spalart–Allmaras model:8<: Rν (U, ν, dS ) = ∇ · ~T cv − T s = 0 in Ω

ν = 0 on Sν∞ = σ∞ν∞ on Γ∞

~T cv (U, ν) = −ν + ν

σ∇ν +~vν, T s (U, ν, dS ) = cb1Sν − cw1 fw

0@ ν

dS

1A2

+cb2

σ|∇ν|2.

µtur = ρνfv1, fv1 =χ3

χ3 + c3v1

, χ =ν

ν, ν =

µdyn

ρ, S = |Ω| +

ν

κ2d2S

fv2

fv2 = 1 −χ

1 + χfv1, fw = g

24 1 + c6w3

g6 + c6w3

351/6

, g = r + cw2(r6 − r), r =ν

Sκ2d2S

Eikonal equation:(

Rd (dS ) = |∇dS |2 − 1 = 0 in Ω

dS = 0 on S

Juan J. Alonso Mathematical details of adjoint solvers

Page 31: Mathematical details of adjoint-based shape optimization ... · Mathematical details of adjoint-based shape ... Transonic NACA-0012 ... “Airfoil geometry parameterization through

IntroductionDesign Using the Euler Equations

Design Using the RANS EquationsContinuous turbulent adjoint

Conclusions

Analytical formulationTransonic RAE-2822Transonic NACA-0012Optimization of a transonic airfoil

Complete system of equations and boundaryconditions

Navier–Stokes equations:

8>>><>>>:RU (U, ν) = ∇ · ~Fc −∇ ·

“µ1

tot~Fv1 + µ2

tot~Fv2

”= 0 in Ω

~v = 0 on S∂nT = 0 on S(W )+ = W∞ on Γ∞

~Fci =

0BBBB@ρvi

ρvi v1 + Pδi1ρvi v2 + Pδi2ρvi v3 + Pδi3

ρvi H

1CCCCA , ~Fv1i =

0BBBB@·τi1τi2τi3

vjτij

1CCCCA , ~Fv2i =

0BBBB@····

Cp∂i T

1CCCCA , i = 1, . . . , 3

τij = ∂j vi + ∂i vj −2

3δij∇ ·~v, µdyn =

µ1T 3/2

T + µ2, µ

1tot = µdyn + µtur , µ

2tot =

µdyn

Prd+µtur

Prt

Spalart–Allmaras model:8<: Rν (U, ν, dS ) = ∇ · ~T cv − T s = 0 in Ω

ν = 0 on Sν∞ = σ∞ν∞ on Γ∞

~T cv (U, ν) = −ν + ν

σ∇ν +~vν, T s (U, ν, dS ) = cb1Sν − cw1 fw

0@ ν

dS

1A2

+cb2

σ|∇ν|2.

µtur = ρνfv1, fv1 =χ3

χ3 + c3v1

, χ =ν

ν, ν =

µdyn

ρ, S = |Ω| +

ν

κ2d2S

fv2

fv2 = 1 −χ

1 + χfv1, fw = g

24 1 + c6w3

g6 + c6w3

351/6

, g = r + cw2(r6 − r), r =ν

Sκ2d2S

Eikonal equation:(

Rd (dS ) = |∇dS |2 − 1 = 0 in Ω

dS = 0 on S

Juan J. Alonso Mathematical details of adjoint solvers

Page 32: Mathematical details of adjoint-based shape optimization ... · Mathematical details of adjoint-based shape ... Transonic NACA-0012 ... “Airfoil geometry parameterization through

IntroductionDesign Using the Euler Equations

Design Using the RANS EquationsContinuous turbulent adjoint

Conclusions

Analytical formulationTransonic RAE-2822Transonic NACA-0012Optimization of a transonic airfoil

Complete system of equations and boundaryconditions

Navier–Stokes equations:

8>>><>>>:RU (U, ν) = ∇ · ~Fc −∇ ·

“µ1

tot~Fv1 + µ2

tot~Fv2

”= 0 in Ω

~v = 0 on S∂nT = 0 on S(W )+ = W∞ on Γ∞

~Fci =

0BBBB@ρvi

ρvi v1 + Pδi1ρvi v2 + Pδi2ρvi v3 + Pδi3

ρvi H

1CCCCA , ~Fv1i =

0BBBB@·τi1τi2τi3

vjτij

1CCCCA , ~Fv2i =

0BBBB@····

Cp∂i T

1CCCCA , i = 1, . . . , 3

τij = ∂j vi + ∂i vj −2

3δij∇ ·~v, µdyn =

µ1T 3/2

T + µ2, µ

1tot = µdyn + µtur , µ

2tot =

µdyn

Prd+µtur

Prt

Spalart–Allmaras model:8<: Rν (U, ν, dS ) = ∇ · ~T cv − T s = 0 in Ω

ν = 0 on Sν∞ = σ∞ν∞ on Γ∞

~T cv (U, ν) = −ν + ν

σ∇ν +~vν, T s (U, ν, dS ) = cb1Sν − cw1 fw

0@ ν

dS

1A2

+cb2

σ|∇ν|2.

µtur = ρνfv1, fv1 =χ3

χ3 + c3v1

, χ =ν

ν, ν =

µdyn

ρ, S = |Ω| +

ν

κ2d2S

fv2

fv2 = 1 −χ

1 + χfv1, fw = g

24 1 + c6w3

g6 + c6w3

351/6

, g = r + cw2(r6 − r), r =ν

Sκ2d2S

Eikonal equation:(

Rd (dS ) = |∇dS |2 − 1 = 0 in Ω

dS = 0 on S

Juan J. Alonso Mathematical details of adjoint solvers

Page 33: Mathematical details of adjoint-based shape optimization ... · Mathematical details of adjoint-based shape ... Transonic NACA-0012 ... “Airfoil geometry parameterization through

IntroductionDesign Using the Euler Equations

Design Using the RANS EquationsContinuous turbulent adjoint

Conclusions

Analytical formulationTransonic RAE-2822Transonic NACA-0012Optimization of a transonic airfoil

Complete system of equations and boundaryconditions

Navier–Stokes equations:

8>>><>>>:RU (U, ν) = ∇ · ~Fc −∇ ·

“µ1

tot~Fv1 + µ2

tot~Fv2

”= 0 in Ω

~v = 0 on S∂nT = 0 on S(W )+ = W∞ on Γ∞

~Fci =

0BBBB@ρvi

ρvi v1 + Pδi1ρvi v2 + Pδi2ρvi v3 + Pδi3

ρvi H

1CCCCA , ~Fv1i =

0BBBB@·τi1τi2τi3

vjτij

1CCCCA , ~Fv2i =

0BBBB@····

Cp∂i T

1CCCCA , i = 1, . . . , 3

τij = ∂j vi + ∂i vj −2

3δij∇ ·~v, µdyn =

µ1T 3/2

T + µ2, µ

1tot = µdyn + µtur , µ

2tot =

µdyn

Prd+µtur

Prt

Spalart–Allmaras model:8<: Rν (U, ν, dS ) = ∇ · ~T cv − T s = 0 in Ω

ν = 0 on Sν∞ = σ∞ν∞ on Γ∞

~T cv (U, ν) = −ν + ν

σ∇ν +~vν, T s (U, ν, dS ) = cb1Sν − cw1 fw

0@ ν

dS

1A2

+cb2

σ|∇ν|2.

µtur = ρνfv1, fv1 =χ3

χ3 + c3v1

, χ =ν

ν, ν =

µdyn

ρ, S = |Ω| +

ν

κ2d2S

fv2

fv2 = 1 −χ

1 + χfv1, fw = g

24 1 + c6w3

g6 + c6w3

351/6

, g = r + cw2(r6 − r), r =ν

Sκ2d2S

Eikonal equation:(

Rd (dS ) = |∇dS |2 − 1 = 0 in Ω

dS = 0 on S

Juan J. Alonso Mathematical details of adjoint solvers

Page 34: Mathematical details of adjoint-based shape optimization ... · Mathematical details of adjoint-based shape ... Transonic NACA-0012 ... “Airfoil geometry parameterization through

IntroductionDesign Using the Euler Equations

Design Using the RANS EquationsContinuous turbulent adjoint

Conclusions

Analytical formulationTransonic RAE-2822Transonic NACA-0012Optimization of a transonic airfoil

Objective function and surface deformation

We consider the following choice of objective function:

J(S) =

ZS

j(~f ,T , ∂nν,~n) ds, ~f = P~n − σ · ~n.

Incorporating flow equations as constraints to the cost functional by means ofLagrange multipliers, the Lagrangian reads:

J (S) =

ZS

j(~f ,T , ∂nν,~n) ds

+

“ΨT

URU (U, ν) + ψνRν(U, ν, dS) + ψd Rd (dS)”

dx .

We consider deformations of size δS along the normal direction to the surfaceS′ =

˘~x + δS ~n, ~x ∈ S

¯. So, the following holds:

δ~n = −∇S(δS)δ(ds) = −2HmδS ds

Juan J. Alonso Mathematical details of adjoint solvers

Page 35: Mathematical details of adjoint-based shape optimization ... · Mathematical details of adjoint-based shape ... Transonic NACA-0012 ... “Airfoil geometry parameterization through

IntroductionDesign Using the Euler Equations

Design Using the RANS EquationsContinuous turbulent adjoint

Conclusions

Analytical formulationTransonic RAE-2822Transonic NACA-0012Optimization of a transonic airfoil

Variation of the functional under the deformation

Total variation of the functional

δJ =

ZSδj(~f ,T , ∂nν,~n) ds +

ZδS

j(~f ,T , ∂nν,~n) ds

+

“ΨT

UδRU (U, ν) + ψνδRν(U, ν, dS) + ψdδRd (dS)”

dx

Linearization of the system of equations:

N.S.:

8>><>>:∂RU∂U δU = ∇(~AcδU)−∇ ·

„~F vk ∂µ

ktot

∂U δU + µktot~AvkδU + µk

tot Dvk∇δU

«∂RU∂ν δν = −∇ ·

„~F vk ∂µ

ktot

∂ν δν

«

S.A.:

8>><>>:∂Rν∂U δU = ∇ · (~F cvδU)− F sδU − Ms∇δU∂Rν∂ν δν = ∇ ·

“~Bcvδν + Ecv∇δν

”− Bsδν − Es∇δν

∂Rν∂dS

δdS = −K sδdS

Eikonal:n

∂Rd∂dS

δdS = ∇dS · ∇δdS = 0

Juan J. Alonso Mathematical details of adjoint solvers

Page 36: Mathematical details of adjoint-based shape optimization ... · Mathematical details of adjoint-based shape ... Transonic NACA-0012 ... “Airfoil geometry parameterization through

IntroductionDesign Using the Euler Equations

Design Using the RANS EquationsContinuous turbulent adjoint

Conclusions

Analytical formulationTransonic RAE-2822Transonic NACA-0012Optimization of a transonic airfoil

Variation of the functional under the deformation

Total variation of the functional

δJ =

ZSδj(~f ,T , ∂nν,~n) ds +

ZδS

j(~f ,T , ∂nν,~n) ds

+

“ΨT

UδRU (U, ν) + ψνδRν(U, ν, dS) + ψdδRd (dS)”

dx

Linearization of the system of equations:

N.S.:

8>><>>:∂RU∂U δU = ∇(~AcδU)−∇ ·

„~F vk ∂µ

ktot

∂U δU + µktot~AvkδU + µk

tot Dvk∇δU

«∂RU∂ν δν = −∇ ·

„~F vk ∂µ

ktot

∂ν δν

«

S.A.:

8>><>>:∂Rν∂U δU = ∇ · (~F cvδU)− F sδU − Ms∇δU∂Rν∂ν δν = ∇ ·

“~Bcvδν + Ecv∇δν

”− Bsδν − Es∇δν

∂Rν∂dS

δdS = −K sδdS

Eikonal:n

∂Rd∂dS

δdS = ∇dS · ∇δdS = 0

Juan J. Alonso Mathematical details of adjoint solvers

Page 37: Mathematical details of adjoint-based shape optimization ... · Mathematical details of adjoint-based shape ... Transonic NACA-0012 ... “Airfoil geometry parameterization through

IntroductionDesign Using the Euler Equations

Design Using the RANS EquationsContinuous turbulent adjoint

Conclusions

Analytical formulationTransonic RAE-2822Transonic NACA-0012Optimization of a transonic airfoil

Variation of the functional under the deformation

Total variation of the functional

δJ =

ZSδj(~f ,T , ∂nν,~n) ds +

ZδS

j(~f ,T , ∂nν,~n) ds

+

“ΨT

UδRU (U, ν) + ψνδRν(U, ν, dS) + ψdδRd (dS)”

dx

Linearization of the system of equations:

N.S.:

8>><>>:∂RU∂U δU = ∇(~AcδU)−∇ ·

„~F vk ∂µ

ktot

∂U δU + µktot~AvkδU + µk

tot Dvk∇δU

«∂RU∂ν δν = −∇ ·

„~F vk ∂µ

ktot

∂ν δν

«

S.A.:

8>><>>:∂Rν∂U δU = ∇ · (~F cvδU)− F sδU − Ms∇δU∂Rν∂ν δν = ∇ ·

“~Bcvδν + Ecv∇δν

”− Bsδν − Es∇δν

∂Rν∂dS

δdS = −K sδdS

Eikonal:n

∂Rd∂dS

δdS = ∇dS · ∇δdS = 0

Juan J. Alonso Mathematical details of adjoint solvers

Page 38: Mathematical details of adjoint-based shape optimization ... · Mathematical details of adjoint-based shape ... Transonic NACA-0012 ... “Airfoil geometry parameterization through

IntroductionDesign Using the Euler Equations

Design Using the RANS EquationsContinuous turbulent adjoint

Conclusions

Analytical formulationTransonic RAE-2822Transonic NACA-0012Optimization of a transonic airfoil

Complete continuous adjoint method

System of adjoint equations8<:0 = AU

U ΨU + AUνψν

0 = AνU ΨU + Aννψν0 = Ad

νψν + Addψd

BCs :

8>>>><>>>>:ϕi = − ∂j

∂fi− ψνg4ni

∂nψ5 = − 1g2

“∂j∂T − ~g1 · ~ϕ+ ψνg5

”ψν = − 1

g3

∂j∂(∂n ν)

ψd = 0

Adjoint operators:

AUU ΨU = −∇ΨT

U · ~Ac −∇ ·

“∇ΨT

U · µktot D

vk”

+∇ΨTU · µ

ktot~Avk +∇ΨT

U · ~Fvk ∂µ

ktot

∂U

AUνψν = −∇ψν · ~F cv − ψνF s +∇ · (ψνMs)

AνU ΨU = ∇ΨTU · ~F

vk ∂µktot

∂ν

Aννψν = −∇ψν · ~Bcv +∇ · (∇ψν · Ecv )− ψνBs +∇ · (ψνEs)

Adνψν = −K s

ψν

Addψd = −∇ · (ψd∇dS)

Juan J. Alonso Mathematical details of adjoint solvers

Page 39: Mathematical details of adjoint-based shape optimization ... · Mathematical details of adjoint-based shape ... Transonic NACA-0012 ... “Airfoil geometry parameterization through

IntroductionDesign Using the Euler Equations

Design Using the RANS EquationsContinuous turbulent adjoint

Conclusions

Analytical formulationTransonic RAE-2822Transonic NACA-0012Optimization of a transonic airfoil

Complete continuous adjoint method

System of adjoint equations8<:0 = AU

U ΨU + AUνψν

0 = AνU ΨU + Aννψν0 = Ad

νψν + Addψd

BCs :

8>>>><>>>>:ϕi = − ∂j

∂fi− ψνg4ni

∂nψ5 = − 1g2

“∂j∂T − ~g1 · ~ϕ+ ψνg5

”ψν = − 1

g3

∂j∂(∂n ν)

ψd = 0

Adjoint operators:

AUU ΨU = −∇ΨT

U · ~Ac −∇ ·

“∇ΨT

U · µktot D

vk”

+∇ΨTU · µ

ktot~Avk +∇ΨT

U · ~Fvk ∂µ

ktot

∂U

AUνψν = −∇ψν · ~F cv − ψνF s +∇ · (ψνMs)

AνU ΨU = ∇ΨTU · ~F

vk ∂µktot

∂ν

Aννψν = −∇ψν · ~Bcv +∇ · (∇ψν · Ecv )− ψνBs +∇ · (ψνEs)

Adνψν = −K s

ψν

Addψd = −∇ · (ψd∇dS)

Juan J. Alonso Mathematical details of adjoint solvers

Page 40: Mathematical details of adjoint-based shape optimization ... · Mathematical details of adjoint-based shape ... Transonic NACA-0012 ... “Airfoil geometry parameterization through

IntroductionDesign Using the Euler Equations

Design Using the RANS EquationsContinuous turbulent adjoint

Conclusions

Analytical formulationTransonic RAE-2822Transonic NACA-0012Optimization of a transonic airfoil

Complete continuous adjoint method

System of adjoint equations8<:0 = AU

U ΨU + AUνψν

0 = AνU ΨU + Aννψν0 = Ad

νψν + Addψd

BCs :

8>>>><>>>>:ϕi = − ∂j

∂fi− ψνg4ni

∂nψ5 = − 1g2

“∂j∂T − ~g1 · ~ϕ+ ψνg5

”ψν = − 1

g3

∂j∂(∂n ν)

ψd = 0

Adjoint operators:

AUU ΨU = −∇ΨT

U · ~Ac −∇ ·

“∇ΨT

U · µktot D

vk”

+∇ΨTU · µ

ktot~Avk +∇ΨT

U · ~Fvk ∂µ

ktot

∂U

AUνψν = −∇ψν · ~F cv − ψνF s +∇ · (ψνMs)

AνU ΨU = ∇ΨTU · ~F

vk ∂µktot

∂ν

Aννψν = −∇ψν · ~Bcv +∇ · (∇ψν · Ecv )− ψνBs +∇ · (ψνEs)

Adνψν = −K s

ψν

Addψd = −∇ · (ψd∇dS)

Juan J. Alonso Mathematical details of adjoint solvers

Page 41: Mathematical details of adjoint-based shape optimization ... · Mathematical details of adjoint-based shape ... Transonic NACA-0012 ... “Airfoil geometry parameterization through

IntroductionDesign Using the Euler Equations

Design Using the RANS EquationsContinuous turbulent adjoint

Conclusions

Analytical formulationTransonic RAE-2822Transonic NACA-0012Optimization of a transonic airfoil

Complete continuous adjoint method

System of adjoint equations8<:0 = AU

U ΨU + AUνψν

0 = AνU ΨU + Aννψν0 = Ad

νψν + Addψd

BCs :

8>>>><>>>>:ϕi = − ∂j

∂fi− ψνg4ni

∂nψ5 = − 1g2

“∂j∂T − ~g1 · ~ϕ+ ψνg5

”ψν = − 1

g3

∂j∂(∂n ν)

ψd = 0

Adjoint operators:

AUU ΨU = −∇ΨT

U · ~Ac −∇ ·

“∇ΨT

U · µktot D

vk”

+∇ΨTU · µ

ktot~Avk +∇ΨT

U · ~Fvk ∂µ

ktot

∂U

AUνψν = −∇ψν · ~F cv − ψνF s +∇ · (ψνMs)

AνU ΨU = ∇ΨTU · ~F

vk ∂µktot

∂ν

Aννψν = −∇ψν · ~Bcv +∇ · (∇ψν · Ecv )− ψνBs +∇ · (ψνEs)

Adνψν = −K s

ψν

Addψd = −∇ · (ψd∇dS)

Juan J. Alonso Mathematical details of adjoint solvers

Page 42: Mathematical details of adjoint-based shape optimization ... · Mathematical details of adjoint-based shape ... Transonic NACA-0012 ... “Airfoil geometry parameterization through

IntroductionDesign Using the Euler Equations

Design Using the RANS EquationsContinuous turbulent adjoint

Conclusions

Analytical formulationTransonic RAE-2822Transonic NACA-0012Optimization of a transonic airfoil

Complete continuous adjoint method

System of adjoint equations8<:0 = AU

U ΨU + AUνψν

0 = AνU ΨU + Aννψν0 = Ad

νψν + Addψd

BCs :

8>>>><>>>>:ϕi = − ∂j

∂fi− ψνg4ni

∂nψ5 = − 1g2

“∂j∂T − ~g1 · ~ϕ+ ψνg5

”ψν = − 1

g3

∂j∂(∂n ν)

ψd = 0

Adjoint operators:

AUU ΨU = −∇ΨT

U · ~Ac −∇ ·

“∇ΨT

U · µktot D

vk”

+∇ΨTU · µ

ktot~Avk +∇ΨT

U · ~Fvk ∂µ

ktot

∂U

AUνψν = −∇ψν · ~F cv − ψνF s +∇ · (ψνMs)

AνU ΨU = ∇ΨTU · ~F

vk ∂µktot

∂ν

Aννψν = −∇ψν · ~Bcv +∇ · (∇ψν · Ecv )− ψνBs +∇ · (ψνEs)

Adνψν = −K s

ψν

Addψd = −∇ · (ψd∇dS)

Juan J. Alonso Mathematical details of adjoint solvers

Page 43: Mathematical details of adjoint-based shape optimization ... · Mathematical details of adjoint-based shape ... Transonic NACA-0012 ... “Airfoil geometry parameterization through

IntroductionDesign Using the Euler Equations

Design Using the RANS EquationsContinuous turbulent adjoint

Conclusions

Analytical formulationTransonic RAE-2822Transonic NACA-0012Optimization of a transonic airfoil

Complete adjoint vs. Frozen viscosity

System of adjoint equations0 = AU

U ΨU + AUνψν

0 = AνU ΨU + AννψνBCs :

8>><>>:ϕi = − ∂j

∂fi− ψνg4ni

∂nψ5 = − 1g2

“∂j∂T − ~g1 · ~ϕ

”− g5

g2ψν

ψν = − 1g3

∂j∂(∂n ν)

Adjoint operators:

AUU ΨU = −∇ΨT

U · ~Ac −∇ ·

“∇ΨT

U · µktot D

vk”

+∇ΨTU · µ

ktot~Avk +∇ΨT

U · ~Fvk ∂µ

ktot

∂U

AUνψν = −∇ψν · ~F cv − ψνF s +∇ · (ψνMs)

AνU ΨU = ∇ΨTU · ~F

vk ∂µktot

∂ν

Aννψν = −∇ψν · ~Bcv +∇ · (∇ψν · Ecv )− ψνBs +∇ · (ψνEs)

Juan J. Alonso Mathematical details of adjoint solvers

Page 44: Mathematical details of adjoint-based shape optimization ... · Mathematical details of adjoint-based shape ... Transonic NACA-0012 ... “Airfoil geometry parameterization through

IntroductionDesign Using the Euler Equations

Design Using the RANS EquationsContinuous turbulent adjoint

Conclusions

Analytical formulationTransonic RAE-2822Transonic NACA-0012Optimization of a transonic airfoil

Complete adjoint vs. Frozen viscosity

System of adjoint equations0 = AU

U ΨU + AUνψν

0 = AνU ΨU + AννψνBCs :

8>><>>:ϕi = − ∂j

∂fi− ψνg4ni

∂nψ5 = − 1g2

“∂j∂T − ~g1 · ~ϕ

”− g5

g2ψν

ψν = − 1g3

∂j∂(∂n ν)

Adjoint operators:

AUU ΨU = −∇ΨT

U · ~Ac −∇ ·

“∇ΨT

U · µktot D

vk”

+∇ΨTU · µ

ktot~Avk +∇ΨT

U · ~Fvk ∂µ

ktot

∂U

AUνψν = −∇ψν · ~F cv − ψνF s +∇ · (ψνMs)

AνU ΨU = ∇ΨTU · ~F

vk ∂µktot

∂ν

Aννψν = −∇ψν · ~Bcv +∇ · (∇ψν · Ecv )− ψνBs +∇ · (ψνEs)

Juan J. Alonso Mathematical details of adjoint solvers

Page 45: Mathematical details of adjoint-based shape optimization ... · Mathematical details of adjoint-based shape ... Transonic NACA-0012 ... “Airfoil geometry parameterization through

IntroductionDesign Using the Euler Equations

Design Using the RANS EquationsContinuous turbulent adjoint

Conclusions

Analytical formulationTransonic RAE-2822Transonic NACA-0012Optimization of a transonic airfoil

Evaluation of surface sensitivities

Solving the adjoint system and introducing in the variation of the functional:

δJ =

ZS

„∂j∂fi∂nfi +

∂j∂T

∂nT +∂j

∂ (∂nν)∂2

n ν

«δS ds

−Z

S

„∂j∂~n

+∂j

∂~fP −

∂j

∂~f· σ«· ∇S(δS) ds −

ZS

(g + 2Hm j)δS ds

−2Z

Sψνg4(P~n − ~n · σ) · ∇S(δS) ds.

Usual objective functions are of the form j(~f ) = ~f · ~d . Then:

Sensitivity computation

δJ = −Z

Sh3δS ds

whereh3 = −~n · Σϕ · ∂n~v + µ2

tot Cp∇Sψ5 · ∇ST

Σϕ = µ1tot

„∇~ϕ+∇~ϕT − Id

23∇ · ~ϕ

«

Juan J. Alonso Mathematical details of adjoint solvers

Page 46: Mathematical details of adjoint-based shape optimization ... · Mathematical details of adjoint-based shape ... Transonic NACA-0012 ... “Airfoil geometry parameterization through

IntroductionDesign Using the Euler Equations

Design Using the RANS EquationsContinuous turbulent adjoint

Conclusions

Analytical formulationTransonic RAE-2822Transonic NACA-0012Optimization of a transonic airfoil

Evaluation of surface sensitivities

Solving the adjoint system and introducing in the variation of the functional:

δJ =

ZS

„∂j∂fi∂nfi +

∂j∂T

∂nT +∂j

∂ (∂nν)∂2

n ν

«δS ds

−Z

S

„∂j∂~n

+∂j

∂~fP −

∂j

∂~f· σ«· ∇S(δS) ds −

ZS

(g + 2Hm j)δS ds

−2Z

Sψνg4(P~n − ~n · σ) · ∇S(δS) ds.

Usual objective functions are of the form j(~f ) = ~f · ~d . Then:

Sensitivity computation

δJ = −Z

Sh3δS ds

whereh3 = −~n · Σϕ · ∂n~v + µ2

tot Cp∇Sψ5 · ∇ST

Σϕ = µ1tot

„∇~ϕ+∇~ϕT − Id

23∇ · ~ϕ

«

Juan J. Alonso Mathematical details of adjoint solvers

Page 47: Mathematical details of adjoint-based shape optimization ... · Mathematical details of adjoint-based shape ... Transonic NACA-0012 ... “Airfoil geometry parameterization through

IntroductionDesign Using the Euler Equations

Design Using the RANS EquationsContinuous turbulent adjoint

Conclusions

Analytical formulationTransonic RAE-2822Transonic NACA-0012Optimization of a transonic airfoil

Evaluation of surface sensitivities

Solving the adjoint system and introducing in the variation of the functional:

δJ =

ZS

„∂j∂fi∂nfi +

∂j∂T

∂nT +∂j

∂ (∂nν)∂2

n ν

«δS ds

−Z

S

„∂j∂~n

+∂j

∂~fP −

∂j

∂~f· σ«· ∇S(δS) ds −

ZS

(g + 2Hm j)δS ds

−2Z

Sψνg4(P~n − ~n · σ) · ∇S(δS) ds.

Usual objective functions are of the form j(~f ) = ~f · ~d . Then:

Sensitivity computation

δJ = −Z

Sh3δS ds

whereh3 = −~n · Σϕ · ∂n~v + µ2

tot Cp∇Sψ5 · ∇ST

Σϕ = µ1tot

„∇~ϕ+∇~ϕT − Id

23∇ · ~ϕ

«

Juan J. Alonso Mathematical details of adjoint solvers

Page 48: Mathematical details of adjoint-based shape optimization ... · Mathematical details of adjoint-based shape ... Transonic NACA-0012 ... “Airfoil geometry parameterization through

IntroductionDesign Using the Euler Equations

Design Using the RANS EquationsContinuous turbulent adjoint

Conclusions

Analytical formulationTransonic RAE-2822Transonic NACA-0012Optimization of a transonic airfoil

Numerical experimentsTransonic RAE-2822

(M∞ = 0,734; Re = 6,5× 106; α = 2,54o)

Figure 9: RAE-2822: Density profile and mesh.

Transonic NACA-0012(M∞ = 0,8; Re = 6,5× 106; α = 1,25o)

Figure 10: NACA-0012: Density profile and mesh.

Juan J. Alonso Mathematical details of adjoint solvers

Page 49: Mathematical details of adjoint-based shape optimization ... · Mathematical details of adjoint-based shape ... Transonic NACA-0012 ... “Airfoil geometry parameterization through

IntroductionDesign Using the Euler Equations

Design Using the RANS EquationsContinuous turbulent adjoint

Conclusions

Analytical formulationTransonic RAE-2822Transonic NACA-0012Optimization of a transonic airfoil

Numerical test 1: Transonic RAE-2822

Juan J. Alonso Mathematical details of adjoint solvers

Page 50: Mathematical details of adjoint-based shape optimization ... · Mathematical details of adjoint-based shape ... Transonic NACA-0012 ... “Airfoil geometry parameterization through

IntroductionDesign Using the Euler Equations

Design Using the RANS EquationsContinuous turbulent adjoint

Conclusions

Analytical formulationTransonic RAE-2822Transonic NACA-0012Optimization of a transonic airfoil

Numerical test 1: Transonic RAE-2822

Juan J. Alonso Mathematical details of adjoint solvers

Page 51: Mathematical details of adjoint-based shape optimization ... · Mathematical details of adjoint-based shape ... Transonic NACA-0012 ... “Airfoil geometry parameterization through

IntroductionDesign Using the Euler Equations

Design Using the RANS EquationsContinuous turbulent adjoint

Conclusions

Analytical formulationTransonic RAE-2822Transonic NACA-0012Optimization of a transonic airfoil

Numerical test 1: Transonic RAE-2822

Juan J. Alonso Mathematical details of adjoint solvers

Page 52: Mathematical details of adjoint-based shape optimization ... · Mathematical details of adjoint-based shape ... Transonic NACA-0012 ... “Airfoil geometry parameterization through

IntroductionDesign Using the Euler Equations

Design Using the RANS EquationsContinuous turbulent adjoint

Conclusions

Analytical formulationTransonic RAE-2822Transonic NACA-0012Optimization of a transonic airfoil

Numerical test 2: Transonic NACA-0012

Juan J. Alonso Mathematical details of adjoint solvers

Page 53: Mathematical details of adjoint-based shape optimization ... · Mathematical details of adjoint-based shape ... Transonic NACA-0012 ... “Airfoil geometry parameterization through

IntroductionDesign Using the Euler Equations

Design Using the RANS EquationsContinuous turbulent adjoint

Conclusions

Analytical formulationTransonic RAE-2822Transonic NACA-0012Optimization of a transonic airfoil

Numerical test 2: Transonic NACA-0012

Juan J. Alonso Mathematical details of adjoint solvers

Page 54: Mathematical details of adjoint-based shape optimization ... · Mathematical details of adjoint-based shape ... Transonic NACA-0012 ... “Airfoil geometry parameterization through

IntroductionDesign Using the Euler Equations

Design Using the RANS EquationsContinuous turbulent adjoint

Conclusions

Analytical formulationTransonic RAE-2822Transonic NACA-0012Optimization of a transonic airfoil

Numerical test 2: Transonic NACA-0012

Juan J. Alonso Mathematical details of adjoint solvers

Page 55: Mathematical details of adjoint-based shape optimization ... · Mathematical details of adjoint-based shape ... Transonic NACA-0012 ... “Airfoil geometry parameterization through

IntroductionDesign Using the Euler Equations

Design Using the RANS EquationsContinuous turbulent adjoint

Conclusions

Analytical formulationTransonic RAE-2822Transonic NACA-0012Optimization of a transonic airfoil

Numerical test 3: 2D unconstrained drag minimizationusing adjoint RANS

The goal of this academic problem is to reduce the drag of aRAE-2822 profile, by means of modifications of its surface.A total of 38 Hicks–Henne bump functions have been used as designvariables.

Figure 11: Optimization convergence history, adjoint method vs. frozen viscosity (left). Pressure coefficient distribution, original configurationand final design (right).

Juan J. Alonso Mathematical details of adjoint solvers

Page 56: Mathematical details of adjoint-based shape optimization ... · Mathematical details of adjoint-based shape ... Transonic NACA-0012 ... “Airfoil geometry parameterization through

IntroductionDesign Using the Euler Equations

Design Using the RANS EquationsContinuous turbulent adjoint

Conclusions

Outline

1 IntroductionOptimal design in aerodynamicsAlternatives for sensitivity calculations

2 Design Using the Euler Equations

3 Design Using the RANS EquationsSpalart-Allmaras Turbulence Model

4 Continuous adjoint for the Spalart–Allmaras modelAnalytical formulationTransonic RAE-2822Transonic NACA-0012Optimization of a transonic airfoil

5 Conclusions

Juan J. Alonso Mathematical details of adjoint solvers

Page 57: Mathematical details of adjoint-based shape optimization ... · Mathematical details of adjoint-based shape ... Transonic NACA-0012 ... “Airfoil geometry parameterization through

IntroductionDesign Using the Euler Equations

Design Using the RANS EquationsContinuous turbulent adjoint

Conclusions

Conclusions

Continuous adjoint formulations for both the Euler and Reynolds-AveragedNavier-Stokes equations can be derived.

Significant care required to obtain highly-accurate gradients (cannot freeze theeddy viscosity in RANS models).

Automating the derivation and enabling the use of arbitrary cost functions isdesirable (see next lecture).

Powerful tool for shape optimization.

Juan J. Alonso Mathematical details of adjoint solvers