solvers for the euler and navier-stokes equations · plane, each region being the portion of the...

61
6-I ASPECTS OF UNSTRUCTURED GRIDS AND FINITE-VOLUME SOLVERS FOR THE EULER AND NAVIER-STOKES EQUATIONS by Timothy J. Barth CFD Branch NASA Ames Research Center Moffett Field, CA 94035 United States Contents 1.0 Preliminaries 1.1 Graphs and Meshes 1.2 Duality 1.3 Data Structures 2.0 Some Basic Graph Operations Important in CFD 2.1 Planar Graphs with Minimum Out-Degree 2.2 Graph Ordering Techiques 2.3 Graph Partitioning for Parallel Comput- ing 3.0 Triangulation Methods 3.1 Voronoi Diagram and Delaunay Trian- gulation 3.2 Properties of a 2-D Delaunay Triangu- lation 3.3 Algorithms for 2-D Delaunay Triangula- tion 3.4 Other 2-D Triangulation Algorithms 3.5 2-D Steiner Triangulations 3.6 ThrS-Dimensional Triangulations 4.0 Some Theory Related to Finite-Volume Solvers. 4.1 Scalar Conservation Law Equations 4.2 Comparison of Finite-Volume and Galerkin Finite-Element Methods 4.3 Edge Formulas 4.4 Godunov Finite-Volume Schemes 4.5 k-exact Reconstruction 4.6 Upwind Advection Scheme with k = 0 Reconstruction 4.7 Upwind Advection Scheme with k = 1 Linear Reconstruction 4.8 Maximum Principles and Delaunay Tri- angulation 5.0 Finite-Volume Solvers for the Euler Equa- tions 5.1 Euler Equations in Integral Form 5.2 Extension of Scalar Advection Schemes to Systems of Equations 53 Implicit Linearizations 6.0 Numerical Solution of the Navier-Stokes Equa- tions with Turbulence 6.1 Turbulence Modeling for Unstructured grids 6.2 A One-Equation Turbulence Transport Model https://ntrs.nasa.gov/search.jsp?R=19920018434 2020-03-29T21:22:52+00:00Z

Upload: others

Post on 22-Mar-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: SOLVERS FOR THE EULER AND NAVIER-STOKES EQUATIONS · plane, each region being the portion of the plane closer to some given point P of the set of points Mesh Median Dual CCJ,troid

6-I

ASPECTS OF UNSTRUCTURED GRIDS AND FINITE-VOLUMESOLVERS FOR THE EULER AND NAVIER-STOKES EQUATIONS

by

Timothy J. BarthCFD Branch

NASA Ames Research CenterMoffett Field, CA 94035

United States

Contents

1.0 Preliminaries1.1 Graphs and Meshes1.2 Duality1.3 Data Structures

2.0 Some Basic Graph Operations Important inCFD2.1 Planar Graphs with Minimum Out-Degree2.2 Graph Ordering Techiques2.3 Graph Partitioning for Parallel Comput-

ing

3.0 Triangulation Methods3.1 Voronoi Diagram and Delaunay Trian-

gulation3.2 Properties of a 2-D Delaunay Triangu-

lation3.3 Algorithms for 2-D Delaunay Triangula-

tion3.4 Other 2-D Triangulation Algorithms3.5 2-D Steiner Triangulations3.6 ThrS-Dimensional Triangulations

4.0 Some Theory Related to Finite-Volume Solvers.4.1 Scalar Conservation Law Equations4.2 Comparison of Finite-Volume and Galerkin

Finite-Element Methods4.3 Edge Formulas4.4 Godunov Finite-Volume Schemes4.5 k-exact Reconstruction4.6 Upwind Advection Scheme with k = 0

Reconstruction4.7 Upwind Advection Scheme with k = 1

Linear Reconstruction4.8 Maximum Principles and Delaunay Tri-

angulation

5.0 Finite-Volume Solvers for the Euler Equa-tions5.1 Euler Equations in Integral Form5.2 Extension of Scalar Advection Schemes

to Systems of Equations53 Implicit Linearizations

6.0 Numerical Solution of the Navier-Stokes Equa-tions with Turbulence6.1 Turbulence Modeling for Unstructured

grids6.2 A One-Equation Turbulence Transport

Model

https://ntrs.nasa.gov/search.jsp?R=19920018434 2020-03-29T21:22:52+00:00Z

Page 2: SOLVERS FOR THE EULER AND NAVIER-STOKES EQUATIONS · plane, each region being the portion of the plane closer to some given point P of the set of points Mesh Median Dual CCJ,troid

6-2

IntroductionOne of the major achievements in engineer-

ing science has been the development of com-puter algorithms for solving nonlinear differentialequations such as the Navier-Stokes equations.These algorithms are now used in the practicalengineering design of devices such as cars andairplanes as well as theoretical studies of com-plex phenomena such as fluid turbulence. In pastyears, limited computer resources have motivatedthe development of efficient numerical methodsin computational fluid dynamics (CFD) utilizingstructured meshes. These meshes are comprisedof systematic arrays of quadrilateral or hexahe-dral cells. The use of structured meshes greatlysimplifies the implementation of CFD algorithmson conventional computers. Structured meshesalso permit the use of highly efficient solutiontechniques such as alternating direction implicit(ADI) iteration schemes or multigrid. Followingthe dramatic improvement in computing speed inrecent years, emphasis has shifted towards the de-sign of algorithms capable of treating complexgeometries. The automatic generation of struc-tured grids about complex geometries is prob-lematic. Unstructured grids offer one promisingalternative technique for treating these generalgeometries. Unstructured meshes have irregularconnectivity and usually contain triangles and/orquadrilaterals in two dimensions and tetrahedraand/or hexahedra in three dimensions. The gen-eration and use of unstructured grids poses newchallenges in computational fluid dynamics. Thisis true for both grid generation as well as forthe design of algorithms for flow solution. Thepurpose of these notes is to present recent devel-opments in the unstructured grid generation andflow solution technology.

1.0 Preliminaries

1.1 Graphs and MeshesGraph theory offers many valuable theoret-

ical results which directly impact the design ofefficient algorithms using unstructured grids. Forpurposes of the present discussion, only simplegraphs which do not contain self loops or paralleledges will be considered. Results concerning sim-ple graphs usually translate directly into resultsrelevant to unstructured grids. The most famousgraph theoretic result is Euler's formula which re-lates the number of edges n(e), vertices n(v), andfaces n(f) of a polyhedron (see figure 1.0(a)):

This polyhedron can be embedded in a plane bymapping one face to infinity. This makes thegraph formula (1.0) applicable to 2-D unstruc-tured meshes. In the example below, the face 1-2-3-4 has mapped to infinity to form the exterior(infinite) face. If all faces are numbered includ-ing the exterior face, then Euler's formula (1.0)remains valid.

3 4

- 1 2(a) (b)

Figure 1.0 (a) 3-D Polyhedron, (b) 2-D Planarembedding

The infinite face can be eliminated by describingthe outer boundary in terms of boundary edgeswhich share exactly one interior face (interior edgesshare two). We also consider boundary edgeswhich form simple closed curves in the interiorof the mesh. These curves serve to describe pos-sible objects embedded in the mesh (in this case,the polygon which they form is not counted as aface of the mesh). The number of these polygonsis denoted by n(h). The modified Euler's formulanow reads

n(f)+n(v) =n(e)+1—n(h) (1.1)

Since interior edges share two faces and boundaryedges share one face, the number of interior andboundary edges can be related to the number offaces by the following formula:

max d(f)

2n(e)jnterjor+n(e)bouna =

i n(f) 1 (1.2)

where n(f) 1 denotes the number of faces of a par-ticular edge degree, d(f) = i. Note that for puretriangulations T, these formulas can be used todetermine, independent of the method of triangu-lation, the number of triangles or edges given thenumber of vertices n(v), boundary edges n(e)b0d,and interior holes n (h)

n(f)3 = 2n(v) - n(e)b0d - 2 + 2n(h) (1.3)

orn(f) = n(e) - n(v) + 2 (Euler's formula)

(1.0) n(e) = 3n(v) - n(e)o0 d —3 + 3n(h). (1.4)

Page 3: SOLVERS FOR THE EULER AND NAVIER-STOKES EQUATIONS · plane, each region being the portion of the plane closer to some given point P of the set of points Mesh Median Dual CCJ,troid

6-3

This is a well known result for planar triangu-lations. (For brevity, we will sometimes use Nto denote n(v) in the remainder of these notes.)In many cases boundary edges are not explicitlygiven and the boundary is taken to be the con-vex hull of the vertices, i.e. the smallest con-vex polygon surrounding the vertices. (To obtainthe convex hull in two dimensions, envision plac-ing an elastic rubber band around the cloud ofpoints- The final shape of this rubber band willbe the convex hull.) A key observation for planarmeshes is the asymptotic linear storage require-ment with respect to the number of vertices forarbitrary mesh arrangements.

The Euler formula extends naturally to anarbitrary number of space dimensions. In thisgeneral setting, Euler's formula relates basic com-ponents (vertices, edges, faces, etc.) of higherdimensional polytopes. In computational geome-try jargon, vertices, edges, and faces are all spe-cific examples of "k-faces". A 0-face is simply avertex, a 1-face corresponds to a edge, a 2-facecorresponds to a facet (or simply a face), etc.A polytope P in Rd contains k-faces V k €1-1, 0,1,..., d}. The -1-face denotes the null setface by standard convention. Let the number ofk-faces contained in the polytope P be denotedby Nk(P). For example, No (P) would denote thenumber of vertices. Using this notation, we havethe following relationships:

No n(v) (vertices), N1 n(e) (edges)

N2 n(f) (faces), N3 n() (volumes)

By convention, there is exactly one null set con-tained in any polytope, i.e. N_ 1 (P) = 1 and bydefinition Nd(P) = 1. Using these results, we cansuccinctly state the general Euler formula for anarbitrary polytope in Rd

= 0 (Euler's Formula ink=-1

Rd)

(1.5)On the surface of a polyhedron in 3-space, thestandard Euler formula (1.0) is recovered since

—1+N0—N1+N2-1=0

orn(j)+n(v)=n(e) -i- 2.

To obtain results relevant to three-dimensionalunstructured grids, the Euler formula (1.5) is ap-plied to a four-dimensional polytope.

n(f) + n(v) = n(e) + n(0) (1.6)

This formula relates the number of vertices, edges,faces, and volumes n(Ø) of a three-dimensionalmesh. As in the two-dimensional case, this for-mula does not account for boundary effects be-cause it is derived by looking at a single four-dimensional polytope. The example below demon-strates how to derive exact formulas includingboundary terms for a tetrahedral mesh. Deriva-tions valid for more general meshes in three di-mensions are also possible.

Example: Derivation of Exact Euler Formula for3-D Tetrahedral Mesh.

Consider the collection of volumes incidentto a single vertex v1 and the polyhedron whichdescribes the shell formed by these vertices. LetF6 ( v 1 ) and Nb (v) denote the number of faces andvertices respectively of this polyhedron which ac-tually lie on the boundary of the entire mesh.Also let E(v) denote the total number of edgeson the polyhedron surrounding v. Finally, letdo(vi ) and d(v) denote the number of tetrahe-dral volumes and edges respectively that are in-cident to v. On this polyhedron, we have exactsatisfaction of Euler's formula (1.0), i.e.

polyhedral faces vertices on polyhedron

+ Fo(v)+ ie(v i ) + N6(v) = E(v1)-f2(1.7)

Note that this step assumes that the polyhedronis homeomorphic to a sphere (otherwise Euler'sformula fails). In reality, this is not a severe as-sumption. (It would preclude a mesh consistingof two tetrahedra which touch at a single vertex.)On the polyhedron we also have that

polyhedral faces

2E(v1 ) = 3 (do v1 ) + F6 (vj). (1.8)

Combining (1.7) and (1.8) yields

de(Vi) = d(v 1 ) + Fb(v) - N6 (v1 ) + 2. (1.9)

Summing this equation over all vertices produces

n(v) = (n(v)+Fo(vi)) _ENo(vj)

(1.10)where de and d4, are the average vertex degreeswith respect to edges and volumes. Since globallywe have that

Jen(v) = 2n(e), n(v) = 4n(çb), (1.11)

Page 4: SOLVERS FOR THE EULER AND NAVIER-STOKES EQUATIONS · plane, each region being the portion of the plane closer to some given point P of the set of points Mesh Median Dual CCJ,troid

Figure 1.1 Several triangulation duals.

In figure 1.1, edges and faces about the cen-tral vertex are shown for duals formed from me-dian segments, centroid segments, and by Dirich-let tessellation. (The Dirichlet tessellation of aset of points is a pattern of convex regions in theplane, each region being the portion of the planecloser to some given point P of the set of points

Mesh

Median Dual

CCJ,troid Dual

DliichIet Region

6-4

than to any other point.) Two-dimensional finite-volume schemes for the Euler and Navier-Stokesequations are frequently developed which formcontrol volumes from either faces (cells) of themesh or faces of the mesh dual. Schemes whichuse the cells of the mesh as control volumes areoften called "cell-centered" schemes. Other "ver-tex" schemes use mesh duals constructed frommedian segments, Dirichlet regions, or centroidsegments. In all of these schemes, the primarycomputational effort is associated with the cal-culation of the flux of mass, momenta, and en-ergy through an edge associated with the con-trol volume. The one-to-one correspondence ofedges of a mesh and mesh dual (ignoring bound-aries) means that there is very little difference incomputational effort in schemes based on meshfaces or duals. This observation is not true inthree dimensions! Consider a three dimensionaltetrahedral mesh. The duality for this nonpla-nar arrangement is between edges of the tetrahe-dral mesh and faces of the dual. In other words,for each edge of the mesh there is a one-to-onecorrespondence with a face of the dual (ignor-ing boundaries). Again, the main computationaleffort associated with finite-volume schemes forsolving the Euler and Navier-Stokes equations isthe calculation of the flux through each face ofthe control volume. If the control volumes arethe tetrahedra themselves (cell-centered scheme),then a flux must be calculated for each tetrahe-dral face. This means that the work is propor-tional to the number of faces of the tetrahedralmesh. From eqn. (1.14), the number of faces ofa tetrahedral mesh is related to the number oftetrahedra and boundary faces by

workc—c scheme cc n(f) = 2n(0) + n(f )bound.

If the control volumes of the finite-volume schemeare formed from a mesh dual (vertex scheme),then the number of flux calculations is propor-tional to the number of faces of the mesh dualwhich is roughly equal to the number of edges ofthe origizial tetrahedral mesh. From eqn. (1.13)we have that

workverj scheme cc n(e) = n(o) + n(v)3

+ fl(f)bound -

To better understand the work estimates, definefi such that n(Ø) = /in(v). Practically speaking,0 usually ranges from 5-7 for tetrahedral meshes.Taking the ratio of the work estimates for the

substitution of (1.11) into (1.10) reveals that

end

n(e) = n(Ø) + n(v) + E Fb(vj) -(1.12)

Finally, note that E F6 (v1 ) = 3n(f)bound . Insert-ing this relationship into (1.12) yields

3 1n(e) = n(0) + n(v) + n(f)bound -

(1.13)Other equivalent formulas are easily obtained bycombining this equation with the formula relatingvolume, faces, and boundary faces, i.e.

n(f) = 2n(Ø) + n(f)bound (1.14)

An exact formula, similar to (1.6), is obtained bycombining (1.14) and (1.13)

n(e)+n(0) =n(f)+n(v)+n(f)bOtfldjn(v)bOUfld

(1.15)

1.2 DualityGiven a planar graph G, we informally de-

fine a dual graph GDUaZ to be any graph with thefollowing three properties: each vertex of GDUGLis associated with a face of G; each edge of Cis associated with an edge of GDUGL; if an edgeseparates two faces, fi and fj of C then the asso-ciated dual edge connects two vertices of GDUGIassociated with fi and J5 . This duality plays animportant role in CFD algorithms.

Page 5: SOLVERS FOR THE EULER AND NAVIER-STOKES EQUATIONS · plane, each region being the portion of the plane closer to some given point P of the set of points Mesh Median Dual CCJ,troid

(c)

6-5

cell-centered and vertex scheme, ignoring bound-ary terms and assuming an identical constant ofproportionality, we obtain

workc_c scheme - 273n(v) - 20 (1.16)workvert scheme - (1 + 3)rt(v) - 1 T-0

The work for the cell-centered scheme approachestwice that of the vertex scheme. The reader shouldnot automatically infer that the vertex scheme ispreferred. The question of solution accuracy ofthe two approaches needs to be factored into theequation. The answer to the question of which is"better" is still a subject for debate.

1.3 Data Structures

The choice of data structures used in rep-resenting unstructured grids varies considerablydepending on the type of algorithmic operationsto be performed. In this section, a few of themost common data structures will be discussed.The mesh is assumed to have a numbering of ver-tices, edges, faces, etc. In most cases, the physicalcoordinates are simply listed by vertex number.The "standard" finite element (FE) data struc-ture lists connectivity of each element. For ex-ample in figure 1.2(a), a list of the three verticesof each triangle would be given.

(1-----

,61- IF I I- I

- I I

- I

- I I

(a) (b)

Figure 1.2 Data structures for planar graphs.(a) FE data structure, (b) Edge structure, (c)Out-degree structure, (d) Quad-edge structure.

The FE structure extends naturally to three di-mensions. The FE structure is used extensive infinite element solvers for solids and fluids.

For planar meshes, another typical structureis the edge structure (figure 1.2(b)) which lists

connectivity of vertices and adjacent faces by stor-ing a quadruple for each edge consisting of theorigin and destination of the each edge as well asthe two faces (cells) that share that edge. Thisstructure allows easy traversal through a meshwhich can be useful in certain grid generation al-gorithms. (This traversal is not easily done usingthe FE structure.) The extension to three di-mensions is facewise (vertices of a face are givenas well as the two neighboring volumes) and re-quires distinction between different face types.

A third data structure provides connectivityvia vertex lists as shown in figure 1.2(c). Thebrute force approach is to list all adjacent neigh-bors for each vertex (usually as a linked-list). Manysparse matrix solver packages specify nonzeros ofa matrix using row or column storage schemeswhich list all nonzero entries of a given row orcolumn. For discretizations involving only adja-cent neighbors of a mesh, this would be identicalto specifying a vertex list. An alternative to spec-ifying all adjacent neighbors is to direct edges ofthe mesh. In this case only those edges whichpoint outward from a vertex are listed. In thenext section, it will be shown that an out-degreelist can be constructed for planar meshes by di-recting a graph such that no vertex has more thanthree outgoing edges. This is asymptotically op-timal. The extension of the out-degree structureto three dimensions is not straightforward and al-gorithms for obtaining optimal edge direction fornonplanar graphs are still under development.

The last structure considered here is the quad-edge structure proposed by Guibas and Stolfi [1],see figure 1.2(d). Each edge is stored as pair ofdirected edges. Each of the directed edges storesits origin and pointers to the next and previousdirected edge of the region to its left. The quad-edge structure is extremely useful in grid gener-ation where distinctions between topological andgeometrical aspects are sometimes crucial. Thestructure has been extended to three dimensionalarrangements by Dobkin and Laslo [2] and Ens-son [3].

2.0 Some Basic Graph OperationsImportant in CFD

Implementation of unstructured grid meth-ods on differing computer architectures has stim-ulated research in exploiting properties and char-acterizations of planar and nonplanar graphs. Forexample in Hammond and Barth [I, we exploiteda recent theorem by Chrobak and Eppstein [5]concerning directed graphs with minimum out-degree. In this section, we review this result as

Page 6: SOLVERS FOR THE EULER AND NAVIER-STOKES EQUATIONS · plane, each region being the portion of the plane closer to some given point P of the set of points Mesh Median Dual CCJ,troid

6-6

well as presenting other basic graph operationsthat are particularly useful in CFD. Some of thesealgorithms are specialized to planar graphs (2-Dmeshes) while others are very general and applyin any number of space dimensions.

2.1 Planar Graphs with Minimum Out-DegreeTheorem: Every planar graph has a 3-boundedorientation, [5].

In other words, each edge of a planar graphcan be assigned a direction such that the maxi-mum number of edges pointing outward from anyvertex is less than or equal to three. A construc-tive proof is given in ref. [5] consisting of the fol-lowing steps. The first step is to find a reduceableboundary vertex. A reduceable boundary vertexis any vertex on the boundary with incident ex-terior (boundary) edges that connect to at mosttwo other boundary vertices and any number ofinterior edges. Chrobalc and Eppstein prove thatreduceable vertices can always be found for ar-bitrary planar graphs. (In fact, two reduceablevertices can always be found!) Once a reduce-able vertex is found then the two edges connectingto the other boundary vertices are directed out-ward and the remaining edges are always directedinward. These directed edges are then removedfrom the graph, see Figures 2.0(a-j). The processis then repeated on the remaining graph until nomore edges remain. The algorithm shown picto-rially in figure 2.0 is summarized in the followingsteps:

Algorithm: Orient a Graph with maximum out-degree < 3.

Step 1. Find reduceable boundary vertex.Step 2. Direct exterior edges outward and interioredges inward.Step 3. Remove directed edges from graph.Step 4. If undirected edges remain, go to step 1

(c) (d)

(0)

0)

(g) (h)

vtj

( I ) a)

Figure 2.0 (a-i) Mesh orientation procedure without-degree 3, (j) final oriented triangulation.

Linear time algorithms are given in [5] Inthe paper by Hammond and Barth, we exploitthe out-degree property to provide optimal loadbalancing on a massively parallel computer. De-tails are given in a later section.

2.2 Graph Ordering Techniques

I

The particular ordering of solution unknownscan have a marked influence on the amount ofcomputational effort and memory storage requiredto solve large sparse linear systems and eigen-value problems. In many algorithms, the bandwidth and/or profile of the matrix determines theamount of computation and memory required.Most meshes obtained from grid generation codeshave very poor natural orderings. Figures 2.2 and2.2 show a typical mesh generated about a multi-component airfoil and the nonzero entries asso-ciated with the "Laplacian" of the graph. TheLaplacian of a graph would represent the nonzeroentries due to a discretization which involves onlyadjacent neighbors of the mesh. Figure 2.2 in-dicates that the band width of the natural or-dering is almost equal to the dimension of thematrix! In parallel computation, the ordering al-gorithms can be used as means for partitioning

Page 7: SOLVERS FOR THE EULER AND NAVIER-STOKES EQUATIONS · plane, each region being the portion of the plane closer to some given point P of the set of points Mesh Median Dual CCJ,troid

6-7

a mesh among processors of the computer. This Algorithm: Graph ordering, Rosen.will be addressed in the next section. Step 1. Determine band width and the defining

index pair (i,j) with (i < j)Step 2. Does their exist an exchange which in-creases i or decreases j so that the band width isreduced? If so, exchange and go to step 1Step 3. Does their exist an exchange which in-creases i or decreases j so that the band widthremains the same? If so, exchange and go to step

Figure 2.1 Typical Steiner triangulation aboutmulti-component airfoil.

Figure 2.2 Nonzero entries of Laplacian matrixproduced from natural ordering.

Several algorithms exist which construct neworderings by attempting to minimize the bandwidth of a matrix or attempting to minimize thefill that occurs in the process matrix factoriza-tion. These algorithms usually rely on heuristicsto obtain high efficiency, and do not usually ob-tain an optimum ordering. One example wouldbe Rosen's algorithm [6] which iterates on the or-dering to minimize the maximum band width.

This algorithm produces very good orderingsbut can be very expensive for large matrices. Apopular method which is much less expensive forlarge matrices is the Cuthill-McKee [7] algorithm.

Algorithm: Graph ordering, Cuthill-McKee.

Step 1. Find vertex with lowest degree. This isthe root vertex.Step 2. Find all neighboring vertices connectingto the root by incident edges. Order them byincreasing vertex degree. This forms level 1.Step 3. Form level k by finding all neighboringvertices of level k - 1 which have not been pre-viously ordered. Order these new vertices by in-creasing vertex degree.Step 4 . If vertices remain, go to step 3

Figure 2.3 Nonzero entries of Laplacian matrixafter Cuthill-McKee ordering.

The heuristics behind the Cuthill-McKee al-gorithm are very simple. In the graph of themesh, neighboring vertices must have numberingswhich are near by, otherwise they will produce en-tries in the matrix with large band width. Theidea of sorting elements among a given level is

Page 8: SOLVERS FOR THE EULER AND NAVIER-STOKES EQUATIONS · plane, each region being the portion of the plane closer to some given point P of the set of points Mesh Median Dual CCJ,troid

2

(b)

3

6-8

based on the heuristic that vertices with high de-gree should be given indices as large as possibleso that they will be as close as possible to verticesof the next level generated. Figure 2.3 shows thedramatic improvement of the Cuthill-McKee or-dering on the matrix shown in figure 2.2.

Studies of the Cuthill-McKee algorithm haveshown that the profile of a matrix can be greatlyreduced simply by reversing the ordering of theCuthill-McKee algorithm, see George [8]. Thisamounts to a renumbering given by

k -.n — k -f-i (2.1)

where n is the size of the matrix. While thisdoes not change the bandwidth of the matrix,it can dramatically reduce the fill that occurs inCholesky or L-U matrix factorization when com-pared to the original Cuthill-McKee algorithm.

2.3 Graph Partitioning for Parallel Computing

An efficient partitioning of a mesh for dis-tributed memory machines is one that ensuresan even distribution of computational workloadamong the processors and minimizes the amountof time spent in interprocessor communications.The former requirement is termed load balanc-ing. For if the load were not evenly distributed,some processors will have to sit idle at synchro-nization points waiting for other processors tocatch up. The second requirement comes fromthe fact that communication between processorstakes time and it is not always possible to hidethis latency in data transfer. In our parallel im-plementation of a finite-volume flow solver on un-structured grids, data for the nodes that lie on theboundary between two processors is exchanged,hence requiring a bidirectional data-transfer. Onmany systems, a synchronous exchange of datacan yield a higher performance than when doneasynchronously. To exploit this fact, edges ofthe communication graph are colored such thatno vertex has more than one edge of a certaincolor incident upon it. A communication graphis a graph in which the vertices are the proces-sors and an edge connects two vertices if the twocorresponding processors share an interprocessorboundary. The colors in the graph represent sep-arate communication cycles. For instance, themesh partitioned amongst four processors as shownin figure 2.4(a), would produce the communica-tion graph shown in figure 2.4(b).

Figure 2.4 (a) Four partition mesh, (b). Commu-nication graph.

The graph shown in figure 2.4(b) can be colorededgewise using three colors. For example, in thefirst communication cycle, processors (1,4) couldperform a synchronous data exchange as wouldprocessors (2,3). In the second communicationcycle, processors (1,2) and (3,4) would exchangeand in the third cycle, processors (1, 3) would ex-change while processors 2 and 4 sit idle. Vizing'stheorem proves that any graph of maximum ver-tex degree A (number of edges incident upon avertex) can be colored using n colors such thatA < n A + 1. Hence, any operation thatcalls for every processor to exchange data with itsneighbors will require n communication cycles.

The actual cost of communication can oftenbe accurately modeled by the linear relationship:

Cost =a+13m (2.2)

where a is the time required to initiate a mes-sage, fi is the rate of data-transfer between twoprocessors and m is the message length. For nmessages, the cost would be

Cost = >(a +)3Mn)- (2.3)

This cost can be reduced in two ways. One way isto reduce A thereby reducing n. The alternativeis to reduce the individual message lengths. Thebounds on n are 2 <N P—i for P > 3 where Pis the total number of processors. Figure 2.5(a)shows the partitioning of a mesh which reducesA, and 2.5(b) shows a partitioning which mini-mizes the message lengths. For the mesh in figure2.5(a), A = 2 while in figure 2.5(b), A = 3. How-ever, the average message length for the parti-tions shown in figure 2.5(b) is about half as muchas that in figure 2.5(a).

Page 9: SOLVERS FOR THE EULER AND NAVIER-STOKES EQUATIONS · plane, each region being the portion of the plane closer to some given point P of the set of points Mesh Median Dual CCJ,troid

6-9

(.) (b)

Figure 2.5 (a) Mesh partitioning with minimizedA, (b) Mesh with minimizes message length.

In practice, it is difficult to partition an unstruc-tured mesh while simultaneously minimizing thenumber and length of messages. In the followingparagraphs, a few of the most popular partition-ing algorithms which approximately accomplishthis task will be discussed. All the algorithmsdiscussed below: coordinate bisection, Cuthill-McKee, and spectral partitioning are evaluated inthe paper by Venkatakrishnan, Simon, and Barth[9]. This paper evaluates the partitioning tech-niques within the confines of an explicit, unstruc-tured finite-volume Euler solver. Spectral par-titioning has been extensively studied by Simon[10].The algorithms have also been implementedin three dimensions by A. Gandhi working in theCFD branch at NASA Ames Research Center.

Note that for the particular applications thatwe have in mind (a finite-volume scheme with so-lution unknowns at vertices of the mesh), it makessense to partition the domain such that the sep-arators correspond to edges of the mesh. Alsonote that the partitioning algorithms all can beimplemented recursively. The mesh is first di-vided into two sub-meshes of nearly equal size.Each of these sub-meshes is subdivided into twomore sub-meshes and the process in repeated un-til the desired number of partitions P is obtained(P is a integer power of 2). Since we desire theseparator of the partitions to coincide with edgesof the mesh, the division of a sub-mesh into twopieces can be viewed as a 2-coloring of faces of thesub-mesh. For the Cuthili-McKee and spectralpartitioning techniques, this amounts to supply-ing these algorithms with the dual of the graphfor purposes of the 2-coloring. The balancing ofeach partition is usually done cellwise; althoughan edgewise balancing is more appropriate in thepresent applications. Due to the recursive na-ture of partitioning, the algorithms outlined be-low represent only a single step of the process.

Coordinate BisectionIn the coordinate bisection algorithm, face

centroids are sorted either horizontally or verti-cally depending of the current level of the recur-sion. A separator is chosen which balances thenumber of faces. Faces are colored depending onwhich side of the separator they are located. Theactual edges of the mesh corresponding to theseparator are characterized as those edges whichhave adjacent faces of different color, see figure2.6. This partitioning is very efficient to cre-ate but gives sub-optimal performance on parallelcomputations owing to the long message lengthsthan can routinely occur.

Figure 2.6 Coordinate bisection (16 partitions).

Cut hill-McKeeThe Cuthill-McKee (CM) algorithm described

earlier can also be used for recursive mesh parti-tioning. In this case, the Cuthill-McKee order-ing is performed on the dual of the mesh graph.A separator is chosen either at the median ofthe ordering (which would balance the coloringof faces of the original mesh) or the separator ischosen at the level set boundary closest to themedian as possible. This latter technique has thedesired effect of reducing the number of discon-nected sub-graphs that occur during the courseof the partitioning. Figure 2.7 shows a Cuthill-McKee partitioning for the multi-component air-foil mesh. The Cuthill-McKee ordering tends toproduce long boundaries because of the way thatthe ordering is propagated through a mesh. Themaximum degree of the communication graph alsotends to be higher using the Cuthill-McKee algo-rithm. The results shown in ref. [9] for multi-component airfoil grids indicate a performance on

Page 10: SOLVERS FOR THE EULER AND NAVIER-STOKES EQUATIONS · plane, each region being the portion of the plane closer to some given point P of the set of points Mesh Median Dual CCJ,troid

6-lu

parallel computations which is slightly worse thanthe coordinate bisection technique.

Figure 2.7 Cuthill-McKee partitioning of mesh.

Spectral PartitioningThe last partitioning considered is the spec-

tral partitioning which exploits properties of theLaplacian £ of a graph (defined below). The al-gorithm consists of the following steps:

Algorithm: Spectral Partitioning.

Step 1. Calculate the matrix £ associated withthe Laplacian of the graph (dual graph in thepresent case).Step 2. Calculate the eigenvalues and eigenvec-tors of £.Step 3. Order the eigenvalues by magnitude, A 1 <

Step 4. Determine the smallest nonzero eigen-value, Af and its associated eigenvector xj (theFiedler vector).Step 5. Sort elements of the Fiedler vector.Step 6. Choose a divisor at the median of thesorted list and 2-color vertices of the graph (ordual) which correspond to elements of the Fieldervector less than or greater than the median value.

The spectral partitioning of the multi-componentairfoil is shown in figure 2.8. In reference [9],we found that parallel computations performedslightly better on the spectral partitioning thanon the coordinate bisection or Cuthill-McKee. Thecost of the spectral partitioning is very high (evenusing a Lanczos algorithm to compute the eigen-value problem). It has yet to be determined if thespectral partitioning will have practical merit.

Figure 2.8 Spectral partitioning of multi- com-ponent airfoil.

The spectral partitioning exploits a peculiar prop-erty of the "second" eigenvalue of the Laplacianmatrix associated with a graph. The Laplacianmatrix of a graph is simply

£=—V+A. (2.4)

where A is the standard adjacency matrix

Aij = { 1 e(v1 , v1 ) € G (2.5)0 otherwise

and V is a diagonal matrix with entries equal tothe degree of each vertex, V = d(v1 ). From thisdefinition, it should be clear that rows of £ eachsum to zero. Define an N-vector, s = [1,1,1, ...]T.By construction we have that

= 0. (2.6)

This means that at least one eigenvalue is zerowith s as an eigenvector.The objective of the spectral partitioning is to di-vide the mesh into two partitions of equal sizesuch that the number of edges cut by the parti-tion boundary is approximately minimized.

Technically speaking, the smallest nonzeroeigenvalue need not be the second. Graphs withdisconnected regions will have more that one zeroeigenvalue depending on the number of discon-nected regions. For purposes of discussion, weassume that disconnected regions are not present,i.e. that A2 is the relevant eigenmode.

Page 11: SOLVERS FOR THE EULER AND NAVIER-STOKES EQUATIONS · plane, each region being the portion of the plane closer to some given point P of the set of points Mesh Median Dual CCJ,troid

6-Il

Elements of the proof:Define a partitioning vector which 2-colors

the vertices

P = [+1,—i, —1, +1, +1,..., +1, _i]T (2.7)

depending on the sign of elements of p and theone-to-one correspondence with vertices of thegraph, see for example figure 2.9. Balancing thenumber of vertices of each color amounts to therequirement that

sip (2.8)

where we have assumed an even number of ver-tireg

Figure 2.9 Arbitrary graph with 2-coloring show-ing separator and cut edges.

The key observation is that the number of cutedges, E, is precisely related to the L1 norm ofthe Laplacian matrix multiplying the partitioningvector, i.e.

4E = II p II ' (2.9)

which can be easily verified. The goal is to mini-mize cut edges. That is to find p which minimizesII pVi subject to the constraints that Il p il' = Nand s i p. Since C is a real symmetric (posi-tive semi-definite) matrix, it has a complete setof real eigenvectors which can be orthogonalizedwith each other. The next step of the proof wouldbe to extend the domain of p to include real num-bers (this introduces an inequality) and expand pin terms of the orthogonal eigenvectors.

p=cjxj(2.10)

By virtue of (2.6) we have that x 1 = s. It remainsto be shown that VII' is minimized when p =p' = nx2/11 x2111 ,i.e. when the Fiedler vector isused. Inserting this expression for p we have that

I p'lji = nA2 (2.11)

It is a simple matter to show that adding anyother eigenvector component to p' while insistingthat Il p ili = N can only increase the L1 norm.This would complete the proof. Figure 2.10 plotscontours (level sets) of the Fiedler vector for themulti-component airfoil problem.

Figure 2.10. Contours of Fiedler Vector forSpectral Partitioning. Dashed lines are less thanthe median value.

3.0 Triangulation Methods

Although many algorithms exist for triangu-lating sites (points) in an arbitrary number ofspace dimensions, only a few have been used onpractical problems. In particular, Delaunay tri-angulation has proven to be a very useful triangu-lation technique. This section will present someof the basic concepts surrounding Delaunay andrelated triangulations as well as discussing someof the most popular algorithms for constructingthese triangulations. The discussion of the ad-vancing front method of grid generation will bedeferred to Professors Morgan and Lohner.

3.1 Voronoi Diagram and Delaunay TriangulationRecall the definition of the Dirichlet tessel-

lation in a plane. The Dirichlet tessellation ofa point set is the pattern of convex regions, eachbeing closer to some point P in the point set thanto any other point in the set. These Dirichlet re-gions are also called Voronoi regions. The edges

Page 12: SOLVERS FOR THE EULER AND NAVIER-STOKES EQUATIONS · plane, each region being the portion of the plane closer to some given point P of the set of points Mesh Median Dual CCJ,troid

6-12

of Voronoi polygons comprise the Voronoi dia-gram, see figure 3.1. The idea extends naturallyto higher dimensions.

Figure 3.1 Voronoi diagram of 40 random sites.

Voronoi diagrams have a rich mathematical the-ory. The Voronoi diagram is believed to be one ofthe most fundamental constructs defined by dis-crete data. Voronoi diagrams have been inde-pendently discovered in a wide variety of disci-plines. Computational geometricians have a keeninterest in Voronoi diagrams. It is well knownthat Voronoi diagrams are related to convex hullsvia stereographic projection. Point location in aVoronoi diagram can be performed in O(log(n))time with 0(n) storage for it regions. This is use-ful in solving post-office or related problems inoptimal time. Another example of the Voronoidiagram which occurs in the natural sciences canbe visualized by placing crystal "seeds" at ran-dom sites in 3-space. Let the crystals grow atthe same rate in all directions. When two crys-tals collide simply stop their growth. The crys-tal formed for each site would represent that vol-ume of space which is closer to that site than toany other site. This would effectively constructa Voronoi diagram. We now consider the role ofVoronoi diagrams in Delaunay triangulation.

Definition:The Delaunay triangulation of a pointset is defined as the dual of the Voronoi diagramof the set.

The Delaunay triangulation in two space dimen-sions is formed by connecting two points if andonly if their Voronoi regions have a common bor-der segment. If no four or more points are cocir-cular, then we have that vertices of the Voronoiare circumcenters of the triangles. This is true be-

cause vertices of the Voronoi represent locationsthat are equidistant to three (or more) sites. Alsonote that from the definition of duality, edgesof the Voronoi are in one-to-one correspondenceto edges of the Delaunay triangulation (ignoringboundaries). Because edges of the Voronoi di-agram are the locus of points equidistant to twosites, each edge of the Voronoi diagram is perpen-dicular to the corresponding edge of the Delau-nay triangulation. This duality extends to threedimensions in a straightforward way. The De-launay triangulation possesses several alternatecharacterizations and many properties of impor-tance. Unfortunately, not all of the two dimen-sional characterizations have three-dimensional ex-tensions. To avoid confusion, properties and algo-rithms for construction of two dimensional Delau-nay triangulations will be considered first. Theremainer of this section will then discuss the three-dimensional Delaunay triangulation.

3.2 Properties of a 2-D Delaunay Triangulation

(1) Uniqueness. The Delaunay triangulation isunique. This assumes that no four sites are cocir-cular. The uniqueness follows from the unique-ness of the Dirichlet tessellation.

(2) The circumcircle criteria. A triangulation ofN > 2 sites is Delaunay if and only if the circum-circle of every interior triangle is point-free. Forif this was not true, the Voronoi regions associ-ated with the dual would not be convex and theDirichlet tessellation would be invalid. Relatedto the circumcircle criteria is the incircle test forfour points as shown in figures 3.2-3.3.

Figure 3.2 Incircle test for I2sABC and D (true).EJ

C

Figure 3.3 Incircle test for AABC and D (false).

Page 13: SOLVERS FOR THE EULER AND NAVIER-STOKES EQUATIONS · plane, each region being the portion of the plane closer to some given point P of the set of points Mesh Median Dual CCJ,troid

(a) 'U,

6-13This test is true if point D lies interior to the cir-cumcircle of AABC which is equivalent to testingwhether LABC + LCDA is less than or greaterthan LBCD + LBAD. More precisely we havethat

( < 1800 incircle falseLABC+LCDA = 4 1800 A,B,C,D cocircular

t > 180 0 incircie true(3.1)

Since interior angles of the quadrilateral sum to360°, if the circumcircle of L,.ABC contains Dthen swapping the diagonal edge from positionA—C into B—D guarantees that the new trianglepair satisfies the circumcircle criteria. Further-more, this process of diagonal swapping is local,i.e. it does not disrupt the Delaunayhood of anytriangles adjacent to the quadrilateral.

(3)Edge circle property. A triangulation of sitesis Delaunay if and only if there exists some circlepassing through the endpoints of each and everyedge which is point-free. This characterization isvery useful because it also provides a mechanismfor defining a constrained Delaunay triangulationwhere certain edges are prescribed apr-ior-i. A tri-angulation of sites is a constrained Delaunay tri-angulation if for each and every edge of the meshthere exists some circle passing through its end-points containing no other site in the triangula-tion which is visible to the edge. In figure 3.4, sited is not visible to the segment a-c because of theconstrained edge a-b.

Figure 3.4 Constrained Delaunay triangulation.Site d is not visible to a-c due to constrained seg-ment a-b.

(4)Equiangularity property. Delaunay triangula-tion maximizes the minimum angle of the triangu-lation. For this reason Delaunay triangulation of-ten called the MaxMin triangulation. This prop-erty is also locally true for all adjacent trianglepairs which form a convex quadrilateral. This isthe basis for the local edge swapping algorithm ofLawson [11] described below.

(5)Minimum Containment Circle. A recent resultby Rajan [12] shows that the Delaunay triangula-tion minimizes the maximum containment circleover the entire triangulation. The containmentcircle is defined as the smallest circle enclosingthe three vertices of a triangle. This is identicalto the circumcircle for acute triangles and a cir-cle with diameter equal to the longest side of thetriangle for obtuse triangles (see figure 3.5).

Figure 3.5 Containment circles for acute and ob-tuse triangles.

This property extends to n dimensions. Unfortu-nately, the result does not hold lexicographically.

(6)Nearest neighbor property. An edge formedby joining a vertex to its nearest neighbor is anedge of the Delaunay triangulation. This prop-erty makes Delaunay triangulation a powerful toolin solving the closest proximity problem. Notethat the nearest neighbor edges do not describeall edges of the Delaunay triangulation.

(7)Minimal roughness. The Delaunay triangula-tion is a minimal roughness triangulation for ar-bitrary sets of scattered data, Rippa [13]. Givenarbitrary data fi at all vertices of the mesh and atriangulation of these points, a unique piecewiselinear interpolating surface can be constructed.The Delaunay triangulation has the property thatof all triangulations it minimizes the roughness ofthis surface as measured by the following Sobolevsemi-norm:

(L,)2]

+dx dy (3.2)IT 01)

This is a interesting result as it does not dependon the actual form of the data. This also indi-cates that Delaunay triangulation approximateswell those functions which minimize this Sobolevnorm. One example would be the harmonic func-tions satisfying Laplace's equation with suitableboundary conditions which minimize exactly this

Page 14: SOLVERS FOR THE EULER AND NAVIER-STOKES EQUATIONS · plane, each region being the portion of the plane closer to some given point P of the set of points Mesh Median Dual CCJ,troid

6-14

norm. In a later section, we will prove that aDelaunay triangulation guarantees a maximumprinciple for the discrete Laplacian approxima-tion (with linear elements).

3.3 Alorithms for 2-D Delaunay Tiangulation

We now consider several techniques for De-launay triangulation in two dimensions. Thesemethods were chosen because they perform opti-mally in rather different situations. The discus-sion of the 2-D algorithms is organized as follows:

(a) Incremental Insertion Algorithms(i) Bowyer algorithm(ii) Watson algorithm(iii) Green and Sibson algorithm

(b) Divide and Conquer Algorithm(c) Tanemura/Merriam Algorithm(d) Global Edge Swapping (Lawson)

It should be pointed out that there appears to besome confusion in the CFD literature concerningthe Bowyer[14] and Watson[15] algorithms. Whatis sometimes described as Bowyer's algorithm isactually Watson's algorithm. This is surprisingsince both the Bowyer and Watson algorithms ap-peared as back-to-back articles in the same jour-nal! The fundamental difference (as we will see)is that the Bowyer algorithm is implemented inthe Voronoi plane and the Watson algorithm isimplemented in the triangulation plane.

3.3a Incremental Insertion AkorithmsFor simplicity, assume that the site to be

added lies within a bounding polygon of the ex-isting triangulation. If we desire a triangulationfrom a new set of sites, three initial phantompoints can always be added which define a tri-angle large enough to enclose all points to be in-serted. In addition, interior boundaries are usu-ally temporarily ignored for purposes of the De-launay triangulation. After completing the tri-angulation, spurious edges are then deleted as apostprocessing step. Incremental insertion algo-rithms begin by inserting a new site into an exist-ing Delaunay triangulation. This introduces thetask of point location in the triangulation. Someincremental algorithms require knowing which tri-angle the new site falls within. Other algorithmsrequire knowing any triangle whose circumcirclecontains the new site. In either case, two ex-tremes arise in this reguard. Typical mesh adap-tation and refinement algorithms determine theparticular cell for site insertion as part of themesh adaptation algorithm, thereby reducing theburden of point location. In the other extreme,

initial triangulations of randomly distributed sitesusually require advanced searching techniques forpoint location to achieve asymptotically optimalcomplexity 0 (N log N). Search algorithms basedon quad-tree and split-tree data structures workextremely well in this case. Alternatively, searchtechniques based on "walking" algorithms are fre-quently used because of their simplicity. Thesemethods work extremely well when successivelyadded points are close together. The basic ideais start at the location in the mesh of the previ-ously inserted point and move one edge (or cell)at a time in the general direction of the newlyadded point. In the worst case, each point inser-tion requires 0(N) walks. This would result ina worst case overall complexity 0(N2 ). For ran-domly distributed points the average point inser-tion requires 0(N2) walks which gives an overallcomplexity 0(N 12). For many applications wheresuccessive points tend to be close together, thenumber of walks is roughly constant and thesesimple algorithms can be very competitive. Us-ing any of these techniques, we can proceed withthe insertion algorithms.

Bowyer's algorithm

The basic idea in Bowyer's algorithm is toinsert a new site into an existing Voronoi diagram(for example site Q in figure 3.6), determine itsterritory (dashed line in figure 3.6), delete anyedges completely contained in the territory, thenadd new edges and reconfigure existing edges inthe diagram. The following is Bowyer's algorithmessentially as presented by Bowyer (see reference[14] for complete details):

Algorithm: Incremental Delaunay triangulation,Bowyer [14}.

Step 1. Insert new point (site) Q into the Voronoidiagram.Step 2. Find any existing vertex in the Voronoidiagram closer to the new point than to its form-ing points. This vertex will be deleted in the newVoronoi diagram.Step S. Perform tree search to find remaining setof deletable vertices V that are closer to the newpoint than to their forming points. (In figure 3.6this would be the set {v3,v4,v51)Step 4. Find the set P of forming points corre-sponding to the deletable vertices. In figure 3.6,this would be the set {p2,p3,p4,p5,p7}.Step 5. Delete edges of the Voronoi which canbe described by pairs of vertices in the set V ifboth forming points of the edges to be deletedare contained in P

Page 15: SOLVERS FOR THE EULER AND NAVIER-STOKES EQUATIONS · plane, each region being the portion of the plane closer to some given point P of the set of points Mesh Median Dual CCJ,troid

6-Is

Step 6. Calculate the new vertices of the Voronoi,compute their forming points and neighboring ver-tices, and update the Voronoi data structure.

.p1

.v 4t11

p24

_j1___98

wl \V.

P5

. PS

Figure 3.6 Voronoi diagram modified by Bowyer.

Implementational details and suggested datastructures are given in the paper by Bowyer.

Watson's algorithm

Implementation of the Watson [15] algorithmis relatively straightforward. The first step is toinsert a new site into an existing Delaunay trian-gulation and to find any triangle (the root) suchthat the new site lies interior to that triangles cir-cumcircle. Starting at the root, a tree search isperformed to find all triangles with circumcirclecontaining the new site. This is accomplished byrecursively checking triangle neighbors. (The re-sulting set of deletable triangles violating the cir-cumcircle criteria is independent of the startingroot.) Removal of the deletable triangles exposesa polygonal cavity surrounding site Q with all thevertices of the polygon visible to site Q. The in-terior of the cavity is then retriangulated by con-necting the vertices of the polygon to site Q, seefigure 3.7(b). This completes the algorithm. Athorough account of Watson's algorithm is givenby Baker [16] where he considers issues associatedwith constrained triangulations.

Algorithm: Incremental Delaunay triangulation,Watson [15].

Step 1. Insert new site Q into existing Delaunaytriangulation.Step 2. Find any triangle with circumcircle con-taining site Q.Step S. Perform tree search to find remaining setof deletable triangles with circumcircle containingsite Q.Step 4. Construct list of edges associated withdeletable triangles. Delete all edges from the listthat appear more that once.

Step 5. Connect remaining edges to site Q andupdate Delaunay data structure.

(a)

(0)

Figure 3.7 (a) Delaunay triangulation with siteQ added. (b) Triangulation after deletion of in-valid edges and reconnection.

Green and Sibson algorithm

The algorithm due to Green and Sibson [17]is very similar to the Watson algorithm. The pri-mary difference is the use of local edge swappingto reconfigure the triangulation. The first step islocation, i.e. find the triangle containing pointQ. Once this is done, three edges are then cre-ated connecting Q to the vertices of this triangleas shown in figure 3.8(a). If the point falls on anedge, then the edge is deleted and four edges arecreated connecting to vertices of the newly cre-ated quadrilateral. Using the circuxncircle criteriait can be shown that the newly created edges (3or 4) are automatically Delaunay. Unfortunately,some of the original edges are now incorrect. Weneed to somehow find all "suspect" edges whichcould possibly fail the circle test. Given that thiscan be done (described below), each suspect edgeis viewed as a diagonal of the quadrilateral formedfrom the two adjacent triangles. The circumcircletest is applied to either one of the two adjacenttriangles of the quadrilateral. If the fourth pointof the quadrilateral is interior to this circumcircle,the suspect edge is then swapped as shown in fig-ure 3.8(b), two more edges then become suspect.At any given time we can immediately identify allsuspect edges. To do this, first consider the sub-set of all triangles which share Q as a vertex. One

Page 16: SOLVERS FOR THE EULER AND NAVIER-STOKES EQUATIONS · plane, each region being the portion of the plane closer to some given point P of the set of points Mesh Median Dual CCJ,troid

(a) (b)

2

rar.i

can guarantee at all times that all initial edges in-cident to Q are Delaunay and any edge made inci-dent to Q by swapping must be Delaunay. There-fore, we need only consider the remaining edgesof this subset which form a polygon about Q assuspect and subject to the incircle test. The pro-cess terminates when all suspect edges pass thecircumcircle test.

L

(1,

procedure swap[ Vq, v11 v21 v3 , edges]if(incircle[vq ,vi ,v2 ,va] = TRUE)then

call reconfig_edges[vq , vi, v2 , v3 , edges]call swap[vq , v1 , v4 , v2 , edges]call swap[vq , v2 , v5 , v3 , edges]

endifendprocedure

This example illustrates an important point.The nature of Delaunay triangulation guaranteesthat any edges swapped incident to Q will be finaledges of the Delaunay triangulation. This meansthat we need only consider forward propagationin the recursive procedure. In a later section,we will consider incremental insertion and edgeswapping for generating non-Delaunay triangula-tions based on other swapping criteria. This al-gorithm can also be programmed recursively butrequires backward propagation in the recursive im-plementation. For the Delaunay triangulation al-gorithm, the insertion algorithm would simplifyto the following three steps:

Recursive Algorithm: Incremental DelaunayTriangulation, Green and SibsonStep 1. Locate existing cell enclosing point Q.Step 2. Insert site and connect to surroundingvertices.Step 3. Perform recursive edge swapping on newlyformed cells (3 or 4).

Figure 3.8 (a) Inserting of new vertex, (b) Swap-ping of suspect edge.

The algorithm can be summarized as follows:

Algorithm: Incremental Delaunay Triangulation,Green and Sibson [17]Step 1. Locate existing cell enclosing point Q.Step 2. Insert site and connect to 3 or 4 surround-ing vertices.Step 3. Identify suspect edges.Step 4. Perform edge swapping of all suspectedges failing the incircle test.Step 5. Identify new suspect edges.Step 6. If new suspect edges have been created,go to step 3.

The Green and Sibson algorithm can be im-plemented using standard recursive programmingtechniques. The heart of the algorithm is the re-cursive procedure which would take the followingform for the configuration shown in figure 3.9:

Figure 3.9 Edge swapping with forward propa-gation.

3.3b Divide-and-Conquer Algorithm

In this algorithm, the sites are assumed to beprespecified. The idea is to partition the cloud ofpoints T (sorted along a convenient axis) into left(L) and right (R) half planes. Each half planeis then recursively Delaunay triangulated. Thetwo halves must then be merged together to forma single Delaunay triangulation. Note that weassume that the points have been sorted along

Page 17: SOLVERS FOR THE EULER AND NAVIER-STOKES EQUATIONS · plane, each region being the portion of the plane closer to some given point P of the set of points Mesh Median Dual CCJ,troid

RISIN

the x-axis for purposes of the following discussion(this can be done with O(N log N) complexity).

Algorithm: Delaunay Triangulation via Divide-and-ConquerStep 1. Partition T into two subsets TL and TRof nearly equal size.Step 2. Delaunay triangulate TL and Tft recur-sively.Step 3. Merge TL and Tft into a single Delaunaytriangulation.

Figure 3.10 Triangulated subdivisions.

Figure 3.11 Triangulation after merge.

The only difficult step in the divide-and-conqueralgorithm is the merging of the left and right tri-angulations. The process is simplified by notingtwo properties of the merge:

(1) Only cross edges (L-R or R-L) are created inthe merging process. Since vertices are neitheradded or deleted in the merge process, the needfor a new RAt or L-L edge indicates that the origi-nal right or left triangulation was defective. (Notethat the merging process will require the deletionof edges L-L and/or R-R.)

(2) Vertices with minimum (maximum) y value inthe left and right triangulations always connect

as cross edges. This is obvious given that theDelaunay triangulation produces the convex hullof the point cloud.Given these properties we now outline the "ris-ing bubble" [1] merge algorithm. This algorithmproduces cross edges in ascending y-order. Thealgorithm begins by forming a cross edge by con-necting vertices of the left and right triangula-tions with minimum y value (property 2). Thisforms the initial cross edge for the rising bubblealgorithm. More generally consider the situationin which we have a cross edge between A and Band all edges incident to the points A and B withendpoints above the half plane formed by a linepassing through A - B, see figure 3.12.

Figure 3.12 Circle of increasing radius in risingbubble algorithm.

This figure depicts a continuously transformedcircle of increasing radius passing through thepoints A and B. Eventually the circle increasesin size and encounters a point C from the left orright triangulation (in this case, point C is in theleft triangulation). A new cross edge (dashed linein figure 3.12) is then formed by connecting thispoint to a vertex of A - B in the other half trian-gulation. Given the new cross edge, the processcan then be repeated and terminates when thetop of the two meshes is reached. The deletionof L - L or R - R edges can take place duringor after the addition of the cross edges. Prop-erly implemented, the merge can be carried outin linear time, 0(N). Denoting T(N) as the to-tal running time, step 2 is completed in approxi-mately 2T(N/2). Thus the total running time isdescribed by the recurrence T(N) = 2T(N/2) +0(N) = O(N log N).

3.3c Tanemura/Merniam Algorithm

Another algorithm for performing Delaunaytriangulation is the advancing front method de-veloped by Tanemura, Ogawa, and Ogita [18] andlater rediscovered by Merriam [19]. Here the ideais to start with a known boundary edge and form

Page 18: SOLVERS FOR THE EULER AND NAVIER-STOKES EQUATIONS · plane, each region being the portion of the plane closer to some given point P of the set of points Mesh Median Dual CCJ,troid

6-18

a new triangle by joining both endpoints to one ofthe interior points. This may generate up to twoadditional edges, providing they aren't alreadypart of another triangle. After all the boundaryedges have been incorporated into triangles, thenew edges will appear to be a (somewhat ragged)boundary. This moving boundary is often calledan advancing front. The process continues untilthe front vanishes. The problem here is to makethe triangulation Delaunay. This can be doneby taking advantage of the incircie property; thecircumcircle of a Delaunay triangle contains noother points. This allows the appropriate pointto be selected iteratively as shown in Fig. 3.13.

Figure 3.13 A straightforward iteration proce-dure selects the node which generates the small-est circumcircle for a given edge. The absence ofnodes inside the circumcircle establishes conver-gence.The iteration begins by selecting any node whichis on the desired side of the given edge. If thereare no such nodes, the given edge is part of a con-vex hull. Next, the circumcircle is constructedwhich passes through the edge endpoints and theselected node. Finally, check for nodes inside thiscircle. If there are any, replace the selected nodewith the node closest to the circumcenter and re-peat the process. When the circumcircle is emptyof nodes, connect the edge endpoints to the se-lected node.

3.3d Delaunay Triangulation Via Edge Swapping

This algorithm due to Lawson [11] assumesthat a triangulation exists (not Delaunay) thenmakes it Delaunay through application of edgeswapping such that the equiangularity of the tri-angulation increases. The equiangularity of a tri-angulation, A(T), is defined as the ordering ofangles A(T) = [a 1 ,a2 ,a3 , ...,aafl(c)3] such thata1 :^ ai if i < j. We write A(T) < A(T) ifa !^ a j and a = ai for 1 < i <j. A triangu-lation T is globally equiangular if A(T) < A(T)for all triangulations V of the point set. Law-son's algorithm examines all interior edges of themesh. Each of these edges represents the diag-onal of the quadrilateral formed by the union of

the two adjacent triangles. In general one mustfirst check if the quadrilateral is convex so thata potential diagonal swapping can place withoutedge crossing. If the quadrilateral is convex thenthe diagonal position is chosen which optimizes alocal criterion (in this case the local equiangular-ity). This amounts to maximizing the minimumangle of the two adjacent triangles. Lawson's al-gorithm continues until the mesh is locally opti-mized and locally equiangular everywhere. It iseasily shown that the condition of local equiangu-larity is equivalent to satisfaction of the incircletest described earlier. Therefore a mesh whichis locally equiangular everywhere is a Delaunaytriangulation. Note that each new edge swap-ping (triangulation T) insures that the globalequiangularity increases A(T) > A(T). Becausethe triangulation is of finite dimension, this guar-antees that the process will terminate in a finitenumber of steps.

Iterative Algorithm: Triangulation via Law-son's Algorithmswapedge = trueWhile(swapedge)do

swapedge = falseDo (all interior edges)

If (adjacent triangles form convex qua4henSwap diagonal to form T*.If (optimization criteria satisfied)then

T=Tswapedge = true

EndlfEndlf

EndDoEnd While

When Lawson's algorithm is used for construct-ing Delaunay triangulations, the test for quadri-lateral convexity is not needed. It can be shownthat nonconvex quadrilaterals formed from tri-angle pairs never violate the circumcircle test.When more general optimization criteria is used(discussed later), the convex check must be per-formed.

3.4 Other 2-D Triangulation Algorithms

In this section, other algorithms which donot necessarily produce Delaunay triangulationsare explored.

The MinMax Triangulation

As Babuka and Aziz [22] point out, from thepoint of view of finite elements the MaxMin (De-launay) triangulation is not essential. What isessential is that no angle be too close to 180°. In

Page 19: SOLVERS FOR THE EULER AND NAVIER-STOKES EQUATIONS · plane, each region being the portion of the plane closer to some given point P of the set of points Mesh Median Dual CCJ,troid

Figure 3.15 MinMax Triangulation.

6-19

other words, triangulations which minimize themaximum angle are more desirable. These tri-angulations are referred to as MinMax triangula-tions. One way to generate a 2-D MinMax tri-angulations is via Lawson's edge swapping algo-rithm. In the case, the diagonal position for con-vex pairs of triangles is chosen which minimizesthe maximum interior angle for both triangles.The algorithm is guaranteed to converge in a fi-nite number of steps using arguments similar toDelaunay triangulation. Figures 3.14 and 3.15present a Delaunay (MaxMin) and MinMax tri-angulation for 100 random points.

Figure 3.14 Delaunay Triangulation.

produce locally optimal MinMax triangulationsusing incremental insertion and local edge swap-ping. The algorithm is implemented using re-cursive programming with complete forward andbackward propagation (contrast figures 3.16 andaS). This is a necessary step to produce locallyoptimized meshes.

(a) 1 (b)

Figure 3.16 Edge swapping with forward andbackward propagation in Wiltberger algorithm.

The MinMax triangulation has proven to be veryuseful in CFD. Figure 3.17 shows the Delaunaytriangulation near the trailing edge region of anairfoil with extreme point clustering.

Note that application of local MinMax optimiza-tion via Lawson's algorithm may only result ina mesh which is locally optimal and not neces-sarily at a global minimum. Attaining a globallyoptimal MinMax triangulation is a much moredifficult task. The best algorithm to present date(Edelsbrunner, Tan, and Waupotitsch [231) has ahigh complexity of 0(n2 log it). Wiltberger [24]has implemented a version of the Green and Sib-son algorithm [17] which has been modified to

Figure 3.17 Delaunay triangulation near trailingedge of airfoil.

Upon first inspection, the mesh appears flawednear the trailing edge of the airfoil. Further in-spection and extreme magnification near the trailedge of the airfoil (figure 3.18) indicates that thegrid is a mathematically correct Delaunay tri-angulation. Because the Delaunay triangulationdoes not control the maximum angle, the cells

Page 20: SOLVERS FOR THE EULER AND NAVIER-STOKES EQUATIONS · plane, each region being the portion of the plane closer to some given point P of the set of points Mesh Median Dual CCJ,troid

6-20

near the trailing edge have angles approaching1800 . The presence of nearly collapsed trianglesleaves considerable doubt as to the accuracy ofany numerical solutions computed in the trailingedge region.

Figure 3.18 Extreme closeup of Delaunay trian-gulation near trailing edge of airfoil.

Edge swapping based on the MinMax criteria viaLawson's algorithm or incremental insertion us-ing the Wiltberger algorithm produce the desiredresult as shown in figure 3.19.

Figure 3.19 MinMax triangulation near trailingedge of airfoil.

The Greedy TriangulationA greedy method is one that never undoes

what it did earlier. The greedy triangulation con-tinually adds edges compatible with the current

triangulation (edge crossing not allowed) until thetriangulation is complete, i.e. Euler's formula issatisfied. One objective of a triangulation mightbe to choose a set of edges with shortest totallength. The best that the greedy algorithm cando is adopt a local criterion whereby only theshortest edge available at that moment is con-sidered for addition to the current triangulation.(This does not lead to a triangulation with short-est total length.) Note that greedy triangulationeasily accommodates constrained triangulationscontaining interior boundaries and a nonconvexouter boundary. In this case the boundary edgesare simply listed first in the ordering of candidateedges. The entire algorithm is outlined below.

Algorithm: Greedy TriangulationStep 1. Initialize triangulation T as empty.Step 2. Compute () candidate edges.Step 3. Order pool of candidate edges.Step 4. Remove current edge e 5 from orderedpool.Step 5. If( e8 does not intersect edges of ) adde 8 to TStep 6. If(Euler's formula not satisfied) go toStep 4.

Figure 3.20 Greedy Triangulation.

Figures 3.14 and 3.20 contrast the Delaunayand greedy algorithm. The lack of angle con-trol is easily seen in the greedy triangulation.The greedy algorithm suffers from both high run-ning time as well as storage. In fact a naive im-plementation of Step 5. leads to an algorithmwith 0(N3) complexity. Efficient implementationtechniques are given in Gilbert [25] with the resultthat the complexity can be reduced to O(N2 log N)with 0(N2 ) storage.

Page 21: SOLVERS FOR THE EULER AND NAVIER-STOKES EQUATIONS · plane, each region being the portion of the plane closer to some given point P of the set of points Mesh Median Dual CCJ,troid

6-2!

Data Dependent Triangulation

Unlike mesh adaptation, a data dependenttriangulation assumes that the number and posi-tion of vertices is fixed and unchanging. Of allpossible triangulations of these vertices, the goalis to find the best triangulation under data depen-dent constraints. In Nira, Levin, and Rippa [26],they consider several data dependent constraintstogether with piecewise linear interpolation. Inorder to determine if a new mesh is "better" thana previous one, a local cost function is defined foreach interior edge. Two choices which prove to beparticularly effective are the JND (Jump in Nor-mal Derivatives) and the ARN (Angle BetweenNormals). Using their notation, consider an inte-rior edge with adjacent triangles T1 and T2. LetP(x, y)i and P(x, y)2 be the linear interpolationpolynomials in T1 and T2 respectively:

Pi (x,y) =ajx+biy+ci

P2 (x,y) = a2x+b2y+c2

The JND cost function measures the jump in nor-mal derivatives of P1 and P2 across a commonedge with normal components n2 and ni,.

s(fT, e) = tn(ai - a2 ) + n(b1 -(JND cost function)

The ABN measures the acute angle between thetwo normals formed from the two planes P1 andP2 . Again using the notation of [26]:

S(fT,e) = 9 = cor'(A)

A—a1a2+b1b2+1

-(ABN cost function)

The next step is to construct a global measure ofthese cost functions. This measure is required todecrease for each legal edge swapping. This in-sures that the edge swapping process terminates.The simplest measures are the 11 and 12 norms:

Rj(fT)= >i: Is(fT,e)jedges

R2(fT) = >edges

Recall that a Delaunay triangulation would resultif the cost function is chosen which maximizes theminimum angle between adjacent triangles (Law-son's algorithm). Although it would be desirableto obtain a global optimum for all cost functions,

this could be very costly in many cases. An al-ternate strategy is to abandon the pursuit of aglobally optimal triangulation in favor of a lo-cally optimal triangulation. Once again Lawson'salgorithm is used. Note that in using Lawson's al-gorithm, we require that the global measure de-crease at each edge swap. This is not as simpleas before since each edge swap can have an effecton other surrounding edge cost functions. Never-theless, this domain of influence is very small andeasily found.

Iterative Algorithm: Data Dependent Trian-gulation via Modified Lawson's Algorithmswapedge = trueWhile(swapedge)do

swapedge = falseDo (all interior edges)

If (adjacent trianglesform convex quadrilaterat hen

Swap diagonal to form P.If (R(fT.) <R(fTthen

T=Tswapedge = true

EndlfEndlf

EndDoEnd While

Edge swapping only occurs when R(fT. ) < R(fT)which guarantees that the method terminates ina finite number of steps. Figures 3.14 and 3.21plot the Delaunay triangulation of 100 randomvertices in a unit square and piecewise linear con-tours of (1 + tanh(9y - 9x))/9 on this mesh. Theexact solution consists of straight line contourswith unit slope.

Figure 3.21 Piecewise Linear Interpolation of(1 + tanh(9y - 9x))/9.

Page 22: SOLVERS FOR THE EULER AND NAVIER-STOKES EQUATIONS · plane, each region being the portion of the plane closer to some given point P of the set of points Mesh Median Dual CCJ,troid

6-22

In figures 3.22 and 3.23 the data dependent tri-angulation and solution contours using the JNDcriteria and l j measure suggested in [26] are plot-ted.

Figure 3.22. Data Dependent Triangulation.

Figure 3.23 Piecewise Linear Interpolation of(1 + tanh(9y - 9x))/9.

Note that the triangulations obtained from thismethod are not globally optimal and highly de-pendent on the order in which edges are accessed.Several possible ordering strategies are mentionedin [27].

3.5 2-D Steiner Triangulations

Definition: A Steiner triangulation is any tri-angulation that adds additional sites to an exist-ing triangulation to improve some measure of gridquality.

Technically speaking, the method of advancingfront grid generation discussed by Professors Mor-gan and Lohner in these notes would be a spe-cial type of Steiner triangulation. The insertionalgorithms described earlier also provide a sim-ple mechanism for generating Steiner triangula-tions. Holmes [28] demonstrated the feasibility of

inserting sites at circumcenters of Delaunay trian-gles into an existing 2-D triangulation to improvemeasures of grid quality. This has the desiredeffect of placing the new site in a position thatguarantees that no other site in the triangulationcan lie closer that the radius of the circumcircle,see figure 3.24. In a loose sense, the new siteis placed as far away from other nearby sites asconservatively possible.

h

a

(a) (b)

Figure 3.24 Inserting site at circumcenter of acuteand obtuse triangles.

Warren et at [29] and Anderson [30] further demon-strated the utility of this type of Steiner trian-gulation in the generation and adaptive refine-ment of 2-D meshes. The algorithm developedby Wiltberger [24] also permits Steiner triangu-lations based on either MinMax or MaxMin (De-launay) insertion. Only in the latter case is theinsertion at triangle circumcenters truly justifi-able. The paragraphs below give an expandeddiscussion of 2-D Steiner triangulation.

Steiner Grid Generation

The 2-D Steiner point grid generation algo-rithm described in [28,29,30] consists of the fol-lowing steps. The first step is the Delaunay trian-gulation of the boundary data. Usually three orfour points are placed in the far field with convexhull enclosing all the boundary points. Startingwith a triangulation of these points, sites corre-sponding to boundary curves are incrementallyinserted using Watson's algorithm in [28,29,30]and Green and Sibson's algorithm in [17] as shownin figure 3.25. The initial triangulation does notguarantee that all boundary edges are members ofthe triangulation. This can be remedied in a vari-ety of ways. One technique adds additional pointsto the triangulation so as to guarantee that theresulting Delaunay triangulation contains all thedesired boundary edges, see reference [16]. An-other approach performs local edge swapping soas to produce a constrained Delaunay triangu-lation which guarantees that all boundary edges

Page 23: SOLVERS FOR THE EULER AND NAVIER-STOKES EQUATIONS · plane, each region being the portion of the plane closer to some given point P of the set of points Mesh Median Dual CCJ,troid

6-23

are actual edges of the triangulation.

Figure 3.25 Initial triangulation of boundarypoints.

In either event, the boundary edges are marked sothat they cannot be removed as the triangulationis refined. The algorithms described in [28,29,30]interrogate triangles in an arbitrary order (thismakes the triangulation nonunique). The usermust specify some measure of quality for trianglerefinement (aspect ratio, area, containment circleradius, for example) and a threshold value for themeasure. If a triangle fails to meet the thresholdvalue, the triangulation is refined by placing anew site at the circumcenter of the failed trian-gle via Watson's algorithm. Some care must betaken to insure that measures are chosen whichare guaranteed to be reduced when the refine-ment takes place. Using thresholding in this waydoes not give the user direct control over the ac-tual number of triangle generated in the processof Steiner refinement. Wiltberger takes a dif-ferent approach by maintaining a dynamic heapdata structure of the quality measure. (Heapstructures are a very efficient way of keeping asorted list of entries with insertion and query timeO(logN) for N entries.) The triangle with thelargest value of the specified measure will be lo-cated at the top of the heap at all times dur-ing the triangulation. This makes implementa-tion of a Steiner triangulation which minimizesthe maximum value of the measure very efficient(and unique). In this implementation, the usercan either specify the number of triangles to begenerated or a threshold value of the measure.Note that multiple measures can be refined lex-icographically. Figure 3.26 shows a Steiner tri-

angulation using the Wiltberger algorithm withMaxMin insertion and refinement based on max-imum aspect ratio.

Figure 3.26 Steiner triangulation with sites in-serted at circumcenters to reduce maximum cellaspect ratio.

Figure 3.27 Steiner triangulation of Texas coastand the Gulf of Mexico.

This triangulation has proven to be very flexible.For instance, figure 3.27 shows a Steiner triangu-lation of the Texas coast and Gulf of Mexico.

3.6 Three-Dimensional Triangulations

The Delaunay triangulation extends naturallyinto three dimensions as the geometric dual of the3-D Voronoi diagram. The Delaunay triangula-tion in 3-D can be characterized as the unique

Page 24: SOLVERS FOR THE EULER AND NAVIER-STOKES EQUATIONS · plane, each region being the portion of the plane closer to some given point P of the set of points Mesh Median Dual CCJ,troid

6-24

triangulation such that the circumsphere passingthrough the four vertices of any tetrahedron mustnot contain any other point in the triangulation.As in the 2-D case, the 3-D Delaunay triangula-tion has the property that it minimizes the max-imum containment sphere (globally but not lo-cally). In two dimensions, it can be shown thata mesh entirely comprised of acute triangles isautomatically Delaunay. To prove this, consideran adjacent triangle pair forming a quadrilateral.By swapping the position of the diagonal it iseasily shown that the minimum angle always in-creases. Rajan [121 shows the natural extensionof this idea to three or more space dimensions.He defines a "sell-centered" simplex in R' to bea simplex which has the circumcenter of its cir-cumsphere interior to the simplex. In two dimen-sions, acute triangles are self-centered and obtusetriangles are not. Rajan shows that a triangula-tion entirely composed of self-centered simplicesin Rd is automatically Delaunay.

3.6a 3-D Bowyer and Watson Algorithms

The algorithms of Bowyer [14] and Watson[15] extend naturally to three dimensions with es-timated complexities of 0(N5/3) and 0(N4/3 ) forN randomly distributed vertices. They do notgive worst case estimates. It should be notedthat in three dimensions, Klee [20] shows thatthe maximum number of tetrahedra which canbe generated from N vertices is 0(N2 ). Thus anoptimal worst case complexity would be a least0(N2). Under normal conditions this worst casescenario is rarely encountered. Baker [16] reportsmore realistic actual run times for Watson's algo-rithm.

3.6b 3-D Edge Swapping Algorithms

Until most recently, the algorithm of Greenand Sibson based on edge swapping was thoughtnot to be extendable to three dimensions becauseit was unclear how to generalize the concept ofedge swapping to three or more dimensions. In1986, Lawson published a paper [21] in which heproved the fundamental combinatorial result:

Theorem: (Lawson, 1986) The convex hull ofd + 2 points in Rd can be triangulated in at most2 ways.

Joe [31,32], and Rajan [12] have constructedalgorithms based on this theorem. In joint workwith A. Gandhi [33], we independently constructedan incremental Delaunay triangulation algorithmbased on Lawson's theorem. The remainder ofthis section will review our algorithm and the ba-sic ideas behind 3-D edge swapping algorithms.

It is useful to develop a taxonomy of pos-sible configurations addressed by Lawson's theo-rem. Figure 3.28 shows configurations in 3-D offive points which can be triangulated in only oneway and hence no change is possible. We callthese arrangements "unswappable". Figure 3.29shows configurations which allow two ways of tri-angulation. It is possible to flip between the twopossible triangulations and we call these arrange-ments "swappable".

'4$(a) (b) (c)

Figure 3.28 Generic nonswappable configurationsof 5 points. Shaded region denotes planar surface.

(a) (b) (c) (d)

Figure 3.29 Generic swappable configurations of5 points. Shaded region denotes planar surface.

There are two arrangements that allow twotriangulations. Figures 3.29(a) and 3.29(b) showthe subclass of companion triangulations that canbe transformed from one type to another therebychanging the number of tetrahedra from 2 to 3or vice-versa. Figures 3.29(c) and 3.29(d) showthe other subclass of configurations that can betransformed from one type to another while keep-ing constant the number of tetrahedra (2). Thesefigures reveal an important difference between thetwo and three-dimensional algorithms. The num-ber of tetrahedrons involved in the swapping op-eration need not be constant.

The 3-D edge swapping algorithm is basedon flipping between the two ways of triangulatingthe configurations in figure 3.29. One good way offinding all sets of five points in the mesh is to loopthrough all the faces in the mesh and consideringthe five points that make up the two adjoiningtetrahedra for that face. Below we present thefacewise edge swapping primitive.Primitive: EDGE-SWAP(face)

Let C = { Set of tetrahedra made from the 5nodes of the two adjoining tetrahedra }

Page 25: SOLVERS FOR THE EULER AND NAVIER-STOKES EQUATIONS · plane, each region being the portion of the plane closer to some given point P of the set of points Mesh Median Dual CCJ,troid

6-25

If(shape(C) = convex)thenLet T = current triangulationLet T* alternate triangulation (if it exists)If( Quality(T*) > Quality(T))then

[Edge Swap 7' into T]Endif

Endif

The first step is to find all the tetrahedrathat are described by the five nodes of the twotetrahedra adjacent to the face in question. Thereis a maximum of four tetrahedra that can be builtfrom five nodes. Since any two tetrahedra madefrom the same five points will have to share threepoints (i.e., a face) it is sufficient to only lookat the four neighboring tetrahedra of any of thetwo tetrahedra already known. This constitutesa linear time algorithm for finding all the non-overlapping tetrahedra made from the five points.

If these tetrahedra form a convex shape, thenthe configuration is described by one of the config-urations in figures 3.28 and 3.29 (configurations ofthe convex hull) and edge swapping is permitted.If, for example, only two of the three tetrahedrain figure 3.29(b) were present, the two tetrahe-dra will form a concave shape. Obviously, edgeswapping concave shapes is not possible withoutpossibly creating overlapping tetrahedra in themesh. For swappable configurations, a check isperformed to see if the local mesh quality mea-sure (discussed further below) will improve byedge swapping into the alternate triangulation. Ifit does, the swap is performed; otherwise the tri-angulation is unchanged. This technique offers adistinct advantage over others (Bowyer's or Wat-son's algorithm) in that it allows the use of anyarbitrary mesh quality measure.

Computational Aspects of 3-D Edge Swapping

Before proceding further, it is useful to dis-cuss the computational aspects of some of the op-erations needed for the edge swapping algorithm.• Determining Convexity: This operation testswhether the shape formed by the tetrahedron ljand T2 is convex. Let the vertices of the tetra-hedra be numbered lj = (1,2,3,4) and T2 =

(1,2,3,5) i.e., (1,2,3) is the face shared by Tand T2 and nodes 4 and 5 are at the two endsof 'lj and T2 respectively. We make use of thenotion of barycentric coordinates to perform theconvexity test. The b1,2,3,4 satisfying

1 1 1 1 1 lu 1X1 x2 x3 x4 b2 -

Y1 112 113 114 b3 -

Z1 Z2 Z3 Z4 b4

are called the barycentric coordinates of node 5.They indicate the position of 5 in relation to thenodes of tetrahedron 7j. For each s, the sign ofb3 indicates the position of 5 relative to the planeH. passing through the triangular face oppositenodes. Thus b3 = 0 when 5 is in H3 , b3 >0 when5 is on the same side of H3 as node s, and b3 <0when 5 is on the opposite side of H. from nodeS. Clearly, b1,2,3,4 > 0 if 5 lies inside tetrahedron(1,2,3,4). If we imagine a cone formed by planesH1 ,23 of T1 , then Yi and T2 would form a convexshape if and only if node 5 lies in the cone on theside opposite from node 4 (figure 3.30).

Figure 3.30 Convexity cone for node 4.

The conditions to satisfy this requirement are b4 <

0 and b1,2,3 > 0. In order to test if three cells forma convex shape, the nodes are renumbered as ifthe three cell configuration were edge swappedinto the corresponding two cell configuration forpurposes of the barycentric test. For example,consider a three cell configuration with number-ing (1,2,3,4), (2,3,4,5), and (1,2,4,5), then thecorresponding two cell configuration would have(1,3,5) as the common face and nodes 2, and 4at the ends of the two tetrahedra. Notice thatif the three tetrahedra formed a convex shape,then it would be possible to edge swap it to aconvex two tetrahedra configuration. If the threecells formed a concave shape, however, the trans-formed two cell triangulation would contain over-lapping tetrahedra which the test above wouldlabel as concave.

Using Cramer's rule to solve the Ax = bproblem posed above requires computing deter-minants of the form

1 1 1 1all a12 a13 a14

a21 a22 a23 a24

a31 a32 a33 a34

five times. An optimization is possible by exploit-ing the property of determinants that subtract-ing one row or column from another leaves thedeterminant unchanged. If we subtract the firstcolumn from the rest, we simplify the above 4x4

Page 26: SOLVERS FOR THE EULER AND NAVIER-STOKES EQUATIONS · plane, each region being the portion of the plane closer to some given point P of the set of points Mesh Median Dual CCJ,troid

6-26

determinant into a 3x3 one.

1 0 0 0all a12 - all a13 - a11 a14-aila21 a22 - a21 a23 - a21 a24 - a21a31 a32 - a31 a33 - a31 a34 - a31

a12 - a11 a 13 - a11 a14-ail= a22 - a21 a23 - a21 a24 - a21

a32 - a31 a33 - a31 a34 - a31

• Delaunay Circumsphere test: The 3-D Delau-nay triangulation is defined as the unique trian-gulation such that the circumsphere of any tetra-hedron contains no other point in the mesh. Todetermine where point El lies in relation to the cir-cumsphere of tetrahedron (A, B, C, D), denotedby(O ABCD), we use the InSphere primitive:

I<0 ifEisinsideOABCDInSphere(E) = 0 if El is on o ABCD

>0 ifEis outside 0 ABCD

where InSphere is computed from the followingdeterminant:InSphere(E)

1 1 1 1 1 1 1 1 1XA Xfi XC

XDXE XA XB XC XD1YA YB Yc

YD YE VA YB Yc YDz4 2B ZC ZD ZE ZA B ZC ZD

WA WB WC WD WE

XB — XA Xc — XA XD — XA XE — XA

= YB — VA YC — VA lID — lI,. YE — lI,.ZB — ZA ZCZA ZD — ZA ZEZA

WWA W IJ WA WWA

XB — XA XCXA XD—XA

YB-YA YC — YA YD—YAZBZA ZCZA ZDZA

and 4 = 4+ Y' +4The first determinant is the 3-D extension

of Guibas' InCircie primitive [1]. It representsthe volume of a pentatope whose vertices are thepoints A, B, C, D, El projected onto the 4-Dparaboloid (X2 + Y2 + z2 ). (A pentatope is thesimplest polytope in 4-D just as a tetrahedron isthe simplest polytope in 3-D and a triangle in 2-D. A pentatope can be constructed by joining thetetrahedron to a fifth point outside its 3-space.)The coordinates in 3-space of these five pointsremain unchanged; they simply acquire a valuein their fourth coordinate equal to the square oftheir distances from the origin. The volume ofthis polytope is positive if point El lies outside

o ABCD and negative if point El lies inside 0ABCD, provided that tetrahedron (A, B, C, D)has a positive volume (as given by the seconddeterminant). The determinant is degenerate ifpoint El lies exactly on o ABCD.

This test is motivated by the observation in3-D that the intersection of a cylinder and a unitparaboloid is an ellipse lying in a plane (figure3.31). So, any four co-circular points in 2-D willproject to four co-planar points and the volumeof the tetrahedra made from these four co-planarpoints will be zero. The paraboloid is a surfacethat is convex upward and the points interior toa circle get projected to the paraboloid below theintersection plane and the points exterior to itget projected above the the intersection plane.If a point lies outside the circumcircle of threeother points, the tetrahedron made from thesefour points will have positive volume provided thethree points were ordered in a counter-clockwisefashion. The volume will be negative if the pointlies inside the circumcircle.

Figure 3.31 Projection of cocircular points ontounit paraboloid.

The second determinant is the 3-D exten-sion of Guibas' CCW (counter clock-wise) prim-itive [1] which computes the volume of tetrahe-dron (A, B, C, D). Thus the InSphere primitiveworks irrespective of how the points A, B, C,and D are ordered. If it can be guaranteed thatall the tetrahedra in a mesh have their verticesordered to have positive volumes then the needto compute the second determinant is eliminated.The InSphere primitive becomes ill-behaved whenthe points A, B, C, and D all lie nearly on aplane because the position of the circumspherewith respect to the points (i.e., whether the cir-cumsphere is above or below the plane) becomesvery sensitive to small perturbations in the coor-dinates of the five points.

Page 27: SOLVERS FOR THE EULER AND NAVIER-STOKES EQUATIONS · plane, each region being the portion of the plane closer to some given point P of the set of points Mesh Median Dual CCJ,troid

6-27

3-D Mesh Optimization

The 3-D edge swapping algorithm can be usedto optimize existing triangulations. In fact, thereis no way to triangulate a given set of points basedon the minmax or maxmin of the face angles di-rectly. An alternative is to start with an existingtriangulation and optimize it. This requires thatwe cycle through all the faces in a mesh and applythe edge swapping procedure at each step. Thisprocess is continued until no more swaps are pos-sible.

Algorithm: Three-dimensional mesh optimiza-tion.while (swaps occurred in the last cycle over faces)

for all facesEDGE-SWAP (face)

endforendwhile

In the following paragraphs, we discuss a few swap-criteria and examine the meshes they produce.

Global Edge Swapping

The InSphere criteria is binary in the sensethat either the triangulation of a set of five pointssatisfies the criteria or it does not. It can also beshown that of the two ways to triangulate a set offive points, if one way falls the InSphere criteria,then the other one will pass and vice-versa. Cases1 and 3 in figure 3.15 and cases 1, 3, and 5 infigure 3.16 will always pass the InSphere criteria.

The Delaunay triangulation is unique for agiven set of points. Lawson also noticed the re-lation between local and global properties of theDelaunay InSphere criteria: a triangulation is De-launay if and only if the triangulations of sets offive points corresponding to all the interior facesin the mesh satisfy the InSphere criteria. Thismeans that if every lace satisfies the Delaunaycriteria, then the whole mesh must be a Delau-nay triangulation.

Joe [32] has proven, however, that process-ing faces in an arbitrary way may result in gettingstuck in local optima. This is an important dif-ference between two and three dimensional com-binatorial edge swapping.

3-D MinMax and MaxMin Triangulations

The edge swapping algorithm can be appliedlocally to produce a triangulation that minimizesthe maximum face angle. In 2-D, the edge swap-ping algorithm (working with edge angles) getsstuck in local minima and depending on the or-der in which the edges were traversed, differentlocal minima are reached. In practice, the local

minima all seem very close to the global mini-mum which makes edge swapping a practical wayto get a nearly optimal MinMax triangulation.We observe that in 3-D as well, there are manylocal minima and the order of face traversal deter-mines which one is found. It is hard to determinehow far these local minima are from the globalminimum but we believe that edge swapping isa practical way to get nearly optimal MinMaiemeshes.

Lawson has shown that in 2-D, Delaunay tri-angulations have the property that the minimumedge angle is maximized (i.e., MaxMin triangu-lation). So in 2-D, the MaxMin triangulation isunique and the edge swapping algorithm will con-verge to it. In 3-D, however, the Delaunay trian-gulation is not the same as MaxMin triangulationand the edge swapping algorithm working withthe MaxMin criteria has the same property of get-ting stuck in local minima as the MinMax. Again,it is hard to judge how close the local minima arefrom the global minimum but we still concludethat edge swapping is a fairly efficient techniquefor the construction of MaxMin triangulations.

S-D Minimum Edge Triangulation

Another mesh of interest is the minimumedge triangulation. Since finite-volume flow solverswork edge-wise, it is beneficial to reduce the num-ber of edges in a mesh. This is easily accom-plished by edge swapping such that we alwaysswap from case 3.29a to case 3.29b. Each timethis operation is performed, one edge and onetetrahedron are removed from the mesh. Again,different meshes will be produced depending uponhow faces are traversed and the final mesh mayonly be at a local minimum.

Incremental Delaunay Triangulation

The edge swapping algorithm provides an ef-fective way for inserting a point into an existingtriangulation. Simply find the tetrahedra intowhich the point is to be inserted and test its facesaccording to the circumsphere criteria to deter-mine if edge swapping should take place. If aset of 5 points corresponding to a face is retri-angulated, we proceed to test all the outer facesof the new triangulation for swappability and soon. This propagates a front that retriangulatesthe mesh. It is known that any new face createdduring the retriangulation is indeed a part of thefinal mesh as well, and so back-propagation is notrequired. This may not be true for other meshquality measures and back propagation then be-comes necessary.

Page 28: SOLVERS FOR THE EULER AND NAVIER-STOKES EQUATIONS · plane, each region being the portion of the plane closer to some given point P of the set of points Mesh Median Dual CCJ,troid

6-28

Rajan proves that it is possible to find a cer-tain sequence of edge swaps which will guaranteethat Delaunay triangulation is recovered when asite is added to an existing Delaunay triangula-tion. In practice, however, we find that this order-ing of edge swaps does not seem to be necessaryin order to recover the Delaunay triangulation.In fact, it is our conjecture that this is always thecase.

This insertion algorithm can be used to adap-tively refine meshes. To do this, sites are insertedat the centers of the circumspheres of tetrahedrawith large aspect ratios (or other suitable mea-sures). This insertion site does not always liewithin the cell 2', marked for refinement. To findthe cell in which the new site lies, a walking al-gorithm is employed. Starting at T, barycentricsare computed to determine which face of T thenew site lies behind. The next step is to traverseto the cell behind that face. This procedure is ap-plied recursively until the cell in which the newsite fails within is found. The idea of introduc-ing new sites at the centers of the circumspheresof tetrahedra works well because each new siteintroduced is equidistant to the 4 points of thelarge aspect ratio tetrahedra. This produces highquality meshes in 2-D and seems to work well in3-D.

3.6c 3-D Surface Triangulation

The Wiltberger algorithm has been extendedto include the triangulation of surface patches.Although the concept of Dirichlet tessellation iswell defined on a smooth manifolds using the con-cept of geodesic distance, in practice this is tooexpensive. Finding geodesic distance is a varia-tional problem that is not easily solved. We haveimplemented a simpler procedure in which surfacegrids in 3-D are constructed from rectangular sur-face patches (assumed at least CO smooth) usinga generalization of the 2-D Steiner triangulationscheme.

c-,5Figure 3.32 Mapping of rectangular patches on(s, t) plane.

Points are first placed on the perimeter of each

patch using an adaptive refinement strategy basedon absolute error and curvature measures. Thesurface patches are projected onto the plane, seefigure 3.32. Simple stretching of the rectangularpatches permits the user to produce preferentiallystretched meshes. (This is useful near the leadingedge of a wing for example.)

The triangulation takes place in the two di-mensional (s, t) plane. The triangulation is adap-tively refined using Steiner point insertion to min-imize the maximum user specified absolute errorand curvature tolerance on each patch. The ab-solute error is approximated by the perpendicu-lar distance from the triangle centroid (projectedback to 3-space) to the true surface as depicted infigure 3.33. The user can further refine based ontriangle aspect ratio in the (s, t) plane if desired.

\T2L a- ^

Figure 3.33 Calculation of triangulation abso-lute error by measurement of distance from facecentroid to true surface.

Figure 3.34 shows a typical adaptive surface gridgenerated using the Steiner triangulation method.

Figure 3.34 Adaptive Steiner triangulation ofsurface mesh about Boeing 737 with flaps de-ployed.

Page 29: SOLVERS FOR THE EULER AND NAVIER-STOKES EQUATIONS · plane, each region being the portion of the plane closer to some given point P of the set of points Mesh Median Dual CCJ,troid

6-29

4.0 Some Theory Related toFinite-Volume Solvers

4.1 Scalar Conservation Law Equations

For purposes of these notes, we consider nu-merical methods for solving conservation law equa-tions.

Definition: A conservation law asserts that therate of change of the total amount of a substancewith density z in a fixed region 0 is equal to theflux F of the substance through the boundary 80.

(integral form)

The choice of a numerical algorithm used tosolve a conservation law equation is often influ-enced by the form in which the conservation law ispresented. A finite-difference practitioner wouldapply the divergence theorem to the integral formand let the area of 0 shrink to zero thus obtainingthe divergence form of the equation.

09 z + V . F(z) = 0 (divergence form)

The finite-element practitioner constructs the di-vergence form then multiplies by an arbitrary testfunction 0 and integrates by parts.

Yt iØz da—j V . F(z) da+j F(z) . n dl = 0

n(weak form)

Algorithm developers starting from these threeforms can produce seemingly different numericalschemes. In reality, the final discretizations areusually very similar. Some differences do appearin the handling of boundary conditions, solutiondiscontinuities, and nonlinearities. When consid-ering flows with discontinuities, the integral formappears advantageous since conservation of fluxescomes for free and the proper jump conditions areassured. At discontinuities, the divergence formof the equations implies satisfaction in the senseof distribution theory. Consequently, at disconti-nuities special care is needed to construct finitedifference schemes which produce physically rel-evant solutions. Because the test functions havecompact support, the weak form of the equationsalso guarantees satisfaction of the jump condi-tions over the extent of the support. The di-vergence form of the equations is rarely used inthe disçretization of conservation law equationson unstructured meshes because of the difficultyin ensuring conservation. On the other hand, theintegral and weak forms are both used extensively

in numerical modeling of conservation laws on un-structured meshes. In the next section, the sim-plest of numerical schemes based on integral andweak forms of the conservation law are comparedto illustrate their similarities. These schemes canbe viewed as the "central-difference" counterpartson unstructured grids. For advection dominatedflows, these algorithms are inadequate and addi-tional terms must be added. This topic is under-taken in detail in future sections.

4.2 Comparison of Finite-Volume and GalerkinFinite-Element Methods

Although the integral and weak forms of theequations appear to be quite different, numericalschemes based on these forms often produce iden-tical discretizations. To demonstrate this point,consider the Galerkin discretization (with linearelements) of a general model advection-diffusionequation (/2 > 0):

V . F(z) = V . pVz

Multiplying by a test function 0 and integratingby parts over the region 0 produces the weakform of the equation.

. j Øz do— f VØ F(z) da +jø F(z) . n dl

at

= - f pV4 Vz d +f,, pcbVz n dl

(4.0)In the finite-element method, the entire domainis first divided into smaller elements. In this case,the elements are triangles Ti , such that 0 = UT1,7)nT1 =ø, 1j.InFig.4.1aweshowarep-resentative vertex with adjacent neighbors. (Tosimplify the discussion in the remainder of thesenotes, we adopt the convention that the index'J" refers to a global index of a mesh whereasthe index "i" always refers to a local index.) Thelinear variation of the solution in each triangle Tcan be expressed in terms of the three local nodalvalues of the solution, 4, i = 1, 2,3, and threeelement shape functions n1, i = 1,2,3.

zh(x,y) =n1(x,y) 41

(local representation)Each element shape function it1 can be interpretedas a piecewise linear surface which takes on a unitvalue at v1 and vanishes at the other two verticesof the triangle as well as everywhere outside thetriangle. The solution can also be expressed glob-ally in terms of nodal values of the solution and

Page 30: SOLVERS FOR THE EULER AND NAVIER-STOKES EQUATIONS · plane, each region being the portion of the plane closer to some given point P of the set of points Mesh Median Dual CCJ,troid

6-30

global shape functions.

z"(x,y) = E N(x,y) 4nodes

(global representation)In this form, the global shape functions are piece-wise linear pyramids which are formed from theunion of all local shape functions with have unitvalue at v j . These global shape functions also en-joy compact support, i.e. they vanish outside theregion 12, formed from the union of all trianglesincident to v5 . A global shape function for vertexv j is shown in Fig. 4.1b.

6

Mesh

5' 0 Median Dual

Figure 4.1a Local mesh with centroid and me-than duals.

33

Figure 4.1b Global shape function for vertex v0

(not labeled).

The Galerkin finite-element method assumesthat the class of test functions is identical to theclass of functions approximating the solution. Thesimplest test functions of this sort are the in-dividual shape functions. To obtain a Galerkindiscretization for a typical vertex vj, simply set

= N5 and evaluate (4.0) in 125 . Since 0 van-ishes on i9Qj equation (4.0) simplifies to the fol-lowing form:

!. [ Ohzh da_J Vçb".F(z")daat

(4.1)= —Vz d

ni

Before evaluating equation (4.1), it is useful tointroduce more notation concerning the geometryof figure 4.1a. Figure 4.2 depicts the index andnormal convention which will be used throughoutthese notes. The triangle with vertices 0, i, andi + 1 is denoted as T1+i,2. This index conventionwill be used for other quantities such as areas andgradients which are computed in Ti+112.

rli.m

'-I

Figure 4.2 Vertex v0 and adjacent neighbors.

It is convenient to define normals, ii, for straightedges which are scaled by the length of the edge.Using this notation, a simple formula exists forthe gradient of the numerical solution in a triangle

1/2.

= —1

FA, +1/2 (4ñ+ l/2 + 4i111 -

(4.2)The gradient of the test function in each trian-gle takes a similar form (replace z by 0 in theprevious formula with Oo = 1, .jj = 0, .j = 0).

= —1(4.3)2 i+1/2

The discrete form of eqn. (4.0) is now written as

OZ da+ . da

d(vo) -

Ei+'/2 I h doL fl A •i pVz1=1 £fi+l/2 JT+,

(4.4)The flux integral can be evaluated by exact inte-gration (when possible) or numerical quadrature.In this case, the latter is assumed.

fF(?) da = AIi/2 (F(4) + F(z,) + F(z,ç1))

(4.5)The diffusion term is also evaluated with Vz"constant in Tj+1/2 and 01+1/2 the area weightedaverage p.

JpV?da = AI+1/2 p11/2V4 1/2 (4.6)

Page 31: SOLVERS FOR THE EULER AND NAVIER-STOKES EQUATIONS · plane, each region being the portion of the plane closer to some given point P of the set of points Mesh Median Dual CCJ,troid

6-31

This simplifies (4.0) considerably.

-J 0Z h doat

J.

d(vo)

+> (F (z) + F ( zt) + F(z1))

d(vo)

=212+1p 111+1/2

(4.7)Equation (4.7) represents a Galerkin discretiza-tion of the model equation assuming piecewiselinear functions. Note that as far as the geom-etry is concerned, only the exterior normals ofQj appear. Conspicuously absent are the normalvectors for interior edges. This strengthens ourconfidence that we can show an equivalence witha finite-volume discretization on nonoverlappingcontrol volumes. To show this equivalence, notethat the flux term can be manipulated using theidentity i+1/2 = 0 into a form in whichthe relevant geometry is any path connecting ad-jacent triangle centroids (R denotes the spatialposition vector):

d(vo)

> X1I+1/2 (F(4') + F(4') +1=1

d(vo)

= (F(4) + F(z,)) . (11 1 + 1 /2 + fli-1/2)1=1

d(vo)

=> (F(z)+F(z)). I ndl1=1 fRI_I

d(vo)

=> (F(z)+F(z,?)). mdl

(4.8)The diffusion term also simplifies using this iden-tity.

d(vo)

11i+1/2

d(vo)

=h0+1 n dl

(4.9)To obtain a single consistent path for the inte-grations appearing in equations(4.8) and (4.9) re-quires that the path pass through the centroidof each triangle and the mid-side of each inte-rior edge. The path formed by connecting thesepoints by line segments is precisely the mediandual of the mesh. This dual completely covers

the domain (no holes) and represents a consis-tent and conservative finite-volume discretizationof the domain which is spatially equivalent to theGalerkin approximation. The scheme can now bewritten in a finite-volume form

d(vo)da + > (H . 1i) = 0 (4.10)

1=1

where H is the numerical flux of the finite-volumediscretization

/2

(H . il) =(F(z) + F(z)) . fl+

1mdlJa_'/3R7

— P1_l/2V1_l/2Z J n dl1-1/3

— /AI+l/2V1+l/2?. ( n dl'

(4.11)and R+1/2 is the centroid of TI+1/2, R + 1i2 =i (Ro + R + R11 ) and R7' is the midpoint ofthe edge e(vo, v1 ), R" = k(Ro + R).

Conclusion: The spatial discretization producedby the Galerkin finite-element scheme with lin-ear elements has an equivalent finite-volume dis-cretization on nonoverlapping control volumes withbounding curves which pass through the centroidof triangles and midside of edges. One such setof control volumes satisfying these constraints isthe median dual.

We now need to ask if the time integrals pro-duce identical "mass" matrices for the Galerkinfinite-element and finite-volume schemes. Theanswer to this question is no. In fact, these ma-trices are not the same in one space dimension.The Galerkin mass matrix for a simple 1-D meshwith uniform spacing produces a row of the massmatrix with the following weights:

hh 1

in 0 z dx = Ax(z_ i + 4z + zi)

at 6(Finite — Element)

The finite volume scheme on "median" dual pro-duces the following weights:

in, z dx = ô j x

1(zj i + 6z + z+i)

(Finite — Volume)Although the finite-volume matrix gives bettertemporal stability, the finite-element mass matrixis more accurate.

Page 32: SOLVERS FOR THE EULER AND NAVIER-STOKES EQUATIONS · plane, each region being the portion of the plane closer to some given point P of the set of points Mesh Median Dual CCJ,troid

6-32

4.3 Edge Formulas

The first term appearing on the right-hand-side of equation (4.10)

I ndlJa'

1-1/2

suggests a computer implementation using an edgedata structure. The fluxes in this term are eval-uated at the two endpoints of an edge. The geo-metrical terms could be evaluated edgewise if themidpoint of the edge and the centroids of the twoadjacent cells are known. Recall that the edgedata structure (described in section 1.3) for a 2-D mesh supplies this information for each interioredge of the mesh, i.e. the structure provides foreach edge

(1) The two vertices which form the edge.

(2) The two adjacent cell centroids (or a pointerto centroid values) which share the edge.

More generally, if the solution is assumed to varylinearly within each triangle then edge formulascan be derived for discretized forms of the gra-dient, divergence, Hessian, and Laplacian oper-ators. As we will see, the formulas can be de-rived from either a finite-volume or finite-elementpoint-of-view with essentially identical results.

4.3a Gradient and Divergence Edge Formulas

As a first example, we will derive an edgeformula for the integral averaged gradient of afunction u, f Vu da, for the the region ho de-scribed by the union of all triangles which sharethe vertex v0 , see figure 4.1a. If the discrete solu-tion u' varies linearly in each triangle T then thegradient is constant and the integration exact.

JVu 1' do= (Vu' ) TAT (4.12)

00 TEN

Equation (4.12) would suggest computing the gra-dient in each triangle sharing vo and accumulat-ing the area weighted sum. If integral averagedgradients are required at all vertices then the gra-dient in each triangle could be computed and thearea weighted result scattered to the three ver-tices of the triangle for accumulation. We re-fer to this as the element-by-element approach.A Green's formula would suggest a different ap-proach for the same task.

J0Vuda=j undl (4.13)

0 800

Identical results are obtained by approximatingthe right-hand-side of (4.13) by trapezoidal quadra-ture (exact for piecewise linear u")

( (4.14)80 iEIo

where To = {1,2,...,6} and nj.. 112 is the vectorperpendicular to the edge e(v 1 , v1+,) with magni-tude equal to the length of the edge. The sum-mation can be rearranged to yield

11'.•5 u 1' ndl = > u1 (n1+ 112 +fl 1 _ 112 ). (4.15)800 lElo

A constant solution can be added to (4.15) sincethe gradient of a constant function is exactly zeroin this discretization. In particular, we add thevalue of u' at vertex v0.

n dl = > (u + u')(ii1112 + ij1I2)ano t€Io

(4.16)Once again using the fact that for any closedcurve fn dl = 5 d = 0 which implies that

,v1+1

g 112 + fl_112 = j dElV1 - I

for any path connecting v_ 1 and v1 . . 1 . This pathintegral represents a vector which is parallel in di-rection and three times the magnitude of the vec-tor ii obtained by computing the integral for anysimple path connecting the centroids of the twotriangles which share the edge e(va, vi).'f,'1 dEl =3 vil dEl = 3501 . This reduces the gradient for-mula to the following form:

80I u" ndl= >(t4+ u ') iio1 (4.17)

The vertex lumped average gradient at vertex isthen given by

(Vu"),,. = 3

r- >(u + u')1101 . (4.18)

€Io

It is well known that the region bounded by the"median" dual at vertex v0 , (shown in figure 4. la)has an area A0 which is exactly f A0,,. Therefore,using the median dual we obtain a formula whichappears to represent some approximate quadra-ture of the right-hand-side of (4.13) on nonover-lapping regions.

1(Vu"),,. = >(u + u') (4.19)no

iEIo

Page 33: SOLVERS FOR THE EULER AND NAVIER-STOKES EQUATIONS · plane, each region being the portion of the plane closer to some given point P of the set of points Mesh Median Dual CCJ,troid

6-33

A naive interpretation of equation (4.19) wouldprobably conclude that this equation is a ratherpoor approximation to (4.13). It is not obviousfrom (4.19) that the gradient of a linear func-tion is is computed exactly. From the origin ofthis formula, we now know that this formula canbe obtained from a trapezoidal quadrature on aslightly larger region and is exact within the classof linear polynomials.

Keep in mind that a constant solution couldhave been subtracted instead of added from equa-tion (4.15) which would have given a different butequivalent form of (4.19).

= AY - t4)ii (4.20)o

jETo

This formula does not appear to resemble anyapproximate quadrature of (4.13).

Equation (4.19) suggests an algorithm usingan edge data structure which is quite differentfrom the element-by-element method (4.12). Theedge-based calculation consists of the followingsteps:

Sample Gradient Computation

(1) (Precomputation) For each edge e(v1 , v) gatherthe centroid coordinates of the two adjacent cells,v and v.

(2) (Precomputation) For each edge compute thedual edge normal ii,, from the centroid coordi-

nates 11,, = f,2 dfl. (Orient from v 1 to v j ifi<j).

(3) For each edge e(v1 , vj ) gather the values of thefunction at the two vertices, u' and

(4) For each edge compute the arithmetic averageand multiply by the dual edge normal, 1(u1 +u ) n,.

(5) For each edge scatter and accumulate the re-sult at vertex v1.

(6) For each edge negate, scatter and accumulatethe same result at vertex vj.

(7) For each vertex compute the final gradient bydividing the accumulated result by area of themedian dual, A0.

This algorithm conforms perfectly within the edgedata structure. In practice all the geometrical fac-tors could be precomputed and stored in memoryby edge thereby eliminating a gather. The samplealgorithm described above serves as a templatefor all the remaining algorithms described in therest of this section.

The gradient and divergence operators arerelated so that it is not surprising that the dis-cretization of the divergence operator produces asimilar formula:

[ div(F Z )da = > (F + F) . z1 (4.21)

Jno iEIo

The Galerkin weighted finite element integrals withlinear elements produce essentially identical re-sults. In this case a piecewise linear weightingfunction Ø' is introduced (see figure 4.1b). Thegradient and divergence formulas (introduced ear-lier)

[ h Vu"da = > (u + u)floi (4.22)J lEro

J

csh div(Fh )da = (F+F).11o1 (4.23)no ja0

differ from the previous formulas by a constantfactor of 1/3. For example, if a lumped approxi-mation to the left-hand-side of (4.22) is assumed,then (4.19) is recovered since

IUD

cshVuhda (Vu") 0 Ao. (4.24)

4.3b 2-D Hessian and Laulacian Ed ge Formulas

We begin by approximating the following ma-trix of second derivatives

Vp(Vu)T - I( ittiz ) z (Pt5y)rl

- Li,Ut (pu)j (4.25)

using a standard Galerkin approximation for theregion Qo formed from the union of all trianglesthat share the vertex v0 . To do so, multiply (4.25)by the weight function 4 and perform integrationby parts over 0o assuming 0 = 0 on O1?o.

In0 ØVp(Vu) T da

= - j p(VØ) (Vu)Tda

=- p(VØ) (Vu)TdaiEIo Te+i,,

(4.26)where E simplex(vo,v 1 ,v 1+ 1 ). Using thenotation of figure 4.2, gradients of the piecewiselinear functions cb" (figure 4.1b) and u' are

1 __"i= - 2A1112112 (4.27)

Page 34: SOLVERS FOR THE EULER AND NAVIER-STOKES EQUATIONS · plane, each region being the portion of the plane closer to some given point P of the set of points Mesh Median Dual CCJ,troid

6-34

and

(Vu11)p1+112 = A (uii1+i,2+uiij+i—t4ifi1)

1+1/2(4.28)

where A1+1,2 is the area of T1+1,2 and 111+1/2is the vector normal to the edge e(v, vj+1) withmagnitude equal to the length of the edge.

For piecewise linear u', the gradient is con-stant in each triangle. The integral average ma-trix of second derivatives simplifies to the follow-ing form:

Jhv p( Vu&)T da

_2Al+l/2 hut+hh/2 I p(Vu''da

=.nIi/2(Vzz') 1pda

+1/3 1

=E Pi+1/2...(vh)T

iEIo

(4.29)where 71i+i/2 is the integral average of ju in T1+1 /2 -Inserting the triangle gradient formula, we obtaina discretized formula for the Galerkin integral.

J hv(vuh)T do

1 !1+1/2 ii h.T= --A nl+l/2(uonl+l/2

erh-T+ U1 n11 -

(4.30)Regrouping terms and removal of a constant so-lution yields the following simplified form

L hvp(vuh)T da =f Vp(V(u" - t4))T

=EMi(u_t4)i€ro

(4.31)with

Alf .1 [ Pi+ i /2._ -. T

- -- L

111+1/2(111+')Ai+l/2

(4.32)Pi-1/2

- U.(fl)TJ

A1_112

Even though this formula is very simple, it isnot compatible with the edge data structure men-tioned earlier. Using some simple identities, wewill now rewrite the weight formula in a formwhich is compatible with the edge data structure.

1+1

i+I

I-I

Figure 4.3 Local geometry configuration.

Referring to figure 4.3, we have the following vec-tor identities:

= 3ilR4 - jii ni_i = 3 R +(433)

and similarly

ni+1/2 = ML, + 2

ni , i+1 = —3' +

(4.34)It is useful to decompose the tensor product termsinto symmetric and skew-symmetric parts, for ex-ample:

_illi/2(iijl)T=(_illiiT_ 9RC)

Symmetric

+ (ninR — flRfl)

Skew—symmetric

and

n1+j ,2 (n11 ) '1' = (n,ilT— 9IILIILT)

Symmetric

+( 1 iif— ULI1T)

Skew-symmetric

Upon dividing by the area terms, some simplealgebra reveals that

=(9liR1il3, -)TI ñ1ñT) o iA1 _ 112 A1_112 j—i 0

(4.35)and similarly

- (n1 iq' _9ilLflf.) [0

U-(4.36)

-n i.1

Page 35: SOLVERS FOR THE EULER AND NAVIER-STOKES EQUATIONS · plane, each region being the portion of the plane closer to some given point P of the set of points Mesh Median Dual CCJ,troid

6-35

So in summary we have that

Lvi,-- — IvPi+1/2 fl- i+i/2 ()TLAI+v2

P1-1/2- Atti_i/2

1 [T'IT-9LflL

=+i/ - (4.37)

- - 9ilRfli,A

1ii+(riI+l/2 -Pi-i12) L

0 ill ojjThe second form is compatible with an edge datastructure where edge vertices and adjacent cellcentroids are known.

4.3c 2-D Ed ge Discretization of V . uVu

Calculation of this term amounts to sum-ming diagonal entries of the previous result. Can-cellation of terms leaves a reduced form.

Lo ohV - pVu' d =Trace j 4itVp(Vu1)T

=)JW1(t4'-t4)lET,

(4.38)1 111+1/2 i+i

= - P+i AI1/2(4.39)

+ni_i]

Pi.i/2

The area of a triangle can be expressed in terms ofthe magnitude of the cross product of the scalededge normals.

1_ -.AI+1/2 = l nl+i/2 )< fli+iI

Al_1/2 = 1l11i_1/2 )<

-.1= - ' II+i/2 X

ftj+i,(4.40)

(i-1/2 .-i)- P1-1/2 lI-1/2 X fl1_1

• iJ

Finally we can express the dot and cross productsin terms of the local angles as sketched in figure4.4.

1-1

Figure 4.4 Local angles for triangles sharing edgee(vo, v1).

= cos(cxL1) = -cotan(aL.)l ni+1i2 x sin (aL1)

(4.41)and

fl1_i/2 • fl11 cos(aft1)- = - = -cotan(aRj111i_1/2 )( n1-11 sin

(4.42)Inserting these formulas yields a particularly sim-ple form of the weight factors W1:

WI = [1iI+l/2cotan@L +Pi_i/2cotan(aJt1)](4.43)

Equation (4.43) is particularly useful in theoreti-cal studies.

4.3d 3-D Hessian and Laplacian Edge Formulas

As in the 2-D case, we begin with the Galerkinintegral equation for the Hessian-like matrix ofderivatives.

JrTth _jp(Vcbh)(Vu)Tdv

In this formula Vr is the volume formed by theunion of all tetrahedra that share vertex v0 . Fol-lowing a procedure identical to the 2-D case, wecan derive the analogous 3-D edge formula for thematrix of second derivatives

Ihvp(vuh)Tdv = E M1 (u1 - no) (4.44)

Vr,

where

d(vo,vg) -

M, Pk+i/2.. -q T (4.45)= -- 5k+1/2(k+1/2) k=i

i-1

Page 36: SOLVERS FOR THE EULER AND NAVIER-STOKES EQUATIONS · plane, each region being the portion of the plane closer to some given point P of the set of points Mesh Median Dual CCJ,troid

6-36

To is the set of indices of all adjacent neighbors oftiç connected by incident edges, k a local cyclic in-dex describing the associated vertices which forma polygon of degree d(vo, v1 ) surrounding the edgee(vo, v 1 ). The subscript k + 1/2 indicates quanti-ties associated with the tetrahedron with verticesVo, Vi, Vk and vk+1 as shown in figure 4.5.

Figure 4.5 Set of tetrahedra sharing edge e(vo, v1)with local cyclic index k.

4.3e 3-D Edge Discretization of V pVu

Following the same procedure as in 2-1), weobtain:

fro Øhv - pVu" d = Trace fro Øhvp(vuh)Tdv

= W1(u1—uo)iEIo

(4.46)where

d(vo,vj) -P+iI. -q

Wi = --

8k+1/2 '441/2 (4.47)k=1

It can be shown that the volume of a tetrahedronis given by

= 2 14+112xc+1121(448)

where ILRk+ 1 /2 is the length of the edge sharedby the faces associated with 4+1/2 and

d(vo,v)1

Pk+1/2IMh+1/2IIg5k+1/2 . g,I

k=1(4.49)

Finally we can rewrite the dot and cross productin terms of the cotangent of the face angle.

9k+1/2 4+1/2 - - cos(ak+1,2)- sin(ak+lp)

= - cotan(&k+1,2)

As in the 2-D case, the weights W, now have aparticularly simple form:

v0 ,v)WI = > pk+1I2IARk+I,2lcotan(ak+l,2)

k= 1(4.50)

4.4 Godunov Finite-Volume Schemes

In this section, we consider upwind algorithmsfor scalar hyperbolic equations. In particular,we concentrate on upwind schemes based on Go-dunov's method [34] and defer the discussion of"upwind" schemes based on the fluctuation de-composition method or the Petrov-Galerkin for-mulation (SUPG, GLS) to the lectures of Profs.Deconinck, Hughes, and Johnson.

The development presented here follows manyof the ideas developed previously for structuredmeshes. For example, in the extension of Go-dunov's scheme to second order accuracy in onespace dimension, van Leer [35] developed an ad-vection scheme based on the reconstruction of dis-continuous piecewise linear distributions togetherwith Lagrangian hydrodynamics. Soon thereafter,Colella and Woodward [36] and Woodward andColella [37] further extended these ideas to in-clude discontinuous piecewise parabolic approx-imations with Eulerian or Lagrangian hydrody-namics. Harten et. al. [38,39] later extendedrelated schemes to arbitrary order and clarifiedthe entire process. These techniques have beenapplied to structured meshes in multiple space di-mensions by applying one-dimensional-like schemesalong individual coordinate lines. This has provento be a highly successful approximation but doesnot directly extend to unstructured meshes. Inreference [40], we proposed a scheme for multi-dimensional reconstruction on unstructured meshesusing discontinuous piecewise linear distributionsof the solution in each control volume. Mono-tonicity of the reconstruction was enforced usinga limiting procedure similar to that proposed byvan Leer [35] for structured grids. In a later pa-per (Barth and Frederickson [41]), we developednumerical schemes for unstructured meshes utiliz-ing a reconstruction algorithm of arbitrary order.Portions of the discussion presented here is takenfrom these papers.

Page 37: SOLVERS FOR THE EULER AND NAVIER-STOKES EQUATIONS · plane, each region being the portion of the plane closer to some given point P of the set of points Mesh Median Dual CCJ,troid

6-37

4.4a Generalized Godunov Scheme

We begin by considering the integral con-servation law for some domain, U and its tes-sellation T(U) comprised of cells, c j , U = Uc1,Ckflcj = 0, k 0 j. The integral equation is validfor the entire domain U as well as in each cell (orpossibly dual cell):

F(u)-ndl=O (4.51a)it

cjSc1

Fundamental to Codunov's method is the cell av-erage of the solution, U, in each celL

JCj

it da =ffjAj (4.52)

In Godunov's method and the higher order ac-curate extension considered here, these cell av-erages are treated as the fundamental unknowns(degrees of freedom).

at + [ F(u) . ndl = 0 (4.51b)J Sc1

The solution algorithm for (4.51b) is a relativelystandard procedure for extensions of Godunov'sscheme in Eulerian coordinates [34-39]. The ba-sic idea is to start with piecewise constant data ineach cell with value equal to the integral cell aver-age. Using information from cell averages, k - thorder piecewise polynomials are reconstructed:

u"(x, y) = E cX(m,n)P(m,n)(X - xc, Y - Ye)rn+n<k

(4.53)where P( m,n ) (x - c, Y - Ye) = (x - x)m(y - Ye)"and (xe, Ye) is the cell centroid. The process ofreconstruction amounts to finding the polynomialcoefficients, &(m,n). Near steep gradients and dis-continuities, these polynomial coefficients maybealtered based on monotonicity arguments. Be-cause the reconstructed polynomials vary discon-tinuously from cell to cell, a unique value of thesolution does not exist at cell interfaces. Thisnonuniqueness is resolved via exact or approxi-mate solutions of the Riemann problem. In prac-tice, this is accomplished by supplanting the trueflux function in (4.51) with a numerical flux func-tion (described below) which produces a singleunique flux given two solution states. Once theflux integral in (4.51) is carried out (either ex-actly or by numerical quadrature), the cell aver-age of the solution can be evolved in time. Inmost cases, standard techniques for integrating

ODE equations are used for the time evolution,i.e. Euler implicit, Euler explicit, Runge-Kutta.The result of the evolution process is a new col-lection of cell averages. The process can then berepeated. The process can be summarized in thefollowing steps:

(1) Reconstruction in Each Cell: Given inte-gral cell averages in all cells, reconstruct piecewisepolynomial coefficients (m,n) for use in equa-tion (4.51). For solutions containing disconti-nuities and/or steep gradients, monotonicity en-forcement may be required.

(2) Flux Evaluation on Each Edge: Considereach cell boundary, 3c, to be a collection of edges(or dual edges) from the mesh. Along each edge(or dual edge), perform a high order accurate fluxquadrature.

(3) Evolution in Each Cell: Collect flux con-tributions in each cell and evolve in time usingany time stepping scheme, i.e., Euler explicit, Eu-ler implicit, Runge-Kutta, etc. The result of thisprocess is once again cell averages.

By far, the most difficult of these steps isthe polynomial reconstruction given cell averages.In the following paragraphs, we describe designcriteria for a general reconstruction operator.

Reconstruction

The reconstruction operator serves as a finite-dimensional (possibly pseudo) inverse of the cell-averaging operator A whose j-th component A,computes the cell average of the solution in c,.

Uj = A,u = 1 J u(x, Y) do (4.54)ai

In addition, we place the following additional re-quirements:

(1) Conservation of the mean: Simply stated,given cell averages U, we require that all poly-nomial reconstructions ui" have the correct cellaverage.

if it"' = RkU then U= Aug"

This means that R is a right inverse of the av-eraging operator A.

AR = 1 (4.55)

Conservation of the mean has an important impli-cation. Unlike finite-element schemes, Godunovschemes have a diagonal mass matrix.

Page 38: SOLVERS FOR THE EULER AND NAVIER-STOKES EQUATIONS · plane, each region being the portion of the plane closer to some given point P of the set of points Mesh Median Dual CCJ,troid

6-38

(2) k-exactness: We say that a reconstructionoperator k is k-exact if RICA reconstructs poly-nomials of degree k or less exactly.

if uE'Pk and ii=Au, then u1"=R1'z=u

In other words, RIC is a left-inverse of A restrictedto the space of polynomials of degree at most k.

akA = I (4.56)

This insures that exact solutions contained in Pkare in fact solutions of the discrete equations. Forsufficiently smooth solutions, the property of k-exactness also issures that when piecewise poly-nomials are evaluated at cell boundaries, the dif-ference between solution states diminishes withincreasing k at a rate proportional to h'" wereIi is a maximum diameter of the two cells. Figure4.6a shows a global quartic polynomial u € P4which has been averaged in each interval.

Figure 4.6a Cell averaging of quartic polyno-mial.

Figure 4.6b shows a quadratic reconstruction uk e

22 given the cell averages. Close inspection offigure 4.6b reveals small jumps in the piecewisepolynomials at interval boundaries. These jumpswould decrease even more for cubics and vanishaltogether for quartic reconstruction. Property(1) requires that the area under each piecewisepolynomial is exactly equal to the cell average.

Figure 4.6b Piecewise quadratic reconstruction.

Flux Evaluation

The task here is to evaluate the flux integralappearing in (4.51).

JF(u) . ndl (4.57)

ati

At cell interfaces, two distinct values of the so-lution can be obtained anywhere on the bound-ary of the control volume by direct evaluation ofthe piecewise polynomials in the two cells sharingthe interface. For brevity, the states will be de-noted by u+ and C which should be interpretedas (u')+ and (uk)_ where ± refers to which piece-wise polynomial was used in the evaluation. Ratherthan use a numerical flux function derived fromthe exact solution of the Riemann problem, weprefer numerical flux functions based on meanvalue linearizations. As we will see, this actu-ally makes certain stability proofs much clearer.Define f(u, n) = F(u) . n and a(u, n) = f(u, n)',the mean value flux function is given by

h(u,C,n)=(f(u,n)+f(tr,n))

1 (4.58)-Ia (u , n)I (u —C)

where f(u) - 1(C) = a(u,n)(u - C) andü = Otr+(1-8)u for some GE [0,1]. Using thenumerical flux function, we approximate (4.57) by

J8c1

In practice, this flux integral is never evaluatedexactly, except when the data is piecewise con-stant. When piecewise linear functions are used, amidpoint quadrature formula is usually employed.This is used rather than the slightly more accu-rate trapezoidal quadrature because it requiresonly one flux evaluation per edge segment while

Page 39: SOLVERS FOR THE EULER AND NAVIER-STOKES EQUATIONS · plane, each region being the portion of the plane closer to some given point P of the set of points Mesh Median Dual CCJ,troid

6-39

the trapezoidal quadrature requires two. Whenconsidering schemes with reconstruction order kgreater than one, we suggest in [41] that Gaussquadrature formulas be used. Recall that N pointGauss quadrature formulas integrate 2N— 1 poly-nomials exactly. These quadrature formulas givethe highest accuracy for the lowest number offunction evaluations. For the k-exact reconstruc-tion discussed below, N > (k + 1 ) 12 point Gaussquadrature formulas are used.

4.5 k-exact Reconstruction

In this section, a brief account is given ofthe reconstruction scheme presented in Barth andFrederickson [41] for arbitrary order reconstruc-tion. Upon first inspection, the use of high orderreconstruction appears to be an expensive propo-sition. The present reconstruction strategy opti-mizes the efficiency of the reconstruction by pre-computing as a one time preprocessing step theset of weights W3 in each cell c j with neighborset .,V, such that

a( rn,n ) = W(mn)IUI (4.59)

where U(m,n) are the polynomial coefficients. Thiseffectively reduces the problem of reconstructionto multiplication of predetermined weights andcell averages to obtain polynomial coefficients.

During the preprocessing to obtain the re-construction weights Wj a coordinate system withorigin at the centroid of c3 is assumed to min-imize roundoff errors. To insure that the recon-struction is invariant to aifine transformations, wethen temporarily transform (rotate and scale) toanother coordinate system (, y) which is normal-ized to the cell c,

[] - [ D11 Dj,21 fxD2,1 D2,2 j j.y

with the matrix D is chosen so that

A (72 ) = A (V2 ) = 1

Ai(Yy) = Ai(V) = 0

Polynomials on c3 are temporarily representedusing the polynomial basis functions

r=

Note that polynomials in this system are easilytransformed to the standard cell-centroid basis

Since 0 < s + t < k and 0 < m+n—s—t < k, wecan reorder and rewrite in terms of the standardand transformed basis polynomials

.P(mn) = (4.60)

Satisfaction of conservation of the mean is guar-anteed by introducing into the transformed coor-dinate system zero mean basis polynomials P° inwhich all but the first have zero cell average, i.e

---2 ---2 —3P = [1,x,y,x - 1,xy,y - 1,x - A(x-3 ),...].Note that using these polynomials requires a mi-nor modification of (4.60) but retains the sameform:

(m,n) = E (4.61)a+t<k

Given this preparatory work, we are now readyto describe the formulation of the reconstructionalgorithm.

Minimum Energy (Least-Squares) Reconstruction

We note that the set of cell neighborsmust contain at least (k + 1)(k + 2 ) 12 cells c, ifthe reconstruction operator R' is to be k-exact.That (k + 1)(k + 2)/2 cells is not sufficient in allsituations is easily observed. If, for example, thecell-centers all lie on a single straight line one canfind a linear function it such that A1 (u) = 0 forevery cell c1 , which means that reconstruction ofu is impossible. In other cases a k-exact recon-struction operator Rk may exist, but due to thegeometry may be poorly conditioned.

Our approach is to work with a slightly largersupport containing more than the minimum num-ber of cells. In this case the operator R4' is likelyto be nonunique, because various subsets wouldbe able to support reconstruction operators of de-gree k. Although all would reproduce a polyno-mial of degree k exactly, if we disregard round-off, they would differ in their treatment of non-polynomials, or of polynomials of degree higherthan k. Any k-exact reconstruction operator Ris a weighted average of these basic ones. Our ap-proach is to choose the one of minimum Frobeniusnorm. This operator is optimal, in a certain sense,when the function we are reconstructing is not ex-actly a polynomial of degree k, but one that hasbeen perturbed by the addition of Gaussian noise,for it minimizes the expected deviation from theunperturbed polynomial in a certain rather nat-ural norm.

struction preprocessing algorithm, the reader is> (T'I (') As we begin the formulation of the recon-

Page 40: SOLVERS FOR THE EULER AND NAVIER-STOKES EQUATIONS · plane, each region being the portion of the plane closer to some given point P of the set of points Mesh Median Dual CCJ,troid

6-40

reminded that the task at hand is to calculate theweights W j for each cell c j which when appliedvia (4.59) produce piecewise polynomial approx-imations. We begin by first rewriting the piece-wise polynomial (4.53) for cell c 3 in terms of thereconstruction weights (4.59)

u'(x, y) = E P(_,) E W(m,n)IUIm-fn:5k IEN.J

or equivalently

uk(x, y) = > 1 >

W(m,n)IP(m,n)i€ft( ,n+n<k

Polynomials of degree k or less are equivalentlyrepresented in the transformed coordinate systemusing zero mean polynomials

uk(x, y) = E Vi E W m,n)iP(m,n) (4.62)i€N ,n+n<k

Using (4.61), we can relate weights in the trans-formed system to weights in the original system

'-' —s,t

= 2. GmnW('mn)i (4.63)m+n<k

We satisfy k-exactness by requiring that (4.62) issatisfied for all linear combinations of __Osatisfied y)such that s + t < k. In particular, if uk (x , y) =

P(3 ,t) (x, y) for some $ + t < k then

P(s , (X, Y) = E ___Oo (.,n)

m+nCk IENC.

This is satisfied if for all s + t, m + ii < k

> W(m,n)IAI(1'(s,t)) = "mm

Transforming basis polynomials back to the orig-inal coordinate system we have

W:m,n)i Y G:;A(P(U,V)) -— mm

(4.64)This can be locally rewritten in matrix form as

WA = I (4.65a)

and transformed in terms of the standard basisweights via

Note that W is a (k + 1)(k + 2)12 by Arj matrixand has dimensions j by (k + 1)(k + 2)/2.To solve (4.65a) in the optimum sense describedabove, an LQ, decomposition of is performedwhere the orthogonal matrix Q, and the lower tri-angular matrix L, have been constructed using amodified Gram-Schmidt algorithm (or a sequenceof Householder reflections). The weights W arethen given by

w;=q;L;1

Applying (4.63) these weights are transformed tothe standard centroid basis and the preprocessingstep is complete.

We now show a few results presented earlierin reference [41]. The first calculation involves thereconstruction of a sixth order polynomial withrandom normalized coefficients which has beencell averaged onto a random mesh. Figures 4.7a-b show a sample mesh and the absolute L9, errorof. the reconstruction for various meshes and re-construction degree.

Figure 4.7a Random mesh.

Degree K of Reconstruction

W1 = GW (4.65b) Figure 4.7b L2 error of reconstruction.

Page 41: SOLVERS FOR THE EULER AND NAVIER-STOKES EQUATIONS · plane, each region being the portion of the plane closer to some given point P of the set of points Mesh Median Dual CCJ,troid

6-4!

The reconstruction algorithm has also beentested on more realistic problems. Figures 4.8a-c show a mesh and reconstructions (linear andquadratic) of a cell averaged density field corre-sponding to a Ringleb flow, an exact hodographsolution of the gasdynamic equations, see [42].

Figure 4.8a Randomized mesh for Ringleb flow.

Figure 4.8b Piecewise linear reconstruction ofRingleb flow.

The reader should note that the use of piecewisecontours gives a crude visual critique as to howwell the solution is represented by the piecewisepolynomials. The improvement from linear toquadratic is dramatic in the case of Ringleb flow.A later section will show actual numerical solu-tions computed using this reconstruction opera-tor.

Figure 4.8c Piecewise quadratic reconstructionof Ringleb flow.

4.6 Upwind Advection Scheme with k = 0Reconstruction

This is the simplest (first order) approxima-tion in which the polynomial behavior in each cell,c3 , is a constant value equal to the cell average.

uk(x, y) = ii j for u° E c (4.66)

The flux formula then simplifies to the follow-ing form (for clarity U j is locally numbered Uoas shown in figure 4.1a)

h(u+ , tC, fl) =hi1 ,uo, fli)

= (fri , i ) + fi,ii)) (4.67)

—Ia (u1, 1i )I(U1 —u°)

In this formula, fi = J'" for any simple path.

By summing over all edges of the control volume,the entire scheme for çj is written

ad(c5)

yjUoda+ >

d(c)

-- iii) —Uo) = 0

(4.68)It is not difficult to prove stability and monotonic-ity of this scheme.

Page 42: SOLVERS FOR THE EULER AND NAVIER-STOKES EQUATIONS · plane, each region being the portion of the plane closer to some given point P of the set of points Mesh Median Dual CCJ,troid

6-42

Monotonicity and Stability

Recall that the flux function was constructedfrom a mean value linearization such that

f(u1 ,n11 ) - f(uo,n1 ) = a (1i1,n1 ) (u - it0) (4.69)

with iii =9uo+(i-O)u, 0 E [0, 1]. This permitsregrouping terms into the following form:

d( cj)

at ej

d(c1)

+ >(4.70)

For any closed control volume, we have that

d(c1)

>Combining the remaining terms yields a final formfor analysis (a = a+ + a, lal = a+ -

ad(cj)

wJ 11oda+ a(ü1 , ii i ) (F11 -11o)=0 (4.71)

It should be clear that coefficients in (4.74) sum tounity. To prove monotonicity in time and space,it is sufficient to show positivity of coefficients.By inspection we have that a 't2! 0 V i > 0. Toguarantee monotonicity requires that Go ^! 0.

At d(cj)

^!0 (4.75)Ac

1=1

Thus, a CFL-like condition is obtained which in-sures monotonicity and stability.

At < -AC (4.76)cçd(c,

1) a(u1, il 1 ) —Li 1=

Note that in one dimension, this number corre-sponds to the conventional CFL number. In mul-tiple space dimensions, this inequality is sufficientbut not necessary for stability. In practice some-what larger timestep values may be used.

Conclusion: The upwind algorithm (4.68) usingpiecewise constant data satisfies a discrete maxi-mum principle for general unstructured meshes.

To verify the monotonicity of the scheme at steady 4.7 U pwind Advection Schemes with Linear

state, set the time term to zero and solve for U0.(k = 1) Reconstruction

d(cj)

-0..a(üj,iij) u1

=ajii (4.72)

tL?a(u1,ii1) 1=1

All weights a i are positive and sum to unity. Thescheme is monotone since Uo is a positive weightedaverage of all neighbors. This implies a maximumprinciple since Uo is bounded from above and be-low by the maximum and minimum of neighbor-ing values (and itself), 11,, and limiT..

limiT. !^ 110 :5 Umax (4.73)

For explicit time stepping, a CFL-like conditionis obtained for monotonicity. For Euler explicittime stepping, we have the time approximation,

a 1 —110 +1

I-u -

uodaAt

which results in the following scheme:

At d(c1)

=l1 - > a(ü 1 ,ff1 ) - (U —C)1=1

d(cj)

=>0u(4.74)

In this section, we consider advection schemesbased on linear reconstruction. The process oflinear reconstruction in one dimension is depictedin figure 4.9. /

Figure 4.9 Linear Reconstruction of cell-averageddata.

One of the most important observations concern-ing linear reconstruction is that we can dispensewith the notion of cell averages as unknowns byreinterpreting the unknowns as pointwise valuesof the solution sampled at the centroid (midpointin 1-D) of the control volume. This wellresult greatly simplifies schemes based on linearreconstruction. The linear reconstruction in each

Page 43: SOLVERS FOR THE EULER AND NAVIER-STOKES EQUATIONS · plane, each region being the portion of the plane closer to some given point P of the set of points Mesh Median Dual CCJ,troid

6-43

interval shown in figure 4.9 was obtained by a sim-ple central-difference formula given point valuesof the solution at the midpoint of each interval.

In section 4.3, results for the Ringleb flowwith linear reconstruction were presented. Thereconstruction strategy presented there satisfiesall the design requirements of the reconstructionoperator. For linear reconstruction, simpler for-mulations are possible which exploit the edge datastructure. Several of these reconstruction schemesare given below. Note that for steady-state com-putations, conservation of the mean in the datareconstruction is not necessary. The implicationof violating this conservation is that a nondiag-onal mass matrix appears in the time integral.Since time derivatives vanish at steady-state, theeffect of this mass matrix vanishes at steady-state.The reconstruction schemes presented below as-sume that solution variables are placed at thevertices of the mesh, which may not be at theprecise centroid of the control volume, thus vio-lating conservation of the mean. The schemes canall be implemented using an edge data structureand satisfy k-exactness for linear functions.

4.7a Green-Gauss Reconstruction

This reconstruction exploits the gradient cal-culation (4.19) studied earlier in section 4.3:

(Vu), = 1 E !(u + uo)io (4.77)A0 jElo 2

where ñ01 is the vector normal associated withthe edge e(vo, v1 ). This approximation extendsnaturally to three dimensions, see Barth [43].

4.7b Linear Least-Squares (L9) Reconstruction

To derive this reconstruction technique, con-sider a vertex v0 and suppose that the solutionvaries linearly over the support of adjacent neigh-bors of the mesh. In this case, the change in ver-tex values of the solution along an edge e(v, vo)can be calculated by

(Vu")o . (R - a0 ) = u 1 - uo (4.78)

This equation represents the scaled projection ofthe gradient along the edge e(v, vo). A, similarequation could be written for all incident edgessubject to an arbitrary weighting factor. The re-sult is the following matrix equation, shown herein three dimensions:

or in symbolic form £ Vu = f where

c=[1: 1 L2 L3 1 (4.80)

in three dimensions. Exact calculation of gradi-ents for linear u is guaranteed if any three rowvectors w,(R, - R.0 ) span all of 3 space. This im-plies linear independence of ti, 1:2 and 1:. Thesystem can then be solved via a Gram-Schmidtprocess, i.e.,

r'c1i [1 0 01lvi [L1 E2 L3 ]= 0 1 ol (4.81)

Lo 0 iJ

The row vectors V i are given by Vi =

where

01 =(11 - l23 123 )L 1 - (133112 - 123113)L2

-(122113 - 123112)L3

U2 =(133 1 11 - 1 13 1 13 )L2 - (133 1 12 - 113123)L1

-(111 123 - 113112)L3

U3 =(1 11 122 - 1 12 1 12 )1:3 - (122 1 1 3 - 112123)L1

(111123 - 112113)L2

and l jj = (1:, .Note that reconstruction of N independent

variables in Rd implies ("t') + d N inner productsums. Since only d N of these sums involves thesolution variables themselves, the remaining sumscould be precalculated and stored in computermemory. This makes the present scheme compet-itive with the Green-Gauss reconstruction. Usingthe edge data structure, the calculation of innerproduct sums can be calculated for arbitrary com-binations of polyhedral cells. In all cases linearfunctions are reconstructed exactly. We demon-strate this idea by example:

Fork = 1,n(e) I Loop through edges of mesh= e- 1 (k, 1) ! Pointer to edge origin= c'(k, 2) ! Pointer to edge destination

dx = w(k) (x(j2) - x(j i )) ! Weighted Axdy = w(k) (y (j2) - y(ji)) I Weighted Ay1(j1 )=r1 11 (j j )+dx . dx I li orig sum111(h) = 111O2)+dx •dx ! lii dest sum1 12(i1) = 1 12(i1) + dx . dy 11 12 ong sum1 12(h) = 1 12(h) + dx dy ! 112 dest sum

wA.x1 w1y1 w1/Z1(Ux^ (wi(ui-uo)

uvl=IWzX Wn1y 'zJ \w(u-uo) du = w(k) . (u(j2 ) - u(j i )) / Weighted u

(4.79) 1u3(ii) = 1u3 (i i ) + dz . du I 1u3 orig sum

Page 44: SOLVERS FOR THE EULER AND NAVIER-STOKES EQUATIONS · plane, each region being the portion of the plane closer to some given point P of the set of points Mesh Median Dual CCJ,troid

6-44

lu3(j2) = 1u3 (j2 ) + dz du ! 1 113 dest sumEndfor

This formulation provides freedom in the choiceof weighting coefficients, w 1 . These weightingcoefficients can be a function of the geometryand/or solution. Classical approximations in onedimension can be recovered by choosing geomet-rical weights of the form w = 1./JR1 - R.OI 2 forvalues of t = 0,1,2. The L2 gradient calculationtechnique is optimal in a weighted least squaressense and determines gradient coefficients withleast sensitivity to Gaussian noise. This is an im-portant property when dealing with highly dis-torted (stretched) meshes.

4.7c Data Dependent Reconstruction

Both the Green-Gauss and L2 gradient calcula-tion techniques can be generalized to include datadependent (i.e. solution dependent) weights. Inthe case of Green-Gauss formulation, the sum

1> (uo + -i€ro

is replaced by

E p4(uo+ui )ffoi+p ((Vu)0 . (Rj - R.)) iijiEIo

(4.82)If the p are chosen such that p + p = 1 thenthe gradient calculation is exact whenever the so-lution varies linearly over the support. In twospace dimensions, equation (4.82) implies the so-lution of a linear 2 x 2 system of the form

A0 - —m 1(uz => p(uo+u1)flo1—m 2 AO - myyJiEIo

where

= = pAy1n4iEIo iEIo

m,Y = E pixxiny1, =iEIo iEIo

Care must be exercised in the selection of p± inorder that the system be invertible. This is sim-ilar to the spanning space requirement of the L2gradient calculation technique.

4.7d Monotonicity Enforcement

When solution discontinuites and steep gradi-ents as present, additional steps must be taken

to prevent oscillations from developing in the nu-merical solution. One way to do this was pio-neered by van Leer [351 in the late 1970's. Thebasic idea is to take the reconstructed piecewisepolynomials and enforce strict monotonicity inthe reconstruction. Monotonicity in this contextshould be interpreted to mean that the value ofthe reconstructed polynomial does not exceed theminimum and maximum of neighboring cell av-erages. In other words, the final reconstructionmust guarantee that no new extrema have beencreated. This will be referred to as 'monotonicityproperty 1.' When a new extremuxn is produced,the slope of the reconstruction in that intervalis reduced until monotonicity is restored. Thisimplies that at a local minimum or maximum inthe cell averaged data the slope ii 1-D is alwaysreduced to zero, see for example gure 4.10.

Figure 4.10 Linear Reconstruction with mono-tone limiting.

Another property (referred to hereafter as 'prop-erty 2') of the monotonicity enforcement is mo-tivated by the stability proof associated with thehigher order accurate schemes (presented in sec-tion 4.7e). In one dimension, property 2 can becharacterized as the requirement that the new re-construction not produce a reconstructed solutionvariation, f I du l, which is larger than the piece-wise constant value. If property 2 is violated thenthe slopes must be reduced until the solution vari-ation is satisfied. This situation is depicted infigure 4.11. For arbitrary unstructured grids, asufficient condition is that the differences in theextrapolated states at a cell interface quadraturepoint be of the same sign as the difference in thepiecewise constant values, i.e.

u --- 0̂ , (property 2)

u — uwhen combined with property 1, the following in-equality exists:

-1>

+>0 (4.83)

Page 45: SOLVERS FOR THE EULER AND NAVIER-STOKES EQUATIONS · plane, each region being the portion of the plane closer to some given point P of the set of points Mesh Median Dual CCJ,troid

6-45

This inequality is crucial in the stability proofgiven below.

(a) (b)

Figure 4.11 (a) Reconstruction profile with in-creased variation violating monotonicity property2. (b) Profile after modification to satisfy mono-tonicity property 2.

In Barth and Jespersen [40], we gave a simplerecipe for invoking property 1. Consider writingthe linearly reconstructed data in the followingform:

u'(x, y)j = U + Vt4. . (R - a1 ) (4.84a'

Now consider a "limited" form of this piecewiselinear distribution.

= iz + 4 jVu , - (R - R,) (4.84b)

The idea is to find the largest admissible 4Dj whileinvoking a monotonicity principle that values ofthe linearly reconstructed function must not ex-ceed the maximum and minimum of neighboringcentroid values (including the centroid value inc1). To do this, first compute

UT 1" = min(111 , ttneighbors)

and= max(U1 , !!neighbors)

then require that

UT 1" :5 u(x, v)t ^ ur (4.85)

For linear reconstructions, extrema in u(x, y)occur at the vertices of the control volume andsufficient conditions for (4.85) can be easily ob-tained. For each vertex of the cell compute u.=u'°(x 1 , y, i = 1, N, to determine the limitedvalue, Ø, which satisfies (424):

-

min(1, 15 if ti - Uj > 0

= j min(1,if U - U <0ifu1—U1=0

with k1 = min(4) 1 , 4'2, 4's, .--, 0N) . In practice,the reconstructed polynomial may be calculatedat the flux quadrature points instead of the ver-tices of the control volume with a negligible degra-dation in monotonicity. In the implementation ofproperty 2, we prefer a "symmetric" reductionof slopes. In other words, at interfaces violatingproperty 2, both of the two cells sharing that in-terface reduce their slope until (4.83) is satisfied.

When the above procedures are combined withthe flux function given earlier (4.58),

h(ut uTh n) = (f(u,n)+ f(u,n))(4.58)

—Ia (u, n)I (&- — uj

the resulting scheme has very good shock resolv-ing characteristics. To demonstrate this fact, weconsider the scalar nonlinear hyperbolic problemsuggested by Struijs, Deconinck, ci a! [44]. Theequation is a multidimensional form of Burger'sequation.

112 + (u2/2) + u, = 0

We solve the equation in a square region [0, 1.5] x[0, 1.5] with boundary conditions: u(x,0) = 1.5-2x, x < 1, u(x,0) = —.5, x > 1, u(0, y) = 1.5,and u(1.5, y) = —.5. Figures 4.12 and 4.13 showcarpet plots and contours of the solution on reg-ular and irregular meshes.

Figure 4d2a Carpet plot of Burger's equationsolution on regular mesh.

Page 46: SOLVERS FOR THE EULER AND NAVIER-STOKES EQUATIONS · plane, each region being the portion of the plane closer to some given point P of the set of points Mesh Median Dual CCJ,troid

Figure 4.12b Solution Contours on regular mesh.

Figure 4.13a Carpet plot of Burger's equationsolution on irregular mesh.

6-46

Note that the carpet plots indicate that the nu-merical solution on both meshes is monotone. Evenso, most people would prefer the solution on theregular mesh. This is an unavoidable consequenceof irregular meshes. The only remedy appears tobe mesh adaptation. Similar results for the Eulerequations will be shown on irregular meshes in afuture section.

4.7e Stability Analysis via Energy Methods

Consider once again the local mesh shown infigure 4.1a with local index about a vertex v0 . Inthe analysis performed below, we consider energystability of schemes of the following form

d(c,)

I ioAo = - E h(u,u,fl)o 1 (4.86)

using linear reconstruction with limiting. Notethat in this analysis all boundary effects will beignored. In section 4.5, stability of the first or-der upwind scheme was proven using monotonic-ity analysis. Before considering the higher orderschemes, we briefly digress to show stability of thefirst order upwind scheme using energy methods.Using the same techniques, energy stability of thehigh order schemes with reconstruction and lim-iting will be shown.

Enerq t, Analysis for the k = 0 scheme

In this case, the flux takes the simple form andthe scheme for a single vertex v 0 can be writtenas indicated below

d( çj)

(1)-i-

Du

d(c1)(4.87)

1 ,,_

Cd U

or in symbolic operator form, where u denotesthe solution vector, i.e. u =In this symbolic form, the scheme is written as

(Du)j + £0 u - £du = 0 (4.88)

where D is a positive diagonal matrix containingthe area of each control volume. La and £8 repre-sent the advective and diffusive operators in thislinear scheme. The energy of the system (4.88) isgiven by the following equation:

(uTD0u)juT(C + 4) u_u '( C + 4) u = 0Figure 4.13b Solution contours. (4.89)

Page 47: SOLVERS FOR THE EULER AND NAVIER-STOKES EQUATIONS · plane, each region being the portion of the plane closer to some given point P of the set of points Mesh Median Dual CCJ,troid

6-47

It is a straightforward exercise to show that inthe linear case, 4 and L' are skew-symmetric(isoenergetic) operators, hence

U (La + 4) U = 0.

The diffusive operator Cd is symmetric which re-duces the energy equation to the following form:

(u'Du) - UTCd U = 0 (4.90)

From symmetry and application of the eigenvaluecircle theorem, it is easily shown that Cd is asymmetric, negative semi-definite matrix opera-tor which implies that

uTrau <0

for all u. This establishes that the scheme is en-ergy stable since

(uTDou) s 0

Enerc'y Analysis for the k = 1 scheme

We now consider the advection scheme with lin-ear reconstruction. The interface states for theedge of the control volume separating cells co andc1 are denoted by 4 and u, respectively. Thescheme is written in the familiar form:

d( c)

(+> ( f ( 4,j11)+f(u1,j11))Vu

Ca u

d(c1)

-

Cd U(4.91)

Consider rewriting equation (4.91) using the iden-tity

r-4=which tacitly assumes that the ratio exists. Mono-tonicity properties 1 and 2 guarantee that & E[0, 1). Thus, equation (4.91) is rewritten in thenonlinear form:

d( c)

(AoiIo)+ (f(4,n)+f(ç,il))d(c1)

-

From symmetry and the eigenvalue circle theoremwe have that

UTCdU < 0 (4.92)

It remains to be shown that the advection oper-ator L. is either isoenergetic (in the linear case)or decays energy in the system. Not all extrap-olation formulas guarantee that this is true. Afull discussion of this topic is beyond the scope ofthese notes and is a subject of current research.Note that in reference [45], we indicated a pref-erence for a standard Galerkin discretization ofLa. Since this operator is isoenergetic, when com-bined with the diffusion operator described above,the entire scheme is provably stable in an energynorm.

4.8 Maximum Principles and the

Delaunay Triangulation

The edge formulas presented earlier not onlyprovide an efficient procedure for calculating quan-tities such as the gradient and divergence, butalso provide certain theoretical results which aredifficult to ascertain otherwise. For example, Cia-rlet and Raviart [46] consider Galerkin schemesfor solving elliptic equations using linear finite-elements. They derive sufficient conditions forthe existence of a discrete maximum principle forLaplace's equation if all angles in the triangula-tion are less than 7r/2 - € for some positive 6.

Using the edge formulas derived in section 4.3,sufficient and necessary conditions can be derivedfor a discrete maximum principle which are quitedifferent from the Ciarlet result. A brief outlineof the proof is given below.

Example: Derive conditions for a discrete max-imum principle using a Galerkin approximationwith linear elements.

Using a reduced form of (4.43), the canonicaledge formula for the discrete Laplacian operatoris given by

JçbLXu'da = L(u") 0 =

[cotan(a L4 )4-cotan(aft 4 )](uI - uo)jET0

(4.93)where the angles aL and aj are depicted below.

Page 48: SOLVERS FOR THE EULER AND NAVIER-STOKES EQUATIONS · plane, each region being the portion of the plane closer to some given point P of the set of points Mesh Median Dual CCJ,troid

6-48

i-I

Figure 4.14 Circumcircle test for adjacent tri-angles.

It is well known that a discrete maximum prin-ciple exists for arbitrary point distributions andboundary data if and only if the discrete operatoris a nonnegative operator, i.e., if

= > (4.94)i€xo

and

w0 <0, Wi ^! 0,i >0, w0 + w1 =0 (4.95)if0

for any interior vertex v0 . For schemes of the form

= > Wj(u - ug) (4.96)iElo

nonnegativity requires that W ^! 0 for all i E 2o.This guarantees a maximum principle. Equatingequation (4.96) to zero, we obtain

h >:i€Io wj4= YLI€1. Wi

(4.97)

and therefore

min(u,t4,...,u0) u

A natural question to be addressed concerns theexistence and uniqueness of triangulations of anarbitrary point set such that (4.93) guarantees adiscrete maximum principle. In two dimensionsa unique triangulation always exists. The mainresult is summarized in the following theorem:

The discrete Laplacian operator (4.98) exhibitsa discrete maximum principle for arbitrary pointsets in two space dimensions if the triangulationof these points is a Delaunay triangulation.

The key elements of the proof are given below:Rearrangement of the weights appearing in (4.93)yields

W = Lcotan(aL ) + cotan(aR)]

1 Icos(aL ) cos (a1)1+.

= [sina 1 ) s1naft,)j(4.98)

_1 Isin (cvL 1 + aft1)- [ (aLj sin (aR)]

Since aL 1 C it, aR < it, the denominator isalways positive and nonnegativity requires thataL 1 + it. Some trigonometry reveals thatfor the configuration of figure 4.14 with circumcir-cle passing through {vo, v, v1+i} the sum aR4 +a 1 depends on the location of v1 _ 1 with respectto the circumcircle in the following way:

a 4 + aL 1 <it, v_1 exterior

aR + aL > it, v_1 interior (4.99)

aR + aL = It, v_1 cocircular

Also note that we could have considered the cir-cumcircle passing through {vo, v, v i— i} with sim-ilar results for v j . The condition of nonnegativ-ity implies a circumcircle condition for all pairs ofadjacent triangles whereby the circumcircle pass-ing through either triangle cannot contain thefourth point. This is precisely the unique char-acterization of the Delaunay triangulation whichwould complete the proof.

Keep in mind that from equation (4.98) wehave that cotan(a) 2! 0 if a < r/2. Thereforea sufficient but not necessary condition for non-negativity (and a Delaunay triangulation) is thatall angles of the mesh be less than or equal to7r/2. This is a standard result in finite elementtheory and applies in two or more space dimen-sions. The construction of nonnegative operatorshas important implications with respect to the di-agonal dominance of implicit schemes, the eigen-value spectrum of the discrete operator, stabilityof relaxation schemes, etc.

We can ask if the result concerning Delaunaytriangulation and the maximum principle extendsto three space dimensions. As we will show, theanswer is no. Section 4.3d gives the correspond-ing edge formulas for Hessian and Laplacian dis-cretizations in 3-D. The resulting formula for thethree dimensional Laplacian is

J

h V2 u" dv = > W(u - no) (4.100)

V,0 ifo

Page 49: SOLVERS FOR THE EULER AND NAVIER-STOKES EQUATIONS · plane, each region being the portion of the plane closer to some given point P of the set of points Mesh Median Dual CCJ,troid

6-49

where

d(vo,v)

W1 = > IRk+ 1/2 I cotan(ak+1/2).

(4.101)In this formula Vr 0 is the volume formed by theunion of all tetrahedra that share vertex v0. 10 isthe set of indices of all adjacent neighbors of v0connected by incident edges, k a local cyclic in-dex describing the associated vertices which forma polygon of degree d(vo, v1 ) surrounding the edgee(vo, v1), k+1/2 is the face angle between thetwo faces associated with 4+1/2 and c+112 whichshare the edge e ( vk, vk+1) and ARk+1/2I is themagnitude of the edge (see figure below).

Figure 4.15 Set of tetrahedra sharing interioredge e(vo, v1) with local cyclic index k.

A maximum principle is guaranteed if all W1 ^! 0.We now will procede to describe a valid Delau-nay triangulation with one or more W c 0. Itwill suffice to consider the Delaunay triangulationof N points in which a single point v0 lies inte-rior to the triangulation and the remaining N - 1points describe vertices of boundary faces whichcompletely cover the convex hull of the point set.

Top View Side View

Figure 4.16 Subset of 3-D Delaunay Triangula-tion which does not maintain nonnegativity.

Consider a subset of the N vertices, in particularconsider an interior edge incident to v0 connect-ing to v1 as shown in figure 4.16 by the dashedline segment and all neighbors adjacent to v 1 onthe hull of the point set. In this experiment weconsider the height of the interior edge, z, as afree parameter. Although it will not be provenhere, the remaining N - 8 points can be placedwithout conificting with any of the conclusionsobtained for looking at the subset.

It is known that a necessary and sufficient con-dition for the 3-D Delaunay triangulation is thatthe circumsphere passing through the vertices ofany tetrahedron must be point free [21]; that is tosay that no other point of the triangulation canlie interior to this sphere. Furthermore a propertyof locality exists [21] so that we need only inspectadjacent tetrahedra for the satisfaction of the cir-cumsphere test. For the configuration of pointsshown in figure 4.16, convexity of the point cloudconstrains z > 1 and the satisfaction of the cir-cumsphere test requires that z 2.

1 z 2 (Delaunay Triangulation)

From (2.13) we find that W, > 0 if and only ifz C 7/4.

1 < z (Nonnegativity)

This indicates that for 7/4 C z 2 we have avalid Delaunay triangulation which does not sat-isfy a discrete maximum principle. In fact, theDelaunay triangulation of 400 points randomlydistributed in the unit cube revealed that approx-imately 25% of the interior edge weights were ofthe wrong sign (negative).

Keep in mind that from (4.101) we can obtain asufficient but not necessary condition for nonneg-ativity that all face angles be less than or equalto ir/2.

The formulas for the prototypical viscous termV pVu are only slightly more complicated thanthe Laplacian formulas. In 2-D we have the fol-lowing weights

1WI = [i7L1cotan(aLI) + PR,cotan(aRI)]

(4.102)or in 3-D

d(vo,v1)

Wi = E Pk+l/2I Rk+1/2I cotan(ak+1,2)k= 1

(4.103)

Page 50: SOLVERS FOR THE EULER AND NAVIER-STOKES EQUATIONS · plane, each region being the portion of the plane closer to some given point P of the set of points Mesh Median Dual CCJ,troid

6-50

where 71 is the average value of /2 in the specifiedsimplex. Since p and 71 are always assumed posi-tive quantities, we have the following theorem:

A discrete maximum principle associated withthe discretization of V pVu with weights givenby (4.102) and (4.103) is guaranteed iffW > 0for all interior edges of the mesh. A sufficient butnot necessary condition is that all angles (2-D) orfaces angles (3-D) be less than or equal to ir/2.

The proof follows immediately from nonnegativ-ity 01(4.102) and (4.103). The sufficient but notnecessary condition is a minor extension of theresult by Ciarlet [46].

5.0 Finite-Volume Solvers for the EulerEquations

In this section, we consider the extension ofupwind scalar advection schemes to the Eider equa-tions of gasdynainics. As we will see, the changesare relatively minor since most of the difficultwork has already been done in designing the scalarscheme.

5.1 Eider Equations in Integral For

The physical laws concerning the conserva-tion of mass, momentum, and energy for an ar-bitrary region 1? can be written in the followingintegral form:

Conservation of Mass

LJ+J p(V . n)dl=0 (5.1)On

Conservation of Momentum

wf.oVda +J pV(V . n)dl+[ pndl=0OS) JOS)

(5.2)

Conservation of Energy

O.tJç1- 1 Eda+ f (E+p)(V.n)dl=0 (5.3)

In these equations j,, V, p, and E are the density,velocity, pressure, and total energy of the fluid.The system is closed by introducing a thermody-namical equation of state for a perfect gas:

p = (- 1)(E - p(V . V)) (5.4)

These equations can be written in a more com-pact vector equation:

£juda+jF)d1=0 (5.5)

with

( p \ p(V.n)u=IpVJ, F(u).n=(pV(V.n)+pn

\EJ \(E+p)(V.n)

In the next section, we show the natural ex-tension of the scalar advection scheme to include(5.5).

5.2 Extension of Scalar Advection Schemes toSystems of Equations

The extension of the scalar advection schemesto the Eider equations requires two rather minormodifications:

(1) Vector Flux Fanction. The scalar flux func-tion is replaced by a vector flux function. In thepresent work, the mean value linearization due toRoe [47] is used. The form of this vector flux func-tion is identical to the scalar flux function (4.58),i.e.

h(u,uThn)=(f(u,n)+f(c,n))(5.6)

jIA(ü)I (u -

where f(u, n) F(u) . n, and A df/du is theflux Jacobian.

(2) Componentwise limiting. The solution vari-ables are reconstructed componentwise. In prin-ciple, any set of variables can be used in the recon-struction (primitive variables, entropy variables,etc.). Note that conservation of the mean canmake certain variable combinations more difficultto implement than others because of the nonlin-earities that may be introduced. The simplestchoice is obviously the conserved variables them-selves. When conservation of the mean is not im-portant (steady-state calculations), we prefer theuse of primitive variables in the reconstructionstep.

The resulting scheme for the Eider equationshas the same shock resolving characteristics asthe scalar scheme. Figures 5.1a-b show a simpleSteiner triangulation and the resulting solutionobtained with a linear reconstruction scheme fortransonic Eider flow (M,,0 = .80,a = 1.25°) overa NACA 0012 airfoil section.

Page 51: SOLVERS FOR THE EULER AND NAVIER-STOKES EQUATIONS · plane, each region being the portion of the plane closer to some given point P of the set of points Mesh Median Dual CCJ,troid
Page 52: SOLVERS FOR THE EULER AND NAVIER-STOKES EQUATIONS · plane, each region being the portion of the plane closer to some given point P of the set of points Mesh Median Dual CCJ,troid

04C-)

0.0 0.2 0.4 0.6 0.8 1.0x/c

6-52

b is a Steiner triangulation and solution about amulti-component airfoil.

Figure 5.3 Comparison of C,, distributions oninitial and adapted meshes.

Using the incremental Steiner algorithm discussedpreviously, the grid can constructed from curvedata in about ten minutes time on a standard en-gineering workstation using less than a minute ofactual CPU time.

Figure 5.4a Steiner Grid about multi-componentairfoil.

The flow calculation shown in figure 5.4b was per-formed on a CRAY supercomputer taking just afew minutes of CPU time using a linear recon-struction scheme with implicit time advancement.Details of the implicit scheme are given in thenext section.

Figure 5.4b Mach number contours about multi-component airfoil, M = .2,a = 00.

We previously mentioned the importance ofusing accurate flux quadrature formulas. In fact,for k-exact reconstruction, we suggest N pointGauss quadratures with N > (k + 1 )12. In Figs.5.5a-b this importance is illustrated by plottingdensity contours for a numerical calculation of theRingleb flow (previously described) using quadraticreconstruction k = 2. Our formula suggests thattwo point quadratures should be used in this case.

Figure 5.5a Ringleb flow density contours us-ing quadratic reconstruction and one-point Gaussquadrature (k = 2,N= 1).

Figure 5.5a shows contours for a calculation us-ing one-point Gauss quadrature and Fig. 5.5bshows contours for a calculation using two-pointquadratures. The improvement in Fig. 5.5b is

Page 53: SOLVERS FOR THE EULER AND NAVIER-STOKES EQUATIONS · plane, each region being the portion of the plane closer to some given point P of the set of points Mesh Median Dual CCJ,troid

Figure 5.7 MG Wing Surface Pressureand Spanwise G, Profiles (M<,,= .84, a=3.06°).

6-53

dramatic. Increasing the number of quadraturepoints to three leaves the solution unchanged.

Figure 5.5b R.ingleb flow density contours us-ing quadratic reconstruction and two-point Gaussquadrature (k = 2, N = 2).

The algorithms outlined in section 4 havebeen extended to include the Euler equations inthree dimensions. In reference [43], we showed thenatural extension of the edge data structure in thedevelopment of an Euler equation solver on tetra-hedral meshes. One of the calculations presentedin this paper simulated Euler flow about the ON-ERA MG wing. The tetrahedral mesh used forthe calculations was a subdivided 151x17x33 hex-ahedral C-type mesh with spherical wing tip cap.The resulting tetrahedral mesh contained 496,350tetrahedra, 105,177 vertices, 11,690 boundary ver-tices, and 23,376 boundary faces. Figure 5.6 showsa closeup of the surface mesh near the outboardtip.

Figure 5.6 Closeup of M6 Wing Surface MeshNear Tip.

Transonic calculations, M. = .84, a = 3.060,were performed on the CRAY Y-MP computerusing the upwind code with both the Green-Gauss

and L2 gradient reconstruction. Figure 5.7 showssurface pressure contours on the wing surface andC profiles at several span stations.

Pressure contours clearly show the lambdatype shock pattern on the wing surface. Figures5.8a-c compare pressure coefficient distributionsat three span stations on the wing measured inthe experiment, y/b=.44,.65.,.95.

C.U

- Upwind. Green-Gauss Gradients- - -. Upwind, 12 Gradients--- CFL3D (tel. 48)

o Experiment• Experiment

0.00 0.25 0.50 0.75 1.00

x/c

Figure 5.8a M6 Wing Spanwise Pressure Distri-bution, y/b = .44.

Each graph compares the upwind code with Green-Gauss and L2 gradient calculation with the CFL3Dresults appearing in [48] and the experimentaldata [49]. Numerical results on the tetrahedralmesh compare very favorably with the CFL3Dstructured mesh code. The results for the out-board station appear better for the present codethan the CFL3D results. This is largely due tothe difference in grid topology and subsequent im-proved resolution in that area.

Page 54: SOLVERS FOR THE EULER AND NAVIER-STOKES EQUATIONS · plane, each region being the portion of the plane closer to some given point P of the set of points Mesh Median Dual CCJ,troid

6-54

-LSi

-o.s-Ij

ow 0.0jfra"- Upwind, Omen-Gauss Gradients- - - - Upwind, Ii Gradients

CF13D (ref. 48)o Experiment• Experiment

0.00 0.25 0.50 0.75 1.00

x/c

Figure 5.8b MG Wing Spanwise Pressure Distri-bution y/b = .65.

0

a o.ojflr - - t:;--

- Upwind, Omen-Gauss Gradients- - - - Upwind. 1.2 Gradients

CF13D (ref. 48)o Experiment• Experiment

1.51

0.00 0.25 0.50 0.75 1.00

x/c

Figure 5.8c M6 Wing Spanwise Pressure Distri-bution y/b = .95.

5.3 Implicit Linearizations

In this section, we consider the task of lin-earizing the discrete spatial operator for purposesof backward Euler time integration. Defining thesolution vector u = [u1 , u2 ,ii3 , ...,UN]T, the basicscheme is written as

Du2 = R(u) (5.7)

where D is a positive diagonal matrix. Perform-ing a backward Euler time integration, equation(5.7) is rewritten as

- u") = At ft(u''). (5.8)

where n denotes the iteration (time step) level.Linearizing the right-hand-side (RHS) of (5.8) intime produces the following form:

= At (U" + dR"

—(u"' - u"))du

By rearranging terms, we can arrive at the socalled "delta" form of the backward Euler scheme

[D - At-]

(U-+1 u") = 4-At R(u-)WU

(5.9)Note that for large time steps, the scheme be-comes equivalent to Newton's method for findingroots of a nonlinear system of equations. New-ton's method is known to be quadratically con-vergent for isolated roots. Each iteration of thescheme requires the solution of an algebraic sys-tem of linear equation. In practice, we use ei-ther sparse direct methods as discussed in ref.[45] or preconditioned minimum residual meth-ods. Both of these topics will be addressed byProfessor Hughes and other lecturers. The suc-cess or failure of these methods hinges heavily onthe accuracy of the time linearization. For theschemes discussed in sections 4 and 5, the mostdifficult task is the linearization of the numericalflux vector with respect to the two solution states.For example, given the flux vector

h(u, u, n) = (f (u', n) + f(u, n))(5.10)

-IA(u)I (u - u)

we require the Jacobian terms and Inreference [50], we derived the exact Jacobian lin-earization of Roe's flux function. In this same pa-per, approximate linearizations of (5.10) were in-vestigated. The linearization of (5.10) is straight-forward, except for terms which arise from differ-entiation of IA(ü)I. A simple approximation isto neglect these terms in the linearization pro-cess. This produces the following approximatelinearizations:

dh1du

= 2-(A(u) - IA(ü)I) (Approx 1)

dh - 1- (A(u) + IA(ü)I) (Approx 1)

It is not difficult that to prove that the errorasso-ciated with this approximation is 0(11 u+ - cli)which makes the linearization attractive for theimplicit calculation of smooth flows. Near dis-continuities, this term becomes 0(1) which canslow the convergence of the scheme considerably.One important attribute of this approximation isthat it retains time conservation of the scheme.This amounts to a telescoping property of fluxesin time. For time accurate problems involvingmoving discontinuities, this property is essential

Page 55: SOLVERS FOR THE EULER AND NAVIER-STOKES EQUATIONS · plane, each region being the portion of the plane closer to some given point P of the set of points Mesh Median Dual CCJ,troid

6-55

to obtain correct shock speeds. Another approx-imate form considered in [50] uses the followingsimple approximation

dh-= A(u) (Approx 2)

du+

dh

= A(ii) (Approx 2)

This linearization also differs from the exact lin-earization by terms O(jIu+ - u 11) . One impor-tant feature of this linearization is that it pro-duces a LHS operator for the first order upwindscheme which is (block) diagonally dominant. Forthose solution methods or preconditioning meth-ods based on classical relaxation schemes, thisproperty establishes convergence of the relaxationmethod. Scalar equation analysis also indicatesthat when this linearization is used with back-ward Euler time integration and first order up-wind space discretization, the resulting scheme ismonotone for all time step size. Unfortunately,this linearization violates time conservation andshould not be used for time accurate calculations.

'a £5.......

.€10.......10.,.......10,10 .......1•

o SthsorsicAirfoiI

Ziq —.—Appsox#I

- ' —..—Approzl21Q, —..-.2ndOr&r

0 5 10 15Iterations

Figure 5.9 Convergence histories for exact andapproximate linearizations. Solid lines show con-vergence histories for calculations carried out us-ing first order upwind RHS in(5.9). Dashed linedepicts scheme run with exact linearization offirst order scheme on the LHS and second orderRHS discretization.

Using the edge data structure, the assembly ofthe LHS matrix in (5.9) for the first order schemeis very straightforward. The flux associated witheach edge e(v1 , v) of the mesh is linearized withrespect its two arguments, u i and u1 . This meansthat the linearization contributes to the forma-tion of the block matrix elements in the i-th rowj-th column, i-th row i-th column, j-th row i-th column, and j-th row j-th column positions.

This leads to a highly vectorizable (using gather-scatter hardware) algorithm for matrix assembly(and matrix multiplies). For the higher orderreconstruction schemes, the usual strategy is toonly construct LHS matrix terms associated withthe first order upwind scheme while using a higherorder RHS operator. The mismatch of operatorsdestroys any hope of quadratic convergence forlarge time steps. Figure 5.9 graphs the conver-gence history for a typical calculation using thelinearizations discussed above. The flow prob-lem being solved is subsonic flow over a singleairfoil. In this case, the flow is smooth and alllinearizations should be applicable. In this fig-ure, we see that when the RHS and LETS op-erators both correspond to the first order up-wind scheme and the exact Jacobian linearizationis used, quadratic convergence is achieved. Theschemes using approximate linearizations do notapproach quadratic convergence but are very ef-fective in reducing the initial residual. In reality,most computations are terminated after reduc-ing the residual about four orders of magnitude.For the present example, this would amount to 7steps using the exact linearization or 8-9 steps us-ing the approximate forms. Using a higher orderaccurate RHS slows the convergence even further.Nevertheless, a four order reduction in residual isachieved after 30-40 steps.

6.0 Numerical Solution of the Navier-StokesEquations with Turbulence

6.1 Turbulence Modelin g for Unstructured Grids

Simulating the effects of turbulence on un-structured meshes via the compressible Reynolds-averaged Navier-Stokes equations and turbulencemodeling is a relatively unexplored topic. In earlywork by Rostand [51], an algebraic turbulencemodel was incorporated into an unstructured meshflow solver. This basic methodology was later re-fined by Mavriplis [52] for the flow about multi-element airfoil configurations. Both of these im-plementations utilize locally structured meshesto produce one-dimensional-like boundary-layerprofiles from which algebraic models can deter-mine an eddy viscosity coefficient for use in theReynolds-averaged Navier-Stokes equations. Theuse of local structured meshes limits the generalapplicability of the method.

The next level of turbulence modeling in-volves the solution of one or more auxiliary differ-ential equations. Ideally these differential equa-tions would only require initial data and bound-ary conditions in the same fashion as the Reynolds-

Page 56: SOLVERS FOR THE EULER AND NAVIER-STOKES EQUATIONS · plane, each region being the portion of the plane closer to some given point P of the set of points Mesh Median Dual CCJ,troid

6-56

averaged mean equations. The use of turbulencemodels based on differential equations greatly in-creases the class of geometries that can be treated"automatically." Unfortunately this does not makethe issue of turbulence modeling a "solved" prob-lem since most turbulence models do not performwell across the broad range of flow regimes usu-ally generated by complex geometries. Also keepin mind that most turbulence models for wall-bounded flow require knowledge of distance tothe wall for use in "damping functions" whichsimulate the damping effect of solid walls on tur-bulence. The distance required in these models ismeasured in "wall units" which means that phys-ical distance from the wall y is scaled by the localwall shear, density, and viscosity.

(6.1)Pu,aU V

Scaling by wall quantities is yet another compli-cation but does not create serious implementa-tion difficulties for unstructured meshes as we willdemonstrate shortly.

6.2 A One-Equation Turbulence Transport Model

In a recent report with Baldwin [53], we pro-posed and tested (on structured meshes) a singleequation turbulence transport model. In this re-port, the model was tested on various subsonicand transonic flow problems: flat plates, airfoils,wakes, etc. The model consists of a single scalaradvection-diffusion equation with source term fora field variable which is the product of turbulenceReynolds number and kinematic viscosity, URT.This variable is proportional to the eddy viscosityexcept very near a solid wall.

D(vRr)Di = (

c3 12 - c1 ) S/VRTP

+(u + ! V2 ( V T ) - 1 (Vvg) . V(vRj')UR

(6.2)

In this equation, P is the production of turbulentkinetic energy and is related to the mean flow ve-locity rate-of-strain and the kinematic eddy vis-cosity Pt. In equation (6.2), the following func-tions are required:

=(c€2 - c,

On =o

Z/j =ç, (uT)Dl D2

At fJV

D1 =1_exp(_y+/A+)

D2 =1 - exp(—y/A)

fOU1 +OUJ\ 8U 2 (,)2

P=v(—I't

-ôx5 Oa:, Oxj 3

f2 ( 11f) =- + (1 - fa )( _L_ + Di D2 ) (V'D1D2

Q2 ictj

1+ +VDD exp(—?/r) D2

kexp(—y+ /A) D1))

The following constants have been recommendedin [53]:

ic =0.41, c 1 = 1.2, c, = 2.0CA =0.09, A+ 26, At = 10

We also recommend the following boundary con-ditions for (6.2):

1. Solid Walls: Specify T = 0.

2. Inflow (V . nc 0): Specify i r = (flT)oo < 1.

3. Outflow (V . n > 0): Extrapolate RT frominterior values.

Equation (6.2) depends on distance to solidwalls in two ways. First, the damping function12 appearing in equation (6.2) depends directlyon distance to the wall (in wall units). Secondly,v2 depends on yR1 and damping functions whichrequire distance to the wall.

Vt = cDi(y+)D2(y+)vñ1

It is important to realize that the damping func-tions 12, D1 , and D2 deviate from unity only whenvery near a solid wall. For a typical turbulentboundary-layer (see figure 6.1) accurate distanceto the wall is only required for mesh points whichfall below the logarithmic region of the boundary-layer.

Page 57: SOLVERS FOR THE EULER AND NAVIER-STOKES EQUATIONS · plane, each region being the portion of the plane closer to some given point P of the set of points Mesh Median Dual CCJ,troid

10.1100 10' 102 1o3 io io'

Y+

Figure 6.2a Mesh near RAE 2822 airfoil.

6-57

Figure 6.1 Typical flat plate boundary-layer fromref. [53] showing dependence of turbulence modelon distance to wall.

The relative insensitivity of distance to the wallmeans that accurate estimation of distance to thewall is only required for a small number of pointsthat are extremely close to a boundary surface.The remaining points can be assigned any approx-imate value of physical distance since the damp-ing functions are essentially at their asymptoticvalues. A general procedure for calculation of dis-tance to the wall in wall units is to precomputeand store, for each vertex of the mesh, the mini-mum distance from the vertex to the closest solidwall (examples are shown later in figures 6.2b and6.3b). This strategy can only fail if two bodies arein such close proximity that the near wall damp-ing functions never reach their asymptotic values.Realistically speaking, the validity of most tur-bulence models would be in serious question inthis situation anyway. In general, the minimumdistance from vertex to boundary edge does notoccur at the end points of a boundary edge butrather interior to a boundary edge. For each ver-tex, information concerning which boundary edgeachieves the minimum distance and the weightfactor for linear interpolation along the boundaryedge must be stored. Data can then be interpo-lated to the point of minimum distance wheneverneeded. In the course of solving (6.2), distance toa solid wall in wall units is calculated by retriev-ing physical distance to the wall and the local wallquantities needed for (6.1) as interpolated alongthe closest boundary edge.

The numerical calculations presented in thissection represent a successful application of theideas discussed in previous sections. Figures 6.2aand 6.3a show examples of Mm-Max triangula-tions about single and multi-element airfoils. Thefirst geometry consists of a single RAE 2822 air-

foil. Navier-Stokes flow is computed about thisgeometry assuming turbulent flow with the fol-lowing free-stream conditions: M = .725, a =2.31', Re = 6.5 million. Wind tunnel experi-ments for the RAE 2822 geometry at these testconditions have been performed by Cook, Mc-Donald, and Firmin [54]. The RAE 2822 airfoilmesh shown in figure 6.2a contains approximately14000 vertices and 41000 edges. The second ge-ometry consists of a two element airfoil configu-ration with wind tunnel walls. The inflow condi-tions assume turbulent flow with M = .09 andRe = 1.8 million. Details of the geometry andwind tunnel test results can be found in the re-port by Adair and Home [551. The two elementmesh shown in figure 6.3a contains approximately18000 vertices and 55000 edges.

Both meshes were constructed in two steps.The first step was to generate a Delaunay trian-gulation of the point cloud. As mentioned earlier,the method of Delaunay triangulation can gener-ate poor triangulations for highly stretched pointdistributions. Both meshes suffered from nearlycollapsed triangles with two small interior angles.As a second step, a Mm-Max triangulation wasconstructed by edge swapping the Delaunay tri-angulation. Edge swapping repaired both trian-gulations. Both airfoil geometries were calculatedassuming turbulent flow using the one-equationturbulence model (6.2). Level sets of the gen-eralized distance function used in the turbulencemodel are shown in figures 6.2b and 6.3b.

Page 58: SOLVERS FOR THE EULER AND NAVIER-STOKES EQUATIONS · plane, each region being the portion of the plane closer to some given point P of the set of points Mesh Median Dual CCJ,troid

6-58

a

Figure 6.2b Contours of distance function forturbulence model.

Figure 6.2c Closeup of Mach number contoursnear airfoil.

Figures 6.2c-d plot Mach number contoursand pressure coefficient distributions for the RAE2822 airfoil. The pressure coefficient distributioncompares favorably with the experiment of Cook,McDonald, and Firmin [29]. Leading edge tripstrips were used on the experimental model butnot simulated in the computations. This may ex-plain the minor differences in the leading edgepressure distribution.

RAE 2822- cakulado.

0 Ezpaime.t. Ut.

0.2 0.4 0.6 0.8 1.0x/c

Figure 6.2d Pressure coefficient distribution onairfoil.

Navier-Stokes computations for the two el-ement airfoil configuration as shown in figures6.3c-d. The effects of wind tunnel walls have beenmodeled in the computation by assuming an in-viscid wall boundary condition. Mach numbercontours are shown in figure 6.3c. Observe thatthe contours appear very smooth, even in regionswhere the mesh becomes very irregular. This isdue to the insistance that linear functions be ac-curately treated in the flow solver reguardless ofmesh irregularities.

Figure 6.3a Mesh near Multi-element airfoil.

Page 59: SOLVERS FOR THE EULER AND NAVIER-STOKES EQUATIONS · plane, each region being the portion of the plane closer to some given point P of the set of points Mesh Median Dual CCJ,troid

0.C)

-0.25 0.00 0.25 0.50 0.75 1.00 1.25 1.50x/c

Figure 6.3d Pressure coefficient distribution onairfoil.

6-59

Figure 6.3b Contours of distance function forturbulence model.

Figure 6.3c Closeup of Mach number contoursnear airfoil.

Pressure coefficient distribution on the mainairfoil and flap are graphed in figure 6.3d. Com-parison of calculation and experiment on the mainelement is very good. The suction peak values ofpressure coefficient on the flap element are slightlybelow the experiment. The experimentors alsonote a small separation bubble at the trailing edgeof the flap which was not found in the computa-tions.

References

1. Guibas, L.J., and StolfI, J.,"Primitives forthe Manipulation of General Subdivisions andthe Computation of Voronoi Diagrams" ,ACMTrans. Graph., Vol. 4, 1985, pp. 74-123.

2. Dobkin, D.P., and Laszlo, M.J.,"Primitivesfor the Manipulation of Three-dimensionalSubdivisions", Algorithmica, Vol. 4, 1989,pp. 3-32.

3. Brisson, E., "Representing Geometric Struc-tures in d Dimensions: Topology and Order",In Proceedings of the 5th ACM Symposiumon Computational Geometry., 1989, pp. 218-227.

4. Hammond, S., and Barth, T.J., "An EfficientMassively Parallel Euler Solver for Unstruc-tured Grids", AIAA paper 91-0441, Reno,1991.

5. Chrobak, M. and Eppstein, D., "Planar Ori-entations with Low Out-Degree and Com-paction of Adjacency Matrices", Theo. Comp.Sci., Vol. 86, No. 2, 1991, pp.243-266.

6. Rosen, R., "Matrix Band Width Minimiza-tion", Proc. ACM Nat. Conf., 1968, pp.585-595.

7. Cuthill, E., and McKee, J.,"Reducing theBand Width of Sparse Symmetric Matrices",Proc. ACM Nat. Conf., 1969, pp. 157-172.

8. George, J.A,"Computer Implementation ofthe Finite Element Method", Techical Re-port No. STAN-CS-71-208, Computer Sci-ence Dept., Stanford University, 1971.

9. Venktakrishnan, V., Simon, H.D., Barth, T.J.,"A MIMD Implementation of a Parallel Eu-ler Solver for Unstructured Grids", NASA

Page 60: SOLVERS FOR THE EULER AND NAVIER-STOKES EQUATIONS · plane, each region being the portion of the plane closer to some given point P of the set of points Mesh Median Dual CCJ,troid

6-60

AmesR.C., Tech. Report RNR-91-024, 1991.10. Simon, H.D., "Partitioning of Unstructured

Problems for Parallel Processing," NASAAmesR.C., Tech. Report RNR-91-008, 1991.

11 Lawson, C. L., "Software for C l Surface In-terpolation", Mathematical Software III, (Ed.,John R. Rice), Academic Press, New York,1977.

12. Rajan, V. T., "Optimality of the DelaunayTriangulation in Proceedings of the 7thACM Symposium on Computational Geom-etry, 1991, pp. 357-372.

13. Rippa, S., "Minimal Roughness Property ofthe Delaunay Triangulation", CAGD, Vol. 7,No. 6., 1990, pp-489--497.

14. Bowyer, A., "Computing Dirichlet Tessella-tions", The Computer Journal, Vol. 24, No.2, 1981, pp. 162-166.

15. Watson, D. F, "Computing the n-dimensionalDelaunay Tessellation with Application toVoronoi Polytopes," The Computer Journal,Vol. 24, No. 2, 1981, pp. 167-171.

16. Baker, T. J. ,"Automatic Mesh Generationfor Complex Three-Dimensional Regions Us-ing a Constrained Delaunay Triangulation",Engineering with Computers, Vol. 5, 1989,pp. 161-175.

17 Green, P. J. and Sibson, R., "Computingthe Dirichlet Tesselation in the Plane", TheComputer Journal, Vol. 21, No. 2, 1977, pp.168-173.

18. Tanemura, M., Ogawa, T., and Ogita, N., "ANew Algorithm for Three-Dimensional VoronoiTesselation", J. Comput. Phys., Vol. 51,1983, pp. 191-207.

19. Merriam, M. L., "An Efficient Advancing FrontAlgorithm for Delaunay Triangulation", AIAApaper 91-0792, Reno, NV, 1991.

20. Klee, V., "On the Complexity of d-dimensionalVoronoi diagrams", Archiv der Mathematik,Vol. 34, 1980.

21. Lawson, C. L., "Properties of n-dimensionalTriangulations" CAGD, Vol. 3, April 1986,pp. 231-246.

22. Babuka, I., and Aziz, A. K., "On the AngleCondition in the Finite Element Method",SIAM J. Numer. Anal., Vol. 13, No. 2,1976.

23. Edelsbrunner, H., Tan, T.S, and Waupotitsch,R., "An 0(n2 log n) Time Algorithth for theMinMax Angle Triangulation," Proceedingsof the 6th ACM Symposium on Computa-tional Geometry, 1990, pp. 44-52.

24. Wiltberger, N. L., Personal Communication,NASA Ames Research Center, M.S. 258-1,

Moffett Field, CA, 1991.25 Gilbert, P.N., "New Results on Planar Tri-

angulations", Tech. Rep. ACT-is, Coord.Sd. Lab., University of Illinois at Urbana,July 1979.Nira, D., Levin, D., Rippa, S.,"Data Depen-dent Triangulations for Piecewise Linear In-terpolation", J. Numer. Anal., Vol. 10, No.1, 1990, pp. 137-154.

27 Nira, D., Levin, D., Rippa, S.,"Algorithmsfor the Construction of Data Dependent Tri-angulations", Algorithms for Approxima-tion, II, Chapman, and Hall, London, 1990,pp. 192-198.

28. Holmes, G. and Snyder, D., "The Genera-tion of Unstructured Triangular Meshes us-ing Delaunay Triangulation," in NumericalGrid Generation in CFD, pp. 643-652, Piner-idge Press, 1988.

29. Warren, G., Anderson, W.K., Thomas, J.L.,and Krist, S.L.,"Grid Convergence for Adap-tive Methods,", AIAA paper 91-1592-CP, Hon-olulu, Hawaii, June 24-27,1991.

30. Anderson, W.K., "A Grid Generation and FlowSolution Method for the Euler Equations onUnstructured grids," NASA Langley ResearchCenter, USA, unpublished manuscript, 1992.

31. Joe, B., "Three-Dimensional Delaunay Trian-gulations From Local Transformations", SIAMJ. Sci. Stat. Comput., Vol. 10, 1989, pp.718-741.

32. Joe, B., "Construction of Three-DimensionalDelaunay Triangulations From Local Trans-formations", CAGD, Vol. 8, 1991, pp. 123-142.

33. Gandhi, A. S., and Barth T. J.,"3-D Un-structured Grid Generation and RefinementUsinge 'Edge-Swapping' ", NASA TM inpreparation, 1992.

34. Godunov, S. K., "A Finite Difference Methodfor the Numerical Computation of Discon-tinuous Solutions of the Equations of FluidDynamics", Mat. Sb., Vol. 47, 1959.

35. Van Leer, B., "Towards the Ultimate Conser-vative Difference Schemes V. A Second Or-der Sequel to Godunov's Method", J. Comp.Phys., Vol. 32, 1979.

36. Colella, P., Woodward, P., "The PiecewiseParabolic Method for Gas-Dynamical Simu-lations", J. Comp. Phys., Vol. 54, 1984.

37 Woodward, P., Colella, P., "The NumericalSimulation of Two-Dimensioal Fluid Flow withStrong Shocks" J. Comp. Phys., Vol. 54,1984.

38. Harten, A. , Osher, S., "Uniformly High-

Page 61: SOLVERS FOR THE EULER AND NAVIER-STOKES EQUATIONS · plane, each region being the portion of the plane closer to some given point P of the set of points Mesh Median Dual CCJ,troid

6-61

Order Accurate Non-oscillatory Schemes, I.,"MRC Technical Summary Report 2823, 1985.

39. Harten, A., Engquist, B., Osher, S., Chak-ravarthy, "Uniformly High Order AccurateEssentially Non - Oscillatory Schemes III,ICASE report 86-22, 1986.

40. Barth, T. 3., and Jespersen, D. C., "The De-sign and Application of Upwind Scehemes onUnstructured Meshes", AIAA-89-0366, Jan.9-12, 1989.

41 Barth, T. 3., and Frederickson, P. o., "HigherOrder Solution of the Euler Equations onUnstructured Grids Using Quadratic Recon-struction", AIAA-90-0013, Jan. 8-11, 1990.

42. Chiocchia, G., " Exact Solutions to Tran-sonic and Supersonic Flows", AGARD Ad-visory Report AR-211,1985.

43. Barth, T. J.,"A Three-Dimensional UpwindEuler Solver of Unstructured Meshes," AIAAPaper 91-1548, Honolulu, Hawaii, 1991.

44. Struijs, R., Vankeirsblick, and Deconinck, H.,"An Adaptive Grid Polygonal Finite VolumeMethod for the Compressible Flow Equations,"AIAA-89-1959-CP, 1989.

45. Barth, T.J.,"Numerical Aspects of Comput-ing Viscous High Reynolds Number Flowson Unstructured Meshes", AIAA paper 91-0721, January, 1991.Ciarlet, P.G., Raviart, P.-A., "Maximum Prin-ciple and Uniform Convergence for the FiniteElement Method", Comp. Meth. in Appl.Mech. and Eng., Vol. 2., 1973, pp. 17-31.

47 Roe, P. L., "Approximate Riemann Solvers, Pa-rameter Vectors, and Difference Schemes",J. Comput. Phys., Vol 43, 1981.

48. Thomas, J.L., van Leer, B., and Walters,R.W., "Implicit Flux-Split Schemes for theEuler Equations," AIAA paper 85-1680, 1985.

49. Schmitt, V., and Charpin, F., "Pressure Dis-tributions on the ONERA M6-Wing at Tan-sonic Mach Numbers," in "Experimental DataBase for Computer Program Assessment,"AGARD AR-138,1979.

no Barth, T.J.,"Analysis of Implicit Local Lin-earization Techniques for Upwind and TVDSchemes," AIAA Paper 87-0595,1987.

51. Rostand, P., "Algebraic Turbulence Modelsfor the Computation of Two-dimensional HighSpeed Flows Using Unstructured Grids,"ICASE Report 88-63, 1988.

52. Mavriplis, D., "Adaptive Mesh Generationfor Viscous Flows Using Delaunay Triangu-lation," ICASE Report No. 88-47,1988.

53. Baldwin, B.S., and Barth, T.J.,"A One-EqnTurbulence Transport Model for High Reynoldi

Number Wall-Bounded Flows," NASA TM-102847, August 1990.

54. Cook, P.H., McDonald M.A., Firmin, M.C.P."AEROFOIL RAE 2822 Pressure Distribu-tions, and Boundary Layer and Wake Mea-surements," AGARD Advisory Report No.139, 1979.

55. Adair, D., and Home, W.C., "Characteris-tics of Merging Shear Layers and TurbulentWakes of a Multi-element Airfoil," NASATM 100053, Feb. 1988.