You are on page 1of 196

!

" #

$ %$& '
( ) % '%$' %)
* + * * * , %$& &
! " # $ % # # $ $ & '$
( ) % $&

* % +& ,& - . $ # * /$ + 0 &*


&
!1,& 21 & & 3/4- 5!6,, 6 1!65&

7 6 $ 0 8
# $ # ( $ $ % # #
& '$ # $ # # &
9$ $ $ % # $ #
% # $ # # $ : $ #
$ $ # & 3 $ ## $
; $ $ $ % # $ # %
$ # $ # & '$ % $ $ ) :
# # ( 0 $ 6 # 6
$ $ 6 6 $ # $ $ # $
0 & '$ # $ $ $ #
: % $ $ $ % # $
# & '$ ; # $ ) : $ 6 6
# # $ % $ # 1 $
) % % #8 /( $ &
. $ : $ $ # $ $
# $ 0 & $
< 4 $ $ # # $ # $
$ : &
3 $ # $ $ 0
% $ $ 0 ## : #
9 ( & '$ $ # # $
0 % # (& * $ : $
# $ % # $ $6# ( :
% $ $ &
'$ $ # ; $ $ # ($ % $
) : ( $ $ 6 0 : ( $ $
$ 6 6 # $ # (& '$ # ##
( $ % $ %$ < &

8 $ 0 ; : % 6
# 6 $ % $ #
# (

! " # " $ % &&'" "


()'*+,* "

=+ * % ,

3//- ! ,!6 !
3/4- 5!6,, 6 1!65
" " " " 6 , >$ " &? & @ A " " " " 6 , B
To Anita, Mikael and Anna
List of Papers

This thesis is based on the following papers, which are referred to in the text
by their Roman numerals.

I Amoignon, O., Berggren, M. (2005) Adjoint of a median-dual


finite-volume scheme applied to 2D and 3D transonic aerody-
namic shape optimization. Submitted to Computers and Fluids.
II Amoignon, O., Pralits, J.O., Hanifi, A., Berggren, M.,
Henningsson, D.S. (2005) Shape optimization for delay of
laminar-turbulent transition. AIAA Journal, accepted for
publication.
III Jackobson, S., Amoignon, O. (2005) Mesh Deformation using
Radial Basis Functions for Gradient-based Aerodynamic Shape
Optimization. Submitted to Computers and Fluids.
IV Amoignon, O. (2005) Moving Mesh Adaptation for
Aerodynamic Shape Optimization. Submitted to Journal of
Computational Physics.

v
Contents

1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1 A short history of aerodynamic design . . . . . . . . . . . . . . . . . . . 1
1.1.1 Before modern aviation . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1.2 Before modern computers . . . . . . . . . . . . . . . . . . . . . . . . 2
1.2 Design with
Computational Fluid Dynamics . . . . . . . . . . . . . . . . . . . . . . . . 2
1.2.1 From inverse design to optimization . . . . . . . . . . . . . . . . . 2
1.2.2 Adjoint equations in CFD . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2.3 Automatic Differentiation . . . . . . . . . . . . . . . . . . . . . . . . 4
2 Summary of papers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.1 Paper I . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.1.1 Discrete sensitivities . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.1.2 Edge-based finite-volume discretization . . . . . . . . . . . . . . 6
2.1.3 Optimization in 2D and 3D . . . . . . . . . . . . . . . . . . . . . . . 7
2.2 Paper II . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.2.1 Disturbance energy and shape gradient . . . . . . . . . . . . . . 11
2.2.2 Parameterization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.2.3 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.3 Paper III . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2.3.1 Geometrical interpolation . . . . . . . . . . . . . . . . . . . . . . . . 14
2.3.2 Performances . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
2.3.3 Gradient-based shape optimization . . . . . . . . . . . . . . . . . 16
2.4 Paper IV . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
2.4.1 Moving mesh adaptation . . . . . . . . . . . . . . . . . . . . . . . . . 17
2.4.2 A 2D inverse problem . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
2.4.3 Solution algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
3 Perspectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
3.1 From Euler to RANS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
3.2 Error estimates in mesh adaptation . . . . . . . . . . . . . . . . . . . . . 21
3.3 Interpolation of scattered data . . . . . . . . . . . . . . . . . . . . . . . . . 22
3.4 Shape parameterization with constraints . . . . . . . . . . . . . . . . . 22
4 Summary in Swedish:
Numeriska metoder för aerodynamisk formoptimering . . . . . . . . . . 25
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

vii
1. Introduction

"Without the knowledge of the theory of the air flow around airfoils it is well-
nigh impossible to judge or interpret the results of experimental work intelli-
gently or to make other than random improvements at the expense of much
useless testing."

Theodore Theodorsen, NACA TR-411, 1931

1.1 A short history of aerodynamic design


1.1.1 Before modern aviation
Flying has remained a mystery to mankind as long as the flight of birds found
no explanation. Some of it could be eluded by one of Johan Bernoulli’s (1667-
1748) discoveries, that the pressure in a fluid reduces as the speed increases.
Isaac Newton’s laws (1643-1727) are equally advocated to explain lifting. The
application of his laws yields, simply stated, that the deviation downward of
the air flow around a wing is an effect of a force downward oriented and
created by the shape of the wing. Therefore, this force will be equilibrated by
a reaction force applied upward by the air on the wing.
But lack of physical explanations did not discourage inventors, among whom
we find Leonardo Da Vinci (1452-1519) who drew sketches of flying ma-
chines mostly inspired from bird’s morphology. But none of his machines
ever flew, mostly because a man would not have the strength to power the
mechanisms he designed, and also because his understanding of flying was
not accurate.
The history of aviation began in the second half of the nineteenth century. In
1853, Great Britain, Sir George Cayley was first to fly a glider, followed by
Otto Lilenthal (1848-1896) in Germany, whose studies and experiments on
stability and aerodynamics influenced followers, see [30]. Among them, the
Wright brothers, U.S.A., are the most famous. They succeeded with the first
controlled flight of an engine powered airplane in 1903. The two brothers
also conducted wind tunnel tests on many wing profiles, thus inaugurating
experimental research on wing design.

1
1.1.2 Before modern computers
Following the Wright brothers, aeronautical engineers and designers
for decades improved the performance of airplanes without the help of
computers. Experimental work, through empirical laws as well as through
wind tunnel tests, has driven this progress. Wind tunnel testings are still the
ultimate step to go through before flight testings. However, the precursor
of computer aided design is the human ability in mathematical modeling
that allowed the prediction of rather complex flows around two dimensional
geometries by help of the theory of potential flows and boundary layers.
Using potential flow theory and conformal mapping, Theodorsen [41], in
1931, calculated the velocity in an inviscid and incompressible fluid around
airfoils. The solution of the inverse design problem, which aims at finding the
shape if the pressure is given around the airfoil, is attributed to Lighthill [29],
in 1945, who used the above named conformal mapping. It is therefore the
real start for the numerical optimization of aerodynamic shapes, still without
requiring a massive amount of calculations.

1.2 Design with


Computational Fluid Dynamics
1.2.1 From inverse design to optimization
The method of Lighthill [29] was followed and developed by others [26].
However, the method of inverse designs supposes that the flow is known, at
least partially. This is a serious limitation, because the prescribed pressures or
velocities around the airfoil are not necessarily feasible solutions to the flow
equations [26].
An alternative is to formulate the inverse design as a problem of optimiza-
tion, where the target pressure pt on the surface Γ of an airfoil is approximated
as well as possible, for example by minimizing the cost function defined as
the integral of the quantity |pt − pΓ |2 on Γ. The formulation of the inverse
problem as an optimization problem avoids the difficulty to find feasible tar-
get pressures.
Gradient-based optimization may efficiently minimize the cost function
above, provided that the gradient of this function can also be calculated ef-
ficiently. Perturbation methods, such as divided differences, require as many
flow solutions as there are parameters of design. In an optimal control ap-
proach, the gradient can be calculated by solving once an adjoint equation
derived from the flow equations.
Design optimization using an optimal control approach has become popu-
lar in the last two decades in all fields of engineering. For a detailed presen-

2
tation of techniques of optimal shape design for systems governed by elliptic
equations, the reader may refer to a book by Pironneau [36]. For an intro-
duction focusing on aerodynamic shape optimization, the reader may refer to
Giles & Pierce [22].

1.2.2 Adjoint equations in CFD


Concerning optimization based on Computational Fluid Dynamics (CFD) cal-
culations, the use of the adjoint equations has become common in recent
years [2, 5, 6, 8, 9, 13, 17, 27, 31, 33, 38, 39, 40].
There are however different views on the application of the theory of op-
timal control in CFD [25]. In the so-called continuous approach, the ad-
joint equations and the expression of the gradient are derived from the Par-
tial Differential Equations (PDEs) that model the flow and from the exact
cost function, see [5, 17, 27, 39, 40]. The resulting expressions are then dis-
cretized. In the so-called discrete approach, the adjoint equations and gra-
dient expression are obtained from the discretized flow equations and cost
function [2, 9, 13, 33].
In terms of efficiency of the optimization, the discrete approach may be pre-
ferred because it can provide the exact gradient of the cost function being op-
timized. Otherwise, lack of accuracy may cause a failure of the optimization
algorithm in finding a descent direction. There are however some drawbacks
to the discrete approach, for example concerning the meaning of the adjoint
of artificial numerical fluxes like artificial viscosities [25]. Another positive
aspect of the discrete approach is that the boundary conditions of the adjoint
equations unfold naturally, whereas it may be difficult to formulate them when
using the continuous approach [34]. Discussion about the two approaches can
be found in a book by Gunzburger [25].
Results of aerodynamic shape optimization are obtained by the method of
discrete adjoint in [2, 15, 21, 31, 32, 34], but little is reported about the discrete
adjoint for the finite volume method used here. For results of aerodynamic
shape optimization by a continuous approach, the reader may refer to [5, 11,
16, 28, 39, 40].
The major difference between discrete and continuous approach is thus that
the numerical fluxes of the adjoint equations, in the discrete case, are im-
posed by the discretization of the flow equations. The unstructured type of
discretization used in the CFD code Edge [12] has become popular because
it allows an efficient calculation of the numerical fluxes on meshes that are
inexpensive to produce, even for complicated geometries. Concerning an in-
troduction to this discretization, we refer to Barth [3].
There are few studies [2, 13, 22] that have been concerned by developing
the method of adjoint for unstructured finite-volume schemes similar to the

3
one used here. We do not find detailed expressions or derivations in those
references, unless at an abstract level, of the complete adjoint equations and
gradient expressions.

1.2.3 Automatic Differentiation


The tediousness involved in deriving the adjoint equations, by the discrete or
the continuous approach, together with accuracy issues, may be the reasons
that push forwards the developements of programs for the automated produc-
tion of derivatives [19, 7, 20, 24, 37]. Briefly described, software of Automatic
Differentiation (AD) produce a duplicated program, for example from the one
that calculates the discretized flow equations (CFD), in which the algebraic
expressions are symbolically differentiated.
There are, for the time being, some limitations to AD. For instance, the
memory requirements in the so-called reverse mode, which corresponds to an
adjoint solution, restricts the applicability for large problems [31].

4
2. Summary of papers

2.1 Paper I
This paper presents in details the derivation of the adjoint equations and the
gradient of the cost function with respect to the design parameters, when the
flow state is the solution of the discretized Euler equations in Edge [12]. These
expressions have been implemented and tested in order to enable optimization
of shapes in 2D and 3D, when the flow analysis is executed by solving the
compressible Euler equations on unstructured grids.

2.1.1 Discrete sensitivities


To become more familiar with the general idea behind the adjoint approach
applied to the discretized optimization problem presented in this paper, con-
sider first a simpler problem in the spirit of Giles & Pierce [22]. Let a cost
function J be linear with respect to the vector of state variables w,
J (w) = gT w , (2.1)

with g ∈ Rn given and w ∈ Rn subject to the state equation


Aw = Na , (2.2)

where a ∈ Rm is the vector of design variables, A ∈ Rn×n , and N ∈ Rn×m .


Assume that A is nonsingular. The reduced gradient of J , that is, the gradi-
ent of the mapping a 7→ J (w (a)), denoted ∇Ja , may be obtained by solving
the sensitivity equations of the state: given a variation of the control variable
δa, corresponding variation of the state δw is defined as the solution to the
sensitivity equations
A δw = N δa , (2.3)

which enables us to express the variation of the function J


δJ = gT δw ≡ gT A−1 N δa . (2.4)

Therefore, solving the sensitivity equations, once for each component of the
vector a, yields the gradient ∇Ja , component by component.

5
However, rewriting (2.4) as
T
δJ = NT A−T g δa , (2.5)

reveals that replacing A−T g in (2.5) by the adjoint state w∗ , defined as the
solution to
AT w∗ = g , (2.6)

gives an expression for ∇Ja ,


∇Ja = NT w∗ . (2.7)

The cost for computing the gradient by expression (2.7) is one costate so-
lution (2.6), instead of m solutions of the sensitivity equations (2.3) when
expression (2.4) is used.
The generalization to nonlinear state equations and nonlinear functions J is
straightforward:
• g is the vector of partial derivatives of the function J with respect to the
vector of the state variables w,
• A is the Jacobian matrix of the system of state equations with respect to the
state variables,
• N is the Jacobian matrix of the system of state equations with respect to the
control variable, which, in the formulation of Edge, is the set of data of the
median-dual mesh (nh ).

2.1.2 Edge-based finite-volume discretization


The derivation of the adjoint of the Euler equations discretized in the CFD
code Edge follows the ideas exposed in the previous section (§ 2.1.1). By
a perturbation technique, the cost function, as well as the system of Euler
equations, are linearized with respect to the flow variables and the mesh data.
However, the Jacobians are not available as matrices for efficiency reasons.
Therefore, the transposition of the Jacobians, which is the crucial step in order
to express the adjoint equations, is carried out through a discrete analogue of
integration by parts.
A crucial tool for the concise derivation of the edge-based scheme that as-
sembles of the numerical fluxes in the adjoint equation is Lemma 1, which
provides a relation between different ways of summing algebraic expressions
defined on unstructured meshes:

Lemma 1 Let G ≡ (V, A) be an oriented graph, in which V is the list of


vertices (i) and A is the list of edges (i, j). Let Ni , for each vertex i 6= j in V ,
be the list of vertices j in V such that there is an edge in A connecting i and j.

6
Given a list of edge-based data {eij , eji }ij∈A
~ , it holds that
XX X
eij = [eij + eji ] .
i∈V j∈Ni ~
ij∈A

The final expression of the gradient with respect to the data of the median-
dual mesh (the set of surface normal vectors associated with the dual control
volumes), is obtained from the definition of an adjoint equation like (2.6), and
the product of the Jacobian of the discretized Euler equations with respect to
the data of the median-dual mesh, the equivalent operation to (2.7).
The use of the median-dual grid requires a pre-processing of the element
mesh data in order to obtain the surface normals of the control volumes, also
called the dual data in the paper. In order to calculate the gradient with respect
to the primal grid, that is, with respect to the nodal coordinates, the chain rule
can be applied. As in the pre-processing, the element topology is needed
when applying the chain rule. The algorithm that is derived here calculates
the partial derivatives of the cost function with respect to the mesh coordinates
from the partial derivatives with respect to the dual mesh data.

2.1.3 Optimization in 2D and 3D


As an example of drag (CD ) minimization in 2D, the RAE 2822 airfoil is re-
designed at transonic speed, given here by the Mach number M∞ = 0.734,
and for an angle of attack α = 2.19o . The design parameters (224 parameters
in the numerical experiments shown here) specify the normal displacements
on the airfoil through the solution of a Quadratic Programming problem. This
parameterization [1] includes linear constraints on the geometry, like a con-
stant cross-section area, in addition to the fixed position of the trailing edge.
Lift and pitching moment coefficients are held constant by adding penalty
terms to the cost function. The results of this optimization are shown in
Figure 2.1. The pressure drag is reduced by 75 drag counts, while the lift and
pitching moment are kept within 1%, in comparison with the values for the
RAE 2822 airfoil. In a 2D inviscid compressible flow, the drag is due to the
presence of shocks. The shock is indeed efficiently smoothened at final design
(Figure 2.1).

7
0.08 1.5

1
0.04
0.5

−Cp
y/c

0 0

−0.5
−0.04
−1

−0.08 −1.5
0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1
x/c x/c

140 0.9

0.8
120
0.7

100
0.6
104 CD

0.5
80

0.4
60
0.3

40 0.2
0 10 20 30 40 50 0 10 20 30 40 50
iteration iteration

Figure 2.1: Upper left: RAE 2822 airfoil (solid) and final design (dashed). Upper
right: pressure coefficient on the RAE 2822 (solid) and on the final design (dashed).
Lower left: drag counts at each design (104 · CD ). Lower right: lift coefficient (trian-
gles) and pitching moment (circles) at each design.

8
An example of drag minimization in 3D is given by the re-design of the ON-
ERA M6 wing at Mach number M∞ = 0.8395 and angle of attack α = 3.06o .
In the example shown here, the parameterization consists of a decomposition
of the spanwise distribution of the camber, the twist, and the thicknesses, in
terms of splines. In this case (TCT-6s) the drag is reduced by about 30 drag

Figure 2.2: Case TCT-6s. Upper left: pressure contours on the ONERA M6 wing.
Upper right: pressure contours on the final design. Bottom: superposed geometry of
the ONERA M6 wing (grey, dark grey in BW) and of the final design (yellow, light
grey in BW).

counts, the lift varies of about 1% and the pitch varies with less than 0.02%.
The two shocks are visibly smoothened (Figure 2.2) and the vortex at the tip
is shifted downstream, which is known also to reduce the drag. The shape of
the final design is characteristic of all the tests that were carried out here on
the M6 wing. The local angle of attack is increased near the root of the wing
and decreased towards the tip of the wing. The changes in the local angle of
attack is a combination of the twist deformation, around the trailing edge, and
of the camber. There are, however, differences in the profiles of the wings

9
depending on the number of splines and depending on the type of the parame-
terization. These differences do not affect much the performances of the final
designs, meaning that all the design succeed to reduce the drag and maintain
the lift and pitch with about the same amplitudes.

10
2.2 Paper II
The aim of this paper is to extend the use of adjoint-based optimization de-
veloped for active laminar flow control [18] to natural laminar flow design.
The same optimal control approach as in Paper I is used, but instead of a cost
function that depends explicitly on the solution of the Euler equations, we in-
troduce a cost function that depends only implicitly on the Euler flow. The
cost function is the kinetic energy of one disturbance in the laminar boundary
layer on the upper part of an airfoil. In order to calculate the values of this
kinetic energy, the Euler equations are coupled to the mean flow equations in
the boundary layer (BLE) and the parabolized stability equations (PSE). Sec-
tion 2.2.1 presents the principle of the calculations of the disturbance kinetic
energy and of the calculation of the shape gradient of this energy. In order
to couple the three state equations, constraints on the possible shapes were
imposed through the parameterization as explained in Section 2.2.2. This
method of parameterization is the same than the one used in Paper I and was
proposed in [1]. The results obtained in this paper show that the reduction of
the energy of one disturbance efficiently reduces the energy of ’all’ unstable
disturbances, which is assumed to represent a delay of the transition of the
flow from laminar to turbulent in the boundary layer. Section 2.2.3 presents a
short discussion of those results.

2.2.1 Disturbance energy and shape gradient


The three state equations are sequentially coupled, and we neglect the viscous-
inviscid interactions. This assumption greatly facilitates the calculation of
the gradient by the adjoints of the Euler equations, boundary layer equation
and parabolized stability equation, see Figure 2.3. Furthermore, by analyzing
the growth of disturbances based on the pressure calculated by the Reynolds-
averaged Navier-Stokes equations, instead of the Euler equations, we could
verify that neglecting the viscous-inviscid interaction has small effects on our
results, see Section 2.2.3.

k k k
a y X Euler BLE PSE
k=k+1
k k k
Ja Jy J AEuler ABLE APSE
X

Figure 2.3: Flow chart for the case of minimizing the disturbance kinetic energy.

11
Airfoils
0.08

0.04

y/c
0

−0.04

−0.08
0 0.2 0.4 0.6 0.8 1
x/c

Figure 2.4: T11 - Comparison between initial (solid) and final design (dash).

2.2.2 Parameterization
Freezing a small part of the geometry of the airfoil in the neighborhood of the
stagnation point, that is, around the leading edge, was a necessary condition
for the coupling of the Euler equations with the equations that model the mean
viscous flow and the propagation of instabilities in the boundary layer. If
we had limited the study to the reduction of the disturbance kinetic energy,
it would have been sufficient to parameterize the upper part of the airfoil,
where the boundary layer analysis takes place, and keep the rest of the wing
fixed. However, our aim was to simultaneously reduce the kinetic energy of
the disturbance as well as the pressure drag, while imposing constraints on
the lift and the pitching moment coefficients. Having in mind that imposing
constraints in optimization induces a reduction of the set of feasible designs,
it was considered wise to work with as large a set of designs as possible. This
is the reason why we used the technique of parameterization proposed in [1].
By this technique we can obtain smooth updates of the shape, together with
a constraint on the ’volume’ of the airfoil (cross-sectional area), and impose
the displacements normal to the wing to vanish in a small region around the
stagnation point as shown in Figure 2.4.

2.2.3 Results
The eN -method attempts to predict the location of the transition from the cal-
culation of a large number of disturbances. By this approach, the location at
which the Envelope-of-Envelope (EoE) of N-factor curves, obtained from all
the calculated kinetic energies, reaches some empirical value, is the location
of the transition. An example of EoE curves obtained on the final design, after
minimization of the kinetic energy of one disturbance, is shown in Figure 2.5.

12
Envelope of envelope of N−factor curves
10

6
N
E

0
0 0.1 0.2 0.3 0.4 0.5
s/c

Figure 2.5: T11 - EoE of N-factor curves: at initial design(solid) and final design
(dash). EoE of N-factor curves involving the RANS equations are shown for the initial
(dash-dot) and final (dot) design.

If the transition would occure at the value NE = 7, for example, the transition
would occure at the non-dimensional curvilinear coordinate s/c = 0.15, on
the initial design, and it would not occure at all on the final design. Note that
the transition can occure outside of the domain of calculation of the equations
in the boundary layer (here 0 ≤ s/c ≤ 0.5). Similar results were obtained
when using the RANS equations, instead of the Euler equations, for the anal-
ysis of the EoE curves, see Figure 2.5. This last result confirms that it was
appropriate to neglect the viscous-inviscid interaction for the numerical ex-
periments shown here.

13
2.3 Paper III
Paper III proposes an efficient method to deform unstructured 2D and 3D
meshes, and gives a detailed presentation of all aspects of the implementa-
tion for gradient-based aerodynamic shape optimization. Section 2.3.1 briefly
describes the method and its use in the context of aerodynamic shape opti-
mization. Performances of the new method are analyzed, as summarized in
Section 2.3.2. The results of shape optimization obtained in the paper are
commented in Section 2.3.3.

2.3.1 Geometrical interpolation


The problem of deformation of the mesh is recasted in the framework of in-
terpolation of scattered data. Control nodes are chosen among the nodes that
discretize the shape to optimize and the mapping from the positions of those
control nodes (xki ) to the displacements of all other node in each direction
(vx , vy , vz ) is defined from an interpolant. The construction of the interpolant
is based on radial basis functions (φ):
N
X
vx = sx (x) = γix φ(kx − xki k) + β1x + β2x x + β3x y + β4x z,
i=1
N
γiy φ(kx − xki k) + β1y + β2y x + β3y y + β4y z,
X
vy = sy (x) =
i=1
N
X
vx = sz (x) = γiz φ(kx − xki k) + β1z + β2z x + β3z y + β4z z,
i=1

As a result, the displacement of a node on the wing, other than a control node,
is obtained by interpolation. The displacement of all other nodes in the interior
of the domain of computation is an extrapolation.
An example of mesh deformation in 2D, without constraints at the do-
main boundaries, is shown in Figure 2.6. In CFD applications, constraints
are needed at far-field and symmetry boundaries, for example. The modifi-
cation of the interpolation method, in order to account for those additional
constraints, is detailed in the paper.
For an efficient implementation in aerodynamic shape optimization, the for-
ward mapping executing the deformation of the mesh must be supplemented
by a backward or adjoint mapping that provides the gradient of the cost func-
tion with respect to the boundary nodes on the parameterized shape. In the
present method of mesh deformation, the backward mapping is given by the
chain rule for which details are found in the article.

14
3 4

3
2

1
1

0 0

−1
−1

−2

−2
−3

−3 −4
−3 −2 −1 0 1 2 3 −3 −2 −1 0 1 2 3

Figure 2.6: Left: the undeformed domain and the control nodes. Right: deformation
resulting from a sinusoidal deflection of the control nodes.

2.3.2 Performances
The computational time required by the interpolation method to deform a
mesh is compared to the time required by solving an elliptic equation suitable
for mesh deformation (a method described in Paper I). As explained ealier, the
displacements of the nodes on the parameterized shape are interpolated from
the displacements of the control nodes. The trade-off between computational
cost and numerical accuracy is thus an important factor when comparing the
interpolation method to another method of mesh deformation.
The results, in the case of the deformation of a 3D Euler mesh for the ON-
ERA M6 wing, indicate a factor 2 to 10 in favor of the interpolation method
(RBF), for a maximum relative error of order 10−3 on the position of the nodes
on the parameterized wing. In fact, the relative errors do not vary much when
changing the number of control nodes (here from 2166 down to 730), so that
the proposed method is one order of magnitude faster than solving an elliptic
mesh smoother on the 3D Euler mesh (solved with the tolerance 10−7 ).
In the case of the deformation of the 3D mesh for the ONERA M6 wing for
RANS calculations, following the same observation on the small influence of
the number of control nodes on the relatives error, we obtain a speed-up of a
factor 30 by the new method in comparison with solving an elliptic equation
(solved with the tolerance 10−7 ).
The noticeable difference of results between the computational times ob-
tained for the meshes of Euler type and RANS type is due to the highly
stretched elements in the RANS mesh, which causes difficulties in solving
elliptic equations.
The mesh qualities give another important information about the perfor-
mance of a mesh deformation method. The tests are carried out with various
parameters that characterize the interpolation method, such as the type of ra-

15
dial basis functions, a so-called shape parameter, and the number of control
nodes. The qualities of the deformed meshes are, except for a few cases, sim-
ilar to the qualities of the undeformed mesh. In a few cases, where the shape
factor of the radial basis functions is small, the maximum aspect ratio, among
all deformed elements in the mesh, can be large, or, elements can be inverted.

2.3.3 Gradient-based shape optimization


The same optimization of the ONERA M6 wing as in Paper I is carried out,
replacing the mesh deformation based on elliptic smoothing used in Paper I by
the interpolation scheme. The results of optimization obtained through the two
methods are very close to each other. The explanation for the small differences
is given by the analysis of the performance discussed above. That is, the
method of interpolation approximates the shape given by the parameterization,
in contrast to the mesh deformation based on the elliptic equation, which uses
the information given by the parameterization at every node on the wing. The
difference in the mesh qualities of the meshes deformed by the two methods
may also contribute to the small differences.

16
2.4 Paper IV
Paper IV proposes a mesh adaptation scheme for gradient-based aerodynamic
shape optimization. The goal is to achieve a better accuracy of the shape ob-
tained by optimization, compared to the shape that solves the exact problem
of optimization. The method is inspired by moving mesh algorithms used for
the adaptation of the mesh in unsteady problems involving flows with discon-
tinuities, like shocks. The originality of the proposed method is to replace the
solution of the flow equations by a coupled flow and mesh equation.

2.4.1 Moving mesh adaptation


The mesh node coordinates (X = [X′′ , X′ ]) are defined as the solution to a
non-linear elliptic equation with variable diffusivity, which can be described
by the system of equations
" #" # " #
A (X) C (X) X′′ 0 (X′′ : interior nodes coor.)
=
0 B (X) X′ g′ (X′ : boundary nodes coor.)

The entries of the block matrices (A, B, C) are functions of the coordinates
(X) through a diffusivity function m. In order to control the mesh densities,
the diffusivity is a function of the flow solution, computed on the mesh de-
scribed by X, through an indicator of the error. As a result, we solve the cou-
pled mesh and flow equations simultaneously in order to obtain the adapted
mesh and flow solutions for a given design (g′ ).

M1 M2

β θ
x
(0,0) L/2 L

Figure 2.7: Inviscid supersonic flow past a wedge.

The method is applied on the CFD calculation of a supersonic flow over a


wedge with half-angle θ, see Figure 2.7. The adaptation improves the accu-
racy of the calculated drag, in comparison with uniform mesh refinement, see
Figure 2.8.

17
−1
10

−2
10

|CDh−CDe|/CDe
−3
10 Uniform
Adapted RBF−1
Adapted RBF−2
Adapted RBF−3
−4
10
0 0.05 0.1 0.15 0.2
h

Figure 2.8: Grid convergence towards the exact drag on a wedge at M1 = 2.5 , θ =
15o , with uniform grids and with adapted grids (RBF-1,2,3).

2.4.2 A 2D inverse problem


The flow over a wedge is used to build a benchmark for testing the accuracy of
the shape optimization. In some intervals of angles and Mach numbers, there
is a one-to-one relation between the angle of the wedge (θ) and the drag on
the wedge. We derive, from this observation, an inverse design problem with
a known exact solution (θexact ). By solving the problem of optimization on a
uniform grid we can compare the calculated angle of the optimal shape to the
exact solution of the inverse problem (Figure 2.9). The uniform grid conver-
gence of the calculated angle is comparable to the uniform grid convergence
of the calculated drag, see Figure 2.8. The proposed approach consists of

−1
10

−2
|θopt−θexact|/θexact

10
0.8

0.6

−3
10
0.4
Uniform
Adapted RBF−1
0.2 Adapted RBF−2
Adapted RBF−3
−4
10
0 0 0.05 0.1 0.15 0.2
h
0 0.2 0.4 0.6 0.8 1

Figure 2.9: Left: final adapted mesh at M1 = 2.5 and calculated optimal angle θopt =
15.0088o . Right: comparison between the exact optimal wedge angle (θexact = 15o )
and the numerical optimum angle (θopt ) with our without adaptation.

18
replacing the flow calculation on uniform grids by the calculation of the cou-
pled mesh and flow equations in the optimization algorithm. The result of the
optimization, the calculated optimal angle θopt , is improved (see Figure 2.9)
in the same manner as the drag calculation in Figure 2.8.

2.4.3 Solution algorithm


When solving the coupled mesh-flow equations, at a given iteration of the
algorithm the flow is solved approximately, and the coefficients of the mesh
equation are calculated from the pressure in the flow through a sensor and the
diffusivity function. The solution of these coupled non-linear equations by an
approximate Newton method with underrelaxation converges slowly or not al
all (’Alg2’ in Figure 2.10).

0
10

−1
10
|rk|/|r0|

−2
10

Alg2/RBF1
−3
Alg3/RBF1
10 Alg2/RBF2
Alg3/RBF2
Alg2/RBF3
Alg3/RBF3
−4
10
5 10 15 20
k−iteration

Figure 2.10: Convergence of the coupled Euler-Moving Mesh equations using an ap-
proximate Newton method (Alg2) and a modified approximate Newton method (Alg3)
based on interpolation of the mesh equation coefficients RBF (1, 2 or 3).

A possible explanation is the decoupling of the mesh updates from the flow
variables. This decoupling would yield large displacements of the nodes,
whereas the flow solution, in particular the position of the shock, is rather
insensitive to the mesh. A method based on the interpolation of the coef-
ficients of the mesh equation is derived using radial basis functions. In all
tests, the resulting algorithm (’Alg3’ in Figure 2.10) converges faster than the
approximate Newton without interpolation.

19
3. Perspectives

3.1 From Euler to RANS


The most obvious continuation of the present work would be the application
of the adjoint method to the equations for compressible viscous flows at large
Reynolds numbers, modeled by the Reynolds-averaged Navier-Stokes equa-
tions (RANS). The use of the RANS equations in aerodynamic shape opti-
mization, with or without turbulence models, is reported in several publica-
tions [31, 28, 14, 35, 34]. Note that the numerical schemes used there are
presented at an abstract level or derived from other methods than the explicit
formulation of the adjoint equations [31, 35], for instance by automatic differ-
entiation.
In order to calculate the gradients of the cost functions used in Paper I–
IV, when the flow is solution of the RANS equations discretized in Edge, we
would need the following:
• The adjoint of the numerical fluxes that arise from the discretization of the
molecular viscosity terms in the equations.
• The sensitivities of the same numerical fluxes with respect to the grid data.
For the calculation of the shape gradient of cost functions term that include
the shear-stress, the corresponding forcing term of the adjoint equations must
be derived.
Other practical details concerning the derivation of the adjoint of the vis-
cous fluxes are discussed in a report by Giles [21]. For example, he proposes
a method of projection that facilitates the transposition of the Jacobians when
the no-slip boundary condition applies.

3.2 Error estimates in mesh adaptation


The main result of Paper IV is a procedure of mesh adaptation, by relocation
of the positions of the nodes, that can be integrated in the process of gradient-
based shape optimization. The motivation is to improve the accuracy of the
shape obtained by numerical optimization, by improving the accuracy of the
numerical approximation of the cost function.
The main ingredient of the adaptation procedure is a variable diffusion map-
ping, which gives a mean to control the mesh densities by a diffusion, a posi-

21
tive scalar field in the flow domain.
The example of flow used in Paper IV in order to illustrate this approach,
facilitated the construction of a variable diffusivity, because the only feature
of the flow is the shock. By choosing a sensor, the shock can be localized and
a diffusivity built by convoluting the sensor with a compactly supported radial
basis function.
For more complicated inviscid and viscous flows, the places in the mesh
where the discretization needs to be refined are not necessarily limited to re-
gions of ’strong gradients’ of the flow solution.
Therefore, in order to extend to more complicated flows the adaptation
method presented in Paper IV, one could study the possibility of using a pos-
teriori error estimates such as used in [42, 23, 4] for deferred correction and
h−adaptation.

3.3 Interpolation of scattered data


Two techniques of interpolation based on Radial Basis Functions are derived
and applied in Paper III and IV in different contexts.
The interpolation of Paper III has been used for the deformation of unstruc-
tured meshes. It was emphasized that the technique is derived from a more
general problem that also applies to the coupling of the flow equations with
the equations of structural analysis, as it occurs in aeroelasticity. The parame-
terization of shapes is another application than can enter in the description of
the above-named general problem of interpolation (see Paper III).
In Paper IV the method of interpolation is used to efficiently solve the cou-
pled mesh and flow equations. The interpolant is the discrete convolution of
a sensor and a radial basis function. An implementation for large-scale ap-
plications (large CFD meshes) would require a fast algorithm for calculations
involving the convolution. Methods such like the fast multipole method and
moment-based methods may be possible candidates.

3.4 Shape parameterization with constraints


The technique introduced in [1] and used in Paper I and Paper II for parame-
terization of airfoil shapes is analogous to the obstacle problem of structural
mechanics for a thin elastic string. By this analogy, the forces are parameters
of design, and the obstacle, which is a constraint in the variational formula-
tion of the problem [10], is replaced by one or several linear constraints on the
normal displacements of the string. The difference with the obstacle problem
is that the linear constraints are defined as equalities, which makes the result-
ing quadratic program (QP) particularly easy to solve. This formulation of

22
the displacements allowed to fix the linearized volume of the airfoil optimized
in [1] and in Paper I, and to fix part of the optimized airfoil around the leading
edge in Paper II. This technique enabled smooth updates of the shapes during
optimization without reduction of the number of degrees of freedom, unless
those conceded to the geometrical constraints.
Another advantage of this approach is to transform (geometrical)
constraints of the problem of optimization into parameters of design.
Furthermore, the solution of the adjoint of this QP problem, which is solved
in order to obtain the gradient with respect to the design parameters, also
gives the partial derivatives with respect to the geometrical constraints. To
summarize, the shape parameterization, derived in 2D, has the following
characteristics:
• The parameterization mapping takes the form of a linear system of equa-
tions (QP) on the boundary.
• The gradient-based updates of the shape are smooth without loss of infor-
mation from the gradient.
• Linear equality constraints on the shape are transformed into parameters of
design.
• The partial derivatives of the cost function with respect to the geometrical
constraints are obtained from the solution of the adjoint (QP) problem.
A next step would be to extend this technique to 3D optimization. In this
case, the displacements normal to the surface of the wing would be analogous
to the normal displacements of a flexible membrane.

23
4. Summary in Swedish:
Numeriska metoder för aerodynamisk
formoptimering

Under flygning skapar luftströmmen runt flygplanet krafter som genererar lyft,
men också motstånd samt deformationer av flygkroppen. Kunskap om dessa
fenomen är grundläggande för att ingenjörer ska kunna utveckla säkra flyg-
plan med låga driftskostnader.
Aerodynamiska datorsimuleringar för flygplanstillämpningar kan vara till-
räckligt noggranna under vissa strömningsförhållanden som till exempel vid
marchfart. Med hjälp av datorsimuleringar kan aerodynamiska egenskaper av
preliminära flygplansmodeller testas. För varje ny modell kan varianter testas
i syfte att förbättra dess egenskaper på ett tidigt stadium i utvecklingspro-
cessen. Möjligheten att automatiskt förbättra formen av flygplansdelar är en
lockande men utmanande uppgift.
Ett effektivt sätt att förbättra former är att använda numerisk optimering.
Formen av en vinge, till exempel, beskrivs av ett antal parametrar som speci-
ficerar dess längd, tjocklek och krökning. Eftersom även små ändringar i for-
men kan ha en stor betydelse för flygplanets prestanda är det viktigt att kunna
använda noggranna beskrivningar av de flygplansdelar som skall förbättras.
Det innebär att hundratals parametrar kan behöva justeras. Gradientbaser-
ade algoritmer för optimering är effektiva för att minimera en funktion även
när den beror på många parametrar. Eftersom optimeringen kräver upprepade
simuleringar av strömningen är det viktigt att algoritmen för att beräkna gra-
dienten är effektiv.
Det finns olika sätt att ta fram gradienten av en kostfunktion inom aero-
dynamisk formoptimering. I en av metoderna görs en liten ändring av en
designparameter och simuleringen av strömningen ger den störda kostnaden.
Att jämföra den störda kostnaden med kostnaden för den ursprungliga desig-
nen ger en komponent av gradienten. Störningsmetoder är “dyra” eftersom
gradienten har lika många komponenter som antalet parametrar och behöver
räknas ut många gånger under optimeringen. Ett känt alternativ är att lösa
så kallade adjunktsekvationer. Med hjälp av dessa kan gradienten beräknas
effektivt oavsett antalet parametrar.
Artikel I presenterar de mest grundläggande resultaten i avhandlingen.
Som påpekas ovan är störningsanalys ett viktigt steg i gradientbaserad

25
Figure 4.1: I grått (mörkgrå i SV) visas formen av ONERA M6-vingen. Den gula
formen (ljusgrå i SV) får man genom att minimera motståndet med konstant lyft
och vridmoment. Parametrarna som används här styr formen på ett sätt som tillåter
krökningen, tjockleken och den lokala anfallsvinkeln att variera spännvis (från roten
till spetsen av vingen).

aerodynamisk formoptimering. I den analysen härleds uttryck för


gradienter av funktioner som motstånd, lyftkraft eller moment. Gradienten
beräknas effektivt genom att lösa adjunktsekvationer till de lineariserade
strömningsekvationerna. Strömningsmodellen ges av Eulerekvationerna
för en kompressibel gas som löses numeriskt i Edge, ett program för
strömningsmekaniska beräkningar på ostruktuerade nät. Adjunktsekvationen
och gradientutrycket härleds från den diskreta avbildning som inkluderar
strömningsekvationen, nätförsjutningsalgoritmen och parametriseringen av
formen. Här presenteras en metod för att härleda adjunktsekvationen för
den kantbaserade finita-volymsdiskretisering som används i Edge såväl
som i många andra beräkningsprogram inom flygindustrin. Kantbaserade
diskretiseringsmetoder lämpar sig särkilt bra för att effektivt beräkna
strömningsfälten runt komplicerade geometrier. Ett exempel av en optimerad
vinge som presenteras i artikeln visas i figur 4.1. På den optimerade vingen
är luftmotståndet 20% lägre än för den ursprungliga vingen.
I artikel II tillämpas liknande metoder som i artikel I för att optimera en
vingprofil med avseendet på störningsenergin i gränsskiktet närmast vingspro-
filens yta, med avsikt att fördröja omslag från laminär till turbulent ström-
ning. Den inviskösa strömningen fås genom att lösa Eulerekvationerna för
kompressibel strömning. Den laminära grundströmningen fås genom att lösa
gränsskiktsekvationerna för kompressibel strömning på oändligt svepta ving-
ar. Tillväxten av konvektivt instabila störningar analyseras med hjälp av lin-

26
jära stabilitetsekvationer i parabolisk form (PSE). Analysen av den formop-
timerade vingprofilen visar en minskning av den totala tillväxten av ett stort
antal störningar vilket antas representera en fördröjning av laminär-turbulent
omslag. Då en fördröjning av omslaget innebär en minskning av det viskösa
motståndet, är formoptimeringsproblemet som presenteras här en ny metod
för att genomföra minimering av det viskösa motståndet. Metoden har inte
för avsikt att dämpa den turbulenta strömningen utan förlitar sig på modeller-
ing av störningars spridning och tillväxt i den laminära delen av gränsskiktet.
Liknande resultat fås också då tryckmotståndet och störningsenergin samtidigt
reduceras medan lyft och vridmoment behålls nära initiala värden.
För både gradientbaserad aerodynamisk optimering och aeroelasticitet
(kopplade struktur- och strömningsberäkningar) behövs snabba metoder för
nätdeformering. I artikel III presenteras en interpolationsmetod baserad på
radiella basfunktioner (RBF) för att propagera förkjutningarna av noderna på
randen av beräkningsnätet till det inre. Metoden kan minska beräkningskost-
naden för nätdeformationen jämfört med deformationsmetoder baserade
på lösningar av den diskreta Laplaceekvationen (Laplace Smoothing).
Algoritmen använder ej strukturen hos nätet. Därför kan strukturerade,
ostrukturerade samt hybridnät behandlas likvärdigt. Tillämpningar på
aerodynamisk formoptimering är också undersökta. För gradientbaserade
optimeringsalgoritmer skall kostfunktionen deriveras med avseende
på designparametrarna. För aerodynamisk formoptimering beräknas
gradienten effektivast och noggrannast med den adjungerade ekvationen
till de diskretiserade strömningsekvationerna som presenteras i artikel I.
Beräkningen av gradienten använder Jacobianmatrisen för nätdeformeringen
vilket beskrivs i detalj i rapporten.
Slutligen presenteras resultatet av optimering av ONERA M6-vingen i tran-
sonisk fart med interpolationsalgoritmen och jämförs med Laplacetekniken
för nätdeformation. Kvaliten på beräkningsnätet och interpolationsfelet jäm-
förs för olika parametrar till interpolationsschemat: typen av basfunktion,
skalparametern till basfunktionen samt olika mängder av kontrollpunkter.
Adaptionsmetoden som presenteras i artikel IV anpassar nätet till det beräk-
nade strömningsfältet utan att förändra uppdelningen av nätet i olika ele-
ment. Detta är viktigt för att adaption ska kunna användas för gradientbaserad
formoptimering. I denna typ av metod, som kallas r-adaption, förändras
enbart nodernas koordinater, i motsats till så kallad h-adaption. Koordina-
terna i nätet är lösningen till en icke-lineär elliptisk ekvation inspererad från
Winslows variabla diffusivitetsekvation. Nätekvationen och strömingsekva-
tionen är kopplade för att nodernas koordinater ska anpassas till strömnin-
gen och lösningen till strömningsekvationen ska uppdateras efter ändringarna
i beräkningsnätet. Koppligen sker via en diffusivitetfunktion som byggs på
faltningen av en sensor med en radiell basfunktion. Användningen av sensorn

27
är ett enkelt sätt att lokalisera interpolationsfel i närvaron av diskontinuerli-
ga lösningar. Den radiella basfunktionen som används har kompakt stöd och
är kontinuerlig. Faltningen används för att diffusiviteten ska variera kontin-
uerligt i rummet. Numeriska experiment med den adaptiva metoden tilläm-
pad på överljudsströmning över en kil—ett modellproblem för strömning med
diskontinuiteter—visar att det beräknade motståndet är bättre approximerat på
det adaptiva nätet. Som konsekvens av denna förbättring blir lösningen till ett
inversproblem byggd på motståndet också mer noggrant beräknad.

28
Acknowledgments

Many thanks to my advisor Martin Berggren for his support during this the-
sis. His tutoring was excellent in every details, from the initiation to the ’ad-
joint’ and ’gradient’ derivation for some finite element discretization to much
broader discussions on every aspects of the numerics involved here.
I am thanksfull to all the staff of the Division of Scientific Computing
(TDB), in Uppsala, for the friendly atmosphere and the very good quality
of the lectures and seminars.
An important part of this work has been performed at the Swedish Defense
Research Institute (FOI), which is nowadays the authority for the develop-
ment and support of the program Edge. I thank Torsten Berglind and Peter
Eliasson for giving me the opportunity to work at FOI, in the framework of
my graduate studies as well as on other projects, which has greatly facilitated
the developments I did on the code Edge. FOI has also been the place where
my collaborations took place. In particular, I want to thank Jan Pralits, Stefan
Jakobsson, and Adam Jirasek.
Thanks to Anita for her help and understanding, and to our kids, Mikael,
eight and Anna, a big three-and-a-half, who on Sunday mornings took care of
us better than we did take care of them the rest of the week.
Funding from the Parallel and Scientific Computing Institute (PSCI)
is greatly acknowledged. This research has received support from the
AEROSHAPE project funded by the European Commission, DG Research,
under the GROWTH initiative (Project Ref: GRD1-1999-10752). Partial
support for this research has been obtained through the Department of
Energy, USA, for my visit at CSRI.

29
References

[1] O. Amoignon. Adjoint-based aerodynamic shape optimization. Technical Re-


port IT Licentiate theses 2003-012, Department of Information Technology, Di-
vision of Scientific Computing, Uppsala University, Box 337, SE-751 05 Upp-
sala, Sweden, October 2003.

[2] W.K. Anderson and D.L. Bonhaus. Airfoil design on unstructured grids for
turbulent flows. AIAA Journal, 37(2):185–191, 1999.

[3] T.J. Barth. Aspects of unstructured grids and finite-volume solvers for the Euler
and Navier–Stokes equations. In Special Course on Unstructured Methods
for Advection Dominated Flows, pages 6–1–6–61. AGARD Report 787, May
1991.

[4] T.J. Barth. A posteriori error estimate and mesh adaptivity for finite volume
and finite element methods. Springer series Lecture Notes in Computational
Science and Engineering, 41:1–21, 2004.

[5] O. Baysal and K. Ghayour. Continuous adjoint sensitivities for optimization


with general cost functionals on unstructured meshes. AIAA Journal, 39(1):48–
55, 2001.

[6] F. Beux and A. Dervieux. Exact-gradient shape optimization of a 2D Euler flow.


Technical Report RR-1540, INRIA Sophia Antipolis, 2004 Route des Lucioles,
06360 Valbonne, France, 1991.

[7] C.H. Bischof, A. Carle, P. Hovland, P. Khademi, and A.XS Mauer. Adifor 2.0
user’s guide (revision d). Technical Report 192, Mathematics and Computer
Science Division, Argonne National Laboratory, 1998.

[8] G. Bugeda and E. Oñate. Optimum aerodynamic shape design for fluid flow
problems including mesh adaptivity. Int. J. Numer. Meth. Fluids, 30:161–178,
1999.

[9] G.W. Burgreen and O. Baysal. Three-dimensional aerodynamic shape optimiza-


tion using discrete sensitivity analysis. AIAA Journal, 34(9):1761–1170, 1996.

[10] P. G. Ciarlet. The Finite Element Method for Elliptic Problems. North-
Holland, Amsterdam, 1978.

31
[11] G. Cowles and L. Martinelli. A control-theory based method for shape design
in incompressible viscous flow using rans. AIAA Paper, 2000.

[12] P. Eliasson. Edge, a Navier–Stokes solver, for unstructured grids. Technical Re-
port FOI-R–0298–SE, Swedish Defence Research Agency, Stockholm, Novem-
ber 2001.

[13] J. Elliot and J. Peraire. Aerodynamic design using unstructured meshes. AIAA
Paper, (96-1941), 1996.

[14] J. Elliot and J. Peraire. Aerodynamic optimization on unstructured meshes with


viscous effects. AIAA Paper, (97-1849), 1997. 13th AIAA CFD Conference,
Snowmass, Colorado, June, 1997.

[15] J. Elliot and J. Peraire. Constrained, multipoint shape optimization for com-
plex 3D configurations. The Aeronautical Journal, pages 365–376, Au-
gust/September 1998. Paper no. 2375.

[16] O. Enoksson. Shape optimization in compressible inviscid flow. Licenciate


Thesis LiU-TEK-LIC-2000:31, 2000. Department of Mathematics, Institute of
Technology, Linköpings University.

[17] O. Enoksson and P. Weinerfelt. Numerical methods for aerodynamic optimiza-


tion. Proceedings to the 8th International Symposium on Computational Fluid
Dynamics, 5-10 Sept., Bremen, 1999.

[18] J.O. Pralits et al. Adjoint-based optimization of steady suction for disturbance
control in incompressible flows. J. Fluid Mech., 467:129–161, 2002.

[19] C. Faure and Y. Pegay. Odyssée user’s guide version 1.7. Technical Report
RT-0224, INRIA, 1998. URL http://www-sop.inria.fr/tropics/tapenade.html).

[20] R. Giering and T. Kaminski. Recipes for adjoint code construction. ACM Tans.
Math. Software, 24(4):437–474, 1998.

[21] M.B. Giles. Algorithm developments for discrete adjoint methods. Technical
Report 01/15, Oxford University Computing Laboratory, Numerical Analysis
Group, Wolfson Building, Parks Road, Oxford, England OX1 3QD, 2001.

[22] M.B. Giles and N.A. Pierce. An introduction to the adjoint approach to design.
Flow, Turbulence and Combustion, 65:393–415, 2000.

[23] M.B. Giles and N.A. Pierce. Adjoint error correction for integral outputs. In
Error Estimation and Adaptive Discretization Methods in Computational
Fluid Dynamics, volume 25. In Lecture Notes in Computational Science and
Engineering, Springer, 2002.

32
[24] A. Griewank, D. Juedes, H. Mitev, J. Utke, O. Vogel, and A. Walther. ADOL-
C: A package for the automatic differentiation of algorithms written in C/C++.
ACM TOMS, 22(2):131–167, 1996. Algor. 755.
[25] M.D. Gunzburger. Perspectives in Flow Control and Optimization. Society
for Industrial and Applied Mathematics, Philadelphia, PA, USA, 2002.

[26] A. Jameson. Aerodynamic design via control theory. Journal of Scientific


Computing, 3:233–260, 1988.
[27] A. Jameson and S. Kim. Reduction of the adjoint gradient formula for aerody-
namic shape optimization problems. AIAA Journal, 41(11), 2003.

[28] A. Jameson, N.A. Pierce, and L. Martinelly. Optimum aerodynamic design


using the Navier-Stokes equations. AIAA Paper, (97-0101), 1997.

[29] M.J. Lighthill. A new method of two-dimensional aerodynamic design. Techni-


cal report, ARC, 1945.

[30] O. Lilienthal. Birdflight as the Basis of Aviation. Longmans, Green & Co.,
1911. Translation from "Der Vogelflug als Grundlage der Fliegekunst". Berlin:
R. Gaertners Verlag, 1889.

[31] B. Mohammadi. A new optimal shape procedure for inviscid and viscous turbu-
lent flows. Int. J. Numer. Meth. Fluids, 25:183–203, 1997.

[32] B. Mohammadi and O. Pironneau. Mesh adaption and automatic differentia-


tion in a CAD-free framework for optimal shape design. Int. J. Numer. Meth.
Fluids, 30:127–136, 1999.
[33] S.K. Nadarajah. The discrete adjoint approach to aerodynamic shape opti-
mization. PhD thesis, Aeronautics and Astronautics Department, University of
Stanford, 2003.

[34] S.K. Nadarajah and A. Jameson. Studies of the continuous and discrete adjoint
approaches to viscous automatic aerodynamic shape optimization. AIAA Paper,
(2001-2530), 2001.

[35] M. Nemec and D.W. Zingg. Towards efficient aerodynamic shape optimization
based on the Navier–Stokes equations. AIAA Paper, (2001-2532), 2001.

[36] O. Pironneau. Optimal Shape Design for Elliptic Systems. Springer Verlag,
1984.

[37] O. Pironneau and N. Di Césaré. Flow control problem using automatic


differentiation in C++. LAN-UPMC report 99013, 1999. Laboratoire
d’Analyse Numérique, Université Pierre et Marie Curie, Paris VI, France. URL:
http://acm.emath.fr/ dicesare/cpp.php3.

33
[38] J. J. Reuther, A. Jameson, J. J. Alonso, M. J. Rimlinger, and D. Saunders. Con-
strained multipoint aerodynamic shape optimization using an adjoint formula-
tion and parallel computers, part 1. J. Aircraft, 36(1):51–60, 1999.

[39] B.I. Soemarwoto. Multi-Point Aerodynamic Design by Optimization. PhD


thesis, Delft University of Technology, Faculty of Aerospace Engineering, P.O.
Box 5058, 2600 GB Delft, Netherlands, 1996.

[40] C. Sung and J.H. Kwon. Accurate aerodynamic sensitivity analysis using adjoint
equations. AIAA Journal, 38(2):243–250, 2000.

[41] T. Theodorsen. Theory of wing sections of arbitrary shapes. Technical Report


NACA/TR-411, Langley Memorial Aeronautical Laboratory, National Advisory
Committee for Aeronautics, Langley Field, Virginia, USA, October 1931.

[42] D.A. Venditti and D.L. Darmofal. Adjoint error estimation and grid adaptation
for functional outputs: Application to quasi-one-dimensional flow. Journal of
Computational Physics, 164(1):204–227, October 2000.

34
- , -

! *. / 0 . 1

0
. 1 2- - , 2
+ 3 4
5 6 4 + 24
+ 1
/1 7 , -
/ 0 . 1 3
89 : 2 &;; 2 4 +
<7 , - /
0 . 1 =3>

/ + * + 3 3
* + * * * , %$& &
Paper I
Adjoint of a median-dual finite-volume scheme
Application to transonic Aerodynamic Shape
Optimization

O. Amoignon a , M. Berggren a,b

a Division
of Scientific Computing, Department of Information Technology,
Uppsala University, Box 337, SE-751 05 Uppsala, Sweden
b Department of Computational Physics, Division of Systems Technology, FOI,
SE-164 90 Stockholm, Sweden

Abstract

The sensitivity analysis is a crucial step in algorithms for gradient-based aerody-


namic shape optimization. The analysis involves computing the gradient of function-
als such as drag, lift, or aerodynamic moments, with respect to the parameters of
the design. Gradients are efficiently calculated by solving adjoints of the linearized
flow equations. The flow is modeled by the Euler equations of gas dynamics, solved
in Edge, a Computational Fluid Dynamics (CFD) code for unstructured meshes.
The adjoint equations and expressions for the gradients are derived here in the fully
discrete case, that is, the mappings from the design variables to the functional’s
values involve the discretized flow equations, a mesh deformation equation, and
the parameterization of the geometry. We present a formalism and basic properties
that enable a compact derivation of the adjoint for discretized flow equations obey-
ing an edge-based structure, such as the vertex-centered median-dual finite volume
discretization implemented in Edge. This approach is applied here to the optimiza-
tion of the RAE 2822 airfoil and the ONERA M6 wing. In particular, we show a
method to parameterize the shape, in 2D, in order to enforce smoothness and linear
geometrical constraints.

Key words: Gradient optimization, Inviscid compressible flow, Adjoint equations,


Mesh deformation, Constrained geometric parameterization
1991 MSC: 90C06, 90C90, 93C20, 76M12
1 Introduction

1.1 Background

The problem of inverse design of airfoils was rigorously formulated and solved
by Lighthill [19] using potential flow analysis. In this approach, the velocity
or the pressure are prescribed around the airfoil, and the goal is to find its
shape. A review of the developments of similar methods can be found in an
article by Jameson [16]. There, Jameson also formulated the inverse design as
a problem of optimal control governed by partial differential equations.

A more general problem than inverse design is to minimize an objective func-


tion constrained by the flow state equation, a system of partial differential
equations. Gradient-based optimization algorithms are efficient to solve this
problem, but the calculation of the gradient may be too expensive if using
a perturbation method like finite differences. Solving an adjoint of the lin-
earized flow state equation enables an efficient alternative, as the cost of the
gradient calculation is independent of the number of design variables. For an
introduction to the use of adjoint equations in optimal shape design of sys-
tems governed by elliptic equations, the reader may refer to a book by Piron-
neau [24]. For an introduction that is particularly focused on aerodynamic
shape optimization, we refer to an article by Giles & Pierce [14].

A short review of existing publications on aerodynamic shape optimization [3,5,7–


9,12,13,17,20,21,25,27,29] shows an increasing interest for the efficient gradient
computation allowed by the solution of adjoint equations, a procedure called
by many authors the adjoint method.

1.2 The present contribution

There are two numerical approaches of the adjoint method. In the so-called
continuous approach, the adjoint equations and the expressions of the gradi-
ents are derived from the Partial Differential Equations (PDEs) that model
the flow. The resulting expressions are then discretized. In the other, so-called
discrete approach, numerical approximations of the PDEs, objective function,
and constraints are carried out prior to the derivation of the adjoint problem,
which yields the gradient of the computed objective function and constraints.
Gunzburger [15] discusses both methods, and Nadarajah and Jameson [22]
compare them on practical examples. The continuous approach [5,13,17,27,29]
and the discrete one [3,9,12,21] are equally advocated, but for different reasons.
Operating on the PDE level eliminates the discretization from the algorithm
and allows to devise the optimization in an infinite-dimensional functional-

2
space setting. Another argument in favor of the continuous approach that
is often given is the complexity involved in formulating the discrete adjoint
equations and gradient expressions.

We adopt the discrete approach because it gives the gradient of the actual
numerical cost function, which is generally not the case when adopting the
continuous approach. In addition, the boundary conditions unfold naturally
from the derivation of the discrete adjoint fluxes [22]. However, we do not apply
the discrete approach on the artificial viscosity fluxes, a ’facilitator’ as called by
Gunzburger [15]. An original contribution of this article is the introduction of
a formalism in Section 3, which together with Lemma 1, makes the derivation
of the discrete adjoint equations and gradient expressions quite compact.

The discrete approach is applied here on the unstructured finite-volume dis-


cretization that is implemented in the CFD code Edge [11]. Here, the un-
knowns are associated with the mesh vertices, and the control volumes are
formed from the median dual grid, as described by Barth [4]. One merit of
unstructured methods is that they can use meshes that are inexpensive to
produce even for complicated geometries.

This discretization is common in CFD software for it lowers the cost of mesh
generation when dealing with complicated geometries.

The discrete adjoint approach applied to unstructured finite-volume schemes


similar to the one used here can be found in [3,12], and discussions about the
development of the adjoint equations in CFD can be found in [14]. However,
there is no derivation in those references, unless at an abstract level, of the
complete adjoint equations and gradient expressions. In contrast, a particular
effort has been made to present proofs for the expressions presented in this
report whenever it felt necessary.

The calculation of the gradient, based on the solution of the adjoint equations,
is summarized below at an abstract level (§1.3). Later in the article, the gra-
dient calculations, with respect to the data of the dual grid, and with respect
to the data of the primal grid – the nodal coordinates – are also given explicit
formulations. The authors are not aware, to the best of their knowledge, of a
similar presentation other than that given in one of our technical reports [1].

1.3 Overview of the discretized optimization problem

We give here an abstract presentation of the fully discretized optimization


problems such as the ones solved in Sections 6-7.

By the finite volume method, the flow domain is replaced by a meshed bounded

3
domain Ω, with boundary ∂Ω. The shape of a portion of ∂Ω, denoted ∂Ωw ,
will be subject to optimization. We denote by Xh the set of nodal coordinates
of the mesh, and a superscript 0 denotes the mesh or other functional values
related to the initial design.

The objective function is a mapping from a vector of variables of design ah to


the real value J. This mapping is a composition of five mappings, which we
now describe in sequence:

• Parameterization of the shape: ah → dh


Consider the mesh node with index i on ∂Ωw . Its coordinates, denoted
xi , are related to the initial shape (∂Ω0w ), through the nodal displacements
dh = {di }1≤i≤Nw as

xi = x0i + di , for i ∈ V(∂Ωw ) , (1)

where V(∂Ωw ) denotes the set of indexes of the mesh nodes on ∂Ωw . The
mapping of the design parameters ah = {ai }1≤i≤N into displacements dh
can be formulated as an equation

Sh (dh , ah ) = 0 . (2)

• Mesh deformation: dh → Xh
To retain mesh quality, the coordinates of all mesh nodes Xh must be
adapted to the displacements dh of the nodes on the part of the boundary
being optimized. This is accomplished by a mesh smoother, formulated as
the equation
Mh (Xh , dh ) = 0 . (3)
• Re-calculation of the control volumes/surface vectors: Xh → nh
By deforming the mesh we conserve the connectivities between the nodes,
but the control volumes of the dual grid and their surface normals nh need
to be re-computed. Therefore, nh is a function of the mesh coordinates,
which we denote
nh ≡ nh (Xh ) . (4)
• Solution of the discretized Euler equations: nh → wh
As mentioned previously, the program Edge [11] solves the Euler equa-
tions on a the dual grid using an edge-based data structure. The discretized
Euler equation in steady state can therefore be formulated as a equation 1
where the discrete flow state wh is the solution and nh are the parameters:

Rh (wh , nh ) = 0 (5)

• Calculation of the objective function: Xh , nh , wh → J


1 The discretized Reynolds Averaged Navier–Stokes equations also depend explic-
itly on Xh .

4
Objective function: {wh , nh , Xh } −→ J (wh , nh , Xh )
subject to (5) (Xh = cte) : nh −→ Jn (nh ) ≡ J (wh (nh ) , nh , Xh )
subject to (4)-(5): Xh −→ JX (Xh ) ≡ J (wh (nh (Xh )) , nh (Xh ) , Xh )
subject to (3)-(5): dh −→ Jd (dh ) ≡ JX (Xh (dh ))
subject to (2)-(5): ah −→ Ja (ah ) ≡ Jd (dh (ah ))

Table 1
Mappings defined by the objective function (7) and equations (2)-(5).

In our applications we seek a reduction of the drag coefficient (CD ) and


penalize changes of the lift (CL ) and pitching moment (CM ). The aerody-
namic coefficients (CD , CL , CM ) are defined as
 pi ni · dD
CD = 1 ,
ρ v2 S
2 ∞ ∞ ref
i ∈ V(∂Ωw )
 pi ni · dL
CL = 1 ,
ρ v2 S
2 ∞ ∞ ref
(6)
i ∈ V(∂Ωw )
 
 pi dM · xi − O ref. × ni
CM = 1 ,
ρ v2 S L
2 ∞ ∞ ref ref
i ∈ V(∂Ωw )

were dD = v ∞ /|v ∞ |, v ∞ is the constant velocity of the air, in the far field,
dL is a upward oriented unit vector orthogonal to dD , dM is a unit vector
orthogonal to dD and dL , pi is the pressure at node i, ni , an element of nh ,
is the outward-oriented surface normal at the boundary node i, ρ∞ denotes
the air density in the far-field, Sref the measure of a reference surface, Lref
the measure of a reference length.
The objective function reads:
 2
J (wh , nh , Xh ) =µD CD (wh , nh ) + 12 µL CL (wh , nh ) − CL0 +
(7)
0 2
 
1
µ
2 M
CM (wh , nh , Xh ) − CM ,

where µ are positive scalars.

To summarize, the discretized optimization problem is:

Find ah that minimizes the objective function (7) subject to the


constraints (2)-(5).

It will be convenient to use the notations of Table 1. We assume that all


functions in expressions (2)-(7), detailed below in this report, are continuously

5
differentiable 2 . The sequence of computations to perform in order to compute
the reduced gradient ∇Ja , that is, the gradient of objective function (7) subject
to constraints (2)-(5) (see Table 1), is obtained by formulating the sensitivity
equations of each of the equations (2)-(5).

After some simple algebra it reads:

(i) For a given design ah and corresponding mesh Xh (2)-(3), dual grid data
nh (4) and discrete flow solution wh (5), compute the adjoint flow solu-
tion wh∗ by solving
 ∗  T
∂Rh ∂J
wh∗ = . (8)
∂wh ∂wh

(ii) Calculate the gradient with respect to the dual grid data ∇Jn and the
gradient with respect to the nodal coordinates ∇JX as follows:
 ∗  T
∂Rh ∂J
∇Jn = − wh∗ + , (9)
∂nh ∂nh
 T  T
dnh ∂J
∇JX = ∇Jn + . (10)
dXh ∂Xh

(iii) Solve the adjoint mesh deformation equation:


 ∗
∂Mh
X∗h = −∇JX . (11)
∂Xh

(iv) Calculate the gradient with respect to the shape deformations ∇Jd :
 ∗
∂Mh
∇Jd = X∗h . (12)
∂dh

(v) Solve the adjoint parameterization equation:


 ∗
∂Sh
d∗h = −∇Jd . (13)
∂dh

(vi) Finally, calculate the reduced gradient:


 ∗
∂Sh
∇Ja = d∗h , (14)
∂ah

2 Neglecting the artificial diffusivities used in the solution procedure of the flow
equations.

6
where ∗ denotes either the adjoint (transpose) of a linearized vector of residuals
or the unknown in an equation involving an adjoint operator.

The rest of the presentation is structured as follows. The edge-based formu-


lation of the discretized flow equations (5), as implemented in Edge [11], is
presented in Section 2. Section 3 contains the derivation of an edge-based
formulation of the adjoint state equation (8) and the expression (9) of the
gradient with respect to the dual grid data ∇Jn . Section 4 details how expres-
sions for the dual data nh (4) are obtained from the nodal coordinates Xh and
the mesh connectivities, in the order to present the assembly of the gradient
with respect to the primal grid data ∇JX , operations (10). A mesh deforma-
tion mapping (3) suitable for unstructured meshes, the adjoint equation (11),
and the gradient with respect to the deformation of the parameterized bound-
ary (12) are briefly described in Section 5. The parameterization (2), the ad-
joint equation (13) and the gradient calculation with respect to the parameters
of design (14) are presented in Section 6 for the 2D example and in Section 7
for the 3D example. Expressions necessary for the demonstration or for the
implementation are detailed in the appendix.

2 Finite volume discretization of the state equations

The system of Euler equations governs the flow of an inviscid compressible


fluid and expresses the conservation of mass, momentum, and energy. In steady
state, the following integral form holds for any fixed region V with boundary
∂V 
f · n̂ dS = 0 , (15)
∂V
where n̂ is the unit normal, outward oriented, of the control volume V , and f
is the 3-by-1 matrix of tensors

f = [ρu, ρ u ⊗ u + Ip, u (E + p)]T (16)

and n · f = f · n = [ρu · n , ρuu · n + np , Eu · n + p u · n]T , (17)


where E, the total energy per unit volume, is related to the pressure p, the
density ρ and the velocity u. In the framework of ideal fluids, assuming the
law of perfect gas applies, E is given by

p 1
E= + ρu2 . (18)
γ−1 2

In the case of an inviscid fluid, the condition

u · n̂ = 0 (19)

7
applies at solid walls. The fluid state in conservative variables is denoted w
and is the 3-by-1 matrix

w = [ρ, m, E]T , where m = ρu . (20)

Primitive variables are also used at some parts of the presentation and are
denoted as the 3-by-1 matrix

v = [ρ, u, p]T . (21)

In order to solve (15)-(19), the flow domain is replaced by a bounded compu-


tational domain Ω. Artificial boundary conditions are thus needed, and in the
case of external flow, these are usually farfield conditions.

Given a meshing of the discrete domain Ω, we will denote by V(Ω) the set of
all interior node indexes, V(∂Ω) the set of all boundary node indexes, V(Ω) =
V(Ω) V(∂Ω), Vi the measure of the dual control volume with center at node


i, nij the surface normal associated with edge ij  , and ni the surface normal
associated with the boundary node i ∈ V(∂Ω) (see Figures 1-4).

The system of equations (15) is approximated by explicit time marching of


the system
dwi
Vi + Ri = 0, ∀i ∈ V(Ω), (22)
dt
until the residuals Ri vanish within some tolerance. Here, wi ≈ w (xi ), and
the residuals Ri are
 


 Ri = (nij · fij + dij ) ∀i ∈ V(Ω) ,
j∈Ni

Ri =  (23)
(nij · fij + dij ) + ni · fibc

 Ri =


∀i ∈ V(∂Ω) .
j∈Ni

where Ni is the set of indexes of nodes that are connected to node i with
an edge. The residuals may be assembled by a single loop over all edges and
a single loop over all boundary nodes [11]. The fluxes on a control surface
associated with nij is approximated by fij which in this study is

1
fij = (fi + fj ) with fi = f (wi ) , (24)
2
giving a central scheme. An artificial dissipation flux dij , a blend of second
and fourth-order differences [18], is used in (23):
 
dij = ǫij ij 2 2
2 (wi − wj ) + ǫ4 ∇ wi − ∇ wj , (25)

with
∇2 wi =

(wk − wi ) ∀i ∈ V(Ω) . (26)
k∈Ni

8
The second-order dissipation is active where pressure gradients are large in
order to prevent oscillations in the vicinity of shocks. The fourth-order dissi-
pation is meant to remove oscillating solutions from grid point to grid point
while preserving the second-order accuracy of the central scheme away from
the shocks.

Boundary conditions are weakly imposed through the flux f bc in (23). At node
i on a solid wall, applying (19) for computing fi · ni amounts to taking

fibc = [0 , Ipi , 0]T (27)

At node i on a farfield boundary, the fluxes (16) are computed using either the
primitive farfield data v∞ for incoming characteristics, or an extrapolation of
the primitive variables vi for characteristics leaving the domain of computa-
tion, see [11]:

fibc = f (vic (n̂i )) ,


vic (n̂i ) = L (n̂i , v∞ ) H (λi ) L−1 (n̂i , v∞ ) vi (28)
+ L (n̂i , v∞ ) (I − H (λi )) L−1 (n̂i , v∞ ) v∞ ,

where L (n̂i , v∞ ) is a matrix of right eigenvectors that diagonalizes the Ja-


cobian matrix of the flux in primitive variables along the outward-directed
unit normal n̂i , H (λi ) is a diagonal matrix whose diagonal is 0 for negative
eigenvalues and 1 for positive ones, and I is the identity matrix.

Convergence of (22) until steady-state is accelerated by local time stepping,


multigrid, and implicit residual smoothing. The notations used in (5) involve:

Rh = {Ri }i∈V(Ω) , wh = {wi }i∈V(Ω) , and wi = [ρi , mi , Ei ]T , (29)

and for the surface normals:



nh = {ni }i∈V(Ω) , {nij }ij∈E(Ω)
 , (30)

where E(Ω) is the set of oriented edges of the mesh.

3 Adjoint equations and dual grid gradients

To derive an explicit expression for the adjoint equation (8), we need to dif-
ferentiate and transpose the residual Rh . Section 3.1 introduces an algebra
on objects such as the fluid state wh , which will simplify the expressions in
the derivation of Section 3.2. We show in Section 3.3 that defining a specific
adjoint equation allows to obtain at once all components of the gradient ∇Jn
with respect to the dual data.

9
3.1 Inner product and differentiation

Let Vw be the vector space of all grid functions like wh (29). If z and q are
in Vw , and zi and qi are their components associated with mesh point i, we
define the scalar zTi qi by the usual matrix operation, complemented with a dot
product for the second element. Moreover, by summing over all nodes V(Ω),
we define the inner product

zTi qi .

z, q
= (31)
i∈V(Ω)

The adjoint of a linear operator L : Vw → Vw , denoted L∗ is defined by

z, Lq
= L∗ z, q
for all z and q in Vw . (32)

For f being defined by (16), the Jacobian matrix of f · n with respect to the
conservative variable w (20) is
 
∂(f · n) ∂(f · n) ∂(f · n) ∂(f · n)
= , , , (33)
∂w ∂ρ ∂m ∂E

whose components are given by (A.1) in the appendix. The Jacobian matrix
of the same quantity with respect to the primitive variables v (21) is
 
∂(f · n) ∂(f · n) ∂(f · n) ∂(f · n)
= , , , (34)
∂v ∂ρ ∂u ∂p

and is detailed by (A.2). The Jacobian matrix of the dot product f bc · n


denoted ∂(f bc · n)/∂w is given by (A.3) at wall boundaries and by (A.4) at
farfield boundaries.

The Jacobians above are 3-by-3 matrices in which the elements are zeroth-,
first-, and second-order tensors. For q = (q1 , q 2 , q3 )T a 3-by-1 matrix contain-
ing tensors of dimensions like the matrix of conservative variables (20), we
define the matrix operations
   T
T ∂(f · n) ∂(f · n)
q , q, (35)
∂w ∂w

in which the component-wise multiplication also includes a dot product for


the second element of q. Moreover, the operation

qT f = f T q , (36)

returning a first-order tensor, may also be defined unambiguously. A dot prod-


uct is also here involved when multiplying the second component of f and q.

10
3.2 Sensitivities and adjoint fluxes

Sensitivity equations

For the ease of the presentation, the residual Rh (29), whose nodal values are
defined by expressions (23), is split into a convection and a boundary term:

Rh (wh , nh ) ≡ Ph (wh , nh ) + Bh (wh , nh ) , (37)

where the artificial dissipation fluxes in (23) are neglected, and where
 
 Ph (wh , nh )i = fij · nij ∀i ∈ V(Ω) ,


j∈Ni (38)

 B (w , n ) = f bc · n

∀i ∈ V(∂Ω) and 0 otherwise.
h h h i i i

For an arbitrary variation δnh of the dual grid data nh , defined by (30), the
first variation of equation (5), defines the flow sensitivities equation

∂Rh ∂Rh
δwh = − δnh ∀δnh , (39)
∂wh ∂nh

where


∂Rh ∂Ph ∂Bh

 δwh = δwh + δwh
∂wh ∂wh ∂wh

∂Rh ∂Ph ∂Bh (40)
δnh = δnh + δnh ,



∂nh ∂nh ∂nh
and where
   
 ∂Ph
  1 ∂(fi · nij ) ∂(fj · nij )
 δwh = δwi + δwj ∀i ∈ V(Ω) ,
 ∂wh j∈N 2 ∂wi ∂wj



i i
(41)
∂(fibc · ni )
 
∂Bh


δw = δwi ∀i ∈ V(∂Ω) and 0 otherwise ,


h

∂wh ∂wi


i

 
 ∂Ph
 
 δnh = fij · δnij ∀i ∈ V(Ω) ,
 ∂nh



i j∈Ni
  (42)
∂Bh


 ∂n δnh = fibc · δni ∀i ∈ V(∂Ω) and 0 otherwise.




h i

11
Inner product

We form a product like (32) where L = ∂Rh /∂wh and, zh and qh are two
arbitrary elements in Vw :
     
∂Rh ∂Ph ∂Bh
zh , qh = zh , qh + zh , qh . (43)
∂wh ∂wh ∂wh

Definition (31) and relations (41) yield that


   
∂Ph   1 ∂(fi · nij ) ∂(fj · nij )
zTi qi + zTi

zh , qh = qj ,


∂wh 2 ∂w ∂w


i j


i∈V(Ω) j∈N i
(44)
∂(fibc · ni )
 
 ∂Bh
zTi

zh , qh = qi .



∂wh ∂wi



i∈V(∂Ω)

In order to identify the adjoint operator L∗ = (∂Rh /∂wh )∗ , as defined by (32),


we must express the double summation in (44) as a sum over all nodes i of a
term that can be factorized by qi , that is, a term of the form qTi Gi . The vector
Gi will then be the component, at node i, of the adjoint of the convection
fluxes ∂Ph /∂wh times the vector zh . Note that the summation involving the
Jacobians of the boundary fluxes in (44) can trivially be expressed in that way,
simply by transposing the term under the summation, since these are scalars:
T ∗
∂(fibc · ni )
    
∂Bh ∂Bh
qTi

zh , qh = zi = zh , qh , (45)
∂wh i∈V(∂Ω)
∂wi ∂wh

∗ T
∂(fibc · ni )
  
∂Bh
zh = zi ∀i ∈ V(∂Ω) and 0 otherwise.
Thus ∂wh i
∂wi

(46)
Observe that the double sum on the right side of (44) is of the form
 
eij ,
i∈V(Ω) j∈Ni

 Contributions
in which eij is an algebraic expression associated with edge ij.

to the double sum associated with edge ij occur once for i ∈ V(Ω) when
j ∈ Ni and once for j ∈ V(Ω) when i ∈ Nj . Thus, instead of a double sum
over all nodes and all neighbors, we may equivalently sum once over all edges,
and add contributions from both nodes associated with edge ij.  This gives a
proof for the following Lemma:

Lemma 1 Let G ≡ (V, A) be an oriented graph, in which V is the list of


vertices (i) and A is the list of edges (i, j). Let Ni , for each vertex i = j in V ,

12
be the list of vertices j in V such that there is an edge in A connecting i and
j. Given a list of edge-based data {eij , eji }ij∈A
 , it holds that
  
eij = [eij + eji ] .
i∈V j∈Ni 
ij∈A

Transposition

Denoting by E(Ω) the list of oriented edges and applying Lemma 1 to the
double summation in (44), yields
  
∂Ph  1 ∂(fi · nij ) ∂(fj · nij )
zh , qh = zTi qi + zTi qj
∂wh 
2 ∂w i ∂wj
ij∈E(Ω)
 (47)
∂(fj · nji ) ∂(fi · nji )
+zTj qj + zTj qi .
∂wj ∂wi

Transposing the products vector-matrix-vector and observing that nij = −nji


(see §4), we obtain
    T
∂Ph  1
qT
∂(fi · nij )
zh , qh = i (zi − zj )
∂wh 
2 ∂wi
ij∈E(Ω)
 T  (48)
∂(fj · nji )
+qTj (zj − zi )
∂wj

The summation over the edges in (48) is of the same type than the summation
on the right side of the identity of Lemma 1, therefore
   T
∂Ph  1 ∂(fi · nij )
qTi

zh , qh = (zi − zj ) . (49)
∂wh i∈V(Ω) j∈Ni 2 ∂wi

from which we may identify the adjoint of the Jacobian of the convective fluxes
as
 ∗   T
∂Ph  1 ∂(fi · nij )
zh = (zi − zj ) ∀i ∈ V(Ω) . (50)
∂wh i j∈Ni 2 ∂wi

Expressions (50) and (46) together define the adjoint of ∂Rh /∂wh , that is, for
any zh  ∗  ∗  ∗ 
∂Rh ∂Ph ∂Bh
zh ≡ + zh . (51)
∂wh ∂wh ∂wh

13
3.3 Adjoint equation and gradient ∇Jn

We denote by wh∗ the adjoint state, that is the steady state solution of the
adjoint equation
∗
dw∗
   
∂Rh ∂J
Vi i + wh∗ = , for all i ∈ V(Ω) , (52)
dt ∂wh i
∂wh i

where (∂Rh /∂wh )∗ is defined by (51), (∂J/∂wh ) is given by (A.5) and (A.10)-
(A.12). The residuals of the adjoint equation (52) have an edge-based for-
mulation, which means that the numerical fluxes associated with (50) can be
computed doing one loop over all edges. The artificial dissipation fluxes were
not differentiated but the same scheme is used for solving the adjoint equation
to steady state. Convergence is obtained by explicit time integration and ac-
celerated by local time stepping, multigrid, and implicit residual smoothing,
similarly as for equation (22).

Let δwh be the solution of the sensitivity equations (39) given an arbitrary
variation δnh , the variation of Jn (see Table 1) is expressed as
 
∂J ∂J
δJn = , δwh + δnh . (53)
∂wh ∂nh

Making use of the adjoint equation (52) at steady state, expression (53) is
equivalent to  ∗ 
∂Rh ∂J
δJn = wh∗ , δwh + δnh , (54)
∂wh ∂nh
which, using the definition (32) of the adjoint, and that δwh and δnh satisfy
equation (39), yields
 
∂Rh ∂J
δJn = − wh∗ , δnh + δnh . (55)
∂nh ∂nh

We replace the product ∂Rh /∂nh with δnh by expressions (42) and use the
inner product definition (31) in order to express (55) as
∂J
wi∗ T wi∗ T fibc · δni +
  
δJn = − fij · δnij − δnh , (56)
i∈V(Ω) j∈Ni i∈V(∂Ω)
∂nh

where ∂J/∂nh is given by (A.7) and (A.13)-(A.15) in appendix. The compo-


nents of the gradient ∇Jn are better identified using Lemma (1) together with
the fact that nij = −nji (see Section 4), and fij = fji (24) in (56), which
yields
  T ∂J
wi∗ − wj∗ wi∗ T fibc · δni +

δJn = − fij · δnij − δnh . (57)
 i∈V(∂Ω)
∂nh
ij∈E(Ω)

14
Expression (57) gives the components of ∇Jn , that is, the operations described
by (9).

4 Primal grid gradient

Following the descriptions given in Section 1.3, and using the notations in
Table 1, we proceed by computing the gradient of function JX with gradient
expression (57) as starting point. For variations δnh due to a variation of
the nodal coordinates δXh , obtained by differentiating expression (4), the
corresponding variation of the function JX is given by expression (57), plus
the explicit partial derivative of J with respect to Xh :

  T
wi∗ − wj∗ wi∗ T fibc · δni

δJX = − fij · δnij −

ij∈E(Ω) i∈V(∂Ω)
(58)
∂J ∂J
+ δnh + δXh .
∂nh ∂Xh

In order to give expressions that allow an efficient computation of ∇JX we


must express δnh from δXh . The surface normals, as described for the median
dual grid in [4], are expressed for 2D meshes in Section 4.1 and for 3D meshes
in Section 4.2. Given the gradient with respect to the surface normals ∇Jn ,
application of the chain rule leads to algorithms in Section 4.3 to compute the
three first terms in (58). These terms, denoted GX , are the implicit part of
the gradient with respect to the nodal coordinates. The partial derivative with
respect to the nodal coordinates is given in appendix by (A.9) and (A.16). The
gradient of JX is thus:
 T
∂J
∇JX = GX + . (59)
∂Xh

4.1 2D dual grid

Let P denote
 any 2Dmesh element (a triangle or a quadrilateral) with mP
vertices xk1 , ..., xkmP , where kl , 1 ≤ l ≤ mP , are nodal indexes, and xkl the
d coordinates of node kl (in 2D, d = 2). Let ez be a unit vector, perpendicular
to the plane, whose direction defines the ordering of P ’s vertices by the “right-

15
P2 P1

P3 j ez
i
nij P4
i P2
Q
1 Q2 P1
ni
Fig. 1. In 2D the orientation of one Fig. 2. The vertices at boundary edges
vector ez , perpendicular to the plane in 2D are ordered according to the or-
of the mesh, gives the orientation of dering of the interior elements. The
elements vertices P1 , ..., P4 . The me- dual control volume associated with
dian dual grid used by Edge is de- node i is depicted by dashed lines.
picted by dashed lines.

 be a directed edge of P . We define


hand-rule” (Figure 1). Let ij

 coincides

1 if the orientation of ij


γijP = with the orientation given by ez , (60)


−1 otherwise.

We denote by xP the centroid of the element P and by xij the midpoint of



edge ij,
mP

 xP =
 1 

xk ,
mP l=1 l (61)

 x = 1 (x + x ) .

ij 2 i j

 as an edge (that is, two elements


Let Eij be the set of elements that admit ij
for an interior edge and one element for an edge on the boundary). The surface
vector nij for this dual mesh [4], is given by
 
γijP xP − xij .

nij = −ez × (62)
P ∈Eij


The vertices of a boundary edge E are ordered as the vertices of the interior
element P to which it belongs (Figure 2). Let Ei be the set of boundary edges
containing node i (that is two). Denoting k1 , k2 the vertices of E, the integrated
normal to the dual control face at node i is
1 
n i = − ez × (xk2 − xk1 ) . (63)
2 E∈Ei

Expressions (60)-(63) give the explicit form of the function (4) in the 2D case.

16
P1
ni
i
P4 P2
S2
P3 i
nij
E1
E2
S2 S1
j S3 S1
P5
P8
P6
S4
P7

Fig. 3. The dual grid control surface Fig. 4. The dual grid control surface
 and contained in
attributed to edge ij attributed to boundary node i and
element P is depicted by the dotted contained in the surface element S
lines. (vertices S1 , S2 , S3 and S4 ) is delim-
ited by the dotted lines.

4.2 3D dual grid

Let P be any 3D element and denote by S1 and S2 the two faces of P sharing
 The ordering of the vertices of P is matter of convention and,
the edge ij.
in the case of the hexahedron, Figure 3 respects the convention used by the
preprocessor of Edge. It is also a convention to chose the ordering of the faces
S1 and S2 , and we chose it to be like in Figure 3. Let xP be the centroid of P ,
 and xS1 , xS2 the centroids of S1 and S2 , respectively.
xij the mid-point of ij,
The integrated surface normal associated with edge ij  is
    
nij = 1
2
xP − xij × xS2 − xS1 , (64)
P ∈Eij


 as an edge. A similar expression


where Eij is the set of elements that admit ij
defines the surface vector at the boundary node i, ni . Let S be a surface
element on the boundary containing node i. Call E1 and E2 the two edges of
S for which i is a vertex. If E1 and E2 are ordered as given by the direction
of the outward-directed vector ni (in Figure 4), then
    
ni = 1
2
xS − xi × xE2 − xE1 , (65)
S∈Ei

where Ei is the set of surface elements on the boundary that contain node i.
Expressions (64)-(65) give the explicit form of the function (4) in the 3D case.

17
4.3 Gradients on the primal grid

The relation between the gradients ∇Jn and GX in expression (59) is


  
(GX )i · δxi = (∇Jn )ij · δnij + (∇Jn )i · δni , (66)
i∈V(Ω) 
ij∈E(Ω) i∈V(∂Ω)

where, given the mapping Xh → nh , defined in 2D by (62)-(63) and in 3D


by (64)-(65), δnij and δni are defined by
dnij dni
δnij = δXh and δni = δXh ∀δXh . (67)
dXh dXh

4.3.1 Gradient in 2D

For an arbitrary δXh , differentiating relations (62)-(63) yields


 
γijP δxP − δxij ,

δnij = −ez ×
P ∈Eij


1  (68)
δni = − ez × (δxk2 − δxk1 ) .
2 E∈Ei

Making use of (68) in (66) yields


 
γijP δxP − δxij
  
(GX )i · δxi = − (∇Jn )ij · ez ×
i∈V(Ω) 
ij∈E(Ω) P ∈Eij


 1  (69)
− (∇Jn )i · ez × (δxk2 − δxk1 ) ,
i∈V(∂Ω)
2 E∈Ei

T
 
where (∇Jn )ij = −fij T wi∗ − wj∗ and (∇Jn )i = −fibc wi∗ +∂J/∂ni , according
to (57).

Using the identities

v 1 · v 2 × v 3 = −v 3 · v 2 × v 1 = v 2 · v 3 × v 1 , (70)

which hold between three vectors v 1 , v 2 , v 3 in R3 , expression (69) may be


written
 
γijP δxP − δxij · ez × (∇Jn )ij
  
(GX )i · δxi =
i∈V(Ω) 
ij∈E(Ω) P ∈Eij


  1 (71)
+ (δxk2 − δxk1 ) · ez × (∇Jn )i ,
i∈V(∂Ω) E∈Ei
2

which is an edge-based formula for the calculation of GX . An element-based


formula is also given in [1].

18
4.3.2 Gradient in 3D

For an arbitrary δXh , relations (64)-(65) yield

    
δnij = 1
2
δxP − δxij × xS2 − xS1
P ∈Eij

    
+ 1
2
xP − xij × δxS2 − δxS1 ,
P ∈Eij

     (72)
δni = 1
2
δxS − δxi × xE2 − xE1
S∈Ei
    
+ 1
2
xS − xi × δxE2 − δxE1 .
S∈Ei

Making use of (72) in (66) yields

    
1
δxP − δxij × xS2 − xS1
 
(GX )i · δxi = 2
(∇Jn )ij ·
i∈V(Ω) 
ij∈E(Ω) P ∈Eij

    
1
xP − xij × δxS2 − δxS1

+ 2
(∇Jn )ij ·

ij∈E(Ω) P ∈Eij

    
1
δxS − δxi × xE2 − xE1

+ 2
(∇Jn )i ·
i∈V(∂Ω) S∈Ei
    
1
xS − xi × δxE2 − δxE1 ,

+ 2
(∇Jn )i ·
i∈V(∂Ω) S∈Ei
(73)
T
 
where (∇Jn )ij = −fij T wi∗ − wj∗ and (∇Jn )i = −fibc wi∗ +∂J/∂ni , according
to (57).

Using the identities (70), the relation (73) is rewritten as

    
1
δxP − δxij · xS2 − xS1 × (∇Jn )ij
 
(GX )i · δxi = 2
i∈V(Ω) 
ij∈E(Ω) P ∈Eij

    
1
δxS2 − δxS1 · xP − xij × (∇Jn )ij

− 2

ij∈E(Ω) P ∈Eij

    
1
δxS − δxi · xE2 − xE1 × (∇Jn )i

+ 2
i∈V(∂Ω) S∈Ei
    
1
δxE2 − δxE1 · xS − xi × (∇Jn )i ,

− 2
i∈V(∂Ω) S∈Ei
(74)
which is an edge-based formula for the calculation of GX . The equivalent
element-based expression is given in [1].

19
5 Mesh deformation

The mesh deformation (3) is defined here, which also defines the function
Jd according to Table 1. After a description of the mesh equation, we de-
tail the calculation of the gradient ∇Jd from ∇JX obtained above, that is,
operations (12).

The mesh deformation equation (3) is an edge-based smoother suggested in [6].


Recalling that the superscript 0 refers to the mesh at initial design, we will
denote by v i ∈ Rd the vector of displacement at node i, kij0 a strictly positive
 n0ij the normal surface vector associated
scalar associated with the edge ij,
 (see §4), and t0ij the vector x0j − x0i . The set of equations for the mesh
to ij
deformation is
0
 kij |n0ij |

(v j − v i ) = 0 ∀i ∈ V(Ω) ,


0

 j∈Ni |tij |



(75)


 v i = di ∀i ∈ V(∂Ωw ) ,


vi = 0 ∀i ∈ V(∂Ω) , i ∈ V(∂Ωw ) ,

where di is the imposed displacement at node i. Note that for constant coef-
ficients kij0 the equation (75) defines one un-coupled system of equations per
component in the system of coordinates. The diffusivity kij0 is chosen as

1
kij0 = , (76)
|t0ij |

in order to create a larger diffusion of the displacements along short edges


than along long edges. Using matrix and vector notations we rewrite the above
system of equations as:
    
′′
A Cv   0 
  = , (77)
0 I v′ dh

where v′′ is the vector of all nodal displacements for the interior nodes, v′′ =
{v}i∈V(Ω) , v′ is the vector giving the nodal displacements on the boundary, A
is the block matrix associated to the interior nodes, C is the block matrix that
couples the interior nodes to the boundary nodes and I is the identity block
on the boundary. Note that we extended here the definition (1) of the vector
of nodal displacements dh to all boundary nodes; this means that di = 0 for
i ∈ V(∂Ω) , i ∈ V(∂Ωw ). The matrix formulation (77) is used here for the sake
of the presentation.

20
Solving the adjoint problem (the matrix A is symmetric)

Av∗′′ = ∇JX ′′ , (78)

where v∗′′ and ∇JX ′′ denote the interior node values of the adjoint displace-
ments vector and of the gradient with respect to the nodal coordinates, re-
spectively. The expression for the gradient ∇Jd reads

∇Jd = −CT v∗′′ + ∇JX ′ , (79)

where ∇JX ′ denotes the boundary node values of the gradient with respect to
the nodal coordinates.

Finally, equations (77) and (78) are solved using a textbook Jacobi precondi-
tioned conjugate gradient algorithm.

6 2D optimization at transonic speed

The shape of the RAE 2822 airfoil is here optimized with respect to the cost
function (7) at Mach number M = 0.734, and angle of attack α = 2.19 degrees.
The mesh is of medium size, with 13352 nodes in total and 224 nodes on the
airfoil.

Preliminary tests suggested the choice of the following parameters in (7):


1 10 10
µD = 0 , µL =  2 , µM =  2 ,
10CD CL0 0
CM

The optimization is performed using a limited memory quasi-Newton algo-


rithm described in this reference [10]. The parameterization is described in
Section 6.1 and the results are presented in Section 6.2.

6.1 Parameterization with constraints

We briefly describe the airfoil shape parameterization, introduced in [1], which


defines (2) and the function Ja (Table 1). Thereafter, the calculation of the
gradient ∇Ja from the gradient with respect to the displacements ∇Jd is
detailed, that is, the operations (13) and (14) in the introduction..

We allow only displacements normal to the reference shape. The displace-


ments (1) are thus defined by scalars ri , and a unit normal vector n̂0i on the
reference shape:
di = ri n̂0i ∀i ∈ V(∂Ωw ) . (80)

21
In order to avoid wavy shapes and to impose linear geometrical constraints,
the method presented in [1] imposes that the normal displacements ri are
solutions of a Karush-Kuhn-Tucker (KKT) system of equation:
    
 K −B   rh   Mah 
   =  , (81)
−BT 0 λ −b

where rh = {ri }i∈V(∂Ωw ) is the vector of normal displacements, K is the stiffness


matrix associated with the discretization of d2 /d2 s, denotes the curvilinear
coordinates s on the airfoil with homogeneous Dirichlet boundary conditions
at the trailing edge. Moreover, M is a mass matrix, the columns of the matrix
B are the gradients of the constraints imposed on the displacements (in Rn×mg
if n is the size of V(∂Ωw ) and mg is the number of geometrical constraints), b
is the vector of values of the constraints (in Rmg ), and, λ ∈ Rmg is a vector of
Lagrange multipliers associated with the constraints.

In the application presented below, the geometrical constraint is to impose


a constant (linearized) cross-sectional area of the airfoil. Denoting by S this
area, a variation with respect to the initial design can be written

S (rh ) − S0 = −

ri |ni | ,
i∈V(∂Ωw )

where we neglected second order terms, and it should be equal to zero (b = 0


in (81)). The coefficients of B (here a vector) are

(B)i,1 = −|ni | .

Given the gradient of the cost function (7) with respect to the displacements
∇Jd , the components of the gradient with respect to rh , denoted ∇Jr are
obtained by
2
(∇Jd )i,l n̂0i,l ,

(∇Jr )i =
l=1
where the second underscript ,l refers to l Cartesian coordinate. Solving the
system of adjoint equations
    
T ∗
 K −B   rh   ∇Jr 
  =  , (82)
−BT 0 λ∗ 0

yields the reduced gradient

∇Ja = MT r∗h . (83)

22
140 0.9

0.8
120
0.7

100
0.6
D
10 C
4

0.5
80

0.4
60
0.3

40 0.2
0 10 20 30 40 50 0 10 20 30 40 50
iteration iteration

Fig. 5. Pressure drag (square-solid), lift (triangle-solid) and pitching moment (cir-
cle-solid) coefficients. The values at initial design are indicated by horizontal lines
(solid).
6.2 Results

The results are summarized in Table 2. The reduction of the drag is achieved
by a smoothing of the shock wave on the suction side, see Figure 6. The
changes on the geometry of the airfoil are a reduction of the thickness on the
first half of the airfoil, between the leading edge and half the chord length,
and an increase of the thickness on the second half of the airfoil. Changes
on the pressure side of the airfoil are due to the constraint imposed on the
displacement, that is, to conserve the linearized cross sectional area of the
wing, as well as to conserve the pitching moment. Note that the variations
of lift and pitching moment are less than one percent (Table 2). Moreover,

1.5 0.08

1
0.04
0.5

−Cp
y/c

0 0

−0.5
−0.04
−1

−1.5 −0.08
0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1
x/c x/c

Fig. 6. Pressure coefficients and shapes at initial (solid) and final design (dash).
comparing the curvature of the optimized shape with the one of the initial
geometry (Figure 7) indicates that the parameterization (see §6.1) produces
smooth designs. Note that such is the case at each iteration of the optimization

23
104 · CD CL CM
Initial 130 8.38 × 10−1 3.42 × 10−1
Optimized 56 8.33 × 10−1 3.42 × 10−1
Table 2
Minimization of the pressure drag of the RAE 2822 at constant linearized volume
(cross sectional area) with penalties on the variations of the lift and pitching moment
coefficients.

process.

3
10

2
10
curvature(s/L)

1
10

0
10

−1
10

−2
10

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1


s/L

Fig. 7. Curvature distribution in non dimensionalized curvilinear coordinate (s/L)


at initial (solid) and final design (dash).

7 3D optimization at transonic speed

The ONERA M6 wing, described in the AGARD report [26], is optimized at


Mach number M = 0.8395 and angle of attack α = 3.06o . The parameterization
is described in the following Section 7.1 and the results are presented and
discussed thereafter in Section 7.2. The optimization is performed using a the
BFGS quasi-Newton algorithm with Hessian update [23], combined with a line
search. The parameters in (7) were chosen as:

1 1
µD = 1 , µL =  2 , µM =  2 ,
CL0 0
CM

24
1

0.8 x
y
0.6 z
s (y)

θ(y)
n,i

0.4
cz (x,y)
0.2

0
0 0.2 0.4 0.6 0.8 1
y/L

Fig. 8. Left: Basis functions (n = 6) for the parameterization of the distributions of


twist, camber and thickness, in the spanwise direction (fixed geometry at the root
y = 0). Right: a sketch representing effects of the twist (θ (y)) about the trailing
edge and of a camber deformation on the parameterized shape.

7.1 Parameterization of the twist, camber and thickness

We detail here what was presented formally in introduction by the opera-


tions (2), (13) and (14), for the case of explicit relations defining the mapping
ah → dh , the one formulated as a residual equation (2).

Functions controlling the camber, denoted c (y), the twist about the trailing
edge, denoted θ (y), and the relative distance to the z = 0 plane of the nodes in
the z > 0 half domain, denoted d+ (y), and the relative distance to the z = 0
plane of the nodes in the z < 0 half domain, denoted d− (y), are parameterized
by a representation in a basis of functions as follows:

n+1

c (y) = cn,i sn,i (y) ,
i=1
n+1

θ (y) = θn,i sn,i (y) ,
i=1
n+1
(84)
d+ (y) = d+

n,i sn,i (y) ,
i=1
n+1
d− (y) = d−

n,i sn,i (y) ,
i=1


where cn,i , θn,i , d+
n,i and dn,i are real numbers and sn,i (y) are splines (see

25
Figure 8):

  2  3
y y
, i ≤ n , y ≤ hLn,i ,

sn,i (y) = 3 L −2 L



hn,i hn,i





 2 3
y − hLn,i y − hLn,i
  
s n,i (y) = 1 − 3 +2 , i ≤ n , hLn,i ≤ y ≤ L ,
hR hR




 n,i n,i
y 2 y 3

  

 sn,n+1 (y) = 3 −2 , y ≤ L,


L L
(85)
where L is the span width and:

 L R
 hn,i + hn,i =L ,

iL (86)

 hLn,i = .
n+1

The leading and trailing edges are lines in the plane z = 0. The streamwise
coordinate is x, and we denote by xT (y) the x-coordinate of the point on the
trailing edge, respectively, xL (y) the x-coordinate of the point on the leading
edge, at coordinate y in the spanwise direction. Thus the x- and z- coordinates
of any point on the parameterized geometry, denoted with upperscript new , in
the section y of the wing is mapped here from the reference geometry, denoted
(x, z), and the parameters of the camber and twist (84) as:

y new = y ,
 2
x4 − x 2
c̃ (y) = c (y) , (scaling)
xT (y) − xL (y)
cz (x, y) = c̃ (y) (x − xT (y)) (xL (y) − x) ,
1
nz (x, y) = ! ,
1 + c̃ (y) (xT (y) + xL (y) − 2x)2
2 (87)
nx (x, y) = c̃ (y) nz (x, y) (2x − xT (y) − xL (y)) ,
xnew (x, y) = xT (y) + cos (θ (y)) (x + znx (x, y) − xT (y)) +
sin (θ (y)) (cz (x, y) + znz (x, y)) ,
new
z (x, y) = −sin (θ (y)) (x + znx (x, y) − xT (y)) +
cos (θ (y)) (cz (x, y) + znz (x, y)) .

In (87), cz (x, y) parameterizes a camber ’line’ at constant y, and (nx (x, y) , nz (x, y))
are the coordinates of the unit normal vector to this camber line. We denoted
by x4 , respectively x2 , the streamwise coordinate of the leading edge, respec-
tively the trailing edge, at the tip of the wing. The parameterization (84)-(87)
is called ’CT’ in the following. Adding the thicknesses, to the camber and the

26
twist parameterizations yields:
  
z̃ (x, y) = 1 − ω sin d+ (y) z , if z ≥ 0
  
z̃ (x, y) = 1 − ω sin d− (y) z , if z ≤ 0
new
x (x, y) = xT (y) + cos (θ (y)) (x + z̃ (x, y) nx (x, y) − xT (y)) + (88)
sin (θ (y)) (cz (x, y) + z̃ (x, y) nz (x, y)) ,
z new (x, y) = −sin (θ (y)) (x + z̃ (x, y) nx (x, y) − xT (y)) +
cos (θ (y)) (cz (x, y) + z̃ (x, y) nz (x, y)) ,

where cz , nx , nz are calculated as in (87), and ω = 0.3 is used to bound the


changes of thickness. In the following the parameterization (84)-(88) is called
’TCT’.

In the present case, the gradient ∇Ja is obtained by applying the chain rule:
 T
ddh
∇Ja = ∇Jd , (89)
dah

where the Jacobian matrix can be obtained at a cost that is negligible in


regard to, say, the mesh deformation, if using a perturbation technique. The
present technique involves complex arithmetic [28], which avoids the round-off
errors of finite differences methods, while producing derivative approximations
to almost machine precision.

In the following CT refers to the tests where the wing is parameterized in terms
of the camber and twist distributions, and TCT refers to the parameteriza-
tion in terms of the thicknesses, the camber and the twist distributions. The
extension ’-3s’, for example, refers to a parameterization with n = 3 in (84).

7.2 Results

The gradients of the drag, lift and pitching moment coefficients, obtained by
the method of adjoints, are compared to finite differences approximations. For
clarity of presentation, the results shown in Figure 9 are for the components
relative to the twist, but the behavior is the same for components relative
to the camber and the thicknesses parameters. The method of finite differ-
ences, used here to give an approximation of the exact gradient, suffers from
round-off errors for too small perturbation parameters and inaccuracy for too
large perturbation parameters. The results indicate however that the adjoint
gradients are accurate with at most one percent error.

27
CD: adj. vs FD sensitivities w.r.t twist C : adj. vs FD sensitivities w.r.t twist
L
−1 −1
10 10

relative error
relative error

−2 −2
10 10

−3 −3
10 −6 −4 −2
10 −6 −4 −2
10 10 10 10 10 10
perturbation perturbation

C : adj. vs FD sensitivities w.r.t twist


M
−1
10

−2
relative error

10

−3
10

−4
10 −6 −4 −2
10 10 10
perturbation

Fig. 9. Comparison finite difference approximations against adjoint method, of the


derivatives with respect to parameters of the twist distribution for the case n = 3:
θ3,1 (circles), θ3,2 (squares), θ3,3 (crosses), θ3,4 (triangles).

The results of the optimizations are summarized in Table 3. Figures 10-13,


show the pressure coefficients and sections of the re-designed wings, at loca-
tions indicated in % of wingspan, where 0 is at the root and 100 is at the tip.
Note that the data used in these plots are obtained by interpolation in the
cutting plane from computed pressures at nodes that do not always lay in the
plane, as we use an unstructured mesh. In Figure 14 the pressure iso-surfaces
and a number of streamlines are plotted in order to illustrate important fea-
tures of the flow before and after optimization, such as the strength of the
shocks on the suction side and the vortex at the tip.

The common trends are illustrated by the examples of results shown in the
figures. The reduction of the drag is achieved in all cases by a weakening of
the shocks and of the lift-induced drag. In particular, in Figure 14, we observe
a downstream shift of the wingtip vortex, more pronounce as the parameteri-
zation is finer (larger n in (84)). The same behavior has been observed for all
the tests.

In Figure 10 and 11 we compare the results obtained for n = 1 from the CT

28
0 = 144 C 0 = 0.331
CD 0 = 0.113
CM J 0 = 0.0144
L

104 .∆CD ∆CL /CL0 0


∆CM /CM ∆J/J 0
CT-1s −25 −1.406E − 02 2.984E − 03 −1.572E − 01
CT-2s −27 −1.051E − 02 9.323E − 04 −1.812E − 01
CT-3s −29 −8.323E − 03 −3.716E − 04 −1.931E − 01
CT-4s −28 −7.842E − 03 −6.184E − 04 −1.915E − 01
CT-5s −29 −8.643E − 03 −1.937E − 04 −1.928E − 01
CT-6s −29 −8.542E − 03 −4.367E − 04 −1.951E − 01
TCT-1s −30 −1.633E − 02 1.376E − 03 −1.927E − 01
TCT-2s −32 −1.285E − 02 3.627E − 03 −2.113E − 01
TCT-3s −31 −8.430E − 03 8.615E − 05 −2.075E − 01
TCT-4s −31 −1.089E − 02 −2.345E − 03 −2.035E − 01
TCT-5s −31 −9.962E − 03 1.397E − 03 −2.078E − 01
TCT-6s −31 −1.162E − 02 −1.803E − 04 −2.091E − 01
Table 3
Variations in comparison to the values at initial design, of the drag, in drag counts
(104 .CD ), lift (CL ), and pitching moment (CM ) coefficients, and of the objective
function (J). The results are shown for the parameterizations CT (camber and
twist) and TCT (thickness, camber and twist), varying the number of splines in the
spanwise direction.

and TCT tests to the initial design. The optimized designs are significantly
different due to the addition of the thickness parameters in the case TCT-1s
in comparison with CT-1s. For TCT-1s, the pressure coefficients at more than
50% from the root exhibit weaker shocks after optimization. Near the root (at
20% and 44% of the wingspan on the figures), the second shock, at around
half of the chord length in Figure 10, is significantly weakened for the TCT
design compared to the CT design, which seems to be obtained by a thinning
of the wing at those locations (Figure 11). From the Table 3 we notice that,
for all cases, the addition of the thicknesses improves the reduction of the
cost function (J), but that differences are smaller if the number of degrees of
freedom is larger.

Indeed, the behavior varies a bit for cases with a larger number of design
variables (n > 1) as the differences between the designs are less visible. The
common behavior is the one given in Figures 12 and 13 by the pressure coef-
ficients and the shapes of the TCT-6s case. That is, under 40% of the span,
the local angle of attack is increased, as well as the average curvature of the
pressure side, while the average curvature on the suction side is decreased.

29
The opposite changes occur at spanwise positions larger than 50% and tend
to be maximum at the tip.

8 Summary and outlook

The derivation of the adjoint of the Euler equations has been given in de-
tails for the case of an edge-based discretization. Expressions of the gradient,
based on the discrete adjoint method, was given with respect to the data that
describe the computational grid (dual grid ), and with respect to all the coordi-
nates of the mesh (primal grid ). The latter is the result of applying the chain
rule and using that the dual grid data (nh ) are differentiable functionals of the
nodal coordinates. This exact transformation, from the gradient with respect
to the dual data to the gradient with respect to the primal data, is executed
at a cost of one loop over all edges. The implementation of this algorithm (see
Section 4) depends on the dimension of the physical space (2D or 3D) but not
on the shape of the elements or on the type of the discretized flow equations.
It is therefore a worthy investment for future developments using the same
type of discretization.

All of these expressions were applied to the aerodynamic optimization of an


airfoil, in 2D, and of a wing, in 3D. There, the optimal control approach,
at the discrete level, involves the unstructured finite volume method for the
flow equations, the mesh deformation equation and, for the 2D example, a
variational formulation to parameterize the shape with constraints.

The design optimization of the airfoil at transonic speed involved more than
200 design variables, and succeeded to reduce the drag while preserving the
coefficients of lift and pitch of the initial design, the RAE 2822. The method of
parameterization enabled to keep constant the linearized cross-sectional area
while ensuring the smoothness of each design during the optimization without
explicit reduction of the size of the design space. The optimization of the
wing (ONERA M6) at transonic flow conditions similarly succeeds to reduce
the drag at constant lift and pitching moment, using a parameterization with
splines of the camber, twist, and thickness in the spanwise distribution.

Concerning the type of applications, the programs developed here have been
used elsewhere for multi-point optimization (optimizing simultaneously at dif-
ferent flight conditions) or coupled to other equations involving the modeling
of multi-physics or multi-scale phenomena, as presented in [1] and [2].

30
Acknowledgements

Funding from the Parallel and Scientific Computing Institute (PSCI) is greatly
acknowledged. This research has received support from the AEROSHAPE
project funded by the European Commission, DG Research, under the GROWTH
initiative (Project Ref: GRD1-1999-10752). The authors are thanksfull for the
comments and suggestions of Per Weinerfelt, Per Lötstedt and Adam Jirasek.

31
1 1
0.5 0.5
−Cp

−Cp
0 0
−0.5 −0.5
20% 44%
−1 −1
0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1
x/c x/c

1 1
0.5 0.5
−Cp

−Cp
0 0
−0.5 −0.5
65% 80%
−1 −1
0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1
x/c x/c

1 1
0.5 0.5
−Cp

−Cp
0 0
−0.5 −0.5
90% 95%
−1 −1
0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1
x/c x/c

Fig. 10. Pressure coefficients at initial design (line), optimized design CT-1s (dots)
and TCT-1s (dashed line).

0.1 0.1

0.05 0.05
z/c

z/c

0 0

−0.05 −0.05
20% 44%
−0.1 −0.1
0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1
x/c x/c
0.1 0.1

0.05 0.05
z/c

z/c

0 0

−0.05 −0.05
65% 80%
−0.1 −0.1
0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1
x/c x/c
0.1 0.1

0.05 0.05
z/c

z/c

0 0

−0.05 −0.05
90% 95%
−0.1 −0.1
0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1
x/c x/c

Fig. 11. Initial design (line), optimized design CT-1s (dots), TCT-1s (dashed line).

32
1 1
0.5 0.5
−Cp

−Cp
0 0
−0.5 −0.5
20% 44%
−1 −1
0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1
x/c x/c

1 1
0.5 0.5
−Cp

−Cp
0 0
−0.5 −0.5
65% 80%
−1 −1
0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1
x/c x/c

1 1
0.5 0.5
−Cp

−Cp

0 0
−0.5 −0.5
90% 95%
−1 −1
0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1
x/c x/c

Fig. 12. Pressure coefficients at initial design (line), optimized design TCT-1s (dots)
and TCT-6s (dashed line).

0.1 0.1

0.05 0.05
z/c

z/c

0 0

−0.05 −0.05
20% 44%
−0.1 −0.1
0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1
x/c x/c
0.1 0.1

0.05 0.05
z/c

z/c

0 0

−0.05 −0.05
65% 80%
−0.1 −0.1
0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1
x/c x/c
0.1 0.1

0.05 0.05
z/c

z/c

0 0

−0.05 −0.05
90% 95%
−0.1 −0.1
0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1
x/c x/c

Fig. 13. Initial design (line), optimized design TCT-1s (dots), TCT-6s (dashed line).

33
Fig. 14. Pressure iso-surfaces and particle tracing around the original design (top). In
the left column, from the second row to the bottom, the optimized designs TCT-1s,
TCT-3s, and TCT-6s. In the right column in grey (dark grey in BW) the shape
at initial design and in yellow (light grey in BW) the optimized shape. Note the
weakened shock and the downstream shift of the tip vortex for the optimized designs
in comparison with the original design.

34
A Jacobians and partial derivatives

The relation (18) between the total energy per unit volume E, the pressure p
and the velocity u was used for deriving the following expressions.

In conservative variables:
 
 0 
∂(f · n)  2

 −u · n u + n(γ − 1) |u|
= ,

∂ρ 

2 

2
n · u (−γE/ρ + (γ − 1)|u| )
 
 n 
∂(f · n) 
 
u · n I + u ⊗ n − (γ − 1)n ⊗ u 

=  , (A.1)
∂m 
 
|u|2

γnE/ρ − (γ − 1) n · u u + n
 
2
 
 0 
∂(f · n)  
=
(γ − 1)n .

∂E 



γu · n

In primitive variables:
 
 u·n 
∂(f · n)  
=
 u · nu  ,

∂ρ 



1 2
2
|u| u · n
 
 ρn 
∂(f · n)  
=

ρu · n I + ρu ⊗ n  ,

(A.2)
∂u 



1 2
ρu · n u + 2 ρ|u| n + γpn
 
 0 
∂(f · n)  
= n .

∂p

 
 
γu · n
 
 0 0 0
∂(f bc · n) 
1

At a wall boundary = (γ − 1)  2 |u|2 n −n ⊗ u n  . (A.3)

∂w 



0 0 0

At a farfield boundary (unless one of the eigenvalues vanish):

35
 
∂ f bc · n ∂ (f · n) dv
= c
L (n̂, v∞ ) H (λ) L−1 (n̂, v∞ ) , (A.4)
∂w ∂v dw
where ∂ (f · n) /∂vc is obtained by evaluating (A.2) at v = vc given by (28),
and dv/dw is the usual Jacobian of the mapping v → w.

In the following expressions, used in the definition of the adjoint of the Euler
equations and in the gradient calculation, the index i is one of the nodes on
the wing or the airfoil (i ∈ V(∂Ωw )):
     
∂J ∂CD   ∂CL
= µD + µL CL − CL0 (A.5)
∂wh i
∂wh i
∂wh i
 

0
 ∂CM
+µM CM − CM , (A.6)
∂wh i

     
∂J ∂CD   ∂CL
= µD + µL CL − CL0 (A.7)
∂nh i
∂nh i
∂nh i
 

0
 ∂CM
+µM CM − CM (A.8)
∂nh i

   
∂J 
0
 ∂CM
= µM CM − CM (A.9)
∂Xh i
∂Xh i
 T
1
Noting qi = 2
|ui |2 , −ui , 1 ,
 
∂CD γ−1
= 1 qi ni · dD , (A.10)
∂wh i
ρ |u |2 Sref
2 ∞ ∞

 
∂CL γ−1
= 1 qi ni · dL , (A.11)
∂wh i
ρ |u∞ |2 Sref
2 ∞

 
∂CM γ−1  
= 1 qi dM · xi − O ref × ni , (A.12)
∂wh i
ρ |u∞ |2 Sref Lref
2 ∞

 
∂CD pi
= 1 dD , (A.13)
∂nh i
ρ |u |2 Sref
2 ∞ ∞

 
∂CL pi
= 1 dL , (A.14)
∂nh i
ρ |u∞ |2 Sref
2 ∞

 
∂CM pi  
= 1 d M × x i − O ref , (A.15)
∂nh i
ρ |u∞ |2 Sref Lref
2 ∞

36
 
∂CM pi
= 1 ni × dM , (A.16)
∂Xh i
ρ |u∞ |2 Sref Lref
2 ∞

References

[1] O. Amoignon, Adjoint-based aerodynamic shape optimization, Tech. Report IT


Licentiate theses 2003-012, Department of Information Technology, Division of
Scientific Computing, Uppsala University, Box 337, SE-751 05 Uppsala, Sweden,
October 2003.
[2] O. Amoignon, Jan O. Pralits, A Hanifi, M. Berggren, and D.S. Henningson,
Shape optimization for delay of laminar-turbulent transition, Accepted for
publication in AIAA Journal (2005).
[3] W.K. Anderson and D.L. Bonhaus, Airfoil design on unstructured grids for
turbulent flows, AIAA Journal 37 (1999), no. 2, 185–191.
[4] T.J. Barth, Aspects of unstructured grids and finite-volume solvers for the Euler
and Navier–Stokes equations, Special Course on Unstructured Methods for
Advection Dominated Flows, AGARD Report 787, May 1991, pp. 6–1–6–61.
[5] O. Baysal and K. Ghayour, Continuous adjoint sensitivities for optimization
with general cost functionals on unstructured meshes, AIAA Journal 39 (2001),
no. 1, 48–55.
[6] M. Berggren, Edge-based mesh movement strategies, 2003, Unpublished
preprint, Sandia National Laboratories.
[7] F. Beux and A. Dervieux, Exact-gradient shape optimization of a 2D Euler
flow, Tech. Report RR-1540, INRIA Sophia Antipolis, 2004 Route des Lucioles,
06360 Valbonne, France, 1991.
[8] G. Bugeda and E. Oñate, Optimum aerodynamic shape design for fluid flow
problems including mesh adaptivity, Int. J. Numer. Meth. Fluids 30 (1999),
161–178.
[9] G.W. Burgreen, O. Baysal, and M.E. Eleshaky, Improving the efficiency of
aerodynamic shape optimization, AIAA Journal 32 (1994), no. 1, 69–76.
[10] R.H. Byrd, P. Lu, J. Nocedal, and C. Zhu, A limited memory algorithm
for bound constrained optimization, Tech. Report NAM-08, Northwestern
University, Department of Electrical Engineering and Computer Science,
Evanston Il 60208, 1994.
[11] P. Eliasson, Edge, a Navier–Stokes solver, for unstructured grids, Tech. Report
FOI-R–0298–SE, Swedish Defence Research Agency, Stockholm, November
2001.

37
[12] J. Elliot and J. Peraire, Aerodynamic design using unstructured meshes, AIAA
Paper (1996), no. 96-1941.
[13] O. Enoksson and P. Weinerfelt, Numerical methods for aerodynamic
optimization, 8th International Symposium on Computational Fluid Dynamics
(Bremen), September 1999.
[14] M.B. Giles and N.A. Pierce, An introduction to the adjoint approach to design,
Flow, Turbulence and Combustion 65 (2000), 393–415.
[15] M.D. Gunzburger, Perspectives in flow control and optimization, Society for
Industrial and Applied Mathematics, Philadelphia, PA, USA, 2002.
[16] A. Jameson, Aerodynamic design via control theory, Journal of Scientific
Computing 3 (1988), 233–260.
[17] A. Jameson and S. Kim, Reduction of the adjoint gradient formula for
aerodynamic shape optimization problems, AIAA Journal 41 (2003), no. 11.
[18] A. Jameson, W. Schmidt, and E. Turkel, Numerical solution of the Euler
equations by finite volume methods using Runge-Kutta time stepping schemes,
AIAA Paper (1981), no. 81-1259.
[19] M.J. Lighthill, A new method of two-dimensional aerodynamic design, Tech.
report, ARC, 1945.
[20] B. Mohammadi, A new optimal shape procedure for inviscid and viscous
turbulent flows, Int. J. Numer. Meth. Fluids 25 (1997), 183–203.
[21] S.K. Nadarajah, The discrete adjoint approach to aerodynamic shape
optimization, Ph.D. thesis, Aeronautics and Astronautics Department,
University of Stanford, 2003.
[22] S.K. Nadarajah and A. Jameson, Studies of the continuous and discrete adjoint
approaches to viscous automatic aerodynamic shape optimization, AIAA Paper
(2001), no. 2001-2530.
[23] J. Nocedal and S. Wright, Numerical optimization, Springer Series in Operations
Research, 1999.
[24] O. Pironneau, Optimal shape design for elliptic systems, Springer Verlag, 1984.
[25] J. J. Reuther, A. Jameson, J. J. Alonso, M. J. Rimlinger, and D. Saunders,
Constrained multipoint aerodynamic shape optimization using an adjoint
formulation and parallel computers, part 1, J. Aircraft 36 (1999), no. 1, 51–
60.
[26] V. Schmitt and F. Charpin, Pressure distributions on the ONERA-M6-WING
at transonic mach numbers, Experimental Data Base for Computer Program
Assessment, AGARD-AR-138, May 1979, pp. B1–1–B1–44.
[27] B.I. Soemarwoto, Multi-point aerodynamic design by optimization, Ph.D. thesis,
Delft University of Technology, Faculty of Aerospace Engineering, P.O. Box
5058, 2600 GB Delft, Netherlands, 1996.

38
[28] W. Squire and G. Trapp, Using complex variables to estimate derivatives of real
functions, SIAM Review 40 (1998), no. 1, 110–112.

[29] C. Sung and J.H. Kwon, Accurate aerodynamic sensitivity analysis using adjoint
equations, AIAA Journal 38 (2000), no. 2, 243–250.

39
Paper II
Shape optimization for delay of laminar-turbulent
transition

Olivier Amoignon,
Uppsala University, SE-751 05 Uppsala, Sweden

Jan O. Pralits,
DIMEC, Università di Salerno, 84084 Fisciano (SA), Italy

Ardeshir Hanifi, Martin Berggren§ and Dan S. Henningson¶
Department of Computational Physics, Division of Systems Technology, FOI, SE-164 90 Stockholm, Sweden

A method using gradient based optimization is introduced for design of wing profiles
with the aim of Natural Laminar Flow as well as minimum wave drag. The Euler equations
of gas dynamics, the laminar boundary layer equations for compressible flows on infinite
swept wings, and the linear parabolized stability equations (PSE) are solved in order to
analyze the evolution of convectively unstable disturbances. Laminar-turbulent transition
is assumed to be delayed by minimizing a measure of the disturbance kinetic energy of
a chosen disturbance, which is computed using the PSE. The shape gradients of the dis-
turbance kinetic energy are computed based on the solutions of the adjoints of the state
equations named above. Numerical tests are carried out to optimize the RAE 2822 airfoil
with the aim to simultaneously delay the transition, reduce the pressure drag coefficient
and maintain the coefficients of lift and pitch moments. Constraints are also applied on the
geometry. Results show a reduction of the total amplification of a large number of distur-
bances, which is assumed to represent a delay of the transition in the boundary layer. As
delay of the transition implies reduction of the viscous drag, the present method enables
shape optimization to perform viscous drag reduction.

Nomenclature

As Stiffness matrix for d2 /ds2


C Constant coefficients matrix (Rn×m )
CD , CL , CM Drag, lift, pitch-moment coefficients
Cp Pressure coefficient
E Total energy density in kg/m/s2
E Set of edges
L Constant coefficients matrix (RdN ×n )
M Mach number
∗ PhD student at the Department of Information Technology
† Researcher and Member AIAA, also Research Engineer at FOI
‡ Researcher
§ Researcher, also Senior Lecturer at the Department of Information Technology, Uppsala University, SE-751 05 Uppsala,

Sweden
¶ Researcher, also Professor at the Department of Mechanics, KTH, SE-100 44 Stockholm, Sweden

1 of 35

American Institute of Aeronautics and Astronautics


MQ Diagonal matrix diag(0, 1, 1, 1, 0)
Ms Mass matrix
N Total number of nodes in Euler grid
NE N-factor based on disturbance kin. energy
Ni Set of nodes connected to i by an edge
P Pressure, dimensionless
Pr Prandtl number  T
Q̄ State of mean flow Ū , V̄ , W̄ , T̄
 T

Q Disturbance state vector ρ̃, Ũ , Ṽ , W̃ , T̃
R Specific gas constant
Res , Re Reynolds numbers based on lengths s, l0
Ri Residual at node i (3-by-1 matrix of tensors)
T Temperature, dimensionless
U, V, W Velocity components, dimensionless
V Dual control volume
X Vector of Euler nodal coordinates (RN d )
X1 Downstream position of viscous computation
XS Streamwise position of stagnation point
Xn1 Branch one of neutral stability curve
Z0 , Z1 Spanwise periodic interval boundaries
a Design variables (Rn )
b Values of geometrical constraints (Rm )
c Sound speed in m/s
cp Specific heat at constant pressure
d Dimension, here 2
f Flux density (3-by-1 matrix of tensors)
h1 Scale factor, curvilinear coordinates

ij Edge between nodes i and j
l0 Reference length scale in m
m Momentum density ρu
m Number of geometric constraints
n Number of nodes on the airfoil
n̂ Outward directed unit normal vector
n Outward dir. surface normal vector
p Pressure in Pa
s Arclength from stagnation point
s Arclength from trailing edge
t Time
u Velocity tensor in m/s
T
v Primitive variables [ρ , u , p]
T
w Conservative variables [ρ , m , E]
x, y, z Cartesian body axes in m
x1 , x2 , x3 Curvilinear coordinates
y Nodal displacements on the airfoil (Rn )
Subscripts
0 Reference position

ij Edge index
∞ Free stream

2 of 35

American Institute of Aeronautics and Astronautics


e Boundary layer edge
i Node index
w Wall
Symbols
α, β Streamwise, spanwise wave number
αl Angle of attack in degrees
η Wall-normal distance in m
γ Ratio of specific heats
κ Heat conductivity, dimensionless
λ Vector of Lagrange multipliers (Rm )
µ, ν Dynamic, kinematic viscosities, dimensionless
V(Ω) Set of nodes in Ω
V(∂Ω) Set of boundary nodes of Ω
Ω Domain of discretized Euler equations
ω Angular frequency
ΩB , ΩP Domains for mean flow, stability analysis
ψ Sweep angle
ρ Density in kg/m3
σ Growth rate
Superscripts
∗ Adjoint quantity
0 Initial design
¯ Dimensionless mean flow quantity
ˆ Amplitude function
˜ Dimensionless disturbance quantity
H Conjugate transpose
k k-th design
n + 1 Time level
T Transpose

I. Introduction

D rag reduction for high-speed vehicles is a challenging task. The use of laminar flow control techniques
aims at delaying the laminar-turbulent transition, which is known to reduce the viscous drag coefficient.
The research in the area regarding active flow control is vast, see Joslin1 for a thorough review on the topic
of Laminar Flow Control (LFC). CFD-based design optimization has proved to be successful in reducing the
pressure drag at transonic flow regime, see for example Jameson.2 However, attempts to minimize the total
drag by regular CFD-based design optimization have relied on a fixed laminar-turbulent transition point or
on the assumption that the flow is fully turbulent as in Nemec & Zingg.3
Laminar-turbulent transition in the boundary layer on aircraft wings is usually caused by breakdown of
small disturbances that grow as they propagate downstream. The amplification of these disturbances can be
analyzed using linear stability theory, in which it is assumed that disturbances with infinitesimal amplitude
are superimposed on the laminar mean flow. The growth rate of the disturbances can then be used to
predict the transition location using the so called eN method, see van Ingen4 , Smith & Gamberoni5 and
Arnal6 . Linear stability analysis has been used in some investigations with the aim to design shapes such
that the laminar portion is increased. This approach is denoted as Natural Laminar Flow (NLF) design.
In Green & Whitesides7 , a target pressure is found, based on a simplified relation between pressure and
N-factor, which is used to state an inverse problem in order to find a geometry that may delay transition. In

3 of 35

American Institute of Aeronautics and Astronautics


Manning & Kroo8 , a surface panel method was coupled with an approximative boundary layer calculation
and linear stability analysis. However, none of these investigations calculated the sensitivities based on the
linear stability analysis in order to formulate optimality conditions.
Both CFD-based shape optimization and flow control approaches may be treated as optimization problems
’constrained’ by systems of partial differential equations (PDE’s). By solving an adjoint system of partial
differential equations, the gradient of the objective function can be obtained at a cost that is independent of
the number of parameters subject to the optimization. The use of adjoint equations in design optimization
may be viewed as an off-spring of the theory of optimal control for PDE developed by Lions9 in the 60’s.
Based on this approach, the optimal shape of a body in Stokes flows could be derived by Pironneau10 in
1973. In 1988, Jameson11 formulated the adjoints of the full potential flow equations and of the Euler
equations in order to solve inverse problems. Thereafter, research teams have developed adjoint codes for
the design of aircrafts with lower drag (see Anderson & Bonhaus12 , Baysal & Ghayour13 , Burgreen et al.14 ,
Elliot15 , Enoksson16 , Jameson et al.17 , Mohammadi18 , Reuther et al.19 , Soemarwoto20 , Sung & Kwon21
). The reader will find an introduction to the method of adjoints applied to aerodynamic design in Giles &
Pierce22 . As mentioned above, an approach of optimal NLF design is to formulate an inverse problem where
the target pressure is designed to damp the amplification of disturbances, and the parameters of optimization
describe the shape, as in Schubauer & Skramstad23 , Malik24 , Zurigat et al.25 . Inverse problems of this kind
were investigated first by Lighthill26 and, through an optimal control approach, by Jameson11 .
In the present contribution, a CFD calculation is coupled to an analysis of the growth rate of disturbances
superimposed on the laminar flow in the boundary layer. With this approach, the shape, here an airfoil,
can be optimized with respect to the energy of disturbances for the purpose of delaying laminar-turbulent
transition. In order to relate the amplification of disturbances to the parameterization of the shape, and
to keep computational costs at a reasonable level, the flow is divided into an inviscid outer flow field and
a viscous part describing the boundary layer at the surface. In this way, the growth rate of a disturbance
superimposed on the boundary layer of a given geometry (shape) can be calculated as follows:

1. The solution of the Euler equations provides a pressure distribution on the surface of the geometry
defined by the design parameters.
2. The viscous mean flow is obtained by solving the boundary layer equations for compressible flows over
infinite swept wings, given the pressure distribution and the geometry.
3. The linear stability equations are solved given the viscous mean flow and the geometry, providing the
amplitude and phase of a specific disturbance.

It has been shown in Pralits & Hanifi27 and Pralits et al.28 that reducing a measure of the kinetic energy of
a specific disturbance causes a reduction of the total amplification of a large number of disturbances, which
can be assumed to represent a delay of the transition in the boundary layer. An optimal control approach
provides an efficient method for the calculation of the gradient of the above measure, by solving only three
adjoint equation systems, one for each of the above state equations.
The presentation is structured as follows: The state equation systems, objective functions and systems
of adjoint equations are presented in the next section. Details of the implementation, such as the mesh
movement algorithm and the parameterization, are presented thereafter. It is followed by a summary of
results on the accuracy of the gradients computed by the present adjoint method. In another section, the
results of optimization of the airfoil RAE 2822 are presented. The first test aims at delaying only the
transition, while a second test simultaneously seeks the reduction of the pressure drag and delay of the
transition at constant lift and pitch moment coefficients. All shapes are constrained in a set of feasible
designs that is presented in the implementation part. A summary and discussion section comments on
the current achievements and on future works. The coupling of the adjoint equation systems and gradient
expression are given in the Appendix.

4 of 35

American Institute of Aeronautics and Astronautics


II. Formulation of the design optimization
A. Inviscid flow
The program EDGE29 solves a node-centered and edge-based finite-
volume approximation of the system of Euler equations expressed
here with dimensional flow quantities. The discretization is based
on a dual grid (see Figure 1). For an introduction to this type of
discretization, we refer to Barth.30 In steady state, the vectors of
conservative variables are solved by explicit time integration of the i j
system nij
dwi
Vi + Ri = 0, ∀i ∈ V(Ω), (1)
dt
until the residuals vanish within some tolerance, where
 Figure 1. Dual grid (dashed lines)
Ri = (nij · fij + dij ) ∀i ∈ V(Ω) , for inviscid flow computation and inte-
grated normal vector associated with
j∈Ni 
 (2) edge ij.
Ri = (nij · fij + dij ) + ni · fibc ∀i ∈ V(∂Ω) .
j∈Ni

The fluxes on a control surface associated with nij are approximated


by fij chosen here to give a central scheme, as (fi + fj ) /2 where fi = f (wi ) and
T
fi = [ρi ui , ρi ui ⊗ ui + Ipi , ui (Ei + pi )] . (3)

Convergence to steady state is accelerated by local time stepping and multigrid. Expression (3) is calculated
assuming an ideal fluid and the law of perfect gas, which yields

1 mi 2
pi = (γ − 1) Ei − . (4)
2 ρi

An impermeability boundary condition (ui · ni = 0) is applied on the wall boundary yielding the boundary
fluxes
T
fibc = [0 , Ipi , 0] . (5)
On a farfield boundary the fluxes (3) are computed using the characteristic primitive variables based on
either the farfield data, for incoming characteristics, or, the flow data at the previous time step, for outgoing
characteristics
vic (n̂i ) = L (n̂i , v∞ ) H (λi ) L−1 (n̂i , v∞ ) vi
(6)
+ L (n̂i , v∞ ) (I − H (λi )) L−1 (n̂i , v∞ ) v∞ ,
where L (n̂i , v∞ ) diagonalizes the Jacobian matrix of the flux in primitive variables along the outward-
directed unit normal n̂i , H (λi ) is a diagonal matrix whose diagonal is 0 for negative eigenvalues and 1 for
positive ones, and I is the identity matrix. The boundary flux takes the form

fibc = f (vic (n̂i )) . (7)

An artificial dissipation flux dij , a blend of second- and fourth-order differences of Jameson type, is used.

5 of 35

American Institute of Aeronautics and Astronautics


B. Viscous flow
The flow field considered here is the boundary layer on a swept wing with infinite span, which is obtained
by solving the mass, momentum, and energy conservation equations for a viscous compressible fluid. The
equations are written in an orthogonal curvilinear coordinate system where x1 , x2 , and x3 are the streamwise,
spanwise, and wall-normal directions respectively. A length element, assuming an infinite swept wing, is
2 2 2
defined by ds2 = (h1 dx1 ) + (dx2 ) + (dx3 ) , where
3 
 2
∂X j
(h1 )2 = ,
j=1
∂x1

where X j are the Cartesian coordinates, and xi the curvilinear coordinates. The total flow field, Qtot is
decomposed into a mean, Q̄, and a perturbation part, Q̃, as
Qtot (x1 , x2 , x3 , t) = Q̄(x1 , x3 ) + Q̃(x1 , x2 , x3 , t)
 is the corresponding disturbance variable
where Q̄ is one of the mean variables [Ū , V̄ , W̄ , P̄ , T̄ , ρ̄] and Q
among [Ũ , Ṽ , W̃ , P̃ , T̃ , ρ̃]. The equations are derived for a quasi three-dimensional mean flow with zero
variation in the spanwise direction. The evolution of convectively unstable disturbances is analyzed in the
framework of the nonlocal stability theory. All flow and material quantities are made dimensionless with
the corresponding reference flow quantities at a fixed streamwise position x0 , except the pressure, which is
made dimensionless with twice the corresponding dynamic pressure. The reference length scale is taken as
1 1
l0 = (ν0 x0 /u0 ) 2 , and the Reynolds and Mach number are defined as Re = l0 u0 /ν0 and M = u0 /(RγT0 ) 2
respectively. Here, l0 , Re, and M are defined using dimensional quantities.

1. Mean-flow equations
The dimensionless boundary-layer equations modeling the steady viscous compressible mean flow on a swept
wing with infinite span written in primitive variable form are given as
1 ∂(ρ̄Ū ) ∂(ρ̄W̄ )
+ = 0, (8)
h1 ∂x1 ∂x3

ρ̄Ū ∂ Ū ∂ Ū 1 dP̄e 1 ∂ ∂ Ū
+ ρ̄W̄ = − + µ̄ , (9)
h1 ∂x1 ∂x3 h1 dx1 Re ∂x3 ∂x3

ρ̄Ū ∂ V̄ ∂ V̄ 1 ∂ ∂ V̄
+ ρ̄W̄ 3 = µ̄ 3 , (10)
h1 ∂x1 ∂x Re ∂x3 ∂x

ρ̄Ū ∂ T̄ ∂ T̄ 1 ∂ ∂ T̄
c̄p 1
+ c̄p ρ̄W̄ 3 = 3
κ̄ 3 +
h1 ∂x ∂x RePr ∂x ∂x

 2  2
2 2
Ū M dP̄e µ̄M ∂ Ū ∂ V̄
(γ − 1) + + . (11)
h1 dx1 Re ∂x3 ∂x3

Under the boundary layer assumptions, the pressure is constant in the direction normal to the boundary
layer, that is P̄ = P̄e (x1 ), where subscript e denotes values at the boundary layer edge. The equation of
state can then be expressed as γM 2 P̄e = ρ̄T̄ , and the streamwise derivative of the pressure is given as
dP̄e dŪe
= −ρ̄e Ūe 1 .
dx1 dx
Given a pressure distribution, given by the pressure coefficient
pe − p∞
Cp = 1 2
,
2 ρ∞ u∞

6 of 35

American Institute of Aeronautics and Astronautics


the values at the boundary layer edge are given as
 γ−1  γ1
pe 1 T̄e P̄e γ
ρ̄e P̄e
P̄e = , = , = ,
p∞ γM 2 T̄∞ P̄∞ ρ̄∞ P̄∞

Ūe = Q̄2e − V̄e2 , and V̄e = sin ψ, where

P̄e pe 1 1 − T̄e c̄p∞


= = 1 + Cp γM 2 , Q̄2e = 1 + .
P̄∞ p∞ 2 (γ − 1) 12 M 2

Here, we have used the assumptions that for an inviscid, steady, and adiabatic flow, the total enthalpy is
constant along a streamline, and the isentropic relations are used to obtain the relation between total and
static quantities. A domain ΩB is defined for equations (8)–(11) such that x1 ∈ [XS , X1 ], x2 ∈ [Z0 , Z1 ] and
x3 ∈ [0, ∞). The no-slip condition is used for the velocity components and the adiabatic wall condition for
the temperature. In the free stream, the streamwise and spanwise velocity components, and the temperature
takes the corresponding values at the boundary layer edge. This can be written as
 
∂ T̄
Ū , V̄ , W̄ , 3 (x1 , 0) = [0, 0, 0, 0] ∀x1 ∈ [XS , X1 ],
∂x
   
lim Ū , V̄ , T̄ (x1 , x3 ) = Ūe , V̄e , T̄e (x1 ) ∀x1 ∈ [XS , X1 ].
3 x →+∞

Equations (8)–(11) are integrated in the downstream direction normal to the leading edge with an initial
condition given by the solution at the stagnation line. In the following sections, we denote the solution of
the boundary layer state Q̄ = (Ū , V̄ , W̄ , T̄ ) in order to simplify the presentation.

2. Disturbance equations
The evolution of convectively unstable disturbances is analyzed in the framework of the nonlocal stability
theory. The disturbances analyzed here are assumed to be time- and spanwise periodic waves as
 1 , x2 , x3 , t) = Q̂(x1 , x3 )Θ(x1 , x2 , t),
Q(x (12)

where  
x1
1 2 ′ ′ 2
Θ(x , x , t) = exp ı α(x ) dx + βx − ωt .
X0

Here α is the complex streamwise wave number, β the real spanwise wave number and ω the real disturbance
angular frequency. Disturbances are superimposed on the mean flow at a streamwise position denoted X0 .
We assume a scale separation Re −1 between the weak variation in the x1 -direction and the strong variation in
the x3 -direction. Further, it is assumed that ∂/∂x1 ∼ O(Re −1 ) and W ∼ O(Re −1 ). Introducing the ansatz
(12) and the assumptions above in the linearized governing equations, keeping terms up to order O(Re −1 ),
yields a set of nearly parabolic partial differential equations, see Bertolotti et al.,31 Malik & Balakumar,32
Simen33 and Herbert34 . The system of equations, called Parabolized Stability Equations (PSE), are lengthy
and therefore written here as

∂ Q̂ ∂ 2 Q̂ 1 ∂ Q̂
AQ̂ + B 3
+ C + D = 0, (13)
∂x (∂x3 )2 h1 ∂x1
 T
where Q̂ = ρ̂, Û , V̂ , Ŵ , T̂ . The coefficients of the 5 × 5 matrices A, B, C and D are found in Pralits
et al.35 . A domain ΩP for equation (13) is defined such that x1 ∈ [X0 , X1 ], x2 ∈ [Z0 , Z1 ] and x3 ∈ [0, ∞).

7 of 35

American Institute of Aeronautics and Astronautics


The boundary conditions corresponding to equation (13) are given as
 
Û , V̂ , Ŵ , T̂ (x1 , 0) = [0, 0, 0, 0] ∀x1 ∈ [X0 , X1 ],
 
lim Û , V̂ , Ŵ , T̂ (x1 , x3 ) = [0, 0, 0, 0] ∀x1 ∈ [X0 , X1 ],
3 x →+∞

To remove the ambiguity of having x1 -dependence of both the amplitude and wave function in the ansatz,
and to maintain a slow streamwise variation of the amplitude function Q̂, a so called ’auxiliary condition’ is
introduced  +∞
∂ Q̂
Q̂H 1 dx3 = 0. (14)
0 ∂x
Equation (13) is integrated in the downstream direction normal to the leading edge with an initial condition
given by local stability theory. At each x1 -position the streamwise wavenumber α is iterated such that the
condition given by equation (14) is satisfied. After a converged streamwise wavenumber has been obtained,
the growth rate based on the disturbance kinetic energy is calculated from the relation
∂ 
σ = −αi + 1 (ln Ê),
∂x
where  +∞
Ê = ρ̄ (|Û |2 + |V̂ |2 + |Ŵ |2 ) dx3 .
0

The growth rate can then be used to predict the transition location using the so called eN -method, see van
Ingen,4 Smith & Gamberoni,5 and Arnal6 . The N -factor based on the disturbance kinetic energy of a single
disturbance is given as
 X
NE = σ dx1 .
Xn1

A complete description of equation (13) is found in Pralits et al.,35 and the numerical schemes used here are
given in Hanifi et al.36 .

C. Problem of optimal NLF design


As discussed in the introduction, our approach of aerodynamic design optimization intends to reduce the
viscous drag by delaying the transition in the boundary layer. The objective function must therefore include
a measure related to the transition process. The complete aerodynamic design, however, must minimize
both the viscous and pressure drag and include constraints on the lift and pitch moment coefficients as well
as on the feasible geometries.

1. Measure related to the transition


One choice is to measure the kinetic energy of a certain disturbance at a downstream position, say Xf . This
can be written as   
1 Z1 +∞  H 
Ef = Q MQ Q  h dx2 dx3  , (15)
1
2 Z0 0  1
x =Xf

which means that the disturbance kinetic energy is calculated from the disturbance velocity components. If
the position Xf is chosen as the upper branch of the neutral curve, then the measure can be related to the
maximum value of the N -factor of a given disturbance as

Ef
Nmax = ln . (16)
E0

8 of 35

American Institute of Aeronautics and Astronautics


If in addition, the value of the N -factor of the measured disturbance is the one which first reaches the
transition N -factor, then the position can be related to the onset of laminar-turbulent transition. It is
however not clear, a priori, that minimizing such a measure will damp the chosen or other disturbances
in the whole unstable region, especially if different types of disturbances are present, such as Tollmien-
Schlichting (TS) and cross-flow waves. For Blasius flow, it has been shown that an objective function based
on a single TS wave is sufficient to successfully damp the amplification of other TS waves, see Pralits et al.28
and Airiau et al.37 . On a wing however, it is common that both TS and cross-flow waves are present
simultaneously.
An alternative is therefore to measure the kinetic energy as the streamwise integral over a defined domain.
Using such an approach, several different disturbances can be accounted for, with respective maximum growth
rate at different positions. This has shown to be successful in an optimal control problem using mean flow
suction as control variable, see Pralits & Hanifi27 . The size of K disturbances superimposed on the mean
flow at an upstream position X0 , is measured by their total kinetic energy as
K   
1  Xme Z1 +∞  H  h dx1 dx2 dx3 .
EK = Qk MQ Q k 1 (17)
2 Xms Z0 0
k=1

Here Xms and Xme are the first and last streamwise positions between which the disturbance kinetic energy
is integrated, and adds the possibility to evaluate EK in a streamwise domain within [X0 , X1 ].

2. Objective functions
In a first approach, the objective function J is the total disturbance kinetic energy of a single disturbance (17),
here using the disturbance which gives the largest value of E1 . The objective function depends explicitly
on Q and on the shape of the airfoil Γ:
 
J = E1 ≡ J(Q,  Γ) . (18)

Constraints are further imposed on the feasible designs in order to produce smooth shapes and to enforce
geometric features. These are constant cross-sectional area, fixed trailing edge, and a fixed region of the
airfoil around the leading edge. The last is applied to a region between 0 of the chord length and Xms (given
in Table 1) and is meant to eliminate variations in the location of the stagnation point, which, in the current
state of development of our codes, could not be accounted for in the sensitivity of the propagation of the
disturbances.
A second objective function JC is considered in order to simultaneously delay the transition, reduce the
pressure drag, and, in addition, penalize changes in the coefficients of lift and pitch-moment. The geometrical
constraints are identical to the first type of optimization described above. This second objective function is
defined as
JC = λU E1 + λD CD
1  2 1  
0 2
(19)
+ λL CL − CL0 + λM CM − CM ,
2 2
where the drag, lift, and pitch moment coefficients are calculated only from the inviscid flow as
 pi ni · dD
CD = 1 ,
ρ∞ u2∞ Sref
i ∈ V(∂Ωw ) 2
 pi ni · dL
CL = 1 ,
2
2 ρ∞ u∞ Sref
(20)
i ∈ V(∂Ωw )
 
 pi dM · xi − O ref. × ni
CM = 1 2
.
2 ρ∞ u∞ Sref Lref
i ∈ V(∂Ωw )

9 of 35

American Institute of Aeronautics and Astronautics


were dD is a unit vector in the direction of the farfield velocity, dD = −v ∞ /|v 2∞ |, dL is a unit vector
orthogonal to dD and, dM is a unit vector orthogonal to dD and dL . Note that this second objective
function depends explicitly on the modeled disturbance Q,  on the shape Γ, and on the solution of the
inviscid flow w.

D. Gradient calculation
The minimization of objective function (18) by gradient-based optimization requires the gradient, denoted
∇J, with respect to the variables of design (for a given parameterization of Γ). It is shown in the Appendix
that the adjoint approach used here enables an efficient computation of ∇J. The coupling between the
solutions of the three adjoint equation systems is described in the next section. Additional details of the
gradient computation are discussed in the section Implementation.
The gradient of objective function (19) is a linear combination of the gradients of E1 (≡ J), CD , CL
and CM . We refer to Amoignon38 for the calculation of the gradients of the drag, lift, and pitch moment
coefficients using the discrete adjoint of the Euler equations.
The contribution from the boundary layer and stability analysis to the gradient of the objective function
(the three first terms in (78)) with respect to the surface nodes is given below. A variation of the objective
function with respect to the scale factors of the curvilinear coordinates is written
   H
1 H  ∂ Q̂∗
δJ = Q MQ Q1 , δh1 + A1 Q̂
2 1 ∂x3
  
∗H ∂ Q̂ 1 ∂ Q̂
+ Q̂ A2 3 + A3 Q̂ + A4 , δh1
∂x h1 ∂x1
 
1 ∂(ρ̄Ū ) ∗ ρ̄Ū ∂ V̄ ρ̄Ū ∂ Ū 1 dPe
+ W̄ ∗ + V̄ + Ū ∗
+
h ∂x1 h1 ∂x1 h ∂x1 h1 dx1
 1 2
1 
ρ̄Ū ∂ T̄ Ū M dPe
+ T̄ ∗ cp − (γ − 1) , δh1 (21)
h1 ∂x1 h1 dx1
where   
X1 Z1 +∞

·, · = dx1 dx2 dx3 .
X0 Z0 0

The non-zero elements of the 5 × 5 matrices A1 , A2 , A3 and A4 are given in the Appendix. For an infinite
swept wing, the scale factor h1 can be written
′′
|yw |
h1 = 1 + x3   23 .
′ ) 2
1 + (yw

Here, yw = yw (xw ), prime denotes derivative, and xw and yw are the streamwise and wall-normal coordinates
of the surface. A variation of h1 = h1 (yw (xw )) gives
∂h1 ∂h1 ∂yw
δh1 = δyw + δxw
∂yw ∂yw ∂xw
which is then substituted into the expression (21).
The variation of the objective function corresponding to a variation of the solution of the Euler equations
alone (last term in (78)) due to a variation δX of the nodal coordinates in the entire Euler grid is given here
in terms of the variation in the normal vectors associated with the control volumes:
  T 
δJ = − wi∗ − wj∗ fij · δnij − wi∗ T fibc · δni . (22)

ij∈E(Ω) i∈V(∂Ωh )

10 of 35

American Institute of Aeronautics and Astronautics


Expression (22) is used to obtain the variation of the objective function with respect to a variation in the
nodes coordinates by expressing δn in terms of δX, see Amoignon38 .

E. Adjoint of the viscous flow equations


1. Adjoint of the Parabolized Stability Equations
The adjoint of the parabolized stability equations (13)-(14) are derived using a continuous approach. The
derivation in Pralits et al.35 yields

∂ Q̂∗ ∂ 2 Q̂∗ 1 ∂ Q̂∗


ÃQ̂∗ + B̃ 3
+ C˜ 3 2
+ D̃ = S∗P , (23)
∂x (∂x ) h1 ∂x1

 +∞ 
∂ ∂A ∂B
Q̂∗H + Q̂ h1 dx3 =
∂x1 0 ∂α ∂α


 0 ∀x1 ∈
/ [Xms , Xme ],
 +∞ (24)

 −ı|Θ|2 Q̂H MQ Q̂ h1 dx3 ∀x1 ∈ [Xms , Xme ],
0

where 

 ∂ Q̂ ∂(α∗ Q̂)
 −ᾱ∗ 1 − ∀x1 ∈ / [Xms , Xme ],
S∗P = ∂x ∂x1
 ∗
 −ᾱ∗ ∂ Q̂ − ∂(α Q̂) + MH Q̂|Θ|2 ∀x1 ∈ [X , X ],

Q ms me
∂x1 ∂x1
 T
and the 5×5 matrices Ã, B̃, C˜ and D̃ are found in Pralits et al.35 . Here, Q̂∗ = ρ̂∗ , Û ∗ , V̂ ∗ , Ŵ ∗ , T̂ ∗ , and
the above equations are subject to the following boundary conditions
 
Û ∗ , V̂ ∗ , Ŵ ∗ , T̂ ∗ (x1 , 0) = [0, 0, 0, 0] ∀x1 ∈ [X0 , X1 ],
 
lim Û ∗ , V̂ ∗ , Ŵ ∗ , T̂ ∗ (x1 , x3 ) = [0, 0, 0, 0] ∀x1 ∈ [X0 , X1 ].
3 x →+∞

The initial conditions are


Q̂∗ (X1 , x3 ) = 0 ∀x3 ∈ [0, +∞),
α∗ (X1 ) = 0 ∀x3 ∈ [0, +∞).
Equation (23) is solved by backward integration in the streamwise direction. Reusing the code developed for
the PSE equations, we solve the adjoint PSE equations iteratively in order to satisfy the auxiliary condition
(24) for α∗ at each streamwise position.

2. Adjoint of the Boundary Layer Equations


The adjoint of the boundary-layer equations (8)-(11) are derived using a continuous approach. The derivation
in Pralits39 and Pralits & Hanifi27 yields

∂(h1 W̄ ∗ )
ρ̄ −
∂x3

∂ Ū ∗ ∂ V̄ ∗ ∂ T̄ ∗ ∗
h1 ρ̄ Ū + V̄ + c̄p T̄ = SW , (27)
∂x3 ∂x3 ∂x3

11 of 35

American Institute of Aeronautics and Astronautics


∂(ρ̄Ū Ū ∗ ) ∂(h1 ρ̄W̄ Ū ∗ ) dP̄e
1
+ 3
+ (γ − 1)M 2 1 T̄ ∗ −
∂x ∂x dx
∂ Ū ∗ ∂ V̄ ∗ ∂ W̄ ∗ ∂ T̄ ∗
ρ̄ Ū + 1 V̄ − + c̄p 1 T̄ −
∂x1 ∂x ∂x1 ∂x

2(γ − 1) 2 ∂ ∂ Ū
M h1 µ̄ 3 T̄ ∗ +
Re ∂x3 ∂x

1 ∂ ∂(h1 Ū ∗ )
µ̄ = SU∗ , (28)
Re ∂x3 ∂x3

∂(ρ̄Ū V̄ ∗ ) ∂(h1 ρ̄W̄ V̄ ∗ )


+ −
∂x1 ∂x

3

2(γ − 1) 2 ∂ ∂ V̄
M 3
h1 µ̄ 3 T̄ ∗ +
Re ∂x ∂x

1 ∂ ∂(h1 V̄ ∗ )
µ̄ = SV∗ , (29)
Re ∂x3 ∂x3

∂(ρ̄Ū T̄ ∗ ) ∂(h1 ρ̄W̄ T̄ ∗ )


c̄p 1
+ c̄p +
∂x ∂x3
ρ̄Ū ∂ Ū ∗ ∂ V̄ ∗ ∂ W̄ ∗
1
Ū + 1 V̄ − 1
+
T̄ ∂x ∂x ∂x
2 ∗
ρ̄Ū ∂ T̄ ∗ κ̄ ∂ (h1 T̄ )
c̄p 1 T̄ + +
T̄ ∂x RePr (∂x3 )2
 2  2
(γ − 1) 2 dµ̄ ∂ Ū ∂ V̄
M + T̄ ∗ −
Re dT̄ ∂x3 ∂x3
 
1 dµ̄ ∂ Ū ∂(h1 Ū ∗ ) ∂ V̄ ∂(h1 V̄ ∗ ) ∗
3 3
+ 3 3
= SE , (30)
Re dT̄ ∂x ∂x ∂x ∂x

where the right-hand side S∗B = [SW∗


, SU∗ , SV∗ , SE
∗ T
] is given as
 T
 F , F , F , F + F W̄ h1 ∀x1 ∈ (X0 , X1 ),

W U V T W
S∗B = T̄


0 ∀x1 ∈ (XS , X0 ].

The non-zero right-hand side is the coupling between the APSE and the ABLE, and expresses the sensitivity
of the PSE with respect the variations in W̄ , Ū , V̄ , and T̄ respectively. A detailed description is found in
Pralits39 . The above equations are subject to the boundary conditions
 
∂(h1 T̄ ∗ )
Ū ∗ , V̄ ∗ , 3
(x1 , 0) = [0, 0, 0] ∀x1 ∈ [X0 , X1 ],
∂x
 ∗ ∗ 
lim Ū , V̄ , W̄ ∗ , T̄ ∗ (x1 , x3 ) = [0, 0, 0, 0] ∀x1 ∈ [X0 , X1 ].
x →+∞
3

Equations (27)–(30) are solved by backward integration in the streamwise direction with the initial condition
given at x1 = X1 as
Q̄∗ (X1 , x3 ) = 0 ∀x3 ∈ [0, +∞).

12 of 35

American Institute of Aeronautics and Astronautics


The Euler and the boundary-layer equations are coupled through the pressure distribution Pe and the mesh
given by the nodal coordinates X. A variation of the geometry that affects the Euler solution will therefore
appear as variations of the pressure distribution in the boundary layer equations, which consequently will
affect the solution of the stability equations. Pralits et al.28 considered an optimal control problem using the
pressure distribution as control variables and the total disturbance kinetic energy as the objective function.
From the coupled APSE and ABLE for incompressible flows, an expression was derived for the gradient
of the objective function with respect to the pressure distribution. From the present APSE and ABLE, a
similar expression valid ∀x1 ∈ (XS , X1 ) can be evaluated as
 +∞ 
∂J ∂ Ū ∗ ∂(T̄ ∗ Ū )
= − 1
+ (γ − 1)M 2 dx3 . (33)
∂ P̄ 0 ∂x ∂x1

Setting the Mach number equal to zero in expression (33), we find exactly the same expression as the one
derived in Pralits et al.28 . Note that a variation of X will also affect the nodal coordinates of the BLE and
PSE. This can be seen in expression (78) in the Appendix.

F. Adjoint of the inviscid flow equations


The adjoint of the discretized Euler equations (1)–(2) are solved following the same technique used for solving
the Euler equations, namely explicit time integration of the system
dwi∗
Vi + R∗i = 0 ∀i ∈ V(Ω) , (34)
dt
until the residuals R∗i vanish within some tolerance. The complete derivation based on discrete sensitivities
can be found in Amoignon38 . The following gives expression for the adjoint residuals
 
  ∂(fi · nij ) T wi∗ − wj∗ 
R∗i = + d∗ij ∀i ∈ V(Ω) ,
∂wi 2
j∈Ni j∈Ni
 
  ∂(fi · nij ) T wi∗ − wj∗ 

Ri = + d∗ij
∂wi 2
j∈Ni j∈Ni

  ∂(f bc · ni ) T
+ i
wi∗ ∀i ∈ V(∂Ω) , (35)
∂wi
j∈Ni
 
  ∂(fi · nij ) T wi∗ − wj∗ 
R∗i = + d∗ij
∂wi 2
j∈Ni j∈Ni

  ∂(f bc · ni ) T
+ i
wi∗ − gi∗ ∀i ∈ V(∂Ωo ) ,
∂wi
j∈Ni

where V(∂Ωo ) is the set of nodes at which the pressure Pe is measured, according to the definition of the BLE
(8)–(11). The term gi∗ in (35) relates the solution of the ABLE, via (33), to the adjoint of the inviscid flow
equations (34). This term is defined in the appendix as the right-hand-side of (77). The flux d∗ij , adjoint of
the artificial dissipation flux dij , is obtained by freezing the artificial viscosities, see Amoignon38 . A similar
freezing of the coefficients in the farfield boundary conditions yields the following expression for the Jacobian
of the farfield flux:
∂(fibc · ni ) ∂ (f · ni ) dvi
= L (n̂i , v∞ ) H (λi ) L−1 (n̂i , v∞ ) . (36)
∂wi ∂vi dwi

13 of 35

American Institute of Aeronautics and Astronautics


The Jacobian of the Euler wall flux function is
   T
∂ fibc · ni 1
= (γ − 1) |ui |2 , −ui , 1 . (37)
∂wi 2

III. Implementation
Objective function (18) depends on the shape, defined by the nodal coordinates X, and, implicitly, on
the pressure Pe calculated from the discretized Euler equations (1)–(2). As mentioned earlier, the adjoint of
the Euler equations are derived based on the discrete sensitivities. Thus any modification of the mesh may
perturb the solution of the inviscid flow, which in turn would perturb the solutions of the BLE, the PSE,
and the value of J. The gradient of J as a function of X is denoted ∇JX in the Appendix.
For the sake of simplicity, each node on the airfoil can only be displaced in the direction normal to the
airfoil at initial design. Furthermore, in order to retain mesh quality, when the airfoil shape is changed, we
use a mesh movement mapping to deform the mesh also inside the domain of computation for the Euler
equations. In the following, an adjoint of the mesh movement mapping yields the gradient, noted ∇Jy , of J
as a function of the normal displacements on the airfoil y. We use a particular parameterization of the airfoil
normal displacements y that simultaneously imposes the geometric constraints and enforces smoothness. An
adjoint of the mapping that defines the parameterization yields an expression for the gradient of J with
respect to the variables of design a, denoted ∇Ja .

A. Mesh displacements
In the current study an explicit affine mapping is used to smoothly propagate changes in the geometry to
the entire Euler mesh. It is formulated as

Xk = X0 + Lyk . (38)

Given a function JX of the nodal coordinates, expression (38) may be used to define a function Jy (y) ≡
JX (X (y)) of the normal displacements y on the airfoil. The chain rule yields the gradient of Jy by the
matrix–vector product
∇Jy = LT ∇JX . (39)
We used a C-type mesh, a mesh that has smooth grid lines normal to the airfoil, for the reason that it
makes the derivation of sparse matrices L easier, see Amoignon et al.40 for details. Other mesh deformation
algorithms will be necessary for meshes not having a special structure.

B. Parameterization and geometric constraints


In shape optimization, the combination of gradient-methods and piecewise polynomial interpolations, such
as B-splines, may induce oscillations in the shapes, as investigated by Frank & Shubin.41 In the current
approach, smooth shapes are obtained, together with (linear) geometric constraints, by taking the vectors
of normal displacements y as solution of a quadratic programming problem (QP), see Amoignon,38 of the
form 
 min 1 vT A v − vT M a ,
s s
y= v∈Rn 2 . (40)
 T
C v=b
where the columns of C are the gradients of the constraints imposed on the displacements. In the case
without geometric constraints (m = 0 in (40)), the solution to (40) is solution of the discretized Poisson
problem
As ỹ = Ms a , (41)

14 of 35

American Institute of Aeronautics and Astronautics


along the surface of the airfoil. Adding constraints (m ≥ 1 in (40)) means that the solution of (40) fulfills
exactly the relations
CT y = b , (42)
and, according to some norm, y is the closest to the solution of the discretized Poisson problem. It is a
known result of optimization theory, see Nocedal and Wright42 that the solution of the QP (40) is obtained
by solving the Karush-Kuhn-Tucker (KKT) system
    
As −C y Ms a
= . (43)
−CT 0 λ −b

Using expression (43), the design variables becomes the right-hand side vectors a and b. Given the
gradient ∇Jy of expression (39), we can calculate the gradient with respect to the design variables a and b
by first solving the adjoint problem
    
ATs −C y∗ ∇Jy
= , (44)
−C T 0 λ∗ 0

and then evaluating


∇Ja = MsT y∗ and ∇Jb = −λ∗ , (45)
see Amoignon.38

C. Optimization algorithm
Aerodynamic constraints (lift and pitch), when used, are incorporated in the objective function via a simple
penalization technique (19). Geometrical constraints (fixed volume, fixed trailing edge, and fixed geometry
around a portion of the leading edge) are handled via the above parameterization. Further, the geometric
constraints are here equalities, so that the right hand side b in (40) is a constant vector. The only control
parameter used in our applications is therefore the vector a.
This ’unconstrained’ optimization algorithm can
therefore be solved using a regular quasi-Newton
method (BFGS) with a line search algorithm.
Figure 2 depicts the order of the various compu-
tations that are needed for derivative calculations
in the optimal NLF design. The design k + 1 is
obtained from the optimization routine after possi-
bly one or several objective function and only one Figure 2. Flow chart for the case of minimizing the
gradient evaluation due to the use of the Goldstein disturbance kinetic energy without aerodynamic con-
straints.
conditions in the line search algorithm, see Nocedal
42
and Wright.

IV. Numerical tests


Sufficient gradient accuracy is a critical issue in optimization. The first order necessary optimality
condition is satisfied if the gradient of the objective function or the Lagrangian vanishes. Difficulties related
to low accuracy, such as to find descent directions even far from the optimal design, are quite common.
There are two possible sources of inaccuracy in our calculation of the gradient. As mentioned previously,
the derivation of the adjoint of the discretized Euler equations makes use of an approximation as it does not
linearize the coefficients of the 2nd order artificial dissipation. Moreover, the adjoint equations of the BLE and
PSE are derived from the continuous state equations. Numerical tests are carried out in Amoignon et al..40

15 of 35

American Institute of Aeronautics and Astronautics


Gradients
8

k
Grad J
0

−2

−4

−6
0 30 60 90 120 150 180 210 240
k (index of control parameter)

Figure 3. M∞ = 0.734 - Gradients of the disturbance kinetic energy calculated by the methods: FD (solid),
ADJ1 (dot), ADJ2 (dash), ADJ3 is not shown.

The accuracy of the gradient at a design point a can be analyzed comparing the value obtained by
computation of adjoint problems ∇Ja with an estimate by finite differences:

FD Ja (a + ǫa ek ) − Ja (a − ǫa ek )
(∇Ja )k ≈ , (46)
2ǫa
where ek is the vector having component k equal to 1 and all other components being 0. Several calculations
FD
of (∇Ja )k are commonly performed, using different values of ǫa in order to find the best compromise
between accuracy and rounding errors, the last being inherent to the finite difference method. The relative
error between the gradient obtained by adjoint method ∇Ja and the one approximated by finite-differences
∇Ja can be calculated as
FD
∇Ja − (∇Ja ) 
err∇Ja = FD
, (47)
 (∇Ja ) 
where . denotes the norm in Rn defined by the dot product.
The tests are performed using a C-type mesh of the RAE 2822 airfoil at Mach number M∞ = 0.734.
The size of the mesh is 13352 nodes with 224 nodes on the airfoil. Finite difference approximations of the
gradient given by expression (46) are noted FD. The objective function in all tests performed here is (18) The
gradient ∇Ja is calculated from the gradient ∇JX (78) as described in the previous section. The gradient
∇JX is given by expression (78)
 ∗  ∗  ∗
∂JQ̄ ∂Aq
∇JX = −  ∗ + ∂AQ
Q Q̄∗ −
∂Aw
w∗ .
∂X ∂X ∂X ∂X
" #$ % " #$ %
cont. discr.

As outlined previously, the gradient is evaluated from three systems of adjoint equations that are solved in
the following order
APSE
" →#$ ABLE% → adjoint Euler.
" #$ %
cont. discr.

The APSE and ABLE are derived using the continuous approach, while the adjoint Euler is derived using
the discrete approach. This is above denoted cont., and discr., respectively. The influence on the accuracy

16 of 35

American Institute of Aeronautics and Astronautics


of the different approaches and of the different terms, in the gradient expression above, is here summarized
by comparing different ways of calculating ∇JX (and therefore ∇Ja ):
• ADJ1: the terms denoted cont. in the above expression of ∇JX are neglected. The error (47) is 17.2%.
• ADJ2: ∇JX is computed as in FD-ADJ1 but the right hand side (∂J/∂w) of the adjoint Euler equations
is approximated by finite differences (there the pressure on the shape is considered as a design variable
for the system BLE-PSE). The error (47) is 4.95%.
• ADJ3: the right hand side of the adjoint Euler equations is computed as in FD-ADJ2, and the terms
denoted cont. in the above expression of ∇JX are calculated by finite-difference. The error (47) is
reduced by 0.1% compared to that obtained by comparing FD with ADJ2.
The gradients obtained by the methods FD, ADJ1 and ADJ2 are shwon in Figure 3. The use of finite-
differences for computing the right-hand side of the adjoint Euler equations is a discrete approach. Therefore,
the comparison of the test FD-ADJ1 with the test FD-ADJ2 indicates the error due to the use of a continuous
approach for the derivation of the adjoint systems ABLE and APSE. This error is here largely due to a too
coarse distribution of the nodes in the streamwise direction when solving the BLE, PSE and their adjoint
systems, as discussed in Amoignon et al..40
The test FD-ADJ3, compared to FD-ADJ2, indicates that neglecting the terms denoted cont. in ∇JX
has only small effects.
In the following ∇JX is computed as in FD-ADJ1, that is neglecting the explicit continuous terms (terms
underlines as cont. in the expression of ∇JX above), and computing the right-hand side of the adjoint Euler
equations from the solutions of the adjoint PSE and BLE.

V. Optimization results
Results are presented here for the minimization of the objective functions presented earlier. The dis-
cretization of the three state equations are based on the grid described in the previous section. The test

Table 1. Optimization tests description.

Case Obj M∞ Re∞ [f, β] [Xms , Xme ]


fcn ×10−6 [kHz, 1/m] ×102
T11 J(= E1 ) 0.734 17 [15.5, 0] [4.3, 45]
T12 J(= E1 ) 0.734 6.5 [11, 500] [4.3, 45]
T31 JC 0.734 17 [15.5, 0] [4.3, 45]
T32 JC 0.734 6.5 [11, 500] [4.3, 45]

cases are summarized in Table 1. The thermodynamical properties for the different cases correspond to two
different altitudes such that the TX1-cases are given at 0 meter ASLa , and the TX2-cases are given at 9600
meter ASL. Note here that upstream and downstream positions of the domain where the stability equations
are solved are chosen as X0 = Xms , and X1 = Xme .

A. Analysis of the disturbance amplification


A stability analysis of a large number of modes with different frequencies f and spanwise wave numbers β,
corresponding to different wave angles, is performed prior to each optimization case, on the original design
a Above Sea Level

17 of 35

American Institute of Aeronautics and Astronautics


and for the chosen flow conditions. The corresponding N -factors are calculated from these results, and the
optimization uses the mode which has the largest N -factor value with respect to all other modes. The reason
of this particular choice is that it has been shown in previous studies on optimal control, see Pralits et al.28
and Pralits & Hanifi,27 that a control that successfully decrease the amplification of a single disturbance also
have a damping effect on other instability waves of the same type. It is common in transition prediction to
compute the envelope or envelopes (EoE) of the N -factor curves, that is, the envelope over both frequency
and spanwise wave number. Transition is then assumed to occur at the position where the EoE curve first
attains an empirically determined value. This curve also serves as a measure of the efficiency of a control or
design, computed by minimizing a single disturbance on a large number of disturbances.
An example of results from the analysis discussed here is shown in figure 4. The example concerns the
initial design with a free stream Mach number M∞ = 0.734, Reynolds number Re ∞ = 6.5 × 106 , and angle of
attack αl = 2.1875 degrees. A total of 165 modes have been analyzed with dimensional frequency f = [5, 20]
kHz (∆f = 1 kHz), and spanwise wave number β = [0, 2500] 1/m (∆β = 250 1/m). This choice of spanwise
wave number corresponds to wave angles between zero and 85 degrees. The wave angle is defined as the
angle between the wave number vector k and the inviscid streamline. The corresponding N -factor values of
all modes are given by dots. The mode chosen to be used in the optimization is given by the solid line and
the EoE curve by the dash line. The values of f and β given here are used for all EoE analysis made in this
report.

B. Analysis of results using RANS calculations


Viscous calculations using the Reynolds-Averaged Navier–Stokes
(RANS) equations are also carried out with EDGE29 prior to and 5
after the optimization tests. These results are used to compare
the N-factors based on the pressure distribution obtained from
4
the viscous calculation with those that are computed using the
Euler pressure distribution. The turbulence model used in the
RANS calculations is the EARSM by Wallin & Johansson43 to- 3
N−factor

gether with the k − ω model. These calculations are also used


to indicate what degree of reduction of the viscous drag that can
2
be achieved by the present approach. The C-type grid for the
RANS calculations has the size 22088 nodes with 224 nodes on
the airfoil. 1
An attempt has been made to use the N -factor results of
the initial and final design in order to determine the respective
0
transition location. These results have been used as input to the 0 0.1 0.2 0.3 0.4 0.5
RANS calculations of the initial and final design. s/c
The transition position on the upper side of the initial design
was taken as the streamwise position corresponding to the max- Figure 4. N-factor values for 165 modes
(dots) for case T12 and T32 (see Table 1)
imum value of the EoE curve of the N -factors computed using at original design.
the pressure distribution from the Euler solution. As the EoE
curves of the final designs were lower in magnitude compared to
the initial ones, the transition location of the final designs was set as the downstream position of the com-
putational domain of the boundary layer and stability analysis. The same transition position was used on
the lower side, both for the initial and final designs. It should be noted that the transition location for the
initial design is not based on experimental results. A common reference for the RAE 2822 airfoil is Cook
et al.,44 in which the boundary layer was tripped at 3% chord in the experiments in order to have a well
defined turbulent portion.

18 of 35

American Institute of Aeronautics and Astronautics


C. Minimization of J (18)
1. Case T11
Results of the T11 case are given in figure 5. The convergence history is given in terms of the objective
function and gradient norm as functions of the iteration number. The optimization was stopped when the
BLE solver failed to converge. This occurred as the changes in the geometry caused the shock wave to move
into the computational domain of the BLE. The strong adverse pressure gradient due to the shock wave
cannot be handled using the boundary layer equations, as they do not model separation. This can be seen
in figure 5, where the pressure coefficient and geometry for the initial and final design are plotted. At final
design, the central upper part of the wing is thinner, measuring the thickness as the distance of a point on
the airfoil to the chord. Therefore, because of the fixed region around the leading edge, the region between
4.3% of the chord length, from the leading edge, up to about 30% of the chord length, situated on the upper
part, has a higher curvature at final design than at initial design. An increase of the curvature of a wall
boundary is known to reduce the pressure in the fluid flow. This may be the effect that can be observed in
figure 5 where the pressure coefficient at final design has decreased (−Cp is increased) in the region between
10% of the chord length, from the leading edge, up to about 30% of the chord length, in comparison to the
initial design. In this way a pressure gradient is obtained that damps the amplification of disturbances as
it is explained below. However, the faster decrease of the pressure may be responsible for the shock moving
upstream. Note that the deformation of the lower part of the wing is only due to the constraint that imposes
a constant volume. The effect on the disturbance amplification can be seen in figure 5 where the EoE curves
have been plotted for the initial and final design. A large damping of all modes has been achieved. This
can be explained by the change in pressure gradient from adverse to favorable in a large part of the region
where the disturbances are amplified. Values of the drag, lift, and pitch moment coefficients for the initial
and optimized designs are summarized in Table 2. The viscous drag, obtained from the RANS calculations,
is reduced by 6 drag countsb , and, as it could be expected from previous observations about the position of
the shock, the pressure drag is also decreased. However, this decrease is a byproduct of the reduction of the
disturbance kinetic energy. Large changes in the lift and the pitch moment coefficients are observed, and
these effects are controlled by imposing constraints in the case T31.

2. Case T12
Results of the T12 case are given in figure 6. The decrease of the objective function is of one order of
magnitude smaller than it is for the case T11, figure 5. The optimization is here terminated as no further
descent direction could be found. The magnitudes of the deformations of the airfoil are smaller compared to
the case T11, but the trend is similar. The change of the pressure gradient may be caused by the local increase
of the curvature on the upper part of the wing, between 4.3% and 30% of the chord length downstream of the
leading edge. As a consequence, the shock is moved upstream. The effect on the disturbance amplification
can be seen in figure 6 where the EoE curves have been plotted for the initial and final design. A large
decrease in disturbance amplification is obtained using the optimized design, similar to the one found for
the high Reynolds number case (T11). Also this is due to the change in pressure gradient from an adverse
to favorable in the upstream part of the domain where the disturbances become unstable. The shock wave
has moved as far upstream as in T11 case.
Values of the drag, lift, and pitch moment coefficients for the initial and optimized designs are summarized
in Table 3. The viscous drag is there reduced by 6 drag counts, and, as in case T11, the pressure drag is
decreased and large changes occur in the lift and the pitch moment coefficients.

19 of 35

American Institute of Aeronautics and Astronautics


Objective function
1 Norm of gradient of objective function
10 2
10

0
10 10
1

−1
10 10
0

||Grad||
1 −2
10 10
−1

−3 −2
10 10

−4 −3
10 10

0 5 10 15 20 0 5 10 15 20
iteration iteration

Pressure coefficients Airfoils


1.5 0.08

1
0.04
0.5

−Cp
0
y/c
0

−0.5
−0.04
−1

−1.5 −0.08
0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1
x/c x/c

Envelope of envelope of N−factor curves


10

6
NE

0
0 0.1 0.2 0.3 0.4 0.5
s/c

Figure 5. T11 - Comparison between initial (solid) and final design (dash). Pressure and EoE of N-factor
curves involving the RANS equations are shown for the initial (dash-dot) and final (dot) design.

20 of 35

American Institute of Aeronautics and Astronautics


Objective function
0 Norm of gradient of objective function
10 1
10

−1
10 10
0

||Grad||
1 −2
10 10
−1

−3 −2
10 10

0 2 4 6 8 10 0 2 4 6 8 10
iteration iteration

Pressure coefficients Airfoils


1.5 0.08

1
0.04
0.5

−Cp
0
y/c
0

−0.5
−0.04
−1

−1.5 −0.08
0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1
x/c x/c

Envelope of envelope of N−factor curves


6

N
E
3

0
0 0.1 0.2 0.3 0.4 0.5
s/c

Figure 6. T12 - Comparison between initial (solid) and final design (dash). Pressure and EoE of N-factor
curves involving the RANS equations are shown for the initial (dash-dot) and final (dot) design.

21 of 35

American Institute of Aeronautics and Astronautics


Table 2. Comparison of aerodynamic coefficients at initial and final design for T11 and T31 (0 meters ASL),
using Euler and RANS flow analysis.

RANS Euler
Coeff. Case total viscous pressure pressure
Initial 2.09 × 10−2 3.35 × 10−3 1.76 × 10−2 1.3 × 10−2
CD T11 (Final) 1.53 × 10−2 2.71 × 10−3 1.26 × 10−2 8.83 × 10−3
T31 (Final) 1.78 × 10−2 2.36 × 10−3 1.54 × 10−2 1.04 × 10−3
Initial 8.39 × 10−1 −7.9 × 10−5 8.39 × 10−1 8.4 × 10−1
CL T11 (Final) 6.34 × 10−1 −5.62 × 10−5 6.34 × 10−1 6.21 × 10−1
T31 (Final) 8.48 × 10−1 −5.03 × 10−5 8.48 × 10−1 8.43 × 10−1
Initial 3.15 × 10−1 − − 3.4 × 10−1
CM T11 (Final) 2.08 × 10−1 − − 2.19 × 10−1
T31 (Final) 3.18 × 10−1 − − 3.37 × 10−1

Table 3. Comparison of aerodynamic coefficients at initial and final design for T12 and T32 (9600 meters
ASL), using Euler and RANS flow analysis.

RANS Euler
Coeff. Case total viscous pressure pressure
Initial 2.3 × 10−2 4.8 × 10−3 1.8 × 10−2 1.3 × 10−2
CD T12 (Final) 1.62 × 10−2 4.20 × 10−3 1.20 × 10−3 7.00 × 10−3
T32 (Final) 1.92 × 10−2 3.72 × 10−3 1.54 × 10−2 8.69 × 10−3
Initial 8.4 × 10−1 −7.9 × 10−5 8.4 × 10−1 8.4 × 10−1
CL T12 (Final) 6.87 × 10−1 −8.00 × 10−5 6.87 × 10−1 6.72 × 10−1
T32 (Final) 8.68 × 10−1 −8.3 × 10−5 8.68 × 10−1 8.51 × 10−1
Initial 3.2 × 10−1 − − 3.4 × 10−1
CM T12 (Final) 2.29 × 10−1 − − 2.44 × 10−1
T32 (Final) 3.21 × 10−1 − − 3.38 × 10−1

22 of 35

American Institute of Aeronautics and Astronautics


Objective function Norm of gradient of objective function
1
0.2 10

0.16 0
10

0.12
JC

||Grad||
−1
10
0.08

−2
10
0.04

0
0 3 6 9 12 15 0 2 4 6 8 10 12 14
iteration iteration

Disturbance kinetic energy Drag Lift and pitch moment


1
10 130 0.9

0.8
120
0
10
0.7
110
0.6
104.CD

−1
1

10 100
E

0.5
90
−2 0.4
10
80 0.3

70 0.2
0 3 6 9 12 15 0 3 6 9 12 15 0 3 6 9 12 15
iteration iteration iteration

Pressure coefficients Airfoils Envelope of envelope of N−factor curves


1.5 0.08 10

1 8
0.04
0.5
6
NE
−Cp
y/c

0 0
4
−0.5
−0.04
2
−1

−1.5 −0.08 0
0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 0 0.1 0.2 0.3 0.4 0.5
x/c x/c s/c

Figure 7. T31 - Comparison between initial (solid) and final design (dash). The pressure and EoE of N-factor
curves involving the RANS equations are shown for the initial (dash-dot) and final (dot) design.

23 of 35

American Institute of Aeronautics and Astronautics


D. Minimizing JC (19)
1. Case T31
Results of case T31 are presented in figure 7. The objective function is decreased in each step of the
optimization, even though the component of the wave drag is increased between iteration number 1 and
2. The reason for the increase is that in this interval, the deviation of lift and pitch moment coefficients is
decreased. A reduction has been obtained at the last iteration in both disturbance kinetic energy and wave
drag, while the lift and pitch moment coefficients are kept within one percent. The shock wave on the upper
side has moved upstream and is weakened. In comparison with T11, which has the same initial conditions,
the displacement of the shock in T31 is smaller, but the changes in T31 preserve the pitch moment and lift
coefficients near to their values at initial design.
The effect on the disturbance amplification can be seen in figure 7, where the EoE curves have been
plotted for the initial and final design. A damping of the disturbance amplification is obtained in a large
part of the computational domain at final design. It is clear looking at figure 7, that the adverse pressure
gradient of the initial design in the upstream region where the disturbances become unstable, has changed
into a zero or weakly favorable in the final design. Close to the shock wave of the final design, which has
now moved further upstream, the flow is decelerated. This can be seen in the EoE curve where the value
increases rapidly above that of the initial design.
Values of the drag, lift, and pitch moment coefficients for the initial and optimized designs are summarized
in Table 2. The decrease of the viscous drag is somewhat larger than for T11, but the decrease of the pressure
drag is smaller. However, the lift and pitch moment coefficients are maintained very near to their initial
values.

2. Case T32
Results of case T32 are presented in figure 8. The convergence history for the lower Reynolds number case
(T32) is similar compared to the one found for the case T31. Also here, the wave drag experiences an
increase during one optimization step, while the deviation of lift and pitch moment coefficients decreases. In
comparison with case T12, which has the same initial conditions, the displacement of the shock is smaller
but the pressure distribution in the T32 case penalizes changes in the coefficients of lift and pitch moment.
A decrease occur in the N -factor values in both results showing the EoE curves of the final design. This
can be explained by the change in pressure gradient from adverse to zero or favorable in a large part of the
region where the disturbances are amplified.
Values of the drag, lift, and pitch moment coefficients for the initial and optimized designs are summarized
in Table 3. The decrease of the viscous drag is larger than for T12, the decrease of the pressure drag is
smaller than for T12, but the lift and the pitch moment coefficients are maintained closed to their initial
values.

VI. Summary and discussion


An adjoint method has been developed and applied to perform shape optimization with the aim of
transition delay, and thus a decrease of the viscous drag. The location of laminar-turbulent transition is
analyzed using linear stability theory, in which perturbations with infinitesimal amplitude are superimposed
on the laminar mean flow. It is then assumed that transition will occur at the location where the total
amplification of disturbances, with respect to the first streamwise position where the disturbance starts to
grow, attains an empirically determined value, whose logarithm is generally denoted by N . The inviscid flow
is obtained by solving the Euler equations for compressible flows, and the viscous mean flow is obtained from
the solution of the boundary layer equations for compressible flows on infinite swept wings. The evolution
b One drag count is 10−4

24 of 35

American Institute of Aeronautics and Astronautics


Objective function
Norm of gradient of objective function
0.2 1
10

0.16
0
10

0.12
JC

||Grad||
−1
10
0.08

−2
10
0.04

0
0 5 10 15 20 0 5 10 15 20
iteration iteration

Disturbance kinetic energy Drag Lift and pitch moment


0
10 130 0.9

0.8
120

−1
0.7
10 110
0.6
104.CD
1

100
E

0.5
−2
10 90
0.4

80 0.3

70 0.2
0 5 10 15 20 0 5 10 15 20 0 5 10 15 20
iteration iteration iteration

Airfoils Envelope of envelope of N−factor curves


Pressure coefficients 6
1.5 0.08

5
1
0.04
4
0.5
N
−Cp E
3
y/c

0 0

−0.5 2
−0.04
−1 1

−1.5 −0.08 0
0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 0 0.1 0.2 0.3 0.4 0.5
x/c x/c s/c

Figure 8. T32 - Comparison between initial (solid) and final design (dash). The pressure and EoE of N-factor
curves involving the RANS equations are shown for the initial (dash-dot) and final (dot) design.

25 of 35

American Institute of Aeronautics and Astronautics


of convectively unstable disturbances is analyzed using the linear parabolized stability equations (PSE).
It has been shown that the gradient of the objective function with respect to the design variables can be
evaluated from the solution of adjoint of the Euler, boundary layer and parabolized stability equations. Using
the adjoint equations, as opposed to other perturbation techniques, constitutes an efficient way to evaluate
functional gradients when the number of design variables is large compared to the number of objective
functions.
In the present approach, an iterative gradient based optimization procedure is used, and tests are carried
out for transonic flows, with Reynolds number of 6.5, and 17 millions, around the RAE 2822 airfoil. One
objective function is formulated to produce a reduction of the disturbance kinetic energy. A second one is
formulated to simultaneously reduce the wave drag and the disturbance kinetic energy while maintaining
lift and pitch-moment coefficients near their values at initial design. The parameterization of the shape is
formulated to generate smooth shapes and to satisfy linear constraints; here the volume, the position of the
trailing edge, and a part of the shape around the leading edge are kept constant.
The work presented here is an ongoing project and current efforts are made to improve the accuracy
of the gradients and to include additional physical modeling, for example to account for the occurrence of
separated flows. From the point of view of the grid resolution there is a trade-off between gradient accuracy
and computational efficiency. Coarser grids penalize the accuracy of the sensitivities based on the PDEs
(adjoint BLE and adjoint PSE), whereas finer grids penalize the cost of the Euler flow computation. A
possible cure is to use interpolation techniques to couple the state equations (Euler and BLE), so that these
could be discretized using different resolutions at the surface of the airfoil.
We do not consider the coupling between the pressure distribution and the thickness of the boundary
layer, so called viscous-inviscid interaction. However, the influence of this approximation is quite limited, as
it has been shown that the reduction of the N-factor values, obtained by optimization, is also observed by
solving the Reynolds Averaged Navier-Stokes equations (RANS) instead of the Euler equations in order to
provide the pressure distribution to the boundary layer analysis. Furthermore, the strategy used to obtain
the gradient by an adjoint approach would remain unchanged if using the RANS equations instead of Euler
during the optimization process. This development would ’only’ require an adjoint of the RANS equations.
As far as the numerical results are concerned, several studies can be performed without major changes to
the current implementation. For example, an objective function can be defined such that transition on both
sides of the wing is delayed. The objective function can also be the sum of a number of convectively unstable
disturbances. Another extension, which can include both of the above, is to use multiple design points in
the optimization. In such case the objective function is the sum of a chosen cost function at different Mach
numbers and/or different disturbances.

Appendix: Sensitivities of the state equations


The objective function J in expression (18) depends explicitly on Q  and on the (Euler) meshc , here
 is the solution of the
represented by the vector of nodal coordinates X. The aim is to minimize J, where Q
PSE (13)–(14), here given as  
AQ Q, Q̄, X = 0 , (48)

defined for given X and Q̄. The mean flow Q̄ is solution of the BLE (8)–(11), here denoted
 
AQ̄ Q̄, w, X = 0 , (49)

which is defined for a given X and w. Finally, the inviscid flow w is the solution of the Euler equations
(1)–(2), denoted
Aw (w, X) = 0 . (50)
c The nodes on the airfoil are common to the three discretized equations: Euler, BLE and PSE.

26 of 35

American Institute of Aeronautics and Astronautics


In the presentation of the adjoint problems it will be convenient to introduce the functions JX , JQ̄ and
Jw , defined in Table 4.These are just function J in which various intermediate quantities are regarded as
independent variables.
Given the function JX of the variable X, defined as in Table 4, it will also be convenient to define Jy and
Ja , as
Jy (y) = JX (X (y)) ,
(51)
Ja (a) = Jy (y (a)) ,
where X is obtained by (38) and y is the solution of (43).
To summarize, the aim is to compute ∇Ja , that is the gradient of J subject to (48)-(50), (38) and (43)
with respect to the design parameters a. In the following it is assumed that Q  ∈ V  , Q̄ ∈ VQ̄ , w ∈ Vw ,
Q
and X ∈ VX , and that VQ , VQ̄ , Vw and VX are vector spaces equipped with the inner products
·, · Q ,

·, · Q̄ ,
·, · w and
·, · X , respectively. Furthermore, it is assumed that all mappings are differentiable and,
for example, ∂Aq /∂ Q  denotes linearization with respect to variable Q
 of the mapping A  , at the given state
Q
& '  −1  ∗
 Q̄, w, X . The notations ∂Aq /∂ Q
Q,  , and ∂Aq /∂ Q , denote the inverse, and the adjoint of the
 
linearized mapping ∂Aq /∂ Q,  respectively. Finally, the notation ∂Aq /∂ Q δQ denotes the application of
∂Aq /∂ Q  on δ Q.

Table 4. Mappings defined by the objective function J and the state equations (48)-(50).

VQ × VX R 
Objective function: & ' −→
 X
Q,  X
J Q,

VQ̄ × VX R  
subject to (48): ( ) −→    
Q̄, X JQ̄ Q̄, X  Q̄, X , X
≡J Q

V w × VX R
subject to (48)-(49): −→  
{w, X} Jw (w, X) ≡ JQ̄ Q̄ (w, X) , X

VX R
subject to (48)-(50): −→
X JX (X) ≡ Jw (w (X) , X)

A. Sensitivity of the PSE


( ) ( )
For arbitrary variations δ Q̄, δX ∈ VQ̄ × VX , of Q̄, X in the PSE (48), the first variation of the solution
 ∈ V  , and is solution of the sensitivity equations
of the PSE is denoted δ Q Q

∂Aq  ∂Aq ∂Aq


δQ = − δ Q̄ − δX . (52)

∂Q ∂ Q̄ ∂X
& '
 δX in V  × VX we define the first variation of the objective function
Furthermore, for any variations δ Q, Q
J as    
∂J  ∂J
δJ = , δQ + , δX (53)

∂Q  ∂X X
Q

27 of 35

American Institute of Aeronautics and Astronautics


 is solution of the sensitivity equations (52), which yields a new expression for (53)
In the remaining, δ Q
  −1  
∂J ∂Aq ∂Aq ∂Aq
δJ = , − δ Q̄ − δX
∂Q ∂Q ∂ Q̄ ∂X 
 
Q (54)
∂J
+ , δX ,
∂X X

 solution of (48) and δ Q


and, for Q  solution of (52) , the definition of JQ̄ (Table 4) yields

δJQ̄ = δJ . (55)
( )
The gradient (∇JQ̄ ) of the functional JQ̄ is ∂JQ̄ /∂ Q̄, ∂JQ̄ /∂X and is a vector of the product space VQ̄ ×VX
( )
such that for all δ Q̄, δX in VQ̄ × VX we have
   
∂JQ̄ ∂JQ̄
δJQ̄ = , δ Q̄ + , δX . (56)
∂ Q̄ Q̄ ∂X X

 in expression (54) and using (55), we obtain


Using the definition of the adjoint of the operator ∂Aq /∂ Q
 
−1 ∗ 
∂Aq ∂J ∂Aq ∂Aq
δJQ̄ = ,− δ Q̄ − δX
∂Q 
∂Q ∂ Q̄ ∂X 
 
Q (57)
∂J
+ , δX ,
∂X X

which is in turn rewritten using the definition of the adjoint of ∂Aq /∂ Q̄, and ∂Aq /∂X, respectively, as
 ∗  −1 ∗ 
∂Aq ∂Aq ∂J
δJQ̄ = − , δ Q̄
∂ Q̄ 
∂Q ∂Q

 ∗   −1 ∗ 
∂Aq ∂Aq ∂J (58)
− , δX
∂X 
∂Q ∂Q
X
 
∂J
+ , δX .
∂X X

 ∗ , solution of the system


Therefore, by introducing the adjoint state Q
 ∗
∂Aq  ∗ = ∂J ,
Q (59)
∂Q  ∂Q

we obtain that  ∗
∂JQ̄ ∂Aq
=− ∗
Q
∂ Q̄ ∂ Q̄
and (60)
 ∗
∂JQ̄ ∂J ∂Aq
= − ∗
Q .
∂X ∂X ∂X
The cost for obtaining gradient of JQ̄ is reduced to one solution of the system (59) and two matrix–vector
products as shown in (60).

28 of 35

American Institute of Aeronautics and Astronautics


B. Sensitivity of the BLE
For arbitrary variations {δw, δX} ∈ Vw × VX , of {w, X} in the BLE (49), the first variation of the solution
of the BLE is denoted δ Q̄ ∈ VQ̄ , and is solution of the sensitivity equations

∂AQ ∂AQ ∂AQ


δ Q̄ = − δw − δX . (61)
∂ Q̄ ∂w ∂X

Furthermore,
( ) from the definition (56) and the expression of the gradient (60), for arbitrary variations
δ Q̄, δX in VQ̄ × VX , the variation δJQ̄ is
  ∗ 
∂Aq  ∗ , δ Q̄
δJQ̄ = − Q
∂ Q̄ Q̄
  ∗  (62)
∂J ∂Aq  ∗
+ − Q , δX .
∂X ∂X X

In the following, δ Q̄ is solution of the sensitivity equation (61). The variation δJQ̄ is expressed, making use
of (62) and (61), as
 ∗  −1  
∂Aq  ∗ ∂AQ ∂AQ ∂AQ
δJQ̄ = Q , δw + δX
∂ Q̄ ∂ Q̄ ∂w ∂X
Q̄ (63)
  ∗ 
∂J ∂Aq  ∗
+ − Q , δX ,
∂X ∂X X

and, for Q̄ solution of (49) and δ Q̄ solution of (61) , the definition of Jw (Table 4) yields

δJw = δJQ̄ . (64)

The gradient of Jw is the vector {∂Jw /∂w, ∂Jw /∂X} in the product space Vw ×VX such that for all {δw, δX}
in Vw × VX we have    
∂Jw ∂Jw
δJw = , δw + , δX . (65)
∂w w ∂X X
 −1
Using the adjoint of the inverse linearized BLE operator ∂AQ /∂ Q̄ in (63), δJw (64) is expressed as
 −1 ∗  ∗ 
∂AQ  ∗ , ∂AQ δw + ∂AQ δX
∂Aq
δJw = Q
∂ Q̄ ∂ Q̄ ∂w ∂X
  ∗ 
Q̄ (66)
∂J ∂Aq  , δX

+ − Q .
∂X ∂X X

Using the adjoints of ∂AQ /∂w and ∂AQ /∂X enables us to rewrite relation (66) as
 ∗  −1 ∗  ∗ 
∂AQ ∂AQ ∂Aq  ∗
δJw = Q , δw
∂w ∂ Q̄ ∂ Q̄
w
 
∗  
−1 ∗  ∗ 
∂AQ ∂AQ ∂Aq  ∗ (67)
+ Q , δX
∂X ∂ Q̄ ∂ Q̄
X
  ∗ 
∂J ∂Aq  ∗
+ − Q , δX .
∂X ∂X X

29 of 35

American Institute of Aeronautics and Astronautics


It suggests, as previously, to define an adjoint state Q̄∗ as
 ∗  ∗
∂AQ ∂Aq ∗ .
Q̄∗ = Q (68)
∂ Q̄ ∂ Q̄
Setting Q̄∗ in (67) and identifying the new expression with (65) we obtain
 ∗
∂Jw ∂AQ
= Q̄∗
∂w ∂w
and (69)
 ∗  ∗
∂Jw ∂J ∂Aq ∗ ∂AQ ∗
= − Q + Q̄ .
∂X ∂X ∂X ∂X
The use of adjoint equations limits cost for obtaining the gradient of Jw to solving the systems (59) and
(68), as well as four matrix–vector products: one to ’assemble’ the right-hand side of the adjoint system (68)
and three to obtain the final expression (69).

C. Sensitivity of the Euler equations


For arbitrary variations δX ∈ VX , of X in the Euler equation (50), the first variation of solution of the Euler
equation is denoted δw ∈ Vw , and is solution of the sensitivity equation
∂Aw ∂Aw
δw = − δX . (70)
∂w ∂X
Furthermore, for arbitrary variations {δw, δX} in Vw ×VX the first variation of the functional Jw is expressed,
from the gradient (69)
 ∗ 
∂AQ
δJw = Q̄∗ , δw
∂w w
  ∗  ∗  (71)
∂J ∂Aq  ∗ + ∂AQ
+ − Q Q̄∗ , δX
∂X ∂X ∂X X

In the following, δw is the solution of the sensitivity equation (70), which enables us to rewrite expression (71)
as  ∗  −1 
∂AQ ∗ ∂Aw ∂Aw
δJw = Q̄ , − δX
∂w ∂w ∂X
  ∗  ∗
w
 (72)
∂J ∂Aq  ∗ ∂AQ ∗
+ − Q + Q̄ , δX ,
∂X ∂X ∂X X
and, for w solution of (50) and δw solution of (70), the definition of JX (Table 4) yields
δJX = δJw . (73)
The gradient of JX is the vector ∇JX in the space VX such that for all δX in VX we have
δJX =
∇JX , δX X . (74)
The adjoint of the linearized Euler operator is used in (72) to express δJX (73) as
 −1 ∗  ∗ 
∂Aw ∂AQ ∗ ∂Aw
δJX = Q̄ , − δX
∂w ∂w ∂X
  ∗  ∗ 
w (75)
∂J ∂Aq  ∗ ∂AQ ∗
+ − Q + Q̄ , δX .
∂X ∂X ∂X X

30 of 35

American Institute of Aeronautics and Astronautics


The adjoint instead of the linear operator ∂Aw /∂X is used in (75) and leads to
  ∗  ∗ 
∂J ∂Aq  ∗ + ∂AQ
δJX = − Q Q̄∗ , δX
∂X ∂X ∂X X
 ∗   −1 ∗  ∗  (76)
∂Aw ∂Aw ∂AQ ∗
− Q̄ , δX ,
∂X ∂w ∂w
X


The method of adjoint is again applied as we define an adjoint state w , here solution of the system
 ∗  ∗
∂Aw ∂AQ
w∗ = Q̄∗ , (77)
∂w ∂w

which enables us to give expression for the gradient (74)


 ∗  ∗  ∗
∂J ∂Aq  ∗ + ∂AQ ∂Aw
∇JX = − Q Q̄∗ − w∗ . (78)
∂X ∂X ∂X ∂X

The total cost of this gradient evaluation is three adjoint systems (59), (68) and (77), and five matrix–vector
products: two for the assembly of the right-hand-sides of the systems (68) and (77), and three for the final
expression (78).

31 of 35

American Institute of Aeronautics and Astronautics


Appendix: Matrix coefficients
Coefficients of the matrices used in expression (21).

a1(1, 4) = ρ̄
a1(2, 4) = ρ̄Ū
a1(4, 1) = −Ū 2
a1(4, 2) = −2ρ̄Ū
a2(1, 4) = ρ̄
µ̄ λ
a2(2, 4) = ρ̄Ū − iα ( + 1)
Re µ̄
Ū µ̄ λ
a2(4, 1) = −Ū 2 + iα ( + 2)
ρ̄ Re µ̄
µ̄
a2(4, 2) = −ρ̄Ū 2 + iα
Re
a3(1, 1) = iαŪ + D1 (Ū )
a3(1, 2) = D1 (ρ̄) + ρ̄iα
a3(1, 4) = D3 (ρ̄) + ρ̄m13
1
a3(2, 1) = D1 (Ū )Ū + (D1 (T̄ ) + iαT̄ )
γM 2
µ̄ λ
a3(2, 2) = ρ̄[D1 (Ū ) + iαŪ ] + 2α2 ( + 2)
Re µ̄
µ̄ λ
a3(2, 3) = αβ ( + 1)
Re µ̄
iα dµ̄
a3(2, 4) = Ū D3 (ρ̄) + ρ̄[D3 (Ū ) + Ū m13 ] − D3 (T̄ )
Re dT̄
1
a3(2, 5) = [D1 (ρ̄) + iαρ̄]
γM 2
a3(3, 1) = D1 (V̄ )Ū
µ̄ λ
a3(3, 2) = D1 (V̄ )ρ̄ + αβ ( + 1)
Re µ̄
µ̄
a3(3, 3) = iαρ̄Ū + 2 α2
Re

32 of 35

American Institute of Aeronautics and Astronautics


iα µ̄ λ
a3(4, 1) = −2D3 (Ū )Ū − Ū 2 m13 + ( + 2)D3 (Ū )
ρ̄ Re µ̄
iα dµ̄ λ
a3(4, 2) = −2D3 (ρ̄Ū ) − D3 (T̄ ) − ρ̄Ū 2m13
Re dT̄ µ̄
iα µ̄ λ
+ ( + 2)D3 (ρ̄)
ρ̄ Re µ̄
µ̄
a3(4, 4) = 2 α2 + ρ̄Ū iα
Re
iα dµ̄
a3(4, 5) = − D3 (Ū )
Re dT̄
(γ − 1)
a3(5, 1) = [Ū T̄ iα + Ū D1 (T̄ )] − c̄p Ū D1 (T̄ )
γ
a3(5, 2) = (γ − 1)M 2 D1 (P̄ ) − ρ̄c̄p D1 (T̄ )
µ̄
a3(5, 4) = (γ − 1)M 2 D3 (Ū )2iα
Re
(γ − 1)
a3(5, 5) = [Ū D1 (ρ̄) + Ū ρ̄iα]
γ
dc̄p 2
−Ū ρ̄[c̄p iα + D1 (T̄ )] − κ̄α2
dT̄ ReP r
a4(1, 1) = Ū
a4(1, 2) = ρ̄

a4(2, 1) =
γM 2
a4(2, 2) = ρ̄Ū
ρ̄
a4(2, 5) =
γM 2
a4(3, 3) = ρ̄Ū
a4(4, 4) = ρ̄Ū
(γ − 1)
a4(5, 1) = Ū T̄
γ
 
(γ − 1)
a4(5, 5) = Ū ρ̄ − c̄p
γ

Acknowledgment
The financial support of the EU project (ALTTA contract G4RD-CT-2000-00143) is gratefully acknowl-
edged. This research has received support from the AEROSHAPE project funded by the European Com-
mission, DG Research, under the GROWTH initiative (Project Ref: GRD1-1999-10752).

References
1 Joslin, R., “Overview of laminar flow control,” Tech. Rep. 1998-208705, NASA, Langley Research Center, Hampton,

Virginia, Oct 1998.


2 Jameson, A., “Optimum aerodynamic design using CFD and control theory,” AIAA Paper, , No. 95-1729, 1995.
3 Nemec, M. and Zingg, D., “Towards Efficient Aerodynamic Shape Optimization Based on the Navier–Stokes Equations,”

AIAA Paper, , No. 2001-2532, 2001.


4 van Ingen, J. L., “A suggested semiempirical method for the calculation of the boundary layer transition region.” Tech.

33 of 35

American Institute of Aeronautics and Astronautics


Rep. VTH-74, Department of Aeronautical Engineering, University of Delft, 1956.
5 Smith, A. M. O. and Gamberoni, N., “Transition, pressure gradient and stability theory.” Tech. Rep. ES 26388, Douglas

Aircraft Co., 1956.


6 Arnal, D., “Boundary Layer Transition: Predictions Based on Linear Theory,” Special course on ’progress in transition

modeling’, March-April 1993, AGARD-R-793, 1993, 2-1–2-63.


7 Green, B. E. and Whitesides, J. L., “A method for the constrained design of natural laminar flow airfoils,” AIAA Paper,

, No. 96-2502, 1996.


8 Manning, V. M. and Kroo, I. M., “Multidisciplinary optimization of a natural laminar flow supersonic aircraft,” AIAA

Paper , , No. 99-3102, 1999.


9 Lions, J., Optimal Control of Systems Governed by Partial Differential Equations, Springer-Verlag,New York, 1971.
10 Pironneau, O., “On optimal profiles in Stokes flow,” J. Fluid Mech., Vol. 59, 1973, pp. 117–128.
11 Jameson, A., “Aerodynamic design via control theory,” Journal of Scientific Computing, Vol. 3, 1988, pp. 233–260.
12 Anderson, W. and Bonhaus, D., “Airfoil Design on Unstructured Grids for Turbulent Flows,” AIAA Journal, Vol. 37,

No. 2, 1999, pp. 185–191.


13 Baysal, O. and Ghayour, K., “Continuous Adjoint Sensitivities for Optimization with General Cost Functionals on

Unstructured Meshes,” AIAA Journal, Vol. 39, No. 1, 2001, pp. 48–55.
14 Burgreen, G., Baysal, O., and Eleshaky, M., “Improving the Efficiency of Aerodynamic Shape Optimization,” AIAA

Journal, Vol. 32, No. 1, 1994, pp. 69–76.


15 Elliot, J., Aerodynamic based on the Euler and Navier–Stokes equations using unstructured grids, Ph.D. thesis, MIT

Dept. of Aero. and Astro., 1998.


16 Enoksson, O., “Shape optimization in compressible inviscid flow,” Licenciate Thesis LiU-TEK-LIC-2000:31, 2000, De-

partment of Mathematics, Institute of Technology, Linköpings University.


17 Jameson, A., Pierce, N., and Martinelly, L., “Optimum Aerodynamic Design using the Navier-Stokes Equations,” AIAA

Paper , , No. 97-0101, 1997.


18 Mohammadi, B., “A New Optimal Shape Procedure for Inviscid and Viscous Turbulent Flows,” Int. J. Numer. Meth.

Fluids, Vol. 25, 1997, pp. 183–203.


19 Reuther, J. J., Jameson, A., Alonso, J. J., Rimlinger, M. J., and Saunders, D., “Constrained multipoint aerodynamic

shape optimization using an adjoint formulation and parallel computers, part 1,” J. Aircraft, Vol. 36, No. 1, 1999, pp. 51–60.
20 Soemarwoto, B., Multi-Point Aerodynamic Design by Optimization, Ph.D. thesis, Delft University of Technology, Faculty

of Aerospace Engineering, P.O. Box 5058, 2600 GB Delft, Netherlands, 1996.


21 Sung, C. and Kwon, J., “Accurate Aerodynamic Sensitivity Analysis Using Adjoint Equations,” AIAA Journal, Vol. 38,

No. 2, 2000, pp. 243–250.


22 Giles, M. and Pierce, N., “An introduction to the adjoint approach to design,” Flow, Turbulence and Combustion, Vol. 65,

2000, pp. 393–415.


23 Schubauer, G. B. and Skramstad, H. K., “Laminar-Boundary-Layer Oscillations and Transition on a Flat Plate,” NACA

Tech. Note No. 909 , 1948.


24 Malik, M. R., “Prediction and Control of Transition in Supersonic and Hypersonic Boundary Layers,” AIAA J., Vol. 27,

1989, pp. 1487–1493.


25 Zurigat, Y. H., Nayfeh, A. H., and Masad, J. A., “Effect of Pressure Gradient on the Stability of Compressible Boundary

Layers,” AIAA Paper, , No. 90-1451, 1990, 21st Fluid Dynamics, Plasma Dynamics and Lasers Conference, Seattle, WA.
26 Lighthill, M. J., “A new method of two-dimensional aerodynamic design,” Tech. rep., ARC, 1945, Rand M 2112.
27 Pralits, J. O. and Hanifi, A., “Optimization of Steady Suction for Disturbance Control on Infinite Swept Wings,” Phys.

Fluids, Vol. 15, No. 9, 2003, pp. 2756–2772.


28 Pralits, J. O., Hanifi, A., and Henningson, D. S., “Adjoint-based optimization of steady suction for disturbance control

in incompressible flows,” J. Fluid Mech., Vol. 467, 2002, pp. 129–161.


29 Eliasson, P., “EDGE, A Navier–Stokes Solver, for Unstructured Grids,” Tech. Rep. FOI-R–0298–SE, Swedish Defence

Research Agency, Stockholm, November 2001.


30 Barth, T., “Aspects of Unstructured Grids and Finite-Volume Solvers for the Euler and Navier–Stokes Equations,” Special

Course on Unstructured Methods for Advection Dominated Flows, AGARD Report 787, May 1991, pp. 6–1–6–61.
31 Bertolotti, F. P., Herbert, T., and Spalart, S., “Linear and Nonlinear Stability of the Blasius Boundary Layer,” J. Fluid

Mech., Vol. 242, 1992, pp. 441–474.


32 Malik, M. R. and Balakumar, P., “Nonparallel stability of rotating disk flow using PSE,” Instability, Transition and

Turbulence, edited by M. Hussaini, A. Kumar, and C. Streett, Springer, 1992, pp. 168–180.
33 Simen, M., “Local and non-local stability theory of spatially varying flows,” Instability, Transition and Turbulence, edited

by M. Hussaini, A. Kumar, and C. Streett, Springer, 1992, pp. 181–201.


34 Herbert, T., “Parabolized stability equations,” Annu. Rev. Fluid Mech., Vol. 29, 1997, pp. 245–283.
35 Pralits, J. O., Airiau, C., Hanifi, A., and Henningson, D. S., “Sensitivity Analysis Using Adjoint Parabolized Stability

Equations for Compressible Flows,” Flow, Turbulence and Combustion, Vol. 65, No. 3/4, 2000, pp. 321–346.

34 of 35

American Institute of Aeronautics and Astronautics


36 Hanifi, A., Henningson, D. S., Hein, S., and Bertolotti, F. P.and Simen, M., “Linear Non-local Instability Analysis - the

linear NOLOT code,” FFA TN , Vol. 1994-54, 1994.


37 Airiau, C., Bottaro, A., Walther, S., and Legendre, D., “A methodology for Optimal Laminar Flow Control: Application

to the Damping of Tollmien-Schlichting Waves in a Boundary Layer,” Phys. Fluids, Vol. 15, 2003, pp. 1131–1145.
38 Amoignon, O., “Adjoint-based aerodynamic shape optimization,” Tech. Rep. IT Licentiate theses 2003-012, Department

of Information Technology, Division of Scientific Computing, Uppsala University, Box 337, SE-751 05 Uppsala, Sweden, October
2003.
39 Pralits, J. O., “Towards optimal design of vehicles with low drag: Applications to sensitivity analysis and optimal control,”

Licentiate thesis KTH/MEK/TR-01/07, Kungl Tekniska Högskolan, SE-100 44 Stockholm, 2001.


40 Amoignon, O., Pralits, J. O., Hanifi, A., Berggren, M., and Henningson, D. S., “Shape optimization for delay of laminar-

turbulent transition,” Tech. Rep. FOI-R–0919–SE, Swedish Defence Research Agency, FOI, Aeronautics Division, FFA, SE-172
90 Stockholm, Sweden, 2003.
41 Frank, P. and Shubin, G., “A comparison of Optimization-Based Approaches for a Model Computational Aerodynamics

Design Problem,” Journal of Computational Physics, Vol. 98, 1992, pp. 74–89.
42 Nocedal, J. and Wright, S., Numerical Optimization, Springer Series in Operations Research, 1999.
43 Wallin, S. and Johansson, A. V., “An explicit algebraic Reynolds stress model for incompressible and compressible

turbulent flows,” J. Fluid Mech., Vol. 403, 2000, pp. 89–132.


44 Cook, P., McDonald, M., and Firmin, M., “Aerofoil RAE 2822 – Pressure distributions, and boundary layer and wake

measurements,” Experimental Data Base for Computer Program Assessment, AGARD-AR-138, May 1979, pp. A6–1–A6–77.

35 of 35

American Institute of Aeronautics and Astronautics


Paper III
Mesh Deformation using Radial Basis
Functions
for
Gradient-based Aerodynamic Shape
Optimization

S. Jakobsson a , O. Amoignon b
a Department of Computational Physics, Division of Systems Technology, FOI,
SE-164 90 Stockholm, Sweden
b Division
of Scientific Computing, Department of Information Technology,
Uppsala University, Box 337, SE-751 05 Uppsala, Sweden

Abstract

Gradient-based aerodynamic shape optimization using Computational Fluid Dy-


namics (CFD), and time dependent problems in aeroelasticity, that is, coupled cal-
culations between Computational Structural Mechanics (CSM) and CFD, require
repeated deformations of the CFD mesh.
An interpolation scheme, based on Radial Basis Functions (RBF), is devised in
order to propagate the deformations from the boundaries to the interior of the CFD
mesh. This method can lower the computational costs due to the deformation of the
mesh, in comparison with the usual Laplace smoothing. Moreover, the algorithm
is independent of the mesh connectivities. Therefore, structured and unstructured
meshes are equally treated as well as hybrid meshes.
The application of this interpolation scheme in problems of aerodynamic shape
optimization is also carefully investigated. When the optimization is executed by
a gradient-based algorithm the cost function is differentiated with respect to the
design parameters in order to obtain the gradient. The gradient is most efficiently
and accurately calculated by solving a certain adjoint equation derived from the
discretized flow equations. The calculation of the gradient, which is detailed in this
presentation, involves the Jacobian matrix of the mesh deformation.
Finally, we present the results of an optimization of the ONERA M6 wing at tran-
sonic speed using the interpolation algorithm. The results are used for comparison
with another technique of mesh deformation. The quality of the mesh obtained by
the new algorithm, and the interpolation error, are analyzed with respect to the pa-
rameters of the interpolation scheme: the type of RBF, the RBFs shape parameter,
and the sets of control points.
Key words: Interpolation, Radial Basis Functions, Mesh deformation, Gradient
optimization, Inviscid compressible flow, Adjoint equations

1 Introduction

In aeronautic design it is common to use Computational Fluid Dynamics


(CFD) to simulate air flowing around wings, airplanes, or through the in-
let and outlet of the propulsion units. CFD simulations have a lower cost than
traditional experiments, which enables to carry out studies requiring many
simulations such as parameter optimization. In aerodynamic shape optimiza-
tion, the goal is to improve an indicator of the aerodynamic performance of
the design given by a set of parameters. The improvement is measured by the
reduction of a cost function, which, typically, is an expression based on the
drag, the lift, and the moment coefficients [8,10,16,18,17,2].

The minimization of the cost function by a gradient-based algorithm, which


is an efficient approach, still requires many function and gradient evalua-
tions [19]. In aerodynamic applications, each function evaluation requires a
CFD solution on a different design, which involves different CFD meshes. De-
forming the mesh is an efficient alternative to re-meshing and it enables to
build a smooth mapping from the design parameters to the cost function.
In aerodynamic shape optimization, we identify two main approaches of the
mesh deformation. The first is to use an interpolation algorithm, which may
easily be devised in the case of structured meshes, for example by displacing
the nodes along grid lines [8,18,17]. The second approach, suitable for un-
structured or hybrid meshes, is to use a mesh smoother, also called Laplace
smoothing [10,16,2]. This last technique involves solving large systems of equa-
tions. This report proposes an alternative technique of mesh deformation that
can be used on arbitrary meshes and that reduces the computational cost.

The new algorithm is an interpolation method. It is derived from a problem


of interpolation presented in Section 2.1. By requiring that the interpolating
function is translation and rotation invariant, and linear in the displacements,
a representation formula is derived (Theorem 2). Combined with radial ba-
sis functions, in Section 2.2, this yields the required mesh deformation algo-
rithm. It turns out that this is the same expansion as used by Beckert and
Wendland [5] for aeroelastic applications. They required that all first order
polynomials should to be interpolated exactly which leads to translation and
rotation invariance. The method is tested in 2D and 3D in Section 2.3.

Our purpose is to apply this method in aerodynamic shape optimization and,


in coming studies, for aeroelastic calculations. Section 3 details an example
of optimization of the ONERA M6 wing with the purpose to minimize a cost

2
function that depends on the CFD solution and on the design of the wing.
The particularity of this application, in contrast to aeroelasticity, is that the
mapping defined by the mesh deformation algorithm is involved at two stages
in the calculations. In the forward mode, when the cost function is evaluated
for a new design, the mapping deforms the mesh for a given deformation of
the wing, as explained in Section 3.1. In the backward mode, the Jacobian of
the mapping is used to calculate the gradient of the cost function with respect
to the parameters of design. Section 3.4 details the calculation of gradients of
a cost function.

The performances of the mesh mapping, with respect to the computational


cost, is investigated in Section 4.1. The results of optimization of the ON-
ERA M6 wing are given in Section 4.2. In Section 4.3 we analyze the per-
formances of the mesh mapping, with respect to mesh qualities and to the
interpolation error.

2 Interpolation scheme for mesh deformation

In this paper we take an abstract approach to define the mesh deformation.


The idea is to construct an interpolant of the displacements of some boundary
nodes, in a CFD mesh, in such a way that it extrapolates those displace-
ments into the entire domain of the CFD mesh, with some constraints. The
presentation of the abstract problem stresses the connection to aeroelastic
interpolation since the two problems set common requirements.

2.1 Geometric interpolation problem

The following geometric interpolation/extrapolation problem is of relevance


for both the aeroelastic interpolation problem and mesh deformations.

Problem 1 Assume that we have a deformable structure Ω with rest state/position


Ω0 . There are a number of control points {Pk }k∈VP with coordinates {xk }k∈VP
in Ω, where VP is the set of control nodes indexes. In the rest position, the
point Pk has the coordinates x0k . Given that the points Pk have coordinates xk ,
k ∈ VP , compute an approximation of the coordinates x to a point P which in
the rest state has the coordinates x0 .

In the sections relative to mesh deformation VP is a subset of the mesh nodes,


therefore, it is convenient to use the following notations:

N = |VP | , and , VP = {ki }1≤i≤N .

3
The approximation of the coordinates of P depends on x0 , {xki }N i=1 and
{x0ki }N
i=1  
x = G x0 , {xki }N
i=1 , {x 0 N
}
ki i=1 } .
We will call the function G the geometric interpolation function.

For applications in aeroelasticity, Ω might be a wing of an aircraft and the


control points are nodes of the grid used for the Computational Structural
Mechanics (CSM) analysis. In this context, the geometric interpolation func-
tion is used to calculate the displacements of the points on the wing from the
displacements given by the CSM calculations at the control points. For mesh
deformation, the control points would be nodes, of the CFD grid, that are on
the wing. In this other context, the geometric interpolation function is used
to calculate the displacements of all the nodes in the CFD mesh. In all ap-
plications of this method, if x0 is within the convex hull of the control points
then the coordinate vector of P is interpolated, otherwise it is extrapolated.
As the mesh deformation is used here for aerodynamic shape optimization,
and because we use a gradient-based algorithm, we impose that the geometric
interpolation function is differentiable with respect to the displacements of the
control points.

We require that the geometric interpolation function satisfies the following


four conditions.

(1) If P is one of the control points, then the interpolation condition should
be satisfied
 
xki = G x0ki , {xki }N 0 N
i=1 , {xki }i=1 } , ∀k ∈ VP . (1)

(2) For all translation operators Tα , Tα x = x + α, and x0 ∈ R3 , we have


   
Tα G x0 , {xki }N 0 N 0 N 0 N
i=1 , {xki }i=1 } = G x , {Tα xki }i=1 , {xki }i=1 } . (2)

(3) For all rotation operators R and x0 ∈ R3 , we have


   
RG x0 , {xki }N 0 N 0 N 0 N
i=1 , {xki }i=1 } = G x , {Rxki }i=1 , {xki }i=1 } . (3)

(4) The displacement of any point should depend linearly on the displacement
of the control points.

Condition 1 states that G is an interpolant. Conditions 2 and 3 impose that the


interpolation method is invariant with respect to rigid motions. In aeroelastic
applications, the three first conditions guarantee the conservation of virtual
work, total load and total momentum, when the displacements are transferred
from the CSM grid to the CFD grid. Condition 4 limits in a natural way the
space of possible interpolation functions. Most existing aeroelastic interpola-
tion methods satisfy condition 4. One exception is the CVT method (constant

4
volume tetrahedra) of L. Goura [12] which satisfies the conditions 1 to 3 but
is non-linear in the displacements. For an overview of existing methods we
refer to [14]. The program SPIVOL, developed by EADS-CASA, uses volume
splines for interpolation and satisfies these conditions [21]. We argue that for
mesh deformation it is also natural to require invariance under rigid motions
since these mappings preserves the qualitative properties of the mesh. For
convenience, we introduce the displacement vectors for the coordinates

v = x − x0 , (4)
v ki = xki − x0ki , 1 ≤ i ≤ N. (5)

The linearity condition can be written


  N
   N

v = G x0 , {xki }N 0 N 0
i=1 , {xki }i=1 } −x = Ai (x0 ) xki − x0ki = Ai (x0 ) v ki .
i=1 i=1
(6)

The following theorem gives a representation formula for all the geometric
interpolation function which satisfy conditions 1 to 4.

Theorem 2 The geometric interpolation function satisfies the conditions 1


to 4 if and only if it has the following representation in three dimensions
N
   N

x = x0 + ai (x0 ) xki − x0ki = x0 + ai (x0 )v ki , (7)
i=1 i=1

where ai : Ω0 → R are scalar valued functions defined on Ω0 that satisfy


N

ai (x0 ) = 1 (8)
i=1

and
N

x0 = ai (x0 )x0ki . (9)
i=1
In particular, the coordinate vectors {x0ki }N
i=1 cannot be contained in any plane.
Moreover, the equations 8) and (9) together are equivalent to that
N

q(x0 ) = ai (x0 )q(x0ki )
i=1

holds for all first degree polynomials q; that is, all first degree polynomials are
interpolated exactly.

In two dimensions, the scalar valued functions ai should be replaced by scalar


valued functions times a rotation matrix. Otherwise the theorem holds if the

5
Radial basis function φ(r)

Spline type (Rn ) |r|n , n odd


Thin Plate Spline (TPSn ) |r|n log |r|, n even

Multiquadric (MQ) 1 + r2
Inverse multiquadric (IMQ) √ 1
1+r 2
1
Inverse quadratic (IQ) 1+r 2
2
Gaussian (GS) e−r
Table 1
Common radial basis functions.
equations are modified appropriately, that is, 1 in (8) should be replaced by the
identity matrix.

A proof is given in Appendix A. Due to (9), the representation (7) can also
be written
N

x= ai (x0 )xki .
i=1

2.2 Realization based on Radial Basis Functions

To obtain a geometric interpolation function that fulfills the conditions 1 to 4


above, we will apply radial basis functions interpolation for the displacements.
We begin with a review of some results on radial basis functions.

Radial basis functions provide a very general and flexible way of interpola-
tion in multi-dimensional spaces, even for unstructured data where it is often
impossible to apply polynomial or spline interpolation. Because of its good ap-
proximation properties and ease of implementation, the method is a popular
choice in many different areas, ranging from statistics to the approximation of
partial differential equations, see for example [6] and the books [7] and [25].

According to Theorem 2, all first degree polynomials must be exactly inter-


polated in order to satisfy conditions 1 to 4. Therefore, we need to consider
RBF expansions that satisfy this condition.

Suppose that g is the function to be interpolated at the set XP = {xki }Ni=1 of


data points, all in Rd . Let φ be a function defined on the positive real axis.
The interpolation space then consists of all functions of the form
N

s(x) = γl φ(x − xl ) + h(x), (10)
l=1

6
for coefficients γl ∈ R and first degree polynomials h. Here  ·  denotes
the standard Euclidean norm. In many cases it is appropriate to scale the
basis function with a so-called shape parameter ε. The basis function is then
replaced by φε (r) = φ(εr). For mesh deformation we need three interpolating
functions, one for each coordinate direction. The data points are sometimes
called centers, and the basis functions are radial around these centers. The
coefficients γ = (γ1 , . . . , γN )T and the polynomial are then chosen so that s
interpolates g exactly at the data points

s(xki ) = g(xki ), 1 ≤ i ≤ N,

and γ must also be so that


N

0= γi q(xki )
i=1

for all first degree polynomials q. This leads to a linear equation system for the
coefficients γ and the coefficients for the polynomial. If φ is one of the basis
function given in Table 1, then this system is non-singular, which implies that
a unique solution exists.

This linear equation system for the coefficient vectors γ and β takes the form
    
 M Pγ  g
   =  , (11)
PT 0 β 0

where M is the interpolation matrix

Mij = φ(xki − xkj ), 1 ≤ i, j ≤ N.

and P is the matrix defined by constraint to interpolate all first degree poly-
nomials exactly  
0 0 0
 1 x k1 y k1 zk1 
 
 
 1 x0k2 yk02 zk02 
P=
 . .. ..
.
..  (12)
 .. . . .
 
 
1 x0kN yk0N zk0N
Here we have introduced the vectors g = {g(xki )}N i=1 , and β is the vector of
coefficients for the polynomial h. Given that the interpolation matrix M is
invertible (as it is for many RBFs), we can solve for γ and β to obtain

γ = M−1 g − M−1 PMP PT M−1 g (13)

and
β = MP PT M−1 g, (14)

7
where  −1
MP = PT M−1 P .
Finally, the polynomial h in (10) becomes

h(x) = β1 + β2 x + β3 y + β4 z,

where x = (x, y, z)T .

Now we apply this type of approximation to the displacements vx , vy , and vz


in each coordinate direction

N

vx = sx (x) = γix φ(x − xki ) + β1x + β2x x + β3x y + β4x z,
i=1
N
vy = sy (x) = γiy φ(x − xki ) + β1y + β2y x + β3y y + β4y z,
i=1
N

vx = sz (x) = γiz φ(x − xki ) + β1z + β2z x + β3z y + β4z z,
i=1

where the set of coefficients satisfy (11).

Clearly, the coefficients depend linearly on the displacements. Thus, according


to Theorem 2, the conditions 1 to 4 are satisfied. However, here the linear
dependence between the displacements of the control points and an arbitrary
point is implicit through the coefficients γ and β . If needed, it is not hard to
derive explicit formulas for the coefficient vector a(x0 ).

2.3 Simple test cases

To illustrate the method, two simple two-dimensional examples of mesh de-


formation have been simulated in MATLABTM .

The result of the first test is shown in Figure 1. Here the control points lie
on the outer boundary of a 3-unit-long and 1-unit-wide rectangle. The test is
performed with the inverse multiquadric basis function with the shape param-
eter equal to 1. Although the deformation for all points outside the structure
is extrapolated rather then interpolated, the deformation is, in all cases, very
regular throughout the external mesh. A possible interpretation is that the
constraint to interpolate all first degree polynomials exactly has a stabilizing
effect. This is promising for applications to mesh deformation where it is im-
portant to preserve the properties of the original mesh in order to obtain good
computational results. A slightly more complicated case is shown in Figure 2.

8
3 4

3
2

2
1

−1
−1

−2
−2

−3 −3
−3 −2 −1 0 1 2 3 −3 −2 −1 0 1 2 3 4
4 5

3 4

2 3

1 2

0 1

−1 0

−2 −1

−3 −2

−4 −3
−3 −2 −1 0 1 2 3 −3 −2 −1 0 1 2 3

Fig. 1. The undeformed domain together with its control points are shown to the
upper left. The upper right figure shows the deformation due to a random deflection
of the control points. The lower left and lower right figure show the deformation
resulting from sinusoidal and quadratic deflections, respectively.
0.5
0.5

0.4
0.4

0.3
0.3

0.2
0.2

0.1
0.1

0
0

−0.1
−0.1

−0.2
−0.2

−0.3
−0.3

−0.4
−0.4

−0.5
−0.5
−0.2 0 0.2 0.4 0.6 0.8 1 1.2 −0.2 0 0.2 0.4 0.6 0.8 1 1.2

Fig. 2. Deformation around a two dimensional airfoil. The right figure shows the
mesh after quadratic deflection of the control points on the surface
3 Optimization of a wing

In this section we describe how the the mesh deformation algorithm defined
earlier is used in the optimization of the ONERA M6 wing, described in the
AGARD report [22], at Mach number M = 0.8395 and angle of attack α =
3.06◦ . The numerical results are given in Section 4. The flow is modelled by
the Euler equations of gas dynamics.

9
Fig. 3. Euler mesh on the ONERA M6 wing.
The cost function J is designed in order to reduce the pressure drag, and in
addition penalize changes in the coefficients of lift and pitching moment:
 2  2
J = λD CD + 12 λL CL − CL0 0
+ 21 λM CM − CM , (15)

where superscript 0 denotes values at initial design. The coefficients of drag


(CD ), lift (CL ), and pitching moment (CM ), are calculated from the pressure
at nodes i, denoted pi , on the wing (i ∈ V(∂Ωw )):
 pi ni · dD
CD = 1 ,
ρ u2 S
2 ∞ ∞ ref
i ∈ V(∂Ωw )
 pi ni · dL
CL = 1 ,
ρ u2 S
2 ∞ ∞ ref
(16)
i ∈ V(∂Ωw )
 
 pi dM · xi − O ref. × ni
CM = 1 .
ρ u2 S L
2 ∞ ∞ ref ref
i ∈ V(∂Ωw )

Here, dD is a unit vector in the direction of the farfield velocity u∞ , dL is


a unit vector orthogonal to dD such that CL is positive for lifting pressure
forces, and dM is a unit vector orthogonal to dD and dL . Other notations are
ρ∞ , the density in the farfield, Sref a reference area of the wing, Lref a reference
length of the wing, O ref the reference center of rotation for the calculation of
the moments, xi the vector of coordinates of node i, and ni the normal surface
vector at node i.

The parameterization, given appendix B, is also used in [2]. It parameterizes

10
the wing in terms of twist, camber and thicknesses distributions. The mesh is
deformed by the RBF algorithm presented in Section 2.2 with additional treat-
ments at the symmetry and far-field boundaries, explained in Section 3.1. The
discretized Euler equations are presented in Section 3.2. The adjoint method
is used to compute the gradient of the cost function with respect to the design
parameters. In contrast to perturbation methods such as finite differences, the
cost of the adjoint method is independent from the number of design variables.
For a presentation of this approach we refer to [2,20,11,13]. The adjoint equa-
tions are presented in discretized form in Section 3.3, and Section 3.4 details
the calculation of the gradient with respect to the design parameters.

3.1 Constrained mesh deformation

The symmetry boundary is at the root of the wing y = 0, see Figure 3. It is


required that all points in the symmetry boundary (y = 0) must stay in this
plane for all allowed deformations. Moreover, we shall impose the constraint
that the points on the far-field boundaries are fixed. The latter constraint
is easily implemented using a suitable cut-off function. This implies that the
translation and rotation invariance are lost in the farfield.

We assume that the deformation of the control points is such that


∆yk
yk0

is bounded. This means that the deformation in the y-coordinate of the con-
trol points is controlled by its distance to the plane y = 0. To describe the
interpolation of the deformation in the y direction we define the function

κ(y, α) = 1 − exp(−αy). (17)

Clearly, κ(y, α) ≈ y for small y and κ(y, α) ≈ 1 for large values (everything
relative α which defines the scale of the problem).

According to our assumptions, the quantities


∆yk
ηk =
κ(yk0 , α)

are bounded. Let sη be a RBF approximation of this function as described in


Section 2.2. Then
s∆y (x) = κ(y, α)sη (x)
gives a deformation in the y-coordinate which leaves all points in the plane
y = 0 fixed and interpolates the deformation at all control points. To complete
the deformation, we choose a smooth cut-off function ω which is identically

11
i

nij
Si
i
S
ij

j
ni

Fig. 4. The dual grid control surfaces and associated surface normals, on the bound-

ary (left) and in a volume element (right). nij is the surface normal of Sij = Vi Vj
(partially represented), and ni is the surface normal of Si (partially represented),
the intersection of Vi with the boundary ∂Ω.

1 in a neighborhood of the wing and decays smoothly to zero at the far field
boundaries. If s∆x and s∆z are the deformations in the x and z coordinate,
respectively, and s = (s∆x , s∆y , s∆z )T then the function

x = x0 + ω(x0 )s(x0 )

fulfills all imposed conditions for the mesh deformation.

3.2 Flow equations discretized in Edge

The program Edge [9,23] solves a node-centered and edge-based finite-volume


approximation of the system of compressible Euler or Reynolds Averaged
Navier Stokes equations. The use of edge-based data is particularly efficient
when using unstructured meshes. The discretization is based on the median
dual grid as depicted in Figure 4. For an introduction to this type of discretiza-
tion, we refer to Barth [4].

The Euler equations express the conservation of the mass, momentum and to-
tal energy densities. The vector field of the conserved flow variables is denoted
w = [ρ, m, E]T . In the finite volume method, a bounded region Ω of the flow
domain is discretized by control volumes Vi (see Figure 4), i ∈ V(Ω), with
V(Ω) the set of the nodes indexes in Ω. The finite-volume approximation used
here reduces the conservation equations, applied to each control volume Vi , to
a system of ordinary differential equations (ODEs) involving only the values

12
of the conserved flow variables at the mesh nodes. The system of ODEs reads:

dwi
Vi + Ri = 0, ∀i ∈ V(Ω) , (18)
dt
where wi approximates the exact conservative variables at node i, that is
w (xi )
wi = [ρi , mi , Ei ]T , where mi = ρi ui . (19)
For a given node i in the domain Ω, the vector Ri , in (18), sums up the
numerical fluxes through the boundaries of Vi :

Ri = (nij · fij + dij ) ∀i ∈ V(Ω) ,
j∈Ni
 (20)
Ri = (nij · fij + dij ) + ni · fibc ∀i ∈ V(∂Ω) ,
j∈Ni

where Ni is the set of nodes connected to i with an edge ij. The numerical
flux through the control surface Sij of volume Vi (Figure 4) is the sum of an
advection flux (nij · fij ), fluxes implementing the boundary conditions (ni ·
fibc ), and artificial dissipation (dij ). In a central scheme approximation, the
convection flux density of the conserved variables through the control surface
Vij is supposed constant and replaced by

fij = (fi + fj ) /2 (21)

where

fi = f (wi ) , and f = [m , (m ⊗ m) /ρ + Ip , m (E + p) /ρ]T . (22)

In expression (22), the pressure p is calculated assuming an ideal fluid and the
law of perfect gas:
1 m2
p = (γ − 1) E − . (23)
2 ρ
Integration of the flux density fij through the surface Vij is then obtained
by the dot products nij · fij where nij is the surface normal associated with
Vij . The artificial dissipation flux dij is a blend of second- and fourth-order
differences [15].

An impermeability boundary condition (ui · ni = 0) is applied on wall and


symmetry boundaries yielding the boundary fluxes

fibc = [0 , Ipi , 0]T . (24)

On a farfield boundary the fluxes (22) are computed using the characteristic
primitive variables (vc ) based on either the farfield data (v∞ ), for incoming
characteristics, or, the flow data at the previous time step (vi ), for outgoing

13
characteristics. It is expressed in [9] as:

vic (n̂i ) = L (n̂i , v∞ ) H (λi ) L−1 (n̂i , v∞ ) vi


(25)
+ L (n̂i , v∞ ) (I − H (λi )) L−1 (n̂i , v∞ ) v∞ ,

where L (n̂i , v∞ ) is a matrix of right eigenvectors that diagonalizes the Ja-


cobian matrix of the flux in primitive variables along the outward-directed
unit normal n̂i , H (λi ) is a diagonal matrix whose diagonal is 0 for negative
eigenvalues and 1 for positive ones, and I is the identity matrix. The boundary
flux takes the form

fibc = f (vic (n̂i )) . (26)

Convergence of (18) to steady state is accelerated by local time stepping and


agglomeration multigrid. We will use the following notations for the set of all
the surface normals associated with the control volumes of the dual mesh:

 
nh = {ni }i∈V(Ω) , {nij }ij∈E(Ω)
 , and nh ≡ nh (Xh ) . (27)

The definition of the surface normals, ni and nij , is based on the coordinates
of the centroids of the elements and of the element surfaces, and on the coor-
dinates of the mid-points of the edges ij. Recalling that Xh is the vector of
the nodal coordinates, we denote by nh (Xh ), in (27), that the set nh depends
on the coordinate of the nodes. For the definitions of ni and nij we refer
to [4,1,2].

3.3 Adjoint of the flow equations in Edge

The adjoint of the discretized Euler equations, (18)–(26) in steady state and
including boundary conditions, are also solved by time marching of a system
of ODEs:
dwi∗
Vi + R∗i = 0 ∀i ∈ V(Ω) , (28)
dt

until steady state. The complete derivation based on discrete sensitivities can
be found in [1,2] . The following gives expression for the numerical fluxes in

14
the adjoint equation (28):
 T  
 ∂(fi · nij ) wi∗ − wj∗ 
R∗i = + d∗ij ∀i ∈ V(Ω) ,
j∈Ni ∂wi 2 j∈Ni
 T  
 ∂(fi · nij ) wi∗ − wj∗ 
R∗i = + d∗ij
j∈Ni ∂wi 2 j∈Ni
 T
∂(fibc · ni ) (29)
+ wi∗ ∀i ∈ V(∂Ω) , i ∈
/ V(∂Ωw ) ,
∂wi
 T  
 ∂(fi · nij ) wi∗ − wj∗ 
R∗i = + d∗ij
j∈Ni ∂wi 2 j∈Ni
 T
∂(fibc · ni ) ∂J
+ wi∗ − ∀i ∈ V(∂Ωw ) ,
∂wi ∂wi

where V(∂Ωw ) is the set of nodes at which the cost function J is evaluated given
by (15), and expressions of the Jacobian matrices are detailed in [1,2]. The
partial derivatives of the cost function at each node in V(∂Ωw ), with respect
to the flow solution, are directly obtained from the expressions (15)-(16). The
artificial dissipation flux d∗ij uses the stencil of dij , in the flow equations, but
applied to the adjoint flow w∗ and with artificial viscosities computed for the
flow solution w. The Jacobian of the farfield boundary fluxes is given by:

∂(fibc · ni ) ∂ (fi · ni ) dvi


= L (n̂i , v∞ ) H (λi ) L−1 (n̂i , v∞ ) . (30)
∂wi ∂vi dwi

The Jacobian of the Euler wall flux function is


 
∂ fibc · ni  T
= (γ − 1) 1
2
|ui |2 , −ui , 1 . (31)
∂wi

3.4 Computation of gradients

Gradient with respect to the dual and primal grid data

Given an arbitrary variation of the dual mesh data nh (27), and neglecting
the effect of the artificial viscosity, the first variation of the cost function (15)
can be expressed in terms of the solution to the adjoint equations (28)-(31),
and of the numerical fluxes of the Euler equations (21)-(26):

  T  ∂J
δJ = − wi∗ − wj∗ fij · δnij − wi∗ T fibc · δni + δnh . (32)
 i∈V(∂Ωh )
∂nh
ij∈E(Ω)

15
The proof can be found in [1,2]. The notations δnij and δni , in (32) are the
variations of the surface normals, and δnh denotes the vector of all those
variations.

Observing that the objective function (15)-(16) depends explicitly on the nor-
mal vectors ni , where i is the index of a node on the boundary, expression (32)
gives the gradient of J with respect to the dual data, denoted ∇Jn :


• for all edges ij
 T
(∇Jn )Tij = − wi∗ − wj∗ fij , (33)
• for all node i on a boundary, not on the wing:

(∇Jn )Ti = −wi∗ T fibc , (34)

• for all node i on the wing (where J is evaluated):

∂J
(∇Jn )Ti = −wi∗ T fibc + , (35)
∂ni

The partial derivatives in (35) are directly obtained from the expression of J
and of the aerodynamic coefficients (16). Details can be found in [2].

Denoting by Nh the number of mesh nodes, that is |V(Ω)|, the gradient ∇JX is
the Nh -by-d vector whose entries are the partial derivatives of J with respect
to the nodal coordinates
∂J
(∇JX )i,1 = ,
∂xi
∂J
(∇JX )i,2 = ,
∂yi
∂J
(∇JX )i,3 = .
∂zi
Recalling that the data nh depend on Xh , the set of coordinates of all the nodes
in the CFD mesh, the gradient of J with respect to the mesh coordinates,
denoted ∇JX , is calculated from (33)-(35) using the chain rule:
T T
dnh ∂J
∇JX = ∇Jn + . (36)
dXh ∂Xh

For a detailed algorithm to calculate ∇JX we refer to [1,2].

Gradient with respect to the control points

Given ∇JX , we calculate the gradient ∇JP of the cost function J with respect
to the control points Pk introduced in Section 2.1.

16
First, the derivatives with respect to the coefficients λ and β in the RBF-
expansion are computed using the chain rule. Since the expansions in the x,
y and z directions are independent, the computation of the derivatives in the
different directions are independent as well.

The following expansions are valid for the x, y and z coordinate, respectively:

N
 +4  
x = x0 + λxi ϕi x0 ,
i=1
N
 +4  
y = y 0 + κ(y 0 , α) λyi ϕi x0 ,
i=1
N
 +4  
z = z0 + λzi ϕi x0 ,
i=1

where κ(y 0 , α) is given by (17) and we have introduced the notation


  



 ω(x0 )φ x0 − x0ki  , i = 1, . . . , N





 ω(x0 ), i = N + 1,



ϕi (x0 ) = x0 ω(x0 ), i = N + 2,







 y 0 ω(x0 ), i = N + 3,



 0 0
 z ω(x ), i = N + 4,

and λx,y,z
N +i = βi
x,y,z
for i = 1, 2, 3, 4, so all coefficients, in each direction, are
gathered in one long vector, e.g. λ x , λ y , λ z . We can now differentiate the cost
function with respect to λ

Nh Nh
∂J  ∂J ∂xk  ∂J  0 
= = ϕi xk ,
∂λxi k=0 ∂xk ∂λxi k=0 ∂xk
Nh
 Nh
  
∂J ∂J ∂yk ∂J
y = y = κ(yk0 , α)ϕi x0k ,
∂λi k=0 ∂yk ∂λi k=0 ∂yk
Nh Nh
∂J  ∂J ∂zk  ∂J  0 
= = ϕi xk .
∂λzi k=0 ∂zk ∂λzi k=0 ∂zk

Second, we compute, also by the chain rule, the derivatives of J with respect
to the deflections of the control points v k , defined in §2.1. Using the usual
notations, vx , vy , vz denote the vectors of all control points displacements in
each of the directions x , y , z.

17
 the 2-by-2 block matrix (11), we have the relation
Denoting by M

 
  x y
 v v vz 
M λx λy λz = 
0 0 0

so
 
 
 −1 
vx v
 y vz 
λx λy λz =M  
0 0 0

which yields

∂λxj ∂λyj ∂λzj  −1


x
= y = =M ji for 1 ≤ i ≤ N and 1 ≤ j ≤ N + 4.
∂vki ∂ vki ∂vkzi

Here vkyi is defined by


vkyi
vkyi = .
κ(yk0i , α)

Therefore
∂ vkyi 1
= .
∂vkyi κ(yk0i , α)

The derivatives with respect to the displacements of the control points v k , de-
fined by (5), are the derivatives with respect to the control points coordinates
xk , that is, for 1 ≤ i ≤ N :

∂J N
 +4
∂J ∂λxj N
 +4
∂J  −1
(∇JP )xki = = x
= x
Mji , (37)
∂xki j=0 ∂λj ∂xki j=0 ∂λ j
N +4 y y N +4  −1
∂J  ∂J ∂λj ∂ vki  ∂J M ji
(∇JP )yki = = y y = x 0
, (38)
∂yki j=0 ∂λj ∂ vki ∂yki j=0 ∂λj κ(yki , α)
+4
∂J N
 ∂J ∂λzj N
 +4
∂J  −1
(∇JP )zki = = z
= z
Mji . (39)
∂zki j=0 ∂λj ∂zki j=0 ∂λj

Gradient with respect to the design parameters

Given the gradient with respect to the control points (39), we calculate here
the gradient ∇J with respect to the variables of optimization in (B.1), the

18
 

parameters cn,i , θn,i , d+
n,i , dn,i . It is obtained by the chain rule:
1≤i≤n+1

 ∂xnew
k
(∇J)cn,i = · (∇JP )k ,
k∈VP ∂cn,i

 ∂xnew
k
(∇J)θn,i = · (∇JP )k ,
k∈VP ∂θn,i
(40)
 ∂xnew
k
(∇J)d+ = · (∇JP )k ,
n,i
k∈VP ∂d+
n,i

 ∂xnew
k
(∇J)d− = · (∇JP )k ,
n,i
k∈VP ∂d−
n,i

where the sum is over all the control points (VP ) and the coordinates xnew k
of those points are calculated by (B.1)-(B.5). For this particular parameteri-
zation, the partial derivatives of the coordinates vectors xnew
k with respect to
the design parameters are obtained at a cost that is negligible in regard to
the mesh deformation, using a perturbation technique. The present technique
involves complex arithmetic [24], which avoids the round-off errors of divided
differences methods.

4 Numerical applications

An important feature of the method presented here is that it allows to lower


the CPU time per deformed mesh, which is confirmed by the tests carried out
in 3D in Section 4.1. In Section 4.2 we analyse the optimized designs obtained
by shape optimization. The differences with the results obtained in [2] come
from the different mesh deformation algorithms. Moreover, the method used
here involves an approximation of the geometry of the parameterized design.
These differences are analysed, numerically, in Section 4.3.

4.1 Efficiency

We compare the RBF method for deforming meshes with a Laplace smoother
(DL) as in [2].

The tests are carried out on two unstructured meshes around the M6-wing.
The ’Euler mesh’ is suitable for inviscid flows calculations and contains about
136000 nodes, in 736000 tetrahedral elements. The wing itself is represented
in this mesh by approximately 16000 points. The ’Navier-Stokes mesh’ is gen-
erated for viscous calculations, and it has about 1 million nodes in 3 millions

19
’Euler mesh’
CPU time (s) DL (PCG) RBF (2166) RBF (1378) RBF (730)

Inverting matrix 0 34 9 3
Deformation (x,y,z) 66 (36) 17 9 4
Gradient 63 (33) 44 14 4
Table 2
CPU time in seconds for the calculation of deformed Euler meshes and gradients, for
the Laplace smoother (DL), and the RBF method with the inverse quadratic (IQ)
basis function. The number of control points in the RBF method are in parentheses.
The CPU times in parentheses are for TOL=10−7 , otherwise TOL=10−14 .

’Navier-Stokes mesh’
CPU time (s) DL (PCG) RBF (3602) RBF (1379) RBF (653)

Inverting matrix 0 173 9 1


Deformation (x,y,z) 1275 (515) 123 35 17
Table 3
CPU time in seconds for the calculation of deformed Navier-Stokes meshes, for the
Laplace smoother (DL), and the RBF method with the inverse quadratic (IQ) basis
function. The number of control points in the RBF method are in parentheses. The
CPU times in parentheses are for TOL=10−7 , otherwise TOL=10−14 .
tetrahedral and prismatic elements. About 19000 points describe the wing in
this last mesh. The results of the tests are presented in two tables. Table 2
summarizes the calculations on the Euler mesh, and Table 3 shows the results
on the Navier-Stokes mesh.

The computational times (CPU) are measured in seconds. The gradient cal-
culation involving the RBF method has been detailed in Section 3.4. In the
case of the Laplace smoothing the gradient computation is detailed in [2]. In
contrast with the RBF method, the DL method requires to solve a large sparse
linear system of equations in each of the directions x , y , z. These equations
are solved here by a diagonal preconditioned conjugate gradient (PCG) [3].
The CPU times for solving the smoothing equations vary greatly with the tol-
erance which decides on the convergence of the conjugate gradient methods.
This is the reason why we indicated, for all results the time for two tolerances
(see the tables). The choice of the tolerances influences the error on the dis-
placement of the nodes in the interior of the domain. The maximum distance
between the deformed meshes indicates this error:

||Xh (T OL = 10−14 ) − Xh (T OL = 10−7 )||∞ = 8 × 10−9 ,

||Xh (T OL = 10−14 ) − Xh (T OL = 10−3 )||∞ = 2 × 10−4 .


A tolerance of 10−3 may be unsufficient for deforming meshes built for viscous

20
calculations or even fine meshes for inviscid calculations.

Finally, for the deformation of the Euler mesh (Table 2), the factor between
the CPU times varies from 2 to 15, in favor of the RBF method, depending on
the number of control points (RBF method) and the tolerance (DL method).
This factor is between 4 and 75, when deforming the Navier-Stokes mesh
(Table 3), in favor of the RBF method. The differences in CPU times between
the tests on the Euler mesh and the test on the Navier-Stokes mesh is likely
to be observed for other meshes of the same types independently from the
geometries. Indeed, the numerical solution of elliptic equations, like the ones
solved for the DL method, is known to be penalized on highly stretched meshes
like the meshes for viscous calculations, whereas this does not affect the RBF
method.

4.2 Optimization of the ONERA M6 wing

The minimization of the cost function (15) aims to produce a design with a
lower pressure drag while keeping the lift and pitching moment coefficients
constant, at the prescribed Mach number and angle of attack, see Section 3.
The values obtained for these functionals before and after optimization are
given in Table 4 for various parameterizations (varying n in (B.1)). The op-
timizations carried out here are denoted ’RBF’ and the results obtained in
reference [2], where a Laplace smoothing is used to deform the mesh, are de-
noted ’DL’. The control points are chosen according to the rules 1 to 4 in
Section 4.3 with d = 0.47. The basis function in the calculation was the in-
verse quadratic (IQ) basis function with relative shape parameter εrel = 0.3,
and the parameter α defined in (17) was set to 1.0. In this case this parameter
had no effect since there were no deformation in the y direction.

Figures 5 and 6 represent the pressure coefficients (Cp ) calculated on the


designs obtained here by optimization (’RBF’) for n = 1 and n = 6, and
on the initial design of the M6 wing. These are interpolated data on cutting
planes which location is indicated in % of wingspan, where 0 is at the root
and 100 is at the tip.

The reduction of the drag is achieved in all cases by a weakening of the shocks
and of the lift-induced drag. In Figure 5 we observe that the shock waves
are smoothened at all positions on the wing for both parameterizations RBF-
1s and RBF-6s. The Cp obtained for RBF-3s are not shown because they
are very close to the Cp for RBF-6s. The smoothing of the shocks is more
important for RBF-6s (and RBF-3s) than for RBF-1s. In Figure 7, we can
observe a downstream shift of the wingtip vortex, and it appears to be more
pronounced as the parameterization is finer (larger n in (B.1)). The plots of

21
0 = 144 C 0 = 0.331
CD 0 = 0.113
CM J 0 = 0.0144
L

104 .∆CD ∆CL /CL0 0


∆CM /CM ∆J/J 0

RBF-1s −30 −1.382E − 02 3.133E − 03 −1.934E − 01


RBF-3s −33 −9.597E − 03 6.429E − 04 −2.240E − 01
RBF-6s −33 −9.466E − 03 5.196E − 04 −2.256E − 01

DL-1s −30 −1.633E − 02 1.376E − 03 −1.927E − 01


DL-3s −31 −8.430E − 03 8.615E − 05 −2.075E − 01
DL-6s −31 −1.162E − 02 −1.803E − 04 −2.091E − 01
Table 4
Variations of the aerodynamic coefficients and cost function, in comparison to the
values at initial design. RBF indicates the present calculations (using RBF-based
mesh deformation) and DL indicates similar optimization results from [2]. The no-
tations -1s, -3s, -6s, indicate the number of splines for the parameterization, that is
n = 1, 3, or 6 in (B.1).

the Cp for the results ’DL’ from [2] are similar to the Cp curves obtained by
the method ’RBF’. This also appears in the summary of the aerodynamic
coefficients in Table 4.

The differences between the ’RBF’ and the ’DL’ optimization results are only
due to the different mesh deformation algorithms:

• The interpolation method maps the displacements of the control points to


the displacements of all the other nodes in the mesh. The control points
are chosen here as a subset of the nodes that lay on the wing. That is, for
a node on the wing which is not a control point, the displacement is not
imposed by the parameterization, but it is mapped by interpolation from the
control points, as exposed in Section 2.1. We can say that the interpolation
method, used to deform the mesh, makes a second parameterization of the
wing on top of the parameterization of the twist, camber and thicknesses
used here. Alternatively, we can consider this as an approximation of the
parameterization.
• Suppose that for a given parameterization, the interpolation would be exact
at the nodes on the wing that are not control points. Then, the difference
between the meshes would be only due to the differences in the mesh qual-
ities, possibly leading to different results to the discretized flow equations,
and different aerodynamic coefficients.

These differences are analyzed in the next section.

22
1 1
0.5 0.5
p

p
−C

−C
0 0
−0.5 −0.5
20% 44%
−1 −1
0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1
x/c x/c

1 1
0.5 0.5
p

p
−C

−C
0 0
−0.5 −0.5
65% 80%
−1 −1
0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1
x/c x/c

1 1
0.5 0.5
p

p
−C

−C

0 0
−0.5 −0.5
90% 95%
−1 −1
0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1
x/c x/c

Fig. 5. Pressure coefficients at original design (line), optimized design RBF-1s (dots)
and RBF-6s (dashed line).

0.1 0.1

0.05 0.05
z/c

z/c

0 0

−0.05 −0.05
20% 44%
−0.1 −0.1
0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1
x/c x/c
0.1 0.1

0.05 0.05
z/c

z/c

0 0

−0.05 −0.05
65% 80%
−0.1 −0.1
0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1
x/c x/c
0.1 0.1

0.05 0.05
z/c

z/c

0 0

−0.05 −0.05
90% 95%
−0.1 −0.1
0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1
x/c x/c

Fig. 6. Profiles at original design (line), optimized design RBF-1s (dots) and RBF-6s
(dashed line).

23
Fig. 7. Pressure iso-surfaces and particle tracing around the original design (top)
and, from the second row to the bottom, left column, the optimized designs RBF-1s,
RBF-3s, and RBF-6s. In the right column in grey (dark grey in BW) the shape at
initial design and in yellow (light grey in BW) the optimized shape.

24
4.3 Mesh qualities and interpolation accuracy

In this section, we test the mesh deformation method with respect to interpo-
lation accuracy and mesh quality for different RBFs, sets of control points and
shape parameters. The input to the mesh deformation program is the bound-
ary nodes for the optimized wing RBF-3s given i Table 4. The tested basis
functions are: inverse quadratic (IQ), multiquadric (MQ), inverse multiquadric
(IMQ), Gaussian (GS) and the compactly supported Wendland function W33 .

The interpolation properties for RBFs are best on even distribution of control
points. In our application, the control points is a subset of the mesh points
on the wing which, for usual meshes, have inhomogeneous distribution. An
algorithm is devised here in order to extract control points from the set of
mesh nodes with an approximately even distribution:

(1) Choose a minimal distance d between control points. We relate the value
of d to the mesh density on the wing

d = drel hV(∂Ωw ) .

where the mesh density is measured by

hV(∂Ωw ) = max min xi − xj 2 .


i∈V(∂Ωw ) j∈V(∂Ωw ),i=j

(2) Assume that all points on the wing are given in a long array. Pick the
first point in the array to be the first control point.
(3) The next control point is chosen as the point in the array whose distance
to all previously chosen control points is at least d.
(4) Continue until reaching the end of the array.

Table 5 shows the relation between drel , d, and the number of control points.
The shape parameter ε for the RBF, defined in Section 2.2, should be related
to the density of the control points. Too small values of ε give ill conditioned
matrices whereas too large values give poor interpolation properties. Therefore
we relate the shape parameter to the approximate distance d between control
points
ε = εrel /d.
where εrel is a dimensionless quantity.

The quality of the mesh deformation is measured with respect to two different
objectives. First, since not all points on the wing are used there will be a
discrepancy between the points on the wing in the deformed mesh and the
deformed points on the wing given as in data. If all points on the wing were
used as control points then this discrepancy would of course be zero. The
discrepancy will be measured in both l2 and l∞ norm. Second, the quality of

25
drel d (m) Number of points

1.0 0.236093 2166


1.3 0.306965 1763
1.5 0.354205 1378
1.7 0.401341 920
2.0 0.472333 730
2.5 0.590232 505
3.0 0.708748 322
3.5 0.82673 219
Table 5
The number of control points for different values of the distance d.

the mesh is essential for accurate calculations. Mesh quality can be measured
in a number of different ways. Here we will use three different measures:

(1) Let r be the radius of the largest inscribed sphere in a tetrahedra and
let R the radius of the circumscribed sphere and let ρ = 3r/R. For a
equilateral tetrahedra this ratio is 1.
(2) The maximal dihedral angle χ of an element. For an ideal equilateral
tetrahedra this is 72◦ .
(3) The aspect ratio η is defined as the quotient between lengths of the longest
and the shortest edge.

In Table 6 to 15 we give the results for five different basis functions and two
different values of drel , 1.3 and 2.0, and with the relative shape parameter vary-
ing from 0.1 to 1.0 in step of 0.1 except for 0.7 and 0.9 which are excluded.
If we first look at the approximation properties, we see that the l2 norm of
the discrepancies are in general very small, ranging from one to a couple of
millimeters. The l∞ norms indicates that there are some point whose discrep-
ancy are about two centimeters. However, if we compare this with the length
of the wing, which is 15m, the relative error is of the order 10−3 , which should
be sufficient for most engineering applications. It seems as small values of the
shape parameter give better interpolation results.

For the mesh quality, all results are compared relative the undeformed mesh.
For the radii-ratio, dihedral and aspect ratio measures, we define for each
element i = 1, . . . , Nel , the quantities

26
εrel radav radmax dihedav dihedmax aspav aspmax l2 l∞

0.3 0.99 1.40 0.9◦ 23.4◦ 1.02 1.74 0.0008 0.0139


0.4 0.99 1.29 0.8◦ 14.1◦ 1.02 1.36 0.0009 0.0172
0.5 0.99 1.29 0.8◦ 13.0◦ 1.02 1.36 0.0011 0.0186
0.6 0.99 1.32 0.8◦ 12.3◦ 1.02 1.35 0.0012 0.0191
0.8 0.99 1.36 0.8◦ 13.9◦ 1.02 1.38 0.0014 0.0216
1.0 0.99 1.39 0.8◦ 15.1◦ 1.02 1.46 0.0015 0.0242
Table 6
IQ drel = 1.3

εrel radav radmax dihedav dihedmax aspav aspmax l2 l∞

0.4 0.98 1.47 1.0◦ 26.2◦ 1.02 1.95 0.0008 0.0141


0.5 0.99 1.28 0.9◦ 19.0◦ 1.02 1.46 0.0009 0.0161
0.6 0.99 1.28 0.9◦ 15.0◦ 1.02 1.36 0.0009 0.0173
0.8 0.99 1.27 0.8◦ 12.2◦ 1.02 1.33 0.0010 0.0185
1.0 0.99 1.26 0.8◦ 11.8◦ 1.02 1.31 0.0011 0.0191
Table 7
MQ drel = 1.3

ρi
radi = ρ0i
,
ηi
apsi = ηi0
,
dihedi = χi − χ0i .
The average and maximum of these quantities are given in all tables with
subscripts av and max, respectively. Except for a few cases, these measures
indicate that the qualities of the deformed meshes are similar to the qualities
of the initial undeformed mesh. For some basis functions problems occur for
small shape parameters. For example, for IMQ with drel = 2.0 and εrel = 0.2,
the aspect ratio quotient is apsmax = 13.8 which implies that the quality of
some cells is very bad. As can be seen from the tables, there are few results
for relative shape parameters less than 0.3 since the deformation has resulted
in inverted cells in these cases.

27
εrel radav radmax dihedav dihedmax aspav aspmax l2 l∞

0.3 0.98 1.52 1.0◦ 27.6◦ 1.02 2.15 0.0007 0.0129


0.4 0.99 1.29 0.8◦ 16.7◦ 1.02 1.40 0.0009 0.0164
0.5 0.99 1.27 0.8◦ 13.2◦ 1.02 1.35 0.0010 0.0180
0.6 0.99 1.27 0.8◦ 12.2◦ 1.02 1.34 0.0011 0.0189
0.8 0.99 1.29 0.7◦ 11.5◦ 1.02 1.31 0.0012 0.0193
1.0 0.99 1.30 0.7◦ 11.7◦ 1.02 1.30 0.0013 0.0208
Table 8
IMQ drel = 1.3

εrel radav radmax dihedav dihedmax aspav aspmax l2 l∞

0.5 0.98 1.65 1.2◦ 41.7◦ 1.03 3.53 0.0006 0.0100


0.6 0.99 1.48 0.8◦ 21.7◦ 1.02 1.66 0.0008 0.0131
0.8 0.98 1.53 0.9◦ 22.2◦ 1.02 1.78 0.0012 0.0189
1.0 0.98 1.58 1.1◦ 27.8◦ 1.03 2.11 0.0017 0.0260
Table 9
GS drel = 1.3

εrel radav radmax dihedav dihedmax aspav aspmax l2 l∞

0.1 0.98 1.51 1.0◦ 29.7◦ 1.03 2.26 0.0007 0.0135


0.2 0.99 1.49 0.8◦ 18.9◦ 1.02 1.60 0.0010 0.0177
0.3 0.98 1.58 1.1◦ 27.8◦ 1.03 2.12 0.0017 0.0253
0.4 0.97 1.65 1.3◦ 37.9◦ 1.04 2.86 0.0028 0.0385
0.5 0.97 1.65 1.6◦ 47.2◦ 1.04 4.21 0.0048 0.0597
Table 10
Wend33 drel = 1.3

28
εrel radav radmax dihedav dihedmax aspav aspmax l2 l∞

0.2 0.98 1.58 1.1◦ 38.4◦ 1.03 2.81 0.0012 0.0145


0.3 0.99 1.25 0.8◦ 11.5◦ 1.02 1.28 0.0016 0.0213
0.4 0.99 1.26 0.8◦ 10.4◦ 1.02 1.25 0.0019 0.0230
0.5 0.99 1.27 0.8◦ 10.4◦ 1.02 1.26 0.0020 0.0248
0.6 0.99 1.28 0.7◦ 10.9◦ 1.02 1.28 0.0022 0.0267
0.8 0.99 1.32 0.7◦ 11.8◦ 1.02 1.33 0.0025 0.0310
1.0 0.99 1.34 0.7◦ 12.9◦ 1.02 1.35 0.0028 0.0355
Table 11
IQ drel = 2.0

εrel radav radmax dihedav dihedmax aspav aspmax l2 l∞

0.3 0.99 1.39 1.0◦ 21.1◦ 1.02 1.49 0.0014 0.0175


0.4 0.99 1.24 0.9◦ 12.2◦ 1.02 1.29 0.0016 0.0197
0.5 0.99 1.24 0.8◦ 10.5◦ 1.02 1.25 0.0017 0.0203
0.6 0.99 1.23 0.8◦ 9.9◦ 1.02 1.24 0.0017 0.0206
0.8 0.99 1.22 0.8◦ 9.6◦ 1.02 1.23 0.0018 0.0211
1.0 0.99 1.22 0.8◦ 9.4◦ 1.02 1.22 0.0019 0.0215
Table 12
MQ drel = 2.0

εrel radav radmax dihedav dihedmax aspav aspmax l2 l∞

0.2 0.97 1.64 1.6◦ 56.1◦ 1.04 13.79 0.0011 0.0121


0.3 0.99 1.25 0.9◦ 12.5◦ 1.02 1.30 0.0016 0.0204
0.4 0.99 1.23 0.8◦ 10.4◦ 1.02 1.25 0.0018 0.0219
0.5 0.99 1.25 0.8◦ 9.9◦ 1.02 1.24 0.0019 0.0230
0.6 0.99 1.25 0.8◦ 9.9◦ 1.02 1.24 0.0020 0.0242
0.8 0.99 1.26 0.7◦ 10.3◦ 1.02 1.25 0.0022 0.0267
1.0 0.99 1.28 0.7◦ 10.7◦ 1.02 1.27 0.0024 0.0292
Table 13
IMQ drel = 2.0

29
εrel radav radmax dihedav dihedmax aspav aspmax l2 l∞

0.5 0.99 1.47 0.8◦ 19.7◦ 1.02 1.50 0.0015 0.0199


0.6 0.99 1.41 0.8◦ 15.2◦ 1.02 1.44 0.0019 0.0251
0.8 0.99 1.45 0.8◦ 17.4◦ 1.02 1.54 0.0026 0.0325
1.0 0.99 1.51 0.9◦ 20.2◦ 1.02 1.64 0.0032 0.0417
Table 14
GS drel = 2.0

εrel radav radmax dihedav dihedmax aspav aspmax l2 l∞

0.1 0.99 1.32 0.8◦ 13.5◦ 1.02 1.34 0.0015 0.0184


0.2 0.99 1.39 0.8◦ 14.8◦ 1.02 1.48 0.0022 0.0260
0.3 0.98 1.51 0.9◦ 20.2◦ 1.02 1.64 0.0032 0.0412
0.4 0.98 1.59 1.0◦ 27.2◦ 1.03 1.93 0.0046 0.0583
0.5 0.98 1.62 1.2◦ 33.5◦ 1.03 2.48 0.0077 0.0790
0.6 0.98 1.65 1.3◦ 38.5◦ 1.03 3.20 0.0133 0.1238
Table 15
Wend33 drel = 2.0

30
5 Summary and perspectives

5.1 Summary

The method presented here performs deformation of meshes, structured or un-


structured, in 2D or 3D, based on an interpolation method. It was verified on
numerical examples that the qualities of the deformed meshes are comparable
to the qualities of the initial mesh. Another advantage of the method, when
repeated deformations of the flow domain are necessary, is the low computa-
tional cost, without increasing the memory requirements.

The method of adjoint, in gradient-based aerodynamic shape optimization, is


gaining in popularity because it allows an efficient calculation of the gradients
of the objective function. In order to fully take advantage of the method, it
requires to formulate the backward transformation of the mesh deformation.
The backward algorithm, for the mesh deformation, calculates the gradient
with respect to the control points when the gradient with respect to the nodal
coordinates is provided by the adjoint approach. Therefore a particular effort
was made here to present in details all the steps of the mesh deformation
mapping and how it is involved in the gradient calculation, in order to allow
efficient and straight-forward implementations.

5.2 Perspectives

The application of the same algorithm to the coupling of the CFD and CSM
calculations, in aeroelasticity, is the object of current investigations [23]. There,
the purpose of the interpolating function is twofold: to transfer displacements
of the structural grid, into the CFD grid and to transfer loads from the CFD
into the structural counter part in a physically reasonable way.

For the deformation of CFD meshes, as tested here, special constraints are
imposed on the interpolation in order to preserve the far-field and symmetry
boundaries of the mesh. The derivation of suitable boundary conditions for
more complicated geometries than the ones investigated here could be inves-
tigated.

Finally, the method could be modified in order to construct an algorithm for


the parameterization of geometrical shapes. Algorithms of parameterization
play an important role in aerodynamic shape optimization as they strongly
influence the outcome of the optimization. Parameterization is not a trivial
issue because it determines the regularity of the shape as well as it should
enable to formulate industrial-like constraints involving the angle of wedges,

31
the volume, or the thickness at some locations.

Acknowledgement

The authors thank Jonathan Smith for the introduction to the aeroelastic
interpolation problem and fruitful discussions during the preparation of this
work, as well as Adam Jirasek and Martin Berggren for their comments and
suggestions during the preparation of this report.

A Proof of Theorem 2

To complete the paper here is a proof of Theorem 2.

Proof. Condition 4, the displacement for a point P depends linearly on the


displacements for the control points, can be expressed as
N

v= Ak (x0 )v k ,
k=1

where Ak (x0 ), k = 1, . . . , N , are matrix-valued functions. Translated to the


coordinates this is
N
  
x = x0 + Ak (x0 ) xk − x0k . (A.1)
k=1

The translation invariance condition implies that


N
  
x + α = x0 + Ak (x0 ) xk + α − x0k (A.2)
k=1

for all α ∈ R3 . Combined with (A.1), it follows that


N

α= Ak (x0 )α, ∀α ∈ R3
k=1

Since α ∈ R3 is arbitrary, the matrix valued functions must sum up to the


identity matrix everywhere
N

I = Ak (x0 ), x0 ∈ Ω0 . (A.3)
k=1

32
For each rotation operator R we should have, according to condition (4),
N
  
Rx = x0 + Ak (x0 ) Rxk − x0k .
k=1

By subtracting equation (A.1) from this relation we obtain


N

(R − I ) x = Ak (x0 ) (R − I ) xk . (A.4)
k=1

Another application of (A.1) yields


N
   N

(R − I ) x0 + (R − I ) Ak (x0 ) xk − x0k = Ak (x0 ) (R − I ) xk . (A.5)
k=1 k=1

By putting xk = x0k in (A.4) we can replace the first term in (A.5), which
yields
N
   N
  
(R − I ) Ak (x0 ) xk − x0k = Ak (x0 ) (R − I ) xk − x0k .
k=1 k=1

In terms of the displacements of the control points v k , we have after simplifi-


cation
N 
 
RAk (x0 ) − Ak (x0 )R v k = 0.
k=1
Since the displacements can be arbitrary, we conclude that

RAk (x0 ) − Ak (x0 )R = 0, ∀k = 1, . . . , N.

A matrix which commutes with all rotations must be a constant times the
identity matrix (the constant may depend on x0 ). If we denote this constant
by ak (x0 ) the formula (7) follows. The relation (8) is then a consequence of
(A.3). Now we look at relation (A.4) with this new information and xk = x0k
N


0 0
(R − I ) x − ak (x )x0k = 0. (A.6)
k=1

This relation should be true for all rotation operators, which implies that (9)
follows. The last statement in the proposition is a consequence of (8) and (9).
The proof is complete. ✷

B Parameterization of the ONERA M6 wing

For the sake of the presentation, we derived a parameterization of simple


modifications of the geometry. Functions controlling the camber (c (y)), the

33
z
1

0.8 x

0.6
y
s (y)

θ(y)
n,i

0.4
cz (x,y)
0.2

0
0 0.2 0.4 0.6 0.8 1
y/L

Fig. B.1. Left: Basis functions (n = 6) for the parameterization of the distributions
of twist, camber and thickness, in the spanwise direction (fixed geometry at the root
y = 0). Right: a sketch representing effects of the twist (θ (y)) about the trailing
edge and of a camber deformation on the parameterized shape.

twist about the trailing edge (θ (y)), the relative distance (d+ (y)) to the z = 0
plane of the nodes in the z > 0 half domain, and the relative distance (d− (y))
to the z = 0 plane of the nodes in the z < 0 half domain, are parameterized
in the spanwise direction (y), by n + 1 splines (see figure B.1):

n+1

c (y) = cn,i sn,i (y) (camber) ,
i=1
n+1

θ (y) = θn,i sn,i (y) (twist) ,
i=1
n+1
(B.1)

+
d (y) = d+
n,i sn,i (y) (thickness, z > 0) ,
i=1
n+1

d− (y) = d−
n,i sn,i (y) (thickness, z < 0) ,
i=1


The parameters of the optimization are cn,i , θn,i , d+
n,i and dn,i , which are real
1
numbers. The functions sn,i (y) are C piecewise cubic polynomials defined as:
 2 3

 y y

 sn,i (y) = 3 L −2 L , i ≤ n , y ≤ hLn,i ,





hn,i hn,i

 2 3
y − hLn,i y − hLn,i

 s n,i (y) = 1 − 3 + 2 , i ≤ n , hLn,i ≤ y ≤ L ,



hR
n,i hRn,i

   2   3

 y y

 sn,n+1 (y) = 3 −2 , y ≤ L,
L L
(B.2)
where L is the span width and:
 L R
 hn,i + hn,i =L ,

 iL (B.3)
 hLn,i = .
n+1

34
The leading and trailing edges are lines in the plane z = 0. The streamwise
coordinate is x, and we denote by xT (y) and xL (y) the x-coordinate of the
point on the trailing edge and on the leading edge, respectively, at coordinate
y in the spanwise direction. Thus, the x- and z- coordinates of any point on the
parameterized geometry, denoted with upperscript new , if it is in the section y
of the wing, is mapped from the reference geometry, denoted (x, z), and the
parameters of the camber and twist (B.1) as:

y new = y ,
2
x 4 − x2
c̃ (y) = c (y) , (scaling)
xT (y) − xL (y)
cz (x, y) = c̃ (y) (x − xT (y)) (xL (y) − x) , (B.4)
1
nz (x, y) =  ,
1 + c̃ (y) (xT (y) + xL (y) − 2x)2
2

nx (x, y) = c̃ (y) nz (x, y) (2x − xT (y) − xL (y)) ,

In (B.4), cz (x, y) describes a camber line at constant y, and (nx (x, y) , nz (x, y))
are the coordinates of the unit normal vector to this line. We denote by x4
and x2 the streamwise coordinate of the leading edge and the trailing edge,
respectively, at the tip of the wing. Adding the thicknesses, to the camber and
the twist parameterizations yields:
  
z̃ (x, y) = 1 − ω sin d+ (y) z , if z ≥ 0
  

z̃ (x, y) = 1 − ω sin d (y) z , if z ≤ 0
new
x (x, y) = xT (y) + cos (θ (y)) (x + z̃ (x, y) nx (x, y) − xT (y)) + (B.5)
sin (θ (y)) (cz (x, y) + z̃ (x, y) nz (x, y)) ,
new
z (x, y) = −sin (θ (y)) (x + z̃ (x, y) nx (x, y) − xT (y)) +
cos (θ (y)) (cz (x, y) + z̃ (x, y) nz (x, y)) ,

where cz , nx , nz are calculated as in (B.4), and ω = 0.3 is used to bound the


changes of thickness.

References

[1] O. Amoignon, Adjoint-based aerodynamic shape optimization, Tech. Report IT


Licentiate theses 2003-012, Department of Information Technology, Division of
Scientific Computing, Uppsala University, Box 337, SE-751 05 Uppsala, Sweden,
October 2003.

[2] O. Amoignon and M. Berggren, Adjoint of the median dual finite volume
method applied to 2D and 3D transonic aerodynamic shape optimization, (2005),
Submitted.

35
[3] O. Axelsson, Iterative Solutions Methods, second ed., Cambridge University
Press, 1996.

[4] T.J. Barth, Aspects of unstructured grids and finite-volume solvers for the Euler
and Navier–Stokes equations, Special Course on Unstructured Methods for
Advection Dominated Flows, AGARD Report 787, May 1991, pp. 6–1–6–61.

[5] A. Beckert and H. Wendland, Multivariate interpolation for fluid -structure-


interaction problems using radial basis functions, Aerosp. Sci. Technol. 1 (2001),
no. 11, 1–11.

[6] M. D. Buhmann, Radial basis functions, Acta numerica, 2000, Acta Numer.,
vol. 9, Cambridge Univ. Press, Cambridge, 2000, pp. 1–38.

[7] , Radial basis functions, Cambridge Monographs on Applied and


Computational Mathematics, vol. 12, Cambridge University Press, Cambridge,
2003.

[8] G.W. Burgreen, O. Baysal, and M.E. Eleshaky, Improving the efficiency of
aerodynamic shape optimization, AIAA Journal 32 (1994), no. 1, 69–76.

[9] P. Eliasson, Edge, a Navier–Stokes solver, for unstructured grids, Tech. Report
FOI-R–0298–SE, Swedish Defence Research Agency, Stockholm, November
2001.

[10] J. Elliot and J. Peraire, Aerodynamic design using unstructured meshes, AIAA
Paper (1996), no. 96-1941.

[11] M.B. Giles and N.A. Pierce, An introduction to the adjoint approach to design,
Flow, Turbulence and Combustion 65 (2000), 393–415.

[12] G. S. L. Goura, Time marching analysis of flutter using computational fluid


dynamics, Ph.D. thesis, University of Glasgow, 2001.

[13] M.D. Gunzburger, Perspectives in flow control and optimization, Society for
Industrial and Applied Mathematics, Philadelphia, PA, USA, 2002.

[14] M. H. L. Hounjet and J. J. Meijer, Evaluation of elastomechanical


and aerodynamic data transfer methods for non-planar configuration
in computational aeroelastic analysis, Tech. report, National Aerospace
Laboratory NLR, 1995.

[15] A. Jameson, W. Schmidt, and E. Turkel, Numerical solution of the Euler


equations by finite volume methods using Runge-Kutta time stepping schemes,
AIAA Paper (1981), no. 81-1259.

[16] Hyoung-Jin Kim, Daisuke Sasaki, Shigeru Obayashi, and Kazuhiro Nakahashi,
Aerodynamic optimization of supersonic transport wing using unstructured
adjoint method, AIAA Journal 39 (2001), no. 6, 0001–1452.

[17] A. Le Moigne and N. Qin, Variable-fidelity aerodynamic optimization for


turbulent flows using a discrete adjoint formulation, AIAA Journal 42 (2004),
no. 7.

36
[18] M. Nemec and D.W. Zingg, Towards efficient aerodynamic shape optimization
based on the Navier–Stokes equations, AIAA Paper (2001), no. 2001-2532.

[19] J. Nocedal and S. Wright, Numerical optimization, Springer Series in Operations


Research, 1999.

[20] O. Pironneau, Optimal shape design for elliptic systems, Springer Verlag, 1984.

[21] R. Ripolls, M. Cordero, M. Hermanns, and Valero E., Spivol: A volume spline
interpolation tool for elastomechanical and aerodynamic data transfer problems,
EADS-CASA, 2003.

[22] V. Schmitt and F. Charpin, Pressure distributions on the ONERA-M6-WING


at transonic mach numbers, Experimental Data Base for Computer Program
Assessment, AGARD-AR-138, May 1979, pp. B1–1–B1–44.

[23] J. Smith, Aeroelastic Functionality in Edge, Initial Iimplementation and


Validation, Tech. Report FOI-R–1485–SE, Swedish Defence Research Agency,
Stockholm, December 2005.

[24] W. Squire and G. Trapp, Using complex variables to estimate derivatives of real
functions, SIAM Review 40 (1998), no. 1, 110–112.

[25] H. Wendland, Scattered data approximation, Cambridge Monographs on


Applied and Computational Mathematics, vol. 17, Cambridge University Press,
Cambridge, 2005.

37
Paper IV
Moving mesh adaptation scheme
for aerodynamic shape optimization

O. Amoignon
Division of Scientific Computing, Department of Information Technology, Uppsala
University, Box 337, SE-751 05 Uppsala, Sweden

Abstract

A method of mesh adaptation is proposed for gradient-based aerodynamic shape


optimization. The method consists in coupling an equation for the mesh node co-
ordinates with the discretized Euler equations of gas dynamics in steady state. The
variational mesh equation is inspired by Winslow’s variable diffusion mapping. The
system of mesh and flow equations is solved, instead of the flow equations alone,
when performing shape optimization. The solution algorithm of the coupled equa-
tions is an approximate Newton method supplemented with an interpolation of the
variable diffusivity by radial basis functions.
Tests are carried out for supersonic flow over a wedge, a problem that is used here
as a benchmark for the mesh adaptation and for a simple problem of inverse design.
At a given design, the method of adaptation improves the accuracy of the calculated
drag, a functional that is used in the construction of the inverse problem. The
accuracy of the shape, obtained by inverse design, experiences similar improvements
due to the mesh adaptation scheme.

Key words: gradient optimization, inviscid compressible flow, variable diffusion


mapping, median-dual finite-volume, radial basis functions, adjoint equations,
interpolation, mesh adaptation, shape optimization
1991 MSC: 90C06, 90C90, 93C20, 76M12

1 Introduction

In the context of aerodynamic shape optimization, the accuracy of the Com-


putation Fluid Dynamics (CFD) calculations influences the accuracy of the
calculated optimal shape.

When the speed of the air is near or above the speed of sound, the flow may
experience shocks. Shocks induce drag, in addition to the effects of viscosity
and lift-induced drag. The lift-induced drag is due to the 3D structures of the
flow that are caused by a lifting body. For example, the vortices that develop
at the tip of the wings create drag, which can be reduced by optimization of
the shape [2,26] or by building winglets. The present study focuses on inviscid
compressible flows. In particular, we focus on the accuracy of the solution of
problems of shape optimization that intend to control the drag induced by
shocks.

Different approaches of mesh adaptation have been proposed in recent years in


order to improve the accuracy of CFD calculations in problems of aerodynamic
shape optimization. Bugeda and Oñate considered mesh adaptation [11] when
solving shape optimization problems where the flow is modeled by the full
potential equations discretized by a finite element method. There, they use
h-adaptivity, that is, adding or removing nodes to the initial mesh. After each
new design, the procedure of adaptation is executed based on the equidis-
tribution principle [19] of an error estimate. The error estimate is obtained
by a reconstruction technique. Another approach is proposed by Mohammadi
and Pironneau [32] with applications to problems of optimization involving
turbulent viscous flows. In the proposed algorithm, the mesh is adapted by
a modified Delaunay procedure in the aim to equidistribute the interpolation
error. The use of h-adaptivity changes the dimension of the space in which
the flow is approximated during the optimization process. By this approach,
the mapping from the design variables to the value of the objective func-
tion is discontinuous [11], which can cause problems with the convergence of
gradient-based methods.

One way to cope with this problem is to build the adaptation as a smooth
map from the design variables to the value of the objective function. In or-
der to ensure the differentiability of all expressions, at the discrete level, it
is necessary that the adaptation mapping conserves the graph of the mesh,
allowing changes only in the position of the nodes. This type of approach is
called r-adaptation.

Applied to flow problems with discontinuities, r-adaptation is an alternative


to h-adaptation for both unsteady and steady calculations [30,29,16,7,34]. The
construction of r-adapted meshes relies on a mapping from the flow solution,
in form of a monitor function, to the coordinates of the nodes. In the case
of variational meshes, for example, the nodal coordinates are defined as the
solution of an elliptic equation, or, equivalently, as the minimizer of an energy
functional. In this case, the control of the mesh densities is realized through
the parameters of the mesh equation, which are determined from the monitor
function and the energy to minimize [13]. The reader will find a review of
variational mesh generation applied to domain deformation in [18], and a
review of moving adaptive meshes for r-adaptation in [15].

2
The monitor function that controls the mesh densities is, in many applica-
tions, based on a sensor that detects strong spatial variations of some flow
quantity of interrest. Since it is a heuristic approach, the design of suitable
sensors is problem dependent [30,29,16,23,24,7,14,34,25]. Effects of the moni-
tor functions on the solution of the elliptic equation that defines the mesh are
studied in [13]. The heuristic that supports the use of sensors in mesh adapta-
tion is that the interpolation error can be improved by clustering of the mesh
nodes in regions where the approximated flow variables have large gradients.
For an analysis of mesh adaptation for the approximation of discontinuous
functions, the reader may refer to a report by Coudière et al. [17]. Concerning
other types of error analysis, for systems of hyperbolic equations, the reader
can refer to the recent works on a posteriori error estimation [35,22,9].

The present article proposes a method of mesh adaptation for aerodynamic


shape optimization. The mapping that determines the position of the mesh
nodal coordinates is inspired by Winslow’s variable diffusion mapping. This
mapping takes the form of a discrete elliptic equation on the same mesh than
the CFD mesh for the initial shape of the optimization problem. The dis-
cretization uses the same data as the discretized flow equations [20] presented
in Section 2; here, median-dual control volumes and an edge-based data struc-
ture are used [8]. In principle, the mesh equation derived in Section 3.1 is
suitable for 2D and 3D applications on arbitrary meshes, even though the
tests carried out in this first study are limited to 2D (unstructured) meshes
of quadrilaterals and triangles, see Sections 3.1, 3.2 and 4.

Typically, applications involving mesh adaptation execute a few iterations of


the flow equations, the calculation of the monitor function, and the mesh equa-
tion, without any constraint on the convergence of this coupling. A particular-
ity of the adaptation scheme derived here is that the algorithm, coupling the
mesh and the flow, converges both equations simultaneously. The efficiency of
the algorithm is also carefully studied. In particular, an interpolation method
is derived in Section 3.2 in order to improve the convergence of the approx-
imate Newton method used to solve the mesh–flow equations. The monitor
function, also called diffusivity, is built in Section 3.2 by a mollifying tech-
nique from a sensor that detects shocks, which is sufficient in order to carry
out the numerical tests in this study.

The definition of the flow as a solution of this coupled system of equation allows
to define the numerical optimization algorithm without ambiguity. Indeed,
the minimization of the cost function, like the drag, is constrained by the
new state equation (mesh–flow) where both the mesh coordinates and the
flow variables describe the state, see Section 4.4. In particular, we suggest
in Section 4.4, an adjoint approach based on the adjoint of the discretized
flow equations (Section 2), in order to efficiently calculate the gradient of the
objective function.

3
t ij j

n ij
ni Vi
i

ti

Fig. 1. Median dual grid: i and j are nodes indexes, edges (lines), control volume
Vi is the striped surface, normal surface vector nij , edge vector tij associated with
 normal surface vector ni at a boundary node i.
the edge index ij,
The error in the drag coefficient, a function of the flow that is often used in
aerodynamic shape optimization, is studied in Section 4. In the same section
we present results for shape optimization that shows the improvement of the
calculated optimal shape when using mesh adaptation, compared to uniform
grid refinement.

2 Flow and adjoint equations

2.1 Edge-based discretization of the Euler equations

The program Edge [20] solves a node-centered and edge-based finite-volume


approximation of the system of Euler or Navier–Stokes equations for compress-
ible flows. The following notations are used in order to express the discretized
Euler equations in Edge: ρ denotes the density, u the velocity vector, E the
total energy density, and p the pressure. The discretization is based on a dual
grid (see Figure 1) described by the set of nodes V(Ω), comprized by the set
of interior nodes V(Ω), and the set of boundary nodes V(∂Ω), the set of edges
E(Ω) and the set of nodal coordinates X. Concerning the finite-volume approx-
imation, the boundaries of a control volume Vi at node i are described by the
 ∈ E(Ω) and ni , associated with a
surface normals nij , associated with edge ij
boundary node i ∈ V(∂Ω). For an introduction to this type of discretization,
we refer to Barth [8]. In steady state, the vectors of conservative variables

wi = [ρi , mi , Ei ]T , where mi = ρi ui , (1)

are computed by explicit time stepping of the system


dwi
Vi + Ri = 0, ∀i ∈ V(Ω) . (2)
dt

4
The convergence is achieved when a norm of the residuals Ri is smaller than
some tolerance, where


Ri = (nij · fij + dij ) ∀i ∈ V(Ω) ,
j∈Ni
(3)
(nij · fij + dij ) + ni · fibc

Ri = ∀i ∈ V(∂Ω) ,
j∈Ni

where Ni denotes the set of nodes connected to i by an edge. The fluxes


through a control surface associated with nij are approximated by fij chosen
here to give a central scheme, as (fi + fj ) /2 where fi = f (wi ) and

f (w) = [m , (m ⊗ m) /ρ + Ip , m (E + p) /ρ]T . (4)

An artificial dissipation flux dij , a blend of second- and fourth-order differ-


ences [28], is used. In expression (4), the pressure p is calculated assuming an
ideal fluid and the law of perfect gas. The fluxes at the boundaries fibc im-
pose weakly boundary conditions at walls, at symmetry, and far-field bound-
aries [20]. The calculation of the residuals (3) is efficiently carried out with
one loop over all edges (E(Ω)) and one loop over all boundary nodes (V(∂Ω)).
Furthermore, convergence of (2) to steady state is accelerated by local time
stepping and multigrid.

2.2 Adjoint of the discretized flow equations

In aerodynamic optimization based on the steady-state solution of the Euler


equations, a cost function J is calculated from observations of solutions to
the discretized Euler equations (2). The method of adjoint applied on the
discretized Euler equations is an efficient and accurate method to calculate
the gradient of the cost function with respect to the parameters of design,
as described in [1,2]. The adjoint equations derived from the equations (2)–
(3) are solved following the technique used for solving the Euler equations,
namely, by explicit time integration of the system

dwi∗
Vi + R∗i = 0 ∀i ∈ V(Ω) , (5)
dt

until a norm of the residuals R∗i is small enough. The complete derivation
based on discrete sensitivities can be found in [1,2] . The following gives ex-

5
pression for the adjoint residuals
 T  
∂(fi · nij ) wi∗ − wj∗ 
R∗i = d∗ij

+ ∀i ∈ V(Ω) ,
j∈Ni ∂wi 2 j∈Ni
 T  
 ∂(fi · nij ) wi∗ − wj∗ 
R∗i = + d∗ij
j∈Ni ∂wi 2 j∈Ni
 T
∂(fibc · ni ) (6)
+ wi∗ ∀i ∈ V(∂Ω) , i ∈
/ V(∂Ωw ) ,
∂wi
 T  
 ∂(fi · nij ) wi∗ − wj∗ 
R∗i = + d∗ij
j∈Ni ∂wi 2 j∈Ni
 T
∂(fibc · ni ) ∂J
+ wi∗ − ∀i ∈ V(∂Ωw ) ,
∂wi ∂wi

where V(∂Ωw ) is the set of nodes at which the cost function J is evaluated.
Details of the Jacobian matrices in (6) can be found in [1,2].

3 Variable diffusion mesh deformation

Moving adaptive meshes is a common technique to track the features of the


flow such as shocks, for instance when solving time-dependent problems. For
a review of moving mesh methods for time-dependent applications, we refer
to [15].

The sequence of flow calculations needed to solve problems of aerodynamic


shape optimization, even at steady state, resembles a time dependent prob-
lem. For example, the shape optimized in the aim to reduce the pressure drag
at transonic or supersonic speeds is typically one that eliminates, damps, or
displaces the shocks, which are one cause of the pressure drag. The reader will
find results of 2D and 3D aerodynamic shape optimization in references [5,10–
12,21,27,31,33,2,26]. From the point of view of the accuracy of the flow so-
lution, a mesh adapted for each design must both propagate to the interior
nodes the displcaments of the nodes on the design boundaries and follow the
evolution of the shock.

Section 3.1 presents a moving mesh strategy based on the concept of variable
diffusivity. Two tests defined in [15] are implemented in order to illustrate the
relation between the variable diffusivities and the mesh densities. The variable
diffusivity scheme allows to refine the mesh given an indicator of the error. A
sensor is defined in Section 3.2 based on a heuristic shock detector formula.

6
3.1 Edge-based scheme

The presentation is restricted, for simplicity, to polygonal domains with N


vertices. A mesh on such a domain Ω is defined, asin Section 2, by lists of
nodes and coordinates, and is denoted Mh (X) = V(Ω), V(∂Ω), E(Ω), X .
As explained above, the aim of r-adaptation is to obtain mesh coordinates X
adapted to the solution of the Euler equations (2) solved on the mesh Mh (X).

Assume that a reference mesh Mh (Y) is given, where Y = {y}i∈V(Ω) denotes


the set of nodal coordinates. The mesh adaptation scheme, on a fixed domain
Ω, will be formulated as an equation whose solution is X given the reference
coordinates Y and a monitor function m. The monitor function is detailed
below.

When applying the adaptation scheme to shape optimization, as outlined in


Section 4.4, the boundaries of the domain Ω, covered by the mesh Mh (X),
are possibly obtained by the displacement vectors g = {g i }1≤i≤N , from the
reference domain Ω0 . In that case, the reference mesh Mh (Y) discretizes Ω0 .
The vector g i is the displacement of the corner i of Ω0 and Ω so that

1≤i≤N xci = y ci + g i ,

where {ci }1≤i≤N ⊂ V(∂Ω) denotes the list of indexes of the nodes at the
corners of Ω, or Ω0 .

The adaptation scheme is presented below as the system of equations

M (X, m, g, Y) = 0 , (7)

where X are the unknowns, m, g, and Y are parameters. In the following, the
superscript Y is used for the data of the reference mesh Mh (Y). Re-calling
that nij and ni are the surface normals of the control volumes (see Section 2),
we define the edge vectors tYij and an edge-based scalar kijY for the reference
mesh:
|nY |
 ∈ E(Ω) ,
tYij = y j − y i , and kijY = Yij2 , ∀ij (8)
|tij |
Y Y
as well as the unit tangential vector at a boundary node ti satisfying ti ·nYi =
0 and oriented anti-clockwise, for example.

We will use the notation m (x, X) to indicate that the monitor function m may
be defined for all x in R2 and may be parameterized by the nodal coordinates
X, the unknowns of the mesh equation (7).

For a given monitor or diffusivity function m, we define a set of edge-based

7
data
m (xi , X) + m (xj , X)  ∈ E(Ω) .
mij (X) = ∀ij (9)
2
Given m and displacements of the domain boundaries g, we define equation (7)
by the following equations

• Calculate the new position of the corners of Ω:

1≤i≤N xci = y ci + g i . (10)

• On each boundary segment ∂Ωk , the positions of the nodes at the extremi-
ties are given by (10), and the position of the other nodes on the boundary
are solutions of the system of equations:
 Y
∀i ∈ V(∂Ωk ) , kijY mij (X) (xj − xi ) · ti = 0 . (11)
j∈Ni ∩V(∂Ωk )

• All boundary nodes being imposed by (10)-(11), the positions of the interior
nodes of Ω are obtained by solving the system of equations:

∀i ∈ V(Ω) , kijY mij (X) (xj − xi ) = 0 . (12)
j∈Ni

Concerning the mesh equation (7) defined by the relations and equations (9)-
(12):

• The two systems of equations (11) and (12) are non linear in X whenever
mij depends on X.
• The choice of the coefficient kijY above (8) was made in previous studies
where similar equations were solved with m ≡ 1 in order to deform meshes
in shape optimization involving the Navier–Stokes equations [3] or the Euler
equations [2].
• The equations at the boundary (11) are not explicilty coupled to the equa-
tions for the interior nodes (12). We will see in the examples below, and
in Sections 3.2 and 4, that the refinement of the mesh at discontinuities
crossing a boundary is only due to the diffusivity (monitor) function. The
opposite alternative, the coupling boundary-interior nodes, may be worth
to explore but it involves other mechanisms than the refinements and coars-
ening driven by the variable diffusivity. Such a coupling may also require
important changes in the algorithm, described below, used to solve the equa-
tions.

The first algorithm for solving system (7) is suitable for m given as an explicit
function, which is the case in the examples treated in the end of this section.
 
Algorithm 1 Given a mesh Mh (Y) = V(Ω), V(∂Ω), E(Ω), Y on the ref-
erence domain Ω0 , the diffusivity m (x, X), displacements g relative to the

8
corners of Ω0 , a tolerance TOL, and an initial guess X0 of the solution to
equation (7), X is solved by:

i - Initialize: n = 0
ii - Calculate the position of the corners of deformed domain Ω applying (10):

at all iteration n , 1 ≤ i ≤ N xnci = y ci + g i

iii - Calculate the diffusivity at iteration n:


 
m (xni , Xn ) + m xnj , Xn
mnij =  ∈ E(Ω) .
∀ij
2
iv - Solving equations (11) on the boundaries, that is, the system of linear
equations:
 Y
1 ≤ k ≤ N , ∀i ∈ V(∂Ωk ) , kijY mnij (x
i) ·

j − x ti = 0 .
j∈Ni ∩V(∂Ωk )

v - Solve the interior nodes equations (12) for the current boundary nodes

i , i ∈ V(∂Ω), that is, the system of linear equations:
coordinates x

∀i ∈ V(Ω) , kijY mnij (x

j − x

i) = 0 .
j∈Ni

′ ′′

vi - Calculate the norm of the residual rn = rn , rn , with
 2
N
  
′ 2  Y
rn =  kijY mnij (x

j −
i) ·
x ti  ,
k=1 i∈V(∂Ωk ) j∈Ni ∩V(∂Ωk )
 2
′′ 2  
rn =  kijY mnij (x
i ) .

j − x
i∈V(Ω) j∈Ni


vii - If rn′ 2 + rn′′ 2 ≤ TOL then go to step viii, otherwise

 + (1 − ω)Xn ,
Xn+1 = ω X
n : = n + 1,
and go to step iii


viii - X = X

The scalar ω is an under-relaxation factor (here w = 0.9).

Denoting by X′′ and X′ the coordinates of the interior and boundary nodes

9
respectively, the coupled equations (11)-(12) can be formulated as the system:
    
′′
 A (X) C (X)   X  0 (interior nodes)
  =  (13)
0 B (X) X′ g′ (boundary nodes)

The blocks A (X), C (X), and B (X) are sparse matrices whose nonzero entries
are the functions kijY mij (X), unless at the rows corresponding to the corners
of the domain where the entries are 1. The notation g′ is used to denote the
right sides of the equations at the boundaries (11) when adding rows for the
imposed displacements of the corners (10) (Dirichlet b.c.). Using the block
matrix formulation (13), we show here that Algorithm 1 is an approximate
Newton method. We recall that Newton’s method for solving a nonlinear sys-
tem of equations
F (X) = 0
consists in iterations, called Newton steps, of the form

dF
F (X) + δX = 0 .
dX

The Newton iteration applied to the system above (13) becomes exactly

A (X) X′′ + C (X) X′ + δA X′′ + A (X) δX′′ + δC X′ + C (X) δX′ = 0 ,
B (X) X′ − g′ + δB X′ + B (X) δX′ = 0 ,
(14)
where we used the usual notation to decompose the interior and boundary
components of the Newton step δX = [δX′′ , δX′ ]T . Neglecting, in (14), the
derivatives of the matrices of coefficients (δA, δB, δC), we obtain the system

A (X) X′′ + C (X) X′ + A (X) δX′′ + C (X) δX′ = 0 ,
(15)
B (X) X′ − g′ + B (X) δX′ = 0 .

Solving the second equation in (15) yields δX′ , and substituting, in the first
equation, δX′ by the obtained expression, yields, after elimination of some
terms: 
 δX′ = B (X)−1 g′ − X′ ,
 δX′′ = −A (X)−1 C (X) B (X)−1 g′ − X′′ .
(16)

Expressing the approximate Newton iteration (16) in terms of the sequence of


meshes Xn , by replacing δX′ by X′ n+1 − X′ n , and δX′′ by X′′ n+1 − X′′ n , we
obtain 
 X′ n+1 = B (Xn )−1 g′ ,
 X′′ n+1 = −A (Xn )−1 C (Xn ) B (Xn )−1 g′ .
(17)

Using the relation given by the first equation, we rewrite the second equation

10
in (17) to form an algorithm:

 X′ n+1 = B (Xn )−1 g′ ,
 X′′ n+1 = −A (Xn )−1 C (Xn ) X′ n+1 .
(18)

It appears that the update from the approximate Newton method (18) is
exactly the update from Algorithm 1 without under-relaxation (ω = 1).

Note that the Jacobian approximation made in the passage from expres-
sion (14) to expression (15) is common when the nonlinear equation has the
form
F (X) X − b = 0 .
An advantage of this approximation, in comparison with Broyden methods
for instance, is that the linear systems to solve conserve the sparsity of the
original nonlinear problem. In addition, if the diffusivity m is strictly positive,
the matrices of coefficients A and B are symmetric positive definite. As a con-
sequence, the linear equations in Algorithm 1 can efficiently be solved using,
for example, a diagonally preconditioned conjugate gradient method [6]. The
implementation here performs a fixed number of (preconditioned) conjugate
gradient iterations (20), instead of solving exactly the linear systems when
calculating the Newton like steps, initializing with the last calculated mesh
coordinates. The method proved to be quite efficient in our study, see Figure 2.
In this investigation, the implementation of Algorithm 1 is made in Matlab.
0
10
CPU equ. (s)

−1
10

−2
10
1 2 3 4
10 10 10 10
N

Fig. 2. Total CPU time, in seconds, with respect to the number of mesh nodes N,
for solving the adaptive mesh equation (7) through Algorithm 1, when applied to
the test case A [15].

Finally, we illustrate the effects of the mesh deformation equation (7), by


using the diffusivities (m) of the cases “A” and “B” in Cao et al. [15]. In
these examples, the corners of the domain are fixed (g = 0). The reference
(and initialization) meshes are uniform meshes of quadrilaterals or triangles

11
elements. The monitor functions (see Figure 3) are here independent of the
mesh, and defined as:
  2 
1 1
• example A: m (x) = 1 + 10 exp −50 y − − sin (2πx) 2
,

4 

 2  2 1 
• example B: m (x) = 1 + 10 exp −50  x − 1
+ y− 1
− .
2 2
16 
Algorithm 1 is applied with g = 0. Comparing the monitor functions, in
Figure 3, with the meshes obtained by the mesh deformation equation, in
Figure 4, the refinements take place proportionally to the value of m(x). When
solving flow equations, a monitor function is tailored for the specific problem
in order to detect the presence of discontinuities in the solution.

10 10

8 8
u(x,y)

u(x,y)

6 6

4 4

2 2

1 1
0.8 0.8
1 1
0.6 0.8 0.6 0.8
0.4 0.6 0.4 0.6
0.2 0.4 0.2 0.4
0.2 0.2
y 0 0 y 0 0
x x

Fig. 3. Monitor functions from example A (left) and example B (right) from Cao et
al. [15].

1 1

0.8 0.8

0.6 0.6
y

0.4 0.4

0.2 0.2

0 0

0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1


x x

Fig. 4. Quadrilaterals: case A (left) and case B (right) from Cao et al. [15], by
applying the edge-based scheme (9)-(12).

12
3.2 Monitor function and sensor

The monitor functions from case A and B in Cao et al. [15], are plotted in
Figure 3. The location of the maximum values of m coincides with the largest
mesh densities, which is a consequence of the equidistribution principle [19],
and of the Winslow’s variable diffusion mapping, which can be seen as a multi-
dimensional extension of this principle [15].

3.2.1 Variable diffusivity

We impose the following conditions on the monitor or diffusivity function


m (x, X):

i - m ≥ 1,
ii - given X, the map x → m (x, X) should be continuous,
iii - the maximum values should be attained at the locations of the flow
discontinuities,
iv - it should rapidly decay to low values (≈ 1) away from the location of
discontinuities.

Conditions (i), (iii) and (iv) are required in order to control by m the mesh
that is solution of equation (7), in accordance with the observations above
concerning Winslow’s mapping and the equidistribution principle. Condition
(ii) is imposed in order to have as smooth distribution of the nodes as possible.

For the purpose of the presentation, suppose that a shock in a 2D flow in the
x − y plane is located at x = xs , and is parallel to the y−axis. A sensor of the
presence of the shock would be the distribution s (x) = δ (x − xs ), where δ de-
notes the Dirac measure. The transformation defined by the convolution of s
with any function ϕ ∈ C0p (R) (functions that are p times continuously differen-
tiable with compact support, p ≥ 0) is the composition of h and a translation,
that is, s ∗ ϕ(y) = ϕ(y − xs ). Note that s ∗ ϕ is also in C0p . Furthermore, if
the maximum value of ϕ is attained at x = 0, and ϕ is rapidly decaying away
from 0, the product s ∗ ϕ attains its maximum at xs and is rapidly decay-
ing away from xs . In this one-dimensional setting, these observations give a
method to construct m that fullfils conditions (ii) and (iii) above. Condition
(i) is obtained by addition of a constant. Condition (iv) depends on ϕ and
among the candidates, radial basis functions (RBF) are easily implemented.
Table 1 gives examples of RBF having compact support and decaying within
a distance R.

13
The same properties carry over to the two-dimensional setting (as well as to
higher dimensions) by

c (y) = s (x) ϕ (y − x) dx , (19)
R2

where s is the derivative of the piecewise constant function taking values 0 on


one side of the shock and 1 on the other side (like the Dirac is the derivative of
the Heaviside function on the real line). If ϕ ∈ C0p (R2 ) then c ∈ C0p (R2 ). The
support of the convolution c is the convex hull of supp (s) + supp (ϕ), where
supp denotes the support.
    3/2
1−3 x·x +2 x·x if x · x ≤ R2
RBF1: ϕ (x) = R2 R2

0 otherwise
  x · x 1/2
1− if x · x ≤ R2
RBF2: ϕ (x) = R2

0 otherwise
  x · x 1/2 2

 1− if x · x ≤ R2
RBF3: ϕ (x) = R2

 0 otherwise
Table 1
Examples of radial functions in Rd (here d = 2) with compact
! support, the ball of
radius R > 0 (here R = 0.1), e.g. BR = x ∈ Rd , |x| ≤ R . RF1 is C01 , RF2 and
RF3 are C0 .

The construction of a discrete analogue to the convolution (19) is detailed


here. In the applications below, the flow equations are solved on a bounded
domain Ω. The support of a sensor s of interest is Ω, and Ω is meshed by
Mh (X) (see Section 2). The values of s are given nodewise, where sk is the
value on a control volume Vk , see Section 3.2.2. The control volumes Vk are
the same as used by the CFD calculations, the median dual grid associated
with the mesh Mh (X), as described in Section 2.

The analogue of c is defined by



ci = sk ϕ (xi − xk ) Vk . (20)
k∈V(Ω)

The sum (20) can also be written as a matrix-vector product

c = Hs , (21)

where c and s denotes the vectors with components ci , si , and the entries of
the matrix H are ϕ (xi − xk ) Vk .

14
The final expression of the diffusivity or monitor function at node i, based on
the given mesh coordinates X, a sensor s and a function ϕ (see Table 1) is:

mi = 1 + (M − 1) ci /cmax , (22)

where
cmax = max ci .
i∈V(Ω)

Expression (22) fullfils condition (i) above by affine transformation (amplitude


1). Since the diffusivity m controls the mesh densities, we also introduced the
factor M in order to obtain values of mi in the interval [1, M ].

3.2.2 Shock sensor

The discrete sensor s in (20)-(21) is used in order to indicate the presence of


discontinuities. An example of such a sensor is obtained by taking the averaged
value of the jump in pressures between two neighboring nodes:

1 
si = 2 (pj − pi )2 , (23)
p2∆ (|Ni |/2) j∈Ni

where the pressure differences are squared in order to obtain positive values.
The terms at the denominator scale si approximately between 0 and 1, where
p∆ is a crude estimate of the maximum physical jump of the pressure across a
shock (here p∆ = ρ∞ u2∞ /8), and |Ni |/2 is the number of nodes connected to
i divided by 2 because on average less than half of the edges connected to i
can cross the shock. As an example, Figure 9 shows the sensor (23) calculated
from the CFD solution of a supersonic flow over a wedge (Section 4.3).

3.2.3 Coupling mesh and flow equations

For a given mesh Mh (X) and flow solution, the sensor (23) is used in order
to calculate the variable diffusivity by (20)-(22). In this case, Algorithm 1 can
be adapted in order to solve the variable diffusivity mesh equation (7) based
on the diffusivity calculated from flow equation (2) (in steady state):
 
Algorithm 2 Given an initial mesh V(Ω), V(∂Ω), E(Ω), Y of the domain
Ω0 , displacements g of the corners of Ω0 , a mapping from the nodal coordinates
of a mesh to the pressures X → p, that is, the flow equations (2), and a
tolerance TOL:

Apply Algorithm 1 replacing step (iii) by

15
iii-a) Solve the flow equations given the current mesh:

Xn → pn .

iii-b) Calculate sn by (23), cn by (20), and mn by (22).


iii-c) Calculate the edge-based diffusivity at iteration n according to (9):
mi + mj  ∈ E(Ω) .
mnij = ∀ij
2
The termination of the algorithm can be as in Algorithm 1 or it can be mod-
ified, for instance when the flow equation is solved approximately at each
iteration n.

Unfortunately, Algorithm 2 does not converge efficiently the mesh equation


because it is unstable and creates strong oscillations, as in the examples of
adaptation shown in Figure 5. In these examples, the Euler equations (Sec-
tion 2) are solved for the supersonic flow over a wedge, described in Section 4.3.
The cause of the oscillations seems to be the decoupling of the moving mesh
equations from the solution of the physical problem p.

The location of the shock obtained from the CFD calculation is not changed
much by the adaptation process. This means that the position of the shock, in
Ω, should not be very sensitive to the grid Xn . On one hand, the sensor sn (23)
gives a precise position of the shock based on the coordinates of the grid Xn .
On the other hand, the grid Xn+1 is obtained by solving a linear equation,
therefore assuming that sn+1 is almost equal to sn . However, a small change
in the position of the nodes, in the neighborhood of the flow discontinuity, can
generate a large change of the nodal values of the sensor by (23).

This decoupling is the origin of oscillations that even prevent Algorithm 2


to converge for the coarse mesh for any of the function ϕ in (20) (see Fig-
ure 5). In the next algorithm we propose a method of interpolation in order
to approximate the mollified sensor (20). The method is based on the previ-
ous observations and takes advantage of the use of ϕ being an RBF function
(Table 1) in (20). Based on the grid coordinates Xn and the CFD solution
obtained on this grid (pn ), the nodal values of the sensor sn are calculated
according to (23), as before. In order to compute the grid Xn+1 we define a
new scalar field function c
n (x) as follows:

c
n (x) = snk ϕ (x − xnk ) Vkn , ∀x ∈ R2 , (24)
k∈V(Ω)

where snk are the nodal values of sn , and xnk is the coordinate vector of node
k in Xn . We also define a new diffusivity m
 (x) as:

n (x) = 1 + (M − 1) c
n (x) /cmax .
m (25)

16
Given the mesh Xn , and the diffusivity functional m
n defined by (25), solving
the equations (9)-(12) yields a new way to calculate Xn+1 . This is summarized
in the following algorithm:
 
Algorithm 3 Given an initial mesh V(Ω), V(∂Ω), E(Ω), Y of the domain
Ω0 , displacements g of the corners of Ω0 , a mapping from the nodal coordinates
of a mesh to the pressures X → p, that is, the flow equations (2), tolerances
T OLext and T OLint , and an initial guess X0 of the solution to equation (7),
X is solved by:

i - Initialize: n = 0
ii - Solve the flow equations given the current mesh:

Xn → pn .

iii - Calculate sn by (23), the diffusivity by (20)-(22), and the residuals of


the equations
′ ′′ on the boundaries and in the interior of the domain Ω
rn = rn , rn as:
 2
2
N
    

k Y ij mnij xnj − xni · ti 
′ Y
rn =  
k=1 i∈V(∂Ωk ) j∈Ni ∩V(∂Ωk )
 2
′′ 2    
rn =  k Y ij mnij xnj − xni 
i∈V(Ω) j∈Ni


iv - If rn′ 2 + rn′′ 2 ≤ TOLext then go to step (vi), otherwise
v - Initialization of the inner loop:

q = 0, and q = Xn
X

1 - Calculate the interpolant of the convolution product at the current



qi ) using (24), and the diffusivities m
grid nodes c
n (x
qi ) using (25).
n (x
2 - Calculate the diffusivity at iteration q:
 

qi ) + m
n (x
m
qj
n x
mqij =  ∈ E(Ω) .
∀ij
2
3 - Solve the equations on the boundaries (11) for the current diffusivity
"′ = {x
to obtain X i }i∈V(∂Ω) :

 Y
1 ≤ k ≤ N , ∀i ∈ V(∂Ωk ) , k Y ij mqij (x i) ·
j − x ti = 0 .
j∈Ni ∩V(∂Ωk )

4 - Solve the interior nodes equations (12) for the current diffusivity and

17
"′ to obtain X
boundary nodes coordinates X #′′ = {x
i }i∈V(Ω) :


∀i ∈ V(Ω) , k Y ij mqij (xj
−x
i) = 0 .
j∈Ni

5 - Calculate
a norm for the residual at iteration q defined as r̃q =
r˜′ q , r˜′′ q , where:
 2
N
  
2 
ti 
Y
r˜′ q =  k Y ij mqij (x i) ·
j − x 
k=1 i∈V(∂Ωk ) j∈Ni ∩V(∂Ωk )
 2
2  
r˜′′ q =  k Y ij mqij (x i )
j − x
i∈V(Ω) j∈Ni

$
2 2
6 - If r˜q′ + r˜′′ q ≤ TOLint then go to step 7, otherwise

q+1 = ω X
X " + (1 − ω )X q , q := q + 1 , and go to step 1 .
int int

" + (1 − ω )Xn and n := n + 1 , go to step ii


7 - Xn+1 = ωext X ext
n
vi - X = X

Figure 5 compares Algorithm 3 to Algorithm 2 when the mapping X → p


involves solving the Euler equations as described earlier and in Section 4.3. In
the first iteration of Algorithms 2 and 3, the flow equations are solved accu-
rately. In the following iterations the flow equations are solved approximately
doing a fixed number (20 in the numerical experiments) of multigrid V-cycles.
The flow equations (2) converge to steady state together with the nonlinear
mesh equation (7). The convergence of the two equations is tested according
to the test on the residual of the mesh equation and to a test on the functional
output for the flow equations (the coefficient of drag).

The criteria for convergence, that is TOL in Algorithm 2 and TOLext in Algo-
rithm 3, is 0.01. Whereas Algorithm 2 converges slowly or fails to converge in
a number of case, the convergence of Algorithm 3 is substantially faster and it
only fails to converge in one case, on the coarse mesh (h = 0.167) when using
RBF-3.

4 Supersonic flow over a wedge

The method of mesh adaptation presented above is applied to an inviscid


supersonic flow on a wedge. The flow problem is described at length in classical
textbook of aerodynamics, for example in [4]. We shortly describe the flow

18
0 0
10 10

−1 −1
10 10
|r |/|r |

|r |/|r |
0

0
−2 −2
10 10
k

k
Alg2/RBF1 Alg2/RBF1
−3
Alg3/RBF1 −3
Alg3/RBF1
10 Alg2/RBF2 10 Alg2/RBF2
Alg3/RBF2 Alg3/RBF2
Alg2/RBF3 Alg2/RBF3
Alg3/RBF3 Alg3/RBF3
−4 −4
10 10
5 10 15 20 5 10 15 20
k−iteration k−iteration
0
10

−1
10
|rk|/|r0|

−2
10

Alg2/RBF1
−3
Alg3/RBF1
10 Alg2/RBF2
Alg3/RBF2
Alg2/RBF3
Alg3/RBF3
−4
10
5 10 15 20
k−iteration

Fig. 5. Convergence of the coupled Euler (Edge)-Moving Mesh equations using Al-
gorithm 2 (Alg2) and Algorithm 3 (Alg3), depending on the RBF (1, 2 or 3), and
on the mesh: top left (h = 0.167), top right (h = 0.056), bottom (h = 0.015).

in section 4.1. Section 4.2 describes a problem of shape optimization, whose


objective function involves the pressure drag on the wedge, and which has a
unique exact solution. Section 4.3 presents the comparison between the finite
volume approximation of the flow and the exact flow solution, without and
with adaptation of the computational grid. In section 4.4, the optimization
problem (§ 4.2) is solved numerically on different grids, without and with grid
adaptation. The shapes obtained by solving exactly the numerical problem of
optimization are compared to the exact optimal shape.

4.1 Flow conditions

Figure 6 describes the flow over a wedge with a half angle θ. The incoming
flow, at Mach number M1 > 1, is in the direction of the x-coordinate axis and
contained in the plane (x, y). The problem is thus symmetric with respect to
the plane y = 0 and infinite in the direction orthogonal to the plane (x, y). In

19
the absence of viscous effects, the flow is two-dimensional.

In this figure the dotted line represents an oblique shock. Downstream of the
shock, the deflected flow, at Mach number M2 , is parallel to the surface of
the wedge. Relations between the pressure, velocity and density of the flow,
before, and after the shock, are obtained by conservation of mass, momentum,
and energy. It is assumed that the air is an ideal fluid and follows the law of
perfect gas. These relations lead to the so-called θ − β − M relation [4]:

2 M12 sin2 β − 1
tan θ = , (26)
tan β M12 (γ + cos 2β) + 2

where β is the angle of the shock with respect to the x-direction. Using (26)
we can calculate β. Given the angle of the shock, the pressure upstream of
the shock p1 , and the Mach number M1 , we can calculate the normal Mach
number before the shock Mn1 , and the pressure downstream of the shock p2 :

Mn1 =M1 sin β ,


p2 2γ  2  (27)
=1 + Mn 1 − 1 .
p1 γ+1

M1 M2

β θ
x
(0,0) L/2 L

Fig. 6. The inviscid supersonic flow past a wedge [4]: At Mach number M1 = 2.5
and a wedge with half angle θ = 15 degrees, a weak shock (M2 > 1) appears at
angle β = 36.945 degrees.

4.2 Shape optimization

We describe a problem of optimization involving the flow over a wedge (§ 4.1),


where the design variable is the wedge half angle θ, and which has a unique
and computable solution, given the Mach number M1 and the pressure p1 of
the incoming flow.

20
Consider the integral of the pressure force on a bounded portion of the wedge,
projected in the streamwise direction:

CD = p (x) n (x) · ax dx , (28)
∂Ωw

where ∂Ωw denotes part of the boundary of the domain Ω (Figure 6) lying
on the wedge, which is parameterized by θ. The vector ax is in the stream-
wise direction, and n (x) is the outward-oriented surface normal at x on the
boundary ∂Ωw . In aerodynamics, CD is called the drag coefficient.

We define here the optimization problem

(P): Given {M1 , p1 , θmax } in the flow problem described in Section 4.1, find
θ̂, in the interval [0, θmax ], that minimizes

J (θ) = 12 (CD (θ) − CDe )2 ,

where CD is defined by (28), and CDe is in the interval [0, Cmax = CD (θmax )].

The wedge half angle θmax is the maximum angle of the deflected flow for
which the shock is attached at the leading edge of the wedge, a notion that
is discussed below. This problem has a trivial solution, it is the angle of the
wedge giving rise to the drag CDe .

We indicate here how to calculate CD (28) and why the solution of (P) is
unique. These explanations are better understood by examining graphically
the θ − β − M relation plotted in Figure 7. Given a Mach number M1 > 1,
relation (26) holds if θ ≤ θmax , the maximum half angle of the wedge at
this Mach number. Otherwise, there is no oblique shock but a detached bow
shock forms ahead of the corner made by the wedge. Under the condition that
θ < θmax , there are two distinct solutions βw < βs , according to (26). The
lowest angle (βw ) corresponds to a supersonic flow downstream of the shock
(M2 > 1), a case that is described in the literature as a weak shock. The other
case (βs ) corresponds to a subsonic flow downstream of the shock (M2 < 1),
which is described as a strong shock. In the case of a wedge with a sharp
leading edge, the weak shock is obtained.

Thus, at a given Mach number M1 > 1, there is a one-to-one relation between


the wedge half-angle 0 ≤ θ ≤ θmax and the angle of the shock β. In the
remaining, β is the solution to (26) for the weak shock (M2 > 1).

Therefore, given M1 > 1 and p1 , there is a one-to-one relation between the


half angle of the wedge θ ≤ θmax and the pressure downstream of the shock p2
through (27). For an infinite wedge in the x-direction, the pressure after the

21
shock p2 is constant, which simplifies the expression (28) of the drag CD :

aLp2
CD = sin θ , (29)
2
where p2 is obtained through (26)-(27). Observing that p2 and β are monotonously
growing functions of 0 ≤ θ ≤ θmax , and that β < 90o , in the conditions
described above, CD is also a monotonously growing function of θ. Finally,
CD (29) can be denoted CD (θ), and, under the flow conditions stated in the
description of the problem (P), for any CDe in the interval [0, Cmax ], (P) has
a unique solution θexact in the interval [0, θmax ], such that CDe = CD (θexact ).

80

M <1 (strong shock)


2
Shock angle β, degrees

60 M >1 (weak shock)


2

M1=1.5
40

M1=2.5
20
M =5
1
θ for M =2.5
max 1
0
0 10 20 30 40 50
Deflection angle θ, degrees

Fig. 7. θ − β − M diagram obtained from relation (26). The dash-dot line indicates
the positions of the extrema of the curves θ (β).

4.3 Mesh adaptation at fixed design

The numerical approximation of the Euler equations in the CFD code Edge
(§ 2) is applied here to calculate the inviscid compressible flow over the wedge
described in Section 4.1. The grid convergence of the numerical approxima-
tion towards the exact flow solution is checked with respect to the drag co-
efficient (28). The results are summarized in Figure 8 for uniform meshes of
quadrilaterals and uniform meshes of triangles. The lines –o– indicate the nu-
merical error commited by calculating the drag with the Edge code (CDh ),
relatively to the exact drag (CDe ), with respect to the mesh size h.

For a given mesh size h, the flow domain Ω is initially meshed by Mh (Y). We
use the sensor technique, the definitions of the diffusivity, and Algorithm 3

22
described in Section 3 in order to find a mesh Mh (X) adapted to the shock
discontinuity calculated by CFD. The results are summarized, in Figure 8,
for meshes of quadrilaterals and triangles, and for the three types of RBF
(Table 1).
−1 −1
10 10

−2 −2
10 10
De

|CDh−CDe|/CDe
|C −C |/C
De
Dh

−3 −3
10 Uniform 10 Uniform
Adapted RBF−1 Adapted RBF−1
Adapted RBF−2 Adapted RBF−2
Adapted RBF−3 Adapted RBF−3
−4 −4
10 10
0 0.05 0.1 0.15 0.2 0 0.05 0.1 0.15 0.2
h h

Fig. 8. Grid convergence of the calculated drag (CDh ) towards the exact drag (CDe )
at M1 = 2.5 , θ = 15o , prior and after adaptation, for initial meshes of quadrilaterals
(left) and triangles (right), and different RBF (see Table 1).

The comparison between uniformly refined meshes and adapted meshes shows
that the approximation of the drag is improved by the method of mesh adap-
tation for all the mesh sizes, see Figure 8. The results for RBF1 and RBF-2
are very close to each other, but RBF-3 performed better in all tests. In fact,
the adapted mesh, with the function h being RBF-3, has higher mesh densi-
ties in the neighbourhood of the shock than with the other RBF. This is the
consequence of the shape of RBF-3 and of the conservation of the dissipation
fluxes.

4.4 Inverse design

We solve here the optimization problem (P ) of Section 4.2:

min J (θ) ≡ 12 (CD (θ) − CDe )2


θ (30)
subject to the Euler equations for a compressible gas

4.4.1 Without mesh adaptation

In the numerical approach of this problem [1], the flow equations, approx-
imated by a finite-volume method (2), are solved on a bounded domain Ω

23
5
x 10

2.5 0.6

0.5

2 0.4
p(x,y)

s(x,y)
0.3
1.5 0.2

0.1
1

1 1
0.8 0.8
1 1
0.6 0.8 0.6 0.8
0.4 0.6 0.4 0.6
0.2 0.4 0.2 0.4
0.2 0.2
y 0 0 y 0 0
x x

0.8
20

15 0.6
m(x,y)

10
0.4
5

0.2
1
0.8
1
0.6 0.8 0
0.4 0.6
0.2 0.4
0.2 0 0.2 0.4 0.6 0.8 1
y 0 0
x x

Fig. 9. Final adaptation step (RBF-3) at M1 = 2.5 , θ = 15o for an initial mesh of
quadrilaterals: pressure field (upper left), sensor (upper right), variable diffusivity
(bottom left), adapted mesh (bottom right).
discretized by a mesh Mh (X). In the case of the numerical approximation
of problem (P ), the mapping from the design parameter of the shape (wedge
half-angle θ) to the value of the cost function J involves a mesh deformation.
The algorithm used here to deform the mesh corresponds to the variational
mesh equation from Section 3.1 for a constant diffusivity equal m = 1, which
is similar to the method used in [2,3].

The discretized optimization problem without adaptation, based on a reference


mesh Mh (Y) of the domain Ω0 for the initial design, θ0 , takes the form:

min Jh (θh , p) ≡ 21 (CDh (θh , p) − CDe )2 subject to


θh
R (p, X) = 0 , (Discretized flow equations (2)) , (31)
M (X, 1, g (θh ) , Y) = 0 , (Mesh deformation) ,

24
where the mesh deformation is defined by the mesh equation (7) with m ≡ 1,
g (θh ) indicates that the deformation of the domain boundaries depends on
the design (θh ).

We solve the problem starting at the design θ0 = 3o on grids of different size


h. The numerical solution for this problem is obtained by the steepest descent
algorithm with an inexact line search. This optimization algorithm requires the
calculation of the derivative of Jh with respect to θh . Although the derivative
could be obtained by a finite difference approximation, we use the method
of adjoint developed in [1,2]. The derivative calculation involves solving two
adjoint equations: the adjoint for the discretized flow equations and the adjoint
of the mesh deformation equation. The details of both equations are given
in [2], as well as other transformations that are necessary for calculating the
derivative.

Solving the numerical problem of optimization without adaptation of the


mesh (31), or with adaptation of the mesh (34) in the next section, gives
a mesh dependent solution denoted θopt that is not equal to the exact design
θexact because of the discretization errors. Assuming that, for a given angle θ
of the wedge, the approximation of the drag, for instance, converges to the
exact drag when the grid size h tends to 0

CD (θ) = lim CDh (θ) . (32)


h→0

Using the bijection described above, in Section 4.2, between the drag and the
angle of the wedge, in the interval 0 ≤ θ ≤ θmax , at a given Mach number, we
should have
θexact = lim θopt . (33)
h→0

Figure 10 shows the convergence of the solution to the numerical optimiza-


tion (31) in the case of uniform refinements of the grid.

4.4.2 With mesh adaptation

Performing uniform grid refinement is unnecessarily expensive, in terms of


computational time. As an alternative, the mesh adaptation detailed in pre-
vious sections is used here in the approximation of the inverse problem (P).
When accounting for the adaptation of the mesh, the discretized optimization
problem (31) takes the form:

min Jh (θh , p) ≡ 12 (CDh (θh , p) − CDe )2 subject to


θh
R (p, X) = 0 , (Discretized flow equations (2)) , (34)
M (X, m, g (θh ) , Y) = 0 , (Mesh adaptation (7)) ,

25
−2
10

1
−4
10
0.8

−6
10 Uniform mesh
0.6 RBF−1

J
RBF−2
−8
10 RBF−3
0.4

−10
10
0.2

−12
10
0
0 2 4 6 8 10
iteration
0 0.2 0.4 0.6 0.8 1

−1
10

0.8 exact −2
10
|/θ
exact

0.6
−θ
opt

−3
0.4 10

Uniform
Adapted RBF−1
0.2
Adapted RBF−2
Adapted RBF−3
−4
0
10
0 0.05 0.1 0.15 0.2
h
0 0.2 0.4 0.6 0.8 1

Fig. 10. Upper left: initial adapted mesh (fine, RBF3) at M1 = 2.5 and initial
angle θ0 = 3o . Upper right: cost function minimization with or without adaptation.
Lower left: final adapted mesh (fine, RBF3) at M1 = 2.5 and optimized angle
θopt = 15.0088o . Lower right: comparison between the exact optimal wedge angle
(θexact = 15o ) and the numerical optimum angle (θopt ) with our without adaptation.

where the monitor or diffusivity function m is calculated from the pressure p


through (20)-(23), as well as the interpolation method (24)-(25), detailed in
Section 3.2. The solution of the coupled mesh and flow equations is obtained
through Algorithm 3.

Problem (34) is solved numerically with the same initial parameter (θ0 ), initial
mesh Mh (Y) of the domain Ω0 , and the same algorithm of optimization as
Problem (31). The calculation of the derivative of the cost function is carried
out by solving the same adjoints of the flow and mesh equations as in the case
without adaptation in Section 4.4.1. This is the result of an approximation:
the variations of the coefficients of the mesh equation (7) are neglected.

Figure 10 shows for one case the adapted mesh at initial angle θ0 and at the
calculated optimal angle θopt . We used three different mollifiers (RBF-1,-2,-3)
described in Table 1. The differences, between the algorithms, appear when

26
comparing the calculated optimal angle θopt to the exact optimal angle θexact .
The relative error is reduced when using the adaptive mesh.

As a final comment, the results obtained here depend on the choice of the flow
problem, in particular the choice of Mach number of the incoming flow M1 =
2.5 and angle of the targeted wedge θexact = 15o . Therefore, the amplitude of
the differences observed here between classical optimization and optimization
with adaptation, can vary for different flow configurations. Our intend is to
describe the method and to evaluate it on a relevent test case for aerodynamic
shape optimization.

5 Summary and outlook

This articles proposes a new approach of mesh adaptation in the context


of gradient-based aerodynamic shape optimization. The main feature of the
adaptation is the control of the mesh nodes coordinates through an elliptic
equation with variable diffusivity coefficients. The diffusivity or monitor func-
tion is built using a mollifying technique in order to use sensors that have
large node-to-node variations, like the sensor for shocks that has been used in
the numerical examples. Other types of sensors or error indicators could be
used through the same monitor function as proposed here. The equations for
the mesh use the same edge-based formulation and data as the flow solver at
initial design, which means that a CFD solver could be supplemented with an
adaptation algorithm without requiring new data structures.

The novelty of the method is that the coupled mesh and flow equations define
a smooth mapping from the displacements of the parameterized boundaries
to the value of the cost function. Moreover, a solution algorithm is proposed
based on an approximate Newton method and an interpolation technique in
order to establish a smooth coupling between the variable diffusivity and the
flow variables.

The requirement to have polygonal domains greatly simplified the mesh equa-
tions solved on the boundaries. Domains with curved boundaries may be
equally treated by giving a parameterization of the boundary.

Acknowledgement

The author thanks Martin Berggren for his comments and suggestions during
the redaction of this report.

27
References

[1] O. Amoignon. Adjoint-based aerodynamic shape optimization. Technical


Report IT Licentiate theses 2003-012, Department of Information Technology,
Division of Scientific Computing, Uppsala University, Box 337, SE-751 05
Uppsala, Sweden, October 2003.
[2] O. Amoignon and M. Berggren. Adjoint of the median dual finite volume
method applied to 2D and 3D transonic aerodynamic shape optimization. 2005.
Submitted.
[3] O. Amoignon, Jan O. Pralits, A Hanifi, M. Berggren, and D.S. Henningson. Flap
design optimization for take-off performance. Evolutionary and Deterministic
Methods for Design, Optimization and Control with Applications to Industrial
and Societal Problems , R. Schilling, W.Haase, J. Periaux, H. Baier, G. Bugeda
(Eds), 2005.
[4] J.D. Anderson. Hypersonic and high temperature gas dynamics. McGraw-Hill
Series in aeronautical and aerospace engineering, 1989.
[5] W.K. Anderson and D.L. Bonhaus. Airfoil design on unstructured grids for
turbulent flows. AIAA Journal, 37(2):185–191, 1999.
[6] O. Axelsson. Iterative Solutions Methods. Cambridge University Press, second
edition, 1996.
[7] B.N. Azarenok. Variational barrier method of adaptive grid generation in
hyperbolic problems of gas dynamics. SIAM Journal of Numerical Analysis,
40(2):651–682, 2002.
[8] T.J. Barth. Aspects of unstructured grids and finite-volume solvers for the Euler
and Navier–Stokes equations. In Special Course on Unstructured Methods for
Advection Dominated Flows, pages 6–1–6–61. AGARD Report 787, May 1991.
[9] T.J. Barth. A posteriori error estimate and mesh adaptivity for finite volume
and finite element methods. Springer series Lecture Notes in Computational
Science and Engineering, 41:1–21, 2004.
[10] O. Baysal and K. Ghayour. Continuous adjoint sensitivities for optimization
with general cost functionals on unstructured meshes. AIAA Journal, 39(1):48–
55, 2001.
[11] G. Bugeda and E. Oñate. Optimum aerodynamic shape design for fluid flow
problems including mesh adaptivity. Int. J. Numer. Meth. Fluids, 30:161–178,
1999.
[12] G.W. Burgreen, O. Baysal, and M.E. Eleshaky. Improving the efficiency of
aerodynamic shape optimization. AIAA Journal, 32(1):69–76, 1994.
[13] W. Cao, W. Huang, and R.D. Russel. A study of monitor functions for two-
dimensional adaptive mesh generation. SIAM Journal of Scientific Computing,
20(6):1978–1994, 1999.

28
[14] W. Cao, W. Huang, and R.D. Russel. A moving mesh method based on the
geometric conservation law. SIAM Journal of Scientific Computing, 24(1):118–
142, 2002.

[15] W. Cao, W. Huang, and R.D. Russel. Approaches for generating moving
adaptive meshes: location versus velocity. Applied Numerical Mathematics,
47:121–138, 2003.

[16] H.D. Ceniceros and T.Y. Hou. An efficient dynamically adaptive mesh for
potentially singular solutions. Journal of Computational Physics, 172:609–639,
2001.

[17] Y. Coudière, B. Palmerio, A. Dervieux, and D. Leservoisier. Accuracy barriers


in mesh adaptation. Technical Report RR-4528, INRIA, 2002.

[18] V.F. De Almeida. Domain deformation mapping: application to variational


mesh deformation. SIAM Journal of Scientific Computing, 20(4):11252–1275,
1999.

[19] C. de Boor. Good Approximation by Splines with Variable Knots II. Springer
Verlag, Berlin, springer Lecture Notes Series edition, 1973.

[20] P. Eliasson. Edge, a Navier–Stokes solver, for unstructured grids. Technical


Report FOI-R–0298–SE, Swedish Defence Research Agency, Stockholm,
November 2001.

[21] J. Elliot and J. Peraire. Aerodynamic design using unstructured meshes. AIAA
Paper, (96-1941), 1996.

[22] M.B. Giles and N.A. Pierce. Adjoint error correction for integral outputs.
In Error Estimation and Adaptive Discretization Methods in Computational
Fluid Dynamics, volume 25. In Lecture Notes in Computational Science and
Engineering, Springer, 2002.

[23] W. Huang. Practical aspects of formulation and solution of moving mesh partial
differential equations. Journal of Computational Physics, 171:753–775, 2001.

[24] W. Huang. Variational Mesh Adaptation: Isotropy and Equidistribution.


Journal of Computational Physics, 174:903–924, 2001.

[25] W. Huang. Measuring mesh qualities and application to variational mesh


adaptation. SIAM Journal of Scientific Computing, 26(5):1643–1666, 2005.

[26] S. Jakobsson and O. Amoignon. Mesh Deformation using Radial Basis


Functions for Gradient-based Aerodynamic Shape Optimization. 2005.
Submitted.

[27] A. Jameson. Optimum aerodynamic design using CFD and control theory.
AIAA Paper, (95-1729), 1995.

[28] A. Jameson, W. Schmidt, and E. Turkel. Numerical solution of the Euler


equations by finite volume methods using Runge-Kutta time stepping schemes.
AIAA Paper, (81-1259), 1981.

29
[29] Feng Liu, Shanhong Ji, and Guojun Liao. An adaptive grid method and
its application to steady Euler flow calculations. SIAM Journal of Scientific
Computing, 20(3):811–825, 1998.

[30] J.A. Mackenzie. The efficient generation of simple two-dimensional adaptive


grids. SIAM Journal of Scientific Computing, 19(4):1340–1365, 1998.

[31] B. Mohammadi. A new optimal shape procedure for inviscid and viscous
turbulent flows. Int. J. Numer. Meth. Fluids, 25:183–203, 1997.

[32] B. Mohammadi and O. Pironneau. Mesh adaption and automatic differentiation


in a CAD-free framework for optimal shape design. Int. J. Numer. Meth. Fluids,
30:127–136, 1999.

[33] C. Sung and J.H. Kwon. Accurate aerodynamic sensitivity analysis using
adjoint equations. AIAA Journal, 38(2):243–250, 2000.

[34] H. Tang and T. Tang. Adaptive mesh methods for one- and two-dimensional
hyperbolic conservation laws. SIAM Journal of Numerical Analysis, 41(2):487–
515, 2003.

[35] D.A. Venditti and D.L. Darmofal. Adjoint error estimation and grid adaptation
for functional outputs: Application to quasi-one-dimensional flow. Journal of
Computational Physics, 164(1):204–227, October 2000.

30

View publication stats

You might also like