Steady Euler Solutions in 0 (N) Operations - Springer Link

3 downloads 0 Views 972KB Size Report
E. Dick et al. (eds.), Multigrid Methods VI ..... B. van Leer, C. H. Tai, and K. G. Powell, "Design of optimally-smoothing multi-stage schemes for the Euler equations ...
Steady Euler Solutions in 0 (N) Operations Bram van Leer l and David Darmofal2 1

2

Unversity of Michigan, Department of Aerospace Engineering, Ann Arbor, MI 48109-2140, USA Massachusetts Institute of Technology, Department of Aeronautics and Astronautics, Cambridge, MA 02139

Abstract. We describe an explicit multigrid strategy for achieving convergence in O(N) operations to steady solutions of the discretized Euler equations. The success of the method is based on local preconditioning and optimally smoothing multistage single-grid schemes, developed by the authors and their collaborators, and the semicoarsened multigrid relaxation technique of Mulder. All components are crucial; if, for instance, semi-coarsening is replaced by full coarsening, the operation count 3 immediately goes up to O(N'I).

1

Why Develop O(N)-Type Methods?

When solving discretized PDE's with a multigrid relaxation strategy, the ultimate goal is to provide a solution with N unknowns in O(N) operations. Since the multigrid strategy couples the grid data from boundary to boundary, as an implicit scheme does, and the embedded single-grid relaxation scheme only needs to remove high-frequency error modes, an explicit single-grid scheme (point-implicit if there are more unknowns per cell) should suffice. Nevertheless, achieving scalable convergence with such an approach has proved elusive when the equations are of mixed elliptic-hyperbolic type, such as the steady compressible Euler equations. Granted that the task is a difficult one, it still is disconcerting to see there are almost no developers of multigrid Euler or Navier-Stokes codes who care about coming close to optimal convergence. As long as the multigrid technique accelerates convergence to an extent that is worth the computational cost, one appears satisfied. This pragmatic attitude may be symptomatic of an era of abundance, when massively parallel processing promises scalable computing up to teraFLOP speeds. But what good is scalable computing if the algorithm used doesn't scale? The majority of the processors will still be wasted. To illustrate this, suppose that an increase in the number of processors of a factor 64 is used to solve some flow problem in greater detail in the same running time. Ideally the code would run a factor 64 faster, and if the complexity of the programmed algorithm scaled with N, the increase in speed would also buy a factor 64 increase in the number of unknowns, and therefore, in the number of meshes. If, on the other hand, the algorithm scaled with E. Dick et al. (eds.), Multigrid Methods VI © Springer-Verlag Berlin Heidelberg 2000

Steady Euler Solutions in O(N) Operations

25

N~, N could be increased only by a factor 16. The same result could be achieved with the O(N) algorithm if 48 out of 64 processors were idling!

2

Three Crucial Components

During a decade-long effort (1988-98) we have succeeded in developing a fully explicit multigrid strategy for Euler discretizations that does achieve the optimum convergence. The demonstration was based on a relatively simple flow (lifting flow around an airfoil), and on a structured grid. The accuracy of the spatial discretization is not compromised, on the contrary: it actually benefits from the numerical approach. The explicit nature of the method will be a great advantage in code parallelization. There are several crucial components to this strategy, discussed below. If one of these is compromised, the goal of scalable convergence is not achieved. This explains why that goal can so easily be missed. 2.1

Local Preconditioning

Local preconditioning is needed to make the system of equations (Euler, Navier-Stokes) behave like a scalar equation. This, by itself, would be a powerful single-grid acceleration method, since it would remove the stiffness due to the spread in physical time scales. For the Euler equations it means equalization of the characteristic speeds. The task of developing a robust local preconditioning effective in all flow regimes was by far the hardest task in the project. It remained a bottle-neck until the very end, as described in Sect.3. 2.2

Optimally Smoothing Multistage Single-Grid Schemes

If the discretized equations are properly preconditioned, the spatial eigenvalues are sufficiently clustered to allow efficient removal of any combination of high-frequency modes, as required for semi-coarsened multigrid relaxation. The task of designing such multistage schemes was relatively straightforward; it was accomplished in two thesis projects [1,2]. The first scalar results were presented in 1989 [3].

2.3

Semi-Coarsened Multigrid Relaxation

The semi-coarsening is needed to remove certain combinations of high- and low-frequency modes that are not affected by the single-grid scheme. These arise when - the flow is aligned with the grid;

26

B. van Leer and D. Darmofal

- the cell-aspect ratio is large; - the Mach number approaches unity. Semi-coarsened multigrid relaxation was developed by W. Mulder [4,5) to remedy the problem with grid-aligned flow. It became available at the same time as the optimally smoothing multistage schemes.

3

The Ups and Downs of Local Preconditioning

It was not until 1991 that B. van Leer and collaborators [6) could present the first local Euler preconditioner that is optimal for all Mach numbers (M), i.e., that yields the lowest possible condition number among the characteristic speeds. (Previous work by e.g. E. Turkel [7) was restricted to the low-speed regime.) It has four known benefits, two by design, two unexpected. 3.1

On the Upside

1. Van Leer et al. [6) showed that the optimal characteristic condition number is 1/ Jl - min(M2, M 2) in three dimensions, down from (M + 1)/min(M, 1M -11); this improves to 1 for all M in one dimension. The numerical (single-grid) results in the paper show convergence acceleration close to theoretical predictions. 2. Also demonstrated was the clustering of eigenvalues of the discrete spatial operator owing to the preconditioner; this enabled the design of guaranteed high-frequency smoothers for the Euler system [8,9). 3. A third, unexpected benefit was reported. A modification of the numerical flux function, proposed for reasons of numerical stabiltity, turned out to prevent the loss of accuracy in the incompressible limit M -+ 0, observed for standard compressible-flow methods [10). This makes it possible to use one and the same code for calculating flows containing both low- and highspeed regions, as encountered for instance with high-lift configurations, V/STOL and propulsion [11). The modified flux is also being used without preconditioning, for accurately computing flows [12). 4. A fourth benefit of this local preconditioning was not discovered until 1994. It turns out that the preconditioner decouples the Euler system precisely in the manner needed to formulate genuinely multidimensional discretizations [13), causing a breakthrough in that line of research [14). 3.2

Intermezzo: Jacobi Preconditioning

It is worth noticing that Mulder[5) in 1989 still recommends an underrelaxed point-implicit single-grid scheme as a satisfactory smoother for use with semicoarsened multigrid relaxation. This" Jacobi preconditioning," however, does not condition the characteristic speeds and therefore does not have any singlegrid convergence-acceleration benefit.

Steady Euler Solutions in O(N) Operations

27

This is illustrated poignantly by Fig. 1. Shown are contours ofthe solution error (deviation from the steady solution) for flow over a smooth bump at Mach number 0.1. The left column of figures is based on a calculation with Jacobi preconditioning; for the right column of figures the Van Leer-Lee-Roe preconditioning was used. After the first three cycles the results are similar, with both exhibiting grid-aligned errors along the solid wall and downstream of the bump. In the following cycles, the Van Leer-Lee-Roe preconditioner makes these errore propagate out of the computational domain; the Jacobi preconditioner does not. The latter must rely on smoothing the errors; however, since these are grid-aligned, smoothing is not effective and convergence suffers. Jacobi preconditioning also does not prevent the loss of accuracy at low Mach numbers. It may, however, be used on top of optimal preconditioning, to lend robustness to the latter; see Sect. 4. 3.3

On the Downside

A serious and persistent problem in the use of local preconditioning was a numerical instability appearing near any stagnation point. Because of this, Lynn's thesis only includes results for flows without stagnation points. The instability was finally explained in 1995 by D. Darmofal, then a postdoctoral fellow at the University of Michigan, and P. Schmid [15,16]' as the result of an eigenvector degeneration, viz., eigenvectors for different waves becoming parallel as M approaches zero. An ad-hoc remedy already existed, based on bounding the Mach number in the preconditioner away from zero [7], but it was not robust.

4

Finally: Success

As an assistant professor at Texas A&M, Darmofal continued to work on the project with his own students. Combining a lower Mach-number bound based on flow gradients (after J. Weiss and W. Smith [17]) and a suggestion by Turkel [18] of combining local preconditioning with point-Jacobi relaxation for added robustness, they succeeded in 1997 [19] in reaching the primary goal: demonstrating O(N)-type convergence towards steady flow over a lifting airfoil. This is illustrated by Fig. 2. The three basic ingredients of the successful method, near-optimal local preconditioning, guaranteed high-frequency damping, and semi-coarsening in the multigrid strategy, are all essential to the O(N) result. If anyone of these is sufficiently compromised, for instance, if semi-coarsening is replaced by full coarsening, the convergence speed deteriorates on finer grids, as shown in Fig. 3. Fig. 4 shows that the operation count (for reducing residuals by six orders of magnitude) increases from O(N) to O(N!).

28

5

B. van Leer and D. Darmofal

Current and Future Work

There are still some remaining issues regarding the implementation of the above strategy to the Euler equations, and many more regarding the NavierStokes equations. On this occasion suffice it two list the two most pressing Euler problems. 1. Analytical derivation (by symbolic manipulation) of the numerical flux

including Van Leer's optimal preconditioning matrix breaks down when the Mach number in the matrix is being bounded away from 0, and thus differs from the value used elsewhere. The same happens when bounding M away from 1, to avoid a sonic instability. Thus, Darmofal and K. Siu were forced to employ a stripped-down version of the preconditioner, taken from Turkel [7], and they could not effectively treat steady transonic or supersonic flow. This analytical problem seems solvable; for the time being, a demonstration of O(N)-type convergence in transonic and supersonic cases could be based on numerically evaluated fluxes. 2. Multigrid relaxation with semi-coarsening is generally considered too expensive in 3 dimensions: 7 times as expensive as with full coarsening. It is also regarded as "overkill," even in 2 dimensions. All that would be needed is a multigrid strategy in which semi-coarsening is only applied in the flow direction, and only to advected state quantities. This starts looking like, and could borrow from, the convergence strategy of D. Mavriplis [20]' who determines strings of cells aligned with or normal to the flow, in order 'to apply line solvers on an unstructured grid. Local preconditioning would again play a crucial role, because of its equation-decoupling property.

6

Final Remarks

We believe that the O(N) convergence result described above is a milestone along the road to better-converging Euler and Navier-Stokes codes. Not only does the employed numerical strategy achieve this ultimate goal (for the first time for lifting flow, as far as we know), but it also clarifies the various necessary steps by which such optimal convergence may be achieved - and may be lost. It is now up to the code developer to decide how far he/she is willing to go toward achieving the goal of convergence in O(N) operations. To get an impression of the range and depth of the convergence-acceleration project presented in this paper, one should consult at least the key paper (1991) on preconditioning by Van Leer, Lee and Roe [6], the 1993 paper on the design of multistage schemes by Lynn and Van Leer [8], the latest review of the subject (written 1997) by Darmofal and Van Leer [21], and the 1999 benchmarking paper by Darmofal and Siu [22].

Steady Euler Solutions in O(N) Operations

block-Jacobi

29

Van Leer

(a) Initial condition. 16 error contours from 0 to 0.015.

block-J acobi

Van Leer

(b) 3 cycles. 16 error contours from 0 to 0.002.

block-Jacobi

Van Leer

(c) 6 cycles. 16 error contours from 0 to 0.002.

block-Jacobi

Van Leer

(d) 9 cycles. 16 error contours from 0 to 0.002.

block-Jacobi

Van Leer

(e) 12 cycles. 16 error contours from 0 to 0.002.

Fig. 1. Error contours for full coarsening multigrid convergence of Moo = 0.1 bump flow with block-Jacobi and Van Leer preconditioners.

B. van Leer and D. Darmofal

30

...;-