33
American Institute of Aeronautics and Astronautics 1 Finite-Difference Sensitivity Calculation in Iteratively Solved Problems S. Eyi 1 Middle East Technical University, Ankara, 06531,Turkey In this study, the accuracy of the finite-difference sensitivities is examined in iteratively solved problems. The aim of this research is to reduce the error in the finite difference sensitivity calculations. The norm value of the finite-difference sensitivity error in the state variables is minimized with respect to the finite-difference step size. The optimum finite- difference step size is formulated as a function of the norm values of both convergence error and higher order sensitivities. In order to calculate the optimum step size, two methods are introduced. The first method is developed to calculate the convergence error in iteratively solved problem and it is based on the eigenvalue analysis of linear systems, but it can also be used for nonlinear systems. The second method is developed to estimate the higher order sensitivities which are calculated by differentiating the approximately constructed differential equation with respect to the design variables. The results show that with the proposed method, the convergence error can be accurately estimated for both linear and non-linear problems. The accuracy of the method developed for the higher order sensitivity estimation is validated with the finite-difference method. The comparison of the sensitivities calculated with the analytical and the finite-difference methods show that the developed methods can accurately estimate the optimum step size. The effects of the sensitivities calculated with the developed methods on the convergence of inverse design are examined. The results show that estimating the optimum step size with the developed methods improves the convergence of design without significantly increasing the usage of CPU time and memory of computers. Nomenclature E = total error ˆˆ , uv = grid velocities x = grid coordinate vector X = design variable vector , βγ = coefficients used in higher order sensitivity estimation ξ,η = coordinates in computational space ε = convergence error δ = correction vector ψ = objective function ϕ = eigenvector λ = eigenvalue I. Introduction n recent years, there has been a great effort expended in the development of design methods using Computational Fluid Dynamics (CFD). Among these methods, design optimization methods have some advantages since an optimum shape having certain characteristics can be generated while satisfying certain design constraints. The algorithms used in the optimization and CFD are independent of each other, and any of the optimization and CFD 1 Associate Professor, Department of Aerospace Engineering, Middle East Technical University, 06800, Ankara Turkey. I 20th AIAA Computational Fluid Dynamics Conference 27 - 30 June 2011, Honolulu, Hawaii AIAA 2011-3071 Copyright © 2011 by the American Institute of Aeronautics and Astronautics, Inc. All rights reserved.

[American Institute of Aeronautics and Astronautics 20th AIAA Computational Fluid Dynamics Conference - Honolulu, Hawaii ()] 20th AIAA Computational Fluid Dynamics Conference - Finite-Difference

  • Upload
    sinan

  • View
    214

  • Download
    2

Embed Size (px)

Citation preview

Page 1: [American Institute of Aeronautics and Astronautics 20th AIAA Computational Fluid Dynamics Conference - Honolulu, Hawaii ()] 20th AIAA Computational Fluid Dynamics Conference - Finite-Difference

American Institute of Aeronautics and Astronautics

1

Finite-Difference Sensitivity Calculation in Iteratively Solved Problems

S. Eyi 1 Middle East Technical University, Ankara, 06531,Turkey

In this study, the accuracy of the finite-difference sensitivities is examined in iteratively solved problems. The aim of this research is to reduce the error in the finite difference sensitivity calculations. The norm value of the finite-difference sensitivity error in the state variables is minimized with respect to the finite-difference step size. The optimum finite-difference step size is formulated as a function of the norm values of both convergence error and higher order sensitivities. In order to calculate the optimum step size, two methods are introduced. The first method is developed to calculate the convergence error in iteratively solved problem and it is based on the eigenvalue analysis of linear systems, but it can also be used for nonlinear systems. The second method is developed to estimate the higher order sensitivities which are calculated by differentiating the approximately constructed differential equation with respect to the design variables. The results show that with the proposed method, the convergence error can be accurately estimated for both linear and non-linear problems. The accuracy of the method developed for the higher order sensitivity estimation is validated with the finite-difference method. The comparison of the sensitivities calculated with the analytical and the finite-difference methods show that the developed methods can accurately estimate the optimum step size. The effects of the sensitivities calculated with the developed methods on the convergence of inverse design are examined. The results show that estimating the optimum step size with the developed methods improves the convergence of design without significantly increasing the usage of CPU time and memory of computers.

Nomenclature E = total error ˆ ˆ,u v

= grid velocities

x = grid coordinate vector X = design variable vector

,β γ = coefficients used in higher order sensitivity estimation ξ,η = coordinates in computational space ε = convergence error δ = correction vector ψ = objective function

ϕ = eigenvector

λ = eigenvalue

I. Introduction n recent years, there has been a great effort expended in the development of design methods using Computational Fluid Dynamics (CFD). Among these methods, design optimization methods have some advantages since an

optimum shape having certain characteristics can be generated while satisfying certain design constraints. The algorithms used in the optimization and CFD are independent of each other, and any of the optimization and CFD

1 Associate Professor, Department of Aerospace Engineering, Middle East Technical University, 06800, Ankara Turkey.

I

20th AIAA Computational Fluid Dynamics Conference27 - 30 June 2011, Honolulu, Hawaii

AIAA 2011-3071

Copyright © 2011 by the American Institute of Aeronautics and Astronautics, Inc. All rights reserved.

Page 2: [American Institute of Aeronautics and Astronautics 20th AIAA Computational Fluid Dynamics Conference - Honolulu, Hawaii ()] 20th AIAA Computational Fluid Dynamics Conference - Finite-Difference

American Institute of Aeronautics and Astronautics

2

codes can be coupled together. Even though design optimization methods have many advantages, there are several important issues to be resolved for optimization methods to become more efficient and reliable.

Sensitivity calculation is one of the most important aspects of gradient-based design optimization. Sensitivities are the gradients of the objective and constraint functions with respect to the design variables. In design optimization, most of the computational cost is related to the sensitivity analysis. The convergence of design optimization can be significantly enhanced by improving the accuracy of sensitivities. There are two methods to calculate sensitivities; analytical and finite-difference. In the analytical method, a sensitivity code is developed by taking the derivatives of the analysis code with respect to the design variables. The analytical method provides accurate and efficient sensitivity calculations. However using this method is not easy; developing a sensitivity code requires considerable amount of programming effort. The analytical method is more efficient if the analysis code uses an implicit numerical solution method 1,2. Unfortunately, many CFD codes use explicit solution methods, and this degrades the efficiency of analytical sensitivity calculations. On the other hand, in the finite-difference method, sensitivities are calculated by using any finite-difference stencil. The main advantage of the finite-difference method is that it does not require an additional programming effort to build a dedicated sensitivity code. Although, finite-difference sensitivity calculations have accuracy problems the ease of implementation makes this method a popular choice for many design optimization applications.

The main objective of this study is to improve the accuracy of finite-difference sensitivities in iteratively solved problems. Many factors can affect the accuracy of finite-difference sensitivities. For example, using a computer processor or a compiler that has higher precision or employing a higher order finite-difference stencil may reduce the errors in sensitivities. In iteratively solved problems, the accuracy of sensitivities can also be improved by evaluating the objective and constraint functions from a highly converged solution. However, these improvements may result in an increase in computer memory use and CPU time. For a given stencil, the finite-difference step size is another important factor that affects the accuracy of sensitivities. Studies related to the accuracy improvement of finite-difference sensitivities are not new. Gill et al.3,4 developed a method to compute the optimum step size for finite-difference sensitivity calculations, later, Iott et al.5 implemented similar methods for the structural design of a swept wing. Haftka6 also introduced a modified finite-difference approach that reduces the condition error in sensitivities. Barton7 developed a dynamic step size adjustment method to find the optimum step size as the optimization progresses. The finite-difference sensitivities can also be calculated with a complex variable approach8. In this approach, sensitivities are almost independent of step size, but the computation time and memory requirement are significantly increased.

In iteratively solved problems, errors in finite-difference sensitivity calculations may come from three different sources. The first source is the round-off error due to the finite arithmetic precision of computer and it depends on the type of computer processor and compiler. The second is the convergence error that can be defined as the difference between the exact and iterative solutions of discretized governing equations. Here, the exact solution is defined as the solution that exactly satisfies the discretized governing equations with a zero residual. Although it is not always possible to reduce the residual to the desired level, the convergence error can be reduced by solving the discretized governing equations with smaller residual tolerance. In practice, finite–difference sensitivities are evaluated when the residual norm has been reduced by three or four orders of magnitude from its original size. For these residual reductions, the convergence error in solutions can be much larger than the round-off error; hence the contribution of the round-off error can be neglected. The third source of error in finite-difference sensitivities is the truncation error and it results from neglected terms in the Taylor series expansion. A truncation error depends on the accuracy of the finite-difference stencil used in the sensitivity evaluations, and the finite-difference step size. In iteratively solved problems, when the round-off error is neglected, the total error can be defined as the summation of the convergence and truncation errors. In the present study, a method is developed to find the optimum step size that can minimize the norm value of total error in finite difference sensitivities. Although the methods presented in this study and in Ref. 3,4 are similar, these methods are implemented for different types of problems. The motivation in this study is to find the optimum step size in iteratively solved problems as opposed to the non-iterative problems presented in Ref. 3,4. In the present method, the calculation of the optimum step size is dependent on two terms; the norm values of the convergence error and the norm values of the higher order sensitivities.

Having established how to minimize the error in finite-difference sensitivities, the next step is to estimate the norm values of the convergence error and higher order sensitivities. There is a great interest in estimating the convergence error not only to improve the accuracy of sensitivity calculations, but also to determine the stopping criterion of iteratively solved problems. Knowing when to stop the iteration is important in terms of computational efficiency and accuracy. In most of the iteratively solved problems, the reduction in the residual is used as the stopping criterion. Unfortunately, the reduction in the residual may not be a reliable measure for the convergence error. Ferziger and Peric9 used eigenvalue analysis assuming that the system of nonlinear equation has linear

Page 3: [American Institute of Aeronautics and Astronautics 20th AIAA Computational Fluid Dynamics Conference - Honolulu, Hawaii ()] 20th AIAA Computational Fluid Dynamics Conference - Finite-Difference

American Institute of Aeronautics and Astronautics

3

behavior as it gets closer to the converged solution. Bergsrtrom, and Gebart10 implemented the same method to estimate the convergence error for a flow problem in a draft tube. Roy et al.11 used an exponential equation to estimate the convergence error of hypersonic flow problems. Alekseev12 calculated the convergence error using an adjoint parameter and time derivative. In the present study, a new method is developed that estimates the convergence error in iteratively solved problems. The method is based on the eigenvalue analysis of linear systems, as presented by Feziger and Peric9. An equation is developed between the convergence error and correction vectors. The convergence error vector is expressed as the linear combination of the correction vectors and the coefficients of the correction vectors are calculated by the least-square minimization of the derived equation.

In addition to the convergence error, the norm value of higher order sensitivities is also needed for the calculation of optimum step size. Although the finite-difference method can be used for this purpose, the significant increase in the computation time is the main obstacle. In the present study, higher order sensitivities are approximated from the previously calculated lower order sensitivities. In recent years, there has been a growing interest in using approximate solutions in the design optimization of computationally expensive problems. Computer experiments13 and surrogate models14,15 are frequently used to approximate the original analysis codes. In the present study, an approximate differential equation is developed using the available state variable sensitivities. To estimate the coefficients of this differential equation the least-square method is employed. This method is extensively used in the estimation of the coefficients of differential equations16-18. Once the differential equation is constructed, higher order sensitivities are approximately evaluated by differentiating the differential equation with respect to the design variables.

The remainder of this paper is organized as follows. In section 2, first, the sources of error in finite-difference sensitivities are analyzed for iteratively solved problems. Then, the methods developed for the estimations of convergence error and higher order sensitivities are explained. In the last part of section 2, the analytical sensitivity method that is used to validate the accuracy of finite-difference sensitivities is presented. In section 3, first the accuracy of the convergence error estimation method is demonstrated for Laplace, Euler and Navier-Stokes equations. Next, the performance of the higher order sensitivity estimation method is investigated. Later, the accuracy of the optimum step size estimation with the proposed methods is demonstrated. Finally, the effects of the finite-difference sensitivity error on the convergence of inverse aerodynamic design are presented. The conclusion is given in section 4.

II. Sensitivity analysis In shape optimization problems, the objective function ψ can be written in the following form:

( ) ( ),wψ ψ= X x X , (1)

wherew and x are the state variable and grid coordinate vectors, respectively. In the solution of flow equations, the state variables are the flow variables. In general, the state variables and grid coordinates are the functions of the design variable vector, X. Although, in many shape optimization problems, the objective function may be evaluated directly without knowing the detailed functional relation between the objective function and state variables, the formulation shown in Eq. (1) may be useful to analyze the accuracy of sensitivities. The sensitivity of the objective function with respect to ith component of design variable vector can be calculated by taking the derivative of the objective function with respect to this component,

i i iX X X

d dw d

d w d d

ψ ψ ψ∂ ∂= +∂ ∂

xx

. (2)

The sensitivity equation above includes two types of derivatives, explicit and implicit. The former are easy to evaluate, because the function whose derivative is taken can be written as an explicit relation of the independent variables. In Eq. (2), the explicit derivatives are / wψ∂ ∂ , /ψ∂ ∂x and i/ Xd dx . In implicit derivatives, the

function whose derivative is taken implicitly depends on the independent variables. The calculation of implicit derivatives may be more difficult and erroneous compared to explicit derivatives. In the same equation, the implicit derivatives are the sensitivities of the state variables, i/ Xdw d , and they are usually calculated using an iterative

solution technique. One of the objectives of this study is to improve the accuracy of finite-difference calculations of implicit sensitivity terms. Therefore, in the following sub-sections, first, the errors that occur in the implicit part of the finite-difference sensitivities are analyzed. Later, the methods developed to estimate the convergence error and higher order sensitivities are introduced. These methods are used in the calculation of the optimum finite-difference step size.

Page 4: [American Institute of Aeronautics and Astronautics 20th AIAA Computational Fluid Dynamics Conference - Honolulu, Hawaii ()] 20th AIAA Computational Fluid Dynamics Conference - Finite-Difference

American Institute of Aeronautics and Astronautics

4

A. Finite-difference sensitivity analysis The sensitivities of the state variables can be calculated using any finite-difference stencil. In a first order

forward-difference scheme, the sensitivity vector with respect to the ith component of design variable can be calculated as:

( ) ( )iX

i

i

w X ww

X

+ ∆ −∆ =∆ ∆

X X, (3)

where ( )w X and ( )iw X+ ∆X are the state variable vectors for the base and perturbed geometries and they are

assumed to be calculated from the exact solution of discretized governing (flow) equations. Here, the exact solution is defined as the solution that exactly satisfies the discretized governing equations with a zero residual. The finite-difference sensitivities calculated using the exact values of state variables have truncation error due to neglected terms in the Taylor series expansion,

22i

2i

X...

X 2i i

w dw d w

dX dX

∆∆ = + +∆

, (4)

where / idw dX and 2 2/ id w dX are the first and second order analytical sensitivity vectors, and are assumed to have

been evaluated by solving the first and the second order sensitivity codes around the base geometry. Sensitivity codes can be developed by analytically differentiating the discretized form of governing equations with respect to the design variables.

An exact solution of discretized governing equations is only available for certain special problems. The calculation of the exact solution for an arbitrary problem is difficult. In general, the state variables used in finite-difference stencils are calculated from an iterative solution of discretized governing equations. Although the residual can be reduced to very small values, the solution obtained from an iterative method does not exactly satisfy the discretized governing equations. There are two main types of errors in the iterative calculation of state variables. The first type is the round-off error which occurs because the state variables are calculated after millions of mathematical operations using a computer that can handle a fixed number of digits. The inaccuracy due to the finite precision may create a round-off error in the state variables. The round-off error is related to the precision error, which depends on the type of computer processor and compiler. The precision is defined according to the machine epsilon, which is the smallest number a computer can recognize. The machine epsilon is a very small number; for example, in this study, it has a value of 175. 10−× . The second type is the convergence error. In iteratively solved problems, the state variables are evaluated after the residual in discretized governing equations is reduced to a certain fraction of its original size. Solving equations with a finite amount of residual may result in error in the state variables, and this is called convergence error. In most of engineering applications, iterations stop long before residual has reached the round off error level. In these applications, the magnitude of the round-off error is much smaller than that of the convergence error; hence, the round off error can be neglected.

Let, ( )w X% and ( )iw X+ ∆X% denote the iteratively computed values of ( )w X and ( )iw X+ ∆X . The

relations between the computed and exact values of the state variable vectors can be written as:

( ) ( ) ( )w w ε= +X X X% , (5)

( ) ( ) ( )i i iw X w X Xε+ ∆ = + ∆ + + ∆X X X% ,

where ( )ε X and ( )iXε + ∆X are the convergence error vectors for the base and perturbed geometries. Then,

sensitivities with the computed state variable vectors can be calculated as:

( ) ( )

iXi

i

w X ww

X

+ ∆ −∆ =∆ ∆

X X% %% . (6)

The relation between the computed and exact finite-difference sensitivities becomes,

( ) ( )i

i i i

Xw w

X X X

ε ε+ ∆ −∆ ∆= +∆ ∆ ∆

X X% . (7)

Substituting Eq (4) into the equation above gives a relation between the computed finite-difference and analytical sensitivities,

( ) ( ) ( ) ( )2

2 2ii

i i ii

dw d w XXw

X dX XdX

ε ε+ ∆ −∆∆ = + + +∆ ∆

X X X X%L

. (8)

Page 5: [American Institute of Aeronautics and Astronautics 20th AIAA Computational Fluid Dynamics Conference - Honolulu, Hawaii ()] 20th AIAA Computational Fluid Dynamics Conference - Finite-Difference

American Institute of Aeronautics and Astronautics

5

Defining the total error vector, E, as the difference between the computed finite-difference and analytical sensitivities, Eq. (8) can be written as:

( )i i

dwwE

X dX

∆ = +∆

X%. (9)

Here, / idw dX are the analytical sensitivities that are calculated by solving the analytical sensitivity code for the

base geometry grid. The analytical sensitivity code is developed by differentiating discretized-governing-equations with respect to the design variables. The total error vector has two parts: the truncation and convergence errors,

( ) ( ) ( )2

2 2ii

ii

d w XXE

XdX

ε ε+ ∆ −∆= + +

∆X X X

L

. (10)

Considering the extreme case when the convergence errors for the perturbed and base geometries have the same magnitude but opposite signs, and neglecting the higher order sensitivities, the error vector can be approximated as:

( ) ( )2

2

2

2i

ii

d w XE

XdX

ε∆= +

∆X X

. (11)

Taking the norm values of both sides and applying the triangle inequality, the norm value of the total error vector can be expressed as a function of the norm values of second order sensitivity and convergence error vectors, and the step size,

( ) ( )2

2

2

2i

ii

d wXE

XdXε∆

≤ +∆

XX

. (12)

The right hand side of Eq. (12) gives the upper limit of the norm value of the total error vector. Minimizing the right hand side of the equation also minimizes the total error in forward-difference sensitivities. Taking the derivative of the right hand side of Eq. (12) with respect to step size, iX∆ , and solving the resulting equation yield the optimum step size as:

( )( )2

2

2 k

iopt

k

i

Xd w

dX

ε∆ =

X

X

. (13)

Substituting Eq. (13) into the right hand side of Eq. (12), gives the norm value of total error vector evaluated with optimum step size,

( ) ( ) ( )2

22 k

iopt ki

d wE X

dXε∆ ≤

XX

. (14)

Similar to the forward-difference method, the optimum step size in the central-difference method can be evaluated as:

( )( )3

3

3

3 k

iopt

k

i

Xd w

dX

ε∆ =

X

X . (15)

In the central-difference method, sensitivities can be evaluated with minimum error when the optimum step size, given above, is used. The minimum total error in the central-difference method can be evaluated as:

( ) ( )( ) ( )22

32

19

2k

iopt ki

d wE X

dXε∆ ≤

XX . (16)

In the first order sensitivity calculations, the magnitude of the optimum step size and the resulting sensitivity error are functions of the norm values of the convergence error and higher order state sensitivities. In the past, similar relations were proposed to calculate the optimum step size for scalar objective functions3,4. In most of the previous studies, the objective functions were evaluated directly without using an iterative solution technique. As a consequence, only the round off error was considered in the calculation of the objective functions. In iteratively solved problems, in addition to the round off error the convergence error has to be considered. There are limited studies on the calculation of the optimum step size for iteratively calculated vector valued functions thus, the

Page 6: [American Institute of Aeronautics and Astronautics 20th AIAA Computational Fluid Dynamics Conference - Honolulu, Hawaii ()] 20th AIAA Computational Fluid Dynamics Conference - Finite-Difference

American Institute of Aeronautics and Astronautics

6

motivation in this study is to calculate the optimum step size for state variable vector that is evaluated using an iterative solution method.

B. Convergence error estimation The calculation of the optimum finite-difference step size requires the norm values of the convergence error. In

this section, a new method is developed to estimate the convergence error in iteratively solved problems. Although the developed method is based on the eigenvalue analysis of linear systems, the method can also be used for nonlinear systems, especially during near convergence when nonlinear systems behave like linear systems and for which the error estimation is needed most.

In this section, first, the iterative solution of the system of linear equations is reviewed. Similar reviews can also be found in Refs. 19,20. Let define the system of linear equations in the following form:

Aw b= . (17) In the equation above, w is the exact solution of the system. An iterative scheme can be constructed by splitting

matrix A as follows: A M N= − . (18) In this splitting, M is chosen so that the system can be easily solvable with an iterative scheme,

1n nMw Nw b+ = +% % , (19)

where nw% is the iterative solution of the state variable vector after n iterations. Since w is the exact solution of the system, it also satisfies the iterative scheme given in Eq. (19)

Mw Nw b= + . (20) At iteration n, the convergence error vector can be defined as the difference between the iterative and exact

solution vectors, n nw wε = −% . (21)

Defining the correction vector nδ as, 1n n nw wδ += −% % , (22)

and using Eq. (21), the following relation between the correction and convergence error vectors can be written, thus,

1n n nδ ε ε+= − . (23) Subtracting Eq. (20) from Eq. (19) gives a relation between the convergence error vectors of two successive

iterates, 1 1n nM Nε ε+ −= . (24)

The iterative method converges if the spectral radius of the matrix 1M N− is lower than one. The convergence of the iterative scheme can be analyzed with the use of eigenvalues, λk, and eigenvectors, kϕ ,

1k k kM Nϕ λ ϕ− = , k=1, KMAX , (25)

where KMAX is the number of state variables in the system. For the case of complex eigenvalues, the following equation is also satisfied: 1 * * *

k k kM Nϕ λ ϕ− = , k=1, KMAX , (26)

where *kλ , and *

kϕ are the complex conjugate of the eigenvalues and eigenvectors, respectively. Most of the time,

iterative methods have complex eigenvalues. Considering the more general case and assuming real numbers as the special case of complex numbers, in the present derivation, complex eigenvalues and eigenvectors are used. Using the linearly independent eigenvectors, the initial error 0ε may be expressed as a linear combination of eigenvectors:

0 * *

1

KMAX

k k k kk

a aε ϕ ϕ=

= +∑ , (27)

where ka and *ka are generalized Fourier coefficients. The combination of Eqs. (24) and (27) yields:

( )1 1 * *

1

KMAX

k k k kk

M N a aε ϕ ϕ−

=

= +∑ , (28)

Substituting Eqs. (25) and (26) into equation above gives ,

Page 7: [American Institute of Aeronautics and Astronautics 20th AIAA Computational Fluid Dynamics Conference - Honolulu, Hawaii ()] 20th AIAA Computational Fluid Dynamics Conference - Finite-Difference

American Institute of Aeronautics and Astronautics

7

1 * * *

1

KMAX

k k k k k kk

a aε λ ϕ λ ϕ=

= +∑ . (29)

By induction, the error vector at iteration n, can be written as:

( ) ( )* * *

1

KMAX nnnk k k k k k

k

a aε λ ϕ λ ϕ=

= +∑ . (30)

After a number of iterations, the contribution of the largest eigenvalue λ1 becomes more significant, and the error vector can be approximated as:

( ) ( )* * *1 1 1 1 1 1

nnn a aε λ ϕ λ ϕ= + . (31)

In the present study, the following method is developed to estimate the convergence error. Rearranging Eq. (31) yields a relationship between the convergence error vectors at iteration n+1, n and n-1:

( )1 * * 11 1 1 1

n n nε λ λ ε λ λ ε+ −= + − . (32)

It is not difficult to show that the convergence error vector can be expressed as a function of the correction vectors,

( )( )

* * * 11 1 1 1 1 11

* *1 1 1 1 1

n n

nλ λ λ λ δ λ λ δ

ελ λ λ λ

−+

+ − −=

+ − − . (33)

Substituting Eq. (23) into Eq. (32) gives the following relationship between the correction vectors at iteration n, n-1 and n-2,

( )* 1 * 21 1 1 1

n n nδ λ λ δ λ λ δ− −= + − . (34)

The coefficients C1 and C2 as functions of eigenvalues are defined in the following form: *

1 1 1C λ λ= + , (35)

( )*2 1 1C λ λ= − .

In the equation given above, 1C and 2C are real numbers. The convergence error defined in Eq. (33) can be written

as a function of these coefficients:

( ) 1

1 2 21

1 2 1

n nn C C C

C C

δ δε

−+ + +

=+ −

. (36)

Similarly, Eq. (34) becomes: 1 2

1 2n n nC Cδ δ δ− −= + . (37)

In the calculation of the convergence error vector, first, the coefficients C1 and C2 are determined from the least-square solution of Eq. (37). Then, using Eq. (36), the error vector can be calculated as a function of the correction vectors of two successive iterations. In order to calculate the coefficients, the correction vectors from the current and previous two iterations must be stored. In this method, the calculation of the values of eigenvalues is not required because the values of coefficients C1 and C2 are sufficient to determine the convergence error vector. Increasing the number of eigenvalues may improve the convergence error estimation. For example, approximating Eq. (30) by using the first and second largest eigenvalues, the convergence error can be calculated as:

( ) ( ) ( ) ( )* * * * * *1 1 1 1 1 1 2 2 2 2 2 2

n nn nn a a a aε λ ϕ λ ϕ λ ϕ λ ϕ= + + + . (38)

The following relation can be derived to calculate the convergence error vector at iteration n+1:

( ) ( ) ( ) ( )1 2 3

1 2 3 4 2 3 4 3 4 41

1 2 3 4 1

n n n nn C C C C C C C C C C

C C C C

δ δ δ δε

− − −+ + + + + + + + + +

=+ + + −

. (39)

In the equation given above, 1C , 2C , 3C , and 4C are real numbers. Similarly, the relation between the correction

vector at iteration n and the correction vectors at iterations n-1, n-2, n-3, and n-4 can be written as: 1 2 3 4

1 2 3 4n n n n nC C C Cδ δ δ δ δ− − − −= + + + . (40)

In parallel with the previous derivations, the coefficients C1, C2, C3, and C4 in Eq. (39) are the functions of eigenvalues and these coefficients are calculated from the least-square solution of Eq. (40),

* *1 1 1 2 2C λ λ λ λ= + + + , (41)

( )* * * * * *2 1 1 1 2 1 2 1 2 1 2 2 2C λ λ λ λ λ λ λ λ λ λ λ λ= − + + + + + ,

* * * * * *3 1 1 2 1 1 2 1 2 2 1 2 2C λ λ λ λ λ λ λ λ λ λ λ λ= + + + ,

Page 8: [American Institute of Aeronautics and Astronautics 20th AIAA Computational Fluid Dynamics Conference - Honolulu, Hawaii ()] 20th AIAA Computational Fluid Dynamics Conference - Finite-Difference

American Institute of Aeronautics and Astronautics

8

( )* *4 1 1 2 2C λ λ λ λ= − .

In the calculation of these coefficients, the correction vectors must be stored from the current and last four iterations. As explained above, in the calculation of the convergence error vector, the values of eigenvalues are not required. The convergence error vector can be calculated as a function of coefficients C1, C2, C3, and C4. The relations given above can be generalized for an arbitrary number of eigenvalues. If Meigen is the number of eigenvalues used in Eq. (30), the convergence error can be approximated as:

( ) ( ) ( ) ( )* * * * * *1 1 1 1 1 1 ...

eigen eigen eigen eigen eigen eigen

n nnnnM M M M M Ma a a aε λ ϕ λ ϕ λ ϕ λ ϕ= + + + + . (42)

By induction, the convergence error vector can be generalized for an arbitrary number of eigenvalues, Meigen, as:

( )2 2 2

2 11 22

1 2 312

1

...

1

eigen eigen eigen

eigen

eigen

M M Mn Mn n n

m m m Mm m mn

M

mm

C C C C

C

δ δ δ δε

− +− −

= = =+

=

+ + + +

=−

∑ ∑ ∑

∑ . (43)

Similarly, the correction vector can be generalized as:

2

1

eigenMn n m

mm

Cδ δ −

=

= ∑ . (44)

As previously explained, the coefficients Cm in Eq. (43) are real numbers, and they are determined from the least-square solution of Eq. (44). In the calculation of the coefficients, the correction vectors from the current and last 2Meigen iterations must be stored. Although, increasing the number of eigenvalues may improve the accuracy of convergence error estimation, this improvement may also result in an increase in the amount of memory required to store the correction vectors from the previous iterations.

C. Higher order sensitivity estimation In a finite-difference scheme, estimating the optimum step size for the first order sensitivity calculations requires

the norm values of higher order sensitivities. As stated in Eqs. (13) and (15), the optimum step sizes in forward and central-difference schemes are inversely proportional to the norm values of the second and third order sensitivities, respectively. One of the easiest approaches is to approximate the norm values of the higher order sensitivities as a unity. However, this approximation may result in obtaining the wrong step sizes and thus, this may degrade the accuracy of sensitivities. Another approach for calculating the higher order sensitivities is to use the finite-difference method. Although this method is more accurate, the calculation of higher order sensitivities requires additional function evaluations and step size estimation. An algorithm for estimating an appropriate step size for the second order sensitivities of a scalar objective function is given in Refs. 3,4. In this algorithm, the optimum step size is decided if the values of the relative condition error are within an acceptable range (.001-.1). Even though this method is useful for estimating the step size of the second order sensitivities, satisfying the relative condition error in a given range may require several function evaluations and may significantly increase the computational cost. Therefore, using a finite-difference method to estimate the second order sensitivities may not be very practical if there is a large number of design variables. In the design optimization of complex and computationally expensive systems, computer experiments and statistical methods are frequently used13-15. The basic approach in these methods is the construction an approximate or surrogate model of the computationally expensive analysis code. In the present study, an approximate method is developed to estimate the norm values of the higher order state sensitivities. Here, the intention is not to achieve highly accurate calculations of higher order sensitivities but to estimate the order of magnitude without significantly increasing the computer’s CPU time and memory usages. Most of the laws in physics and technology are governed by simple linear relationships between the function and its first order derivative. Although different types of approximation are possible, the following approximate differential equation is constructed because of its simplicity.

( ) ( ) 0i ii

dww

dXβ γ+ − =

XX , (45)

Page 9: [American Institute of Aeronautics and Astronautics 20th AIAA Computational Fluid Dynamics Conference - Honolulu, Hawaii ()] 20th AIAA Computational Fluid Dynamics Conference - Finite-Difference

American Institute of Aeronautics and Astronautics

9

where ( )w X and ( ) / idw dXX are the state variable and the first order sensitivity vectors of i th design variable,

respectively. The coefficients iβ and iγ are constants to be determined by a least-square method. The following

function, iF , is minimized for the known values of the k th state variables and sensitivities, 2

1

KMAXk

i i i kk i

dww

dXβ γ

=

= + −

F , (46)

where KMAX is the size of the state variable or sensitivity vectors. Taking the derivatives of the above equation with respect to the coefficients of βι and γι, and setting the resulting equations to zero, a system of equations can be constructed. Once the unknown coefficients, βι and γ, are calculated, the differential equation given in Eq. (45) is differentiated with respect to design variables Xi and the second-order sensitivities can be calculated as:

2

2k k

iii

d w dw

dXdXβ

=

. (47)

In the equation above, evaluating the value of βι from Eq. (45) gives another relation for the second order sensitivities:

( )22

2k k

k iii

d w dww

dXdXγ

= −

. (48)

The second order state sensitivities calculated with Eqs. (47) and (48) have the same value if the coefficients, βι and γι, exactly satisfy Eq. (45). However, if the coefficients are calculated with a least-square approximation, the differential equation is not exactly satisfied, and the Eqs. (47) and (48) may give different values. In the present study, the geometric mean of Eqs. (47) and (48) is used to estimate the magnitude of second order sensitivities,

( )

3

2

2

k

ik

i k ii

dw

dXd w

wdX β γ

=

− . (49)

In the equation above, if the value inside the square root is negative, it may not be possible to estimate the second order sensitivities. For the present study, if this is the case, these data are excluded in the calculation of the norm values of the second order sensitivities. Estimating the optimum step size for the central-difference scheme requires norm values of the third order sensitivities. The third order sensitivities can be estimated by twice differentiating the approximate differential equation. Similar to the derivations of Eqs., (47) and (48), two equations can be derived to estimate the third order sensitivities. The geometric mean of these equations can be used to calculate the third order sensitivities,

( )

22

23

3

k k

iik

i k ii

d w dw

dXdXd w

wdX β γ

=

− . (50)

As in the forward-difference scheme, the coefficients, iβ and iγ , in the above equation can be estimated from the

least-square minimization of Eq. (45). However, in the central-difference scheme, a better method is available to estimate of these coefficients. The following differential equation can be constructed by differentiating Eq. (45), with respect to design variable, Xi ,

2

20k k

iii

d w dw

dXdXβ − = . (51)

In the equation given above, the second order sensitivities can be evaluated using the information available from the calculation of the first order sensitivities with the central-difference scheme. Hence, in the central-difference scheme, in addition to Eq. (45), Eq. (51) can also be minimized with respect to the coefficients,iβ and iγ . In this

study, for the central-difference scheme, the following function is minimized to evaluate the coefficients, iβ and iγ , 22 2

21

KMAXk k k

i i i k ik i ii

dw d w dww

dX dXdXβ γ β

=

= + − + −

∑F . (52)

Page 10: [American Institute of Aeronautics and Astronautics 20th AIAA Computational Fluid Dynamics Conference - Honolulu, Hawaii ()] 20th AIAA Computational Fluid Dynamics Conference - Finite-Difference

American Institute of Aeronautics and Astronautics

10

The main advantage of using the approximate method is that the increases in computer memory and CPU time for the higher order sensitivity calculations are almost negligible. In the approximate method, a 2x2 matrix is solved for each design variables. Once the coefficients, βι and γι, are evaluated, the second and third order state sensitivities can be calculated using Eqs. (49) and (50), respectively. In design optimization, the following procedures can be used in the implementation of the approximate method for the optimum step size calculation. At the first iteration of the design, the optimum step sizes can be calculated by assuming the norm values of the higher order sensitivities to be a unity. Starting from the first iteration, after the first order sensitivities are evaluated, the approximate method can be used to estimate the higher order sensitivities. Assuming that the norm values of the higher order sensitivities do not change significantly from one design iteration to next, the norm values evaluated from the previous iteration can be used to estimate the optimum step size in the current iteration. In this study, the accuracy of the approximate method is validated with the finite-difference method. The algorithm given in Ref. 3,4 is modified to calculate the finite-difference step size of the higher order sensitivities for vector valued functions. The original algorithm is used to calculate the finite-difference step size of the second order sensitivities for scalar objective functions. In the modified algorithm, the absolute values of scalar functions are replaced by the norm values of vector functions.

D. Analytical sensitivity analysis In this study, analytical sensitivities are used to validate the accuracy of the finite-difference sensitivities. To develop the analytical sensitivity code, the discretized Euler equations used in finite-difference sensitivity calculations are differentiated with respect to the design variables. A brief description of the analytical sensitivity method is presented below. The detailed information about the method can be found in Ref. 21.

The two-dimensional unsteady Euler equations in the Cartesian coordinates can be written as:

0w f g

t x y

∂ ∂ ∂∂ ∂ ∂

+ + = , (53)

where w, f, and g are the flow variable vector, and flux vectors in the x and y directions, respectively. The system given above can be transformed from a physical space (x,y) to a computational space (ξ,η) as:

0W F G

t

∂ ∂ ∂∂ ∂ξ ∂η

+ + = , (54)

where W wh= , h x y x yξ η η ξ= − ,

F fy gxη η= − , G gx fyξ ξ= − .

In the above equations, xξ , yξ , xη , and yη are the transformation metrics, and h is the Jacobian of the

transformation. The characteristic boundary conditions are used for the far-field. On an airfoil surface, zero normal mass fluxes are enforced, and the pressures are extrapolated using the normal momentum equation. In analytical sensitivity calculations, the material derivative approach is used in which the sensitivity of a flow variable consists of two parts. The first is the rate of change of the flow variable at a fixed point of domain and often referred as the local sensitivity, denoted as / iw X∂ ∂ . The second part is the convective part, representing the change

due to the variation of the domain itself,

ˆi i

dw wV w

dX X

∂= + ⋅∇∂

. (55)

here V is called the design shape velocity or grid velocity and its components u and v can be defined as:

( )ˆ ˆ ˆ,V u v= , ˆi

dxu

dX= , ˆ

i

dyv

dX= . (56)

In order to calculate analytical sensitivities, Eq.(53) is differentiated with respect to design variables, iX ,

0i

d w f g

dX t x y

∂ ∂ ∂∂ ∂ ∂

+ + =

. (57)

The equation above can be written in generalized coordinates as:

Page 11: [American Institute of Aeronautics and Astronautics 20th AIAA Computational Fluid Dynamics Conference - Honolulu, Hawaii ()] 20th AIAA Computational Fluid Dynamics Conference - Finite-Difference

American Institute of Aeronautics and Astronautics

11

0W F G

Ht

∂ ∂ ∂∂ ∂ξ ∂η

+ + + = , (58)

where

i

dwW h

dX= ,

i i

df dgF y x

dX dXη η= − , i i

dg dfG x y

dX dXξ ξ= −

( ) ( )ˆ ˆ ˆ ˆi

R dhH fv gu gu fv

h dXη η ξ ξξ η∂ ∂= − + − +

∂ ∂ .

In the equations given above, the residual of the flow analysis, R, can be neglected when the flow analysis is fully converged. The boundary conditions of Eq. (58) are implemented by differentiating the boundary conditions of the Euler equations with respect to the design variables. In the solution of the Euler and sensitivity equations, the same numerical discretization methods are used.

III. Results The performance of the optimum step size estimation method is demonstrated. As stated earlier, the optimum

finite-difference step size can be evaluated as a function of two parameters. These are the norm values of the convergence error and the higher order sensitivities. In this section, first, the accuracy of the methods developed for estimating the convergence error and the higher order sensitivities are validated. Later, the performances of the calculation of the optimum step size with the proposed methods are demonstrated. Finally, the effects of the optimum step size calculation on the convergence of inverse aerodynamic design are investigated.

A. Convergence error estimation The accuracy of the method for estimating the convergence error is tested for both linear and non-linear

problems. All calculations in this study are performed with double precision on a 1.5GHz Pentium IV dual core processor. As a linear problem, a two-dimensional Laplace equation in a square domain (0<x<1; 0<y<1) is solved using the successive over relaxation method. A second–order central-difference scheme is used on a uniform cartesian grid. The boundary condition is chosen to satisfy the solution φ(x,y)=100xy. Since the terms related to the truncation error are eliminated, this analytical solution is also the exact solution of the Laplace equation that are discretized with the second-order and central-difference scheme9,19. The real value of the convergence error is calculated as the difference between the exact solution and the computed solution from the current iteration. Figure 1a shows the L2 norm values of the real and estimated convergence errors, and their differences. In order to have better understanding of the order of the error in each entry of the convergence error vector, the norm values are redefined according to following relations:

1max

1

1

max

k pp

pkk

ε ε=

=

∑ , ( )1 maxmax ,..., kε ε ε∞

= . (59)

The first equation given above for p=1 and p=2 corresponds to the absolute-mean and root-mean-square, respectively. Unless otherwise stated, in all figures to predict the convergence error, the number of eigenvalues, Meigen, is set to 16. In Figure 1a, the norm value of residual vector is also shown. The results show that the proposed method can estimate the convergence error very accurately, and the residual itself is not a good parameter to predict the convergence error. As the number of iteration increases, the difference between the real and estimated errors becomes smaller. In Figure 1b, the effects of the number of eigenvalues on the estimation of the convergence error are presented. Results show that increasing the number of eigenvalues from 2 to 256 slightly improves the accuracy of error prediction. Increasing the number of eigenvalues decreases the amplitude of oscillation in the estimated error. However, increasing the number of eigenvalues requires more memory to store the correction vectors. As shown in Eq. (44), calculating Meigen number of eigenvalues entails the storing of the correction vectors from the last 2Meigen iterations. In the estimation of the convergence error with Meigen number of eigenvalues, the convergence error estimation starts after 2Meigen number of iterations. In the present study, until that iteration is reached, the convergence error is estimated with the maximum number of available eigenvalues. The convergence error estimation starts at the fourth iteration by using two eigenvalues. Between iterations, four and 2Meigen, the

Page 12: [American Institute of Aeronautics and Astronautics 20th AIAA Computational Fluid Dynamics Conference - Honolulu, Hawaii ()] 20th AIAA Computational Fluid Dynamics Conference - Finite-Difference

American Institute of Aeronautics and Astronautics

12

convergence error at iteration n is estimated using the n/2 or (n-1)/2 number of eigenvalues, depending on whether the iteration number is even or odd, respectively. In Figure 1c, the comparison of three different norms of real and estimated errors shows that the value of estimated errors from the proposed method is almost the same as the real errors. Figure 1d shows the effects of the value of the relaxation parameter, Ω, on the estimation of the convergence error. The value of the relaxation parameter is increased up to 1.9. The solution diverges with the higher values of Ω. In all cases, the values of estimated and real errors are very close to each other.

Next, the performance of the convergence error estimation method is analyzed for nonlinear problems. Two dimensional Euler and Navier-Stokes equations are solved around a NACA0012 airfoil at a transonic flow condition (M=0.730, α=2.78o, Re=6.5x106). A finite volume method is used for spatial discretization and the flow variables are defined at the cell centers. Centered differencing is used for the spatial derivatives and the second-order and fourth-order artificial viscosities are added to enforce numerical stability. Time integration is performed using an explicit, four-stage Runga-Kutta scheme. Local time stepping and a multigrid method are implemented to accelerate the convergence to obtain a steady state solution. The multigrid level for the Euler and Navier-Stokes solutions are three and four, respectively. Characteristic boundary conditions are imposed at the far-field boundary based on a one-dimensional eigenvalue analysis. In the solution of the Euler equations, zero normal mass flux is enforced at the airfoil surface and the pressures are extrapolated from the inside cells using the normal momentum equation. In the Navier-Stokes solutions, no-slip and adiabatic wall conditions are used at the airfoil surface, and the Baldwin-Lomax eddy-viscosity model is included for turbulence closure. In the Euler computations, the grid size is 129x33, in the Navier-Stokes computations, the grid size is 257x65, and the minimum grid spacing next to the wall is 10-5. It is difficult to find analytical relations for the exact solution of the Euler and Navier-Stokes equations. Therefore, in these problems, the exact solutions are estimated by iterating solutions until the residual norm becomes the order of a round off error in double precision. The real convergence error is calculated as the difference between the solution for the current iteration and the exact solution. The convergence error is calculated on the fine grid of a multigrid cycle and all four conservative flow variables are used in the error estimation.

As a nonlinear problem, the convergence error analysis is first performed on the Euler equations. Figure 2a shows the change of the real and estimated errors and their difference in relation to the number of iterations. In this figure, the convergence error is estimated using 16 eigenvalues. Although the equations are nonlinear and the flow condition enforces the nonlinearity, the real and estimated errors are almost the same. The difference between the estimated and real errors decreases as the number of iteration increases. Figure 2a also shows the variation of the residual with respect to the number of iterations and it can be seen that there is a large difference between the residual and convergence error. Therefore, residual may not be a good parameter to predict the error. The effects of the number of eigenvalues on the estimation of the convergence error are analyzed in Figure 2b. Increasing the number of eigenvalues from 2 to 256 slightly improves the convergence error estimation. However, this slight improvement may result in a large increase in computer CPU time and memory usage. Increasing the number of eigenvalues may increase the size of the matrix to be solved and the number of correction vectors to be stored. Figure 2c shows that in all three norms, the proposed method predicted the convergence error very accurately. From Figure 2d, it can be seen that the value of CFL number does not affect the performance of the proposed error estimation method.

Last, the performance of the proposed method is demonstrated for the Navier-Stokes equations. Figure 3a shows that the proposed method can estimate the convergence error very accurately for nonlinear problems. The estimated error almost exactly matches the real error and large reductions are achieved in the difference between estimated and real errors. In Figure 3b, it can be seen that, increasing the number of eigenvalues decreases the difference between the real and estimated error. However, these improvements in error estimation are achieved at the cost of a large increase in CPU time. For many engineering problems, setting the number of eigenvalues between 4 and 16 may be sufficient. The real and estimated errors comparison using different norms is shown in Figure 3c and again, excellent results are achieved for non-linear problems. In iterative schemes, it is not always possible to reduce the residual to the order of the round-off error. In the solution of the Navier-Stokes equations, only the CFL number of 1.5 reduces the residual to that order. Hence, the effects of the CFL numbers on the accuracy of the convergence error estimation method could not be explored for the Navier-Stokes equations. Figure 3d compares real and estimated errors at the initial iterations with the estimated error being calculated with different numbers of eigenvalues. Increasing the number of eigenvalues slightly improves the performance of the proposed method. Results show that the convergence error can be accurately estimated in the first twenty iterations which is a sizeable advantage for finite-difference sensitivity calculations.

Page 13: [American Institute of Aeronautics and Astronautics 20th AIAA Computational Fluid Dynamics Conference - Honolulu, Hawaii ()] 20th AIAA Computational Fluid Dynamics Conference - Finite-Difference

American Institute of Aeronautics and Astronautics

13

B.

C.

a) Error, error difference and residual b) Error difference

c) Different norms of error d) Change of error with relaxation factor

Figure 1. Convergence error estimation for the Laplace equation

Iteration

E

rro

r 2

0 300 600 900 1200 150010-16

10-14

10-12

10-10

10-8

10-6

10-4

10-2

100

102real errorestimated errorerror differenceresidual

Iteration

Err

or

diff

eren

ce

2

300 600 900 1200 150010-16

10-14

10-12

10-10

10-8

10-6

10-4

10-2

100

102

Meigen=2Meigen=4Meigen=16Meigen=256

Iteration

E

rro

r

0 500 1000 150010-16

10-14

10-12

10-10

10-8

10-6

10-4

10-2

100

102L1 norm (real)L1 norm (estimated)L2norm (real)L2norm (estimated)L∞norm (real)L∞norm (estimated)

Iteration

E

rro

r 2

0 500 1000 1500 2000 2500 300010-16

10-14

10-12

10-10

10-8

10-6

10-4

10-2

100

102

Ω= 0.7 (real)Ω = 0.7 (estimated)Ω = 1.3 (real)Ω = 1.3 (estimated)Ω = 1.9 (real)Ω= 1.9 (estimated)

Page 14: [American Institute of Aeronautics and Astronautics 20th AIAA Computational Fluid Dynamics Conference - Honolulu, Hawaii ()] 20th AIAA Computational Fluid Dynamics Conference - Finite-Difference

American Institute of Aeronautics and Astronautics

14

c) Different norms of error d) Change of error with CFL number

a) Error, error difference and residual b) Error difference

Figure 2. Convergence error estimation for the Euler equations

Iteration

E

rro

r

200 400 600 800 100010-16

10-14

10-12

10-10

10-8

10-6

10-4

10-2

100L1norm (real)L1norm (estimated)L2norm (real)L2norm (estimated)L∞norm (real)L∞norm (estimated)

Iteration

E

rro

r 2

500 1000 1500 200010-16

10-14

10-12

10-10

10-8

10-6

10-4

10-2

100CFL=1.0 (real)CFL=1.0 (estimated)CFL=1.5 (real)CFL=1.5 (estimated)CFL=2.1 (real)CFL=2.1 (estimated)

Iteration

Err

or

diff

eren

ce

2

200 400 600 800 100010-16

10-14

10-12

10-10

10-8

10-6

10-4

10-2

100

Meigen=2Meigen=4Meigen=16Meigen=256

Iteration

E

rror

2

0 200 400 600 800 100010-16

10-14

10-12

10-10

10-8

10-6

10-4

10-2

100 real errorestimated errorerror differenceresidual

Page 15: [American Institute of Aeronautics and Astronautics 20th AIAA Computational Fluid Dynamics Conference - Honolulu, Hawaii ()] 20th AIAA Computational Fluid Dynamics Conference - Finite-Difference

American Institute of Aeronautics and Astronautics

15

D.

a) Error, error difference and residual b) Error difference

c) Different norms of error d) Initial error

Figure 3. Convergence error estimation for the Navier-Stokes equations

Iteration

E

rro

r 2

0 5000 10000 15000 20000 25000 3000010-16

10-14

10-12

10-10

10-8

10-6

10-4

10-2

100real errorestimated errorerror differenceresidual

Iteration

Err

or

diff

eren

ce

2

0 5000 10000 15000 20000 25000 3000010-16

10-14

10-12

10-10

10-8

10-6

10-4

10-2

100

Meigen=2Meigen=4Meigen=16Meigen=256

Iteration

E

rro

r

0 5000 10000 15000 20000 25000 3000010-16

10-14

10-12

10-10

10-8

10-6

10-4

10-2

100L1 norm (real)L1 norm (estimated)L2 norm (real)L2 norm (estimated)L∞ norm (real)L∞ norm (estimated)

Iteration

E

rro

r 2

0 20 40 60 80 10010-2

10-1

100 real errorestimated error (Meigen=2)estimated error (Meigen=4)estimated error (Meigen=16)estimated error (Meigen=256)

Page 16: [American Institute of Aeronautics and Astronautics 20th AIAA Computational Fluid Dynamics Conference - Honolulu, Hawaii ()] 20th AIAA Computational Fluid Dynamics Conference - Finite-Difference

American Institute of Aeronautics and Astronautics

16

B. Higher order sensitivity estimation

In the finite-difference calculation of the first order sensitivities, the estimation of the optimum step size requires the norm values of the higher order sensitivities: the second order sensitivities for the forward-difference, and the third order sensitivities for the central-difference schemes. The finite-difference calculation of higher order sensitivities significantly increases the computational time. In section 2.1.2, the approximate method was proposed to estimate the norm values of the higher order state sensitivities. Even though this method is computationally efficient, the accuracy of the method may be degraded because the differential equation used to estimate the higher order sensitivities is approximately constructed. In this section, the accuracy of the approximate method is validated using the finite-difference method. A central-difference scheme is used to calculate the value of the higher order sensitivities. In the estimation of an appropriate finite-difference step size, an algorithm similar to the one given in Ref. 3,4 is implemented. The higher order state sensitivities are evaluated by solving the Euler and Navier-Stokes equations around the NACA0012 airfoil for the same flow condition used in the convergence error estimation. In these calculations, the norm values of the convergence error are reduced to an order of 10-16. The Hicks-Henne and Wagner shape functions22 are used to modify the airfoil geometry and the weighting coefficient of these shape functions are used as design variables. The total geometry change perpendicular to the airfoil chord is defined as a linear combination of shape functions,

( )max

1

i

i ii

y X f x=

∆ = ∑ . (60)

In the equation given above, y∆ is the total geometry change perpendicular to the airfoil chord, if is the shape

function which is controlled by the ith design variable iX , and x is the chord-wise location. In the calculation of the

sensitivities, all the design variables are fixed except the one for which the sensitivity is calculated. Once the airfoil geometry is modified, a new grid is generated by translating old grid points with a distance of y∆ . A total of

fourteen design variables are used; the first seven modify the upper surface of the airfoil and the remainder modify the lower surface.

First, the Euler equations are used in the comparison of the higher order sensitivities calculated with the finite-difference and the proposed approximate methods are compared. The results with the Hicks-Henne functions are shown in Figures 4a, c and e for the norms of L1, L2 and L∞, respectively. Each Hicks-Henne function has only one maximum, and the location of the maximum in a chord-wise direction can be controlled by the user. Depending on the location of the maximum, each member of the Hicks-Henne functions is effective in modifying particular parts of the airfoil. The result shows that the magnitude of the higher order sensitivities is affected by the location of the maximum of the Hicks-Henne functions. If the maximum location is close to the region with a large flow gradient, the magnitude of the higher order sensitivities may increase. In this study, the third member of the Hick-Henne function has a maximum at the 45% of the chord length which is very close to the location of the embedded shock wave. Since the high flow gradient is near the shock wave, the norm values of the higher order state sensitivities have the largest values for the third design variable. Both the seventh and fourteenth members of the Hicks-Henne function have a maximum at a 90% of the chord length which is very close to the trailing edge. Due to the large flow gradient near the trailing edge, the higher order state sensitivities of the seventh and fourteenth design variables have the second largest values. The eighth design variable produces the smallest L1 norm value in the second and third order sensitivities. There is, approximately, a two order of magnitude difference between the largest and smallest norm values of the higher order sensitivities. There are some discrepancies between the norm values of the higher order sensitivities calculated with the finite-difference and proposed approximate methods. However, these discrepancies are moderate so the approximate method can be used to estimate the order of magnitude of the higher order sensitivities. The maximum relative error is measured with the L∞ norm, it is in the order of 130%, and this error occurs in the eighth design variable which has the smallest norm value in the higher order sensitivities. In order to investigate the effects of different shape functions on the performance of the proposed approximate method, a similar evaluation is performed using the Wagner functions which are quite different in shape to those of the Hicks-Henne functions. Although the Hicks-Henne functions have only one maximum the Wagner functions have one global minimum or maximum, but they may also have several local minimums and maximums. The Wagner functions may be more effective in simultaneously modifying the different locations of the airfoil geometry. Since the Wagner functions have multiple maximums and minimums, it is difficult to predict which design variable produces the largest norm values in the higher order sensitivities. The largest and smallest norm values of the higher

Page 17: [American Institute of Aeronautics and Astronautics 20th AIAA Computational Fluid Dynamics Conference - Honolulu, Hawaii ()] 20th AIAA Computational Fluid Dynamics Conference - Finite-Difference

American Institute of Aeronautics and Astronautics

17

order sensitivities are produced by the fifth and ninth design variables, respectively, and there is a two order of magnitude differences between them. In Figures 4b, d and f, the values of the higher order sensitivities of the Wagner functions are shown with the L1, L2 and L∞ norms, respectively. The results indicate that the proposed approximate method is successful in estimating the order of the higher order sensitivities. The maximum relative error of the approximate method is measured with the L∞ norm, and is in the order of 120%. This error occurs in the ninth design variable which has the smallest norm value in higher order sensitivities. Since the approximate method does not require any flow analysis, the CPU time needed to evaluate higher order sensitivities is almost negligible. In both the Hicks-Henne and Wagner functions, the ratio of CPU time of the proposed approximate method to that of the finite-difference method is in the order of 0.001. The variations of the norm values of the second and third order sensitivities with respect to the design variables show a similar behavior. The norm values of the third order sensitivities resemble the amplification of the norm values of the second order sensitivities. Although the norm values of the higher order sensitivities change with respect to the norm types, the variation of the norm values with respect to the design variables shows similar behavior for all three norms.

In the next part of the comparison of the higher order sensitivities, the Navier-Stokes equations are used. In the finite-difference calculation of the third order sensitivities with the Navier-Stokes equations, some difficulties are encountered. For example, the main obstacle is finding the appropriate step size for the third order sensitivity calculation. These difficulties may be related to the non-differentiable terms in artificial dissipation and turbulence modeling. Hence, the comparison of the finite-difference and the proposed approximate method is performed only on the second order sensitivities. The Hicks-Henne and Wagner functions are used to modify the airfoil geometry. The results calculated with the Hicks-Henne functions are shown in Figures 5a, c and e. As in the results calculated with the Euler equations, the location of the maximum of the third member of the Hicks-Henne function is close to the location of the embedded shock wave. Hence the largest norm values for the second order sensitivities are observed for the third design variable. The locations of the maximum of the seventh and fourteenth members of the shape function are close to the trailing edge, and the design variables related to these shape functions have the second largest norm values. The eighth design variable produces the smallest norm values of the second order sensitivities. Figures 5 b, d and f show the second order sensitivities calculated with the Wagner. In the results calculated with Navier-Stokes equations, there are approximately two order of magnitude differences between the largest and smallest norm value of the second order sensitivities. The results show that the relative error estimated with the proposed approximate method is larger in the Navier-Stokes computations. The largest relative error is observed for the fifth design variable of the Hicks-Henne shape functions. This error is measured with the L∞ norm and it is in the order of 160%. The ratio of the CPU time of the approximate method to that of finite-difference method being in the order of 0.0001 is almost negligible. For the same type of shape function, the variation of the norm values of the second order sensitivities with respect to design variables appears to be similar. However, the magnitude of the norm values of the second order sensitivities is larger in the Navier-Stokes computations.

Page 18: [American Institute of Aeronautics and Astronautics 20th AIAA Computational Fluid Dynamics Conference - Honolulu, Hawaii ()] 20th AIAA Computational Fluid Dynamics Conference - Finite-Difference

American Institute of Aeronautics and Astronautics

18

a) L1 norm (Hicks-Henne functions) b) L1 norm (Wagner functions)

c) L2 norm (Hicks-Henne functions) d) L2 norm (Wagner functions)

e) L∞ norm (Hicks-Henne functions) f) L∞ norm (Wagner functions)

Figure 4. Second and third order derivative estimation for the Euler Equations

Xi

Der

ivat

ives

5 1010-1

100

101

102

103

104

d2w/dXi21 finite difference

d2w/dXi21 estimated

d3w/dXi31 finite difference

d3w/dXi31 estimated

Xi

Der

ivat

ives

5 10100

101

102

103

104

105

106 d2w/dXi22 finite difference

d2w/dXi22 estimated

d3w/dXi32 finite difference

d3w/dXi32 estimated

Xi

Der

ivat

ives

5 10102

103

104

105

106

107

108 d2w/dXi2∞ finite difference

d2w/dXi2∞ estimated

d3w/dXi3∞ finite difference

d3w/dXi3∞ estimated

Xi

Der

ivat

ives

5 1010-1

100

101

102

103

104

d2w/dXi21 finite difference

d2w/dXi21 estimated

d3w/dXi31 finite difference

d3w/dXi31 estimated

Xi

Der

ivat

ives

5 10100

101

102

103

104

105

106 d2w/dXi22 finite difference

d2w/dXi22 estimated

d3w/dXi32 finite difference

d3w/dXi32 estimated

Xi

Der

ivat

ives

5 10101

102

103

104

105

106

107

108 d2w/dXi2∞ finite difference

d2w/dXi2∞ estimated

d3w/dXi3∞ finite difference

d3w/dXi3∞ estimated

Page 19: [American Institute of Aeronautics and Astronautics 20th AIAA Computational Fluid Dynamics Conference - Honolulu, Hawaii ()] 20th AIAA Computational Fluid Dynamics Conference - Finite-Difference

American Institute of Aeronautics and Astronautics

19

C.

D.

E.

a) L1 norm (Hicks-Henne functions) b) L1 norm (Wagner functions)

c) L2 norm (Hicks-Henne functions) d) L2 norm (Wagner functions)

e) L∞ norm (Hicks-Henne functions) f) L∞ norm (Wagner functions)

Figure 5. Second order derivative estimation for the Navier-Stokes Equations

Xi

Der

ivat

ives

5 10

100

101

102

d2w/dX i21 finite difference

d2w/dX i21 estimated

Xi

Der

ivat

ives

5 10

101

102

103

d2w/dXi22 finite difference

d2w/dXi22 estimated

Xi

Der

ivat

ives

5 10102

103

104

105d2w/dXi

2∞ finite differenced2w/dXi

2∞ estimated

Xi

Der

ivat

ives

5 10100

101

102

d2w/dXi21 finite difference

d2w/dXi21 estimated

Xi

Der

ivat

ives

5 10100

101

102

103

d2w/dXi22 finite difference

d2w/dXi22 estimated

Xi

Der

ivat

ives

5 10

102

103

104

105d2w/dXi

2∞ finite differenced2w/dXi

2∞ estimated

Page 20: [American Institute of Aeronautics and Astronautics 20th AIAA Computational Fluid Dynamics Conference - Honolulu, Hawaii ()] 20th AIAA Computational Fluid Dynamics Conference - Finite-Difference

American Institute of Aeronautics and Astronautics

20

C. Finite-difference Sensitivity Calculations

The variation of error in the finite-difference sensitivities with respect to the convergence error and step size is examined. The error in the finite-difference sensitivities is defined as the difference between the sensitivities evaluated with the finite-difference and analytical methods. The analytical and finite-difference sensitivities are calculated for the same discretized Euler equations. The finite-difference sensitivities are evaluated with different step sizes and convergence error levels. The variation of error with respect to the step size is plotted for the constant norm value of the convergence error. For each convergence error level, the actual values of the optimum step size and corresponding error can be determined from these plots. The optimum step size and the corresponding error can also be estimated from the relations derived in section 2.1. The estimated results are marked in the figures with the symbols of filled circle or square, depending on whether the higher order sensitivities are calculated with finite-difference or the proposed approximate methods, respectively. The values of the optimum step size and corresponding error are estimated using the norm types defined in Eq. (59). The optimum step sizes are inversely proportional to the norm values of the higher order sensitivities. In order to reduce the number of figures, the results are only shown for the design variables that have the minimum and the maximum norm values in the higher order sensitivities.

First, the accuracy of the forward-difference scheme is evaluated. In this scheme, the optimum step size is inversely proportional to the square root of the second order sensitivities. In the the Hicks-Henne functions, the third and eighth design variables produce the largest and smallest norm values in the second order sensitivities, respectively. Hence, the error in the finite-difference sensitivities is only evaluated for the third and eighth design variables. Figures 6a, c and e show the L1, L2 and L∞ norm values of sensitivity error for the third design variable. Figures 6b, d and f show the same norm values for the eighth design variable. The results verify that Eqs. (13) and (14) can accurately predict both the optimum step size and the norm values of error in sensitivities. In all three norms, the optimum step sizes of the eighth design variable are almost one order magnitude larger than that of the third design variable. This is expected since the norm values of the second order sensitivities of the eighth design variables are almost two orders of magnitude smaller than that of the third design variable. For the same reason, the error calculated with the eighth design variable is one order smaller than the one calculated with the third design variables. In general, the values of the second order sensitivities calculated with the finite-difference and the proposed approximate methods give similar results for the optimum step size and the resulting error. The largest discrepancies are observed in the eighth design variable, since the second order sensitivities calculated with the approximate method has the largest relative error in the eighth design variable. The results from the Wagner functions are shown in Figure 7. In the Wagner functions, the values of finite-difference and analytical sensitivities are only compared for the fifth and ninth design variables, which produce the largest and smallest norm values in the second order sensitivities. As in the Hicks-Henne functions, Eqs. (13) and (14) predict the optimum step size and the corresponding error very accurately. The optimum step size of the ninth design variable is almost one order magnitude larger than that of the fifth design variable. The norm value of the error calculated with the ninth design variable is one order smaller than the one calculated with the fifth design variable. These results are the consequence of the fact that the norm value of the second order sensitivities of the ninth design variable is two orders smaller than that of the fifth design variable. The values of the optimum step size and error that are predicted with the proposed approximate method are very close to those predicted with the finite-difference method. The discrepancies in the results calculated with the approximate and finite-difference methods are larger in the ninth design variable. This may be due to the fact that the second order sensitivities calculated with the approximate method have the largest relative error for the ninth design variable. In both the Hicks-Henne and Wagner functions, the L∞ norm produces the smallest optimum step size and the largest sensitivity error, because the largest value of the second order sensitivities is calculated with the L∞ norm.

Next, the accuracy of the central-difference scheme is examined. The errors in the finite-difference sensitivities are computed for different step sizes, and convergence error levels. For a given convergence error level, the optimum step size in the central-difference scheme is inversely proportional to the cube root of the third order sensitivities. In the Hicks-Henne functions, the largest and smallest L1 norm values of the third order sensitivities are calculated with the third and the eighth design variables, respectively and the results are shown for these design variables. Figure 8 demonstrates that the optimum step sizes and the corresponding sensitivity errors are accurately estimated with Eqs. (15) and (16). For the same convergence error level, the optimum step size in the L1 norm is one order greater in magnitude than that in the L∞ norm. Similarly, for the same convergence error level, the error measured with the L1 norm is one order smaller in magnitude than the one measured with the L∞ norm. These results are expected because there is almost three orders of magnitude difference between the L1 and L∞ norm values of the third order sensitivities. The fifth and ninth members of the Wagner functions have the largest and the smallest norm

Page 21: [American Institute of Aeronautics and Astronautics 20th AIAA Computational Fluid Dynamics Conference - Honolulu, Hawaii ()] 20th AIAA Computational Fluid Dynamics Conference - Finite-Difference

American Institute of Aeronautics and Astronautics

21

values of the third order sensitivities. Figure 9 shows the results for the fifth and ninth members of the Wagner functions. Compared to the forward-difference scheme, the discrepancies in optimum step size and the corresponding error calculated with the finite-difference and the proposed approximate methods are smaller in the central-difference scheme. For a given convergence error level, the error in sensitivities calculated with the central-difference scheme is two orders of magnitude smaller than the one calculated with the forward-difference scheme. Similarly, for a given convergence error level, the optimum step size in the central-difference scheme is one order larger than the one calculated in the forward-difference scheme.

Page 22: [American Institute of Aeronautics and Astronautics 20th AIAA Computational Fluid Dynamics Conference - Honolulu, Hawaii ()] 20th AIAA Computational Fluid Dynamics Conference - Finite-Difference

American Institute of Aeronautics and Astronautics

22

a) L1 norm, Xi=3 b) L1 norm, Xi=8

c) L2 norm, Xi=3 d) L2 norm, Xi=8

e) L∞ norm, Xi=3 f) L∞ norm, Xi=8

Figure 6. Sensitivity error in the forward-difference scheme with the Hicks-Henne functions

∆X3

E

rror

1

10-11 10-9 10-7 10-5 10-3 10-1

10-5

10-4

10-3

10-2

10-1

100

101

102

103

estimated error and step size (finite-difference)estimated error and step size (approximate)ε=1.0e-4ε=1.0e-6ε=1.0e-8ε=1.0e-10ε=1.0e-12

∆X8

E

rro

r 1

10-11 10-9 10-7 10-5 10-3 10-1

10-6

10-5

10-4

10-3

10-2

10-1

100

101

102estimated error and step size (finite-difference)estimated error and step size (approximate)ε=1.0e-4ε=1.0e-6ε=1.0e-8ε=1.0e-10ε=1.0e-12

∆X3

E

rro

r 2

10-11 10-9 10-7 10-5 10-3 10-110-5

10-4

10-3

10-2

10-1

100

101

102

103

104estimated error and step size (finite-difference)estimated error and step size (approximate)ε=1.0e-4ε=1.0e-6ε=1.0e-8ε=1.0e-10ε=1.0e-12

∆X8

E

rro

r 2

10-12 10-10 10-8 10-6 10-4 10-210-6

10-5

10-4

10-3

10-2

10-1

100

101

102

103estimated error and step size (finite-difference)estimated error and step size (approximate)ε=1.0e-4ε=1.0e-6ε=1.0e-8ε=1.0e-10ε=1.0e-12

∆X3

E

rro

r ∞

10-13 10-11 10-9 10-7 10-5 10-3 10-110-4

10-2

100

102

104

106 estimated error and step size (finite-difference)estimated error and step size (approximate)ε=1.0e-4ε=1.0e-6ε=1.0e-8ε=1.0e-10ε=1.0e-12

∆X8

E

rror

10-13 10-11 10-9 10-7 10-5 10-3 10-110-5

10-4

10-3

10-2

10-1

100

101

102

103

104 estimated error and step size (finite-difference)estimated error and step size (approximate)ε=1.0e-4ε=1.0e-6ε=1.0e-8ε=1.0e-10ε=1.0e-12

Page 23: [American Institute of Aeronautics and Astronautics 20th AIAA Computational Fluid Dynamics Conference - Honolulu, Hawaii ()] 20th AIAA Computational Fluid Dynamics Conference - Finite-Difference

American Institute of Aeronautics and Astronautics

23

a) L1 norm, Xi=5 b) L1 norm, Xi=9

c) L2 norm, Xi=5 d) L2 norm, Xi=9

e) L∞ norm, Xi=5 f) L∞ norm, Xi=9

Figure 7. Sensitivity error in the forward-difference scheme with the Wagner functions

∆X3

E

rro

r 2

10-11 10-9 10-7 10-5 10-3 10-110-5

10-4

10-3

10-2

10-1

100

101

102

103

104estimated error and step size (finite-difference)estimated error and step size (approximate)ε=1.0e-4ε=1.0e-6ε=1.0e-8ε=1.0e-10ε=1.0e-12

∆X8

E

rro

r 2

10-12 10-10 10-8 10-6 10-4 10-210-6

10-5

10-4

10-3

10-2

10-1

100

101

102

103estimated error and step size (finite-difference)estimated error and step size (approximate)ε=1.0e-4ε=1.0e-6ε=1.0e-8ε=1.0e-10ε=1.0e-12

∆X3

E

rro

r ∞

10-13 10-11 10-9 10-7 10-5 10-3 10-110-4

10-2

100

102

104

106 estimated error and step size (finite-difference)estimated error and step size (approximate)ε=1.0e-4ε=1.0e-6ε=1.0e-8ε=1.0e-10ε=1.0e-12

∆X8

E

rror

10-13 10-11 10-9 10-7 10-5 10-3 10-110-5

10-4

10-3

10-2

10-1

100

101

102

103

104 estimated error and step size (finite-difference)estimated error and step size (approximate)ε=1.0e-4ε=1.0e-6ε=1.0e-8ε=1.0e-10ε=1.0e-12

∆X5

E

rro

r 1

10-12 10-10 10-8 10-6 10-4 10-2 100

10-5

10-4

10-3

10-2

10-1

100

101

102

estimated error and step size (finite-difference)estimated error and step size (approximate)ε=1.0e-4ε=1.0e-6ε=1.0e-8ε=1.0e-10ε=1.0e-12

∆X9

E

rro

r 1

10-12 10-10 10-8 10-6 10-4 10-2 100

10-5

10-3

10-1

101

103estimated error and step size (finite-difference)estimated error and step size (approximate)ε=1.0e-4ε=1.0e-6ε=1.0e-8ε=1.0e-10ε=1.0e-12

∆X5

E

rro

r 2

10-12 10-10 10-8 10-6 10-4 10-2 100

10-4

10-3

10-2

10-1

100

101

102

103

104

105estimated error and step size (finite-difference)estimated error and step size (approximate)ε=1.0e-4ε=1.0e-6ε=1.0e-8ε=1.0e-10ε=1.0e-12

∆X9

E

rro

r 2

10-12 10-10 10-8 10-6 10-4 10-2 10010-6

10-5

10-4

10-3

10-2

10-1

100

101

102

103estimated error and step size (finite-difference)estimated error and step size (approximate)ε=1.0e-4ε=1.0e-6ε=1.0e-8ε=1.0e-10ε=1.0e-12

∆X5

E

rror

10-13 10-11 10-9 10-7 10-5 10-3 10-110-4

10-2

100

102

104

106estimated error and step size (finite-difference)estimated error and step size (approximate)ε=1.0e-4ε=1.0e-6ε=1.0e-8ε=1.0e-10ε=1.0e-12

∆X9

E

rro

r ∞

10-13 10-11 10-9 10-7 10-5 10-3 10-1

10-4

10-2

100

102

104estimated error and step size (finite-difference)estimated error and step size (approximate)ε=1.0e-4ε=1.0e-6ε=1.0e-8ε=1.0e-10ε=1.0e-12

Page 24: [American Institute of Aeronautics and Astronautics 20th AIAA Computational Fluid Dynamics Conference - Honolulu, Hawaii ()] 20th AIAA Computational Fluid Dynamics Conference - Finite-Difference

American Institute of Aeronautics and Astronautics

24

c) L2 norm, Xi=3 d) L2 norm, Xi=8

a) L1 norm, Xi=3 b) L1 norm, Xi=8

e) L∞

norm, Xi=3 f) L∞

norm, Xi=8

Figure 8. Sensitivity error in the central-difference scheme with the Hick-Henne functions

∆X3

E

rro

r 1

10-11 10-9 10-7 10-5 10-3 10-110-7

10-5

10-3

10-1

101

103

estimated error and step size (finite-difference)estimated error and step size (approximate)ε=1.0e-4ε=1.0e-6ε=1.0e-8ε=1.0e-10ε=1.0e-12

∆X3

E

rro

r 2

10-11 10-9 10-7 10-5 10-3 10-1

10-5

10-3

10-1

101

103

105estimated error and step size (finite-difference)estimated error and step size (approximate)ε=1.0e-4ε=1.0e-6ε=1.0e-8ε=1.0e-10ε=1.0e-12

∆X3

E

rro

r ∞

10-11 10-9 10-7 10-5 10-3 10-110-6

10-4

10-2

100

102

104

106

estimated error and step size (finite-difference)estimated error and step size (approximate)ε=1.0e-4ε=1.0e-6ε=1.0e-8ε=1.0e-10ε=1.0e-12

∆X8

E

rro

r 1

10-11 10-9 10-7 10-5 10-3 10-110-8

10-6

10-4

10-2

100

102

estimated error and step size (finite-difference)estimated error and step size (approximate)ε=1.0e-4ε=1.0e-6ε=1.0e-8ε=1.0e-10ε=1.0e-12

∆X8

E

rro

r 2

10-10 10-8 10-6 10-4 10-2

10-6

10-4

10-2

100

102

estimated error and step size (finite-difference)estimated error and step size (approximate)ε=1.0e-4ε=1.0e-6ε=1.0e-8ε=1.0e-10ε=1.0e-12

∆X8

E

rro

r ∞

10-13 10-11 10-9 10-7 10-5 10-3 10-110-7

10-5

10-3

10-1

101

103

105

estimated error and step size (finite-difference)estimated error and step size (approximate)ε=1.0e-4ε=1.0e-6ε=1.0e-8ε=1.0e-10ε=1.0e-12

∆X5

E

rro

r 1

10-11 10-9 10-7 10-5 10-3 10-110-7

10-5

10-3

10-1

101

103

estimated error and step size (finite-difference)estimated error and step size (approximate)ε=1.0e-4ε=1.0e-6ε=1.0e-8ε=1.0e-10ε=1.0e-12

∆X9

E

rro

r 1

10-11 10-9 10-7 10-5 10-3 10-1

10-7

10-5

10-3

10-1

101

103

estimated error and step size (finite-difference)estimated error and step size (approximate)ε=1.0e-4ε=1.0e-6ε=1.0e-8ε=1.0e-10ε=1.0e-12

Page 25: [American Institute of Aeronautics and Astronautics 20th AIAA Computational Fluid Dynamics Conference - Honolulu, Hawaii ()] 20th AIAA Computational Fluid Dynamics Conference - Finite-Difference

American Institute of Aeronautics and Astronautics

25

c) L2 norm, Xi=5 d) L2 norm, Xi=9

Figure 9. Sensitivity error in the central-difference scheme with the Wagner functions

e) L∞

norm, Xi=5 f) L∞

norm, Xi=9

a) L1 norm, Xi=5 b) L1 norm, Xi=9

∆X5

E

rro

r 1

10-11 10-9 10-7 10-5 10-3 10-110-7

10-5

10-3

10-1

101

103

estimated error and step size (finite-difference)estimated error and step size (approximate)ε=1.0e-4ε=1.0e-6ε=1.0e-8ε=1.0e-10ε=1.0e-12

∆X5

E

rro

r 2

10-12 10-10 10-8 10-6 10-4 10-2

10-5

10-3

10-1

101

103

105estimated error and step size (finite-difference)estimated error and step size (approximate)ε=1.0e-4ε=1.0e-6ε=1.0e-8ε=1.0e-10ε=1.0e-12

∆X9

E

rro

r 1

10-11 10-9 10-7 10-5 10-3 10-1

10-7

10-5

10-3

10-1

101

103

estimated error and step size (finite-difference)estimated error and step size (approximate)ε=1.0e-4ε=1.0e-6ε=1.0e-8ε=1.0e-10ε=1.0e-12

∆X9

E

rro

r 2

10-10 10-8 10-6 10-4 10-210-8

10-6

10-4

10-2

100

102

104 estimated error and step size (finite-difference)estimated error and step size (approximate)ε=1.0e-4ε=1.0e-6ε=1.0e-8ε=1.0e-10ε=1.0e-12

∆X5

E

rro

r ∞

10-13 10-11 10-9 10-7 10-5 10-3 10-110-6

10-4

10-2

100

102

104

106

estimated error and step size (finite-difference)estimated error and step size (approximate)ε=1.0e-4ε=1.0e-6ε=1.0e-8ε=1.0e-10ε=1.0e-12

∆X9

E

rro

r ∞

10-13 10-11 10-9 10-7 10-5 10-3 10-1

10-6

10-4

10-2

100

102

104

106estimated error and step size (finite-difference)estimated error and step size (approximate)ε=1.0e-4ε=1.0e-6ε=1.0e-8ε=1.0e-10ε=1.0e-12

Page 26: [American Institute of Aeronautics and Astronautics 20th AIAA Computational Fluid Dynamics Conference - Honolulu, Hawaii ()] 20th AIAA Computational Fluid Dynamics Conference - Finite-Difference

American Institute of Aeronautics and Astronautics

26

D. Inverse design optimization

The effects of the accuracy of the sensitivities, calculated with both the analytical and finite-difference methods, on the convergence of inverse design are examined. A least-square optimization method is used to minimize the pressure discrepancies between the designed and target airfoils. Euler or Navier-Stokes equations are used for the flow analysis. A total of fourteen design variables are used to modify the airfoil geometry. The detailed analysis of the inverse design method is given in Ref. 21. The objective function is defined as:

( )2

tp p dψΓ

= − Γ∫ . (61)

The convergences of this objective function evaluated with analytical and finite-difference sensitivities are compared. The forward- and central-difference schemes are used to evaluate the finite-difference sensitivities. In both schemes, sensitivities are evaluated using the optimum finite-difference step size. In the estimation of the optimum step size, the norm values of the higher order sensitivities are evaluated with three different methods. In the first method, a finite-difference method is used to calculate the norm values of the higher order sensitivities. In the second method, the norm values of higher order sensitivities are estimated with the approximate method given in section 2.1.2. In the last method, the norm values of the higher order sensitivities are assumed to be a unity. The results are demonstrated using the L∞ norm values of the convergence error and higher order sensitivities. The other norm types are not used to reduce the number of figures. In the design optimization with the Euler equations, the forward-difference scheme is used for the sensitivity calculations. In Figure 10, the effects of shape functions on the convergence of design optimization are shown using the Hicks-Henne and Wagner functions. The results are given for three different L∞ norm values of the convergence error in the flow solutions: 10-4, 10-6 and 10-8. The convergences of the objective function with the Hicks-Henne and Wagner functions for the error level of 10-4 are shown in Figures 10 a) and b), respectively. For both shape functions, the maximum reduction in the objective function is achieved with analytical sensitivities. In the design with the Wagner functions, a larger reduction in the objective function is achieved amounting more than three orders of magnitude from the initial values. This reduction is approximately two orders larger in magnitude than that obtained with the Hicks-Henne functions. All the finite-difference sensitivities are calculated using the optimum step size. As presented in Eq. (13), the optimum step size in the forward-difference scheme can be evaluated as a function of the norm values of the convergence error and the second order sensitivities. In both the Hicks-Henne and Wagner functions, the optimum step size calculation algorithm fails if the second order sensitivities are calculated with the finite-difference method. For the convergence error level of 10-4, satisfying the relative condition error in a given range may produce very large step sizes for the second order sensitivity calculations. The geometry change with these step sizes is so large that the iterative solution of the Euler equations diverges. If the norm values of the second order sensitivities are assumed to be one, designs evaluated with an optimum finite-difference step size do not converge in the Hicks-Henne functions, and partially converge in the Wagner functions. If the optimum step size is calculated with approximate second order sensitivities, larger reductions in the objective function are achieved with the finite-difference sensitivities. In the design with the Hicks-Henne functions, almost the same amount of reduction in the objective function is achieved with both the analytical and finite-difference sensitivities when the optimum step size is evaluated with the approximate second order sensitivities given in Eq. (49). In Figures 10 c) and d), the convergences of the objective function with Hicks-Henne and Wagner functions are shown for a convergence error level of 10-6. In the design with the Hicks-Henne functions, the convergence behaviors of the objective function with the analytical and finite-difference sensitivities are almost the same. The convergences of the objective function are not affected by the way that the second order sensitivities are evaluated in optimum step size calculation. In the design with the Wagner function, the convergence of the objective function is delayed if the second order sensitivities are assumed to be one. In Figures 10 e) and f), the convergence of the objective function is shown for a convergence error level of 10-8. As in Figure 7, for this convergence error level, the error in the finite-difference sensitivities is so small that the accuracy of the optimum step size does not significantly affect the convergence of the objective function. Hence, the convergence behaviors of the objective function with both analytical and finite-difference sensitivities are very similar. The CPU times of single design iteration with different optimum step size calculations are also compared. If the second order sensitivities in optimum step size calculation are assumed to be one and calculated with the proposed approximate method, the CPU times of a single design iteration are in the same order. However, in the approximate method, the same reduction in the objective function can be achieved with a smaller number of design iterations. In optimum step size calculation, if the second order sensitivities are calculated with the finite-difference method, the CPU times of design are almost 15 times greater compared to those calculated with the proposed approximate method.

Page 27: [American Institute of Aeronautics and Astronautics 20th AIAA Computational Fluid Dynamics Conference - Honolulu, Hawaii ()] 20th AIAA Computational Fluid Dynamics Conference - Finite-Difference

American Institute of Aeronautics and Astronautics

27

In design optimization with the Euler equations, the central-difference scheme is used for sensitivity calculation and only the Wagner functions are used to modify airfoil geometry. As shown in Eq. (15), the optimum step size in the central-difference scheme can be calculated as a function of the norm values of the convergence error and the third order sensitivities. Figure 11 shows the convergence of the objective function with three different convergence error levels: 10-4, 10-6 and 10-8. For the error levels of 10-4 and 10-6, the optimum step size calculation algorithm fails if the third order sensitivities are calculated with the finite-difference method. For these error levels, the finite-difference step size for the third order sensitivity calculation is so large that the iterative solution of the Euler equations diverges. The convergence of the objective function also fails if the optimum step size is calculated with an assumption that the norm values of the third order sensitivities are one. The norm values of the third order sensitivities should be increased to 70 in order to achieve a convergence. Although assuming values of higher order sensitivities to be one is a common approach in optimum step size calculation, the results presented here show the deficiency of this approach. If the optimum step size is calculated with the approximate third order sensitivities given in Eq. (49), the objective function converges for all three error levels. For the convergence error level of 10-8, the objective function is not affected by how the third order sensitivities are evaluated because the error in the finite-difference sensitivities is already very small. Design optimization is also performed using the Navier-Stokes equations. Since the analytical sensitivities are not available for the Navier-Stokes equations, the convergence of the objective function is only compared with the finite-difference sensitivities. Figure 12 shows the convergence of the objective function for three different optimum step size calculation methods. As noted above, the second order sensitivities in the optimum step size calculation are evaluated using the finite-difference and the proposed approximate methods, and assumed to be one. The convergence of the objective function is evaluated with three different convergence error levels in the flow analysis. The L∞ norm values of convergence error are reduced to the order of 10-4, 10-6 and 10-8. Only the Wagner functions are used for geometry modification. In the design with a convergence error level of 10-4, the convergence of the objective function stalls if the optimum step size is calculated with the assumption that the norm value of the second order sensitivities is one. The convergences of the objective function are very similar if the second order sensitivities are calculated by the finite-difference and the proposed approximate methods. In the design with a convergence error level of 10-6, the convergence of the objective function is delayed if the optimum step sizes are calculated with the assumption that the value of the second order sensitivities is one. For the design with a convergence error level of 10-8, the error level in the flow solution is small. Hence the effects of the way of calculating the optimum step size on the convergence of the objective function are small. In Figure 13, the design results calculated with the Navier-Stokes equations are presented. As shown in Figure 13 a, the pressure distribution of the designed and target airfoils is very accurately matched. In this figure, the accuracy of the Navier-Stokes solution is also validated with an experimental data. Figure 13 b shows that the geometries of the designed and target airfoils are in good agreement.

Page 28: [American Institute of Aeronautics and Astronautics 20th AIAA Computational Fluid Dynamics Conference - Honolulu, Hawaii ()] 20th AIAA Computational Fluid Dynamics Conference - Finite-Difference

American Institute of Aeronautics and Astronautics

28

Figure 10. Convergence of an inverse design with the Euler equations and the forward-difference scheme

a) ||Convergence error||∞=1.0E-4, Hicks Henne b) ||Convergence error||∞=1.0E-4, Wagner

c) ||Convergence error||∞=1.0E-6, Hicks Henne d) ||Convergence error||∞=1.0E-6, Wagner

e) ||Convergence error||∞=1.0E-8, Hicks Henne f) ||Convergence error||∞=1.0E-8, Wagner

Iteration

Obj

ectiv

e

0 5 10 15 2010-4

10-3

10-2

AnalyticalF-D, ||d2w/dXi

2||∞=estimatedF-D, ||d2w/dXi

2||∞=1.

Iteration

Obj

ectiv

e

0 5 10 15 2010-4

10-3

10-2

AnalyticalF-D, ||d2w/dXi

2||∞=calculatedF-D, ||d2w/dXi

2||∞=estimatedF-D, ||d2w/dXi

2||∞=1.

Iteration

Obj

ectiv

e

0 5 10 15 2010-4

10-3

10-2

AnalyticalF-D, ||d2w/dX i

2||∞=calculatedF-D, ||d2w/dX i

2||∞=estimatedF-D, ||d2w/dX i

2||∞=1.

Iteration

Obj

ectiv

e

0 5 10 15 20

10-5

10-4

10-3

10-2

AnalyticalF-D, ||d2w/dXi

2||∞=estimatedF-D, ||d2w/dXi

2||∞=1

Iteration

Obj

ectiv

e

0 5 10 15 20

10-5

10-4

10-3

10-2

AnalyticalF-D, ||d2w/dXi

2||∞=calculatedF-D, ||d2w/dXi

2||∞=estimatedF-D, ||d2w/dXi

2||∞=1.

Iteration

Ob

ject

ive

0 5 10 15 20

10-5

10-4

10-3

10-2

AnalyticalF-D, ||d2w/dXi

2||∞=calculatedF-D, ||d2w/dXi

2||∞=estimatedF-D, ||d2w/dXi

2||∞=1.

Page 29: [American Institute of Aeronautics and Astronautics 20th AIAA Computational Fluid Dynamics Conference - Honolulu, Hawaii ()] 20th AIAA Computational Fluid Dynamics Conference - Finite-Difference

American Institute of Aeronautics and Astronautics

29

Iteration

Obj

ectiv

e

0 5 10 15 20

10-5

10-4

10-3

10-2

AnalyticalF-D, ||d3w/dXi

3||∞=estimatedF-D, ||d3w/dXi

3||∞=70

a) ||Convergence error||∞=1.0E-4, Wagner

Iteration

Obj

ectiv

e

0 5 10 15 20

10-5

10-4

10-3

10-2

AnalyticalF-D, ||d3w/dXi

3||∞=estimatedF-D, ||d3w/dXi

3||∞=70

b) ||Convergence error||∞=1.0E-6, Wagner

Iteration

Obj

ectiv

e

0 5 10 15 20

10-5

10-4

10-3

10-2

AnalyticalF-D, ||d3w/dXi

3||∞=calculatedF-D, ||d3w/dXi

3||∞=estimatedF-D, ||d2w/dXi

2||∞=70

c) ||Convergence error||∞=1.0E-8, Wagner

Figure 11. Convergence of an inverse design with the Euler equations and the central-difference scheme

Iteration

Obj

ectiv

e

0 5 10 15 20

10-5

10-4

10-3

10-2

F-D, ||d2w/dXi2||∞=calculated

F-D, ||d2w/dXi2||∞=estimated

F-D, ||d2w/dXi2||∞=1.

Page 30: [American Institute of Aeronautics and Astronautics 20th AIAA Computational Fluid Dynamics Conference - Honolulu, Hawaii ()] 20th AIAA Computational Fluid Dynamics Conference - Finite-Difference

American Institute of Aeronautics and Astronautics

30

Iteration

Obj

ectiv

e

0 5 10 15 20

10-5

10-4

10-3

10-2

F-D, ||d2w/dXi2||∞=calculated

F-D, ||d2w/dXi2||∞=estimated

F-D, ||d2w/dXi2||∞=1.

a) ||Convergence error||∞=1.0E-4, Wagner

Iteration

Ob

ject

ive

0 5 10 15 20

10-5

10-4

10-3

10-2

F-D, ||d2w/dXi2||∞=calculated

F-D, ||d2w/dXi2||∞=estimated

F-D, ||d2w/dXi2||∞=1.

b) ||Convergence error||∞=1.0E-6, Wagner

Iteration

Obj

ectiv

e

0 5 10 15 20

10-5

10-4

10-3

10-2

F-D, ||d2w/dXi2||∞=calculated

F-D, ||d2w/dXi2||∞=estimated

F-D, ||d2w/dXi2||∞=1.

c) ||Convergence error||∞=1.0E-8, Wagner

Figure 12. Convergence of an inverse design with the Navier-Stokes equations and the forward-difference scheme

Page 31: [American Institute of Aeronautics and Astronautics 20th AIAA Computational Fluid Dynamics Conference - Honolulu, Hawaii ()] 20th AIAA Computational Fluid Dynamics Conference - Finite-Difference

American Institute of Aeronautics and Astronautics

31

x

Cp

0 0.2 0.4 0.6 0.8 1

-1

-0.5

0

0.5

1

experiment (RAE2822)initial (NACA0012)target (RAE2822)design

a) Comparison of surface pressure distribution

x

y

0 0.2 0.4 0.6 0.8 1

-0.06

-0.04

-0.02

0

0.02

0.04

0.06

initial (NACA0012)target (RAE2822)design

b) Comparison of airfoil geometries

Figure 13. Convergence of inverse design with Navier-Stokes equations and forward-difference sensitivity calculations

Page 32: [American Institute of Aeronautics and Astronautics 20th AIAA Computational Fluid Dynamics Conference - Honolulu, Hawaii ()] 20th AIAA Computational Fluid Dynamics Conference - Finite-Difference

American Institute of Aeronautics and Astronautics

32

IV. Conclusion The objective of this study is to reduce the error in the finite-difference sensitivity calculation in iteratively solved problems. To this end, the sources of error in these calculations are analyzed. The norm values of the total error are minimized with respect to the finite-difference step size. The optimum step size is determined as a function of the norm values of both the convergence error and higher order sensitivities. In order to calculate the optimum step size two methods are developed. In the first method, the convergence error is estimated in iteratively solved problems. This method is based on the eigenvalue analysis of linear systems. Its accuracy is validated for both linear and nonlinear problems. The results show that the convergence error can be accurately estimated with this method. The residual itself, on the other hand, is not considered to be a reliable parameter to predict the convergence error. In the second method, the higher order sensitivities are evaluated by differentiating the approximately constructed differential equation with respect to the design variables. With this method, the norm values of the second and the third order sensitivities are estimated efficiently and accurately. The methods developed for the convergence error and higher order sensitivity estimation are successfully used to calculate the optimum step size in the forward and central-difference sensitivity evaluations. In order to confirm whether these methods serve their functionality an inverse design optimization is performed. In the calculation of the optimum step size, the developed convergence error estimation method is used with different higher order sensitivity estimation methods. Approximating the norm values of higher order sensitivities as unity may slow down or stop the convergence of the objective function. The main difficulty in calculating the higher order sensitivities with the finite-difference method is in the estimation of the appropriate finite-difference step size. Another drawback of this method is the significant increase in design time. On the other hand, the proposed approximate method provides a robust and fast convergence in the objective function without increasing the design time.

Acknowledgments This research is supported by The Scientific and Technological Research Council of Turkey (TUBITAK).

References 1 Ezertas, A. and Eyi, S., Performances of Numerical and Analytical Jacobians in Flow and Sensitivity Analysis,

in: 19th AIAA Computational Fluid Dynamics Conference, AIAA-2009-4140, June 2009, San Antonio, Texas, 2009.

2 Hou, G. J.-W., Taylor III A. C. and Korivi, V.M., Discrete shape sensitivity equations for aerodynamic problems, International Journal for Numerical Methods in Engineering, Vol. 37, 1994, pp. 2251-2266.

3 Gill, P.E., Murray W., and Wright M.H., Practical Optimization, Academic Press, London, 1992. 4 Gill, P.E., Murray W., Saunders, M.A., and Wright M.H., Computing Forward-Difference Intervals for

Numerical Optimization, SIAM J. Sci. and Stat. Comput. Vol. 4, 1983, pp. 310-321. 5 Iott, J., Haftka, R. T. and Adelman, H. M., Selecting Step Sizes in Sensitivity Derivatives by Finite-

Differences, NASA TM-86382, 1985. 6 Haftka, R. T., Sensitivity calculations for iteratively solved problems, International Journal for Numerical

Methods in Engineering, Vol. 21, 1985, pp. 1535–1546. 7 Barton, R.R., Computing Forward-Difference Derivatives in Engineering Optimization, Eng. Opt. Vol. 20

1992, pp. 205-224. 8 Anderson, W. K., Newman, J. C., and Whitfield, D. L., Sensitivity Analysis for Navier–Stokes Equations on

Unstructured Meshes Using Complex Variables, AIAA Journal, Vol. 39, 2001, pp. 56-63. 9 Ferziger. J.H., Further Discussion of Numerical Errors in CFD, International Journal for Numerical Methods

in Fluids, Vol, 23 1996, pp. 1263-1274. 10 Bergsrtrom, J. and Gebart, R., Estimation of Numerical Accuracy for the Flow Field in a Draft Tube,

International Journal of Numerical Methods for Heat and Fluid Flow, Vol. 9, 1999, pp. 472-486. 11 Roy, C. J., McWherter-Payne, M.A., and Oberkampf, W. L., Verification and Validation for Laminar

Hypersonic Flowfields, Part1: Verification, AIAA Journal, Vol. 21, 2003, pp. 1934-1943. 12 Alekseev, A. An Adjoint-Based A Posteriori Estimation of Iterative Convergence Error, Computers &

Mathematics with Applications, Vol. 52, 2006, pp. 1205-1212.

Page 33: [American Institute of Aeronautics and Astronautics 20th AIAA Computational Fluid Dynamics Conference - Honolulu, Hawaii ()] 20th AIAA Computational Fluid Dynamics Conference - Finite-Difference

American Institute of Aeronautics and Astronautics

33

13 Schoofs, A.J.G., van Houten M.H., Etman, L.F.P, and van Capmen D.H., Global and Mid-Range Function Approximation for Engineering Optimization, Mathematical Methods of Operations Research, Vol. 46, 1997, pp. 335-359.

14 Queipo N. V., Haftka R. T., Shyy, W. Goel, T, Vaidyanathan, R. and Tucker P. K., Surrogate-based Analysis and Optimization, Progress in Aerospace Sciences, Vol. 41, 2005, pp. 1-28.

15 Yew S. O., Prasanth B. N., and Andrew J. K., Evolutionary Optimization of Computationally Expensive Problems via Surrogate Modeling, AIAA Journal, Vol. 41, 2003, pp. 687-696.

16 Ramsay, J.O. and Silverman B.W. Functional Data Analysis, second ed., Springer New York, 2002. 17 Poyton, A.A., Varziri, M.S., McAuley, K.B., McLellan P.J., and Ramsay, J.O., Parameter Estimation in

Continuous-time dynamic Models Using Principal Differential Analysis, Computers and Chemical Engineering, Vol. 30, 2006, pp. 698-708.

18 Bowman J. M. and Xie T., On Using Potential, Gradient and Hessian data in the Least-squares Fits of Potential: Application and Tests for H20, Journal of Chemical Physics, Vol. 117, 2002, pp. 10487-10492.

19 Ferziger, J.H. and Peric M. Computational Methods for Fluid Dynamics, Springer, Berlin, 2002. 20 Ortega, J. M., Numerical Analysis A Second Course, Siam, New York, 1992. 21 Eyi, S, Hager, J. O. and Lee, K, D., Airfoil Design Optimization Using The Navier-Stokes Equations,

Journal of Optimization Theory and Applications, Vol. 83, 1994, pp. 447-461. 22 Eyi, S. and Lee K. D., Effects of Sensitivity Derivatives on Aerodynamic Design Optimization, Inverse

Problems in Engineering, Vol. 2, 1996, pp. 213-235.