16
Optim Eng DOI 10.1007/s11081-011-9184-9 Efficient aerodynamic shape optimization by structure exploitation Nicolas Gauger · Andrea Walther · Emre Özkaya · Carsten Moldenhauer Received: 19 August 2008 / Accepted: 22 December 2011 © Springer Science+Business Media, LLC 2012 Abstract In this paper, we consider an optimization problem for the complete de- sign chain of an airfoil. Starting with a parameter vector, one has to perform a three step procedure to evaluate the desired objective: Generate a grid around the airfoil, compute the flow around the airfoil, and compute the objective. Applying a gradient- based optimization method, one has to provide derivatives for this complex process. In the present paper, we propose the advanced use of automatic differentiation to com- pute the required gradient information. We report numerical results together with a mesh independency study and an analysis of the optimization process for an inviscid RAE2822 airfoil under transonic flight conditions. Keywords Gradient-based optimization · Discrete adjoints · Automatic differentiation · Reverse accumulation 1 Introduction In aerodynamic shape optimization, a geometry is either given by a parameterization or can be changed by a parameterized deformation. Subsequently, the computation of the resulting aerodynamic properties like the drag coefficient or pressure distribu- tions is based on a complex chain of tasks like grid deformations, flow solvers and target function evaluations. Hence, if one aims at modifying the parameter values to N. Gauger ( ) · E. Özkaya Computational Mathematics Group, CCES, RWTH Aachen University, Aachen, Germany e-mail: [email protected] A. Walther Institute of Mathematics, Paderborn University, Paderborn, Germany C. Moldenhauer Institute of Computer Sciences, Humboldt University Berlin, Berlin, Germany

Efficient Optimization of an Airfoil

Embed Size (px)

Citation preview

Page 1: Efficient Optimization of an Airfoil

Optim EngDOI 10.1007/s11081-011-9184-9

Efficient aerodynamic shape optimization by structureexploitation

Nicolas Gauger · Andrea Walther · Emre Özkaya ·Carsten Moldenhauer

Received: 19 August 2008 / Accepted: 22 December 2011© Springer Science+Business Media, LLC 2012

Abstract In this paper, we consider an optimization problem for the complete de-sign chain of an airfoil. Starting with a parameter vector, one has to perform a threestep procedure to evaluate the desired objective: Generate a grid around the airfoil,compute the flow around the airfoil, and compute the objective. Applying a gradient-based optimization method, one has to provide derivatives for this complex process.In the present paper, we propose the advanced use of automatic differentiation to com-pute the required gradient information. We report numerical results together with amesh independency study and an analysis of the optimization process for an inviscidRAE2822 airfoil under transonic flight conditions.

Keywords Gradient-based optimization · Discrete adjoints · Automaticdifferentiation · Reverse accumulation

1 Introduction

In aerodynamic shape optimization, a geometry is either given by a parameterizationor can be changed by a parameterized deformation. Subsequently, the computationof the resulting aerodynamic properties like the drag coefficient or pressure distribu-tions is based on a complex chain of tasks like grid deformations, flow solvers andtarget function evaluations. Hence, if one aims at modifying the parameter values to

N. Gauger (�) · E. ÖzkayaComputational Mathematics Group, CCES, RWTH Aachen University, Aachen, Germanye-mail: [email protected]

A. WaltherInstitute of Mathematics, Paderborn University, Paderborn, Germany

C. MoldenhauerInstitute of Computer Sciences, Humboldt University Berlin, Berlin, Germany

Page 2: Efficient Optimization of an Airfoil

N. Gauger et al.

optimize the value of the target function, one has to take the whole computationalchain into account.

One possible choice of an optimization strategy would be to use the so-calledevolutionary algorithms and related techniques. These approaches have the advan-tage that only function evaluations are needed. Therefore, these methods are simpleto apply and therefore widespread in aerodynamics, see, e.g., Wang et al. (2002),Periaux and Deconinck (2006) and Oyama et al. (2004). However, the number ofrequired function evaluations is usually very high and therefore the resulting com-puting time is quite often not acceptable. Furthermore, the convergence to an opti-mal solution can be arbitrarily slow and no stopping criterion except for the num-ber of function evaluations is available. Hence, these methods have several draw-backs.

In the present paper, we propose an alternative approach using a gradient-basedoptimization technique. Here, the optimization process requires usually only a fewfunction evaluations and can be stopped when a reasonable stopping criterion is ful-filled. For the considered design chain, we combine the derivative calculation by ad-vanced Automatic Differentiation (AD) and a multilevel approach with respect to thediscretization. This combination yields a successful gradient-based optimization fora complete design chain in aerodynamics.

Since the computation of derivatives forms the main barrier to employ calculus-based optimization, we discuss different alternatives to compute the required gra-dients to justify the choice of automatic differentiation for the gradient calcula-tion. There are at least three ways to approximate or compute the required deriva-tive.

The first one is the Finite Difference method (FD) which approximates, for a givenparameter vector P = (p1, . . . , pn)

� ∈ Rn, the components of the gradient of a target

function J : Rn → R by the difference quotients

∂J

∂pi

(P ) ≈ J (P + hei) − J (P )

h(1 ≤ i ≤ n), (1)

where ei the ith unit vector and h is a scalar step size. As can be seen in the approx-imation (1), the cost function J (·) has to be calculated once at point P and furthern times at (P + hei) for 1 ≤ i ≤ n. This results in (n + 1) cost function evaluations.Hence, the computational effort for the gradient approximation using Finite Differ-ences is proportional to the number n of design variables. Therefore, this method isnot advisable if the computation of the cost function is extremely expensive or if thereare many design variables. Furthermore, the computed gradient entries are not exact.This fact can be derived easily from the truncated Taylor expansion

J (P + hei) = J (P ) + ∂J

∂pi

(P )h + 1

2

∂2J

∂2pi

(P )h2 + O(h3)

yielding the estimate

∂J

∂pi

(P ) = J (P + hei) − J (P )

h− 1

2

∂2J

∂2pi

(P )h + O(h2). (2)

Page 3: Efficient Optimization of an Airfoil

Efficient aerodynamic shape optimization by structure exploitation

Hence, if h is chosen too large, the first and higher order terms on the right handside of (2) would have a large impact on the quality of the approximation in (1). Thismeans on the one hand, that h has to be chosen relatively small. On the other hand,if h is chosen too small, the subtraction J (P + hei) − J (P ) is very error intensiveand would result in numerical noise. Therefore, the step length h has to be manuallytuned with respect to the cost function, parameterization and used geometry. A cor-responding study illustrating the difficulties originating from the choice of the steplength h is included in Sect. 4 on the numerical results. As far as the drawbacks ofFD are concerned, one might also take a look at Griewank and Walther (2008).

The second alternative to provide gradient information is the continuous adjointapproach. This method has been first used in aerodynamic shape optimization byJameson in his works on potential equations (Jameson 1988) and later also for theEuler equations (Jameson and Reuther 1994) as well as Navier-Stokes (Jameson etal. 1998). Its main advantage over the finite differences is a significant speed increasebecause the corresponding numerical effort is independent of n, i.e., the number ofdesign variables. However, the implementation of the continuous adjoint approachmay be very time-consuming and error prone.

As a third method to provide derivative information, one may use AD which isa comparatively new field of mathematical sciences. This technique is based on theobservation that various elementary operations (like, +,−,∗, sin) build up the imple-mentation of the cost function as their concatenation. The derivative of each elemen-tary operation with respect to its arguments is easily calculated. Then the chain rulecan be applied to the overall concatenation to obtain the derivatives of the completefunction with respect to the input variables. Depending on the starting point of the dif-ferentiation process—either at the beginning or at the end of the respective chain ofconcatenations—one distinguishes between the forward mode and the reverse modeof AD. Using the reverse mode of AD, gradients can be computed very accuratelyat a computational cost that is independent of the number of input variables. A com-prehensive introduction to AD can be found in Griewank and Walther (2008). Theuse of reverse mode AD to generate discrete adjoint CFD solvers is covered e.g. inSchlenkrich et al. (2008).

Analyzing the values computed with the reverse mode of AD, it can be seenthat this technique forms a discrete analog to the continuous adjoint method. How-ever, in contrast to continuous adjoint methods, the calculation of the derivativescan be automated for a wide range of programmed function evaluations such thattime consuming programming efforts can be avoided. This fact constitutes one ad-vantage of automatic differentiation in comparison to the continuous adjoint ap-proach. We will exploit this property for most parts of the design chain. For the flowsolver, we will combine AD with an advanced derivative calculation for iterativeprocesses to facilitate an efficient derivative calculation for this part of the designchain.

This paper has the following structure: In Sect. 2, we describe the considered de-sign chain in more detail. Section 3 contains a comprehensive discussion of the dif-ferentiation of the whole design chain and the consequences for an efficient derivativecalculation. The numerical results including a detailed discussion of the optimizationprocess are presented in Sect. 4. Finally, we present some conclusions in Sect. 5.

Page 4: Efficient Optimization of an Airfoil

N. Gauger et al.

2 The design chain

The task in aerodynamic shape optimization is to modify the design vector P ∈ Rn

and its dependent shape such that an aerodynamic target function is minimized. Toevaluate the target function at a given parameterization, one may deform a static ini-tial shape or surface mesh and its dependent computational grid based on the parame-terization. Subsequently, the flow around the airfoil and the considered target functionare evaluated. Each of these computational steps comprises a substantial amount ofoperations performed during its evaluation. Since the details of the correspondingcomputational chain have an enormous influence on the derivative calculations, wewill discuss the layout of the design chain in this section in detail. One typical sce-nario is shown in Fig. 1. The actual implementation including information about thedimensions of the computed objects is shown in Fig. 2.

We start with a fixed initial surface grid and a corresponding fixed mesh aroundthe airfoil in the considered domain. This initial configuration is denoted by m0 ∈ R

q

(see Fig. 2). In a next step we perform a decomposition of the airfoil in its camberlineand thickness distribution along the camberline. Hereby, the thickness distributionis kept constant. The initial camberline cam(0, t) is deformed by a set of n basisfunctions hi,b , scaled by the components of the design vector P = (pi) ∈ R

n. Asbasis functions we have chosen Hicks-Henne functions, which are widely used inairfoil optimization. The Hicks-Henne functions are defined as

hi,b : [0,1] → [0,1] : hi,b(t) = (sin(πtlog 0.5log ti ))b, ti = i

n + 4,

Fig. 1 Layout of entire design chain

Fig. 2 Implementation of entire design chain

Page 5: Efficient Optimization of an Airfoil

Efficient aerodynamic shape optimization by structure exploitation

where b is fixed at 3.0. The resulting deformed camberline cam(P, t) reads

cam(P, t) = cam(0, t) +n∑

i=1

pihi,b(t).

Hence, the design vector P ∈ Rn defines a deformation of the surface grid denoted

by ds ∈ Rl in Fig. 2. The surface deformation is performed by the tool defgeo which

provides deformations based on Hicks-Henne functions as well as cosine functions.The additional tool difgeo computes the difference vectors of the original surfacecompared to the transformed surface obtained by defgeo.

After the deformation of the surface, the computational mesh in the considereddomain has to be adapted. This deformation should be related to the changes of thesurface. For our numerical results, we used the volume spline method by Hounjetet al. (1995), which can be seen as a general interpolation approach. The resultingdeformed mesh is denoted by m ∈ R

q in Fig. 2. The grid deformation within ourdesign chain is done by the tool meshdefo using a public domain linear equationssolver to compute the required coefficients of the interpolation procedure. Note, thatwe only deform the grid instead of generating a new computation grid at each stepfor each modified surface since this would be very expensive in terms of computationtime.

The flow x ∈ Rp around the deformed airfoil can be modeled by the Euler equa-

tions describing compressible inviscid flows. As these equations cannot be easilysolved numerically due to the appearance of high nonlinearities, one usually usesquasi-unsteady formulations, which are solved by explicit finite volume schemesstabilized by artificial dissipation, and Runge-Kutta time integration. These pseudotime-stepping schemes are most efficient in combination with geometric multigridtechniques (Swanson and Turkel 1997).

In a Cartesian coordinate system (y1, y2), one has to integrate the partial differen-tial equation

∂x

∂t+ ∂f

∂y1+ ∂g

∂y2= 0 (3)

in the flow domain � ⊂ R2 where

x(t, y1, y2) =

⎜⎜⎝

ρ

ρu

ρv

ρE

⎟⎟⎠ , f (t, y1, y2) =

⎜⎜⎝

ρu

ρu2 + p

ρuv

ρuH

⎟⎟⎠ ,

g(t, y1, y2) =

⎜⎜⎝

ρv

ρuv

ρv2 + p

ρvH

⎟⎟⎠ .

Page 6: Efficient Optimization of an Airfoil

N. Gauger et al.

Here, ρ is the density, v,u are the velocity components, E is the internal energy andH the enthalpy. For a perfect gas, the pressure p is given by

p = (γ − 1)ρ

(E − 1

2(v2 + u2)

),

where γ is the ratio of specific heats and

ρH = ρE + p.

The pressure p on the surface of the airfoil is usually transferred into the dimension-less pressure coefficient

Cp := 2(p − p∞)

γM2∞p∞,

where M∞ is the free stream Mach number. Then, the coefficient Cp is used to defineother coefficients as the drag and lift coefficients given by

CD := 1

Cref

∂�wall

Cp(ny1 cosα + ny2 sinα)dS

and

CL := 1

Cref

∂�wall

Cp(ny2 cosα − ny1 sinα)dS,

where α denotes the angle of attack and Cref the area of airfoil.The numerical solution of (3) is computed by the DLR code TAUij. This flow solver

is a quasi 2D version of TAUijk (Heinrich 2006), which again is based on a cell cen-tered developer version of the DLR TAU code (Widhalm and Rossow 2004). TAUijsolves the Euler equations describing compressible inviscid flows. For the spatial dis-cretization the MAPS+ (Rossow 2000) scheme is used. To achieve second order accu-racy, gradients are used to reconstruct the values of variables at the cell faces. A slipwall and far field boundary conditions are applied. For the pseudo time-stepping, weemployed a fourth-order Runge-Kutta scheme. To accelerate the convergence, localtime stepping, explicit residual smoothing and a multigrid method are used. The codeTAUij is written in C and comprises approximately 6000 lines of code distributed overseveral files.

When considering the entire design chain, one has to take the dimensions of theinvolved objects into account. The size of the design vector is usually comparativelysmall. For our numerical tests we use n = 20. The target function value is a realnumber, whereas the remaining objects m0, ds,m,x are of really large scale result-ing in a demanding optimization task. Additionally, not only the size but also theimplemented approach forms a challenge for the derivative calculation. From a math-ematical point of view, the pseudo time-stepping described above can be interpretedas a so-called fixed point iteration

xk+1 = G(xk,m) (4)

Page 7: Efficient Optimization of an Airfoil

Efficient aerodynamic shape optimization by structure exploitation

generating a sequence {xk} that converges at least linearly. This approach is frequentlyused in aerodynamics, see, e.g., Kroll et al. (2001, 2000).

The limit of the sequence {xk} is the desired quasi-steady state x∗ fulfilling thefixed point equation

x∗ = G(x∗,m). (5)

In our context of flow calculations, G denotes one Runge-Kutta step of the pseudotime integration and m is the high dimensional deformed computational mesh.

Now suppose that ‖ dGdx

(x∗,m)‖ < 1 holds for any pair (x∗,m) satisfying (5).Then, there exists a differentiable function φ : R

q → Rp , such that x = φ(m) =

G(φ(m),m), where the flow φ(m) is a fixed point of G for a given mesh m inour case. To optimize the system described by the flow x = φ(m) on the mesh m,derivatives of φ with respect to m are of particular interest. However, this derivativeinformation is only one part of the required gradient ∂J (x(P ))/∂P . Using the chainrule, one obtains

∂J (x(P ))

∂P= ∂J (x(P ))

∂x(P )· ∂x(P )

∂m(P )· ∂m(P )

∂ds(P )· ∂ds(P )

∂P. (6)

Note that the first term on the right hand side corresponds to the differentiation ofthe target function, the second term results from the differentiation of the fixed pointiteration computed by TAUij, the third term stems from the differentiation of the meshdeformation (meshdefo) and finally the fourth term originates from the differentiationof the deformation of the surface computed by difgeo as well as defgeo. In the nextsection, we will discuss appropriate approaches that allow an efficient evaluation ofthe entire gradient ∂J (x(P ))/∂P . In addition to these advanced differentiation tech-niques we will employ a multilevel parameterization, realized by nested grids thatbecome finer and finer. This approach allows an efficient optimization for the entiredesign chain as described in detail in Sect. 4.

3 Efficient derivative computation for the design chain

The technique of automatic differentiation (AD) offers an opportunity to providederivative information of any order for a function F : R

N → RM , x �→ F(x), eval-

uated by a computer program within working accuracy. Over the last decades, ex-tensive research activities lead to a thorough understanding and analysis of the basicmodes of AD, where the complexity results are based on the operation count OF ofthe underlying vector function F . Here, we sketch only the most important results.For a general vector-valued function y = F(x) ∈ R

M with x ∈ RN , the scalar forward

mode yields the product y ≡ F ′(x)x for a given direction x. Based on a quite generalcomplexity measure for memory accesses, additions, multiplications and nonlinearoperations, one can show that the operation count for computing y can be boundedabove by the operation count OF for computing F(x) times a small constant cf with2 ≤ cf ≤ 2.5 (Griewank and Walther 2008).

Page 8: Efficient Optimization of an Airfoil

N. Gauger et al.

Applying the reverse mode of AD, the derivative values are propagated during abackward sweep. Hence, after a function evaluation, one starts computing the deriva-tives of the dependents with respect to the last intermediate values and traverses back-wards through the evaluation process until the independents are reached. The scalarreverse mode of AD yields the product x� ≡ y�F ′(x) for a given weight y ∈ R

M .One can show that the computational effort for evaluating x is bounded above byOF times a small constant cr with 3 ≤ cr ≤ 4 (Griewank and Walther 2008). Hence,for a scalar-valued function F the operation count for computing the gradient ∇F

is independent of N . This result is known as the cheap gradient result. The memoryrequirement of the basic reverse mode is proportional to the time needed to evaluatethe function F itself.

Besides the theoretical foundation, numerous AD tools have been developed, e.g.,ADOL-C (Griewank et al. 1996), TAF (Giering and Kaminski 1998), Tapenade (Has-coët and Pascual 2004), for the automatic differentiation of Fortran and C/C++ codes.Several AD tools have matured over the past years to a state that they are able to com-pute reliable derivatives of large Fortran and C/C++ codes. The achieved progress isillustrated for example by the proceedings of the regularly international conferenceson AD, see, e.g., Bücker et al. (2005), Corliss et al. (2001). Additional informationabout tools and literature on AD can be found on the web-page of the AD communitywww.autodiff.org. In the context of optimal control problems, the forward mode ofAD can be seen as a discrete version of the sensitivity approach. The reverse mode ofAD forms a discrete adjoint related to the continuous adjoint equation.

For the optimization of the entire design chain, we have to consider the gradients

∂J (x(P ))

∂x(P )∈ R

p (7)

∂J (x(P ))

∂m(P )≡ ∂J (x(P ))

∂x(P )︸ ︷︷ ︸∈Rq

· ∂x(P )

∂m(P )︸ ︷︷ ︸∈Rq×q

∈ Rq (8)

∂J (x(P ))

∂ds(P )= ∂J (x(P ))

∂m(P )︸ ︷︷ ︸∈Rq

· ∂m(P )

∂ds(P )︸ ︷︷ ︸∈Rq×l

∈ Rl ,

∂J (x(P ))

∂P= ∂J (x(P ))

∂ds(P )︸ ︷︷ ︸∈Rl

∂ds(P )

∂P︸ ︷︷ ︸∈Rl×n

∈ Rn

(9)

Due to the structure of the target function J (x), the deformed mesh m(P ) and thedeformed surface ds(P ), the gradient (7) can be evaluated efficiently by the reversemode of AD. The same holds for the gradients (9) as soon as the gradient (8) isavailable.

As discussed already in the previous section, the computation of the flow x can beinterpreted as a fixed point iteration. Differentiating this iterative process by AD as ablack box is in principle possible but requires a tremendous amount of runtime andmemory. Hence, it is advisable, and in our case of flow computations in aerodynamicindispensable, to exploit the iterative structure and the character of the iteration forthe derivative computation. For this purpose, we apply the chain rule of differentiation

Page 9: Efficient Optimization of an Airfoil

Efficient aerodynamic shape optimization by structure exploitation

to the fixed point equation (5) yielding

dm(m) = dx∗

dm= ∂G

∂x(x∗,m)

dx∗dm

+ ∂G

∂m(x∗,m). (10)

This formula is again a fixed point equation for the evaluation of dφdm

(m) = dx∗dm

. An-

alytically the derivative dφdm

(m) can be expressed as

dm(m) =

(I − ∂G

∂x(φ(m),m)

)−1∂G

∂m(φ(m),m). (11)

Using (10) and (11), we obtain for a given weight vector x ∈ Rp the identity

xT dx∗dm

= xT

(I − ∂G

∂x(x∗,m)

)−1∂G

∂m(x∗,m).

Setting ζ T := xT (I − ∂G∂x

(x∗,m))−1 yields the fixed point equation

ζ T∗ = ζ T∗∂G(x∗,m)

∂x+ xT

for the desired gradient information (8). Note, that ξ∗ cannot be computed directlysince calculating the inverse is extremely expensive. However, we can derive fromthe last equality the iteration

(ζ Tk+1, m

Tk+1

)=

(ζ Tk

∂G(x∗,m)

∂x+ xT , ζ T

k

∂G(x∗,m)

∂m

)

= ζ Tk G′(x∗,m) +

(xT ,0T

),

(12)

which has been analyzed already in Christianson (1994). There, it was shown that theadjoint fixed point iteration (12) converges to the unique fixed point ζ T∗ = xT (I −∂G∂x

(x∗, u))−1 if the original fixed point iteration is contractive. Hence, we obtain as

limit the required gradient m∗ = ζ T∗ ∂G∂m

(x∗,m) = xT dx∗dm

. As proven in Christianson(1994), the uniform rate of convergence of the derived fixed point iteration (12) forthe gradient computation equals the asymptotic rate of convergence of the originalfixed point iteration (4). Using not a black-box approach but a slightly advancedtechnique, AD provides for the fixed point iteration (4) given as a computer programan efficient approximation of the desired gradient (8) based on the iteration (12). Forthis purpose, we apply a two-phase approach, i.e., a splitting of the original iteration(4) and the derivative iteration (12). Details about the specific implementation of thedifferentiated fixed point iteration can be found in Schlenkrich et al. (2008).

4 Numerical results

The RAE2822 profile serves as a test case for our multilevel adjoint-based optimiza-tion approach. The Mach number is set to 0.73 and the angle of attack is 2◦. We use

Page 10: Efficient Optimization of an Airfoil

N. Gauger et al.

Fig. 3 Pressure distributionaround RAE2822 airfoil oncoarse mesh

Table 1 Mesh independency study

mesh lift CL drag CD

coarse 8.1417936005e-01errorrel (CL) = 2.4%

9.0801956251e-03errorrel (CD) = 11.6%

medium 8.3446933352e-01errorrel (CL) = 0.6%

8.1328650792e-03errorrel (CD) = 1.6%

fine 8.3978549504e-01 8.0037350287e-03

20 Hicks-Henne functions for the parameterization of the airfoil shape as describedin Sect. 2. Numerical simulations are performed with 3 different grids with 161 × 33(coarse), 321 × 65 (medium) and 641 × 129 (fine) grid points. Figure 3 shows thecoarse grid with the pressure distribution of the initial RAE2822 airfoil. It can be ob-served that there is a severe shock on the suction side of the airfoil at x/c ≈ 0.6. Theelimination of this shock leads to drag reduction and is the subject of the optimizationtask.

Since we aim at optimizing the physics and not the mesh quality, we perform amesh independency study first. On each mesh level we compute the drag coefficientwith an accuracy of 10−6 w.r.t. the drag coefficient. The simulation results obtainedfor the three different grid levels show that the solution is already grid independentfor the medium grid (see Table 1). This can be concluded from the fact that the rel-ative error between the fine and the medium grid is less than 2% for the lift as wellas the drag coefficient, which is the typical physical error range for the accuracy offlow solvers. Therefore, the medium grid is the best compromise between physicalresolution and numerical efficiency and therefore the choice for numerical optimiza-tion.

Page 11: Efficient Optimization of an Airfoil

Efficient aerodynamic shape optimization by structure exploitation

Fig. 4 Finite differences forvarying step sizes h on themedium grid

Fig. 5 Comparison between FDgradient and AD gradient formedium grid

4.1 Gradient calculation

To validate the gradients computed by AD as described in the previous section, FiniteDifferences are used. For this purpose, the step size has to be tuned for the coarse gridas well as for the medium grid, respectively. This is illustrated in Fig. 4. Analyzingthese Finite Differences for the two considered grids and all 20 parameters, a stepsize of 10−3 seems to be a good choice.

For calculating the gradient by AD, the iteration (12) was stopped as soon as theL2-norm of the difference of two consecutive iterates ζk and ζk+1 is smaller than10−6.

Figure 5 illustrates the gradient computed with Finite Differences in comparisonwith the gradient computed with AD. As can be seen, the obtained values are in goodagreement, which validates the AD approach and shows as well that the chosen stepsize for the finite differences is acceptable.

Since there are 20 parameters to be optimized, the runtime required for the gradi-ent calculation with Finite Differences equals at least 21 function evaluations. It was

Page 12: Efficient Optimization of an Airfoil

N. Gauger et al.

shown in Schlenkrich et al. (2008) that the runtime of the AD-based gradient calcu-lation is less than 9 function evaluations on an appropriate computing platform withfast memory access. Hence, using AD the runtime needed for the computation of thegradient is more than halved.

4.2 Optimization process

To reduce the overall computational costs, we apply a multilevel strategy: First, weperform an optimization on the coarse grid level. Then we are extrapolating the opti-mal coarse grid solution to the next finer middle grid level, on which we observed gridindependency. Then we continue with the optimization on the medium mesh level.For the optimization, we employ the nonlinear interior point code IPOPT (Wächterand Biegler 2006), which has been successfully used in many different engineeringapplications, see, e.g., Barttfeld et al. (2006) and Biegler and Zavala (2009). IPOPTis available as open source package at the COIN-OR webpage.

The lift coefficient of the airfoil is at least to be kept constant. Therefore, weintroduce an inequality constraint to maintain the lift coefficient CLi of the initialRAE2822 airfoil for i = 1,2 where CL1 is obtained on the coarse grid and CL2 onthe medium grid yielding a constrained optimization problem of the form

minp

J (x) = CD s.t. CL ≥ CLi, (13)

where the related constraint gradients have to be provided for the optimization.Hence, gradients of the lift coefficient CL with respect to the Hicks-Henne param-eters have to be computed. This can be easily implemented in our AD framework bydeclaring the lift coefficient as dependent variable instead of the drag coefficient inthe differentiation chain and compiling it as a separate program. By using the deriva-tive information generated by the adjoint solver, a new set of Hicks-Henne parametersP is computed by the optimizer. This new design vector yields a new deformed sur-face. The corresponding deformed grids are generated by the design chain introducedin Sect. 2. One should also note that the thickness distribution of the airfoil is keptconstant by using the Hicks-Henne parameterization, preventing the airfoil becomingthinner to reduce the drag.

After 32 iterations the pressure distribution reaches a desired profile as illustratedin Fig. 6. It shows the distribution of the pressure coefficient Cp for the optimizedgeometry based on the coarse grid. Note that, for this first optimization cycle the tar-get lift coefficient is chosen as the lift coefficient CL1 of the initial RAE2822 profilecalculated for the coarse grid. It can be seen that the shock occurring for the ini-tial RAE2822 profile is completely eliminated in the optimized geometry. Figure 7illustrates that a substantial drag reduction is achieved and the lift coefficient staysconstant as expected.

Using this optimized geometry obtained for the coarse grid for a flow calculationon the medium grid, we observe again a shock as illustrated in Fig. 8, which confirmsthe mesh dependence of solutions on the coarse mesh. The persisting shock on thecoarse grid optimized airfoil geometry indicates that a further reduction of the drag ispossible. Therefore, we continued the optimization with the flow calculation on the

Page 13: Efficient Optimization of an Airfoil

Efficient aerodynamic shape optimization by structure exploitation

Fig. 6 Pressure distributionsfor the initial and optimizedairfoil geometries for coarse grid

Fig. 7 Optimization history of drag (CD ) and lift (CL) coefficient during optimization on coarse grid

Fig. 8 Pressure distributionsfor the initial and “optimized”airfoil geometries evaluated onmedium grid

medium grid and the right-hand side of the constraint in (13) now set to CL2. For thispurpose, we start the optimization with IPOPT using the optimized geometry of the

Page 14: Efficient Optimization of an Airfoil

N. Gauger et al.

Fig. 9 Pressure distributions forthe initial and optimized airfoilgeometries for medium grid

Fig. 10 Initial and optimizedairfoil geometries on mediumgrid

coarse grid as the initial shape but performing the function and gradient calculationsas well as the constraints evaluations with the medium grid instead of the coarse grid.

Figures 9 and 10 show the pressure distribution of the optimized geometry on themedium grid and the corresponding airfoil geometry. Furthermore, it can be seen thatthe shock on the medium mesh has been totally removed again.

Figure 11 illustrates the change in lift and drag coefficients during the optimizationprocess. After 32 iterations, we switch to the medium sized grid resulting in a furtherreduction of the drag coefficient. Additionally, the lift coefficient increases due to thefact that the lower limit CL2 for the lift coefficient is slightly larger for the mediumsized grid than the lift coefficient CL1 on the coarse grid.

5 Conclusion

The present paper focuses on the efficient optimization for a complete design chain inaerodynamics. Therefore, not only the flow solver but the entire design chain is con-sidered, where the derivatives for the several design steps have to be computed andcombined in an appropriate manner. For this purpose, we employ automatic differ-entiation to the complete design chain to provide consistent discrete adjoint informa-

Page 15: Efficient Optimization of an Airfoil

Efficient aerodynamic shape optimization by structure exploitation

Fig. 11 Optimization history of drag (CD ) and lift (CL) coefficient during optimization using multilevelapproach

tion. Here, especially the structure exploitation of the fixed point iteration to computethe flow field yields an efficient computation of the required gradient information.The optimization process itself is based on a multilevel strategy to guarantee physicalmeaningful optima and a reasonable decrease of the runtime needed for optimiza-tion. Hence, discrete adjoint information may be seen as one important ingredient forcalculus-based methods in aerodynamic optimization tasks.

Acknowledgement The authors gratefully acknowledge the support of the DFG Priority Program 1253entitled Optimization with Partial Differential Equations.

References

Barttfeld M, Alleborn N, Durst F (2006) Dynamic optimization of multiple-zone air impingement dryingprocesses. Comput Chem Eng 30:467–489

Biegler LT, Zavala VM (2009) Large-scale nonlinear programming using IPOPT: An integrating frame-work for enterprise-wide dynamic optimization. Comput Chem Eng 33:575–582

Bücker M, Corliss G, Hovland P, Norris B, Naumann U (eds) (2005) Automatic differentiation: applica-tions, theory, and tools. Springer, Berlin

Christianson B (1994) Reverse accumulation and attractive fixed points. Optim Methods Softw 3:311–326Corliss G, Faure C, Griewank A, Hascoët L, Naumann U (eds) (2001) Automatic differentiation: from

simulation to optimization. Springer, New YorkGiering R, Kaminski T (1998) Recipes for adjoint code construction. ACM Trans Math Softw 24:437–474Griewank A, Walther A (2008) Evaluating derivatives: principles and techniques of algorithmic differen-

tiation. SIAM, PhiladelphiaGriewank A, Juedes D, Utke J (1996) ADOL-C: a package for the automatic differentiation of algorithms

written in C/C++. ACM Trans Math Softw 22:131–167Hascoët L, Pascual V (2004) Tapenade 2.1 user’s guide. Technical report 300, INRIAHeinrich R (2006) Implementation and usage of structured algorithms within an unstructured CFD-code.

Notes on numerical fluid mechanics and multidisciplinary design, vol 92Hounjet MHL, Prananta BB, Zwaan R (1995) A thin layer Navier-Stokes solver and its application for

aeroelastic analysis of an airfoil in transonic flow. In: Proceedings international forum on aeroelas-ticity and structural dynamics, pp 1.1–1.9

Jameson A (1988) Aerodynamic design via control theory. J Sci Comput 3(3):233–261Jameson A, Reuther J (1994) Control theory based on airfoil design using the Euler equations. In: AIAA

proceedings 94-4272-CPJameson A, Martinelli L, Pierce NA (1998) Optimum aerodynamic design using the Navier-Stokes equa-

tions. Theor Comput Fluid Dyn 10(1–4):213–237

Page 16: Efficient Optimization of an Airfoil

N. Gauger et al.

Kroll N, Gerhold Th et al (2001) Parallel large scale computations for aerodynamic aircraft design withthe German CFD system MEGAFLOW. In: Proceedings of ‘Parallel CFD 2001’, Egmond aan Zee

Kroll N, Rossow CC, Becker K, Thiele F (2000) The MEGAFLOW project. Aerosp Sci Technol 4:223–237

Oyama A, Liou M-S, Obayashi S (2004) Transonic axial-flow blade optimization: Evolutionaryalgorithms/three-dimensional Navier-Stoke solver. J Propuls Power 20(4):612–619

Periaux J, Deconinck H (eds) (2006) Introduction to optimization and multidisciplinary design. Lectureseries, vol. 2006-03. von Karman Institute for Fluid Dynamics, Sint-Genesius-Rode. ISBN 2-930389-65-6

Rossow C-C (2000) A flux splitting scheme for compressible and incompressible flows. J Comput Phys164:104–122

Schlenkrich S, Walther A, Gauger NR, Heinrich R (2008) Differentiating fixed point iterations withADOL-C: Gradient calculation for fluid dynamics. In: Bock HG, Kostina E, Phu HX, Rannacher R(eds) Modeling, simulation and optimization of complex processes—proceedings of the third inter-national conference on high performance scientific computing 2006, pp 499–508

Swanson RC, Turkel E (1997) Multistage scheme with multigrid for Euler and Navier-Stokes equations(components and analysis). Technical Report 3631, NASA

Wächter A, Biegler L (2006) On the implementation of an interior-point filter line-search algorithm forlarge-scale nonlinear programming. Math Program 106(1):25–57

Wang JF, Periaux J, Sefrioui M (2002) Parallel evolutionary algorithms for optimization problems inaerospace engineering. J Comput Appl Math 149(1):155–169

Widhalm M, Rossow C-C (2004) Improvement of upwind schemes with the least square method in theDLR TAU code. Notes Numer Fluid Mech 87