Optimization of Multistage Coefficients for Explicit ...

18
AIAA 2003–3705 Optimization of Multistage Coefficients for Explicit Multigrid Flow Solvers Kaveh Hosseini and Juan J. Alonso Stanford University, Stanford, CA 94305 16th AIAA Computational Fluid Dynamics Conference June 23–26, 2003/Orlando, FL For permission to copy or republish, contact the American Institute of Aeronautics and Astronautics 1801 Alexander Bell Drive, Suite 500, Reston, VA 20191–4344

Transcript of Optimization of Multistage Coefficients for Explicit ...

Page 1: Optimization of Multistage Coefficients for Explicit ...

AIAA 2003–3705Optimization of MultistageCoefficients for Explicit MultigridFlow SolversKaveh Hosseini and Juan J. AlonsoStanford University, Stanford, CA 94305

16th AIAA Computational Fluid DynamicsConference

June 23–26, 2003/Orlando, FLFor permission to copy or republish, contact the American Institute of Aeronautics and Astronautics1801 Alexander Bell Drive, Suite 500, Reston, VA 20191–4344

Page 2: Optimization of Multistage Coefficients for Explicit ...

AIAA 2003–3705

Optimization of Multistage Coefficients forExplicit Multigrid Flow Solvers

Kaveh Hosseini∗ and Juan J. Alonso†

Stanford University, Stanford, CA 94305

Explicit Euler and Navier-Stokes flow solvers based on multigrid schemes combinedwith modified multistage methods have become very popular due to their efficiency andease of implementation. An appropriate choice of multistage coefficients allows for highdamping and propagative efficiencies in order to accelerate convergence to the steady-state solution. However, most of these coefficients have been optimized either by trialand error or by geometric methods. In this work, we propose to optimize the dampingand propagative efficiencies of modified multistage methods by expressing the problemwithin the framework of constrained non-linear optimization. We study the optimizationof different objective functions with a variety of constraints and their effects on theconvergence rate of a two-dimensional Euler flow solver. We start with a simple scalarone-dimensional model wave equation to demonstrate that the constrained optimizationresults yield multistage coefficients that are comparable to those that have been used inthe past. We then extend the method to the case of the two-dimensional Euler equationsand we distinguish each optimization case not only by choosing a different objectivefunction, but also by specifying the conditions in a generic computational cell in termsof three parameters: the local Mach number, the aspect ratio, and the flow angle. Usingthis approach, it is possible to find the optimized coefficients for different combinations ofthese three parameters and use suitable interpolations for each of the cells in the mesh.Finally, we present observations regarding the relative importance of the propagativeand damping efficiency of explicit schemes and conclude that, although a certain level ofdamping is required for stability purposes, the major contribution to convergence appearsto be the propagative efficiency of the scheme.

Nomenclaturei Imaginary unit =

√−1

j, k Cell indices in the two computational coordi-nate directions

m Last (highest) level for multistage scheme

l Arbitrary level index for multistage scheme

αl, βl Modified Runge-Kutta multistage coefficients

w State variable for the scalar wave equation

W State vector for conservative variables

dWe Differential state vector for entropy variables

Wj,k Discretized state vector (state at mesh points)

Fx, Fy Flux vectors in the x and y directions

S Cell surface

dSx, dSy Projections of S in the x and y directions

u x-component of velocity

v y-component of velocity

ρ Density

p Static pressure

E Total energy (internal plus kinetic)

H Total enthalpy

q Velocity magnitude

c Speed of sound

R Residual

Q Convective part of the residual

D Dissipative part of the residual

∗Ph.D. Candidate, AIAA Student Member†Assistant Professor, AIAA Member

∆t Time step

∆x Spatial increment in the x direction

∆y Spatial increment in the y direction

a Wave speed in the x direction

λ Courant-Friedrichs-Lewy or CFL number

µ Dissipation coefficient

z, Z Fourier residual operators

g Amplification factor

ξ, η Error frequencies

A, B Flux Jacobians in conservative variables

Ae, Be Flux Jacobians in entropy variables

I Objective function to optimize

I4 Four by four identity matrix

M Mach number

ϕ Flow angle

AR Cell Aspect Ratio

P Preconditioning matrix

< Real part

= Imaginary part

Introduction

DURING the last decade, explicit multigrid meth-ods have carved their niche in the solution of

complex inviscid and viscous flows. In nearly isotropicmeshes, such as those used for the solution of the Eulerequations, explicit methods achieve rates of conver-gence that approach the theoretical limit. Despite thefact that these convergence rates degrade significantly

1 of 17

American Institute of Aeronautics and Astronautics Paper 2003–3705

Page 3: Optimization of Multistage Coefficients for Explicit ...

in the solution of the Reynolds Averaged Navier-Stokesequations (due to both the presence of viscous effectsand the existence of highly stretched meshes),12 thecost of solution using these explicit multigrid meth-ods rivals those of implicit solvers. Moreover, explicitmethods achieve much more scalable parallel imple-mentations and therefore have been a popular choicefor the solution of large-scale, complex configurationproblems.

Multistage schemes for the numerical solution of or-dinary differential equations are usually designed toyield a high order of accuracy. Since the present ob-jective is simply to obtain a steady state as rapidly aspossible, the order of accuracy is not important. Thisallows the use of schemes selected purely for their prop-erties of stability and damping. For this purpose itpays to distinguish the hyperbolic and parabolic partsstemming respectively from the convective and dissi-pative terms, and to treat them differently.

A majority of the most efficient existing explicitmultigrid solvers are based on the use of a modi-fied Runge-Kutta relaxation scheme which often treatsthe convective and dissipative portions of the resid-ual separately so that optimum convergence rates atminimum computational cost can be achieved.5,7 Anumber of 3-, 4-, and 5-stage Runge-Kutta schemeshave been developed in the past and have shown goodconvergence properties. The choice of the coefficientsfor these multistage schemes was based on the one-dimensional scalar model equation and the currentstate of the art coefficients have been found via trialand error. In some cases, simplified geometric meth-ods13 were used or optimizations were performed forclassical Runge-Kutta multistage schemes only, butnot for the computationally advantageous modifiedRunge-Kutta schemes.8

In this work, we propose to formalize the choice ofcoefficients for these multistage schemes, by castingthe problem into a constrained optimization frame-work. The optimum coefficients are those that maxi-mize both the damping and the convergence rates ofthe scheme subject to appropriate constraints. Usingthe values of the multistage coefficients as design vari-ables, a non-linear constrained optimizer can be usedin such a way that the convergence rates are optimized.It must be noted that the choice of cost function andconstraints that maximize the convergence rate of ascheme is never straightforward. In fact, it has beennoted in the past that for explicit multigrid schemes, itis important to select coefficients that efficiently dampthe high-frequency modes in each grid level. However,little attention has been paid to the more importantissue of propagative efficiency.

We first start by defining the governing equationsof the problem to which we will apply our optimiza-tion procedure and the associated modified Runge-Kutta multistage scheme. We then present the one-

dimensional scalar model convection-diffusion equa-tion and the results of the application of the con-strained optimization procedure to the choice of multi-stage coefficients for different objective functions. Fi-nally, we discuss similar results for the Euler equationsand outline the procedure that could be used to carryout a coefficient optimization similar to the one pre-sented here.

Governing EquationsLet us start by considering the case of the Euler

equations for the two-dimensional flow of an inviscidideal gas. The finite volume form can be written as

d

dt

SWdS +

∂S(FxdSx + FydSy) = 0. (1)

Using conservative variables

W =

ρρuρvρE

, (2)

the Euler fluxes in the x and y directions are

Fx =

ρuρu2 + p

ρuvρuH

, Fy =

ρvρvu

ρv2 + pρvH

, (3)

where

p = (γ − 1) ρ

(E − q2

2

)(4)

H = E +p

ρ=

c2

γ − 1+

q2

2(5)

q2 = u2 + v2 (6)

c2 =γp

ρ. (7)

If we discretize the spatial derivatives in eq. 1 andadd artificial dissipation terms, we can write the semi-discrete form as

dWj,k

dt+ Rj,k = 0

Rj,k = R(Wj,k) = Qj,k + Dj,k. (8)

The remainder of this paper will be concerned withthe stability, damping, and propagative efficiency ofnumerical schemes used to drive this equation to asteady-state.

Explicit Multistage MethodModified Runge-Kutta Equations

Let Wn be the value of W after n time steps. Drop-ping the subscripts j, k the general m-stage modified

2 of 17

American Institute of Aeronautics and Astronautics Paper 2003–3705

Page 4: Optimization of Multistage Coefficients for Explicit ...

scheme7 can be written as

W (n+1,0) = Wn

W (n+1,1) = W (0) − α1∆tR(0)

...W (n+1,l) = W (0) − αl∆tR(l−1) (9)

...W (n+1,m) = W (0) − ∆tR(m−1)

Wn+1 = W (n+1,m),

with

R(l) = Q(l) + D(l)

Q(0) = Q(Wn)D(0) = D(Wn)Q(l) = Q(W (n+1,l))D(l) = βlD(W (n+1,l)) + (1− βl)D(W (n+1,l−1)).

Note how this method distinguishes between the con-vective and dissipative terms by using two sets ofcoefficients αl and βl. Such non-standard multistageschemes have much larger stability regions than con-ventional Runge-Kutta schemes. Moreover, by forcingsome of the βl to be zero, we can avoid the computa-tion of dissipative terms on the corresponding stagesand thus reduce computational costs.5 Note that if weset all βl to 1 we simply find the classical Runge-Kuttaequations.

5-stage Martinelli-Jameson coefficients

One very popular modified Runge-Kutta schemeknown for its high propagative and damping efficien-cies and large stability domain is a 5-stage schemeproposed by Martinelli and Jameson with the followingcoefficients

α1 = 1/4α2 = 1/6α3 = 3/8α4 = 1/2α5 = 1

β1 = 1β2 = 0β3 = 14/25β4 = 0β5 = 11/25.

(10)

We will refer to the above coefficients as the 5-stageMJ coefficients. For these coefficients, we can note thatevery other βl is equal to zero, this means that we saveon computational costs by computing the dissipativefluxes every other stage only. We can also note thatconsistency requirements impose that α5 = beta1 = 1.

We will use the MJ coefficients as our principal ref-erence in order to assess the efficiency of an optimizedset of coefficients. Thus for the purpose of this paperwe will concentrate only on 5-stage schemes that haveβ2 = β4 = 0.

Scalar one-dimensional model waveequation

General formulation

Let us consider the one-dimensional model problem

wt + awx + µ∆x3wxxxx = 0. (11)

In the absence of 3rd order dissipation and for a = 1,eq. 11 describes the propagation of a disturbance atunit speed without distortion. The viscous term rep-resents the artificial dissipation added in order to sta-bilize central differencing numerical methods. Usingcentral differencing our residual has the form

∆tRj =λ

2(wj+1 − wj−1) (12)

+ λµ (wj+2 − 4wj+1 + 6wj − 4wj−1 + wj−2) ,

with the CFL number defined as

λ =a∆t

∆x=

∆t

∆x. (13)

Now, if we consider a Fourier mode w = eipx withxj = j∆x and set ξ = p∆x, we have

∆tdw

dt= zw, (14)

withz = −λi sin ξ − 4λµ(1− cos ξ)2. (15)

A single step of the multistage scheme yields

wn+1 = g(z)wn, (16)

where g(z) is called the amplification factor. For anm-stage scheme, g is computed iteratively. For clas-sical Runge-Kutta schemes g is a complex polynomialfunction of z but for modified Runge-Kutta schemesg is the sum of a polynomial function of <(z) and apolynomial function of =(z)

Stability Domain for the MJ coefficients

We can use the stability domain of a given set ofmultistage coefficients as a visual tool in order to un-derstand some of the mechanisms of damping andpropagation. Fig. 1 shows the stability domain of theMJ coefficients, the locus of the residual operator z(ξ)as defined in eq. 15, and the amplification factor |g|for three different sets of λ and µ. On the left, the sta-bility domain is represented by contours lines of theamplification factor with contour levels going from theoutside to the inside from 1 to 0 with increments of0.1. The locus of z(ξ) is represented on the same fig-ure for −π ≤ ξ ≤ π as the oval-shaped curve extendingin the direction of the imaginary axis. On the right wecan see how the locus of z(ξ) translates into the am-plification factor

∣∣∣g(

ξπ

)∣∣∣ and since the locus of z(ξ) is

symmetric, we will only consider 0 ≤ ξπ ≤ 1.

3 of 17

American Institute of Aeronautics and Astronautics Paper 2003–3705

Page 5: Optimization of Multistage Coefficients for Explicit ...

On fig. 1-a we have the locus of z(ξ) for λ = 2.8and µ = 1

32 . This value of µ = µ0 is typically usedin CFD computations and we will use it as a refer-ence value. It is important to keep µ small in orderto avoid introducing too much dissipation, otherwisewe would produce a numerical solution that would notrepresent accurately the physical solution. Fig. 1-bshows the amplification factor |g| corresponding to thelocus of z shown on fig. 1-a. We can clearly see thathigh-frequency errors are damped more efficiently thanlow-frequency errors. This is a key feature of suchmultistage schemes. We are indeed interested in damp-ing high-frequency errors efficiently because multi-grid techniques transfer low-frequency errors from finemeshes to coarser meshes on which they become high-frequency errors themselves.6,12 Therefore we willconcentrate on improving the damping properties ofmultistage schemes on the interval π

2 ≤ ξ ≤ π.

Although it is well-known that convergence dependson both propagation and damping, there is no simpleanalytical way to compare their respective contribu-tions to convergence. We will consider the amplifica-tion factor |g| as a measure of damping efficiency andthe CFL number λ as a measure of propagative effi-ciency. To analyze propagative efficiency in a morecomplete way, one can include the effects of residualsmoothing as it can dramatically increase λ. One canalso use a more precise measure of propagative effi-ciency by analyzing the group velocity cg(ξ) of a wavepacket rather than λ only. For the sake of simplicity,we have chosen to leave the impact of residual smooth-ing and group velocity to further studies.

On figs. 1-c and 1-d we can see that if λ is increased,the locus of z extends in the directions of both axes.These figures clearly show that for λ = 3.93, the locusof z is extended to its stability limit. On the otherhand, figs. 1-c and 1-d show that if µ is increased to2µ0, the locus of z extends in the direction of the realaxis only. In order to avoid too much loss in accuracy,the value µ = 2µ0 = 1

16 is usually the maximum usedin CFD computations.

Optimization Framework

The optimization framework is based on a tradi-tional non-linear programming setup with an objectivefunction to minimize (or maximize) and a set of linearand/or non-linear constraints. We want to maximizeconvergence speed and all we know is that it is a func-tion of propagation and damping. But since there ex-ists no clear analytical expression linking convergencespeed to propagation and damping, we will define sev-eral sets of objective functions and constraints. Wewill use as variables the CFL number λ, the dissipa-tion coefficient µ, and the multistage coefficients αl

and βl.

The constraints below will be common to all of our

objective functions:

λ > 0 (17)0.532

≤ µ ≤ 232

(18)

0 ≤ αl, βl ≤ 1 (19)|g| ≤ 1 (20)

α5 = β1 = 1 (21)β2 = β4 = 0. (22)

Note that the inequality in eq. 20 will be strict ex-cept for ξ = 0. Our 8 variables are α1, α2, α3, α4,β3, β5, λ, and µ. Our optimization results for thescalar one-dimensional wave equation were obtainedusing MATLAB’s gradient-based optimization func-tion fmincon for constrained minimization. One ofthe limitations of gradient-based methods is that theyare only guaranteed to find local optima and it is neverclear whether we have a global optimum or not. Theadvantage of such methods on the other hand is thatthey are very fast compared to methods that have thepotential to find global optima such as genetic algo-rithms. The comparison of our results obtained usingboth fmincon and a genetic algorithm will be part offuture work.

Test cases

We will study 7 cases using different objective func-tions, the constraints in eqs. 17-22, and in some casesadditional constraints that will be described later. Ineach case we will have 2 sub-cases, one where µ will beconsidered as a variable and another one where we willimpose the constraint µ = µ0. Therefore, in reality wewill have 14 cases. Tab. 1 summarizes the results ofthese optimizations. We will assign a number to eachcase followed by the letter V or F designating whetherµ was variable or fixed. The values for α1, α2, α3, α4,β3, β5, λ, and µ in the table correspond to the resultsproduced by fmincon.

We used Jameson and Martinelli’s two-dimensionalmultigrid viscous flow solver FLO1034,9, 10 to test theoptimized coefficients for two Mach numbers: M = 0.5and M = 0.8. The test case was a NACA0012 atan angle of attack of 2.25◦ using 5 levels of multigridon a 160x32 C-mesh. One of the features of FLO103is that it computes high-order dissipation fluxes onfine meshes and low-order dissipation fluxes on coarsemeshes. Since our optimizations are based on the one-dimensional scalar model equation using high-orderdissipation terms, we modified FLO103 so that it com-putes high-order dissipation fluxes on all meshes. Thisenables us to have a more correct validation of ouroptimization approach. If we were to use FLO103in its original form, then, in order to be rigorous wewould need two sets of optimized coefficients: one setobtained with a one-dimensional scalar model using3rd order dissipation, and another set with a one-

4 of 17

American Institute of Aeronautics and Astronautics Paper 2003–3705

Page 6: Optimization of Multistage Coefficients for Explicit ...

dimensional scalar model using 1st order dissipation.This is currently being studied.

When running FLO103 on Euler test cases, some-times we had to use a lower λ than that given byfmincon in order to achieve convergence. The λused for the actual computation and the correspond-ing residuals after 150 multigrid cycles are denotedby λ0.5, Res0.5, λ0.8 and Res0.8 for the two Machnumbers mentioned above. The first line in tab. 1 rep-resents our reference case using the MJ coefficients. Aremarkable result is that the fastest convergence us-ing the MJ coefficients is obtained with λ = 3.93. Itturns out that this value corresponds to the theoreti-cal maximum predicted by the one-dimensional modelproblem. This is in itself a very strong justification ofthe fact that such a simplified model is well adaptedto the study of actual flow solvers.

Case 1: Minimization of amplification factor for allfrequencies

In this approach we minimize I =∫ π

0|g (ξ)| dξ with

no additional constraints. Fig. 2 shows the case withvariable µ and fig. 3 shows the case with fixed µ. Com-pared to the MJ case on figs. 1-c and -d we can see thatalthough the amplification factor is greatly reduced, itis done at the expense of the propagation efficiency: λis much smaller now. Both cases 1V and 1F achieveconvergence but both are slower than the MJ case.

Comparing 1V to 1F, we can see that 1V achievesbetter damping than 1F but at the same time it hasa smaller λ too. Part of the better damping of 1Vis certainly due to its larger µ. It turns out that 1Fhas faster convergence than 1V and this is a first indi-cation that propagation has a more important role incontributing to convergence than damping.

Case 2: Minimization of amplification factor for highfrequencies only

Since we use multigrid in our solution procedure,let us concentrate on the high-frequency domain onlyand minimize I =

∫ ππ2|g (ξ)| dξ with no additional con-

straints. Fig. 4 shows the case with variable µ andfig. 5 shows the case with fixed µ. Compared to case1 we can see that we have further reduced damping,especially in case 2V where |g| in the high-frequencydomain is in the order of 0.01. Nevertheless, the resid-uals of 2V and 2F are larger than the residuals of 1Vand 1F respectively. This loss in convergence rate isdue to the fact that the λ of 2V and 2F are smaller thanthose of 1V and 1F respectively. This means that theloss in λ is not compensated by the improvements indamping and that reaffirms our first indication aboutthe role of propagation.

Case 3: Maximization of the CFL number λ

Now that propagation seems to have a more impor-tant role than damping, let us maximize λ with noadditional constraints. Figs. 6 and 7 show that we can

barely push λ beyond 3.93, which was the maximumvalue for the MJ case. In case 3V, it is interesting tonote that because of the fact that the extra increase inλ might push the locus of z out of the stability domain,the optimizer decreases µ to keep the locus inside thedomain and achieve a slightly higher λ than in case 3F.For both cases 3V and 3F, the very slight gain in CFLis achieved at a catastrophic cost for the stability do-main. The stability domain extends very little in thedirection of the negative real axis and its limits comein contact with the locus of z in the region of high fre-quencies now. FLO103 could not achieve convergencefor these theoretical values of maximum λ anymore.In order to achieve a stable convergence for such re-stricted domains of stability, we had to reduce λ toabout 1.5. At such a loss of λ, the maximization of λsimply defeats its purpose. This can also be double-checked by taking a look at the values of the residualsat the end of each calculation.

Cases 4 and 5: Maximization of the CFL number λwith additional constraints

It has now become obvious that the optimizationof damping alone or the optimization of propagationalone does not lead to better convergence. It be-comes more and more apparent that propagation playsa more important role in convergence than damp-ing. Thus we continue maximizing propagation whileadding some safeguards to achieve proper damping forhigh frequencies. For cases 4 and 5, we maximize λbut we impose an additional constraint on |g| in thedomain of high frequencies. In fact, what we try to dois a blend of cases 2 and 3.

For case 4 we impose |g| ≤ 0.25 for 0.5 ≤ ξπ ≤ 1.

As we can see on figs. 8 and 9, the stability domainsin these cases start to approach the general shape ofthe MJ scheme with good extensions in both direc-tions. The optimized solutions result in rather highλ. For case 4V the practical λ had to be reduced toproduce the best results in FLO103, and for the firsttime, we have convergence rates that approach the MJcase. For case 4F, we did not have to use a reducedλ and we obtained good convergence performance. Sofar it seems that fixing λ has been a better strategythan using it as a variable.

For case 5 we impose |g| ≤ 0.8 for 0.5 ≤ ξπ ≤ 1.

Now that we are being less stringent on the dampingconstraint, we produce a very high λ, but as we cansee in the results of tab. 1 and figs. 10 and 11, we areagain faced with problems similar to those in case 3 aswe need to use reduced λ in FLO103 calculations. Fur-thermore, case 5V did not produce good convergenceeven with reduced λ, probably because of a very smallµ. Again this case confirms that using µ as a variablemight not be worth the degree of freedom it offers.

5 of 17

American Institute of Aeronautics and Astronautics Paper 2003–3705

Page 7: Optimization of Multistage Coefficients for Explicit ...

Case 6: Minimization of a hybrid function of theamplification factor |g| and the CFL number λ

From the results above it appears that convergenceis a strong function of propagation and a weak func-tion of damping. Therefore case 6 optimizes the hybrid

objective function I = K

∫ π

π2|g(ξ)|dξ

λn where K is simplya constant chosen large enough in order to avoid nu-merical difficulties for large values of n. K will betypically chosen of the order of 4n. We tested manyvalues of n and it appears that for any value above5, there are only slight differences in the optimizationresults. In fact, we found that by using very large val-ues of n we could push the maximum λ a little furtherthan the limit value of 3.93 of the MJ scheme withoutcatastrophic negative effects on the stability domain.The following results were obtained with the very largevalue of n = 25. This produces an objective functionwhere a slight increase in λ impacts the minimizationprocedure much more heavily than a decrease in ampli-fication factor. Fig. 12 and 13 show that the stabilitydomains of case 6 are very similar to the MJ case, ex-cept that they are less extended in the direction of thenegative real axis. Once again, fixed µ performs betterthan variable µ. As in case 3V, the optimizer seemsto use the degree of freedom offered by a reduction inµ in order to ease the extension of the locus of z inthe direction of the imaginary axis and achieve a highλ. Finally, it is interesting to note that case 6F has aslightly higher convergence rate than the MJ case.

Case 7: Minimization of the amplification factor |g|with additional constraint on the CFL number λ

Now that it is apparent that we should try to achievethe highest λ without totally sacrificing on damping,we simply set as large a lower limit on λ as possiblewhile trying to minimize

∫ ππ2|g (ξ)| dξ. We tested sev-

eral values for that lower limit and the largest valuethat the optimizer could find a solution for was forconstraint λ ≥ 3.99.

As in the previous case, fixed µ performed betterthan variable µ. In case 7V, the optimizer again useda reduction in the value of µ in order to achieve a largevalue of λ. The performance of case 7V is very good,but it is even more interesting to note that case 7Fperforms better than all the cases studied so far andof course even slightly better than the MJ case as canbe seen in tab.1. Fig. 14 is very similar to the figuresof case 6, while fig. 15 is very similar to the MJ casewith very slightly larger extensions in both directions.

First conclusions

At this point we can affirm that although the MJ co-efficients were developed by trial and error, they werenearly perfect and grasped the important mechanismsinvolved in both damping and propagation. This studyshowed that the contribution of propagation to conver-

gence is far superior than that of damping, providedthat we do not perform at the limits of stability in thehigh-frequency domain.

We also showed that despite its simplicity, the one-dimensional equation model provides an efficient toolfor the analysis of multistage schemes even when usedfor the Euler equations. Finally we showed that it isnot necessarily a wise choice to consider the dissipationcoefficient µ as a variable in multistage optimizations.

The next section extends the analysis of the one-dimensional scalar model wave equation to the systemof the two-dimensional Euler equations in a similarfashion.

Two-dimensional Euler equationsGeneral formulation

The finite difference form of eq. 1 can be written as

∂W

∂t+ A

∂W

∂x+ B

∂W

∂y= 0, (23)

where A and B are the flux Jacobians of Fx and Fy

with respect to W .For the discretized equations, using central differ-

encing, we have(

A∂W

∂x

)

j,k

=1

∆x

(Fx

j+ 12 ,k− Fx

j− 12 ,k

), (24)

and for the scheme with 3rd order matrix dissipationwe have

Fxj+ 1

2 ,k= A

(Wj+1,k + Wj,k

2

)

−µ

2|A|

(∆Wj+ 3

2 ,k − 2∆Wj+ 12 ,k + ∆Wj− 1

2 ,k

), (25)

and

Fxj− 1

2 ,k= A

(Wj,k + Wj−1,k

2

)

−µ

2|A|

(∆Wj+ 1

2 ,k − 2∆Wj− 12 ,k + ∆Wj− 3

2 ,k

). (26)

If we denote by T and T−1, the matrices of the leftand the right eigenvectors of A, we have A = TΛT−1

where Λ is the diagonal matrix of the eigenvalues ofA. We then define |A| such that |A| = T |Λ|T−1 where|Λ| is the diagonal matrix of the absolute values of theeigenvalues of A.

If we use scalar dissipation rather than matrix dis-sipation, then |A| and |B| must be replaced by ρ(A)I4

and ρ(B)I4 where ρ(A) and ρ(B) are the spectral radiiof A and B and I4 is the 4 by 4 identity matrix.

Now, if we consider a Fourier mode W = eipxeiry

and set ξ = p∆x and η = r∆y, we have(

A∂W

∂x

)

j,k

=1

∆x

(iA sin ξ + 4µ |A| (1− cos ξ)2

),

(27)

6 of 17

American Institute of Aeronautics and Astronautics Paper 2003–3705

Page 8: Optimization of Multistage Coefficients for Explicit ...

and similarly(

B∂W

∂y

)

j,k

=1

∆y

(iB sin η + 4µ |B| (1− cos η)2

).

(28)Instead of having a scalar z, we have a Z matrix suchthat

∆tdW

dt= ZW , (29)

and

Z(ξ, η) = −∆t

∆x

[iA sin ξ + 4µ |A| (1− cos ξ)2

]

−∆t

∆y

[iB sin η + 4µ |B| (1− cos η)2

]. (30)

Here the eigenvalues of Z play the role of the scalar zof the one-dimensional case. Since they are functionsof both ξ and η, each of them will have a locus thatwill cover a surface on the stability domain instead ofproducing just a single curve.

Evaluation of the eigenvalues of Z

In order to properly and efficiently compute theeigenvalues of Z, the best strategy is to use the Ja-cobians Ae and Be for entropy variables rather thanthe commonly used conservative variables. We can ex-press the entropy variables in differential form as

dWe =

dpρc

dudvdw

dp− c2dρ

. (31)

The flux Jacobians Ae and Be in entropy variables aresimply

Ae =

u c 0 0c u 0 00 0 u 00 0 0 u

(32)

Be =

v 0 c 00 v 0 0c 0 v 00 0 0 v

. (33)

With such simple expressions for the Jacobians, it iseasy to verify that the eigenvalues of Ae and Be (thusof A and B) are (u, u, u+c, u−c) and (v, v, v+c, v−c)respectively. As for the spectral radii, if we assumethat u and v are positive, we have

ρ(A) = u + c (34)ρ(B) = v + c. (35)

One very important factor in the evaluation of theeigenvalues of Z is the proper definition of the two-dimensional CFL number λ. Many flow solvers use

a conservative definition of the time step limit fromwhich λ is derived as follows.

λ = ∆t

(u + c

∆x+

v + c

∆y

). (36)

Using the above definition to eliminate ∆t from eq. 30would allow to produce loci of the eigenvalues of Zthat remain in the stability domain even for λ that areunusually large compared to the one-dimensional caseand that do not correspond to what can be actuallyused in a flow solver.

A proper definition of λ for stability analysis shouldrather be based on the largest eigenvalue of the matrix

1∆x

A +1

∆yB. (37)

The proper definition of λ then becomes

λ = ∆t

(u∆y + v∆x + c

√∆x2 + ∆y2

∆x∆y

). (38)

It now becomes apparent that the eigenvalues of Z willbe uniquely defined as functions of ξ and η for a givencomputational cell where we know the Mach numberM =

√u2+v2

c , the flow angle ϕ = arctan(

vu

), and the

aspect ratio AR = ∆x∆y . This means that it is possi-

ble to produce a different set of optimized multistagecoefficients for each computational cell.

ConclusionsIn this paper we have presented a new and sys-

tematic optimization framework for the calculationof multistage coefficients for modified Runge-Kuttaschemes. In addition, we have developed a numberof model equations that can be used in conjunctionwith a nonlinear constrained optimizer to produce thedesired results. We showed that the influence of prop-agation largely dominates that of damping. Manyresearchers such as Tai13 and Lynn8 had sought to op-timize multistage coefficients for classical Runge-Kuttaschemes only by focusing on the damping efficiency.Tai’s one-dimensional geometric method forces the lo-cus of z to pass through the zeros of the stabilitydomain while Lynn’s two-dimensional method mini-mizes the maximum amplification factor on a portionof the high frequency domain. The coefficients theyhave produced are therefore not appropriate for theadvantageous case of modified Runge-Kutta schemesin addition to producing tight CFL restrictions. More-over, in most previous multistage optimization work,dissipative terms were often chosen to be very large,thus producing results that are not necessarily well-suited for practical use in flow solvers. This studyproved in a systematic way that the MJ coefficientswere extremely close to the the optimal solutions foundin case 7F and opened the way for future work in thecases of preconditioned Euler and Navier-Stokes equa-tions.

7 of 17

American Institute of Aeronautics and Astronautics Paper 2003–3705

Page 9: Optimization of Multistage Coefficients for Explicit ...

Future workAdaptive Multistaging

An interesting idea for the future is to produce anarray of optimized coefficients for a large number ofdifferent combinations of M , ϕ, and AR. It wouldthen be possible to feed that array into a flow solverthat would use it to interpolate a different set of opti-mized coefficients for every cell rather than using thesame coefficients throughout the whole computationaldomain.

In order to illustrate the differences between theone-dimensional model and the two-dimensional Eulercase, figs. 16 to 21 show the stability domain and loci ofthe eigenvalues of Z for a scheme using scalar dissipa-tion. These figures compare the stability domain of theMJ coefficients on the left with that of the optimizedcoefficients on the right. The optimized coefficientswere obtained using the non-linear gradient-based op-timizer package SNOPT.3,11 As in the last case ofthe one-dimensional model, we added a constraint onthe lower bound of λ. In this case we chose to mini-mize I =

∫ ππ2

∫ ππ2|g (ξ, η)| dξdη subject to the constraint

that λ ≥ 3.9. Six combinations of M , ϕ, and AR

are presented where we can see how these parametersinfluence the clustering of the eigenvalues of Z in dif-ferent regions of the stability domain. In all cases, theenvelope of the loci of the eigenvalues of Z is the sameas the locus of z from the one-dimensional model.

For an aspect ratio of 1, figs. 16 to 18 show that theeigenvalues of Z populate the entire surface inside thatenvelope for M = 0.5, but when we reduce M to 0.1,some regions of the stability domain are depopulated.Changing the flow angle has only a small influence onthis feature. The optimized solutions seem to producestability domains that adapt themselves to the waythe eigenvalues are clustered in different regions of thestability domain.

Figs. 19 to 21 show that by increasing AR, we signifi-cantly reduce the surface covered by the eigenvalues toone main oval-shaped branch constituting the envelopeand several additional smaller branches that extenddifferently as a function of M and ϕ. Once again, itseems that the optimizer takes the locations of thesebranches into account as each stability domain has adifferent shape.

Preconditioning

The adaptive multistaging approach describedabove can be extended to the case of the precondi-tioned Euler or Navier-Stokes equations. Although theMJ coefficients happened to be practically optimal forEuler computations, it is not clear what coefficientswould be optimal in the case of the preconditionedEuler equations. In this case we simply have

P−1 ∂W

∂t+ A

∂W

∂x+ B

∂W

∂y= 0, (39)

or∂W

∂t+ P

(A

∂W

∂x+ B

∂W

∂y

)= 0, (40)

where P is the preconditioning matrix. Therefore wesimply need to replace Z by PZ and we will have

∆tdW

dt= PZW . (41)

We can clearly see that in this case our amplificationfactors are a function of the eigenvalues of PZ in-stead of Z. The optimized coefficients will be differentfor each type of preconditioner. In the future we willconsider different types of preconditioners such as theBlock-Jacobi preconditioner,1 the low-Mach Turkelpreconditioner,14 and combinations of low-Mach andBlock-Jacobi.2

AcknowledgmentsThe authors acknowledge the support of the Depart-

ment of Energy as part of the ASCI program undercontract number LLNL-B341491.

References1S.R. Allmaras. Analysis of a local matrix preconditioner

for the 2-D Navier-Stokes equations. AIAA Paper 93-3330, Or-lando, FL, June 1993.

2D.L. Darmofal and K. Siu. A robust multigrid algorithmfor the Euler equations with local preconditioning and semi-coarsening. Journal of Computational Physics, 151:728–756,1999.

3Philip E. Gill, Walter Murray, and Margaret H. Wright.Practical Optimization. Academic Press, San Diego, CA 92101,1981.

4A. Jameson. Solution of the Euler equations by a multigridmethod. Applied Mathematics and Computations, 13:327–356,1983.

5A. Jameson. Transonic flow calculations. Princeton Uni-versity Report MAE 1650, April 1984.

6A. Jameson. Multigrid algorithms for compressible flow cal-culations. In W. Hackbusch and U. Trottenberg, editors, LectureNotes in Mathematics, Vol. 1228, pages 166–201. Proceedings ofthe 2nd European Conference on Multigrid Methods, Cologne,1985, Springer-Verlag, 1986.

7A. Jameson. Analysis and design of numerical schemes forgas dynamics 1, artificial diffusion, upwind biasing, limiters andtheir effect on multigrid convergence. Int. J. of Comp. FluidDyn., 4:171–218, 1995.

8J. F. Lynn. Multigrid Solution of the Euler Equations withLocal Preconditioning. PhD thesis, University of Michigan, AnnArbor, MI, 1995.

9L. Martinelli. Calculations of viscous flows with a multigridmethod. Ph. D. Dissertation, Princeton University, Princeton,NJ, October 1987.

10L. Martinelli and A. Jameson. Validation of a multigridmethod for the Reynolds averaged equations. AIAA paper 88-0414, 1988.

11Walter Murray Philip E. Gill and Michael A. Saunders.User’s Guide for SNOPT Version 6, A Fortran Package forLarge-scale Nonlinear Programming. Department of Mathe-matics, University of California, San Diego, CA, 92093-0112,December 2002.

12N. A. Pierce. Preconditioned Multigrid Methods for Com-pressible Flow Calculations on Stretched Meshes. PhD thesis,University of Oxford, Oxford, UK, 1997.

8 of 17

American Institute of Aeronautics and Astronautics Paper 2003–3705

Page 10: Optimization of Multistage Coefficients for Explicit ...

13C. H. Tai. Acceleration Techniques for Explicit EulerCodes. PhD thesis, University of Michigan, Ann Arbor, MI,1990.

14E. Turkel. Preconditioning techniques in computationalfluid dynamics. Annu. Rev. Fluid Mech., 31:385–416, 1999.

9 of 17

American Institute of Aeronautics and Astronautics Paper 2003–3705

Page 11: Optimization of Multistage Coefficients for Explicit ...

−8 −6 −4 −2 0

−4

−3

−2

−1

0

1

2

3

4

a) Stability domain and locus of z for λ = 2.8 and µ = 132

0 0.2 0.4 0.6 0.8 10

0.2

0.4

0.6

0.8

1

ξ/π

|g|

b) Amplification factor |g| for λ = 2.8 and µ = 132

−8 −6 −4 −2 0

−4

−3

−2

−1

0

1

2

3

4

c) Stability domain and locus of z for λ = 3.93 and µ = 132

0 0.2 0.4 0.6 0.8 10

0.2

0.4

0.6

0.8

1

ξ/π

|g|

d) Amplification factor |g| for λ = 3.93 and µ = 132

−8 −6 −4 −2 0

−4

−3

−2

−1

0

1

2

3

4

e) Stability domain and locus of z for λ = 2.8 and µ = 116

0 0.2 0.4 0.6 0.8 10

0.2

0.4

0.6

0.8

1

ξ/π

|g|

f) Amplification factor |g| for λ = 2.8 and µ = 116

Fig. 1 Stability domain for the MJ coefficients and the influence of λ and µ on the amplification factor.

10 of 17

American Institute of Aeronautics and Astronautics Paper 2003–3705

Page 12: Optimization of Multistage Coefficients for Explicit ...

−8 −6 −4 −2 0

−4

−3

−2

−1

0

1

2

3

4

0 0.2 0.4 0.6 0.8 10

0.2

0.4

0.6

0.8

1

ξ/π

|g|

Fig. 2 Minimization of∫ π

0|g (ξ)| dξ with variable µ

−8 −6 −4 −2 0

−4

−3

−2

−1

0

1

2

3

4

0 0.2 0.4 0.6 0.8 10

0.2

0.4

0.6

0.8

1

ξ/π

|g|

Fig. 3 Minimization of∫ π

0|g (ξ)| dξ with fixed µ

−8 −6 −4 −2 0

−4

−3

−2

−1

0

1

2

3

4

0 0.2 0.4 0.6 0.8 10

0.2

0.4

0.6

0.8

1

ξ/π

|g|

Fig. 4 Minimization of∫ π

π2|g (ξ)| dξ with variable µ

11 of 17

American Institute of Aeronautics and Astronautics Paper 2003–3705

Page 13: Optimization of Multistage Coefficients for Explicit ...

−8 −6 −4 −2 0

−4

−3

−2

−1

0

1

2

3

4

0 0.2 0.4 0.6 0.8 10

0.2

0.4

0.6

0.8

1

ξ/π

|g|

Fig. 5 Minimization of∫ π

π2|g (ξ)| dξ with fixed µ

−8 −6 −4 −2 0

−4

−3

−2

−1

0

1

2

3

4

0 0.2 0.4 0.6 0.8 10

0.2

0.4

0.6

0.8

1

ξ/π

|g|

Fig. 6 Maximization of λ with variable µ

−8 −6 −4 −2 0

−4

−3

−2

−1

0

1

2

3

4

0 0.2 0.4 0.6 0.8 10

0.2

0.4

0.6

0.8

1

ξ/π

|g|

Fig. 7 Maximization of λ with fixed µ

12 of 17

American Institute of Aeronautics and Astronautics Paper 2003–3705

Page 14: Optimization of Multistage Coefficients for Explicit ...

−8 −6 −4 −2 0

−4

−3

−2

−1

0

1

2

3

4

0 0.2 0.4 0.6 0.8 10

0.2

0.4

0.6

0.8

1

ξ/π

|g|

Fig. 8 Maximization of λ with |g| ≤ 0.25 for high frequencies and variable µ

−8 −6 −4 −2 0

−4

−3

−2

−1

0

1

2

3

4

0 0.2 0.4 0.6 0.8 10

0.2

0.4

0.6

0.8

1

ξ/π

|g|

Fig. 9 Maximization of λ with |g| ≤ 0.25 for high frequencies and fixed µ

−8 −6 −4 −2 0

−4

−3

−2

−1

0

1

2

3

4

0 0.2 0.4 0.6 0.8 10

0.2

0.4

0.6

0.8

1

ξ/π

|g|

Fig. 10 Maximization of λ with |g| ≤ 0.8 for high frequencies and variable µ

13 of 17

American Institute of Aeronautics and Astronautics Paper 2003–3705

Page 15: Optimization of Multistage Coefficients for Explicit ...

−8 −6 −4 −2 0

−4

−3

−2

−1

0

1

2

3

4

0 0.2 0.4 0.6 0.8 10

0.2

0.4

0.6

0.8

1

ξ/π

|g|

Fig. 11 Maximization of λ with |g| ≤ 0.8 for high frequencies and fixed µ

−8 −6 −4 −2 0

−4

−3

−2

−1

0

1

2

3

4

0 0.2 0.4 0.6 0.8 10

0.2

0.4

0.6

0.8

1

ξ/π

|g|

Fig. 12 Minimization of

∫ π

π2|g(ξ)|dξ

λ25 with variable µ

−8 −6 −4 −2 0

−4

−3

−2

−1

0

1

2

3

4

0 0.2 0.4 0.6 0.8 10

0.2

0.4

0.6

0.8

1

ξ/π

|g|

Fig. 13 Minimization of

∫ π

π2|g(ξ)|dξ

λ25 with fixed µ

14 of 17

American Institute of Aeronautics and Astronautics Paper 2003–3705

Page 16: Optimization of Multistage Coefficients for Explicit ...

−8 −6 −4 −2 0

−4

−3

−2

−1

0

1

2

3

4

0 0.2 0.4 0.6 0.8 10

0.2

0.4

0.6

0.8

1

ξ/π

|g|

Fig. 14 Minimization of∫ π

π2|g (ξ)| dξ with λ ≥ 3.99 and variable µ

−8 −6 −4 −2 0

−4

−3

−2

−1

0

1

2

3

4

0 0.2 0.4 0.6 0.8 10

0.2

0.4

0.6

0.8

1

ξ/π

|g|

Fig. 15 Minimization of∫ π

π2|g (ξ)| dξ with λ ≥ 3.99 and fixed µ

Case α1 α2 α3 α4 β3 β5 λ µµ0

λ0.5 Res0.5 λ0.8 Res0.8

MJ 0.2500 0.1667 0.3750 0.5000 0.5600 0.4400 3.9300 1.0000 3.9300 0.727E-12 3.9300 0.116E-09

1V 0.5602 0.2778 0.7612 0.8888 0.7719 0.0000 1.6977 1.7189 1.6977 0.135E-04 1.6977 0.210E-031F 0.6267 0.2320 0.7739 0.7688 0.4901 0.0000 1.9651 1.0000 1.9651 0.106E-07 1.9651 0.118E-05

2V 0.3323 0.3161 0.6032 0.8409 0.6483 0.0000 1.5555 1.8087 1.5555 0.928E-04 1.5555 0.281E-022F 0.6537 0.2359 0.7751 0.7109 0.0000 0.0000 1.8178 1.0000 1.8178 0.117E-07 1.8178 0.220E-05

3V 0.2421 0.1662 0.3746 0.4995 0.4046 0.0000 4.0066 0.8057 1.4000 0.398E-06 1.4500 0.116E-043F 0.2339 0.1679 0.3701 0.4995 0.4754 0.0000 4.0053 1.0000 1.4900 0.482E-07 1.5600 0.690E-05

4V 0.1953 0.1779 0.3394 0.4998 0.7793 0.7676 3.6648 1.2317 3.2200 0.333E-11 3.2600 0.625E-094F 0.1952 0.1833 0.3401 0.4998 0.7777 0.7928 3.6171 1.0000 3.6171 0.201E-11 3.6171 0.514E-09

5V 0.2391 0.1668 0.3728 0.4995 0.8403 0.0000 3.9522 0.5000 1.3500 0.104E-05 1.3800 0.128E-035F 0.2358 0.1658 0.3743 0.4995 0.6083 0.1129 3.9457 1.0000 3.4100 0.146E-10 3.3900 0.179E-08

6V 0.2251 0.1677 0.3675 0.4996 0.7343 0.6171 3.9816 0.8137 3.9816 0.264E-11 3.9816 0.386E-096F 0.2216 0.1676 0.3678 0.4996 0.7042 0.5340 3.9751 1.0000 3.9751 0.680E-12 3.9751 0.914E-10

7V 0.2308 0.1678 0.3679 0.4996 0.6993 0.5375 3.9900 0.7078 3.9900 0.368E-10 3.9900 0.939E-097F 0.2312 0.1679 0.3678 0.4996 0.5413 0.3222 3.9900 1.0000 3.9900 0.478E-12 3.9900 0.870E-10

Table 1 Results for optimizations and test cases

15 of 17

American Institute of Aeronautics and Astronautics Paper 2003–3705

Page 17: Optimization of Multistage Coefficients for Explicit ...

−8 −6 −4 −2 0

−4

−3

−2

−1

0

1

2

3

4

−8 −6 −4 −2 0

−4

−3

−2

−1

0

1

2

3

4

Fig. 16 λ = 3.9, M = 0.5, ϕ = π3, and AR = 1

−8 −6 −4 −2 0

−4

−3

−2

−1

0

1

2

3

4

−8 −6 −4 −2 0

−4

−3

−2

−1

0

1

2

3

4

Fig. 17 λ = 3.9, M = 0.1, ϕ = π3, and AR = 1

−8 −6 −4 −2 0

−4

−3

−2

−1

0

1

2

3

4

−8 −6 −4 −2 0

−4

−3

−2

−1

0

1

2

3

4

Fig. 18 λ = 3.9, M = 0.1, ϕ = π2, and AR = 1

16 of 17

American Institute of Aeronautics and Astronautics Paper 2003–3705

Page 18: Optimization of Multistage Coefficients for Explicit ...

−8 −6 −4 −2 0

−4

−3

−2

−1

0

1

2

3

4

−8 −6 −4 −2 0

−4

−3

−2

−1

0

1

2

3

4

Fig. 19 λ = 3.9, M = 0.5, ϕ = π3, and AR = 4

−8 −6 −4 −2 0

−4

−3

−2

−1

0

1

2

3

4

−8 −6 −4 −2 0

−4

−3

−2

−1

0

1

2

3

4

Fig. 20 λ = 3.9, M = 0.9, ϕ = 0, and AR = 16

−8 −6 −4 −2 0

−4

−3

−2

−1

0

1

2

3

4

−8 −6 −4 −2 0

−4

−3

−2

−1

0

1

2

3

4

Fig. 21 λ = 3.9, M = 1.3, ϕ = π6, and AR = 16

17 of 17

American Institute of Aeronautics and Astronautics Paper 2003–3705