Professional Documents
Culture Documents
Aiaa 2009 4140 PDF
Aiaa 2009 4140 PDF
Aiaa 2009 4140 PDF
The effects of flux Jacobian evaluation on flow and sensitivity analysis are studied. A cell
centered finite volume method with various upwinding schemes is used. A Newtons method
is applied for flow solution, and the resulting sparse matrix is solved by LU factorization.
Flux Jacobians are evaluated both numerically and analytically. The sources of the error in
numerical Jacobian calculation are studied. The optimum finite difference perturbation
magnitude that minimizes the error is searched. The effects of error numerical Jacobians on
the convergence of flow solver are studied. The sensitivities of the flow variables are
evaluated by direct-differentiation method. The Jacobian matrix which is constructed in the
flow solution is also used in sensitivity calculation. The influence of errors in numerical
Jacobians on the accuracy of sensitivities is analyzed. Results showed that, the error in
Jacobians significantly affects the convergence of flow analysis and accuracy of sensitivities.
Approximately the same optimum perturbation magnitude enables the most accurate
numerical flux Jacobian and sensitivity calculations.
I. Introduction
Recent advances in computer technology and solution algorithms allow efficient solution of very large linear
systems of equations. These advances have been motivating researchers to develop implicit algorithms to solve the
flow equations since usage of implicit methods is more beneficial compared to the explicit ones. Implicit flow
solvers are more stable and the residual can be reduced to very low values within a small number of iterations. The
equations of different disciplines can be strongly coupled with flow equations in an implicit algorithm. Another
advantage of implicit methods is that, sensitivities can be calculated very efficiently in design optimization.
Providing quadratic convergence, Newtons method is a widely used implicit technique for solving non-linear
flow equations. Newtons method requires the calculation of Jacobian matrices whose entries are the derivatives of
discretized residual vector with respect to the flow variable vector. Although the size of this matrix can be very
large, it is sparse in most of the flow problems. There are two methods available for calculating the Jacobian matrix:
analytical and numerical methods. Analytical evaluation is more accurate but the differentiation procedure needs
effort and it is time consuming1,2Moreover for each different flux discretization scheme, Jacobians are needed to be
recalculated. Numerical evaluation can be performed easily by finite differencing the residual vector. Although this
method is simple and independent from the complexity of the scheme, numerical evaluation has a lack of accuracy.
Errors in numerical Jacobian calculations may hamper the convergence of Newtons method. In numerical Jacobian
calculations, error strongly depends on the finite difference perturbation magnitude. In small magnitudes of
perturbation, condition error is dominant and in large magnitudes, truncation error becomes dominant. Hence the
error becomes large for both small and large perturbation magnitudes. In order to evaluate the most accurate
numerical Jacobian, the optimum perturbation magnitude should be used. As shown in Ref. 1, the optimum
perturbation magnitude for numerical Jacobian calculation can be accurately estimated with a simple formula.
In gradient-based aerodynamic design optimization, the derivatives of objective function with respect to the
design variables are needed. These derivatives are also called sensitivities. Sensitivities can be calculated by finite
difference or analytical methods. Although the finite difference method is easy to use, analytical method has more
advantages. In analytical method, sensitivities can be calculated more accurately and in a shorter CPU time. In
analytical methods, due to the implicit relation between flow and design variables, the evaluation of sensitivities is
not straightforward. There are two methods to calculate sensitivities analytically: direct-differentiation and by
1
2
Copyright 2009 by the American Institute of Aeronautics and Astronautics, Inc. All rights reserved.
adjoint methods. In direct differentiation method, the discretized residual equations are differentiated with respect to
design variables, and the resulting equations are solved for flow variable sensitivities. In adjoint method, the
discretized residual equations are introduced as constraint functions, and the system of equations is solved for
adjoint variables. Both methods require the construction and the solution of Jacobian matrix. Therefore, using
Newtons method for flow analysis has advantageous in the calculation of analytical sensitivities. Jacobian matrix
which is constructed for flow analyses can also be used for sensitivity analyses. Sensitivities can be calculated very
efficiently by solving the LU decomposed Jacobian matrix with different right hand sides. In the solution of flow
equations with Newtons method the flux Jacobian is used as a driver to the iterative procedure. Even tough the
accuracy of flux Jacobian affects the convergence behavior of Newtons method; it does not affect the accuracy of
converged solution. However, in calculation of flow variable sensitivities, the flux Jacobian is the part of sensitivity
equation. Therefore the accuracy of the sensitivities strongly depends on the accuracy of the flux jacobian3.
This study mainly composes of two parts. In the first part, the accuracy of the numerically evaluated flux
Jacobian and its effect on the convergence of flow solution are studied. In the second part, the effects of the
accuracy of numerical flux Jacobians on the accuracy of the sensitivities are analyzed. Sensitivities are calculated by
direct differentiation method. The accuracy study is performed by comparing the results obtained from the
numerically and analytically evaluated Jacobians. To perform the study, cell centered finite volume code is
developed. The fluxes are computed by Steger Warming4, Van-Leer5,AUSM6 and Roe7 upwinding schemes. The
analytical Jacobians are evaluated by differentiating Steger-Warming, AUSM, Van Leer fluxes for both first and
second order discretizations. The sparse flux Jacobian matrix is LU factorized and solution is executed by using
UMFPACK sparse matrix solver. The boundary conditions are implemented implicitly. The study is carried out for
flows over the 10 percent circular arc, Ni bump8 geometry and the NACA0012 airfoil geometry.
F (W ) G (W )
+
=0
(1)
W is the conserved flow variable vector and F and G are the flux vectors in , and directions:
u
W = J 1
v
et
uU + p
x
F = J 1
vU + y p
( et + p)U
uV + p
x
G = J 1
vV + y p
( et + p)V
(2)
where is the density, u and v are the components of the velocity vector, p is the pressure, et is the total energy per
unit volume, U and V are contravariant velocity components. In Equation (2), J is the coordinate transformation
Jacobian, , and are the curvilinear coordinates, and x , y , x , y are the transformation metrics.
The discretized form of the steady 2-D Euler equations given in Eq(1) can be written as:
F G
+
=0
(3)
For a cell centered finite volume method Eq (3) can then be written as:
( Fi +1/ 2, j Fi 1/ 2, j ) + (G i , j +1/ 2 G i , j 1/ 2 ) = 0
(4)
The inviscid fluxes of the Euler equations represent the convective phenomena. The upwind flux splitting
schemes are used for the spatial discretization of the flux vectors. In this study the splitted fluxes, F+ ,F- ,G+ and G-,
are calculated by Steger Warming, Van Leer, AUSM and Roe method.
2
American Institute of Aeronautics and Astronautics
Fi 1/ 2, j = F + (W iL1/ 2, j ) + F (W iR1/ 2, j )
+
L
R
G i , j 1/ 2 = G (W i , j 1/ 2 ) + G (W i , j 1/ 2 )
(5)
where the i1/2 and j1/2 denotes a cell interface. The fluxes are calculated at the cell interfaces by using the flow
variables interpolated from the cell center. The simple scheme with first order accuracy in space is obtained by
assuming the values at the cell faces are equal to the values at the nearest cell centers.
W iL+1/ 2 = Wi
W iR+1/ 2 = Wi +1
(6)
Higher order accuracy in space can be obtained by using MUSCL (Monotonic Upstream-Centered Scheme
Conservation Law) 9 scheme interpolation whose formulation is given below
1
W iL+1/ 2 = Wi + ( r ) [ (1 ) + (1 + ) ]
i
4
1
W iR+1/ 2 = Wi +1 ( r ) [ (1 + ) + (1 ) ]
4
(7)
i +1
i
i
(8)
i = Wi +1 Wi
i = Wi Wi 1
(9)
MUSCL scheme requires the limiter function , in order to prevent oscillations and spurious solutions in regions of
high gradients. The limiter function reduces the slopes used in the interpolation of flow variables to the cell faces.
The parameter defines the order of the accuracy of the interpolation. For = -1, purely one sided upwind
interpolation; for = 0, linear interpolation between one upstream and one downstream point, for =1/3 three
point interpolation; are obtained with second order accuracy. For = 1 the upwind influence is lost and face values
are calculated by the arithmetic mean of the neighboring cells.
Using the Van Albadas limiter For = 0, and the Koren s limiter for =1/3 the resulting interpolation
formulation is given below:
W iL+1/ 2 = Wi + iL+1/ 2
W iR+1/ 2 = Wi +1 iR+1/ 2
For = 0
For = 1/3
( a 2 + )bi + (b 2 + )a
a 2 + b2 + 2
(2a 2 + )b + (b 2 + 2 )a
a 2 + b 2 ab + 3
3
American Institute of Aeronautics and Astronautics
(10)
(11)
(12)
where
aL = i
, bL = i
aR = i +1 , bR = i +1
(13)
is a small number which is used to prevent the activation of the limiter in the smooth regions of the flow domain.
is defined as 0.008 for Van Albadas limiter and as the square root of the cell area in 2-D problems for Korens
limiter.
(14)
F (W ) G (W )
R (W ) =
+
(15)
Expanding R (W ) in a Taylor series about (n)th iteration and discarding high order (or nonlinear) terms yields :
R
R n +1 (W ) = R n (W ) +
W
where
n
W
(16)
R
is the Jacobian matrix. Solving above equation for R n +1 (W ) = 0 formulates Newtons Method as:
W
R
W
n
n
W = R(W )
(17)
The new values of flow variable vector W at the (n+1)th iteration can be calculated as:
W n +1 = W n + W n
(18)
4
American Institute of Aeronautics and Astronautics
Ri , j = F + 1 (W L ) + F 1 (W R) F + 1 (W L ) + F 1 (W R)
i+ , j
i+ , j
i , j
i , j
2
2
2
2
+ G + 1 (W L ) + G 1 (W R) G + 1 (W L ) + G 1 (W R)
i, j +
i, j +
i, j
i, j
2
2
2
2
(19)
Taking the derivatives of residual Ri , j with respect to a flow variable Wk ,l , the residual Jacobian defined as:
W i+L1/2, j
W i+R1/2, j +
W iL1/2, j
W iR1/2, j
Ri , j
= A i++1/ 2, j
+ Ai +1/ 2, j
Ai 1/ 2, j
Ai 1/ 2, j
Wk ,l
Wk ,l
Wk ,l
Wk ,l
Wk ,l
+ B i+, j +1/ 2
W i ,Lj +1/2
W i ,Rj+1/2
W i ,Lj1/ 2
W i ,Rj1/2
+ B i, j +1/ 2
B i+, j 1/ 2
B i, j 1/ 2
Wk ,l
Wk ,l
Wk ,l
Wk ,l
F +
A + =
W L
where,
+
F
+ = G
A =
B
,
W R
W L
(20)
G
, B =
W R
Analytical derivation of Residual Jacobian needs two sets of derivatives. The first set composes of the
derivatives of splitted fluxes with respect to the interpolated flow variables at cell faces, which
are A i +1/ 2, j , A
i 1/ 2, j , B i , j +1/ 2 , B i , j 1/ 2 . The analytical relations of these derivatives are function of flux schemes but
they are independent of order of spatial discretization. In this study, to evaluate these derivatives the StegerWarming, Van Leer and AUSM flux schemes are differentiated.
The second set consists of the derivatives of interpolated flow variables at cell faces with respect to the flow
variables at cell centers. The analytical relation of these derivatives varies according to order of spatial discretization
but they are independent of flux schemes. As shown in Eq(6), for the first order discretization right ( W R ) and left
( W L ) flow variables are equal to the values at the cell center of the two cells that are just located at the right and left
of the corresponding cell face. Therefore, in first order discretization k and l values in Eq(20) changes from i-1 to
i+1 and j-1 to j+1, respectively.
W iL+ 1
W iL 1
, j
= Wi , j
, W iR+ 1
, j
= Wi 1, j
, W iR 1
, j
= Wi +1, j
, j
= Wi , j
W iL, j + 1 = Wi , j
, W iR, j + 1 = Wi , j +1
W iL, j 1 = Wi , j 1
, W iR, j 1 = Wi , j
(21)
(22)
i, j
Ri , j
= A i+ 1 , j
2
W
i +1, j
Ri , j
= B i, j + 1
2
W
i , j +1
Ri , j
= A i+ 1 , j
2
W
i 1, j
Ri , j
= B i+, j 1
2
W
5
American Institute of Aeronautics and Astronautics
i , j 1
(23)
where
F + i 1/ 2, j
A i+1/ 2, j =
,
W iL1/ 2, j
F i 1/ 2, j
G + i , j 1/ 2
G i , j 1/ 2
+
A i1/ 2, j =
,
B
=
,
B
=
,
1/
2
,
1/
2
i
j
i
j
W iR1/ 2, j
W iL, j 1/ 2
W iR, j 1/ 2
For the second order discretization, the flow variables at the cell faces are calculated from interpolation of the
flow variables at the center of the 4 neighboring cell using MUSCL method. Therefore, in second order
discretization k and l values in Eq(20) changes from i-2 to i+2 and j-2 to j+2, respectively. Thanks to the continuous
limiter functions used the MUSCL scheme is differentiable of flow variables. Hence analytical Jacobians are
evaluated without any difficulty for high order schemes..
(
(W
i, j
(
(W
)
)
L R
i + 12 , j
L R
i + 12, j
i 1, j
, Wi , j , Wi +1, j , Wi + 2, j
)
)
(24)
+
i, j
W i ,Lj +1/2
W i ,Rj +1/2
W i ,Lj 1/2
W i ,Rj1/2
+ B i, j
B i+, j 1
B i, j 1
Wi , j
Wi , j
Wi , j
Wi , j
(25)
(26)
W i ,Lj+1/2
W i ,Rj +1/2
W i ,Lj1/2
W i ,Rj 1/2
Ri , j
= B i+, j
+ B i, j
B i+, j 1
B i, j 1
Wi , j 1
Wi , j 1
Wi , j 1
Wi , j 1
Wi , j 1
(27)
W i+L1/2, j
W i+R1/2, j
Ri , j
= A i++1/ 2, j
+ Ai +1/ 2, j
Wi + 2, j
Wi + 2, j
Wi + 2, j
W iL1/2, j
W iR1/2, j
Ri , j
= A i+1/ 2, j
Ai 1/ 2, j
Wi 2, j
Wi 2, j
Wi 2, j
W i ,Lj+1/2
W i ,Rj +1/2
Ri , j
= A i+, j +1/ 2
+ Ai , j +1/ 2
Wi , j + 2
Wi , j + 2
Wi , j + 2
(28)
W i ,Lj 1/2
W i ,Rj 1/2
Ri , j
= A i+, j 1/ 2
Ai , j 1/ 2
Wi , j 2
Wi , j 2
Wi , j 2
The main advantage of the analytical method is that the residual Jacobian can be calculated accurately. The order
of error in the analytical method can be as small as the round-off error. Although the analytical method requires
code development, run time of an analytical code is short. However, as the complexity of the discretized residual
equations increases, the derivation of the analytical Jacobian becomes more complicated.
6
American Institute of Aeronautics and Astronautics
R m R m (W ) R m (W + en ) R m (W)
=
=
Wn
Wn
(29)
where m = 1, mmax and
n = 1, (mmax + nbound )
where, R m is the mth component of the residual vector and the Wn is the nth component of the flow variable vector,
en is the nth unit vector. The value of the nth component of the unit vector en is one, and all other components are
zero. The size of the residual vector is defined by mmax, which equals to 4 times the number of interior cells in 2D
flow problems. The size of the flow variable vector is larger as much as the number of boundary cells, nbound. In
the numerical method, Jacobian evaluation does not require the large coding effort as needed in the analytical
method. The same residual discretization is used for both the original and perturbed flow variables. This reuse of the
same code is one of the important advantages of the numerical approach. Moreover, for cases in which the analytical
derivation is difficult, numerical Jacobian can be obtained without any difficulty.
The inaccuracy and long computation time are the two main disadvantages of the numerical Jacobian evaluation.
The error in numerical Jacobian is function of the finite-difference perturbation magnitude. The accuracy of the
numerical jacobians can be improved with the usage of an optimum perturbation magnitude that minimizes the total
error in the finite difference evaluation. The main reason that causes long computation time is the necessity of the
residual vector calculation with each perturbed flow variable in the whole domain. For a given cell, the residual is
only a function of flow variables in that cell and the neighboring cells according to the discretization used. In order
to reduce computation time, the perturbed residual is computed only with flow variables in these cells. For firstorder discretization, in addition to the cell in which the flow variable is perturbed, four neighboring cells are used.
Considering four flow variables in each cell, 20 perturbed residual vector evaluations are required for the given cell.
In second-order discretization, using eight neighboring cells in addition to the given cell, 36 perturbed residual
vector evaluations are required. Although the speed and the accuracy of the analytical method may not be reached,
the numerical Jacobian evaluation method may become faster and more accurate with some precautions.
2 R m ( )
W 2 2
(30)
where =[ Wn , Wn + ].
( )
Because of computer precision, the exact values of the mth components of the vector R m W and their computed
( )
7
American Institute of Aeronautics and Astronautics
(31)
R m (W ) R m (W + en ) R m (W)
=
Wn
Er (W + e ) Er (W)
R m (W ) Rm (W + en ) Rm (W)
n
m
=
+ m
Wn
(32)
R m (W ) Rm (W )
=
+ Ecm ( )
Wn
Wn
} the
Ec( ) =
2 ER
(33)
This bound of round-off error can be considered the precision error, which depends on the computer processor and
compiler. For the computations of normalized variables where the magnitude of the computed values are around
one, the precision error equals to machine epsilon M . A reasonable estimate of M can be given as follows:
M =
1
2m
such that
1 + M > 1
(34)
where m is the number of possible highest bits in the binary representation of the mantissa. The machine epsilon
M values of the compiler-computer configuration are found according to Eq(34). In this study, for single precision
M 1.19 107 , and for double precision M 2.2 1016 values are reached.
( ETOTAL ( ) )
m =1
nn =1
2 ERm 2 Rm ( )
+
2
wnn
2
(35)
In the Eq(35) the outer summation loops are constructed for the whole domain, excluding the ghost boundary
cells where the residuals are not computed. The number of neighboring cells which are related to the residual vector
is represented by neigh; it has a value of 4 in 1st order discretization and 8 in 2nd order discretization. The least
squares minimization is performed by differentiation of the Eq(35) with respect to perturbation magnitude.
8
American Institute of Aeronautics and Astronautics
( ETOTAL ( ) )
m =1
( ETOTAL ( ) )
( ETOTAL ( ) )
2
2
m =1 nn =1
2
2
wnn
wnn
2
4 ER2m
2 mmax 4( neigh +1) 2 Rm ( )
m =1 nn =1 wnn2 4
2
nn =1
2
2
2 ERm Rm ( ) 2 ERm Rm ( ) 1
+
2
2
2
2 2
2
wnn
wnn
(36)
The optimum which minimizes the total error is found by equating Eq (37) to zero
( ETOTAL ( ) )
=0
= OPT
(37)
m =1
nn =1
4
2
2
nn
(E )
m =1
Rm
nn =1
=0
( 4(neigh + 1) ) ( ER
m max
OPT = 2
m =1
m =1
nn =1
2 Rm ( )
2
wnn
(38)
Using the definition of the L2 norm, above equation can be simplified into the following form:
4(neigh + 1) ER
OPT = 2
R ( )
2
w
(39)
Substituting above optimum perturbation magnitude into the Eq(35) the minimum error is evaluated as follows:
ETOTAL ( OPT ) = 2 4(neigh + 1) ER
+ 2 ERm
2
2
wnn
m =1
nn =1
w 2
(40)
Derived equations show that to estimate the numerical Jacobian with minimum error requires the calculation of
second derivatives of residual vector with respect to flow variables and the round-off error. The round-off error in
single precision can be estimated as the difference in residual vectors that are calculated with single and double
precisions whereas the estimation of the round-off error in higher order precision calculations may not be easy. The
evaluation of second derivatives can be employed by finite difference relation. Although the evaluated values may
not be very accurate they may be useful for estimating the order of magnitudes.
9
American Institute of Aeronautics and Astronautics
OPT = 2
2 R ( )
2
w
(41)
The solution of CFD problems are commonly performed with normalized variables. Therefore assumption of the
round-off errors to be equal to the machine epsilon may be reasonable. Calculation of second derivatives may not be
easy. Therefore in most of the practical calculation, the order of second derivatives can be assumed as unit. These
approximations will result in a simple formula which can be used to estimate optimum perturbation magnitude.
OPT = 2
4(neigh + 1) M
(42)
The flux Jacobians are evaluated using wide range of perturbation magnitudes and the optimum value obtained
from trial error procedure was compared with corresponding results of Eq (42).
n
n
W = R(W )
(43)
The original Newtons method can be constructed as t . In the modified Newtons method, a small initial
value t0 is chosen and a new value of t can be obtained using L2-norm of the residuals as
t n = t 0
R(W 0 )
2
R (W n )
(44)
In this study, to improve the convergence from free-stream initial conditions, the modified Newtons method is
used. For all calculations the L2-norm is computed including all the residuals in the domain. The convergence of this
10
American Institute of Aeronautics and Astronautics
method is slow until t gets very large. However, the modification in Newtons method is useful in the early stages
of iterations. Later, the solution becomes more accurate, and the diagonal term addition may not be needed. The
withdrawal of the diagonal term from the matrix at the proper convergence level significantly reduces the number of
iterations and CPU time. Initial and the withdrawal values of diagonal term that gives the best convergence
performance are chosen by trial-error.
11
American Institute of Aeronautics and Astronautics
Ni bump geometry; 65x17 grid , 0.675 inlet Mach #, 1st order AUSM fluxes
L1
L2
L
Round-off error
4.75 x10-9
7.76 x10-10
2.44 x10-9
Second derivatives
0.047
0.016
0.0202
optimum
Minumum ET
( Eq.39 )
( Eq.40 )
4.34 x10-4
0.885
7.8 x10-4
1.3x10-2
-
optimum
(trial error)
3.96x10-4
3.1x10-4
2.0x10-4
12
American Institute of Aeronautics and Astronautics
Minumum ET
(trial error)
0.927
8.9 x10-3
5.6 x10-4
The value of machine epsilon in single precision is approximately the square root of the value computed by double
precision. Figure 7 shows that with the change of the computation precision from single to the double, the optimum
values becomes the square of the values obtained for single precision. Since the change of the precision affects only
the round-off error, and reduces the numerator of the Eq(39) by square, the location of the optimum and the total
error changes accordingly. In Eq(39) the norm values of round-off and second derivatives are in division, hence the
optimum perturbation magnitude does not vary with different norm definitions. However in Eq(40) the norms of
round-off error and second derivatives are in multiplication. Hence, the total error varies with norm definition. The
norms used in Figure 7 are L1, L induced matrix norms and Frobenious entry-wise matrix norm, and they are
defined below:
m
m n
|| A ||F = | aij |2
i =1 j =1
|| A || = max | aij |
1 j m
i =1
j =1
(45)
The formulation of the second derivatives of flux residuals with respect to the flow variables can be obtained by
differentiating the residual Jacobian as below:
2 Ri , j
=
W k2,l
Wk ,l
Ri , j
Wk ,l
2 F + i +1/ 2, j Wi+L1/2, j
2Wi+L1/2, j 2 F i +1/ 2, j Wi+R1/2, j
2Wi+R1/2, j
+
=
A
A
+
+
+
i +1/ 2, j
i +1/ 2, j
2
W L 2 W
Wk2,l
Wk2,l
Wk ,l
Wi+R1/2, j
k ,l
i +1/2, j
F
2
i 1/ 2, j
2
L
Wi1/2, j
Wi1/2, j
L
Wk ,l
Wi ,Lj +1/2
Wk ,l
2 G + i , j 1/ 2 Wi ,Lj1/2
Wi ,Lj 1/2
Wk ,l
Wi1/2, j
2
A+ i 1/ 2, j
+ B + i , j +1/ 2
B + i , j 1/ 2
Wk2,l
2Wi ,Lj +1/2
Wk2,l
2Wi ,Lj 1/2
Wk2,l
F
2
i 1/ 2, j
2
R
Wi1/2, j
WiR1/2, j
Wk ,l
2 G i , j +1/ 2 Wi ,Rj+1/2
Wi ,Rj +1/2
Wk ,l
2 G i , j 1/ 2 Wi ,Rj 1/2
Wi ,Rj 1/2
Wk ,l
13
American Institute of Aeronautics and Astronautics
A+ i 1/ 2, j
+ B i , j +1/ 2
B i , j 1/ 2
2WiR1/2, j
Wk2,l
2Wi ,Rj +1/2
Wk2,l
2Wi ,Rj 1/2
Wk2,l
(46)
Method
n =1 w
SW
23.859
VL
25.186
AUSM
24.405
2W iL1/ 2
Wk2,l
2 iL1/ 2
Wk2,l
2W iR1/ 2
Wk2,l
2 iR1/ 2
Wk2,l
(47)
The second derivatives of the interpolated face variables directly depend on the second derivatives of the limiter
functions. Limiters are known to stall the convergence of an iterative scheme, because of accidental switching in
smooth flow regions20 In smooth flow regions difference between the values of flow variables at the neighboring
cells is nearly zero. Therefore assuming that backward and forward differencing of flow variables (a and b in Eq 11
and Eq12) are equal to each other would be reasonable. The formulation for the second derivatives of the limiter
function with this assumption will become very simple and it is given in Eq(47). This formulation presents that in
smooth flow regions, as the values of get smaller the second derivatives of the limiter functions becomes larger.
2
W 2
=
a =b
a
a+
14
American Institute of Aeronautics and Astronautics
(48)
1
n
2 R ( w)
n =1 w
0.035
0.165
7.02
58.7
260
n
15
American Institute of Aeronautics and Astronautics
grid
i =2
gle
Ridouble
Risin
,j
,j
j =2
7.41x10-9
6.5x10-9
1.4x10-7
65x17 H-grid
129x33 H-grid
129x33 C-grid
imax 1 jmax 1
(
i =2
Ridouble
,j
j =2
gle
Risin
,j
1.3x10-8
1.2x10-8
4x10-6
calculated as 1.2x108 for the H-grid with the same size of node numbers. The calculated single precision round-off
errors with different norm definitions are tabulated in
The second derivatives of the residual at a given cell depends on the flow variable at that cell and 4 or 8
neighboring cells according to the order of
discretization. Figure 12 and 13 present the
contour plots of the averaged values of the second
derivatives of the residual vector. Figure 13 shows
that the second derivatives of the residual vector
gets larger near boundaries and gets smaller near
the wall. The comparison of the values of second
derivatives for those two cases shows that in the
regions closer to the wall geometries the second
derivatives are in the same order of magnitudes.
However in the far-field regions of the c-grid the
second derivatives of the residual vector are
approximately 2 orders of magnitude larger.
Table-4, Figures 12 and 13 present that in flow
solutions with larger grid cells, the round-off error
and the second derivatives of the residual vector
get larger compared to the ones that uses a grid
with smaller sized cells.
Figure 12.Contours of second derivatives
The effects of the cell size on the second
derivatives and on the total error in numerical
Jacobian are shown by two alternative ways.
Firstly, only the cells closer to the airfoil which
has smaller sizes are used for the comparison with
H-grid which has small sized cells. Secondly, the
same flow problem is re-solved with a c-grid
whose farfield is closer to the airfoil geometry
with same number of nodes. The error plots of the
numerical Jacobian for those cases are given in
Figure-16 with the error plot of the H-grid case.
The Figure 16 is drawn with the results obtained
with 2nd order discretization. In the small region of
the c-grid which is very close to the airfoil
geometry, the magnitude of the total error is
almost equal to the total error of the H-grid case
since the cell size are almost equal. The results
also show that by using a grid with closer far-field
boundaries, uniformly distributed grid cells can be
constructed and the total error may be reduced.
However, as the far-field boundary gets closer to
geometry the accuracy of the boundary conditions
becomes more critical.
Figure 13. Contours of second derivatives
17
American Institute of Aeronautics and Astronautics
Figure 15.
18
American Institute of Aeronautics and Astronautics
Figure 17.
Figure 21 Convergence-history
( AUSM, Naca0012)
20
American Institute of Aeronautics and Astronautics
Figure 23.
In Figure 22 the effect of the used in the limiter function on the convergence performance is given. To generate
the results given in Figure 22, Each numerical Jacobian is calculated by its own optimum perturbation magnitude
which can be read from Figure-9. Figure 23 presents the CPU time spent in an Newton iteration. Figure shows that,
the most of the CPU time is spent for Jacobian matrix evaluation, when the large grid size is used eventhough 1st
order discretization is utilized.
(49)
Hence applying the chain rule sensitivities of the aerodynamic loads can be calculated as follows
. dC j = C j W + C j X + C j
d k W k X k k
(50)
The second term in the right hand side is zero when design variables are independent from the geometry. The
third term in the right hand side is zero when geometrical design variables are used since their effect on total
derivative is already stated in the second term. In this study geometrical design variables are used. The aerodynamic
geometry is modified by using Hicks Henne functions15. The weightings of the functions are chosen as design
variables.
C j W C j X
=
+
d k W k X k
dC j
21
American Institute of Aeronautics and Astronautics
(51)
where Cj, w, X , k are aerodynamic loads, flow variables, grid coordinates and design variables, respectively The
aerodynamic loads have explicit dependence on the flow variables and the coordinates of the geometry. Therefore
the evaluations of Cj /W and Cj /X derivatives are simple. As an example, for Euler equations, the dependence
of lift coefficient, CL, and drag coefficient, CD, on the flow variables and coordinates of the geometry can be
illustrated as follows.
C L = C y cos C x sin
(52)
C D = C y sin + C x cos
Cx and Cy are the force coefficients in x and y directions and can be evaluated as:
NE
NE
Cx = Cx j
Cy = Cy j
j =1
(53)
j =1
(
(x
Cx j = C p j yb j+1 yb j
Cy j = C p j
bj
xb j+1
)
)
(54)
Cpj =
Pwall j
1
V2l
2
(55)
The pressure on the geometry can be written in terms of flow variables as below:
Pwall j
2
2
u ) wall + ( v ) wall j
(
j
= ( 1) ( E ) wall
j
2 wall j
(56)
In this study, aerodynamic geometry is perturbed by Hicks Henne functions and new coordinates of the grid is
obtained by using Equation 34. The modification to geometry is applied such that the domain is perturbed mostly
near the wall and effect of perturbation is diminished away from the wall. The grid points furthest to the wall are not
affected by the perturbations applied to the wall.
j j
X new = X old + k f k ( x) max
jmax 1
(57)
Hence the grid coordinates have an explicit dependence on the design variables, and the grid sensitivities can be
evaluated simply as:
X
j j
= f k ( x ) max
k
jmax 1
(58)
Equations from52 to 58 show some explicit relations such that Cj= Cj(X,w) and X =X(k). Therefore the evaluation
of Cj /w, Cj /X, X/k derivatives are straightforward. However, the evaluation of derivative w/k is not
simple since there is no explicit relation between flow variables and design variables. There are two methodologies
22
American Institute of Aeronautics and Astronautics
{ R (W (
) , X ( k ) ) } = {0}
(59)
The flow sate sensitivity, w/k is evaluated from direct differentiation of steady state flow governing equations as
follows16,17
R w R X
w + X = 0
k
k
(60)
w
R R X
=
k
W X k
(61)
Above equation shows that, the calculation of flow state sensitivities requires the evaluation of flux Jacobian matrix,
R /w. In previous sections, the flux Jacobian were evaluated analytically and numerically, and the accuracy of
numerical Jacobians were analyzed. The main interest of this section is to investigate the effect of accuracy of the
numerical flux Jacobian on the accuracy of flow state sensitivities. For this purpose, various numerical flux
Jacobians with different finite difference perturbation magnitudes are used to obtain sensitivities. The error in
sensitivities calculated with numerical flux Jacobians is defined as.
Errorsensitivity =
W
W
k numeric k analytic
jacobian
(62)
jacobian
The Newtons method is efficiently used in evaluation of sensitivities since the jacobian matrix appearing in
Equation (54) was already LU decomposed to solve Equation (14). Hence in Equation (54) each of flow state
sensitivities are calculated in single iteration by simple backward and forward substitution.
23
American Institute of Aeronautics and Astronautics
VIII. Conclusion
The Euler flow equations are solved with
the Newtons method. The source of the
error in numerical Jacobian evaluation is
analyzed. The finite difference perturbation
magnitude significantly affects the
accuracy of the numerical Jacobian. Using
the optimum finite difference perturbation
magnitude the error in numerical Jacobian
can be minimized. Some simple formulas
are derived to evaluate the optimum
perturbation magnitude. Evaluated values
are compared with the ones given by trial
and error method with a range of
perturbation magnitudes. The optimum
perturbation magnitude is function of the
magnitudes of round-off error and the
second derivatives of the residual vector. In
first order flux discretization the magnitude
Figure 29. Effects of of flow condition on error in sensitivity
of second derivatives are not very large. In
( AUSM, Ni bump)
second
order
discretization
these
derivatives may have large values. This
may be due to the large values of the
second derivatives of the limiter functions
in the smooth flow regions. The effect of the accuracy of the Jacobian matrix on the convergence of the flow
solution is studied. The numerical Jacobian evaluated with the optimum perturbation magnitudes can show the same
convergence performance that is obtained by the analytic Jacobian. The effect of the finite difference perturbation
magnitude on the accuracy of the numerical sensitivities is analyzed. The same optimum perturbation magnitude
enabled the most accurate numerical Jacobian and sensitivities for a wide range of flow problems.
25
American Institute of Aeronautics and Astronautics
IX. References
1
Onur, O. and Eyi, S., Effects of the Jacobian Evaluation on Newtons Solution of the Euler Equations, International
Journal for Numerical Methods in Fluids, Vol. 49, pp 211-231, 2005.
2
Orkwis,P.,D., and Venden, K.,J., On the Accuracy of Numerical Versus Analytical Jacobians, AIAA Paper 94-0176,
1994
3
Rizk, M. H., The Use of Finite-Differenced Jacobians for Solving the Euler Equations for Evaluating Sensitivity
Derivative, AIAA Paper 94-2213, 1994.
4
Steger, J. L., and Warming, R. F., Flux Vector Splitting of the Inviscid Gasdynamic Equations with Application to
Finite-Difference Methods, Journal of Computational Physics, Vol. 40, 1981, pp. 263-293.
5
Van Leer, B., Flux Vector Splitting for the Euler Equations, ICASE Report 82-30, September 1982.
Liou, M.-S. A sequel to AUSM: AUSM+, Journal of Computational Physics, Vol 129 (1996), pp. 364382
7
Roe, P. L., Characteristics-Based Schemes for the Euler Equations, Annual Review of Fluid Mechanics, Vol. 18, 1986,
pp. 337-365.
8
Ni, R. H., A Multiple-Grid Scheme for Solving the Euler Equations AIAA Journal vol.20, no.11 pp.1565-1571, 1982.
Hirsch, C., Numerical Computation of Internal and External Flows, Vol. I-II, John Wiley & Sons, Chichester, 1990.
10
Dennis J.E., Schnabel R.B., Numerical Methods for Unconstrained Optimization and Nonlinear Equations, Prentice Hall,
New Jersey, 1983.
11
Davis, T. A., UMFPACK Version 4.1 User Manual, University of Florida, Florida, 2003.
12
Gill, P.E., Murray W., and Wright M.H., Practical Optimization, Academic Press, London, 1992.
13
Kelley C.T., Iterative Methods for Linear and Nonlinear Equations, Society for Industrial and Applied Mathematics,
Philadelphia, 1995.
14
Korivi V.M., Taylor A.C., Newman P.A., Hou G.J.W. and Jones H.E.., An Approximately Factored Incremental Strategy
For Calculating Consistent Discrete Aerodynamic Sensitivity Derivatives, AIAA Paper 92-4746, 1992
15
Lee, K. and Eyi, S., Aerodynamic Design Via Optimization ,Journal of Arcraft Vol. 29, No.6 November-December
1992, pp 1012-1029.
16
Taylor, A. C. III, Korivi, V. M., and Hou, G. W., Sensitivity Analysis Applied to The Euler Equations : A Feasibility
Study with Emphasis on Variation of Geometric Shape, AIAA Paper 91-0173 1991
17
Taylor, A. C. III, , Hou, G. W., and Korivi, V. M., A Methodology for Determining Aerodynamic Sensitivity
Derivatives with Respect to Variation of Geometric Shape AIAA Paper 91-1101 1991
18
Radespiel, R., and Kroll, N., Accurate Flux Vector Splitting for Shocks and Shear Layers, Journal of Computational
Physics 121,1995, pp 66-78.
19
Godlewski, E., and Raviart, P.-A., Numerical Approximation of Hyperbolic Systems of Conservation Laws ,Springer,
New York,1996.
20
V. Venkatakrishnan, On the accuracy of limiters and convergence to steady state solutions,J.Comp. Phys., 118 (1995), pp.
120--130.
21
Van Albada, G.D., Van Leer, B., Roberts, W.W., A Comparative Study of Computational Methods in Cosmic Gas
Dynamics, Astronomy and Astrophysics, Vol 108, 1982, pp. 76-84,
26
American Institute of Aeronautics and Astronautics