Professional Documents
Culture Documents
" #
$ %$& '
( ) % '%$' %)
* + * * * , %$& &
! " # $ % # # $ $ & '$
( ) % $&
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.
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."
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.
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].
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.
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.
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)
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 ).
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.
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.
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.
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.
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.
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
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).
−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.
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
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.
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).
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
[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.
[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.
[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.
[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.
[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.
[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.
[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.
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.
[40] C. Sung and J.H. Kwon. Accurate aerodynamic sensitivity analysis using adjoint
equations. AIAA Journal, 38(2):243–250, 2000.
[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
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
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.
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.
This discretization is common in CFD software for it lowers the cost of mesh
generation when dealing with complicated geometries.
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].
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.
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)
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).
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 ,
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).
(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
(iv) Calculate the gradient with respect to the shape deformations ∇Jd :
∗
∂Mh
∇Jd = X∗h . (12)
∂dh
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.
p 1
E= + ρu2 . (18)
γ−1 2
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
Primitive variables are also used at some parts of the presentation and are
denoted as the 3-by-1 matrix
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).
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
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]:
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(Ω)
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
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
qT f = f T q , (36)
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:
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
∗ 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:
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
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
14
Expression (57) gives the components of ∇Jn , that is, the operations described
by (9).
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
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.
coincides
1 if the orientation of ij
γijP = with the orientation given by ez , (60)
−1 otherwise.
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.
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
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
4.3.1 Gradient in 2D
1 (68)
δni = − ez × (δxk2 − δxk1 ) .
2 E∈Ei
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).
v 1 · v 2 × v 3 = −v 3 · v 2 × v 1 = v 2 · v 3 × v 1 , (70)
1 (71)
+ (δxk2 − δxk1 ) · ez × (∇Jn )i ,
i∈V(∂Ω) E∈Ei
2
18
4.3.2 Gradient in 3D
δ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
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).
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).
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 |
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)
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
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.
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.
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
S (rh ) − S0 = −
ri |ni | ,
i∈V(∂Ωw )
(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
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
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
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)) ,
In the present case, the gradient ∇Ja is obtained by applying the chain rule:
T
ddh
∇Ja = ∇Jd , (89)
dah
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
−2
relative error
10
−3
10
−4
10 −6 −4 −2
10 10 10
perturbation
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.
28
0 = 144 C 0 = 0.331
CD 0 = 0.113
CM J 0 = 0.0144
L
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.
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.
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
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
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
Sweden
¶ Researcher, also Professor at the Department of Mechanics, KTH, SE-100 44 Stockholm, Sweden
1 of 35
2 of 35
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
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
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
An artificial dissipation flux dij , a blend of second- and fourth-order differences of Jameson type, is used.
5 of 35
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
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
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 .
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
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
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
+∞
∂ ∂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 →+∞
∂(h1 W̄ ∗ )
ρ̄ −
∂x3
∂ Ū ∗ ∂ V̄ ∗ ∂ T̄ ∗ ∗
h1 ρ̄ Ū + V̄ + c̄p T̄ = SW , (27)
∂x3 ∂x3 ∂x3
11 of 35
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
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 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
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.
14 of 35
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
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.
15 of 35
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
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
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 .
17 of 35
18 of 35
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
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
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
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
−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
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
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
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
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
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
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
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.
24 of 35
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
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
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
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
·, ·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)
27 of 35
δ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
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
Q̄
∗ −1 ∗
∂Aq ∂Aq ∂J (58)
− , δX
∂X
∂Q ∂Q
X
∂J
+ , δX .
∂X X
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
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
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
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 , δXX . (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
∗
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
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
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
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,
33 of 35
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
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
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.
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
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
Equations for Compressible Flows,” Flow, Turbulence and Combustion, Vol. 65, No. 3/4, 2000, pp. 321–346.
34 of 35
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,”
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
measurements,” Experimental Data Base for Computer Program Assessment, AGARD-AR-138, May 1979, pp. A6–1–A6–77.
35 of 35
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
1 Introduction
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.
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.
(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)
(4) The displacement of any point should depend linearly on the displacement
of the control points.
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 following theorem gives a representation formula for all the geometric
interpolation function which satisfy conditions 1 to 4.
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.
5
Radial basis function φ(r)
A proof is given in Appendix A. Due to (9), the representation (7) can also
be written
N
x= ai (x0 )xki .
i=1
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].
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,
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
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
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,
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
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)
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.
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
Clearly, κ(y, α) ≈ y for small y and κ(y, α) ≈ 1 for large values (everything
relative α which defines the scale of the problem).
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 )
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
where
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].
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:
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].
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:
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:
∂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
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
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
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
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
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)
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:
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.
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.
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
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:
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 ) .
(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
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∞
ρ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∞
28
εrel radav radmax dihedav dihedmax aspav aspmax l2 l∞
29
εrel radav radmax dihedav dihedmax aspav aspmax l2 l∞
30
5 Summary and perspectives
5.1 Summary
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.
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
32
For each rotation operator R we should have, according to condition (4),
N
Rx = x0 + Ak (x0 ) Rxk − x0k .
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
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. ✷
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
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)) ,
References
[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.
[6] M. D. Buhmann, Radial basis functions, Acta numerica, 2000, Acta Numer.,
vol. 9, Cambridge Univ. Press, Cambridge, 2000, pp. 1–38.
[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.
[13] M.D. Gunzburger, Perspectives in flow control and optimization, Society for
Industrial and Applied Mathematics, Philadelphia, PA, USA, 2002.
[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.
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.
[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.
[24] W. Squire and G. Trapp, Using complex variables to estimate derivatives of real
functions, SIAM Review 40 (1998), no. 1, 110–112.
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
1 Introduction
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.
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.
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 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.
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
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].
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
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 .
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).
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
• 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):
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
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)
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].
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
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].
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
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(Ω)
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).
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:
15
iii-a) Solve the flow equations given the current mesh:
Xn → pn .
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).
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 .
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
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
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.
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).
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 :
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.
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.
(P): Given {M1 , p1 , θmax } in the flow problem described in Section 4.1, find
θ̂, in the interval [0, θmax ], that minimizes
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.
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
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 θ (β).
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.
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].
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 ).
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
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.
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.
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
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.
[19] C. de Boor. Good Approximation by Splines with Variable Knots II. Springer
Verlag, Berlin, springer Lecture Notes Series edition, 1973.
[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.
[27] A. Jameson. Optimum aerodynamic design using CFD and control theory.
AIAA Paper, (95-1729), 1995.
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.
[31] B. Mohammadi. A new optimal shape procedure for inviscid and viscous
turbulent flows. Int. J. Numer. Meth. Fluids, 25:183–203, 1997.
[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