Gradient-Based Aerodynamic Optimization with the ...

5 downloads 476 Views 7MB Size Report
transonic airfoil optimization problem and a 3D RANS transonic wing optimization problem. ... Trainee in Aerodynamic Optimization, Tools & Simulation Group, ...
Gradient-Based Aerodynamic Optimization with the elsA Software G. Carrier1, D. Destarac2,A. Dumont3, M. Méheut4, I. Salah El Din5, J. Peter6 and S. Ben Khelil7 Onera, The French Aerospace Lab, Meudon, F-92140, France J. Brezillon8, M. Pestana9 AIRBUS Operations SAS, Toulouse, F-31060, France

This paper describes the work performed by ONERA and Airbus to solve several aerodynamic optimization problems proposed in 2013 by the AIAA Optimization Discussion Group (ADODG). Three of the four test cases defined by this group have been addressed, respectively a 2D invicid, non-lifting, transonic airfoil optimization problem, a 2D RANS transonic airfoil optimization problem and a 3D RANS transonic wing optimization problem. All three problems have been investigated using local, gradient-based, optimization techniques and the elsA[1][2] CFD software and its adjoint capability. Through these three optimization exercises, several generic issues introduced by aerodynamic gradient-based optimization have been investigated. Among the investigated aspects are the impact of the geometry parameterization (nature and dimension), of the accuracy of the gradient calculation method, optimization algorithm and presence of constraints in the optimization problem.

Nomenclature Cp CD CDp CDf CDw CDvp CL CM cref d.c. Ma Re AoA f g 1 2 3 4 5 6 7 8 9

= = = = = = = = = = = = = = =

pressure coefficient total drag coefficient pressure drag coefficient friction drag coefficient wave drag coefficient viscous pressure drag coefficient lift coefficient pitching moment coefficient chord reference drag counts (0.0001) Mach number Reynolds number Angle of attack objective function inequality constraint

Research Engineer, Applied Aerodynamics Dept., [email protected]. Research Engineer, Applied Aerodynamics Dept., [email protected]. Dr. Research Engineer, Applied Aerodynamics Dept., [email protected]. Dr. Research Engineer, Applied Aerodynamics Dept., [email protected]. Dr. Research Engineer, Applied Aerodynamics Dept., [email protected]. Dr. Research Engineer, Numerical Simulation and Aeroacoustic Dept., [email protected]. Dr. Research Engineer, Applied Aerodynamics Dept., [email protected]. Aerodynamic Optimization Engineer, Tools & Simulation Group, [email protected] Trainee in Aerodynamic Optimization, Tools & Simulation Group, [email protected]. 1 American Institute of Aeronautics and Astronautics

RANS SLSQP KKT

T

= Reynolds Averaged Navier-Stokes = Sequential Least-Square Quadratic Programming = Karush-Kuhn-Tucker

I. Introduction

he use of CFD in the aerodynamic shape design of transport aircraft has increased steadily and rapidly thanks to the improvement of the robustness and accuracy of CFD computations, and the reduction of their cost. Building-up on the progresses of CFD, numerical optimization techniques have been introduced several decades ago to support the aerodynamic design process. Techniques such as the adjoint method were introduced to compute efficiently the aerodynamic sensitivities, in combination with gradient-based optimization methods. Such advanced numerical methods have been reported to be used successfully, even in industry for their first use [3]. However, it is fair to recognize that aerodynamic design optimization is still not a mature, but fragile, discipline which has not penetrated industry as CFD did. One explanation to this situation is that aerodynamic optimization is a discipline at the crossroads of several scientific fields such as geometry modelling, numerical simulation, applied mathematics, computer science. Therefore it inherits the pitfalls of each of them, among which the difficulty to parameterize the geometry with sufficient flexibility, generate high-quality computational meshes for the deformed geometries, perform CFD computations that are both accurate and robust in these meshes, and finally to perform optimization in high dimensional space of functions prone to numerical noise and inacuracies. Generally speaking, aerodynamic optimization requires to set-up and run a complex system which is an assembly of several software components: parameterization, computational meshes deformation or re-generation, CFD simulation, (optionally) sensitivity analysis by adjoint method, post-processing of CFD results and finally, on top of that, an optimization algorithm to drive the complete system. This complexity explains the weaknesses and limitations in current design practices, the two major being: • the lack of flexibility in parameterizing the geometry and generating deformed meshes; this usually limits the diversity of design geometries that can be explored by the optimizer; • the lack of robustness, since many reasons can prevent an optimization process to produce good results that can compete with what an expert can produce by “manual design”; including failure in the CFD analyses or failure of the optimization algorithm to exploit the potential of the design space; • the optimization problem formulation from a designer point of view. For gradient-based optimization using the adjoint technique, these weaknesses and limitations can be even more stringent. For these reasons, the need to establish reference aerodynamic optimization test cases that can serve to validate methods and monitor the progress achieved in this discipline was identified (see Epstein et al. [4]). This motivated the creation of an AIAA Discussion Group on Aerodynamic Design Optimization (AIAA-ADODG) which defined and proposed, mid-2013, four optimization benchmark problems. The main objective of this paper is to provide a fair evaluation of the status of gradient-based aerodynamic optimization capability based on the adjoint technique and using a large, multi-purpose, industrial CFD code, namely the elsA CFD software. This is attempted by addressing three of the four optimization problems proposed by the AIAA-ADODG. This paper is organized in four sections: the first section gives a general description of the tools and methods that have been used for these exercices and are common to all three cases and the three next sections document separately the work performed to solve each optimization problem and the results obtained are described and analysed.

2 American Institute of Aeronautics and Astronautics

II. General Description of Methods and Tools This section gives a general description of the methods and tools used to solve all three optimization problems. The details regarding the methods, tools and their applications, which are specific to the test case are reported in the next sections. A. Overall Optimization System All optimizations presented in this paper have been performed with an optimization system which is an assembly of two main components, namely an “optimizer” and a “analyzer”, as depicted in Figure 1. The optimizer drives the optimization process by iteratively requiring the analysis of new design candidates which are described by a vector ! ! ! ! ! ! ! of design variables, α , and analyzing the results of the analyzer for this design: f (α ), g i (α ), ∇f (α ), ∇g i (α ) where

(

! ∇f

)

, the gradient of the f denotes the objective function to be minimized, g i , the i-th constraint function and ! function f with respect to design variables α . The optimizer may or may not (usually not) require the evaluation of all information for each design (for instance the gradient information is not necessary for all designs) and it is the responsibility of the analyzer to produce and return the information requested by the optimizer (and only it). The analyzer actually embeds different software components and is in charge of sequencing all the necessary steps necessary to evaluate the aerodynamic performance of a given design. Typically, depending whether the gradients are needed or not, the analyzer will perform: a mesh deformation, CFD calculation with elsA, post-processing with ffd72 and eventually a CFD-adjoint calculation (one for each function f, gi) with the Elsa/Opt solver[3]. The analyzer is implemented in Pyhton language.

Figure 1. Sketch of the optimization system. B. CFD Code 1. Direct solver All aerodynamic computations in this study were performed with the elsA CFD software. elsA is a multi-purpose CFD code, developed by ONERA and CERFACS and used in industry (including Airbus, Snecma, Eurocopter), which is used there to solve the steady compressible, 2D or 3D, Euler or RANS equations in multiblock structured meshes using a finite volume, cell-centered discretization. Although elsA enables the use of totally or partially coincident matches, or even Chimera interpolation, between mesh blocks, all applications of this paper used only conventional fully-matching multiblock meshes. The numerical methods used to converge the CFD solution to its steady state solution are based on a backwardEuler time stepping with a LUSSOR implicit stage. A multigrid technique is used to accelerate the convergence to steady state. The space discretisation of the convective fluxes is based either on the centered JST scheme with the addition of (first and third order) artifical viscosity, or on the Roe-Harten upwind scheme with the Van-Albada fluxes limiter. For the RANS simulation, the Spalart-Allmaras turbulence model has been used and the discretization of the corresponding turbulent transport equation relied on the first-order Roe’s scheme. 3 American Institute of Aeronautics and Astronautics

2. Adjoint solver The adjoint capability of the elsA software [5][6] has been used to compute the gradient of aerodynamic coefficients with respect to all design variables. It is capable to solve the discrete adjoint equations of either the Euler or RANS equation, with frozen eddy viscosity assumption (more robust) or with the complete linearisation of the Spalart-Allmaras turbulence model. A memory-efficient, iterative, Newton algorithm is used to solve the adjoint equations. If needed, several options are implemented to increase the robustness of the adjoint resolution, including the addition of numerical dissipation (similar to the added dissipation of the centered scheme used to solve the direct equation) and a Residual Projection Method. The adjoint solver provides, as final results, the sensitivity of the aerodynamic function with respect to the coordinates of any point of the mesh. C. Aerodynamic post-processing The aerodynamic performance (i.e. aerodynamic coefficients) are calculated from the converged CFD solution using either the near-field or the far-field drag extraction post-processor ffd72 [7][8][9]. This later enables accurate drag evaluation from CFD solution and a drag breakdown into its lift-induced, viscous and wave components. Furthermore, it also provides the sensitivity of any aerodynamic coefficients with respect to the mesh point coordinates and cell-centered or cell-vertex flow variables. These partial sensitivities are needed for the adjoint technique to compute the gradient (complete sensitivities) of these coefficients. D. Optimization Methods 1. Optimization algorithms and software All optimizations presented in this paper are local, gradient-based optimizations. Several gradient algorithms have been used and, to some extent, compared: • the Fletcher-Reeves Conjugate Gradient method implemented in CONMIN [11][12] and DOT [13] algorithms; • the modified method of feasible directions of Vanderplaas [11][12]; • the SLSQP [14] algorithm (through pyOpt [15] and NLopt [16]), which is a SQP-like algorithm with a BFGS update formula for approximating the inverse of the Hessian matrix of the objective function. 2. Optimization stopping criteria and convergence verification The criteria used to stop the optimizations presented in this paper are the native criteria implemented in the different algorithms that were used. Typically, the gradient algorithms used for these studies stop when it did not succeed to improve the objective function for n consecutive gradient iterations (after n consecutive, unsuccessful line-searches). All optimization performed with the DOT package were stopped after n=2 unsuccessful linesearches. To evaluate the level of convergence of the optimization process, the same analysis method that was presented in Error! Reference source not found., based on the Karush-Kuhn-Tucker conditions of constrained problem optimality [17][19] is used for these studies. At convergence of the constrained optimization problem, the following equation is satisfied: n ! ! ∇f = ∑ λ i ∇g i

(Eq. 1)

i =1

Where f is the objective function, gi the active constraints at the optimization runs, λi the associated Lagrange multipliers and n the number of active constraints. The convergence analysis method consists, at each iteration of the

!

gradient method, in projecting ∇ f onto the subspace spanned by the gradient of all active constraints. Noting

! Pg (∇f )

this projection the analysis then consists in monitoring the angle between

! ! ∇f and Pg (∇f ) as well as

the values of λi defined by: n ! ! Pg (∇f ) = ∑ λi ∇g i

(Eq. 2)

i =1

If the final solution is a local minimum this angle should be exactly equal to zero and λi correspond to the Lagrange multipliers. 4 American Institute of Aeronautics and Astronautics

In the following sections, the evolution during the optimization runs of the norm of the difference and “angle”

!

between ∇ f

!

and Pg (∇f ) are presented. Note that in classical projected gradient descent method, it is

! ! ∇f − Pg (∇f ) which is used as descent direction.

III. Case 1: 2D Euler Optimization of NACA0012 Airfoil The first problem consists in a drag minimization of the non-lifting NACA0012-AIAAOPT transonic airfoil. The flow is modeled through the Euler equations for a Mach number of 0.85. A constraint is imposed to the geometry to completely embed the initial NACA0012-AIAAOPT airfoil geometry. A. Optimization and Numerical Strategies The symmetric NACA0012-AIAAOPT airfoil has been defined in the common test case geometry defined by the equation recalled in equation (Eq. 3). It was optimized using local optimization strategies in order to solve the problem formulated in equation (Eq. 4). The free stream flow conditions are frozen at a Mach number of 0.85 and zero angle of attack. The drag CD in such case consists in physical wave pressure drag and spurious numerical drag. The following study comprises three main phases. To establish a preliminary optimum airfoil family set, classical finite differences (FD), gradient-based, optimizations have been carried out first. Then, in order to be able to increase the research design space dimension, adjoint based optimizations have been performed. Finally, the reference geometry as well as the best performing optimized airfoils have been analyzed thoroughly. The geometrical minimum thickness constraint given in equation (Eq. 3) is implicitly taken into account in the choice of the parameterization design variables ranges definition. Consequently, the Fletcher-Reeves conjugategradient descent algorithm is activated within the DOT suite.

∀x ∈ [0,1],

y NACA0012 ( x) = ±0.6(0.2969 x − 0.1260 x − 0.3516 x 2 + 0.2843x 3 − 0.1036 x 4 )

Minimize CD

(Eq. 3)

(Eq. 4)

subject to: y ≥ yNACA0012 ∀x ∈ [0,1] Three different parameterizations have been used (see Figure 2), all of which are based on deformation applied to the baseline, NACA0012-AIAAOPT airfoil. First, a Bézier curves control points parameterization has been tested in all the optimization experiments. More specifically, the one proposed by Vassberg in [20] has been used. It consists in a hierarchy of embedded parameterizations obtained by degree elevation from a simple 5-control points Bézier approximation of the NACA0012-AIAAOPT. For the FD gradient based optimization a B-Spline parameterization has been explored whereas for the adjoint based gradient optimization a full parameterization was tested for which each mesh point y-coordinate was considered as a design variable.

5 American Institute of Aeronautics and Astronautics

Figure 2. Bézier and B-Spline parameterizations The performance assessment in the optimization process has been carried out using automated python based analysis suite calling the elsA software to solve the Euler equations. The airfoil drag was then calculated from the converged solution by either near-field or far-field post-processing using the ONERA ffd72 Error! Reference source not found.Error! Reference source not found. drag breakdown software. Two families of 2D meshes have been generated and are illustrated in Figure 3. For the FD gradient based optimizations a C-type structured mesh topology has been built using Rizzi mesher [22]. On the other hand, for adjoint gradient based optimization an Otype mesh derived from those defined by Vassberg and Jameson Error! Reference source not found. have been used. In both cases three mesh density levels have been considered: coarse, medium and fine. The dimensions of the meshes are summarized in Table 1.

Coarse Medium Fine

C-type (nixnj)

O-type (nc x nc)

316x124 632x256 1,264x512

256x256 512x512 1,024x1,024

Table 1. C- and O-type mesh dimensions.

Figure 3. Structured meshes used for optimization (upper: C-type; lower: O-type). 6 American Institute of Aeronautics and Astronautics

In the present study the coarse meshes have been used in the optimization runs to have short CPU time response to a single evaluation whereas the Vassberg and Jameson like fine meshes have been retained for the final performance evaluation. The calculations performed during the optimization used the afore mentioned upwind Roe’s scheme. A V-cycle multigrid approach is chosen to accelerate convergence and the system is solved using a 4-cycles scalar LU-SSOR implicit resolution. For stability and robustness reasons, a Harten entropy correction is applied and is set to 0.2 for the C-type mesh and 0.15 for the O-type mesh. The number of iterations of the CFD calculation is fixed during optimization process and has been carefully chosen after analyzing the convergence of the CFD solver on the NACA0012-AIAAOPT airfoil for both types of mesh. Convergence of the CFD residuals to machine epsilon accuracy could be achieved on the NACA0012-AIAAOPT in both meshes (see Figure 4). During the optimization, the number of CFD iterations has been fixed to 1000, resulting in a CPU time of about 70 s on 8-processors (Intel(R) Xeon(R) CPU [email protected]). This allowed a convergence of the drag coefficient to an accuracy better than 10-5 d.c. (or 10-9). The same convergence study has also been performed for the adjoint equations resolutions and the number of Newton iterations used for the resolution of the Euler adjoint equation was fixed to 1 000. This, again, allowed to decrease the residuals of the adjoint equations nearly to machine accuracy limits and resulted in a CPU time necessary to solve the adjoint equations of 80 s. The adjoint equations are solved exactly, without any added artificial dissipation.

800

102

Residual - Rho CD Adjoint Residual - Rho

100

600 10-4 10

500

-6

10-8 10

CD (d.c.)

Residuals (Rho)

10

700

-2

400

-10

300 10-12 0

1000

iteration

2000

200 3000

Figure 4. CFD and adjoint resolution convergence. NACA0012-AIAAOPT airfoil, elsA/Roe Scheme. At the far-field mesh boundaries, non reflection conditions have been imposed on the outer bound and inviscid wall at the airfoil skin. Preliminary studies on the C-type mesh (Vassberg optimized geometry) have shown the potential appearance of non symmetric solutions. Such observation has lead to impose a symmetry condition on the mesh line originating from the airfoil trailing-edge and extending straight downstream, hence forcing the flow symmetry. This choice was meant to increase the robustness of the analyzer and avoid the possibility of non physical solutions. However the authors acknowledge that physical non symmetric solutions may exist under the condition of fully (all residuals variation under machine precision) converged calculations. The optimum verification, mesh convergence study and final airfoil comparisons have been performed using the Jameson’s centered scheme with artificial dissipation coefficients k2 and k4 respectively set to 0.5 and 0.008, in the O-type meshes family. B. Finite Differences-Based Gradient Optimizations In the first stage of this study, multiple FD gradient based optimization experiments have been carried out in order to evaluate the possible gain using a classical approach based on a restrained design space described by a few design variables. All of these have been run using DOT unconstrained descent algorithm (Fletcher-Reeves conjugate-gradient algorithm). Different effects have been studied among which the FD step size, the FD gradient computation centering, the technique for pressure drag extraction (i.e. near- or far-field extraction as well as drag accuracy). The modification of the starting point have also been looked at. 7 American Institute of Aeronautics and Astronautics

Four parameterizations based on Bézier and B-Spline control points displacements have also been implemented and are illustrated in Figure 2. The first one corresponds to Bézier based control points placed at the locations proposed by Vassberg in [20] to describe the BEZ-4 geometry using 6 control points parameterization. The second parameterization is based on the same control point locations using a B-Spline model. An alternative control point location distribution has been proposed and has been determined from an a posteriori analysis of Vassberg and Jameson optimization study [20]. Active and frozen control points are defined in Figure 2. The active set corresponds to the design variables used for the optimization whereas the frozen ones are set to a zero displacement constraint. Finally, a degree elevation has been applied from an optimum obtained with 6 B-Splines control points and has lead to the definition of a 12 control point parameterization. The variation range of the control point displacements has been defined so as to maintain the 12% maximum airfoil relative thickness. We recall here that only deformation functions are parameterized. Every optimizations histories shown below has reached its convergence criteria before the maximum evaluations requested. The most significant results are discussed here. Parameterization 6 B-Spline CPs 6 B-Spline OPT CPs 12 B-Spline CPs

Frozen CP vector x location (zero displacement imposed) {0.0;0.2;0.3;0.5;1.0}

Active CP vector initial coordinates {(0.0,0.0);(0.05,0.0);(0.60,0.0);(0.75,0.0);(0.85,0.0);(0.95,0.0)} {(0.0, 0.018879);(0.05,0.0);(0.60, 0.009658); (0.75, 0.017639);(0.85, 0.027322);(0.95, 0.027117)} {(0.0,0.014159);(0.0125, 0.014159);(0.05625, 0.002359); (0.49167, 0.000804);(0.55, 0.004829);(0.604167, 0.009518); (0.675, 0.013649);(0.74583, 0.017781);(0.8, 0.022481); (0.854167, 0.026489);(0.925, 0.0271685);(0.9625, 0.020337)}

{0.0;0.2;0.3;0.5;1.0} {0.0;0.125;0.19583;0.25;0.3083;0.4;1.0}

Table 2. B-Spline control points locations.

(a) Parameterization deformation function effect @ Vassberg CP location for 6 Bézier CP parameterization case.

(b) Parameterization deformation function effect @ ONERA CP location.

(c) Drag prediction effect - 6 B-Splines parameterization @ ONERA CP location.

(d) B-Spline degree elevation effect.

Figure 5. Optimization history for NACA0012-AIAAOPT optimization problems formulation effects. FD gradients, B-Splines parameterization. 8 American Institute of Aeronautics and Astronautics

As shown in Figure 5-(a), the nature of the deformation function is critical. Indeed when shifted from Bézier to B-Splines, the drag drops from 350 down to 150 drag counts. However, the location of the control points has also a dramatic impact as illustrated in Figure 5-(b). The Bézier based parameterization performs far better than in the (a) case and a 200 drag counts performance is reached. The B-Spline succeeds in reaching values below 100 d.c. This behavior can be explained by the fact that B-Splines are more suited to achieve local deformation and the performance is very sensitive to local curvature variations. Additionally, Bézier control polygon can be very extended, sign that a combination of very large displacements, positive or negative can lead to small geometrical modification. The phenomenon consequently observed is that some variables reach an extremum of their allowed variation range and lead to a saturation of the optimization process. The impact of the technique for calculating the function of interest is illustrated in Figure 5-(c), where the optimization using near-field drag prediction is compared to the one using the far-field one. The resulting optima both evaluated with the far-field evaluator gives 91.94 d.c. for the near-field approach against 88.44 d.c. for the farfield one. The discrepancy is not important but shows a slight advantage of using far-field drag. No clear advantage on the optimization convergence speed can be drawn in this case. The best configuration obtained with a 6 control point parameterization is the one using B-Spline at the specific location provided in Table 2. To improve the design a degree elevation has been performed on the B-Spline model providing an equal weighted NURBS of 3rd polynomial degree model. Starting from the 6 DVs optimum, a second optimization has been performed with this new enriched parameterization which improved the performance of 84.75 d.c. C. Adjoint-Based Gradient Optimizations The first stage of the study presented in the previous paragraph showed the strong influence of the parameterization on the optimum results and the interest for high-dimensional parameterization. Therefore a second stage was conducted using adjoint-based gradient calculation in order to enable the use of higher dimensional parameterization at reasonable cost. The initial objective of this second stage was to widely investigate the impact of the parameterization dimension, from few parameters used to deform the baseline NACA airfoil using Bézier curve parameterization up to a “full parameterization” where all mesh points are used as design variables, authorizing a vertical displacement of each of them (except for the leading and trailing edge points; see section §III.A). Such a “full parameterization” has been used with success on this test case by Vassberg, Jameson et al. [20]. All CFD calculations presented in this section are conducted using the 256x256 O-type mesh and the Roe scheme with a Harten correction coefficient of 0.15. All optimizations were performed with the pressure drag CDp as the objective function. The adjoint solver of the elsA code is used to compute the sensitivities of CDp with respect to the chosen design variables. 1. Verification of the adjoint-based gradients; Gradient smoothing Before performing the adjoint-based optimizations, a verification of the accuracy of the adjoint sensitivity was conducted. The sensitivity of the pressure drag coefficient CDp with respect to the vertical displacement of all mesh points on the airfoil calculated by the adjoint method is compared to finite-difference evaluations (first order) of the same sensitivities in Figure 6. This study showed that accuracy of the adjoint sensitivities matched almost exactly the finite-difference evaluation on each mesh point. Note that a step-study for the finite-differences proved that the finite difference sensitivity were difficult to establish since the evaluated sensitivities turned out to be very sensitive to the value of the step used in the FD, as it is shown by the green lines in Figure 6. A value of 10-6 for this FD step appeared to be adequate and provided an excellent match with the adjoint sensitivities. In such situation, the adjoint sensitivities can be considered as more accurate than the FD. As it will be reported in the next sections, the use of the unfiltered sensitivities directly calculated by the adjoint method with the “full parameterization” did not yield good convergence of the gradient optimizers which were tested. Therefore, as proposed by Jameson[22], a smoothing of the adjoint gradient was performed based here on a simple Laplacian smoothing process, according to the following iterative process: Repeat : for all mesh point i (TE