49th AIAA Aerospace Sciences Meeting including the New Horizons Forum and Aerospace Exposition 4 - 7 January 2011, Orlando, Florida
AIAA 2011-183
Constrained and Unconstrained Aerodynamic Quadratic Programming Optimization Using High Order Finite Volume Method and Adjoint Sensitivity Computations
Downloaded by Carl Ollivier Gooch on August 7, 2017 | http://arc.aiaa.org | DOI: 10.2514/6.2011-183
Mohammad Baher Azab*, Carl Ollivier-Gooch† Advanced Numerical Simulation Laboratory, the University Of British Columbia, Vancouver, BC, Canada V6T1Z4
In this paper we present some results of unconstrained and constrained aerodynamic optimization using 2nd and 4th order CFD simulations for subsonic and transonic test cases. We use gradient based optimization technique, and the flow solution sensitivity is evaluated using the adjoint approach. We use the computed 2 nd and 4th order jacobian matrix from CFD computations to compute the corresponding adjoint vector. We use Quasi-Newton line search technique with BFGS approximation of the objective function Hessian matrix because of its fast convergence compared to the first order schemes like steepest descent. We carefully compare the adjoint and the finite-difference gradients for subsonic, unlimited transonic and limited transonic simulations, and recommended a modification for the limited 4th order case. For subsonic and transonic inverse design test cases unconstrained optimization problems, the 2nd and 4th order schemes reached the target geometry and required a comparable number of iterations. For transonic drag reduction without a lift constraint, the 2nd and 4th order schemes reached different optimal airfoil shapes with shock free pressure distributions. The final test case is a transonic drag reduction with a lift constraint. The lift constraint is satisfied using a penalty term in the merit function; the 2nd and 4th order accurate computations reached different optimal shapes with non shock free pressure distribution. The difference in the optimal 2nd and 4th order profiles is attributed to the difference in the penalty term in both 2 nd and 4th order merit function; it is also attributed to the noise in the pressure sensitivity field due to the existence of weakened shock waves in the optimal flow solution.
Nomenclature ߲ܴ ߲ܳ
R Q U ܨԦ F ߲ܯ ߲ܦ
nx,y D xd U KS-T ഥ ܷ K Cl ClC ߙ PT ݏݓ
* †
= Jacobian Matrix. = = = = = = = = = = = = = = = = = =
Residual of the linear system solved to get flow solution. Conservative flow properties vector. Primitive flow properties vector. Flow flux vector. Objective function. Mesh sensitivity Unit normal in x or y direction. design variables. design variable state. primitive flow properties. semi-torsional spring analogy edge stiffness. global mesh points displacement vector. global mesh movement stiffness matrix. lift coefficient. Constraint lift coefficient. angle of attack. target pressure. Surface integration weight at Gaussian point.
PhD student, Student Member AIAA,
[email protected] Associate Professor, Member AIAA,
[email protected]
1 Copyright © 2011 by Mohammad Azab, Carl Ollivier-Gooch. Published by the American Institute of Aeronautics and Astronautics, Inc., with permission.
I.
Introduction
Downloaded by Carl Ollivier Gooch on August 7, 2017 | http://arc.aiaa.org | DOI: 10.2514/6.2011-183
T
he rapid growth of the computational power and storage capacity of computers allows aerospace engineers to tackle aerodynamic design as a numerical optimization problem given an initial aerodynamic shape and an aerodynamic objective function to be minimized. The objective function is evaluated computationally, and the optimization procedure seeks to minimize the objective function by changing the aerodynamic shape. For transport aircraft, the important aerodynamic objective function to be minimized is the drag coefficient, as drag minimization reduces fuel consumption and extends aircraft range. A lift constraint is present in the optimization problem to maintain the payload capacity of the aircraft. Other geometric constraints defined to meet structure design requirements also should be expressed in the optimization problem. Gradient based optimization such as line search and trust region are widely used in aerodynamic and aerospace optimization nowadays [2, 3] because of their fast convergence compared to evolutionary optimization schemes like genetic or particle swarm algorithms. The evaluation of the solution sensitivity with respect to design variables is the key to evaluate objective function gradient vector, which is needed for optimization; gradient evaluation is the most computationally expensive part in the optimization process. The adjoint approach is an excellent choice to find solution sensitivity because it requires solving a single linear system regardless of the number of design variables; the solution of this linear system, the adjoint vector, is used to evaluate the objective function gradient [1-5].
CFD simulations carried out using unstructured grids give accurate aerodynamic force predictions, and unstructured grids have the advantage of easily representing any complex shape. The higher order finite volume CFD solver used in this paper is based on the work of C. Ollivier-Gooch and co-workers [6-8]; an overview is given in section II. We use the steady state jacobian matrix for both 2 nd and 4th order solver to calculate the adjoint vector, which is used to find the objective function gradient [9] as described in section III. We use the quasi Newton line search technique as an optimization scheme with BFGS approximation of the hessian matrix [10]. Our airfoil geometry parameterization method improves on our previous [9] ensuring surface curvature continuity , see section four IV details. We studied the accuracy of the computed gradient using adjoint approach when compared to finite difference gradient in Section V. Both 2nd and 4th order computed adjoint gradients are in excellent agreement with the corresponding order of accuracy finite difference gradient except when solution limiting impacts the gradient in transonic flows. In Section VI, we present four test cases: subsonic inverse design, transonic inverse design, transonic drag reduction without lift constraint, and transonic drag reduction with lift constraint.
II. Finite Volume Flow Solver The two dimensional integral form of Euler’s equation can be written for a control volume : i as,
& w QdV ³ F nˆ dl ³³ wt :i d: i where nˆ
0,
(1)
nx i n y j is the outward pointing normal to the control volume faces; Q, F are the conserved variables
and the flux across volume : i boundaries which are expressed as,
Q
ªUº « Uu » & « », F .nˆ « Uv » « » ¬E¼
p
J 1 .« E U (u
un
nx u n y v
ª ¬
UU n ª º « UU u n p » n x « », « UU n v n y p » « » ¬ ( E p )U n ¼ 2
v2 )º », 2 ¼
Higher-order accuracy is obtained by least-squares reconstruction of the non-conserved variables
U
>U
u v
p@ and gauss quadrature in flux integration T
2
[6-8]
. After integrating fluxes around each control
volume in the mesh, this discretization leads to a sparse system of linear equations, which for the simplest case of a global time step can be written as, n
ªI wR º n « 't wQ » ^'Q` ¼ ¬ whereοܳ ൌ ሾοߩ
οߩݑ
οܧሿܶ ,
οߩݒ
߲ܴ
^R`n ,
(2)
is the jacobian matrix, and ሼܴሽ is the residual. The steady state solution is
߲ܳ
obtained iteratively whenሼܴሽ ՜ Ͳ .In practice, we use a quasi-Newton generalization of Eq. (2) that includes residual-based local time stepping and solve the system using GMRES [11].
III. Gradient Computation Using Adjoint Method
Downloaded by Carl Ollivier Gooch on August 7, 2017 | http://arc.aiaa.org | DOI: 10.2514/6.2011-183
The objective function, F, for aerodynamic optimization is a function of the design variables, D, and flow field solution at the surface points of the boundary control volumesܷ ݏ. ܨൌ ܨሺܷ ݏǡ ܦሻǡ (3) For instance, the drag force of a two dimensional airfoil can be evaluated as follows:
FD
^³ P n
FD
¦w
s
or in discrete form,
s
`
ds cos D
x
^³ P n s
y
`
ds sin D
Ps n x cos D ¦ ws .Ps n y sin D ,
(4)
where ܲ ݏis the pressure at surface integration point pressure, ݊ ݔǡ ݊ ݕare the unit normal components at the surface integration point , ߙ is the angle of attack, and ݏݓis the arc length associated with the surface integration point. The discrete objective function is expressed as a function of geometric and flow properties of the control volume such as the length of each face and the unit normal at each Gauss point. The geometric properties depend on the design variables through the mesh sensitivity, while the flow properties at the Gauss points depend on the flow properties of the control volume itself and its neighbors, which in turns depend on the mesh and the boundary shape which ultimately depends on the geometric design variables. The gradient of the objective function can be obtained by using the chain rule as expressed in Eq. (5). ݀ܨ
ൌ
݀ܦ
߲ܨ
߲ܷ ܾ݃ ߲ܷ ߲ܯ
߲ܷ ܾ݃
߲ܷ ߲ܦ߲ ܯ
߲ܯ߲ ܨ ߲ܦ߲ ܯ ߲ܯ
,
(5)
is the mesh dependency on the design variables where ܷܾ݃ is the boundary Gauss point flow properties, and ߲ܦ (mesh sensitivity) [9]. The residual of the flow governing equations can be written as a function of flow field solution (U) and mesh geometric design variables (D). If we apply the constraint that the flow solution is converged, we can write, μ ߲ܯ μ μ ൌ ൌͲ (6)
μ μ
μ ߲ܦ μ െͳ μ ߲ܯ
μ μ μ μ െͳ
μ
μ
ൌ െቂ ቃ
ȉ
μ ߲ܦ
ൌ െቂ
ȉ
μ
ቃ
ȉቄ
μ ߲ܯ μ ߲ܦ
ቅ
(7)
Substituting Eq. (7) in Eq. (5), ݀ܨ ݀ܦ
ൌ
߲ܨ ߲ܦ
߲ܾ݃ ܷ߲ ܨ ߲ܷ ܾ݃
߲ܷ
μ െͳ
െ ቂ ቃ μ
ȉ
μ ߲ܯ μ ߲ܦ
൨,
(8)
taking the transpose of Eq. (8), ݀ܶ ܨ ݀ܦ
where and
߲ܨ
߲ܦ μ ߲ܯ
μ ߲ܦ
ൌ
߲ܯ߲ ܨ ߲ܦ߲ ܯ μ
ൌ
ൌ
߲ܶ ܨ ߲ܦ
μ ߲ܶ ܯ
μ െ
μ ߲ܦ
μ
െቄ
ቅ ȉ ቊቂ ቃ
߲ܨ
߲ܷ ܾ݃
߲ܷ ܾ݃
߲ܷ
ܶ
൨ ቋ,
(9)
,
μ π
μ π ߲ܯ μ
߲ܦ
σ
π ൜
μ μ ߲ܯ
μ μ ߲ܦ
μ μ ߲ܯ μ μ ߲ܦ [4].
μ μ μ μ
μ μ
μ
߲ܯ μ
߲ܦ
ൠ
The solution procedure of Eq. (9) can be summarized as We get the adjoint method, presented by A. Jameson follows, μ x Using the steady state flow solution, we construct the CFD simulation jacobian matrix expressed in Eq. μ
(2).
x
We construct wR as: wU
3
wR wU
wR wQ , wQ wU
where wQ is the transformation matrix from conservative to primitive flow variables and is block wU
diagonal. x
We construct
߲ܨ
߲ܷ ܾ݃
߲ܷ ܾ݃
߲ܷ
,
Downloaded by Carl Ollivier Gooch on August 7, 2017 | http://arc.aiaa.org | DOI: 10.2514/6.2011-183
where wF is the analytic dependency of the objective function on the primitive flow properties at wU bg wU bg the airfoil surface points., and is the dependency of surface point primitive flow properties wU on the control volume average values. The latter is known as a side effect of solution reconstruction. μ
߲ܨ
߲ܷ ܾ݃
߲ܷ ܾ݃
߲ܷ
ܶ
x
We solve the linear system ቂ ቃ ɗ ൌ
x
We construct the objective function gradient vector ൌቄ ቅ െቄ ቅ ɗ, which requires only a ݀ܦ μ μ μ μ vectors dot product for each design variable.
μ
൨ to get the adjoint vector ψ. ݀ܶ ܨ
μ μ ܶ
μ μ ܶ
IV. Geometry Parameterization The geometry parameterization technique presented in this paper is a modification of a method we presented previously [9]. The airfoil upper and lower surfaces are presented using two least square splines for each surface as shown in Fig (1). The proposed polynomials we use are, ܲͳ ሺݔሻ ൌ ܽͲ ξ ݔ ܽͳ ݔ ܽʹ ʹ ݔ ܽ͵ Ͳ ͵ ݔ൏ ݔ൏ ͳܮ (10) ܲʹ ሺݔሻ ൌ ܾͲ ܾͳ ݔ ܾʹ ʹ ݔ ܾ͵ ͳܮ ͵ ݔ൏ ݔ൏ ܮ where x is the normalized chord-wise position, ͳܮis chord-wise x-position that separates both polynomial regions, and ܮൌ ͳ. These polynomials are suitable for rounded leading edge airfoil due to the existence of ξ ݔterm in ܲͳ ሺݔሻ. The x and y coordinates of the design control points shown in Fig (1) are used to find the values of the polynomial coefficients. These polynomials must satisfy value, slope, and curvature continuity at their meeting point ݔൌ ͳܮ. These conditions can be written as, x Value continuity: ܲͳ ሺ ͳܮሻെܲʹ ሺ ͳܮሻ ൌ Ͳ (11) x slope continuity: (12) ܲͳ′ ሺ ͳܮሻ െ ܲʹ′ ሺ ͳܮሻ ൌ Ͳ x Curvature continuity: (13) ܲͳ′′ ሺ ͳܮሻ െ ܲʹ′′ ሺ ͳܮሻ ൌ Ͳ An additional constraint should be added on ܲʹ ሺܮሻ to assure zero thickness at the trailing edge. The above “hard” constraints should be strictly satisfied by the geometry parameterization polynomials; they can be written in matrix form as, ሾܤሿ ȉ ሼܲሽ ൌ ሼͲሽ , (14) ʹ ͵ ʹ ͵ ͳܮ ͳܮ െͳ െͳܮ െͳܮ െې ͳܮ ۍඥͳܮ ͳܮ ʹ ͳ ێ ͳ ʹǤ ͵ ͳܮǤ Ͳ ͳܮ െͳ െʹǤ ͳܮെ͵Ǥ ۑ ͳʹܮ ʹێඥͳܮ ۑ ሾܤሿ ൌ ێെͳ ۑ Ͳ ʹ ܮ Ͳ Ͳ െʹ െܮ ͳ ͳۑ ێͶට͵ܮ ͳ ێ ۑ Ͳ ۏ Ͳ Ͳ Ͳ ͳ ܮ ʹܮ ے ͵ܮ ሼܲሽ ൌ ሾܽͲ ܽͳ ܽʹ ܽ͵ ܾͳ ܾʹ ܾ͵ ܾͶ ሿܶ The free parameters are chosen the best approximate y coordinates of the “airfoil shape control points”; the x coordinates of the control points are fixed. The resulting least square system with constraints applied can be expressed as
4
ԡሾܣሿ ȉ ሼܲሽ െ ሼܿሽԡʹ
ሾܤሿ ȉ ሼܲሽ ൌ ሼͲሽǡ
(15)
Downloaded by Carl Ollivier Gooch on August 7, 2017 | http://arc.aiaa.org | DOI: 10.2514/6.2011-183
where ሾܣሿǡ ሼܿሽ contain the x and y coordinates of the design points after being substituted in the surface polynomials. To give an example of how this least squares system is constructed, consider the parameterized airfoil surface shown in Figure (1). Six control points lies in the region of the polynomial P1(x), while three points lies in P2(x) region. The corresponding least squares system is
ª « « « « « « « « « « « « ¬
x1 x2 x3 x4 x5 x6 0 0 0
x1 x2 x3 x4 x5 x6 0 0 0
x12 x 22 x32 x 42 x52 x62 0 0 0
x13 x 23 x33 x 43 x53 x63 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 1 x7 1 x8 1 x9
0 0 0 0 0 0 x72 x82 x92
0º » a1 ½ 0»° ° a2 0»° ° » °a3 ° 0»° ° °a 4 ° 0 ».® ¾ » b1 0 » °° °° » b2 x73 » ° ° ° b3 ° x83 » ° ° » ¯b4 ¿ x93 ¼
y1 ½ °y ° ° 2° ° y3 ° ° ° ° y4 ° ° ° ® y5 ¾ °y ° ° 6° ° y7 ° °y ° ° 8° °¯ y 9 °¿
(16)
Because the constraint equation, Eq. (14), has zero right hand side, the solution vector ሼܲሽ must lies in the null
Figure (1): Least square surface presentation of RAE 2822 airfoil using two polynomials P1(x) & P2 (x) fitted using the control points. space of the constraint equations, i.e. it should be a linear combination of the null space basis of the constraint equations. The matrix ܤis full rank and to find the null space basis of it, QR factorization can be used to find the null space as follows, ܶܤൌ ܳ ȉ ܴ ሬሬሬԦͳ ሬሬሬሬԦ ʹݍ ܳ ൌ ሾݍ
͵ݍ ሬሬሬሬԦ
ݍͶ ሬሬሬሬԦ
ݍͷ ሬሬሬሬԦ
ݍ ሬሬሬሬԦ ሬሬሬሬԦ ݍ
ݍͺ ൌ ሾܳͳ ሬሬሬሬԦሿ
ܳʹ ሿ
where ሾܳͳ ሿ ൌ ሾݍ ሬሬሬԦͳ
ʹݍ ሬሬሬሬԦ
͵ݍ ሬሬሬሬԦ
ݍͶ ሬሬሬሬԦሿ
5
ሾܳʹ ሿ ൌ ሾݍ ሬሬሬሬԦͷ
ݍ ሬሬሬሬԦ
ݍ ሬሬሬሬԦሿ ሬሬሬሬԦ ݍͺ
The vectors of ሾܳʹ ሿ matrix represents unit basis of the null spaceሾܤሿ. The solution vector ሼܲሽ must be a linear combination of the vectors of the matrixሾܳʹ ሿ, ሼܲሽ ൌ ͳݖȉ ݍ ሬሬሬሬԦͷ ʹݖȉ ݍ ሬሬሬሬԦ ͵ݖȉ ݍ ሬሬሬሬԦ ݖͶ ȉ ሬሬሬሬԦ ݍͺ ൌ ሾܳʹ ሿ ȉ ሼݖሽ
(17)
Substituting Eq. (17) into Eq. (15) ሾܣሿ ȉ ሼܲሽ ൌ ሾܣሿ ȉ ሾܳʹ ሿ ȉ ሼݖሽ ൌ ሼܿሽ
(18)
ሼݖሽ ൌ ሾ ܣȉ ܳʹ ሿȘ ȉ ሼܿሽ
(19)
ሼܲሽ ൌ ሾܳʹ ሿ ȉ ሾ ܣȉ ܳʹ
ሿȘ
ȉ ሼܿሽ
(20)
Downloaded by Carl Ollivier Gooch on August 7, 2017 | http://arc.aiaa.org | DOI: 10.2514/6.2011-183
Eq. (20) represents the relationship between the polynomial coefficients ሼܲሽ and the control points y locationsሼܿሽ. The rectangular matrix ሾ ܣȉ ܳʹ ሿȘ is the pseudo inverse of ሾ ܣȉ ܳʹ ሿ and is evaluated using the singular value decomposition (SVD) for numerical stability. The sensitivity of the polynomial coefficients with respect to the ith control point y location, ݅ܿݕ, is the ith vector of the matrix ቂሾܳʹ ሿ ȉ ሾ ܣȉ ܳʹ ሿȘ ቃ, which is needed to calculate the mesh sensitivity wM [9]. wD
V. Gradient Accuracy Validation In this section, the comparison of the gradient accuracy evaluated using 2nd and 4th order schemes is carried out. Both 2nd and 4th order gradients are evaluated using the adjoint approach and compared to their corresponding finite difference gradient. We present three test cases: subsonic, non-limited transonic and limited transonic test cases. In all the test cases we use 18 design points to parameterize the airfoil geometry.
A. Subsonic test case In this test case, the evaluation of the lift coefficient gradient with respect to the airfoil geometric design control points is presented for both 2nd and 4th order schemes, including a comparison with its same order of accuracy finite difference gradient. The airfoil used in this test case is NACA 0012 at subsonic conditions ܯൌ ͲǤͷ , and ߙ ൌ ʹ . Figure (3) shows a representative comparison between the field of pressure sensitivity with respect to one of the geometry design points computed using the adjoint and finite difference approaches for both 2nd and 4th order accurate computations. Agreement is excellent in all cases; this is also true for the other design control points. The excellent matching of the pressure sensitivity when comparing the 2nd order and the 4th order results indicates that the two schemes will give similar gradient vectors and similar optimization descent directions for subsonic flow optimization.
6
Table (1) shows quantitatively an excellent matching between the gradient magnitude (less than half a percent difference) and direction (less than a half a degree difference) when comparing adjoint s and finite difference for both 2nd and 4th order schemes. Figure (4) shows good agreement between the objective function gradient ߲ܥ components ܮ, where ݅ݕare the y locations of the design control points, computed using adjoint and finite ߲݅ ݕ
Downloaded by Carl Ollivier Gooch on August 7, 2017 | http://arc.aiaa.org | DOI: 10.2514/6.2011-183
difference approaches for both 2nd and 4th order computations. The maximum normalized error is only 0.005 which gives a high level of accuracy for the computed gradient. Table (1) shows that the 2 nd and 4th order computed gradients are the same magnitude and they points in the same direction: about 0.5% difference in magnitude and 1o in direction. This implies that the order of discretization error has little effect on the computed gradient vector for subsonic flow.
(a) 2nd Order adjoint
(b) 2nd Order finite difference
(c) 4th Order adjoint (d) 4th Order finite difference Figure (3): the pressure sensitivity with respect to one of the design control points computed for subsonic flow over NACA 0012. 2nd order Adjoint Gradient vector magnitude Angle with 2nd order Adjoint (degree) th
Angle with 4 order Adjoint (degree)
18.6051
2nd order FD
4th order Adjoint
4th order FD
18.5614
18.5745
18.6546
0
0.2466
1.1174
1.3295
1.1174
0.9166
0
0.2491
Table (1): The magnitude of 2nd and 4th order ࡸ gradients and angles between the evaluated gradients for NACA 0012 in subsonic flow
7
Subsonic Flow Gradient Error
4.00E-03 3.00E-03
Normalized Error
2.00E-03
Lower surface
1.00E-03
2nd order
Upper surface
0.00E+00 4th order
-1.00E-03 -2.00E-03 -3.00E-03
Downloaded by Carl Ollivier Gooch on August 7, 2017 | http://arc.aiaa.org | DOI: 10.2514/6.2011-183
-4.00E-03 -5.00E-03
Trailing edge
Leading edge
Trailing edge
-6.00E-03 1
3
5
7
9
11
13
15
17
Figure (4): ࡸ gradient error in 2nd and 4th order schemes with respect to the design points normalized by gradient magnitude
B. Transonic test case with no limiter In this test case, the sensitivity analysis is carried out for NACA 0012 airfoil with ܯൌ ͲǤͺ, andߙ ൌ ʹͲ . The drag coefficient gradient is evaluated without using limiters in the CFD simulation, so overshoot/undershoot at the shock location is expected. Figure (5) shows good agreement of the pressure sensitivity computed using adjoint and finite difference; they also show that for transonic flows, the pressure sensitivity computed using 2 nd order and 4th order accurate adjoint scheme are different especially at the shock location.
(a) 2nd Order adjoint
(b) 2nd Order finite difference
(c) 4th Order adjoint
(d) 4th Order finite difference
Figure (5): The pressure sensitivity with respect to one of the design control points computed for an unlimited transonic flow around NACA 0012.
8
2nd order Adjoint
2nd order FD
4th order Adjoint
4th order FD
1.8137
1.8127
Gradient vector magnitude
1.8954
Angle with 2nd order Adjoint (degree)
0
0.2520
2.2359
1.9968
2.2359
2.3535
0
0.5181
th
Angle with 4 order Adjoint (degree)
1.8953
Table (2): The magnitude of 2nd and 4th order ࡰ gradients and angles between the evaluated gradients for NACA 0012 in an unlimited transonic flow
Unlimited Transonic Flow Gradient Error 0.0060 0.0050 0.0040
Normalized Error
Downloaded by Carl Ollivier Gooch on August 7, 2017 | http://arc.aiaa.org | DOI: 10.2514/6.2011-183
Table (2) shows again the excellent matching between the computed adjoint and finite difference gradient with a direction difference less than a degree and nearly identical magnitude. Figure (6) shows that for unlimited transonic flow, both 2nd and 4th order adjoint gradients are an excellent match to the corresponding finite difference gradient, with the 2nd order schemes matching more closely than the 4th order scheme. Comparison of the 2nd and 4th order gradient vectors shows little difference between them (about 4% in magnitude and 2o in direction). Again, we expect that the 2nd and 4th order schemes will give similar optimization search directions.
0.0030
Upper surface
Lower surface
2nd order
0.0020 0.0010
4th order
0.0000 -0.0010 -0.0020 -0.0030 -0.0040
Trailing edge
Leading edge
Trailing edge
-0.0050 1
3
5
7
9
11
13
15
17
Figure (6): ࡰ gradient error in 2nd and 4th order schemes with respect to the design points normalized by gradient magnitude
C. Transonic test case with limiter In this test case, the impact of using a limiter in the CFD simulation on the accuracy of the computed gradient for 2nd order and 4th order schemes studied. Two different limiters are used, Venkatakrishnan limiter [12] and the higher order limiter of C. Michalak and C. Ollivier-Gooch [8, 13]. Figure (7) shows very good matching of the 2nd pressure sensitivity computed using adjoint and finite difference techniques with the use of Venkatakrishnan limiter.
(a) 2nd Order adjoint
(b) 2nd Order finite difference
9
(a) 4th Order adjoint
(b) 4th Order finite difference
Downloaded by Carl Ollivier Gooch on August 7, 2017 | http://arc.aiaa.org | DOI: 10.2514/6.2011-183
Figure (7): Pressure sensitivity computed using 2nd order scheme in a limited (Venkatakrishnan) transonic flow for NACA 0012. Matching is less good between the adjoint and finite difference pressure sensitivity for the 4th order accurate scheme; this lower level of pressure sensitivity matching will lead to less accurate gradient values when using the limited 4th order scheme. Table (3) shows that with the use of the Venkatakrishnan limiter, the 2nd order gradient magnitude is a very good match with the corresponding finite difference gradient; The larger error in gradient value observed for the 4th order scheme is comparable to the difference in magnitude between 2 nd and 4th order schemes for the unlimited transonic case. Also, the difference in finite difference and adjoint gradient direction grows up to several degrees with the use of Venkatakrishnan limiter. Table (4) shows the same behavior with the higher order limiter of C. Michalak and C. Ollivier-Gooch [8, 13]. We speculate that this is related to non-differentiability in the limiters and that it will be a common feature for limiters in general. 2nd order Adjoint 1.8972
Gradient vector magnitude nd
Angle with 2 order Adjoint (degree) Angle with 4th order Adjoint (degree) nd
2nd order FD 1.8946
4th order Adjoint
4th order FD
1.8870
1.8121
0
3.6121
2.2922
3.3339
2.2922
5.2749
0
4.8725
th
Table (3): Magnitudes of 2 and 4 order ࡰ gradients and angles between the evaluated gradients for NACA 0012 in Venkatakrishnan limited transonic flow To reduce the influence of
wRi in control volume ‘i’ when calculating the adjoint gradient, we modified the 4th wD
order jacobian numerically by making the non zero structure of the 4 th order Jacobian matrix the same as the non zero structure of the 2nd order Jacobian, and dropping off the rest of values in the 4th order Jacobian matrix. We still construct the right hand side with 4th order accuracy. The above modification doesn’t affect the accuracy of the CFD simulation because the right hand side remains 4th order accurate. The computed gradient using this approach is presented in Table (5) and shows a reduction in the 4th order computed adjoint gradient, especially in the direction of the gradient. 2nd order Adjoint
2nd order FD
4th order Adjoint
4th order FD
Gradient vector magnitude
1.6756
1.7528
1.5764
1.6717
nd
0
2.8452
6.2468
3.3381
6.2468
7.2556
0
7.2067
Angle with 2 order Adjoint (degree) Angle with 4th order Adjoint (degree) nd
th
Table (4): The magnitude of 2 and 4 order ࡰ gradients and angles between the evaluated gradients for NACA 0012 using higher order limiter in transonic flow
10
Modified 4th order with Venkatakrishnan scheme Gradient vector magnitude
Modified 4th order with HO
Adjoint
FD.
Adjoint
FD.
1.7352
1.8114
1.9656
1.8121
0
-0.8836
7.5128
4.6735
Angle with mod 4th order Venkat. Adjoint (degree) Angle with mod. 4th order HO. Adjoint (degree)
7.5128 5.7026 0 5.7631 Table (5): The magnitudes and angles between the evaluated modified 4th order ࡰ gradients using adjoint, and finite difference for NACA 0012 using Venkatakrishnan and higher order limiters in transonic flow
0.0600
Normalized Error
0.0400 0.0200 0.0000 2nd order
-0.0200
4th order
-0.0400
Mod 4th order
-0.0600 -0.0800 -0.1000 1
3
5
7
9
11
13
15
17
Figure (8): The normalized ࡰ gradient error in 2nd, 4th, and modified 4th order schemes with respect to the design points in a limited transonic flow (Venkatakrishnan limiter)
Gradient Error for Transonic HO Limited Flow 0.3000 0.2500
Normalized Error
Downloaded by Carl Ollivier Gooch on August 7, 2017 | http://arc.aiaa.org | DOI: 10.2514/6.2011-183
Gradient Error For Transonic Venkatakrishnan Limited Flow
0.2000 0.1500 0.1000
2nd order
0.0500
4th order
0.0000
Mod 4th order
-0.0500 -0.1000 -0.1500 1
3
5
7
9
11
13
15
17
Figure (9): the normalized ࡰ gradient error in 2nd, 4th, and modified 4th order schemes with respect to the design points in a limited transonic flow (Higher Order limiter)
11
VI. Optimization Test Cases In this section we present four optimization test cases. The first two cases are inverse design problems, one subsonic and the other is transonic. In both test cases, a target pressure distribution is obtained using CFD simulation of a parameterized NACA 2412; the starting geometry is NACA0012 and the optimizer will try to find the geometry whose surface pressure distribution matches the target pressure distribution. The third test case is a transonic drag minimization with no lift constraint starting from the RAE2822 airfoil. The objective of this test case is to minimize ݀ܥat ܯൌ ͲǤ͵ and angle of attack = 2. In this test case a strong shock wave is formed near mid chord of the airfoil and we are seeking a shock free geometry or at least a geometry that produces a much weaker shock wave. Geometric constraints are applied so the airfoil thickness will be positive all the way along the airfoil section. The fourth test case repeats test case three but adds the lift coefficient as a constraint.
A. Subsonic inverse design
Downloaded by Carl Ollivier Gooch on August 7, 2017 | http://arc.aiaa.org | DOI: 10.2514/6.2011-183
In this test case, the target pressure distribution is obtained for the parameterized NACA 2412 in a subsonic conditions, ܯൌ ͲǤͷ andߙ ൌ ʹߧ , using 2nd and 4th order CFD simulations. The starting geometry is the parameterized NACA 0012. The objective function to be minimized is ܨൌ ׯሺܲܶ െ ܲ݅ ሻʹ ȉ ݀ܵ,
(21)
the above objective function and its gradient can be expressed in discrete form as ʹ ܨൌ σ൫ሺܲܶ െ ܲ݅ ሻ൯ ȉ ݏݓ, ݀ܨ ݀݀ ݔ
ൌ σ ʹ ȉ ሺܲܶ െ ܲ݅ ሻ ȉ ቀ
െ߲ܲ ݅ ߲݀ ݔ
ቁ ȉ ݏݓ ሺܲܶ െ ܲ݅ ሻʹ ȉ
(22) ߲ݏ ݓ ߲݀ ݔ
,
(23)
where ݏݓis the arc length associated with the surface Gauss point. Figure (10) shows the target pressure distribution of NACA 2412, the initial pressure distribution of NACA 0012, and the optimized airfoil pressure distribution obtained by the 2nd order and 4th order schemes; both schemes successfully reached the target pressure distribution. Figure (11) shows the convergence history for both schemes. Both schemes took 28 iterations to drop the objective function value eight orders of magnitude. Figures (12, 13) show how close the optimized NACA 0012 is to NACA 2412 using 2nd order and 4th order scheme. The error between the target geometry and the optimized profile is larger in the 4 th order scheme due to inaccuracy of the pressure interpolation scheme used to evaluate the objective function; nevertheless the resulting geometry is of excellent match with NACA 2412, with an error of less 0.3% of the surface movement.
(a) 2nd order
(b) 4th order
Figure (10): Subsonic NACA 2412 inverse design pressure distributions for the initial, target, and optimized airfoil profiles
12
0
10
20
30
1.00E-02 1.00E-03 1.00E-04 1.00E-05
2nd order 4th order
F
1.00E-06 1.00E-07 1.00E-08 1.00E-09 1.00E-10 Downloaded by Carl Ollivier Gooch on August 7, 2017 | http://arc.aiaa.org | DOI: 10.2514/6.2011-183
1.00E-11 1.00E-12
iterations
Figure (11): 2nd and 4th Order optimization convergence history.
Figure (12): Subsonic inverse design optimal airfoil shapes
13
Downloaded by Carl Ollivier Gooch on August 7, 2017 | http://arc.aiaa.org | DOI: 10.2514/6.2011-183
(a) Upper surface
(b) Lower surface
Figure (13): The difference between the target profile and the optimized profiles, 2nd and 4th order
B. Transonic inverse design In this test case, the target pressure is obtained using CFD simulation of the flow over NACA 2412 airfoil at transonic conditions. ܯൌ ͲǤ͵ǡ ߙ ൌ ʹ . The objective function to be minimized is again the integration of the square of the pressure difference between the target pressure and the optimized pressure as expressed in Eq. (21). The 4th order optimization is based on the modified 4th order gradient evaluation strategy. Figure (14) shows the initial, target, and the optimized pressure distribution. The convergence history is shown in Fig (15); the 2nd and 4th order schemes reached their optimal shapes in about same number of iterations. Objective function dropped only three order of magnitudes before convergence stall; this is due to the high non-linearity in the target pressure distribution because of the existence of a strong shock wave in it; the noise in the pressure sensitivity
(a) 2nd order
(b) 4th order
Figure (14): Transonic NACA 2412 inverse design pressure distributions of the initial, target, and optimized airfoil profiles generated by the shock wave in the target pressure distribution doesn’t allow further convergence, whoever the gradient magnitude dropped four order of magnitudes from its initial value. Figures (16, 17) show that the optimal shapes for the two schemes differ by less than 10-4 of the chord length on the lower surface and less than 10-3 chord length on the upper surface (where the strong shock wave exist); both optimal shapes are in good agreement with NACA 2412, the maximum deviation is about 5% of maximum surface movement.
14
0
10
20
30
40
50
1.00E-02 2nd order 4th order
F
1.00E-03
1.00E-04
1.00E-05
iterations
Downloaded by Carl Ollivier Gooch on August 7, 2017 | http://arc.aiaa.org | DOI: 10.2514/6.2011-183
Figure (15): 2nd and 4th Order optimization convergence history.
(a) Upper surface
(b) Lower surface
Figure (16): The difference between the target profile and the optimized profiles, 2nd order and 4th order
Figure (17): Transonic inverse design optimal airfoil shapes
15
C. Drag minimization without lift constraint In this test case, minimization of the drag coefficient will be carried out with no lift constraint applied. The airfoil to be optimized is RAE2822 at transonic conditions, ܯൌ ͲǤ͵Ǥߙ ൌ ʹ , Fig (18) shows the initial solution with a strong shock wave standing at 70% chord.
Downloaded by Carl Ollivier Gooch on August 7, 2017 | http://arc.aiaa.org | DOI: 10.2514/6.2011-183
Geometric constraints are added to insure that there is no intersection between the airfoil upper and lower surfaces along the airfoil. Figure (19) shows the optimal shapes and the optimized pressure fields resulting from using 2nd and 4th order schemes.
Figure (18): Pressure contours of RAE 2822 at Mach 0.73 and angle of attack 2
Figure (19): Optimized RAE 2822
16
Downloaded by Carl Ollivier Gooch on August 7, 2017 | http://arc.aiaa.org | DOI: 10.2514/6.2011-183
a) Upper surface
b) Lower surface
Figure (20): Optimization surface displacements of the original RAE2822 surfaces Figures (19, 20) show that the difference between the 2nd and 4th order optimal profiles is notable on both upper and lower surfaces. The surface pressure distribution of the original RAE 2822 airfoil and of the optimized airfoil for 2nd and 4th order schemes is shown in Fig (21). Both schemes successfully produced a similar shock free pressure distribution but with different profiles. The original and optimized ܦܥare shown in Table (6). A drag reduction of about 50% is achieved by both schemes. The value of the CD of the 2nd order optimized airfoil is obtained from 4th order accurate CFD simulation over the optimized 2 nd order airfoil profile to eliminate the differences in discretization error in the final results.
CL nd
݈݂݅ݎ݅ܽ݀݁ݖ݅݉݅ݐ ܮܥ
CD
݈݂݅ݎ݅ܽ݀݁ݖ݅݉݅ݐ ܦܥ
0.865 0.765 0.0081 0.0046* 0.849 0.759 0.0099 0.0047 * obtained using 4th order CFD simulation of the 2nd order optimal shape Table (6): Aerodynamic coefficients of original and optimized RAE 2822 airfoil at transonic conditions
2 order 4th order
Figure (21): Pressure distribution comparison for the original and the optimized geometries
17
Figure (22) shows the convergence history of the optimization, both schemes reached their optimal solution after almost the same number of optimization iterations; the number of CFD simulations for the 2nd order scheme is 50 compared to 45 for 4th order scheme, yet the overall computational cost of the 2 nd order scheme is 40% less than the 4th order computations.
1
2
3
4
5
6
7
8
9
10
1.20E-02 1.00E-02
F
Downloaded by Carl Ollivier Gooch on August 7, 2017 | http://arc.aiaa.org | DOI: 10.2514/6.2011-183
8.00E-03
2nd order 4th order
6.00E-03 4.00E-03 2.00E-03
iteration
0.00E+00
Figure (22): 2nd and 4th order optimization convergence history.
D. Drag minimization with lift constraint This test case represents a typical optimization task required in aerospace industry, as it is required to minimize the drag while the lift is unchanged; therefore ܮܥwill be an aerodynamic constraint. The original RAE 2822 geometry will be used as a starting shape; the objective function to be minimized is;
F
C D 10 (C L C LC ) 2 ,
(24)
where C LC is the original lift coefficient of RAE 2822 at ܯൌ ͲǤ͵ܽ݊݀ߙ ൌ ʹ . In this test case both geometric and aerodynamic constraints are applied to avoid getting non-feasible airfoil geometry, while not affecting airfoil lift coefficient. The nonlinear constraint, the lift coefficient, is added as a penalty term in the objective function as shown in Eq. (24). Figure (23) show the optimized airfoil’s pressure distribution for both 2 nd and 4th order schemes. Both 2nd and 4th order schemes reached 99% of their objective function after 7 iterations; the 2nd order scheme becomes very slow to reach its optimal value. The 2 nd order scheme costs 112 CFD simulations to reach its optimum compared to 49 CFD simulations for the 4th order. Figure (26) shows a noticeable difference between the optimized profiles, including a notable larger nose radius and less aft chamber for the 4 th order scheme. A shock free geometry is obtained with weak compression waves on the airfoil upper surface. Drag is reduced by about 50% as shown in Table (7) while lift coefficient is about 1% higher than its original value.
CL
݈݂݅ݎ݅ܽ݀݁ݖ݅݉݅ݐ ܮܥ
2nd order 4th order
CD
݈݂݅ݎ݅ܽ݀݁ݖ݅݉݅ݐ ܦܥ
0.86465 0.87073 0.00812 0.00470* 0.84877 0.85309 0.00990 0.00510 * obtained using 4th order CFD simulation on the 2nd order optimal shape Table (7): Aerodynamic coefficients of original and optimized RAE 2822 airfoil at transonic conditions
18
Downloaded by Carl Ollivier Gooch on August 7, 2017 | http://arc.aiaa.org | DOI: 10.2514/6.2011-183
Figure (23): Surface pressure distribution, of the initial and optimized geometries
1 2 3 4 5 6 7 8 9 10 11 12 13 14 9.00E-03 7.00E-03
2nd order 4th order
5.00E-03 3.00E-03 1.00E-03
Figure (24): 2nd and 4th order optimization convergence history.
19
Downloaded by Carl Ollivier Gooch on August 7, 2017 | http://arc.aiaa.org | DOI: 10.2514/6.2011-183
Figure (25): Optimal shapes comparison, 2nd order, 4th order, and optimized profile by Brezillon and Gauger compared with the original RAE2822
a) Upper surface
b) Lower surface
Figure (26): 2nd and 4th order optimized profiles surface displacements Figures (25, 26) show a comparison between the optimized airfoil profiles and shows that 2nd and 4th order computations; there is a notable difference between both profiles. The 2nd order optimized profile Cd is 4 drag counts less than the 4th order profile drag coefficient. The same problem was tackled by Brezillon and Gauger [1]; they used the 2nd order solver MEGAFLOW (2nd order accurate) of the German Aerospace Center and obtained their optimal profile by controlling the camber line of RAE 2822 via 20 control points, comparing the optimal pressure distribution of our 2nd order computations shown in Fig (23) and that of Brezillon, Fig (27), shows that both solvers tend to accelerate the flow near the leading edge upper surface followed by a gradual deceleration till the trailing edge; in the other hand, the surface pressure on the lower airfoil surface changes only slightly from the original surface pressure distribution of the RAE2822. This similarity in the optimized pressure distribution suggests that whatever geometry parameterization technique is used, the surface pressure changes will be qualitatively similar.
20
Downloaded by Carl Ollivier Gooch on August 7, 2017 | http://arc.aiaa.org | DOI: 10.2514/6.2011-183
Figure(27): initial and optimal pressure distribution obtained by Brezillon and Gauger [1] (presented with permission)
VII. Conclusion We demonstrate constrained and unconstrained aerodynamic optimization using sequential quadratic programming with the use of adjoint method to compute the flow field solution sensitivity and the objective function gradient. The computations were based on a higher order finite volume method on unstructured grids. We took the advantage of evaluating the exact jacobian matrix to solve adjoint problem. The computed gradient based on the adjoint method is of excellent match with the corresponding finite difference gradient in subsonic flow for both 2 nd and 4th order schemes. For transonic flow, the 2nd order jacobian matches well with the corresponding finite difference gradient. On the other hand, the 4th order jacobian matches well only without a limiter. We have improved our previous approach for smooth parameterization of airfoil shapes, based on a least-squares fit of the parameters of two polynomials to a set of control points. Compared with using all mesh points as design variables, this approach reduces the size of the design space and eliminates oscillations in the shape. We use a semitorsional spring analogy to deform the mesh in the entire flow field when the surface shape evolves during optimization. It is used also to calculate the mesh sensitivity terms in the adjoint gradient. The subsonic inverse design test case shows that both 2nd and 4th order schemes reached their target geometry, the parameterized NACA 2412, after the same number of iterations. The same behavior is observed for transonic inverse design test case. This indicates that optimization convergence is independent of the order of accuracy of the spatial discretization. The drag minimization without lift constraint test case shows that both 2 nd and 4th order scheme reached their optimum after almost the same number of optimization iterations, the difference of the resulting optimal airfoil shape is noticeable. Both schemes reduced the drag by almost 50% of its original value but the lift is also gone down. The drag minimization with lift constraint test case showed that the 4 th order scheme was faster to reach its optimal shape with 8 optimization iterations which cost 49 CFD simulations, while the 2 nd order scheme took about 13 iteration costs 112 CFD simulations to reach its optimum but they reached 99% of their drag reduction after 7 iterations. However both schemes reached their optimum with almost the same wall clock run time; both schemes
21
reached different optimal shape. The 2nd order optimal profile produces drag coefficient four drag counts less than the 4th order profile. Based on all the test cases we presented, we conclude that the spatial discretization error doesn’t affect the number of optimization iterations so much for gradient based optimization. We intend to apply non gradient-based optimization techniques like genetic algorithm or pattern search to study the effect of CFD scheme order of accuracy on the final optimal shape in the near future.
VIII. Acknowledgements Authors would like to thank Natural Sciences and Engineering Research Council of Canada (NSERC) for funding this research. Authors would like also to thank Dr Joel Brezillon, German Aerospace Center (DLR) for allowing us to present his optimization results as a comparison to ours and for his valuable advices.
IX. References
Downloaded by Carl Ollivier Gooch on August 7, 2017 | http://arc.aiaa.org | DOI: 10.2514/6.2011-183
1
Brezillon, J. and Gauger, N.R. 2D and 3D aerodynamic shape optimisation using the adjoint approach. Aerospace Science and Technology, 2004, 8(8), 715-727. 2 Nadarajah, S. and Jameson, A. A comparison of the continuous and discrete adjoint approach to automatic aerodynamic optimization. AIAA paper, 2000, 667, 2000. 3 Jameson, A. Aerodynamic shape optimization using the adjoint method. VKI Lecture Series on Aerodynamic Drag Prediction and Reduction, von Karman Institute of Fluid Dynamics, Rhode St Genese, Belgium, 2003. 4 Jameson, A. Optimum transonic wing design using control theory. p. 253 (Springer Netherlands, 2003). 5 Jameson, A. and Kim, S. Reduction of the adjoint gradient formula in the continuous limit. AIAA paper, 2003, 40, 2003. 6 Ollivier-Gooch, C. and Van Altena, M. A high-order-accurate unstructured mesh finite-volume scheme for the advection-diffusion equation. Journal of Computational Physics, 2002, 181(2), 729-752. 7 Nejat, A. and Ollivier-Gooch, C. A high-order accurate unstructured finite volume Newton-Krylov algorithm for inviscid compressible flows. Journal of Computational Physics, 2008, 227(4), 2582-2609. 8 Michalak, C. and Ollivier-Gooch, C. Accuracy preserving limiter for the high-order accurate solution of the Euler equations. Journal of Computational Physics, 2009, 228(23), 8693-8711. 9 Azab, M.B., and Ollivier-Gooch C. F. Higher Order Two Dimensional Aerodynamic Optimization Using Unstructured Grids and Adjoint Sensitivity Computations. 48th AIAA Aerospace sciences meeting 4-7Jan 2010 Orlando FL. 10 Zhu, C., Byrd, R.H., Lu, P. and Nocedal, J. Algorithm 778: L-BFGS-B: Fortran subroutines for large-scale bound-constrained optimization. ACM Transactions on Mathematical Software (TOMS), 1997, 23(4), 550-560. 11 Amir, N. and Carl, O.-G. A high-order accurate unstructured finite volume Newton-Krylov algorithm for inviscid compressible flows. J. Comput. Phys., 2008, 227(4), 2582-2609. 12 Venkatakrishnan, V. Convergence to steady state solutions of the Euler equations on unstructured grids with limiters. Journal of Computational Physics, 1995, 118(1), 120-130. 13 Michalak, K. and Ollivier-Gooch, C. Limiters for Unstructured Higher Order Accurate Solutions of The Euler Equations. AIAA Forty-Sixth Aerospace Sciences Meeting, 2008.
22