26
(c)2001 American Institute of Aeronautics & Astronautics or Published with Permission of Author(s) and/or Author(s)' Sponsoring Organization. XM f VBL _ .... -.,,-- —— ———— =.__ _______ A01-31133 Al A A-2001-2530 Studies of the Continuous and Discrete Adjoint Approaches to Viscous Automatic Aerodynamic Shape Optimization S. Nadarajah and A. Jameson Stanford University Stanford, CA 94305 15th AIAA Computational Fluid Dynamics Conference June 11-14,2001/Anaheim, CA For permission to copy or republish, contact the American Institute of Aeronautics and Astronautics 1801 Alexander Bell Drive, Suite 500, Reston, Va. 22091

(c)2001 American Institute of Aeronautics & Astronautics ...aero-comlab.stanford.edu/Papers/aiaa-01-2530-326.pdf(c)2001 American Institute of Aeronautics & Astronautics or Published

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Page 1: (c)2001 American Institute of Aeronautics & Astronautics ...aero-comlab.stanford.edu/Papers/aiaa-01-2530-326.pdf(c)2001 American Institute of Aeronautics & Astronautics or Published

(c)2001 American Institute of Aeronautics & Astronautics or Published with Permission of Author(s) and/or Author(s)' Sponsoring Organization.

XM f VBL _ .... -.,,--—— — — — — — =.__ _______ A01-31133

Al A A-2001-2530Studies of the Continuous and Discrete AdjointApproaches to Viscous AutomaticAerodynamic Shape Optimization

S. Nadarajah and A. JamesonStanford UniversityStanford, CA 94305

15th AIAA Computational Fluid Dynamics ConferenceJune 11-14,2001/Anaheim, CA

For permission to copy or republish, contact the American Institute of Aeronautics and Astronautics1801 Alexander Bell Drive, Suite 500, Reston, Va. 22091

Page 2: (c)2001 American Institute of Aeronautics & Astronautics ...aero-comlab.stanford.edu/Papers/aiaa-01-2530-326.pdf(c)2001 American Institute of Aeronautics & Astronautics or Published

(c)2001 American Institute of Aeronautics & Astronautics or Published with Permission of Author(s) and/or Author(s)' Sponsoring Organization.

AIAA-2001-2530

STUDIES OF THE CONTINUOUS AND DISCRETE ADJOINTAPPROACHES TO VISCOUS AUTOMATICAERODYNAMIC SHAPE OPTIMIZATION

Siva K. Nadarajah* and Antony Jameson tDepartment of Aeronautics and Astronautics

Stanford UniversityStanford, California 94305 U.S.A.

Abstract

This paper compares the continuous and discreteviscous adjoint-based automatic aerodynamic opti-mization. The objective is to study the complex-ity of the discretization of the adjoint equation forboth the continuous and discrete approach, the ac-curacy of the resulting estimate of the gradient, andits impact on the computational cost to approach anoptimum solution. First, this paper presents com-plete formulations and discretizations of the Navier-Stokes equations, the continuous viscous adjointequation and its counterpart the discrete viscousadjoint equation. The differences between the con-tinuous and discrete boundary conditions are alsoexplored. Second, the accuracy of the sensitivityderivatives obtained from continuous and discreteadjoint-based equations are compared to complex-step gradients. Third, the adjoint equations andits corresponding boundary conditions are formu-lated to quantify the influence of geometry modi-fications on the pressure distribution at an arbitraryremote location within the domain of interest. Fi-nally, applications are presented for inverse, pressureand skin friction drag minimization, and sonic boomminimization problems.

Introduction

Computational methods have dramatically alteredthe design of aerospace vehicles in the last sixtyyears. In 1945 Lighthill1 first proposed employingthe method of conformal mapping to design two di-mensional airfoils to achieve a desired target pres-sure distribution. These methods were restricted to

* Graduate Student, Student Member AIAAt Thomas V. Jones Professor of Engineering, Stanford Uni-

versity, AIAA FellowCopyright ©2001 by Siva Nadarajah and Antony Jameson

incompressible flow, but later McFadden2 extendedthe method to compressible flow.

Bauer et al.3 and Garabedian et al.4 establishedan alternate method by way of complex characteris-tics to solve the potential equations in the hodographplane. This method successfully produced shock-free transonic flows. Constrained optimization wasfirst attempted by Hicks et al.,5 where they intro-duced the finite-difference method to evaluate thesensitivity derivatives. Since then optimization tech-niques for the design of aerospace vehicles have gen-erally used gradient-based methods. Through themathematical theory for control systems governedby partial differential equations established by Li-ons et al.,6 Pironneau et al.7 created a frameworkfor the formulation of elliptic design problems. Inthe last decade, Jameson et al.8"12 pioneered theshape optimization method for Euler and Navier-Stokes problems.

The mathematical theory for the control of sys-tems governed by partial differential equations, asdeveloped by Lions et al.,6 significantly lowers thecomputational cost and is clearly an improvementover classical finite-difference methods. Using con-trol theory the gradient is calculated indirectly bysolving an adjoint equation. Although there is theadditional overhead of solving the adjoint equation,once it has been solved the cost of obtaining thesensitivity derivatives of the cost function with re-spect to each design variable is negligible. Conse-quently, the total cost to obtain these gradients isindependent of the number of design variables andamounts to the cost of one flow solution and one ad-joint solution. The adjoint problem is a linear PDEof lower complexity than the flow solver. Jamesonet al.8 first applied this method to transonic flow.In the last seven years, automatic aerodynamic de-sign of complete aircraft configurations has yieldedoptimized solutions of wing and wing-body configu-

American Institute of Aeronautics and Astronautics

Page 3: (c)2001 American Institute of Aeronautics & Astronautics ...aero-comlab.stanford.edu/Papers/aiaa-01-2530-326.pdf(c)2001 American Institute of Aeronautics & Astronautics or Published

(c)2001 American Institute of Aeronautics & Astronautics or Published with Permission of Author(s) and/or Author(s)' Sponsoring Organization.

rations by Reuther et al.13>14 and Burgreen et al.15

The continuous adjoint approach theory was de-veloped by combining the variation of the cost func-tion and field equations with respect to the flow-field variables and design variables through the useof Lagrange multipliers, also called costate or ad-joint variables. Collecting the terms associated withthe variation of the flow-field variables produces theadjoint equation and its boundary condition. Theterms associated with the variation of the designvariable produce the gradient. The field equationsand the adjoint equation with its boundary condi-tion must be discretized to obtain numerical solu-tions. As the mesh is refined, the continuous adjointyields the exact gradient.

In the discrete adjoint approach, the control the-ory is applied directly to the set of discrete fieldequations. The discrete adjoint equation is derivedby collecting together all the terms multiplied by thevariation Sw.ij of the discrete flow variable. If thediscrete adjoint equation is solved exactly, then theresulting solution for the Lagrange multiplier pro-duces an exact gradient of the inexact cost functionand the derivatives are consistent with complex-stepgradients independent of the mesh size.

A subject of on-going research is the trade-off be-tween the complexity of the adjoint discretization,the accuracy of the resulting estimate of the gra-dient, and its impact on the computational cost toapproach an optimum solution. Shubin and Prank16

presented a comparison between the continuous anddiscrete adjoint for quasi-one-dimensional flow. Avariation of the discrete field equations proved to becomplex for higher order schemes. Due to this limi-tation of the discrete adjoint approach, early imple-mentation of the discretization of the adjoint equa-tion was only consistent with a first order accurateflow equation.

Burgreen et al.15 carried a second order im-plementation of the discrete adjoint on three-dimensional shape optimization of wings for struc-tured grids. For second order accuracy on unstruc-tured grids, Elliot and Peraire17 performed opti-mization on inverse pressure designs of multiele-ment airfoils and wing-body configurations in tran-sonic flow using a multistage Runge-Kutta schemewith Roe decomposition for the dissipative fluxeson two and three-dimensional problems. Andersonand Venkatakrishnan18 computed inviscid and vis-cous optimization on unstructured grids using boththe continuous and discrete adjoint. lollo et al.19

used the continuous adjoint approach to investi-gate shape optimization on one and two-dimensional

flows. Ta'saan et al.20 used a one-shot approachwith the continuous adjoint formulations. Kim,Alonso, and Jameson21 conducted an extensive gra-dient accuracy study of the Euler and Navier-Stokesequations which concluded that gradients from thecontinuous adjoint method were in close agreementwith those computed by finite difference methods.A detailed comparison of the inviscid continuousand discrete adjoint approaches was conducted byNadarajah et al.22

Another objective of this work is to develop thenecessary methods and tools to facilitate the de-sign of low sonic boom aircraft that can fly su-personically over land with negligible environmen-tal impact. Traditional methods to reduce the sonicboom signature were targeted towards reducing air-craft weight, increasing lift-to-drag ratio, improvingthe specific fuel consumption, etc. Seebass and Ar-grow23 revisited sonic boom minimization and pro-vided a detailed study of sonic boom theory and fig-ure of merits for the level of sonic booms. In thispaper, a proof of concept of a new adjoint approachof the above problem will be demonstrated in twodimensional flow.

Objectives

1. Review the formulation and development of theviscous adjoint equations for both the continu-ous and discrete approach.

2. Investigate the differences in the implementa-tion of boundary conditions for each method forvarious cost functions.

3. Compare the gradients of the two methods tocomplex step gradients for inverse pressure de-sign and drag minimization.

4. Study the differences in calculating the exactgradient of the inexact cost function (discreteadjoint) or the inexact gradient of the exact costfunction (continuous).

The Navier-Stokes Equations

In order to allow for geometric shape changes itis convenient to use a body fitted coordinate sys-tem, so that the computational domain is fixed.This requires the formulation of the Navier-Stokesequations in a transformed coordinate system. TheCartesian coordinates and velocity components aredenoted by #1, X2, and wi, u^. Einstein notationsimplifies the presentation of the equations, where

American Institute of Aeronautics and Astronautics

Page 4: (c)2001 American Institute of Aeronautics & Astronautics ...aero-comlab.stanford.edu/Papers/aiaa-01-2530-326.pdf(c)2001 American Institute of Aeronautics & Astronautics or Published

(c)2001 American Institute of Aeronautics & Astronautics or Published with Permission of Author(s) and/or Author(s)' Sponsoring Organization.

summation over k = 1 to 2 is implied by a repeatedindex k. The two-dimensional Navier-Stokes equa-tions then take the form,

_dt m (1)

where the state vector iy, inviscid flux vector / andviscous flux vector fv are described respectively by

w = (2)

The Navier-Stokes equations can then be written incomputational space as

dtwhere the inviscid and viscous flux contributions arenow denned with respect to the computational cellfaces by Fi = S^fj and Fvi = S i j f v j , and the quan-tity Sij — JK~j represents the projection of the &cell face along the Xj axis. In obtaining equation (6)we have made use of the property that

dSi.= 0 (7)

/„« = (3)

In these definitions, p is the density, u\ , u^ are theCartesian velocity components, E is the total energyand 6^ is the Kronecker delta function. The pressureis determined by the equation of state

and the stagnation enthalpy is given by

H = E+-,P

where 7 is the ratio of the specific heats. The viscousstresses may be written as

/ dui duj\ duk

• = + + i j ' ( )

where n and A are the first and second coefficientsof viscosity. The coefficient of thermal conductivityand the temperature are computed as

CpfJ,(5)

where Pr is the Prandtl number, cp is the specificheat at constant pressure, and R is the gas constant.

For discussion of real applications using a dis-cretization on a body conforming structured mesh,it is also useful to consider a transformation to thecomputational coordinates (£1,^2) defined by themetrics

which represents the fact that the sum of the faceareas over a closed volume is zero, as can be readilyverified by a direct examination of the metric terms.

When equation (6) is formulated for each com-putational cell, a system of first-order ordinary dif-ferential equations is obtained. To eliminate odd-even decoupling of the solution and overshoots be-fore and after shock waves, the conservative and vis-cous fluxes are added to a diffusion flux. The ar-tificial dissipation scheme used in this research is ablended first and third order flux, first introducedby Jameson, Schmidt, and Turkel.24 The artificialdissipation scheme is defined as,

+ (8)

The first term in equation (8) is a first order scalardiffusion term, where e?+ 1 . is scaled by the nor-malized second difference of the pressure and servesto damp oscillations around shock waves, e4, 2 . isv *-f-J,jthe coefficient for the third derivative of the arti-ficial dissipation flux. The coefficient is scaled sothat it is zero at regions of large gradients, suchas shock waves and eliminates odd-even decouplingelsewhere.

Formulation of the Optimal DesignProblem for the Navier-Stokes

Equations

It is the intent of this paper to fully investigate thederivation of both the continuous and discrete vis-cous adjoint method. The following information isdrawn from a paper presented at the 29th AIAAFluid Dynamics Conference, Albuquerque,25 and re-peated here to offer a comprehensive paper.

American Institute of Aeronautics and Astronautics

Page 5: (c)2001 American Institute of Aeronautics & Astronautics ...aero-comlab.stanford.edu/Papers/aiaa-01-2530-326.pdf(c)2001 American Institute of Aeronautics & Astronautics or Published

(c)2001 American Institute of Aeronautics & Astronautics or Published with Permission of Author(s) and/or Author(s)' Sponsoring Organization.

Aerodynamic optimization is based on the de-termination of the effect of shape modifications onsome performance measure which depends on theflow. For convenience, the coordinates & describingthe fixed computational domain are chosen so thateach boundary conforms to a constant value of oneof these coordinates. Variations in the shape thenresult in corresponding variations in the mappingderivatives defined by Kij.

Suppose that the performance is measured by acost function

/ = M (w,JB

+ JP (w,JT>

containing both boundary and field contributionswhere dB% and dX>% are the surface and volume el-ements in the computational domain. In general,M. and P will depend on both the flow variables wand the metrics S defining the computational space.In the case of a multi-point design the flow vari-ables may be separately calculated for several differ-ent conditions of interest.

The design problem is now treated as a controlproblem where the boundary shape represents thecontrol function, which is chosen to minimize / sub-ject to the constraints defined by the flow equations(6). A shape change produces a variation in the flowsolution Sw and the metrics SS which in turn pro-duce a variation in the cost function

51

with

= [ SM(w, S) dBs + f 5P(w,JB JT>

SM =

(9)

(10)where we continue to use the subscripts / and 77to distinguish between the contributions associatedwith the variation of the flow solution Sw and thoseassociated with the metric variations SS. Thus[Mwlj and [Pw]j represent and f£ with themetrics fixed, while SMn and SPu represent thecontribution of the metric variations SS to SM. and8P.

In the steady state, the constraint equation (6)specifies the variation of the state vector Sw by

Here SFi and SFVi can also be split into contributionsassociated with Sw and SS using the notation

The inviscid contributions are easily evaluated as

[Fiw]j = Sii~Qw'i SFiH = SSijfj'

The details of the viscous contributions are compli-cated by the additional level of derivatives in thestress and heat flux terms and will be derived in thefollowing section. Multiplying by a co-state vectorif?, also known as Lagrange Multiplier, and integrat-ing over the domain produces

= 0. (13)

If V> is differentiate this may be integrated by partsto give

/„.,JBf 8y

J<D d<(14)

Since the left hand expression equals zero, it may besubtracted from the variation in the cost function(9) to give

SI = f [5M - n^TS (Fi - Fvi)}JBSP

T>

Now, since i/> is an arbitrary differentiate function,it may be chosen in such a way that SI no longer de-pends explicitly on the variation of the state vectorSw. The gradient of the cost function can then beevaluated directly from the metric variations with-out having to re-compute the variation Sw resultingfrom the perturbation of each design variable.

Comparing equations (10) and (12), the variationSw may be eliminated from (15) by equating all fieldterms with subscript "J" to produce a differentialadjoint system governing ifr

[Fiw - Fviw]j + Pw = 0 in T>. (16)

The corresponding adjoint boundary condition isproduced by equating the subscript "I" boundaryterms in equation (15) to produce

onB. (17)

SFvi = (12)The remaining terms from equation (15) then yielda simplified expression for the variation of the cost

American Institute of Aeronautics and Astronautics

Page 6: (c)2001 American Institute of Aeronautics & Astronautics ...aero-comlab.stanford.edu/Papers/aiaa-01-2530-326.pdf(c)2001 American Institute of Aeronautics & Astronautics or Published

(c)2001 American Institute of Aeronautics & Astronautics or Published with Permission of Author(s) and/or Author(s)' Sponsoring Organization.

function which defines the gradient

51 = I {8MH - n^T [SFi - 6Fvi] nJB

i - SFvi] n } dV^. (18)

In computational coordinates, the viscous termsin the Navier-Stokes equations have the form

-D

The details of the formula for the gradient dependon the way in which the boundary shape is parame-terized as a function of the design variables, and theway in which the mesh is deformed as the bound-ary is modified. Using the relationship between themesh deformation and the surface modification, thefield integral is reduced to a surface integral by in-tegrating along the coordinate lines emanating fromthe surface. Thus the expression for 61 is finallyreduced to

61 = IJB

where T represents the design variables and Q isthe gradient, which is a function defined over theboundary surface.

The boundary conditions satisfied by the flowequations restrict the form of the left hand side ofthe adjoint boundary condition (17). Consequently,the boundary contribution to the cost function M.cannot be specified arbitrarily. Instead, it must bechosen from the class of functions which allow can-cellation of all terms containing 5w in the bound-ary integral of equation (15). On the other hand,there is no such restriction on the specification ofthe field contribution to the cost function P, sincethese terms may always be absorbed into the adjointfield equation (16) as source terms.

For simplicity, it will be assumed that the portionof the boundary that undergoes shape modificationsis restricted to the coordinate surface £2 = 0. Thenequations (15) and (17) may be simplified by incor-porating the conditions

so that only the variations 6Fz and 6FV<2 need to beconsidered at the wall boundary.

Derivation of the ViscousContinuous Adjoint Terms

This section illustrates application of control theoryto aerodynamic design problems for the case of two-dimensional airfoil design using the Navier-Stokesequations as the mathematical model.

Computing the variation 6w resulting from a shapemodification of the boundary, introducing a La-grange vector i/} and integrating by parts followingthe steps outlined by equations (11) to (14) produces

- [ JT> asi

where the shape modification is restricted to the co-ordinate surface £2 = 0 so that n\ — 0, and n<2 = 1.Furthermore, it is assumed that the boundary con-tributions at the far field may either be neglected orelse eliminated by a proper choice of boundary con-ditions as previously shown for the inviscid case.9

The viscous terms will be derived under the as-sumption that the viscosity and heat conduction co-efficients IJL and k are essentially independent of theflow, and that their variations may be neglected.This simplification has been successfully used formany aerodynamic problems of interest. In the caseof some turbulent flows, the possibility exists thatthe flow variations could result in significant changesin the turbulent viscosity, and it may then be neces-sary to account for its variation in the calculation.

Transformation to Primitive Variables

The derivation of the viscous adjoint terms is sim-plified by transforming to the primitive variables

WT =

because the viscous stresses depend on the velocityderivatives | -, while the heat flux can be expressedas

4- (£)OXi \pj

The relationship betweenthe conservative and primitive variations is definedby the expressions

6w = M5w, 6w — M~l5w

which make use of the transformation matricesM = |f and M'1 = ff. These matrices are pro-

American Institute of Aeronautics and Astronautics

Page 7: (c)2001 American Institute of Aeronautics & Astronautics ...aero-comlab.stanford.edu/Papers/aiaa-01-2530-326.pdf(c)2001 American Institute of Aeronautics & Astronautics or Published

(c)2001 American Institute of Aeronautics & Astronautics or Published with Permission of Author(s) and/or Author(s)' Sponsoring Organization.

vided in transposed form for future convenience The variations in the stresses are then

MT =

~ 1

" 1000

Hi0 p0 00 0

Ui

P00

U20P0

P0i/!>

0

2 *

PU21

7-1 J

(7-l)uiUi 12

-(7 - l)«i-(7 - I)u2

7-1

The conservative and primitive adjoint operators Land L corresponding to the variations Sw and Sware then related by

6wTLil>T>

= [ 5wTLi/jJT>

withL = MTL,

so that after determining the primitive adjoint op-erator by direct evaluation of the viscous portion of(16), the conservative operator may be obtained bythe transformation L = M~l L. Since the continu-ity equation contains no viscous terms, it makes nocontribution to the viscous adjoint system. There-fore, the derivation proceeds by first examining theadjoint operators arising from the momentum equa-tions.

Contributions from the Momentum Equa-tions

In order to make use of the summation convention,it is convenient to set V^+i — </>j f°r J — 1>2. Thenthe contribution from the momentum equations is

/'75

-fiirV8*J-D d&+ (19)

The velocity derivatives in the viscous stresses canbe expressed as

with corresponding variations

As before, only those terms with subscript J, whichcontain variations of the flow variables, need be con-sidered further in deriving the adjoint operator. Thefield contributions that contain Sui in equation (19)appear as

d Sik d

This may be integrated by parts to yield

f x d ( Q Q ^d^kI ouk^— I SijSij-j-zr

JT> d& \ J d&

where the boundary integral has been eliminated bynoting that <5u, = 0 on the solid boundary. Byexchanging indices, the field integrals may be com-bined to produce

d

which is further simplified by transforming the innerderivatives back to Cartesian coordinates

rI °u*J-D

,+ "3 — I +dxkj adx

(20)The boundary contributions that contain Sui in

equation (19) may be simplified using the fact that

—Sm = 0 if / = 1

on the boundary B so that they become

+8 (21)

American Institute of Aeronautics and Astronautics

Page 8: (c)2001 American Institute of Aeronautics & Astronautics ...aero-comlab.stanford.edu/Papers/aiaa-01-2530-326.pdf(c)2001 American Institute of Aeronautics & Astronautics or Published

(c)2001 American Institute of Aeronautics & Astronautics or Published with Permission of Author(s) and/or Author(s)' Sponsoring Organization.

Together (20) and (21) comprise the field and bound-ary contributions of the momentum equations to theviscous adjoint operator in primitive variables.

Contributions from the Energy Equation

In order to derive the contribution of the energyequation to the viscous adjoint terms it is convenientto set

4 = 0, Qj = UiCTij + K-—— ( - ) ,dxj \pj

where the temperature has been written in termsof pressure and density using (5). The contributionfrom the energy equation can then be written as

/.L dO

+ (22)

The field contributions that contain Sui,5p, andSp in equation (22) appear as

r so-Lw**'r do

P P(23)

The term involving 5<rkj may be integrated by partsto produce

ae dd

(24)

where the conditions Ui — 6ui — 0 are used to elim-inate the boundary integral on B. Notice that theother term in (23) that involves 6ut~ need not beintegrated by parts and is merely carried on as

r fit)- I Suk(TkjSij—d'D£.

J-D 0&(25)

The terms in expression (23) that involve Sp andSp may also be integrated by parts to produce botha field and a boundary integral. The field integralbecomes

Sp d

which may be simplified by transforming the innerderivative to Cartesian coordinates

I26)

(2T)

This can be simplified by transforming the innerderivative to Cartesian coordinates

r (Sp Psp\ d ( ae\I I — ~ ~ — ) aT I <->WK'S — JJ-D\P P P J d& \ dxjJ

The boundary integral becomes

«(*_>«!) **&"\ P P P J J d&

and identifying the normal derivative at the wall

(29)

and the variation in temperature

5T =_ 1 f 5p pSp\

Rto produce the boundary contribution

L (30)

This term vanishes if T is constant on the wall butpersists if the wall is adiabatic.

There is also a boundary contribution left overfrom the first integration by parts (22) which hasthe form

where_ dT

3 &xj'since HI — 0. Notice that for future convenience indiscussing the adjoint boundary conditions resultingfrom the energy equation, both the 5w and 5S termscorresponding to subscript classes / and // are con-sidered simultaneously. If the wall is adiabatic

dT

so that using (29),

S(S2iQj) = 0,

and both the Sw and SS boundary contributions van-ish.

American Institute of Aeronautics and Astronautics

Page 9: (c)2001 American Institute of Aeronautics & Astronautics ...aero-comlab.stanford.edu/Papers/aiaa-01-2530-326.pdf(c)2001 American Institute of Aeronautics & Astronautics or Published

(c)2001 American Institute of Aeronautics & Astronautics or Published with Permission of Author(s) and/or Author(s)' Sponsoring Organization.

On the other hand, if T is constant | = 0 for I =1, so that

upwind-biased blended first and third order fluxesas the artificial dissipation scheme. A full discretiza-tion of the equation would involve discretizing everyterm that is a function of the state vector.

Thus, the boundary integral (31) becomes nx ny

fL -z^ST + S ^T }dBt. (32)

Therefore, for constant T, the first term correspond-ing to variations in the flow field contributes to theadjoint boundary operator and the second set ofterms corresponding to metric variations contributeto the cost function gradient.

All together, the contributions from the energyequation to the viscous adjoint operator are thethree field terms (24), (25) and (26), and either oftwo boundary contributions ( 30) or ( 32), depend-ing on whether the wall is adiabatic or has constanttemperature.

The Viscous Adjoint Field Operator

Collecting together the contributions from the mo-mentum and energy equations, the viscous adjointoperator in primitive variables can be expressed as

jS [n(33)

where 6IC is the discrete cost function, 1Z,(w) isthe field equation, T>(w) is the artificial dissipationterm, and V(w) are the viscous terms.

The discrete viscous adjoint equation can be castas such,

(34)

Terms multiplied by the variation 5witj of the dis-crete flow variables are collected and the following isthe resulting convective flux of the discrete adjointequation,

d ( f / 89 00—— 1 Sij \IJL I m—— -f Uj ——

30

d

for z = l,2

, 9^

The conservative viscous adjoint operator may nowbe obtained by the transformation

L — M"1 L.

Derivation of the ViscousDiscrete Adjoint Terms

The discrete adjoint equation is obtained by apply-ing control theory directly to the set of discrete fieldequations. The resulting equation depends on thetype of scheme used to solve the flow equations. Thispaper uses a cell-centered multigrid scheme with

and

American Institute of Aeronautics and Astronautics

Page 10: (c)2001 American Institute of Aeronautics & Astronautics ...aero-comlab.stanford.edu/Papers/aiaa-01-2530-326.pdf(c)2001 American Institute of Aeronautics & Astronautics or Published

(c)2001 American Institute of Aeronautics & Astronautics or Published with Permission of Author(s) and/or Author(s)' Sponsoring Organization.

where,

(37)

is the discrete adjoint artificial dissipation term andV is the cell area. The dissipation coefficients e2 ande4 are functions of the flow variables, but to reducecomplexity they are treated as constants.

If a first order artificial dissipation equation isused, then equation (37) would reduce to the termassociated with e2. In such a case, the discrete ad-joint equations are completely independent of thecost ate variables in the cells below the wall. How-ever, if we use the blended first and third order equa-tion, then these values are required. As shown later,a simple zeroth order extrapolation across the wallproduces good results.

Similar to the adjoint convective and dissipativefluxes, the discrete viscous adjoint flux can be ob-tained by collecting all terms multiplied by the prim-itive variables. After some lengthy algebraic ma-nipulations, the conservative discrete viscous adjointoperator is obtained by multiplying it with the trans-formation matrix described in the section on Deriva-tion of the Viscous Continuous Adjoint Terms. Inthese calculations, the eddy viscosity was calculatedusing the very simple Baldwin-Lomax turbulencemodel. The eddy viscosity coefficient is treated as aconstant.

Viscous Adjoint Boundary Conditionsfor Inverse Design

Continuous Adjoint

In the continuous adjoint case, the boundary termthat arises from the momentum equations includingboth the 5w and 5S components (19) takes the form

Defining the components of the surface stress as

Replacing the metric term with the correspondinglocal face area 52 and unit normal Uj defined by

|52| =

then leads to

faS (\Sz

and the physical surface element

the integral may then be split into two components

t 4>kTk \SS2JB+ I (t>k5rkdS,

JB(38)

where only the second term contains variations inthe flow variables and must consequently cancel theSw terms arising in the cost function. The first termwill appear in the expression for the gradient.

A general expression for the cost function that al-lows cancellation with terms containing 8rk has theform

/= / M(r}dS, (39)JB

corresponding to a variation

81 -1 gJB drkfor which cancellation is achieved by the adjointboundary condition

<t>k = drk'

Natural choices for J\T arise from force optimiza-tion and as measures of the deviation of the surfacestresses from desired target values.

In the inverse design case, in order to control thesurface pressure and normal stress one can measurethe difference

nj{akj+ S k j ( p ~ P d ) } ,

where pd is the desired pressure. The normal com-ponent is then

rn =

so that the measure becomes

M(r) = -rn

1 / ^x= -ninmnknj |a/m + o^z- {akj +5kj(p~Pd)}.

Defining the viscous normal stress as

—vn —

~ Pd)}

American Institute of Aeronautics and Astronautics

Page 11: (c)2001 American Institute of Aeronautics & Astronautics ...aero-comlab.stanford.edu/Papers/aiaa-01-2530-326.pdf(c)2001 American Institute of Aeronautics & Astronautics or Published

(c)2001 American Institute of Aeronautics & Astronautics or Published with Permission of Author(s) and/or Author(s)' Sponsoring Organization.

the measure can be expanded as

A/"(r) = -

- (nknj(?kj

where $inv is the source term for inverse design,

.2 4- AxcV>3ii2 - (p -

~ Pd) + (p ~

For cancellation of the boundary terms

(/>fc (rij5crkj -f nk5p) ={nirimcrim -f rtf (p — Pd)} nk (nj5crkj -f nkSp)

leading to the boundary condition

4>k = nk (rvn + p — pd) -

In the case of high Reynolds number, this is wellapproximated by the equations

</>fc =nk(p- pd) j (40)

which should be compared with the single scalarequation derived for the inviscid boundary condi-tion. In the case of an inviscid flow, choosing

1 2

2requires

<f>knktip = (p- Pd) nltip =(p- Pd) tip (41)

which is satisfied by equation (40), but which repre-sents an over-specification of the boundary conditionsince only the single condition need be specified toensure cancellation.

Discrete Adjoint

In the case of an inverse design, 5IC is the discreteform of equation (39). The tiw^z term is added to thecorresponding term from equation (35), and the met-ric variation term is added to the gradient term. Incontrast to the continuous adjoint, where the bound-ary condition appears as an update to the Lagrangemultipliers in the cell below the wall, the discreteboundary condition appears as a source term in theadjoint fluxes. At cell z, 2 the adjoint equation is asfollows,

V-12

dt

1 , x2 and>

o (P ~ Pd)

All the terms in equation (42) except for the sourceterm are scaled as the square of Ax. Therefore, asthe mesh width is reduced, the terms within paren-thesis in the source term divided by A$i must ap-proach zero as the solution reaches a steady state.One then recovers the continuous adjoint boundarycondition as stated in equation (40).

Viscous Adjoint Boundary Conditionsfor Drag Minimization

Pressure Drag Minimization

In the continuous adjoint case, if the drag is to beminimized, then the cost function is the drag coeffi-cient,

/ - Cd

cos a

A variation in the shape causes a variation dp inthe pressure and consequently a variation in the costfunction,

SI = - Cp ( — cosa - — sina ) dpd£CJBW \d£ d£ )

(43)

As in the inverse design case, the first term is afunction of the state vector, and therefore is incorpo-rated into the boundary condition, where the inte-grand replaces the pressure difference term in equa-tion (41) producing the following boundary condi-tion,

1 [cosa]I nk (44)

(42)

The discrete viscous adjoint boundary conditionfor pressure drag minimization can be easily ob-tained by replacing the (p — pr)^Si term in the

10

American Institute of Aeronautics and Astronautics

Page 12: (c)2001 American Institute of Aeronautics & Astronautics ...aero-comlab.stanford.edu/Papers/aiaa-01-2530-326.pdf(c)2001 American Institute of Aeronautics & Astronautics or Published

(c)2001 American Institute of Aeronautics & Astronautics or Published with Permission of Author(s) and/or Author(s)' Sponsoring Organization.

source term of equation (42) by the discrete form ofequation (43).

Skin Friction Drag Minimization

For viscous force optimization, the cost functionshould measure skin friction drag. The skin frictionforce in the Xi direction is

CDfi = / (TtjdSj = f SijaijJB JB

so that the force in a direction with cosines li hasthe form

= I liSzjVijdB^JB

Expressed in terms of the surface stress r^, this cor-responds to

?n/ = / todS,JB

so that basing the cost function (39) on this quantitygives

M=liTi.

Cancellation with the flow variation terms in equa-tion (38) therefore mandates the continuous viscousadjoint boundary condition

</>k = Ik (45)

where,cos ofl

If one would take the dot product of equation (45)then the resulting equation is identical to equation(44). Therefore, the continuous adjoint boundarycondition for skin friction drag minimization alsosatisfies the pressure drag minimization cost func-tion. This choice of boundary condition also elimi-nates the first term in equation (38) so that it neednot be included in the gradient calculation. Noticethat the choice for the first and fourth Lagrangemultipliers can be arbitrarily set to zero or a zerothorder extrapolation across the wall can be adoptedsince equation (45) provides no suggestion for thesevalues. The effect of this boundary condition is ex-plored in the Results section.

Similar to the discrete viscous adjoint bound-ary conditions for the inverse design case and pres-sure drag minimization, the discrete viscous adjointboundary condition for skin friction drag minimiza-tion appears as a source term in the adjoint fluxes.

At cell i, 2 the adjoint source term $v in the direc-tion normal to the surface is as follows,

...

where,

— BC (Ai/£ cos a + Ax^ sin a)}

BC =

Unlike its counterpart the viscous continuous ad-joint skin friction minimization boundary condition,the viscous discrete adjoint provides boundaryconditions for all four Lagrange multipliers.

Total Drag Minimization

Since the continuous adjoint boundary conditionfor skin friction drag minimization also satisfies thepressure drag minimization cost function, then equa-tion (45) is used for total drag minimization.

In the discrete adjoint case, a combination of thesource terms from the pressure drag minimizationcost function and the skin friction drag minimizationis used to achieve the desired effect.

Viscous Adjoint Boundary Conditionsfor the Calculation of Remote

Sensitivities

Traditional adjoint implementations were aimed atreducing a cost function computed from the pres-sure distribution on the surface that is being modi-fied. For supersonic boom minimization, however,we would like to obtain sensitivity derivatives ofpressure distributions that are not collocated at thepoints where the geometry is being modified. In or-der to include the tailoring of the ground pressuresignatures, it becomes necessary to compute sensi-tivity derivatives of the sonic boom signature withrespect to a large number of design variables thataffect the shape of the airfoil or aircraft.

11

American Institute of Aeronautics and Astronautics

Page 13: (c)2001 American Institute of Aeronautics & Astronautics ...aero-comlab.stanford.edu/Papers/aiaa-01-2530-326.pdf(c)2001 American Institute of Aeronautics & Astronautics or Published

(c)2001 American Institute of Aeronautics & Astronautics or Published with Permission of Author(s) and/or Author(s)' Sponsoring Organization.

Figure 1 illustrates the pressure contour and nearfield pressure distribution for a biconvex airfoil atMach 1.5. In this example, the near field is approxi-mately 6 chord lengths from the airfoil surface. Theadjoint boundary condition developed to calculateremote sensitivities is applied along this location.

Figure 1: Pressure Contour and Near Field PressureDistribution for Biconvex Airfoil at Mach 1.5

The weak form of the inviscid equations for steadyflow can be added to the variation of the inversepressure design cost function to yield,

SI = I (P - Pd) Sp ds + - / (p - pd)J Bw ^J Bw

-L5ds

T> ut,k

The domain can then be split into two parts.First, the near field domain (NF) whose bound-aries are the airfoil surface and near field boundaryplane where the adjoint boundary condition will beapplied. Second, the far field domain (FF) whichborders the near field domain along the near fieldboundary plane and the far field boundary. Inte-grating these two field integrals by parts producesthe following equation,

SI = ds+-BNF

SdsBNF

-8FkdV 4-- /„„- / ^-8FkdV + / (nkipT5Fk)dB (46)

J-DFF a& JBNF

The above equation contains two continuous ad-joint boundary conditions. First, the fourth term

in equation (46) forms the continuous adjoint wallboundary condition. Second, the first and sixthterms combine to produce the continuous adjointboundary condition applied at the near field plane.

In the discrete adjoint case, the boundary con-dition for the calculation of remote sensitivities forsupersonic flow is developed by adding the SW^NF(where NF denotes the cells along the Near Field)term from the discrete cost function to the corre-sponding term from Eq (35). The discrete bound-ary condition appears as a source term in the adjointfluxes similar to the inverse and drag minimizationcases. For example, at cell (i,NF) the source term

for inverse design is as follows,

Optimization Procedure

The search procedure used in this work is a simpledescent method in which small steps are taken in thenegative gradient direction. Let f represent the de-sign variable, and Q the gradient. An improvementcan then be made with a shape change

5F = -\Q,

The_gradient Q can be replaced by a smoothedvalue Q in the descent process. This ensures thateach new shape in the optimization sequence re-mains smooth and acts as a preconditioner which al-lows the use of much larger steps. To apply smooth-ing in the £1 direction, the smoothed gradient Q maybe calculated from a discrete approximation to

where e is the smoothing parameter. If the modifi-cation is applied on the surface £2 = constant, thenthe first order change in the cost function is

51 - - / /

<

assuring an improvement if A is sufficiently small andpositive. The smoothing leads to a large reduction

12

American Institute of Aeronautics and Astronautics

Page 14: (c)2001 American Institute of Aeronautics & Astronautics ...aero-comlab.stanford.edu/Papers/aiaa-01-2530-326.pdf(c)2001 American Institute of Aeronautics & Astronautics or Published

(c)2001 American Institute of Aeronautics & Astronautics or Published with Permission of Author(s) and/or Author(s)' Sponsoring Organization.

in the number of design iterations needed for conver-gence. An assessment of alternative search methodsfor a model problem is given by Jameson and Vass-berg.26

Finite Difference VersusComplex-Step Gradients

Traditionally, finite-difference methods have beenused to calculate the sensitivity derivatives of theaerodynamic cost function. The computational costof the finite-difference method for problems involv-ing large numbers of design variables is both unaf-fordable and prone to subtractive cancellation error.In order to produce an accurate finite-difference gra-dient, a range of step sizes must be used, and thusthe ultimate cost of producing Af gradient evalu-ations with the finite-difference method is a prod-uct of raAf, where m is the number of differentstep sizes that was used before a converged finite-difference gradient was obtained. An estimate of thefirst derivative of a cost function / using a first-orderforward-difference approximation is as follows,

/(*) = 0(h), (47)

where h is the step size. A small step size is desiredto reduce the truncation error O(h) but a very smallstep size would also increase subtractive cancellationerrors.

Lyness and Moler introduced the use of thecomplex-step in calculating the derivative of an an-alytical function. Here, instead of using a real stepft, the step size h is added to the imaginary part ofthe cost function. A Taylor series expansion of thecost function / yields,

I(x + ih) =

2! 3! • + .

Take the imaginary parts of the above equation anddivide by the step size h to produce a second ordercomplex-step approximation to the first derivative

Figure 2: Complex-Step Versus Finite DifferenceGradient Errors for Inverse Design Case; e = \9~9r*f\

At a step size of 10~4 both the finite difference andcomplex-step approximations to the first derivativeof the cost function is very similar. As the step-size isreduced, the finite-difference gradient error starts toincrease instead of decreasing due to subtractive can-cellation errors, however, the complex-step producesmore accurate results. Therefore, the complex-stepis more robust and does not require repeated calcu-lations in order to produce an accurate gradient. Ifa very small step size is chosen, the gradient is cal-culated only once per design variable. However dueto the use of double precision complex numbers, thecode requires three times the wall clock time whencompared to the finite difference method. But thebenefits of using the complex-step to acquire accu-rate gradients out-weights its disadvantage.

The code used for this paper was modified tohandle complex calculations using the automatedmethod developed by Martins et al.27

A)}(48)

The complex step formula does not require any sub-traction to yield the approximate derivative.

Figure (2) illustrates the complex-step versus thefinite-difference gradient errors for the inverse designcase for decreasing step sizes.

13

American Institute of Aeronautics and Astronautics

Page 15: (c)2001 American Institute of Aeronautics & Astronautics ...aero-comlab.stanford.edu/Papers/aiaa-01-2530-326.pdf(c)2001 American Institute of Aeronautics & Astronautics or Published

(c)2001 American Institute of Aeronautics & Astronautics or Published with Permission of Author(s) and/or Author(s)' Sponsoring Organization.

Results

This section presents the results of the viscous in-verse design, drag minimization, and sonic boomminimization cases. For each case, we comparethe continuous and discrete adjoint gradients to thecomplex-step gradient.

Inverse Design

In an inverse design case, the target pressure is gen-erally obtained from a known solution. The targetpressure was obtained using the FLO 103 flow solverfor the NACA0012 airfoil at M = 0.75 and a liftcoefficient of C\ = 0.50 on a 512x64 C-grid.

The design procedure is as follows. First, the flowsolver module is run until at least 5 orders of magni-tude drop in the residual. Second, the adjoint solveris run until at least 3 orders of magnitude drop inthe residual. Next, the gradient is calculated by per-turbing each point on the airfoil surface mesh. Theresulting gradient is then smoothed by an implicitsmoothing technique as described in the Optimiza-tion Procedure section. Then the airfoil geometry isupdated and the grid is modified. The entire pro-cess is repeated until the conditions for optimalityare satisfied. At each design iteration, 25 multigridcycles for the flow and adjoint solver are used beforethe gradient is calculated. Figure (3) illustrates thedesign procedure.

FLO 103 Flow Solver

Adjoint Solver

Calculate Gradient

Update Airfoil Geometry

Modify Grid

Figure 3: Design Procedure

Figure (4) illustrates an inverse design case of a

NACA0012 to Onera M6 airfoil at fixed lift coeffi-cient. Figure (4a) shows the solution for the NACA0012 airfoil at M = 0.75 and Ct = 0.50. After only 4design cycles, the general shape of the target airfoil isachieved as shown in figure (4b). The circles denotethe target pressure distribution, the plus signs arethe current upper surface pressure, and lastly, the xmarks denote the lower surface pressure distribution.After 100 design iterations the desired target airfoilis obtained. Observe the point-to-point match alongthe shock. The figures illustrate solutions that wereobtained using the continuous adjoint method. Thediscrete adjoint method produces identical solutions.

Figure (5) illustrates another example of an in-verse design problem of a RAE to NACA 64A410airfoil at fixed lift coefficient. Figure (5a) showsthe solution for the RAE airfoil at M = 0.75 andd = 0.50. The final design illustrates that the tar-get airfoil is achieved but with a slight deviation atthe shock. The purpose of this example is to il-lustrate the successful application of the method tounsymmetric airfoils with cusped trailing edges. Avery strong shock is produced on the upper surface,thus making this an ideal test case for the adjointversus complex-step gradient comparison.

To ensure that the gradients obtained from the ad-joint method is accurate: first, investigate the sensi-tivity of the gradient towards the convergence levelof the flow and adjoint solver; and second, comparethem to gradients obtained from a finite differenceor complex-step method. Figure (6) illustrates theadjoint gradient errors for varying flow solver con-vergence. As seen in the figure, at least a 4 ordermagnitude drop in the flow solver convergence is re-quired for adjoint gradients to be accurate up to 5significant digits. Any further drop in the flow con-vergence has a minimal effect on the accuracy of theadjoint gradient; therefore, adjoint gradients as ex-pected are sensitive to the convergence of the flowsolver. They are not, however, sensitive towards theconvergence of the adjoint solver. In figure (7) a 1order magnitude drop in the adjoint solver producesgradients that are accurate to 4 significant digits.

Figure (8) illustrates the values of the gradientsobtained from the continuous and discrete adjointand complex-step methods. The asterisks representthe continuous adjoint gradients, the squares rep-resent the discrete adjoint gradients, and the circlesdenote values that were obtained using the complex-step method. The gradient is obtained with respectto variations in Hicks-Henne sine "bump" 5 functionsplaced along the upper and lower surfaces of the air-foil. The figure only illustrates the values obtained

14

American Institute of Aeronautics and Astronautics

Page 16: (c)2001 American Institute of Aeronautics & Astronautics ...aero-comlab.stanford.edu/Papers/aiaa-01-2530-326.pdf(c)2001 American Institute of Aeronautics & Astronautics or Published

(c)2001 American Institute of Aeronautics & Astronautics or Published with Permission of Author(s) and/or Author(s)' Sponsoring Organization.

with modifications to the upper surface starting fromthe leading edge on the left and ending at the trailingedge on the right. The discrete adjoint equation isobtained from the discrete flow equations but with-out taking into account the dependence of the dissi-pation coefficients on the flow variables. Therefore,in order to eliminate the effect of this on comparisonswith the complex-step gradient we compute the flowsolution until attaining a decrease of five orders ofmagnitude in the residual. We then freeze the dis-sipative coefficients and calculate the complex-stepvalue for each design variable.

[| Grid Size [ Cont. [ Disc. | Cont-Disc384 x 64512 x 641024 x 64

1.382e-31.008e-37.809e - 4

1.331e-39.943e - 47.795e - 4

8.888e - 54.610e - 51.425e-5

Table 1: L^ norm of the Difference Between Adjointand Complex-Step Gradient

Table (1) contains values of the Z/2 norm of thedifference between the adjoint and complex-step gra-dients. The table illustrates three important facts:the difference between the discrete adjoint and thecomplex-step gradient is slightly smaller than thatbetween the continuous adjoint and complex-stepgradient; the norm decreases as the mesh size is in-creased; and the difference between continuous anddiscrete adjoint gradients decreases as the mesh sizeis increased. The second column depicts the differ-ence between the continuous adjoint and complex-step gradient, the third column depicts the differ-ence between the discrete adjoint and complex-stepgradients, and lastly the last column depicts the dif-ference between the discrete and continuous adjoint.As the mesh size increases, the norm of the differ-ence between adjoint and complex-step decreases asexpected. Since we derive the discrete adjoint bytaking a variation of the discrete flow equations,we expect it to be consistent with the complex-stepgradients and thus to be closer to the complex-stepgradient than the continuous adjoint. This is con-firmed by numerical results, but the difference is verysmall. As the mesh size increases, the difference be-tween the continuous and discrete gradients shoulddecrease, and this is reflected in the last column oftable 1.

Drag Minimization

The drag minimization problem is broken up intothree different subsections: pressure drag, skin fric-

tion drag, and total drag minimization. Figure (11)illustrates the drag minimization of RAE 2822 air-foil using the continuous adjoint formulation at aM = 0.75 and a fixed lift coefficient of C\ = 0.65.Figure (11 a) shows the initial solution of the RAE2822 airfoil with 56 drag counts due to viscous forcesand 92 drag counts due to pressure drag, thus addingup to a total of 148 drag counts. In the first case, asshown in figure (lib), only the pressure drag bound-ary condition and its contribution towards the gra-dient were included. After 20 design iterations, areduction of 50 drag counts was achieved; however,the skin friction drag increased by 1 count. In thecase where only the skin friction drag boundary con-dition was used, a reduction of 44 drag count forthe pressure drag was achieved but with no changein the skin friction drag count. As described in thesection on Continuous Adjoint Formulation, the con-tinuous viscous adjoint boundary condition for skinfriction drag minimization satisfies the skin frictiondrag objective function and the pressure drag ob-jective function. In figure (lid) the total drag wasused as the objective function. The resulting airfoilhas the same characteristics as the airfoil in figure(lib) that was obtained by just using the pressuredrag. The skin friction drag boundary condition hasnot contributed towards the reduction in the skinfriction drag.

Figure (12) illustrates the pressure, skin friction,and total drag minimization of the RAE 2822 air-foil using the Discrete Adjoint Formulation. In fig-ure (12b) the airfoil was redesigned by using onlythe pressure drag boundary condition and its con-tribution towards the gradient. The solution is sim-ilar to the one obtained using the continuous ad-joint boundary condition. The pressure drag wasreduced by 50 drag counts, but the skin friction dragincreased by two drag counts. Thus the total dragreduction is 49 drag counts, compared to the 50 thatwas obtained with continuous adjoint method. Fig-ure (12c) shows the skin friction drag minimizationcase. Here, in contrast to the continuous adjointwhere no skin friction drag was reduced, the dis-crete adjoint produced a reduction of 2 drag countsfor the skin friction drag but the pressure drag in-creased by 42 drag counts. When a combination ofboth boundary conditions are used and their respec-tive contributions towards the gradient are consid-ered, then the discrete adjoint produces the exactsame result as the continuous adjoint formulations.In contrast to the continuous viscous adjoint bound-ary condition for skin friction drag minimization, thediscrete viscous adjoint boundary condition does not

15

American Institute of Aeronautics and Astronautics

Page 17: (c)2001 American Institute of Aeronautics & Astronautics ...aero-comlab.stanford.edu/Papers/aiaa-01-2530-326.pdf(c)2001 American Institute of Aeronautics & Astronautics or Published

(c)2001 American Institute of Aeronautics & Astronautics or Published with Permission of Author(s) and/or Author(s)' Sponsoring Organization.

satisfy the pressure drag boundary condition. Bothdiscrete boundary conditions are independent of onefrom the other. This fact can be better illustrated bycomparing the adjoint gradients to the complex-stepgradient.

As expected, when only the pressure drag bound-ary condition is used, both the continuous and dis-crete adjoint gradients match with the complex-stepgradient as shown in figure (13). Figure (14) illus-trates the difference between the continuous and dis-crete boundary condition for skin friction drag min-imization. The discrete adjoint gradient compareswell with the complex-step gradient; however, thegradient produced by the continuous adjoint formu-lation does not compare well with the complex-stepgradient. This figure illustrates why the discrete ad-joint was able to reduce the skin friction drag countbut not the continuous adjoint.

Figure (15) shows the gradient comparisons forthe total drag minimization case. The discrete ad-joint gradient is similar to the complex-step gradi-ent, but discrepancies between the continuous andcomplex-step exists. These discrepancies are due tothe continuous viscous adjoint boundary conditionfor skin friction drag minimization.

Sonic Boom Minimization

In order to validate the use of this new method forthe calculation of flow sensitivities, we have con-structed the following test problem, based on a bi-convex airfoil with a 5% thickness ratio. For thesonic boom minimization case, the target pressuredistribution was obtained by scaling down the initialnear field pressure distribution at 6 chord lengthsaway. Figure 16 illustrates the shape of the re-designed airfoil after 100 design iterations. Only aslight modification of the lower surface of the airfoilis needed to achieve the desired near field pressuredistribution. Figure 17 shows the initial near fieldpressure distribution. In Figure 18, the peak pres-sure has been reduced to almost 10% its originalvalue after 35 design iterations. After 100 iterations,the target peak pressure is captured, as shown inFigure 19. Both the continuous and discrete viscousadjoint method produced the same result. The re-sults shown were obtained using the discrete adjointmethod.

Conclusion

This paper presents a complete formulation for thecontinuous and discrete adjoint approaches to auto-matic aerodynamic design using the Navier-Stokesequations. The gradients from each method are com-pared to complex-step gradients. We conclude that:

1. The continuous adjoint boundary condition ap-pears as an update to the costate values belowthe wall for a cell-centered scheme, and the dis-crete adjoint boundary condition appears as asource term in the cell above the wall. As themesh width is reduced, one recovers the contin-uous adjoint boundary condition from the dis-crete adjoint boundary condition.

2. The viscous continuous adjoint skin frictionminimization boundary condition does not pro-vide accurate gradients and thus failed to de-crease the skin friction drag. It appears that theextrapolation of the first and fourth multipliers,as used in this work, is not adequate. Howeverthe gradients for the viscous discrete adjointboundary condition for skin friction drag min-imization does match with gradients obtainedfrom the complex-step method and does reducethe skin friction drag.

3. Discrete adjoint gradients have better agree-ment than continuous adjoint gradients withcomplex-step gradients as expected, but the dif-ference is generally small. (Figures 8-10)

4. As the mesh size increases, both the continu-ous adjoint gradients and the discrete adjointgradients approach the complex-step gradients.

5. The difference between the continuous and dis-crete gradients decrease as the mesh size in-creases. (Tables 1)

6. The cost of deriving the discrete adjoint isgreater. (Equation 35)

7. The discrete adjoint may provide a route to im-proving the boundary conditions for the contin-uous adjoint for viscous flows.

8. The best compromise may be to use the con-tinuous adjoint formulations in the interior ofthe domain and the discrete adjoint boundarycondition.

16

American Institute of Aeronautics and Astronautics

Page 18: (c)2001 American Institute of Aeronautics & Astronautics ...aero-comlab.stanford.edu/Papers/aiaa-01-2530-326.pdf(c)2001 American Institute of Aeronautics & Astronautics or Published

(c)2001 American Institute of Aeronautics & Astronautics or Published with Permission of Author(s) and/or Author(s)' Sponsoring Organization.

Acknowledgments

This research has benefitted greatly from the gener-ous support of the AFOSR under grant number AFF49620-98-1-022.

References

[I] M.J. Lighthill A new method of two-dimensional aerodynamic design. ARC, RandM 2112

[2] G.B. McFadden An artificial viscosity methodfor the design of supercritical airfoils. New YorkUniversity report No. COO-3077-158.

[3] F. Bauer, P. Garabedian, D. Korn, andA.. Jameson Supercritical Wing Sections II.Springer-Verlag, New York, 1975

[4] P. Garabedian, and D. Korn Numerical De-sign of Transonic Airfoils Proceedings ofSYNSPADE 1970. pp 253-271, AcademicPress, New York, 1971.

[5] R. M. Hicks and P. A. Henne. Wing Design byNumerical Optimization. Journal of Aircraft.15:407-412, 1978.

[6] J.L. Lions. Optimal Control of SystemsGoverned by Partial Differential Equations.Springer-Verlag, New York, 1971. Translatedby S.K. Mitter.

[7] O. Pironneau. Optimal Shape Design for Ellip-tic Systems. Springer-Verlag, New York, 1984.

[8] A. Jameson. Aerodynamic design via controltheory. In Journal of Scientific Computing,3:233-260,1988.

[9] A. Jameson. Automatic design of transonic air-foils to reduce the shock induced pressure drag.In Proceedings of the 31st Israel Annual Con-ference on Aviation and Aeronautics, Tel Aviv,pages 5-17, February 1990.

[10] A. Jameson. Optimum aerodynamic design us-ing CFD and control theory. AIAA paper 95-1729, AIAA 12th Computational Fluid Dynam-ics Conference, San Diego, CA, June 1995.

[II] A. Jameson., N. Pierce, and L. Martinelli. Op-timum aerodynamic design using the Navier-Stokes equations. In AIAA 97-0101, 35th.Aerospace Sciences Meeting and Exhibit, Reno,Nevada, January 1997.

[12] A. Jameson., L. Martinelli, and N. Pierce Op-timum aerodynamic design using the Navier-Stokes equations. In Theoretical ComputationalFluid Dynamics, 10:213-237, 1998.

[13] J. Reuther and A. Jameson. Aerodynamicshape optimization of wing and wing-body con-figurations using control theory. AIAA 95-0213, 33rd Aerospace Sciences Meeting and Ex-ibit, Reno, Nevada, January 1995.

[14] J. Reuther, A. Jameson, J. J. Alonso, M. JRimlinger, and D. Saunders. Constrained mul-tipoint aerodynamic shape optimization usingan adjoint formulation and parallel computers.AIAA 97-0103, AIAA 35th Aerospace SciencesMeeting and Exhibit, Reno, NV, January 1997.

[15] G. W. Burgreen and O. Baysal. Three-Dimensional Aerodynamic Shape Optimizationof Wings Using Discrete Sensitivity Analysis.AIAA Journal, Vol. 34, No.9, September 1996,pp. 1761-1770.

[16] G. R. Shubin and P. D. Frank A Comparison ofthe Implicit Gradient Approach and the Vari-ational Approach to Aerodynamic Design Op-timization. Boeing Computer Services ReportAMS-TR-163, April 1991.

[17] J. Elliot and J. Peraire. Aerodynamic DesignUsing Unstructured Meshes. AIAA 96-1941,1996.

[18] W. K. Anderson and V. Venkatakrishnan Aero-dynamic Design Optimization on UnstructuredGrids with a Continuous Adjoint Formulation.AIAA 96-1941, 1996.

[19] A. lollo, M. Salas, and S. Ta'asan. Shape Opti-mization Gorvened by the Euler Equations Us-ing and Adjoint Method. ICASE report 93-78,November 1993.

[20] S. Ta'asan, G. Kuruvila, and M. D. Salas. Aero-dynamic design and optimization in one shot.AIAA 91-0025, 30th Aerospace Sciences Meet-ing and Exibit, Reno, Nevada, January 1992.

[21] S. Kim,J. J. Alonso, and A. Jameson A Gra-dient Accuracy Study for the Adjoint-BasedNavier-Stokes Design Method. AIAA 99-0299,AIAA 37th. Aerospace Sciences Meeting andExhibit, Reno, NV, January 1999.

17

American Institute of Aeronautics and Astronautics

Page 19: (c)2001 American Institute of Aeronautics & Astronautics ...aero-comlab.stanford.edu/Papers/aiaa-01-2530-326.pdf(c)2001 American Institute of Aeronautics & Astronautics or Published

(c)2001 American Institute of Aeronautics & Astronautics or Published with Permission of Author(s) and/or Author(s)' Sponsoring Organization.

[22] S. Nadarajah and A. Jameson A Comparisonof the Continuous and Discrete Adjoint Ap-proach to Automatic Aerodynamic Optimiza-tion. AIAA 00-0667, AIAA 38th. AerospaceSciences Meeting and Exhibit, Reno, NV, Jan-uary 2000.

[23] R. Seebass, B. Argrow Sonic Boom Minimiza-tion Revisited. AIAA paper 98-2956, AIAA2nd Theoretical Fluid Mechanics Meeting, Al-buquerque, NM, June 1998.

[24] A. Jameson. Solution of the Euler Equations forTwo Dimensional Transonic Flow By a Multi-grid Method. Applied Mathematics and Com-putation, 13:327-355, 1983.

[25] A. Jameson., J. Alonso,J. Reuther,L. Mar-tinelli, and J. Vassberg Aerodynamic ShapeOptimization Techniques Based on ControlTheory. AIAA 98-2538, AIAA 29th. FluidDynamics Conference, Albuquerque, NM, June1998.

[26] A. Jameson. Studies of Alternative NumericalOptimization Methods Applied to the Brachis-tochrone Problem.

[27] J.R.R.A. Martins, I.M. Kroo, and J.J.AlonsoAn Automated Method for Sensitivity Analy-sis using Complex Variables. AIAA 2000-0689,AIAA 38th. Aerospace Sciences Meeting andExhibit, Reno, NV, January 2000.

18

American Institute of Aeronautics and Astronautics

Page 20: (c)2001 American Institute of Aeronautics & Astronautics ...aero-comlab.stanford.edu/Papers/aiaa-01-2530-326.pdf(c)2001 American Institute of Aeronautics & Astronautics or Published

(c)2001 American Institute of Aeronautics & Astronautics or Published with Permission of Author(s) and/or Author(s)' Sponsoring Organization.

4a: Initial Solution of NACA0012 Airfoil 4b: After 4 Design Iterations

4c: After 50 Design Iterations 4d: Final Design after 100 Iterations

Figure 4: Inverse Design of NACA 0012 to Onera M6 at FixedGrid - 512 x 64, M = 0.75, C\ = 0.65, a = 1 degrees

19

American Institute of Aeronautics and Astronautics

Page 21: (c)2001 American Institute of Aeronautics & Astronautics ...aero-comlab.stanford.edu/Papers/aiaa-01-2530-326.pdf(c)2001 American Institute of Aeronautics & Astronautics or Published

(c)2001 American Institute of Aeronautics & Astronautics or Published with Permission of Author(s) and/or Author(s)' Sponsoring Organization.

5a: Initial Solution of RAE Airfoil 5b: After 100 Design Iterations

Figure 5: Inverse Design of RAE to NACA64A410 at FixedGrid - 512 x 64, M - 0.75, Q - 0.50, a = 1 degrees

Order of Convergence of Flow Solver Order of Convergence of Adjoint Solver

Figure 6: Adjoint Gradient Errors forVarying Flow Solver Convergence for theInverse Design Case; e = i~^e |Fine Grid - 512 x 64, M = 0.75^ C\ = 0.65

Figure 7: Adjoint Gradient Errors forVarying Adjoint Solver Convergence forthe Inverse Design Case; e = i~9 |Fine Grid - 512 x 64, M = 0.75, Ci = 0.65

20

American Institute of Aeronautics and Astronautics

Page 22: (c)2001 American Institute of Aeronautics & Astronautics ...aero-comlab.stanford.edu/Papers/aiaa-01-2530-326.pdf(c)2001 American Institute of Aeronautics & Astronautics or Published

(c)2001 American Institute of Aeronautics & Astronautics or Published with Permission of Author(s) and/or Author(s)' Sponsoring Organization.

oj- 0.2

O

- Cont Adjoint Gradient. Disc Adjoint Gradient. Complex-Step Gradient

Ilcont-fdgll2 = 1.382e-03Ildisc-fdgll2 =1.331e-03Hcont-discIL = 8.888e-05

O._? 0.2

2 0.1O

-*- Cont Adjoint Gradient-B- Disc Adjoint Gradient

Q Complex-Step Gradient

Ilcont-fdgll2 = 1.008e-03Ildisc-fdgll2 =9.943e-04llcont-discll. =4.610e-05

240 260Design Variable

330 350 370Design Variable

Figure 8: Adjoint Versus Complex-StepGradients for Inverse Design of RAE toNACA64A410 at Fixed Q.Coarse Grid - 384 x 64, M = 0.75, C\ = 0.65

Figure 9: Adjoint Versus Complex-StepGradients for Inverse Design of RAE toNACA64A410 at Fixed Ct.

Medium Grid - 512 x 64, M = 0.75,Ci = 0.65

0.3

O+s 0.2

12 0.1O

is-

- Cont Adjoint Gradient. Disc Adjoint Gradient. Complex-Step Gradient

Ilcont-fdgll2 = 7.809e-04Ildisc-fdgll2 =7.795e-04Hcont-discIL =1.425e-05

650 700 750Design Variable

Figure 10: Adjoint Versus Complex-StepGradients for Inverse Design of RAE toNACA64A410 at Fixed Q.Fine Grid - 1024 x 64, M - 0.75, Ci = 0.65

21

American Institute of Aeronautics and Astronautics

Page 23: (c)2001 American Institute of Aeronautics & Astronautics ...aero-comlab.stanford.edu/Papers/aiaa-01-2530-326.pdf(c)2001 American Institute of Aeronautics & Astronautics or Published

(c)2001 American Institute of Aeronautics & Astronautics or Published with Permission of Author(s) and/or Author(s)' Sponsoring Organization.

lla: Initial Solution of RAE Airfoil

lib: Final Design Based on Pressure DragMinimization

CDv = .0056 -> .0057CTotai = -0148 -* .0098

lie: Final Design Based on Viscous DragMinimization

CDv = .0056 -» .0056CTotai = .0148 -> .0104

lid: Final Design Based on Total DragMinimization

CDv = .0056 -> .0057CTotai = .0148 -> .0098

Figure 11: Drag Minimization of RAE Airfoil using the Continuous Adjoint FormulationGrid - 512 x 64, M = 0.75, Fixed Q = 0.65, a = 1 degrees

22

American Institute of Aeronautics and Astronautics

Page 24: (c)2001 American Institute of Aeronautics & Astronautics ...aero-comlab.stanford.edu/Papers/aiaa-01-2530-326.pdf(c)2001 American Institute of Aeronautics & Astronautics or Published

(c)2001 American Institute of Aeronautics & Astronautics or Published with Permission of Author(s) and/or Author(s)' Sponsoring Organization.

r—\

12a: Initial Solution of RAE Airfoil

12b: Final Design Based on Pressure DragMinimization

CDv = .0056 -> .0058CTotai = -0148 -» .0099

12c: Final Design Based on Viscous DragMinimization

CDv = .0056 -> .0054CTotai = .0148 -> .0188

12d: Final Design Based on Total DragMinimization

CDv = .0056 -> .0057Crotai = .0148 -> .0098

Figure 12: Drag Minimization of RAE Airfoil using the Discrete Adjoint FormulationGrid - 512 x 64, M = 0.75, Fixed C\ = 0.65, a = 1 degrees

23

American Institute of Aeronautics and Astronautics

Page 25: (c)2001 American Institute of Aeronautics & Astronautics ...aero-comlab.stanford.edu/Papers/aiaa-01-2530-326.pdf(c)2001 American Institute of Aeronautics & Astronautics or Published

(c)2001 American Institute of Aeronautics & Astronautics or Published with Permission of Author(s) and/or Author(s)' Sponsoring Organization.

- Cont Adjoint Gradient- Disc Adjoint Gradient. Complex-Step Gradient

llcont-fdgl!2 = 9.662e-04Hdisc-fdgll2 =8.945e-04llcont-<Jiscll2 =3.358e-04

330 350 370Design Variable

Figure 13: Adjoint Versus Complex-StepGradients for Pressure Drag Minimizationat Fixed C\.Fine Grid - 512 x 64, M - 0.75, Ci = 0.65

o

- Cont Adjoint Gradient- Disc Adjoint Gradient. Complex-Step Gradient

Ilcont-fdgll2 = 7.420e-03Ildisc-fdgll2 =2.110e-04llcont-discIL =7.580e-03

0.25

0.2

0.15

-*- Cont Adjoint Gradient-a- Disc Adjoint Gradient_O_ Complex-Step Gradient

Ilcont-fdgll2 = 7.422e-03Ildisc-fdgll2 = 9.8830-04

330 350 370Design Variable

270 290 310 330 350 370 390 410 430Design Variable

Figure 14: Adjoint Versus Complex-StepGradients for Viscous Drag Minimizationat Fixed C\.Fine Grid - 512 x 64, M = 0.75, Ci = 0.65

Figure 15: Adjoint Versus Complex-StepGradients for Total Drag Minimization atFixed Ci.Fine Grid - 512 x 64, M = 0.75, Ci = 0.65

24

American Institute of Aeronautics and Astronautics

Page 26: (c)2001 American Institute of Aeronautics & Astronautics ...aero-comlab.stanford.edu/Papers/aiaa-01-2530-326.pdf(c)2001 American Institute of Aeronautics & Astronautics or Published

(c)2001 American Institute of Aeronautics & Astronautics or Published with Permission of Author(s) and/or Author(s)' Sponsoring Organization.

0.06

0.04

0.02

0

-0.02

-0.04

-0.06

-0.08

—— Initial Biconvex Airfoil]I - - Current Airfoil Shape |

Figure 16: Sonic Boom Minimization: Ini-tial Airfoil Shape and Final Airfoil Shapeafter 100 Design Iterations

X Coordinate (Parallel to Freestream)

Figure 17: Sonic Boom Minimization: Ini-tial Near Field Pressure Distribution

f 4

X Coordinate (Parallel to Freestream)2 4 6 8 10

X Coordinate (Parallel to Freestream)

Figure 18: Sonic Boom Minimization:Pressure Distribution after 35 Design It-erations

Figure 19: Sonic Boom Minimization:Pressure Distribution after 100 Design It-erations

25

American Institute of Aeronautics and Astronautics