continuous adjoint approaches for the preconditioned euler … · 2015-12-15 · continuous adjoint...

15
Continuous adjoint approaches for the preconditioned Euler equations *Hyungro Lee 1) and Seungsoo Lee 2) 1), 2) Department of Aerospace Engineering, Inha University, Incheon 402-751, Korea 2) [email protected] ABSTRACT Continuous adjoint approaches based on the preconditioned Euler equations are investigated and assessed to reduce computational time at low Mach regions. The derived adjoint equations have a source term due to the spatial derivatives of the preconditioning matrix, which are ignored in Asouti et. al’s study. The terms should not be disregarded because the spatial variance of the source term is not small enough to be ignored whether the Mach number is low or not. Numerical simulations show that the proposed approaches improve the convergence of adjoint variables, and that the source term affect an accuracy of the adjoint solutions. INTRODUCTION The adjoint method has been widely used to compute gradients of an objective function with respect to design variables. Since the sensitivities are required to find a search direction in optimization problems when gradient based optimization methods are employed, the accuracy of sensitivities has a significant influence on efficiency of the optimization. The sensitivities can be determined by solving the adjoint equations which are derived from the governing flow equations. The evaluation of the gradients using the adjoint equations has advantages over the traditional method which uses a finite difference approximation. The primary advantage of the adjoint method lies in relatively low computational cost, especially when a large number of design variables are involved. Pironneau(Pironneau 1984) proposed the adjoint approach for elliptic problems. Later, this method have been extended to wide range of aerodynamic problems(Jameson 1988, Anderson 1999, Thomas 2014) because of its availability. Most of previous researchers has only derived the adjoint equations based on the non-preconditioned flow equations. These formulations can be appropriately applied for aerodynamic optimization problems in high Mach number flow, such as reducing wave drag of an airfoil. However, the formulations based on non-preconditioned flow equations do not well work in low Mach number flow. This is because that the adjoint equations suffer convergence degradation due to the difference in the acoustic waves and the flow velocity as the Mach number decreases like the flow equations. To alleviate the 1) Graduate Student 2) Professor

Upload: others

Post on 23-Feb-2020

7 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Continuous adjoint approaches for the preconditioned Euler … · 2015-12-15 · Continuous adjoint approaches . for the preconditioned Euler equations *Hyungro Lee. 1) and Seungsoo

Continuous adjoint approaches for the preconditioned Euler equations

*Hyungro Lee1) and Seungsoo Lee2)

1), 2)

Department of Aerospace Engineering, Inha University, Incheon 402-751, Korea 2)

[email protected]

ABSTRACT Continuous adjoint approaches based on the preconditioned Euler equations are investigated and assessed to reduce computational time at low Mach regions. The derived adjoint equations have a source term due to the spatial derivatives of the preconditioning matrix, which are ignored in Asouti et. al’s study. The terms should not be disregarded because the spatial variance of the source term is not small enough to be ignored whether the Mach number is low or not. Numerical simulations show that the proposed approaches improve the convergence of adjoint variables, and that the source term affect an accuracy of the adjoint solutions.

INTRODUCTION

The adjoint method has been widely used to compute gradients of an objective function with respect to design variables. Since the sensitivities are required to find a search direction in optimization problems when gradient based optimization methods are employed, the accuracy of sensitivities has a significant influence on efficiency of the optimization. The sensitivities can be determined by solving the adjoint equations which are derived from the governing flow equations. The evaluation of the gradients using the adjoint equations has advantages over the traditional method which uses a finite difference approximation. The primary advantage of the adjoint method lies in relatively low computational cost, especially when a large number of design variables are involved. Pironneau(Pironneau 1984) proposed the adjoint approach for elliptic problems. Later, this method have been extended to wide range of aerodynamic problems(Jameson 1988, Anderson 1999, Thomas 2014) because of its availability. Most of previous researchers has only derived the adjoint equations based on the non-preconditioned flow equations. These formulations can be appropriately applied for aerodynamic optimization problems in high Mach number flow, such as reducing wave drag of an airfoil. However, the formulations based on non-preconditioned flow equations do not well work in low Mach number flow. This is because that the adjoint equations suffer convergence degradation due to the difference in the acoustic waves and the flow velocity as the Mach number decreases like the flow equations. To alleviate the

1)

Graduate Student 2)

Professor

Page 2: Continuous adjoint approaches for the preconditioned Euler … · 2015-12-15 · Continuous adjoint approaches . for the preconditioned Euler equations *Hyungro Lee. 1) and Seungsoo

stiffness of the flow equations, Turkel(Turkel 1987) proposed the preconditioning technique to modified eigenvalues at low Mach number. Indeed, marked convergence enhancements were achieved. Subsequently, various forms of the preconditioning matrix were proposed (Choi 1993, Eriksson 1996, Weiss 1995) To enhance the convergence speed of the adjoint equations ln low Mach number regions, Asouti et al.(Asouti 2007) firstly derived the preconditioned adjoint equations. They derived their adjoint equations from the preconditioned Navier-Stokes equations with Eriksson’s preconditioning matrix(Eriksson 1996). They were able to obtain enhanced convergence for inverse design problems and a drag minimization problem at low Mach number. They, however, made an assumption on the preconditioning matrix when they derived the preconditioned adjoint equations. Without a clear reason, they assumed that the spatial derivatives of the preconditioning matrix are zero. In general, the preconditioning matrix is a function of flow variables which vary spatially. In this study, we present new derivations of the preconditioned continuous adjoint equations for the Euler equations, and their boundary conditions. The preconditioning matrix of Weiss and Smith(Weiss 1995) is used in the derivation. Two forms of the adjoint equations; non-conservative form and conservative form, are derived without the assumption that Asouti el al. made. The newly derived adjoint formulations are verified for the Quasi-1D nozzle problems, which have the exact solutions. Also, they are tested on low Mach number flows over an NACA 0012 airfoil.

PRECONDITIONED CONTINOUS ADJOINT FORMUATIONS

Preconditioned Euler equations The 2-Dimensional Euler equations are expressed in the conservative form as

0W E F

t x y

, (1)

where denotes the conservative solution vector. , and are the inviscid flux vectors of the -, and -directions, respectively. The conservative solution vector, and the flux vectors are defined by

2

2

,

,

,

T

T

T

W u v E

E u u p uv E p u

F v vu v p E p v

(2)

where , , and are the density, the -, and -component velocity, and the total energy, respectively, The pressure, is computed with the state equation of ideal gas. The low Mach number preconditioned Euler equations are given by

0pQ E F

t x y

, (3)

Page 3: Continuous adjoint approaches for the preconditioned Euler … · 2015-12-15 · Continuous adjoint approaches . for the preconditioned Euler equations *Hyungro Lee. 1) and Seungsoo

where the primitive solution vector, is defined by

T

pQ p u v T , (4)

where is the temperature. The preconditioning matrix, , used in the study is one that used in Weiss and Smith’s work for their unstructured flow solver(Weiss 1995). The preconditioned matrix is given by

0 0

0

0

T

uu

T

uv

T

QH u v

T

, (5)

where and are defined by

2 21

2Q u v , (6)

2

1 1

r pU C T . (7)

Here, is the reference velocity. The details of the preconditioning method can be found in (Weiss 1995).

Continuous adjoint equations The steady Euler equations in preconditioned form can be expressed as

0T F . (8)

For many aerodynamic optimization problems, cost functions are related to forces and moments. The augmented cost function with the flow equations as the constraint is defined by

c RI I I , (9)

where Ic is the cost function which is need to be optimized, and IR is the flow equations with the adjoint variables. If the cost function is selected to be the drag or lift, it can be expressed as

Page 4: Continuous adjoint approaches for the preconditioned Euler … · 2015-12-15 · Continuous adjoint approaches . for the preconditioned Euler equations *Hyungro Lee. 1) and Seungsoo

1

cos sinw

c D p x zS

I C C n n dSc

, (10)

1

sin cosw

c L p x zS

I C C n n dSc

. (11)

where is a reference length. and are unit normal vector components of and

directions on the wall surface, . For simplicity, the cost functions can be defined by

wc

SI d gdS , (12)

where is related to the geometry of the body, and is related to surface pressure

distribution on the solid wall. In addition, defined by

1T

RI F d

, (13)

where means the flow surface and are the adjoint variables associated with the primitive variables

T

p u v T . (14)

The variation in the augmented objective with respect to small perturbation on surface function is given by

1 1ˆw w

T T

p pS S S

I d gdS d gdS AM Q ndS AM Q d

, (15)

where represents the Jacobian matrix of . is a transform matrix from

the primitive values to the conservative values and can be written as

10 0 0

0 0

0 0

0 0

1

1

T T

u u

T T

v vM

T T

w w

T T

Q Qu v w

T T

. (16)

For arbitrary , the adjoint equations can be derived from the field integration term

(Ⅰ) (Ⅳ) (Ⅲ) (Ⅱ)

Page 5: Continuous adjoint approaches for the preconditioned Euler … · 2015-12-15 · Continuous adjoint approaches . for the preconditioned Euler equations *Hyungro Lee. 1) and Seungsoo

(Ⅳ) in Eq. (15). The adjoint equations can be written as

0T

TAM . (17)

Since the preconditioning matrix is located inside the gradient operator, the eigenvalues of Eq. (17) are not properly scaled at low Mach number regions as the eigenvalues of the flow equations. Asouti et al., therefore, took the preconditioning matrix out of the gradient operator(Asouti 2007). The reason for their assumption was not clearly stated in their study. Without any assumption, Eq. (17) can be modified to

1T T

TAM AM . (18)

In Eq. (18), the source term with the spatial derivative of the preconditioning matrix is included. In general, the preconditioning matrix is a function of the flow variables. The inverse and transpose of the preconditioning matrix are written as

1

10

10

10 0

T

Q u v T Q

u T u

v T v

T

, (19)

where

( ) . Although at low Mach numbers the divergence of the velocity

vector is zero and the density is nearly constant, the gradient of the preconditioning matrix does not vanish completely. The final adjoint equations with an added time term for the time marching method can be written as

T

T TA AMt

, (20)

where . Eq. (20) is the non-conservative form of the adjoint equations,

which is designated as Eq2. When the source term is ignored, Eq. (20) becomes Asouti’s equations, which were obtained with the assumption that there is no spatial variation of the preconditioning matrix. In addition, Eq. (20) can be recast into the conservative form, which is designated as Eq1:

T

TA AMt

, (21)

Page 6: Continuous adjoint approaches for the preconditioned Euler … · 2015-12-15 · Continuous adjoint approaches . for the preconditioned Euler equations *Hyungro Lee. 1) and Seungsoo

where . Eq. (20) and (21) are the same mathematically, but different

numerically.

The boundary conditions can be derived from the terms (Ⅱ) and (Ⅲ) of Eq. (15).

The inviscid wall boundary conditions are found to be

2 3 4x y z

gn n n d

p

. (22)

The right hand side of Eq. (22) can be rewritten as

Drag : 1 1

cos sinw

x zS

gd n n dS

p c q

,(23)

Lift : 1 1

sin cosw

x zS

gd n n dS

p c q

,(24)

where is the freestream dynamic pressure. From the term (Ⅲ) of Eq. (15), the far

field boundary conditions can be written as

ˆ 0T

pAM Q n . (25)

Eq. (25) represents the characteristic based far field boundary conditions for the adjoint equations. Remaining terms in Eq. (15) are the derivatives of the cost function with respect to the design variables

w wS SI dS d gdS , (26)

where

1 2 3 4tu v H , (27)

x y x y x z

u v u vx n n y n n u n v n

x x y y

. (28)

In Eq. (26), the variation of the grid points, and normal vectors can be obtained numerically by using a finite difference with respect to a small variation of design variables.

Numerical method In this section, the numerical methods for the conservative form of adjoint equations, Eq1 are described. The same numerical methods are applied to the non-conservative form as to the conservative form, Eq2 except for an evaluation of the numerical flux. The adjoint equations (21) and the Euler equations (1) are similar.

Page 7: Continuous adjoint approaches for the preconditioned Euler … · 2015-12-15 · Continuous adjoint approaches . for the preconditioned Euler equations *Hyungro Lee. 1) and Seungsoo

Hence, the same numerical methods as used to solve the Euler equations can be applied to the adjoint equations. Upon integrating Eq. (21) over a quadrilateral cell, we have

Rt

. (29)

The residual for the adjoint equations are defined by

1/2 1/2 1/2 1/2

1 T T T T

i i j jR F S F S F S F S S

V

. (30)

The numerical flux with Roe’s approximated Riemann solver(Roe 1981), is defined

by

1/21/2

1 ˆ ˆ2

L RT T T

R LiiF F F A

, (31)

where

. The left and the right values are also evaluated using the MUSCL

extrapolation(Van 1979). The source term in Eq. (37) is defined by

T

S AM . (32)

The source term includes the divergence of ( ) and this term is evaluated with the

Green-Gauss theorem. Lastly, the Beam and Warming method(Beam 1982) is also applied for the time integration of the adjoint equations.

COMPUTATIONAL RESULTS AND DISCUSSION

Quasi-1D nozzle Quasi-1D nozzle problems for the subsonic test conditions are solved to confirm the validity of the preconditioned adjoint equations. Giles and Pierce obtained analytical solutions to the adjoint equations by using Green’s functions(Giles 2001). The Nozzle geometry used in Giles and Pierce’s study is given by

2

2 1 1/ 2

1 sin 1/ 2 1/ 2

2 1/ 2 1

x

h x x y

x

. (33)

The test conditions of inflow and outflow can be found in Giles and Pierce’s study. The flow Mach number of nozzle is plotted in Fig. 1. An equally spaced grid with 300 grid points is used.

Page 8: Continuous adjoint approaches for the preconditioned Euler … · 2015-12-15 · Continuous adjoint approaches . for the preconditioned Euler equations *Hyungro Lee. 1) and Seungsoo

Figure 1. Nozzle Mach number

Figure 2. Comparisons of adjoint variables for quasi-1D nozzle problem

Figure 2 shows the adjoint solutions for the subsonic test condition. The computational results of the conservative form of adjoint equations are marked with Eq1, while those of the non-conservative from are marked with Eq2. The results from two different forms are nearly identical to each other, and match well with the analytical solutions. In the figure, the results of Asouti’s formulation with Weiss and Smith’s preconditioning matrix are presented for comparison. As can be seen from the figure, the spatial derivatives of Weiss and Smith’s preconditioning matrix, therefore, should not be ignored in order to obtain accurate solutions. Figure 3 presents the residual convergence histories of the first adjoint value. Machine zero convergence for all three test cases is achieved for both Eq.1 and Eq.2 formulations. The residual convergence for the subsonic case without the preconditioning is unbearably slow.

X

Ma

ch

Nu

mb

er

-1 -0.5 0 0.5 10.1

0.2

0.3

X

Ad

join

tV

ari

ab

le

-1 -0.5 0 0.5 1-5

-4

-3

-2

-1

0

1

Present_Eq1

Present_Eq2

Asouti's

Analytic

u

E

Page 9: Continuous adjoint approaches for the preconditioned Euler … · 2015-12-15 · Continuous adjoint approaches . for the preconditioned Euler equations *Hyungro Lee. 1) and Seungsoo

Figure 3. Comparisons of residual convergence of the first adjoint value

NACA0012 airfoil The next problem is a sensitivity analysis for a shape optimization problem of an airfoil in subsonic flows. Numerical simulations to a check convergence characteristic in terms of Mach number are carried out. The three Mach numbers, 0.1, 0.01 and 0.001, are used and the angle of attack is 1.25 degree.

Figure 4. Close up view of a structured grid over a NACA 0012 airfoil

Figure 4 depicts a computational grid of 309x55 grid points over a baseline airfoil, NACA0012. A linear combination of Hicks-Henne bump(Hicks 1978) functions at control points are applied to present the airfoil. The airfoil surface can be presented by,

0

1

( )N

n n

n

y y f x

, (34)

Interations

Lo

g(R

es

)

0 5000 10000 15000

-10

-5

Eq1 with preconditioing

Eq2 with preconditioing

Eq1 without preconditioing

Eq2 without preconditioing

Page 10: Continuous adjoint approaches for the preconditioned Euler … · 2015-12-15 · Continuous adjoint approaches . for the preconditioned Euler equations *Hyungro Lee. 1) and Seungsoo

where is the baseline airfoil surface, and is the number of design variables. The bump step sizes, are used as the design variables. The Hicks-Henne bump functions are given by

3sin ne

nf x x ,

log 0.5

logn

n

ex

, 0,1x , (35)

at the control point, . We distributes 18 control points on the airfoil surface with equal space, and the detailed information on the distribution of control points is given in Fig. 5.

Figure 5. Distribution of control points

Eq1 Eq2 Asouti’s

Figure 6. Contour plots of adjoint values for according to equation forms

Page 11: Continuous adjoint approaches for the preconditioned Euler … · 2015-12-15 · Continuous adjoint approaches . for the preconditioned Euler equations *Hyungro Lee. 1) and Seungsoo

The adjoint computation for the lift coefficient are performed. Figure 6 shows contour plots of first, second and third adjoint values of Eq1, Eq2 and Asouti’s formula. According to the figure, the values of Eq1 and Eq2 are very similar with each other, but Asouti’s formula shows significant difference. The surface values of Eq1, Eq2 and Asouti’s formula are shown in Fig. 7. As it can be seen in the Fig. 7, the results of Eq1 and Eq2 are well matched with each other. However, the Asouti’s formula underestimate the adjoint values compared to those of Eq1 and Eq2. This means that the adjoint values are considerably effected by the source term in Eq. (27). Figure 8 represents the gradient with respect to the design variables with those from SU2(Palacios 2014) and FDM. The sensitivities of Eq1 and Eq2 are in good agreement with the results of SU2 and FDM. It is noticeable that though the adjoint values of Asouti’s formula considerably differ with other results, the differences in the sensitivities are not as much as in the adjoint values.

Figure 7. Distributions of ∞ for the lift coefficient according to equation forms

Figure 8. Lift gradient with respect to the design variables in the subsonic case

X

Min

f

0 0.2 0.4 0.6 0.8 1

-60

-40

-20

0

20

40

60

Present_Eq1

Present_Eq2

Asouti's

CP

Lif

tG

rad

ien

t

0 5 10 15-10

-5

0

5

10

Present_Eq1

Present_Eq2

Asouti's

SU2

FDM

Page 12: Continuous adjoint approaches for the preconditioned Euler … · 2015-12-15 · Continuous adjoint approaches . for the preconditioned Euler equations *Hyungro Lee. 1) and Seungsoo

To show the effectiveness of the preconditioning method at low Mach numbers, the computations are performed at three Mach numbers, 0.1, 0.01, and 0.001. Figure 9 shows the residual convergence histories of the first adjoint values. With the preconditioning, the residuals are converged to a machine zero for all the cases. Without the preconditioning, however, the residual convergences stall only after 1000 iterations. Figure 10 shows contour plots of first, second and third adjoint values, which are scaled with the freestream Mach number for clarity, in terms of Mach numbers. The difference of contour plots according to the Mach numbers are not be able to seen in the figure. Figure 11 shows surface values of according to the Mach numbers. It

can be also seen the values are nearly identical regardless of the Mach numbers. Figure 12 shows the sensitivities with and without the preconditioning at all Mach numbers. Figure 12-(a) represent that there is no difference of gradient as the Mach number decrease and the values are accurately predicted compared to those of FDM. The sensitivities without the preconditioning as can be seen in Fig 12-(b) becomes inaccurate as the Mach number decreases.

(a)

(b)

Figure 9. Residual convergence histories of the first adjoint value (a) with preconditioning and (b) without preconditioning

Iterations

Lo

g(R

es

)

0 1000 2000 3000 4000 5000 6000 7000

-14

-12

-10

-8

-6

-4

-2

0

M=0.1

M=0.01

M=0.001

Iterations

Lo

g(R

es

)

1000 2000 3000 4000 5000-16

-14

-12

-10

-8

-6

-4

-2

0

M=0.1

M=0.01

M=0.001

Page 13: Continuous adjoint approaches for the preconditioned Euler … · 2015-12-15 · Continuous adjoint approaches . for the preconditioned Euler equations *Hyungro Lee. 1) and Seungsoo

M=0.1 M=0.01 M=0.001

Figure 10. Contour plots of adjoint values in terms of the Mach numbers

Figure 11. Distributions of ∞ for the lift coefficient in terms of the Mach numbers

X

Min

f

0 0.2 0.4 0.6 0.8 1

-60

-40

-20

0

20

40

60

M=0.1

M=0.01

M=0.001

Page 14: Continuous adjoint approaches for the preconditioned Euler … · 2015-12-15 · Continuous adjoint approaches . for the preconditioned Euler equations *Hyungro Lee. 1) and Seungsoo

(a)

(b)

Figure 12. Lift gradient (a) with preconditioning and (b) without preconditioning

CONCLUDING REMARKS

In this study, the preconditioned adjoint approaches with the Weiss and Smith’s preconditioning matrix are investigated to increase convergence speed and obtain accuracy results at low Mach number flows. We derives two preconditioned continuous adjoint equation; conservative and non-conservative forms, without any assumption about the preconditioning matrix. The results of numerical simulations for quasi 1-D and 2-D problems show that the proposed formulations give highly converged adjoint solutions at low Mach number, and their solutions are highly accurate. In addition, the solution differences between the conservative and the non-conservative formulas are small. It can be also confirmed that the spatial variation of the preconditioning matrix significantly effects the adjoint values.

CP

Lif

tG

rad

ien

t

0 5 10 15-10

-5

0

5

10 M=0.1

M=0.01

M=0.001

FDM

CP

Lif

tG

rad

ien

t

0 5 10 15-10

-5

0

5

10 M=0.1

M=0.01

M=0.001

FDM

Page 15: Continuous adjoint approaches for the preconditioned Euler … · 2015-12-15 · Continuous adjoint approaches . for the preconditioned Euler equations *Hyungro Lee. 1) and Seungsoo

REFERENCES

Anderson, W. K., and Venkatakrishnan, V. (1999), "Aerodynamic design optimization on unstructured grids with a continuous adjoint formulation," Computers & Fluids, Vol. 28(4), 443-480.

Asouti, V. G., Zymaris, A. S., Papadimitriou, D. I., and Giannakoglou, K. C. (2007), “Continuous and discrete adjoint approaches for aerodynamic shape optimization with low Mach number preconditioning,” International Journal for Numerical Methods in Fluids, Vol. 57(10), 1485-1504.

Beam, R. M., and Warming, R. F. (1982), Implicit Numerical Methods for the Compressible Navier Stokes and Euler Equations, von Karman Institute for Fluid Dynamics Lecture Series, 1982-04.

Choi, Y. H., and Merkle, C. A. (1993), “The Application of Preconditioning in Viscous Flows,” Journal of Computational Physics, Vol. 105(2), 207-223.

Eriksson, L. E. (1996), "A Preconditioned Navier-Stokes Solver for Low Mach Number Flows." ECCOMAS computational fluid dynamics conference.

Giles, M, B., and Pierce, N. A. (2001), "Analytic Adjoint Solutions for the quasi-one-dimensional Euler equations," Journal of Fluid Mechanics, Vol. 426, 327-345.

Hicks, R. M., and Henne, P. A. (1978), "Wing Design by Numerical Optimization." Journal of Aircraft, Vol.15(7), 407-412.

Jameson, A. (1988), "Aerodynamic design via control theory," Journal of scientific computing, Vol. 3(3), 233-260.

Pironneau, O.(1984), Optimal Shape Design for Elliptic System, Springer, New York. Palacios, F., et al. (2014), "Stanford University Unstructured (SU2): Open-source

Analysis and Design Technology for Turbulent Flows," 52nd Aerospace Science Meeting, AIAA 2014-0243, Maryland.

Roe, R. L. (1981), "Approximate Riemann Solvers, Parameter Vector and Difference Scheme", Journal. of Computational Physics, Vol. 43(2), 357-372.

Thomas D. E., and Francisco, P. (2014), “An Unsteady Continuous Adjoint Approach for Aerodynamic Design on Dynamic Meshes,” 15th AIAA/ISSMO Multidisciplinary Analysis and Optimization Conference, AIAA 2014-2300, Atlanta.

Turkel, E. (1987), "Preconditioned Methods for Solving the Incompressible and Low Speed Compressible Equations," Journal of computational physics, Vol. 72(2), 277-298.

Van Leer, B. (1972), "Towards the Ultimate Conservative Difference Scheme. V. A Second Order Sequel to Godunov's Method", Journal of Computational Physics, Vol. 32, 101-136.

Weiss, J. M., and Smith, W. A. (1995), "Preconditioning Applied to Variable and Constant Density Flows." AIAA journal, Vol. 33(11), 2050-2057.