and recall the 2D Euler equations (including Rankine-Hugoniot relations). ...... 17Hirsch, C., Numerical computation of internal and external flows, John Wiley ...
AIAA 2008-171
46th AIAA Aerospace Sciences Meeting and Exhibit 7 - 10 January 2008, Reno, Nevada
2D Euler shape design on non-regular flows using adjoint Rankine-Hugoniot relations Antonio Baeza∗ Madrid Institute for Advanced Studies in Mathematics, Madrid, 28049, Spain
Carlos Castro† Downloaded by STANFORD UNIVERSITY on February 16, 2014 | http://arc.aiaa.org | DOI: 10.2514/6.2008-171
Universidad Polit´ecnica de Madrid, Madrid, 28040, Spain
Francisco Palacios‡ Madrid Institute for Advanced Studies in Mathematics, Madrid, 28049, Spain
Enrique Zuazua§ Universidad Aut´ onoma de Madrid, Madrid, 28049, Spain Optimal Shape Design (OSD) aims at finding the minimum of a functional by controlling the Partial Differential Equation (PDE) modeling the flow using surface (domain boundaries) deformation techniques. As a solution to the enormous computational resources required for classical shape optimization of functionals of aerodynamic interest, one of the best strategies is to use methods inspired in control theory. To do this, one assumes that a given aerodynamic surface is an element that produces lift or drag by controlling or modifying the flow. One of the key ingredients in the application of control methods relies on the use of the adjoint system techniques to simplify the computation of gradients. In this paper we will restrict our attention to optimal shape design in 2D systems governed by the Euler equations with discontinuities in the flow variables (an isolated normal shock wave). We first review some facts on control theory applied to optimal shape design, and recall the 2D Euler equations (including Rankine-Hugoniot relations). We then study the adjoint formulation, providing a detailed exposition of how the derivatives of functionals may be obtained when a discontinuity appears. Further on, adjoint equations will be discretized and analyzed and some novel numerical experiments with adjoint RankineHugoniot relations will be shown. Finally, we expose some conclusions about the viability of a rigorous approach to the continuous Euler adjoint systems with discontinuities in the flow variables.
I.
Introduction
n last decades, OSD has evolved very close to the Computed Fluid Dynamics (CFD) developments. By the Ianalysis eighties, advances in computer hardware and algorithms had made feasible to develop accurate and efficient tools for inviscid flows. On the other hand, some of the groundbreaking works in Control Theory 1
are due to J.-L. Lions.2 Several years later O. Pironneau investigated the problem of optimum shape design for elliptic equations using control theory.3 In the late eighties A. Jameson4 was the first to apply these techniques to the Euler and Navier-Stokes equations in the field of aeronautical applications. At the beginning of the XXI century new techniques as the Reduced Gradient Formulation5 and the Systematic Approach6 made a significant simplification to the continuous adjoint implementation on unstructured meshes. ∗ Research
Scientist, iMath Project. Professor, Departamento de Matem´ aticas e Inform´ atica, ETSI Caminos, Canales y Puertos. ‡ Director of Technological Innovation, IMDEA-Mathematics, AIAA Member. § Professor, Departamento de Matem´ aticas, Facultad de Ciencias. Director, IMDEA-Mathematics. † Assistant
1 of 16 American Institute Aeronautics Copyright © 2008 by the American Institute of Aeronautics and Astronautics, Inc. All of rights reserved. and Astronautics
Downloaded by STANFORD UNIVERSITY on February 16, 2014 | http://arc.aiaa.org | DOI: 10.2514/6.2008-171
In gradient-based optimization techniques, the goal is to minimize a suitable cost or objective function (drag coefficient, deviation from a prescribed surface pressure distribution, etc.) with respect to a set of design variables (defining, for example, an airfoil profile or aircraft surface). Minimization is achieved by means of an iterative process which requires the computation of the gradients or sensitivity derivatives of the cost function with respect to the design variables. Dealing with gradients computation of an objective function defined in smooth inviscid flows, the perturbation of the flow field variables can be calculated from a linearization of the governing equation (or using a more elaborate technique like the adjoint state). However, this is not valid in the neighborhood of flow discontinuities. Several options had been proposed by some authors, Iollo and Salas,7 Giles and Pierce8 or Matsuzawa and Hafez.9 Currently, most existing works ignore the shock motion sensitivity supposing that shocks are smeared using numerical dissipation. However, this paper is intended to clarify that accurate treatment of shock waves could be essential. Aerodynamical applications of optimal shape design10 in systems governed by PDEs are formulated on a fluid domain Ω, containing a compressible fluid, usually air, delimited by disconnected boundaries divided into a “far field” Γ∞ and one or more solid wall boundaries S, usually airplane surfaces (see Fig. 1). This kind of design problems are aimed at minimizing a functional J of the flow defined on the boundaries S, Γ∞ , or in a subdomain ω ⊂ Ω. From now on we will restrict ourselves to the analysis of optimization problems involving functionals defined on the solid wall S, whose value depends on the flow variables U obtained of the corresponding fluid flow equations. In this context, the generic optimization problem can be succinctly stated as follows: find S min ∈ Sad such that J(S min ) = min J(S), S∈Sad
(1)
where S min is the sought optimal surface, belonging to the set Sad of admissible boundary geometries and Z J(S) = j(U ) ds, (2) S
is the objective function, whose evaluation is subject to the resolution of the flow equations to obtain U .
Figure 1. Classical optimal design problem.
Let us consider an arbitrary (but small) perturbation of the boundary S which, without loss of generality, can be parameterized by an infinitesimal deformation of size δS along a outward pointing unitary normal vector ~nS : S 0 = {~x + δS (~x) ~nS (~x) , ~x ∈ S} . (3) Assuming a regular flow solution U , the variation of the functional J under the deformation can be evaluated as11 Z Z δJ (S) = j (U ) ds + j 0 (U ) δU ds, (4) δS
S
where the first term, which stems from the displacement of the boundary, takes the form Z Z j (U ) ds = (∂n j − κj) δS ds, δS
(5)
S
~ is the normal derivative of j (U ) and κ is the curvaturea of S. The second term in (4) where ∂n j = ~nS · ∇j is the contribution due to infinitesimal changes in the flow solution induced by the deformation. ˛ ˛ ˛ ˙ y−y˙ x¨ ˛ a plane curve given parametrically as f (η) = (x(η), y(η)) the curvature is defined as κ = ˛ 2x¨ ˛, where the dot 3/2 2 (x˙ +y˙ ) denotes differentiation with respect to η. a For
2 of 16 American Institute of Aeronautics and Astronautics
Downloaded by STANFORD UNIVERSITY on February 16, 2014 | http://arc.aiaa.org | DOI: 10.2514/6.2008-171
On the other hand, non-regular solutions of the flow variables are the most common in aeronautical applications (in transonic and supersonic flow regime). If the body immersed in the fluid has an aerodynamically sharp shape,12 then the discontinuity usually touches the body surface.13 In these cases a discontinuity (sonic shock wave) along a regular curve Σ must be considered (see Fig. 2) and the Rankine-Hugoniot relations must be added to the Euler equations to correctly account for the presence of the shock.
Figure 2. Optimal design problem with a shock wave Σ.
When taking flow discontinuities into account the previous computation of the derivative of the functional fails and has to be modified by including the effect due to the sensitivity of the shock location with respect to shape deformations.14 Let xb = Σ ∩ S and x∞ = Σ ∩ Γ∞ , that we assume to be unique points. Then the expression for δJ is Z Z δJ (U ) = j (U ) ds + j 0 (U ) δU ds − [j(U )]xb δΣ(xb ) − [j(U )]xb (~nS · ~nΣ ) δS(xb ). (6) δS
S\{xb }
The most expensive terms (in terms of time and required computational resources) are those which involve the computation of δU and δΣ. These can be obtained by solving the linearized flow equations (together with the linearized Rankine-Hugoniot conditions) once per each independent deformation (design variable). If the design space is large, as is the case in real applications, the computational cost is prohibitive. It is then convenient to switch to the control theory approach, which reduces significantly the computational cost of getting the gradients, using the adjoint or dual formulation of the shape design problem.
II.
2D Euler equations and Rankine-Hugoniot relations
Ideal fluids are governed by the Euler equations,13, 15 which express the conservation of mass, momentum (with null viscosity) and energy. In the aeronautical framework, these equations are considered in a domain Ω delimited by disconnected boundaries divided into “far field” Γ∞ and solid wall boundaries S. The most common way to pose the Euler equations is in conservative form: ~ · F~ = 0, ∂t U + ∇
in Ω,
(7)
where U T = (ρ, ρvx , ρvy , ρE) are the conservative variables and F~ = (Fx , Fy ) is the convective flux vector ρvy ρvx ρvx2 + P ρvx vy Fx = (8) , Fy = , ρvx vy ρvy2 + P ρvx H ρvy H where ρ is the fluid density, ~v = (vx , vy ) is the flow speed in a Cartesian system of reference, E is the total energy, P the system pressure and H the enthalpy. The system of equations (7) must be completed by an equation of state which defines the thermodynamic properties of the fluid. For a perfect gas: ¸ · 1 2 (9) P = (γ − 1) ρ E − |~v | , 2 where γ ≈ 1.4 for standard air conditions, and the identity ρH = ρE + P holds.
3 of 16 American Institute of Aeronautics and Astronautics
On the other hand, the Euler equations (7) have to be completed with the following boundary conditions ~v · ~nS = 0,
on S,
(10)
where ~nS is an inward-pointing unit vector normal to S, and at the “far field” boundary Γ∞ boundary conditions are specified for incoming waves, while outgoing waves are determined by the solution inside the fluid domain.16 Inviscid flows described by the Euler equations can develop discontinuities (shocks or contact discontinuities) due to the intersection of flow characteristics. If the shock wave is perpendicular to the flow direction it is called a normal shock. When this occurs, the Rankine-Hugoniot conditions relate the flow variables on both sides of the discontinuity. For a shock located at Σ which propagates with speed s, these relations are h i F~ · ~nΣ − s [U ]Σ = 0, (11)
Downloaded by STANFORD UNIVERSITY on February 16, 2014 | http://arc.aiaa.org | DOI: 10.2514/6.2008-171
Σ
where ~nΣ = (nΣx , nΣy ) is the unit vector normal to the curve Σ pointing in the same direction as the shock speed s, and [A]Σ represents the jump of A across the discontinuity curve Σ, that is to say, [A]Σ = A+ − A− . Using the Euler equations, the Rankine-Hugoniot relations can be written as [ρ~v · ~nΣ ]Σ − s [ρ]Σ = 0, [(ρ~v · ~nΣ )vx + P nΣx ]Σ − s [ρvx ]Σ = 0, (12) [(ρ~v · ~nΣ )vy + P nΣy ]Σ − s [ρvy ]Σ = 0, [Hρ~v · ~nΣ ]Σ − s [ρE]Σ = 0. If a steady problem is considered, the discontinuity velocity vanishes and then (12) is simplified to [ρ~v · ~nΣ ]Σ = 0, [vx ]Σ ρ ~v · ~nΣ + [P ]Σ nΣx = 0, (13) [vy ]Σ ρ ~v · ~nΣ + [P ]Σ nΣy = 0, [H]Σ = 0, in this case, along the discontinuity, the following holds17 [ρ]Σ 6= 0,
[P ]Σ 6= 0,
[~v · ~nΣ ]Σ 6= 0,
£ ¤ ~v · ~tΣ Σ = 0,
(14)
where, to define ~nΣ = (nΣx , nΣy ) we first define ~tΣ = (tΣx , tΣy ) as a unitary tangent vector to the discontinuity beginning at the solid surface and pointing to the “far field” boundary, then ~nΣ = (nΣx , nΣy ) is the π/2 counter-clock-wise rotation of ~tΣ .
III.
Continuous adjoint formulation for steady Euler equations
When developing an adjoint method to address optimal design problems in aeronautics, one of the main mathematical difficulties is the presence of discontinuities (sonic shock waves).8, 9, 18–20 This is due, in particular, to the intrinsic complexity of the adjoint system in the presence of shocks. Indeed, in the presence of shock discontinuities, the formal linearization of the state equations, which can be rigorously justified for some solutions, fails to be true and the adjoint system changes its nature. Indeed, when this occurs, the state of the systems needs to be rather understood as a multi-body one in which both the state itself at both sides of the shock and the location of the shock are considered as part of the state. Thus, the sensitivity of the model needs to be analyzed with respect to perturbations of the solution as well as to the location of the shock. The linearized flow equations turn out to be the classical ones on both sides of the shock, plus an additional linear transport equation along the shock which stems from the linearization of the Rankine-Hugoniot conditions. This allows defining the adjoint solution in a unique way. III.A.
Analytical formulation of the continuous adjoint method
The adjoint formulation is applied to an optimization problem defined in (1) where the objective is to evaluate the variation of the functional (2) under shape changes of the surface S, where the flow governing equations are the steady Euler equations. 4 of 16 American Institute of Aeronautics and Astronautics
Assuming a flow discontinuity located along a smooth curve Σ that meets the boundary S at a point x = xb and is oriented in such a way that it begins in xb , the variation of the functional δJ is written as: Z Z δJ = j(U ) ds + j 0 (U )δU ds − [j(U )]xb δΣ(xb ) − [j(U )]xb (~nS · ~nΣ ) δS(xb ), (15) δS
S\{xb }
Downloaded by STANFORD UNIVERSITY on February 16, 2014 | http://arc.aiaa.org | DOI: 10.2514/6.2008-171
where δΣ parameterizes an infinitesimal normal deformation of the surface S, and δU solves the linearized Euler equations ³ ´ ~ · A ~ δU = 0, ∇ δ~v · ~nS = −δS ∂n~v · ~nS + (∂tg δS) ~v · ~tS , (δW )+ = 0,
discontinuity due to a change in the in Ω, (16)
on S, on Γ∞ ,
with (δW )+ representing the incoming characteristics on the “far field” boundary which correspond to ~ is the Jacobian matrix, ∂n = ~n · ∇ ~ and physical boundary conditions in the Euler problem. ∂ F~ /∂U = A ~ are the normal and tangential derivatives (respectively). ∂tg = ~t · ∇ In this case, δS, which parameterizes infinitesimal deformations along the normal direction (3), is an input datum to the design problem. In practice, δS has to be directly realized by means of the admissible design variables thus making impossible arbitrary deformations.21 Therefore, once the continuous analysis has been developed, allowing arbitrary deformations, a careful numerical interpretation is required to transfer those results to the context of the admissible design variables. In (15), δΣ parameterizes an infinitesimal normal deformation of the discontinuity due to a change δS in the surface S. Note that the shock position Σ depends on S thought the resolution of the flow equations. The displacement of the shock due to the variation δΣ in the direction normal to the shock is another smooth curve Σ0 , Σ0 = {~x + δΣ (~x) ~nΣ (~x) , ~x ∈ Σ} .
(17)
Recall that δΣ is not a design parameter, but rather a dependent variable whose value is determined by the simultaneous solution of the linearized Euler equations (16) and the linearized Rankine-Hugoniot conditions h i h i ~ A(δΣ ∂n U + δU ) · ~nΣ + F~ · δ~nΣ = 0. (18) Σ
Σ
In order to eliminate δU and δΣ from (15), the adjoint problem is introduced through the Lagrange multipliers ΨT = (ψ1 , ψ2 , ψ3 , ψ4 ). Generally speaking, the method of Lagrange multipliers allows for calculating the minimum of a constrained multi-variate function, the constraints being in this case the Euler equations. The first step of the procedure amounts to multiplying the linearized Euler 16 equations by Ψ and to integrating them over the domain Z ³ ´ ~ · A ~ δU dΩ 0= ΨT ∇ Ω\Σ Z h Z Z i ~ δU ~nΣ ds. ~ δU · ~nS ds + ~ T ·A ~ δU dΩ + =− ∇Ψ ΨT A ΨT A (19) Ω\Σ
S\{xb }
Σ
Σ
Let us now analyze separately each of the terms of (19) so as to derive the adjoint system that will allow the direct computation of the variation of the functional: • The first term of (19) is a volume integral that vanishes provided Ψ satisfies the steady Euler adjoint equation ~ T · ∇Ψ ~ = 0. −A (20) • The second term of (19) is an integral over the solid surface S. Substituting the Jacobian matrix by its value the integral becomes Z ~ δU · ~nS ds ΨT A S\{xb } Z Z = (δ~v · ~nS ) ϑ ds + (~ ϕ · ~nS ) δP ds S\{xb } S\{xb } Z Z ¡ ¡¡ ¢ ¢¢ =− (∂n~v · ~nS ) ϑ + ∂tg ~v · ~tS ϑ δS ds + (~ ϕ · ~nS ) δP ds. (21) S\{xb }
S\{xb }
5 of 16 American Institute of Aeronautics and Astronautics
where ϕ ~ = (ψ2 , ψ3 ) and ϑ = ρψ1 + ρ~vS · ϕ ~ + ρHψ4 . • The third term of (19) is an integral over the discontinuity curve Σ that touches the solid surface at the point xb and the far field boundary at x∞ . This integral can be expanded by taking into account the conditions the adjoint variables must satisfy at the discontinuity, Z h Z Z h i i £ T¤ T ~ ~ ~ ΨT AδU · ~nΣ ds = Ψ Σ AδU · ~nΣ ds + Ψ AδU · ~nΣ ds, (22) Σ
Σ
Σ
Σ
Σ
where f is the mean value computed as (f + + f − )/ 2. From the linearized Rankine-Hugoniot conditions (18) we have h i h i h i h ³ ´i h i ~ ~ n U · ~nΣ − F~ · δ~nΣ = −δΣ ∂n F~ · ~nΣ AδU (23) = −δΣ A∂ + ∂tg (δΣ) F~ · ~tΣ .
Downloaded by STANFORD UNIVERSITY on February 16, 2014 | http://arc.aiaa.org | DOI: 10.2514/6.2008-171
Σ
Σ
Σ
Σ
Σ
On the other hand, on Σ we can decompose the divergence operator in the Euler equation into its tangential and normal components as follows: ¯ ~ · F~ ¯¯ = ∂tg (F~ · ~tΣ ) + κΣ F~ · ~nΣ + ∂n (F~ · ~nΣ ), 0=∇ (24) Σ
where κΣ is the curvature of Σ, and this allows to simplify the normal derivative of F~ · ~nΣ in (23). Thus, taking into account the Rankine-Hugoniot condition we obtain h i ³ h i ´ ~ AδU = ∂tg δΣ F~ · ~tΣ . (25) Σ
Σ
We now replace this expression into (22) and integrate by parts, Z Z h i h i h i T T ~ · ~nΣ ds = − ∂tg Ψ F~ · ~tΣ δΣ ds − Ψ (xb ) F~ · ~tΣ ΨT AδU Σ
Σ
Σ
Σ
xb
δΣ(xb )),
(26)
£ ¤ where the continuity of the adjoint variables through the shock ΨT Σ = 0 has been used. Having analyzed the first three terms in (19), this identity can be rewritten as Z Z h i T (~ ϕ · ~nS ) δP ds = − ∂tg Ψ F~ · ~tΣ δΣ ds Σ S\{xb } Σ Z h i ¡ ¡¡ ¢ ¢¢ −ΨT (xb ) F~ · ~tΣ δΣ (xb ) + (∂n~v · ~nS ) ϑ + ∂tg ~v · ~tS ϑ δS ds. xb
(27)
S\{xb }
This equation will be used to eliminate the linearized variables from the variation of the functional J (15) upon identifying the corresponding terms in (27) and (15). Since the only unknown variation δU of the flow variables left in (27) corresponds to the pressure, only functionals which depend on the pressure P alone are allowed a priori.22 So in (15), we assume that j(U ) = j(P ) . Luckily, functionals which depend solely on the pressure are the most common in aerodynamic design applications with Euler equations (e.g. lift or drag coefficients). Thus, (15) can be written as Z δJ(S) = ((∂n j(P ) − κj(P )) δS ds Z S ¡ ¡¡ ¢ ¢¢ + (∂n~v · ~nS ) ϑ + ∂tg ~v · ~tS ϑ δS ds − [j(P )]xb (~nS · ~nΣ ) δS (xb ) S\{xb }
Z −
Σ
µ h i h i ~ ~ ∂tg Ψ F · tΣ δΣ ds + ΨT (xb ) F~ · ~tΣ T
Σ
xb
¶ − [j(P )]xb
δΣ (xb ) .
(28)
Obviously, in shape design problems δS is known (design variables), but the dependence between δΣ and δS (through the linearized Euler equation and R-H relations) is unknown. Thus the expression (28) is not fully satisfactory since it does not allow to compute the variation of the functional J directly out of the solutions of the state and adjoint equations, and the variation of S. But, let us, by now, maintain δΣ in our 6 of 16 American Institute of Aeronautics and Astronautics
calculus. Also, in order to cancel the terms containing δP on solid surface S and “far field” Γ∞ , the adjoint equation is stated as follow ~ T · ∇Ψ ~ = 0, −A (29) and the following adjoint boundary conditions must be imposed ( ϕ ~ · ~n³S = j 0 (P´), on S \ {xb }, T ~ Ψ A · ~nΓ∞ δU = 0, on Γ∞ \ {x∞ },
(30)
Using the expressions (28), (29), (30) we are able to solve any shape design problem with the Euler equations. However, this strategy is unpractical because it needs to localize the discontinuity curve Σ and compute its variation δΣ for each design variable. In order to face this difficulty, two different methods are proposed for computing the functional gradient using shock information.
Downloaded by STANFORD UNIVERSITY on February 16, 2014 | http://arc.aiaa.org | DOI: 10.2514/6.2008-171
1. Method 1.- Using adjoint Rankine-Hugoniot relations (shock localization). • Step 1.- Find the discontinuity curve Σ. • Step 2.- Impose adjoint Rankine-Hugoniot relations over the discontinuity Σ in order to cancel the dependence of the functional J with respect to δΣ, where several simplifications are possible dealing with normal shock waves. • Step 3.- Solve (29) using (30) with adjoint Rankine-Hugoniot relations and evaluate (28) (or a simplified expression). 2. Method 2.- Without using adjoint Rankine-Hugoniot relations. • Step 1.- Ignore the sensibility of functional due to the displacement of the discontinuity Σ and set as if the flow was continuous across Σ. • Step 2.- Compute the functional gradient without shock considerations. • Step 3.- Use the term ∂J/∂Σ to find a correction for the computed gradient (e.g. introducing design variables which their main effect is a shock displacement).
III.A.1.
Method 1.- Continuous adjoint system using adjoint Rankine-Hugoniot relations
If no simplification is made for the expression in (28), the variation of the functional J depends on the surface shape S and the shape of the shock wave curve Σ. The computation of δΣ for all design variables is unpractical. For that reason we transform them into boundary conditions on the shock for the adjoint system i h T ~ · ~tΣ = F Ψ ∂ tg Σ ¡[ρ ~v ] · ~t ¢ (∂ Ψ + H∂ Ψ ) Σ tg 1 tg 4 £ Σ2 ¤ (31) ~ + ρ (~ v ) + 2P t · ∂ ϕ ~ tg = 0, on Σ, Σ Σ h i ΨT (xb ) F~ · ~tΣ = [j(P )]xb , at xb . xb
8
This result has been derived in in the context of the quasi-1D Euler equations. Then the function variation is computed as Z δJ(S) = ((∂n j(P ) − κj(P )) δS ds Z S ¡ ¡¡ ¢ ¢¢ (32) + (∂n~v · ~nS ) ϑ + ∂tg ~v · ~tS ϑ δS ds − [j(P )]xb (~nS · ~nΣ ) δS (xb ) . S\{xb }
The direct application of (31) and (32) in a real design problem is complex because it is necessary to find the shock curve, the value of the adjoint variables at both sides of the discontinuity and finally evaluate the expression (31) coupled with the adjoint Euler equations.
7 of 16 American Institute of Aeronautics and Astronautics
Another possibility consists of supposing normal shock wave. In this framework, the equations (32) and (31) are simplified to obtain Z Z ¡ ¡¡ ¢ ¢¢ δJ(S) = ((∂n j(P ) − κj(P )) δS ds + (∂n~v · ~nS ) ϑ + ∂tg ~v · ~tS ϑ δS ds, (33) S
S\{xb }
with the following relations over the discontinuity ( ~tΣ · ∂tg ϕ ~ = 0, ϕ ~ · ~nS = j 0 (P ),
on Σ, at xb .
(34)
Solving the continuous adjoint equations (29) and (30), coupled with (34) and evaluate (33) is much easier than using (31) and evaluate (32). The viability of this approach will be shown in Section IV.
Downloaded by STANFORD UNIVERSITY on February 16, 2014 | http://arc.aiaa.org | DOI: 10.2514/6.2008-171
III.A.2.
Method 2.- Continuous adjoint system without using adjoint Rankine-Hugoniot relations
In order to eliminate the shock position depending terms of (28), a method which takes into account the analytical information of those terms will be designed. Note that, those terms reflect the effect over the functional J when a infinitesimal perturbation in the shock position is made (by a solid surface S modification or a “far field” boundary condition variation). Let us suppose that the shape of the discontinuity curve Σ is used as a design variable (analogous to S for the solid surface). Now the optimization problem can be stated as follows J(S min ) = min J(S, Σ(S)),
(35)
S∈Sad
where we maintain Σ = Σ(S) to emphasize the dependence between Σ and S. As before, S min is the sought optimal surface, belonging to the set Sad of admissible solid boundary geometries. Then, it is possible to obtain a compete expression of the form Z Z δJ(S, Σ) = GδS ds + Gxb δS (xb ) + Gshock δΣ ds + Gshock δΣ (xb ) , (36) xb S\{xb }.
Σ
where G is the local gradient of J with respect to an infinitesimal movement of S in a normal direction ~nS to the surface S, and Gshock is the local gradient of J with respect to an infinitesimal movement of Σ in a normal direction ~nΣ to the discontinuity surface Σ. As before, xb denotes the point in which the discontinuity touches the solid surface. Next, (36) is discretized using n nodes over the solid surface and m nodes over the discontinuity surface, the subindex b is used to denote the numerical node in which the shock touches the solid surface δJ(S, Σ) =
n6 =b X
Gi (δS)i + G∗b (δS)b +
i=1
m6 =b X
Gshock (δΣ)k + Gshock∗ (δΣ)b . k b
(37)
k=1
Using the chain rule and keeping in mind that a deformation of Σ does not produce any deformation on the solid surface S, equation (37) is written as δJ(S, Σ) =
n µ X ∂J i=1
∂Si
+
∂J ∂Σj ∂Σj ∂Si
¶ (δS)i +
m X ∂J (δΣ)k , ∂Σk
(38)
k=1
where the dependence of J with respect to infinitesimal variations of Σ could be very important (term of (38) multiplied by δΣ), so it is necessary to develop an optimization method which introduces this extra information. Comparing (38) with (37) and using (28) the effect of the introduction of the adjoint relations on the shock wave is shown. Next, detailed expressions for the functional sensitivity are obtained ∂n j(Pi ) − κi j(Pi ) ¡¡ ¢ ¢ Gi = (39) + (∂n~vi · ~nS,i ) ϑi + ∂tg ~vi · ~tS,i ϑi , if i 6= b, ∂n j(Pi ) − κj(Pi ) − [j(Pi )]xi (~nS,i · ~nΣ,i ) , if i = b, 8 of 16 American Institute of Aeronautics and Astronautics
where for i = b a term which depends on the angle between the shock wave and the solid surface appears [j(P )]xb (~nS · ~nΣ ). This term can be easily computed by using a finite difference strategy with some selected design variables over the solid surface (with influence over the shock), or by a direct evaluation. Notice, that this term is well evaluated when a discrete adjoint strategy or a finite difference method is used. On the other hand, terms which depend on the shock wave displacement are computed as h i ∂tg ΨTk F~k · ~tΣ,k , if k 6= b, h i Σ Gshock = (40) k T Ψk F~k · ~tΣ,k − [j(Pk )]xk , if k = b.
Downloaded by STANFORD UNIVERSITY on February 16, 2014 | http://arc.aiaa.org | DOI: 10.2514/6.2008-171
xk
It is noteworthy that the shock displacement sensitivity Gshock does not appear in the discrete adjoint method neither in the finite difference method because, in those methods, the shock position is not considered as a design variable (just infinitesimal variations of the solid surface S shape are considered). It is important to remark that when we are not considering the existence of a flow discontinuity, we are just computing the value of the functional sensitivity over the surface due to the infinitesimal displacement of S. However, the continuous adjoint method indicates that there is a very particular deformation of the solid surface (which produce a shock movement) that could imply an important variation of the cost function. Now efforts must be focused in looking to develop a method that introduces this extra information provided by the equation (40), there are at least two ways of doing that. 1. Compute the functional gradient without shock considerations. In a second stage, use the term ∂J/∂Σ for finding a correction to the computed gradient. E.g. by using design problem, find the h a inverse i T shape S which produces a shock deformation equivalent to Ψ F~ · ~tΣ which is the greatest descent Σ
direction using the shock displacement. Finally, use it as a new design variable. 2. A simplified version of the first method consists in introducing this extra information by posing an inverse design problem: find the surface which produce a infinitesimal shock displacement over the surface. As before, this shape function which moves the shock will be used in the optimization problem as a new design variable. III.B.
Discretization of the adjoint equations
The adjoint equations have been discretized with a standard edge-based finite volume formulation on the dual grid,23–25 obtained by applying the integral formulation of the adjoint equations to a dual grid control volume Ωj surrounding any given node j of the grid and performing an exact integration around the outer boundary of this control volume. Using the divergence theorem dΨj ~ Tj |Ωj | −A dt
Z
mj
dΨj X ~ Ψ~n dS = |Ωj | − fjk · ~njk Sjk = 0, dt Γj
(41)
k=1
~ T is the (transposed) Euler Jacobian evaluated at the node j, Γj is the boundary of Ωj , and |Ωj | where A j its area. For every neighbor node k of j, ~njk is the outward unit vector normal to the face of Γj associated with the grid edge connecting j and k and Sjk is its length, f~jk is the numerical flux vector at the said face, Ψj is the value of Ψ at the node j (it has been assumed that Ψj is equal to its volume average over Ωj ), and mj is the number of neighbors of the node j. The solution is advanced in time using a first order (forward Euler) scheme: mj ∆t X ~n n+1 n Ψj = Ψj − fjk · ~njk Sjk = 0, (42) |Ωj | k=1
and a multistage Runge-Kutta was used in the computations. Next, we will review several alternative schemes for defining the numerical flux vector. III.B.1.
Central Scheme with Artificial Dissipation
In the current work, we have developed a central scheme inspired by the standard JST scheme,26 following the adaptation to unstructured flow solvers presented in.27 In our scheme, the numerical flux is computed 9 of 16 American Institute of Aeronautics and Astronautics
as
µ cent fjk ≡ f~jk · ~njk = ATjk
Ψj + Ψk 2
¶ + djk ,
(43)
~ T ·~njk is the projected Jacobian and djk denotes the artificial dissipation. A simplified, fourth where ATjk ≡ A j order differences scheme has been chosen for the artificial dissipation ¢ (4) ¡ djk = ²jk ∇2 Ψj − ∇2 Ψk Φjk λjk ,
(44)
where ∇2 denotes the undivided Laplacian ~ 2 Ψj = −mj Ψj + ∇
mj X
Ψk ,
(45)
k=1 (4)
Downloaded by STANFORD UNIVERSITY on February 16, 2014 | http://arc.aiaa.org | DOI: 10.2514/6.2008-171
²jk are user-defined constants, and λjk is the local spectral radius λjk = (|~ujk · ~njk | + cjk ) Sjk , ~ u +~ u
(46)
c +c
where ~ujk = j 2 k and cjk = j 2 k denote the flow speed and sound speed at the face, respectively. Φjk is Φ Φ λ introduced to account for the stretching of the mesh cells and is defined as Φjk = 4 Φjj+Φkk where Φj = 4λjjk . III.B.2.
Roe’s Upwind Scheme
In addition to the central scheme presented above, an upwind scheme based upon Roe’s flux difference splitting scheme28, 29 has been developed for the adjoint equations. ~ T · ∇Ψ. ~ In our case, the aim is to use an upwind type formulas to evaluate a flow of the form A Taking ¡ ¢ −1 T T T T T ~ into account that A = − P ΛP , where A = A · ~n is the projected Jacobian matrix, Λ is diagonal matrix of eigenvalues and P is the corresponding eigenvector matrix, the upwind flux is computed as ´ ´ 1³ ¯ ¯ ¡ ¢−1 1 ³ ~T |Λ| P T δΨ , (47) Aj · ~njk (Ψj + Ψk ) − ¯ATjk ¯ (Ψk − Ψj ) = ATj (Ψj + Ψk ) + P T 2 2 ¯ ¯ ¡ ¢−1 ¯ ¯ where ¯ATjk ¯ = − P T |Λ| P T , the subindex jk denotes an avereage value in the interface. Note that upw upw fjk 6= fkj . upw fjk =
IV.
Numerical experiments
The aim of this section is to investigate, with some numerical experiments, the significance of imposing the adjoint Rankine-Hugoniot internal boundary conditions in order to introduce the influence of the shock displacement into the functional gradient computation. The proposed problem consists in minimizing the wave drag using as initial geometry the classical NACA 0012 airfoil. Gradients of the cost function are obtained with respect to variations of 50 Hicks-Henne sine “bump” functions,21 centered at various locations along the upper surfaces of the baseline airfoil. The locations of these geometry perturbations are ordered sequentially such that they start at the 25% of the chord (upper surface), proceed forward to the trailing edge until the 75% of the chord (upper surface), see Fig. 3 for an example of one “bump” functions applied to a NACA 0012 airfoil. The drag objective function CD , on the surface S is defined as Z P J= ~n · d~ ds, d~ = (cos α, sin α) (48) 2 ρ L S 0.5v S ∞ ∞ where ~nS is the inward unit vector normal to the boundary S, α is the airfoil angle of attack, L is the characteristic length of the airfoil and v∞ , P∞ are the free-stream velocity and pressure, respectively.
10 of 16 American Institute of Aeronautics and Astronautics
Downloaded by STANFORD UNIVERSITY on February 16, 2014 | http://arc.aiaa.org | DOI: 10.2514/6.2008-171
Figure 3. Effect of a Hicks-Henne sine “bump” function.
Figure 4. Iso-Mach lines and CP of a NACA 0012 (Mach 0.8, α = 0.0◦ )
11 of 16 American Institute of Aeronautics and Astronautics
IV.A.
Symmetric configuration
Downloaded by STANFORD UNIVERSITY on February 16, 2014 | http://arc.aiaa.org | DOI: 10.2514/6.2008-171
In this subsection, a redesign of an airfoil profile NACA 0012 in transonic regime (Mach 0.8, α = 0.0◦ ) has been selected as the baseline numerical test. In Fig. 4 the iso-Mach lines (left) and CP coefficient (right) are shown. In this configuration, the shock wave is orthogonal to the NACA 0012 surface and is located on a nearly flat zone (horizontal) of the airfoil profile. According with the flow results exposed in the Fig. 4. A priori we can expect that the influence of a shock wave displacement on CD coefficient will be very small because the shock is located on a nearly horizontal plate and the influence of its specific position in this zone on the drag is negligible. Next, the continuous adjoint formulation developed in this paper is applied. Instead of using the complete adjoint relation over the shock (31) a simplified version (34) is used. The crucial step of this method is to develop an algorithm for detecting shock waves and subsequently impose the right adjoint Rankine-Hugoniot relations.
Figure 5. Adjoint 2D Euler solution and drag gradient (symmetric case)
In Fig. 5 the adjoint variable field (left) is shown (imposing and not imposing the Rankine-Hugoniot relations). On the other hand, a most relevant result is shown in the right part of Fig. 5. In this case the sensitivity of the functional CD with respect to infinitesimal variations in the shape of the NACA 0012 is presented (imposing or not, adjoint Rankine-Hugoniot relations on the shock). Results in both cases (with and without Rankine-Hugoniot relations) are almost equal. To sum up, in this example internal conditions of Rankine-Hugoniot are naturally imposed in the case where the sensitivity of the functional with respect to variations in the position of the shock is negligible. That is to say, the term that multiplies to δΣ in (38) is zero, so (40) vanishes on the shock. This ratifies the fact that under certain circumstances the imposition of internal conditions is not necessary. IV.B.
Asymmetric 2D configuration
Now we take a step forward with an asymmetric case. As before, we are looking to redesign an airfoil profile NACA 0012 in transonic regime but now with an asymmetric flow field (Mach 0.8, α = 1.20◦ ). In fig. 6 the iso-Mach lines and CP are shown. In this case, due to the asymmetry of the configuration, the shock is not perpendicular to the x axis, so a displacement of the shock produces a significant variation in the functional. In Fig. 7 (left) both adjoint solutions (with and without using Rankine-Hugoniot relations on the shock) are compared for the third adjoint variable. Also, in Fig. 7 (right) the computed surface gradient in both cases is shown. In contrast to the symmetric case, in this configuration the imposition of the adjoint Rankine-Hugoniot relations has an important influence into the gradient computation. In Fig. 8 the influence of the exact shock wave localization in order to impose adjoint Rankine-Hugoniot relations is shown. Once the shock wave is located, the adjoint solution is computed (using adjoint RankineHugoniot relations), and the drag surface gradient is evaluated. It is time to integrate the surface drag
12 of 16 American Institute of Aeronautics and Astronautics
Downloaded by STANFORD UNIVERSITY on February 16, 2014 | http://arc.aiaa.org | DOI: 10.2514/6.2008-171
Figure 6. Iso-Mach lines and CP of a NACA 0012 (Mach 0.8, α = 1.2◦ )
Figure 7. Adjoint solution (left) and drag surface sensitivity (right).
13 of 16 American Institute of Aeronautics and Astronautics
Downloaded by STANFORD UNIVERSITY on February 16, 2014 | http://arc.aiaa.org | DOI: 10.2514/6.2008-171
gradient using 50 Hicks-Henne sine “bump” functions centered at various locations along the upper surfaces of the baseline airfoil, see Fig. 8 (right).
Figure 8. Influence of shock wave location, and CD gradient
Finally in Fig. 9 an excellent result is shown. In this case, we are computing the improvement that would proportionate the right use of the adjoint internal conditions in the functional minimization. The validation procedure has been the following 1. Compute the functional gradients (with and without internal conditions). 2. Normalize the gradient value with respect to the Euclidean norm. 3. Provided a common advance step for both problems (with and without internal conditions). Using the above procedure, if we do not use the internal conditions drag is reduced to 112 drag counts. On the other hand if we use the Rankine-Hugoniot adjoint relations we obtain a drag reduction value of 100 drag counts, that approximately supposes an improvement in 10% which is a remarkable improvement. Still better results are obtained for other functionals more sensible to the shock position.
Figure 9. Estimate improvement using internal boundary conditions
14 of 16 American Institute of Aeronautics and Astronautics
Downloaded by STANFORD UNIVERSITY on February 16, 2014 | http://arc.aiaa.org | DOI: 10.2514/6.2008-171
The next step, is to state a complete optimization problem to compare the performance between imposing adjoint boundary conditions or not. In Fig. 10 a drag minimization problem is shown.
Figure 10. Complete optimization problem
We are looking for diminishing the drag of the NACA 0012 profile in transonic regime (Mach 0.8, α = 1.20◦ ), as constraint we impose that the lift coefficient must be greater than 0.36. As we can see in this example, to impose the adjoint internal boundary conditions improves the optimization process in terms of drag minimization and lift maximization. Also, is remarkable that one iteration less is needed to obtain the best result.
V.
Conclusions
In this work the continuous adjoint methodology for the calculation of gradients of functionals of the flow field (defined on the solid surface) has been developed dealing with discontinuities in the flow variables. The continuous adjoint methodology derives the adjoint problem from the continuous formulation of the flow equations, and as such it constitutes a shortcut that allows to maintain the rigor throughout the whole procedure. However, when working with continuous schemes, it is often necessary to deal with the problem of discontinuities in solutions of the state equation. In this case, shocks must be treated as singularities on which the adjoint Rankine-Hugoniot conditions must be enforced. The enforcement of these conditions is delicate and requires the numerical location of the shock. Nevertheless, satisfactory results have been obtained without the imposition of these Rankine-Hugoniot conditions across the shock.8, 30, 31 On the other hand, in this paper a simplified version of the adjoint Rankine-Hugoniot relations is used and numerical test reveal the significance of using the functional sensitivity with respect to shock movements. Moreover some alternative methods are proposed to include extra information that is not provided by the classical finite difference method or discrete adjoint method which does not consider the influence of the shock movement.
References 1 Jameson,
A. and Baker, T. J., “Solution of the Euler Equation for Complex Configurations,” AIAA Paper , Vol. 83-1929,
1983. 2 Lions,
J.-L., Optimal Control of Systems Governed by Partial Differential Equations, Springer Verlag, New York, 1971. O., Optimal Shape Design for Elliptic Systems, Springer-Verlag, New York, 1984. 4 Jameson, A., “Aerodynamic Design Via Control Theory,” Journal of Scientific Computing, Vol. 3, 1988, pp. 233–260. 5 Jameson, A. and Kim, S., “Reduction of the Adjoint Gradient Formula in the Continuous Limit,” AIAA Paper , Vol. 20030040, 2003. 6 Castro, C., Lozano, C., Palacios, F., and Zuazua, E., “A systematic continuous adjoint approach to viscous aerodynamic design on unstructured grids,” AIAA Journal, Vol. 45, No. 9, September 2007, pp. 2125–2139. 3 Pironneau,
15 of 16 American Institute of Aeronautics and Astronautics
Downloaded by STANFORD UNIVERSITY on February 16, 2014 | http://arc.aiaa.org | DOI: 10.2514/6.2008-171
7 Iollo, A., Salas, M., and Ta’asan, S., “Shape optimization governed by the Euler equations using an adjoint method,” Tech. Rep. 191555, Langley Research Center, NASA, Hampton, Virginia, 6 1993. 8 Giles, M. and Pierce, N., “Analytic adjoint solutions for the quasione-dimensional Euler equations,” J. Fluid Mechanics, Vol. 426, 2001, pp. 327–345. 9 Matsuzawa, T. and Hafez, M., “Treatment of Shock Waves in Design Optimization via Adjoint Equation Approach,” AIAA Paper , Vol. 98-2537, 1998. 10 Hicks, R. and Vanderplaats, G., “Application of numerical optimization to the design of supercritical airfoils without dragcreep,” SAE Technical Paper 770440 , 1977. 11 Simon, J., “Diferenciacion con respecto al dominio,” Lectures Notes, Universidad de Sevilla. Seville, Spain, 1989. 12 Mason, W. H. and Lee, J., “Aerodynamically blunt and sharp bodies,” Journal of Spacecraft and Rockets, Vol. 31, may 1994, pp. 378–382. 13 White, F., Viscous Fluid Flow , McGraw Hill Inc., New York, 1974. 14 Bardos, C. and Pironneau, O., “A Formalism for the Differentiation of Conservation Laws,” C. R. Acad. Sci., Paris, Vol. I, No. 335, 2002, pp. 839–845. 15 Landau, L. and Lifshitz, E., Fluid Mechanics (2nd Edition), Pergamon Press, 1993. 16 Chakravarthy, S., “Euler equations - Implicit schemes and implicit boundary conditions,” AIAA Paper , Vol. 82-0228, 1982. 17 Hirsch, C., Numerical computation of internal and external flows, John Wiley and Sons, Inc., 1988. 18 Giles, M., “Improved lift and drag estimates using adjoint Euler equations,” AIAA Journal, Vol. 99-3293, 1999. 19 Majda, A., “The stability of multidimensional shock fronts,” Mem. Amer. Math. Soc., Vol. 41, No. 275, 1983, pp. iv+95. 20 Giles, M., Discrete adjoint approximations with shocks: Hyperbolic Problems: Theory, Numerics, Applications, SpringerVerlag, 2003. 21 Hicks, R. and Henne, P., “Wing design by numerical optimization,” Journal of Aircraft, Vol. 15, 1978, pp. 407–412. 22 Arian, E. and Salas, M., “Admitting the Inadmissible: Adjoint Formulation for Incomplete Cost Functionals in Aerodynamic Optimization,” AIAA Journal, Vol. 37, No. 1, 1999, pp. 37–44. 23 Barth, T. and Jespersen, D., “The design and application of upwind schemes on unstructured grids using quadratic reconstruction,” AIAA Paper , Vol. 89-0366, 1990. 24 Barth, T., “Aspect of unstructured grid and finite volume solvers for the Euler and Navier-Stokes equations,” AIAA Paper , Vol. 91-0237, 1994. 25 Ashford, G. and Powell, K., “An unstructured grid generation and adaptive solution technique for high-Reynolds-number compressible flows,” Computational Fluid Dynamics, VKI Lecture Series, Vol. 1996-06, 1996. 26 Jameson, A., Schmidt, W., and Turkel, E., “Numerical solution of the Euler equations by finite volume methods using Runge-Kutta time stepping schemes,” AIAA Paper , Vol. 81-1259, 1981. 27 Eliasson, P., Edge 3.2 Manual, FOI, 2005. 28 Roe, P., “Approximate Riemann solvers, parameter vectors, and difference schemes,” Journal of Computational Physics, Vol. 43, 1981, pp. 357–372. 29 Anderson, W. and Venkatakrishnan, V., “Aerodynamic Design Optimization on Unstructured Grids with a Continuous Adjoint Formulation,” AIAA Paper , Vol. 97-0643, 1997. 30 Jameson, A., Sriram, S., and Martinelli, L., “A Continuous Adjoint Method for Unstructured Grids,” AIAA Paper , Vol. 2003-3955, 2003. 31 Kim, S., Alonso, J., and Jameson, A., “Design Optimization of High-lift Configurations Using a Viscous Continuous Adjoint Method,” AIAA Paper , Vol. 2002-0844, 2002.
16 of 16 American Institute of Aeronautics and Astronautics