chapter 17: advancing front grid generationebrary.free.fr/mesh generation/handbook_of_grid...of grid...

22
©1999 CRC Press LLC 17 Advancing Front Grid Generation 17.1 Introduction 17.2 Mesh Generation Requirements 17.3 Geometry Modelling Description of the Computational Domain • Curve and Surface Representation • The Advancing Front Technique • Front Updating • Characterization of the Mesh: Mesh Parameters • Mesh Control • Background Mesh • Distribution of Sources • Calculation of the Transformation T • Curve Discretization • Triangle Generation in Two-Dimensional Domains • Mesh Quality Enhancement • Surface Discretization • Generation of Tetrahedra • Mesh Quality Assessment 17.4 Data Structures The Alternating Digital Tree • Geometric Searching • Geometric Intersection • The Use of the ADT for Mesh Generation 17.5 Conclusions 17.1 Introduction The advancing front technique (AFT) for the generation of unstructured triangular meshes was first formulated by George [14], but this original publication did not receive significant immediate attention. It seems that the first reference to this work appeared in an appendix of the book by Thomasset [32]. The first journal publication of the method was that of Lo [19], where the AFT was used to produce a triangulation by linking a set of points, which had been generated beforehand in a Cartesian fashion. The algorithm was modified by Peraire et al. [25], using a new formulation in which elements and points were simultaneously generated. The method also allowed for the generation of high aspect ratio triangles and, more importantly, grid control was introduced through the specification of a spatial variation of the desired element size and shape. This facility was later used for adaptive computations in computational fluid dynamics. The methodology was subsequently extended to three dimensions (3D) in [21,26,20,15,16]. The use of the AFT for 3D adaption in compressible flows is described in [28]. Recent implementations of the AFT that improve the generation times and/or the point placement/selection strategies have been reported [13,17,23,22,12]. In addition, the method has also been modified to produce a procedure for the gener- ation of unstructured meshes of quadrilaterals in [34, 4] and of hexahedrals in [5]. J. Peraire, J. Peiró K. Morgan

Upload: others

Post on 09-Jul-2020

10 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Chapter 17: Advancing Front Grid Generationebrary.free.fr/Mesh Generation/Handbook_of_Grid...of grid generation in which the domain is initially subdivided into an unstructured assembly

17Advancing Front Grid

Generation

17.1 Introduction 17.2 Mesh Generation Requirements 17.3 Geometry Modelling

Description of the Computational Domain • Curve and Surface Representation • The Advancing Front Technique • Front Updating • Characterization of the Mesh: Mesh Parameters • Mesh Control • Background Mesh • Distribution of Sources • Calculation of the Transformation T • Curve Discretization • Triangle Generation in Two-Dimensional Domains • Mesh Quality Enhancement • Surface Discretization • Generation of Tetrahedra • Mesh Quality Assessment

17.4 Data StructuresThe Alternating Digital Tree • Geometric Searching • Geometric Intersection • The Use of the ADT for Mesh Generation

17.5 Conclusions

17.1 Introduction

The advancing front technique (AFT) for the generation of unstructured triangular meshes was firstformulated by George [14], but this original publication did not receive significant immediate attention.It seems that the first reference to this work appeared in an appendix of the book by Thomasset [32].

The first journal publication of the method was that of Lo [19], where the AFT was used to producea triangulation by linking a set of points, which had been generated beforehand in a Cartesian fashion.

The algorithm was modified by Peraire et al. [25], using a new formulation in which elements andpoints were simultaneously generated. The method also allowed for the generation of high aspect ratiotriangles and, more importantly, grid control was introduced through the specification of a spatialvariation of the desired element size and shape. This facility was later used for adaptive computations incomputational fluid dynamics.

The methodology was subsequently extended to three dimensions (3D) in [21,26,20,15,16]. The useof the AFT for 3D adaption in compressible flows is described in [28]. Recent implementations of theAFT that improve the generation times and/or the point placement/selection strategies have been reported[13,17,23,22,12]. In addition, the method has also been modified to produce a procedure for the gener-ation of unstructured meshes of quadrilaterals in [34, 4] and of hexahedrals in [5].

J. Peraire, J. Peiró

K. Morgan

©1999 CRC Press LLC

Page 2: Chapter 17: Advancing Front Grid Generationebrary.free.fr/Mesh Generation/Handbook_of_Grid...of grid generation in which the domain is initially subdivided into an unstructured assembly

17.2 Mesh Generation Requirements

©1999 CRC Press LLC

A computational domain of complex geometrical shape may be discretized in terms of an unstructuredmesh of tetrahedra. This is an alternative to the approach based upon the use of the multi-block methodof grid generation in which the domain is initially subdivided into an unstructured assembly of hexahedralblocks and a structured hexahedral mesh is employed within each block (see, for example, Chapter 13and [1,31,33]). The unstructured mesh approach is attractive, as it offers the possibility of automatingthis procedure so that mesh generation times can be significantly reduced. In an unstructured mesh, thenumber of points and elements that are neighbors to an interior point will vary through the domain.This lack of regularity in the mesh means that the use of an unstructured mesh solution algorithmgenerally involves an additional cost, in terms of computer time and memory, when compared with itsstructured mesh counterparts. On the other hand, the unstructured mesh approach offers, as a counter-balance, a greater versatility and geometrical flexibility to the mesh generating process.

To take full advantage of these characteristics, the mesh generation procedure will be required tocomply with the following requirements:

• The algorithm should be able to handle arbitrary geometries in a fully automatic manner andwith minimum user intervention.

• The input data should be reduced to a computerized geometric representation of the domain tobe discretized.

• The approach followed should provide control over the spatial variation of element size and shapethrough the domain.

• Adaptive methods should be incorporated into the process, with the objective of producing themost accurate approximation of the solution for a given number of points.

The algorithmic procedure for the generation of elements and nodes to be described in the followingis a three-dimensional extension of the AFT method originally proposed in [25]. This method has beenimplemented in the FELISA system [24].

17.3 Geometry Modeling

The boundary of the computational domain has to be represented in a convenient mathematical formbefore the solution procedure can begin. As the objective is that the discretization of a domain of arbitrarygeometrical complexity should be accomplished in an automatic manner; the method adopted to achievethis mathematical description ought to possess the greatest possible generality. In addition, the computerimplementation of this description must provide the means for automatically computing any geometricalquantity relevant to the generation procedure. The area of solid modeling provides [29] the most generalup-to-date set of methods for the computational representation and analysis of general shapes matchingthe above requirements.

In this section we give a brief description of the geometry modeling strategy that is employed. Moresophisticated representations that ease the task of performing quick geometry modifications, could alsobe used [11].

17.3.1 Description of the Computational Domain

In the case of a planar two-dimensional analysis, the boundary of the computational domain is repre-sented by closed loops of orientated composite cubic spline curves (cf. Chapter 27) [11]. For simplyconnected domains these boundary curves are oriented in a counter-clockwise sense while for multiplyconnected regions the exterior boundary curves are given a counterclockwise orientation and all theinterior boundary curves are oriented in a clockwise sense (Figure 17.1).

Page 3: Chapter 17: Advancing Front Grid Generationebrary.free.fr/Mesh Generation/Handbook_of_Grid...of grid generation in which the domain is initially subdivided into an unstructured assembly

©1999 CRC Press LLC

In three dimensions, following solid modeling ideas, the domain to be discretized is viewed as a regionin R3, which is bounded by a general polyhedron whose vertices are points on curved surfaces whichintersect along curves. The edges of the polyhedron are segments on these intersection curves. In ournotation, the portions of these curves and surfaces needed to define the boundary of the three-dimen-sional domain of interest are called curve segments and surface regions, respectively. A surface region isrepresented as a region — a patch — on a surface delimited by curve segments. Each curve segment iscommon to two surface regions and is a segment of the intersection curve between their respectivesupport surfaces. Figure 17.2 shows the decomposition of the boundary of a three-dimensional domaininto its surface and curve components. The approximate representation of the curves and surfaces wherecurve segments and surface regions is accomplished by means of composite curves and surfaces (Chapter29 and [11]). These are called the curve and surface components.

In addition, boundary curves and surfaces are oriented (see Figure 17.3). This is important during thegeneration process as it defines the location of the region that is to be discretized. The orientation of aboundary surface is defined by the direction of the inward normal. The orientation of the boundarycurves is defined with respect to the boundary surfaces that contain them. Each boundary curve will becommon to two boundary surfaces and will have opposite orientations with respect to each of them.

17.3.2 Curve and Surface Representation

The problem of curve and surface representation is not considered here, as it has been described in detailin Part III of this Handbook.

FIGURE 17.1 Boundary orientation for a two-dimensional domain.

FIGURE 17.2 Decomposition of the boundary of a three-dimensional domain into its surface and curve components.

Page 4: Chapter 17: Advancing Front Grid Generationebrary.free.fr/Mesh Generation/Handbook_of_Grid...of grid generation in which the domain is initially subdivided into an unstructured assembly

©1999 CRC Press LLC

17.3.3 The Advancing Front Technique

The algorithmic procedure adopted for mesh generation is based upon the method originally proposedin [25] for two dimensions and then extended to three dimensions in [26, 27]. The approach is regardedas a generalization of the advancing front technique [14, 19] with the distinctive feature that elements,i.e., triangles or tetrahedra, and points are generated simultaneously. This enables the generation ofelements of variable size and stretching and differs from the approach followed in tetrahedral generatorsbased upon Delaunay concepts [2, 10], which generally connect mesh points that have already beendistributed in space (Chapter 16).

The generation problem consists of subdividing an arbitrarily complex domain into a consistentassembly of elements. The consistency of the generated mesh is guaranteed if the generated elementscover the entire domain and the intersection between elements occurs only on common points, sides ortriangular faces in the three dimensional case. The final mesh is constructed in what may be defined asa bottom-up manner. This means that the process starts by discretizing each boundary curve in turn.Nodes are placed on the boundary curve components and then contiguous nodes are joined with straightline segments. In the later stages of the generation process, these segments will become sides of triangularfaces. The length of these segments must therefore, be consistent with the desired local distribution ofmesh size. This operation is repeated for each boundary curve in turn.

The next stage consists of generating planar faces. For each two-dimensional region or surface to bediscretized, all the sides produced when discretizing its boundary curves are assembled into the so-calledinitial front. The relative orientation of the curve components with respect to the surface must be takeninto account in order to give the correct orientation to the sides in the initial front. This front is used togenerated a triangular mesh on the surface. The size and shape of the generated triangles must beconsistent with the local desired size and shape. These triangles will become faces of the tetrahedra tobe generated later.

For the generation of tetrahedra the advancing front procedure is taken one step further. The front isnow made up of the triangular faces that are available to form a tetrahedron. The initial front is obtainedby assembling the triangulation of the boundary surfaces. Nodes and elements will be simultaneouslycreated. When forming a new tetrahedron, the three nodes belonging to a triangular face from the frontare connected either to an existing node or to a new node. After generating a tetrahedron, the front isupdated. The generation procedure is completed when the number of triangles in the front is zero.

FIGURE 17.3 Orientation of the boundary components in three dimensions.

Page 5: Chapter 17: Advancing Front Grid Generationebrary.free.fr/Mesh Generation/Handbook_of_Grid...of grid generation in which the domain is initially subdivided into an unstructured assembly

©1999 CRC Press LLC

17.3.4 Front Updating

The triangle generation algorithm utilizes the concept of a generation front. The front is a dynamic datastructure that changes continuously during the generation process. At the start of the process the frontconsists of the sequence of straight line segments that connect consecutive boundary nodes. At any giventime, the front contains the set of all the sides which are currently available to form a triangular face.

Any straight line segment that is available to form an element side is termed active, whereas anysegment no longer active is removed from the front. During the generation process an active side isselected from the front and a triangular element is generated. This may involve creating a new node orsimply connecting to an existing one. After the triangle has been generated, the front is updated. Thisupdating process is illustrated in Figure 17.4.

Thus while the domain boundary will remain unchanged, the generation front changes continuouslyand needs to be updated whenever a new element is formed. The generation proceeds until the front isempty. Figure 17.5 illustrates the idea of the advancing front technique for a circular planar domain byshowing the initial front and the form of the mesh at various stages during the generation process.

17.3.5 Characterization of the Mesh: Mesh Parameters

The geometrical characteristics of a general mesh are locally defined in terms of certain mesh parameters.If N is the number of dimensions (two or three) then the parameters used are a set of N mutuallyorthogonal directions α i; i = 1, …, N, and N associated element sizes δi; i = 1, …, N (see Figure 17.6).Thus, at a certain point, if all N element sizes are equal, the mesh in the vicinity of that point will consist

FIGURE 17.4 The front updating procedure in two dimensions. (a) The initial generation front. (b) Creation of anew element: (1) no new point is created; (2) the new point 19 is created. (c) The updating of the front for the case(b) (2).

Page 6: Chapter 17: Advancing Front Grid Generationebrary.free.fr/Mesh Generation/Handbook_of_Grid...of grid generation in which the domain is initially subdivided into an unstructured assembly

©1999 CRC Press LLC

of approximately equilateral elements. To aid the mesh generation procedure, a transformation T whichis a function of α i and δi is defined. This transformation is represented by a symmetric N × N matrixand maps the physical space onto a space in which elements, in the neighborhood of the point beingconsidered, will be approximately equilateral with unit average size. This new space will be referred toas the normalized space. For a general mesh this transformation will be a function of position. Thetransformation T is the result of superimposing N scaling operations with factors in each α i direction.Thus

(17.1)

where ⊗ denotes the tensor product of two vectors. The effect of this transformation in two dimensionsis illustrated in Figure 17.7 for the case of constant mesh parameters throughout the domain.

17.3.6 Mesh Control

The inclusion of adequate mesh control is a key ingredient in ensuring the generation of a mesh of thedesired form. Control over the characteristics is obtained by the specification of a spatial distribution ofmesh parameters. This is accomplished by means of the background mesh supplemented by a distributionof sources.

17.3.7 Background Mesh

The background mesh is used for interpolation purposes only and is made up of triangles in twodimensions and tetrahedra in three dimensions. Values of α i and δi are defined at the nodes of thebackground mesh. The background mesh employed must cover the region to be discretized (seeFigure 17.8). In the generation of an initial mesh for the analysis of a particular problem, the backgroundmesh will usually consist of a small number of elements. The generation of the background mesh can

FIGURE 17.5 The advancing front technique showing different stages during the triangulation process.

1di

----

T α δδ

α αi iii

N

i i,( ) = ⊗=∑ 1

1

Page 7: Chapter 17: Advancing Front Grid Generationebrary.free.fr/Mesh Generation/Handbook_of_Grid...of grid generation in which the domain is initially subdivided into an unstructured assembly

©1999 CRC Press LLC

in this case be accomplished without resorting to sophisticated procedures, e.g., a background meshconsisting of a single element can be used to impose the requirement of a linearly varying or a constantspacing and stretching through the computational domain.

The effect of prescribing a variable mesh spacing and stretching is illustrated in Figure 17.9 for aproblem involving a rectangular domain, using a background mesh consisting of two triangular elements.

17.3.8 Distribution of Sources

For complex geometries, the manual definition of a background mesh can become a very tiresome task.The use of a distribution of sources eases the problem of ensuring the desired specification of the meshparameters in specific regions in the computational domain, such as the leading and trailing edges ofwings. In this approach, an isotropic* spatial distribution of element sizes is specified as a function of

FIGURE 17.6 Characterization of the mesh: (a) the mesh parameters in two dimensions, (b) the mesh parametersin three dimensions.

FIGURE 17.7 The effect of the transformation T for a constant distribution of the mesh parameters.

Page 8: Chapter 17: Advancing Front Grid Generationebrary.free.fr/Mesh Generation/Handbook_of_Grid...of grid generation in which the domain is initially subdivided into an unstructured assembly

©1999 CRC Press LLC

the distance x from the point of interest to a “source.” The source may take the form of a point, a linesegment or a triangle. The form adopted for the function is

(17.2)

This function is local in character and allows for a rapid increase in element size, thus ensuring that thenumber of generated elements around the source can be kept within reasonable bounds. The quantities

*The spacing at a point is the same in all directions.

FIGURE 17.8 The background mesh for the specification of a spatial distribution of mesh parameters.

FIGURE 17.9 Mesh generated for a rectangular domain using a background mesh consisting of two elements toillustrate the effect of variable mesh spacing and stretching.

δδ

δx

if x x

e if x x

c

c

x xcD xc

( ) =≤

−−

1

1

2log

Page 9: Chapter 17: Advancing Front Grid Generationebrary.free.fr/Mesh Generation/Handbook_of_Grid...of grid generation in which the domain is initially subdivided into an unstructured assembly

©1999 CRC Press LLC

δ1, D, and xc denote user-specified values that can be altered to control the form of δ(x). An example ofa mesh produced by such a function is shown in Figure 17.10.

For line and triangle sources the spacing δ at a point P is defined in a similar manner. We choose theclosest point S in the line or triangle to the point P — see Figure 17.11 — as a point source. The distancex is now the distance between the points P and S and the quantities δ1, D, and xc at point S are linearlyinterpolated from the nodal values at the points defining the line or triangle sources.

The spacing at a point is computed for the background mesh and for each of the user-defined point,line and triangle sources. The final spacing is computed as the minimum of all of them.

17.3.9 Calculation of the Transformation T

The generation process is always performed in a normalized space. The transformation T, given byEq. 17.1, is repeatedly used to transform regions in the physical space into regions in the normalizedspace. In this way the process is greatly simplified, as the desired size for a side, triangle, or tetrahedronin this space is always unity. After the element has been generated, the coordinates of the newly createdpoint, if any, are transformed back to the physical space, using the inverse transformation.

FIGURE 17.10 Mesh generated for a rectangular domain using a point source.

FIGURE 17.11 Point, line, and triangle sources.

Page 10: Chapter 17: Advancing Front Grid Generationebrary.free.fr/Mesh Generation/Handbook_of_Grid...of grid generation in which the domain is initially subdivided into an unstructured assembly

©1999 CRC Press LLC

At any point of the computational domain the transformation T is computed as follows. First, theelement of the background mesh that contains the point is found and the transformation Tb is computedby linearly interpolating its components from the element nodal values. The stretching directions α b

i

and corresponding spacings δ bi; i = 1, 2, 3 are obtained from the eigenvalues and eigenvectors of the

matrix Tb. The spacings δ bi are then modified to account for the distribution of sources. The new spacings

δ *i at the point are computed as the smallest of the spacings defined by all the sources and the current

spacing δ bi . Finally, the transformation T is obtained by substituting the values of α b

i and δ *i in the

formula Eq. 17.1.

17.3.10 Curve Discretization

The discretization of the boundary curve compounds is achieved by positioning nodes along the curveaccording to a spacing dictated by the local value of the mesh parameters. Consecutive points are joinedby straight lines to form sides. The manner by which this can be accomplished has been described indetail in Chapter 16.

17.3.11 Triangle Generation in Two-Dimensional Domains

The triangle generation algorithm utilizes the concept of a generation front. At the start of the processthe front of the sequence of straight-line segments that connect consecutive boundary nodes. During thegeneration process, any straight-line segment that is available to form an element side is termed active,whereas any segment that is no longer active is removed from the front. Thus, while the domain boundarywill remain unchanged, the generation front changes continuously and needs to be updated whenever anew element is formed along the steps described in Section 17.3.4.

In the process of generating a new triangle the following steps are involved (Figure 17.12):

FIGURE 17.12 The generation of a new triangle.

Page 11: Chapter 17: Advancing Front Grid Generationebrary.free.fr/Mesh Generation/Handbook_of_Grid...of grid generation in which the domain is initially subdivided into an unstructured assembly

1. Select a side

AB

of the front to be used as a base for the triangle to be generated. Here, the criterionis to choose the shortest side. This is especially advantageous when generating irregular meshes.

©1999 CRC Press LLC

2. Interpolate from the background mesh the transformation T at the center of the side M and applyit to the nodes in the front that are relevant to the triangulation. In our implementation we definethe relevant points to be all those that lie inside the circle of center M and radius three times thelength of the side being considered. Let , and denote the positions in the normalizedspace of the points A, B, and M, respectively.

3. Determine, in the normalized space, the ideal position for the vertex of the triangular element.The point is located on the line perpendicular to the side that passes through the point and at a distance δ1 from the points and . The direction in which is generated is determinedby the orientation of the side. The value δ1 is chosen according to the criterion

(17.3)

where L is the distance between points and . Only in situations where the side AB happensto have characteristics very different from those specified by the background mesh will the valueof δ1 be different from unity. However, the above inequalities must be taken into account to ensuregeometrical compatibility. Expression (3) is pure empirical, and different inequalities could bedevised to serve the same purpose.

4. Select other possible candidates for the vertex and order them in a list. Two types of points areconsidered viz. (a) all the nodes , , … in the current generation front that are, in thenormalized space, interior to a circle with center and radius r = δ1, and (b) the set of points

, …, generated along the height . For each point , construct the circle, with center on the line defined by points and , and that passes through the points , and .

The position of the centers, , of these circles, on the line , defines an ordering of the points. A list is created that contains all the points in which the point with the furthest centerfrom in the direction appears at the head of list. The points , …, are added atthe end of this list.

5. Select the best connecting point. This is the first point in the order list which gives a consistenttriangle. Consistency is guaranteed by ensuring that none of the newly created sides intersectswith any of the existing sides in the front.

6. Finally, if a new node is created, its coordinates in the physical space are obtained by using theinverse transformation T–1.

7. Store the new triangle and update the front by adding/removing the relevant sides.

This mesh generation procedure is schematically presented in the diagram shown in Figure 17.13.

17.3.12 Mesh Quality Enhancement

In order to enhance the quality of the generated mesh, two post-processing procedures are applied. Theseprocedures, which are local in nature, do not alter the total number of points or elements in the mesh.

• Diagonal swapping: This changes the connectivities among nodes in the mesh without altering theirposition. This process requires a loop over all the element sides, excluding those sides on the boundary.For each side AB (Figure 17.14), common to the triangles ABC and ADB, one considers the possibilityof swapping AB by CD, thus replacing the two triangles ABC and ADB by the triangles ADC and BCD.The swapping is performed if a prescribed regularity criterion is better satisfied by the new configu-ration than by the existing one. In our implementation, the swapping operation is performed if theminimum angle occurring in the new configuration is larger than that in the original configuration.

A B M

P1

P1 MA B P1

δ1

1 00 0 55 1 00 2 00

0 55 0 55 1 00

2 00 1 00 2 00

=× < < ×

× × <× > ×

. . . .

. . .

. . .

if L L

L if L

L if L

A B

Q1 Q2

P1

P1

P5

P1M Qi

CQi

P1

M Qi A B1

CQi

P1M Q

i

Qi

P1

P1M P

1P

5

Page 12: Chapter 17: Advancing Front Grid Generationebrary.free.fr/Mesh Generation/Handbook_of_Grid...of grid generation in which the domain is initially subdivided into an unstructured assembly

©1999 CRC Press LLC

• Mesh smoothing: This alters the positions of the interior nodes without changing the topology ofthe mesh. The element sides are considered as springs and the stiffness of a spring is assumed tobe proportional to its length. The nodes are moved until the spring system is in equilibrium. Theequilibrium positions are found by iteration. Each iteration amounts to performing a loop overthe interior points and moving their coordinates to coincide with those of the centroid of theneighboring points. Usually three to five iterations are performed.

FIGURE 17.13 Flow chart for mesh generation using the advancing front technique. Double lined boxes are onlyrequired if the effect of variable mesh size and stretching are to be included.

FIGURE 17.14 The diagonal swapping procedure: (a) nonadmissible, (b) admissible.

Page 13: Chapter 17: Advancing Front Grid Generationebrary.free.fr/Mesh Generation/Handbook_of_Grid...of grid generation in which the domain is initially subdivided into an unstructured assembly

©1999 CRC Press LLC

The combined application of these two post-processing algorithms is found to be very effective inimproving the smoothness and regularity of the generated mesh.

17.3.13 Surface Discretization

The method followed for the triangulation of the surface components is an extension of the meshgeneration procedure for planar domains described above. The discretisation of each surface componentis accomplished by generating a two-dimensional mesh of triangles in the parametric plane (u1, u2) andthen using the mapping r(u1, u2) defined in Section 17.3. This mapping establishes a one-to-one corre-spondence between the surface component and a region on the parametric plane (u1, u2). Thus, aconsistent triangular mesh in the parametric plane will be transformed, by the mapping r(u1, u2), intoa valid triangulation of the surface component. The construction of the triangular mesh in the parameterplane (u1, u2) using the two dimensional mesh generator, requires the determination of an appropriatespatial distribution of the two dimensional mesh parameters. This problem has been addressed in detailin Chapter 19.

17.3.14 Generation of Tetrahedra

The starting point for the discretization of the three-dimensional domain into tetrahedra is the formationof the initial generation front. The initial front is the set of oriented triangles that constitutes thediscretized boundary of the domain and is formed by assembling the discretized boundary surfacecomponents. The order in which the nodes of these triangles are given defines the orientation, which isthe same as that of the corresponding boundary surface component. The algorithm for generatingtetrahedra is analogous to that described above for the generation of triangles (see Figure 17.13). However,in the three-dimensional case the range of possible options at each stage is much wider and the numberof geometrical operations involved increases considerably. Thus, the ability of the method to produce amesh, and the efficiency of its implementation, relies heavily upon the type of strategy selected. Thegeneration of a generic tetrahedral element involves the following steps (Figure 17.15):

FIGURE 17.15 The generation of a tetrahedral element.

Page 14: Chapter 17: Advancing Front Grid Generationebrary.free.fr/Mesh Generation/Handbook_of_Grid...of grid generation in which the domain is initially subdivided into an unstructured assembly

1. Select a triangular face ABC from the front to be a base for the tetrahedron to be generated. Inprinciple, any face could be chosen, but we have found it to be advantageous in practice to consider

©1999 CRC Press LLC

the smallest faces first. For this purpose, the size of the face is defined in terms of the size of itsshortest height.

2. Interpolate from the background mesh the transformation T at the centroid of the face M andapply it to the nodes in the front that are relevant to the triangulation. In our implementation,we define the relevant points to be those which lie inside the sphere of center M with radiusequal to three times the value of the maximum dimension of the face being considered. Let ,

, and denote the positions in the normalized space of the points A, B, C, and M,respectively.

3. Determine, in the transformed space, the ideal position for the vertex of the tetrahedralelement. The point lies on the line that passes through the point and is perpendicular tothe face. The direction in which is generated is determined by the orientation of the face. Thelocation of is computed so that the average length of the three newly created sides, which joinpoint with points , , and , is unity. For faces whose size in the parametric plane is verydifferent from unity, this step may have to be modified, as in Eq. 17.3, to ensure geometricalcompatibility. However, such cases rarely occur in practice. Let δ1 be the maximum of the distancesbetween point and points , , and .

4. Select other possible candidates for the vertex and order them in a list. Two types of points areconsidered viz. (a) all the nodes , , … in the current generation front which are, in thenormalized space, interior to a sphere with center and radius r = δ1, and (b) a new set ofpoints , …, generated along the height . Consider the set of points , , and and denote by the member of this set that is furthest away from . For each point ,construct the sphere with center on the line defined by points and and which passesthough points and . The position of the centers of these spheres on the line defines an ordering of the points in which the point with the furthest center from inthe direction appears at the head of list. The points , …, are added at the end ofthis list.

5. Select the best connecting point. This is the first point in the ordered list that gives a consistenttetrahedron. Consistency is guaranteed by ensuring that none of the newly created sides intersectswith any of the existing faces in the front, and that none of the existing sides in the front intersectwith any of the newly created faces.

6. If a new node is created, its coordinates in the physical space are obtained by using the inversetransformation T–1.

7. Store the new tetrahedron and update the front by adding/removing the necessary triangles.

17.3.15 Mesh Quality Assessment

Any discussion of mesh quality should be intimately related to the form of the solution we are trying torepresent on that mesh. Two factors need to be considered here:

1. Determination of the characteristics of the optimal mesh for the problem at hand. This introducesthe concept of adaptivity and this aspect is considered elsewhere.

2. Assessment on how well the generated mesh meets the requirements specified by the mesh param-eters. This assessment can be made by examining the generated mesh and determining the statis-tical distribution of certain indicators. For example, in Figure 17.16 we have chosen as indicatorsthe number of elements around a side, the magnitude of the element dihedral angles, and thelength of the side. These indicators are compared with optimal values, i.e., those of a regulartetrahedron that has the exact dimensions specified by the mesh parameters.

AB C M

P1

P1

MP

1

P1

P1

A B C

P1

A B C

Q1

Q2

MP

1P

5P

1M A B C

D M Qi

CQi

P1

MQ

iD CQ

iP

1M

Q1

P1

P1M P

1P

5

Page 15: Chapter 17: Advancing Front Grid Generationebrary.free.fr/Mesh Generation/Handbook_of_Grid...of grid generation in which the domain is initially subdivided into an unstructured assembly

©1999 CRC Press LLC

17.4 Data Structures

From Section 17.2 it is apparent that a successful implementation of the mesh generation algorithm willrequire the use of data structures that enable certain sorting and searching operations to be performedefficiently. For instance, the generation front will require a data structure that allows for the efficientinsertion/deletion of sides/faces and that also allows for the efficient identification of the sides/faces thatintersect with a prescribed region in space.

The problem of determining the members of a set of n points that lie inside a prescribed subregionof an N-dimensional space is known as geometric searching. Several algorithms have been proposed [3,30, 9] that solve this problem, or equivalent problems, with a computational expense proportional tolog(n). The problem complexity increases considerably when, instead of considering points, one dealswith finite size objects such line segments, triangles, or tetrahedra. A common problem encounteredhere, namely geometric intersection, consists of finding the objects that overlap a certain subregion ofthe space being considered. The algorithm adopted here for solving these problems in three dimensionsis based on the use of the alternating digital tree [7].

The alternating digital tree (ADT) algorithm allows for the efficient solution of the geometric searchingand intersection problem. It naturally offers the possibility of inserting and removing points and optimallysearching for the points contained inside a given region. The ADT algorithm is an extension of the so-called digital binary tree search technique, which is exhaustively used in [18] for one-dimensionalproblems. It is applicable to any number of dimensions, and allows any geometrical object in an N-dimensional space to be treated as a point in a 2N-dimensional space.

The following sections describe the ADT algorithm, and the associated data structures employed, forthe efficient solution of the geometric searching problem.

FIGURE 17.16 Mesh quality statistics.

Page 16: Chapter 17: Advancing Front Grid Generationebrary.free.fr/Mesh Generation/Handbook_of_Grid...of grid generation in which the domain is initially subdivided into an unstructured assembly

©1999 CRC Press LLC

17.4.1 The Alternating Digital Tree

Binary trees provide the basis for several searching algorithms, including the one to be presented here.A detailed exposition of binary tree structures can be found in Chapter 14 and references therein.

Consider a set of n points in a N-dimensional space (RN) and assume for simplicity that the coordinatevalues of their position vectors x1, x2, …, xn, after adequate scaling, vary within the interval [0, 1). Theaim of geometric searching algorithms is to select from this set those points that lie inside a givensubregion of the space. To facilitate their representation, only rectangular — or “hyper-rectangular” —regions will be considered, thereby allowing their definition in terms of the scaled coordinates of thelower and upper vertices as (a, b).

Comparing the coordinates of each point k with the vertex coordinates of a given subregion, to checkwhether the condition ai ≤ xi

k ≤ bi is satisfied for i = 1, 2, …, N, would render the cost of the searchingoperation proportional to the number of points n. This computational expense, however, can be sub-stantially reduced by storing the points in a binary tree, in such a way that the structure of the tree reflectsthe positions of the points in space. There exist several well-known algorithms that will accomplish thiseffect for one dimensional problems; the most popular are the binary search tree and digital tree methods[18]. Binary search trees have been extended to N-dimensional problems in [6], but the resulting treestructure, known as N-d trees, do not allow for the efficient deletion of nodes. The algorithm presentedhere is a natural extension of the one- dimensional digital tree algorithm and overcomes the difficultiesencountered in N-d trees.

Broadly speaking, an alternating digital tree can be defined as a binary tree in which a set of n pointsare stored according to certain geometrical criteria. These criteria are based on the similarities arisingbetween the hierarchical and parental structure of a binary tree and a recursive bisection process: eachnode in the tree has two sons, likewise a bisection process divides a given region into two smallersubregions. Consequently, it is possible to establish an association between tree nodes and subregions ofthe unit hypercube as follows: the root represents the unit hypercube itself; this region is now bisectedacross the x1 axis and the region for which 0 ≤ x1 < 0.5 is assigned to the left son and the region forwhich 0.5 ≤ x1 < 1 is assigned to the right son; at each of these nodes the process is repeated across thex2 direction as shown in Figure 17.17. In a two-dimensional space this process can be repeated indefinitelyby choosing x1 and x2 directions in alternating order; similarly, in a general N-dimensional space, theprocess can be continued by choosing directions x1, x2, …, xN in cyclic order.

Generally, if a node k at the hierarchy level m — the root being level 0 — represents a region (ck, dk), thesubregions associated to its left and right sons, (cl

k, dlk) and (cr

k, drk) result from the bisection of (ck, dk) by a

plane normal to the jth coordinate axis, where j is shown cyclically from the N space directions as:

(17.4)

and mod(m, N) denotes the remainder of the quotient of m over N. Hence (clk, dl

k) and (crk, dr

k) areobtained as

(17.5)

FIGURE 17.17 The relation between a binary tree and a bisection process.

j m N= + ( )1 mod ,

c c d d i j c c d c dkli

ki

kli

ki

klj

kj

klj

kj

kj= = /= = = +( ), , for and

12

Page 17: Chapter 17: Advancing Front Grid Generationebrary.free.fr/Mesh Generation/Handbook_of_Grid...of grid generation in which the domain is initially subdivided into an unstructured assembly

(17.6)c c d d i j c c d d dkri

ki

kri

ki

klj

kj

kj

klj

kj= = /= = +( ) =, , for and

12

©1999 CRC Press LLC

This correlation between nodes and subdivisions of the unit hypercube allows an ADT to be furtherdefined by imposing that each point in the tree should lie inside the region corresponding to the nodewhere it is stored. Consequently, if node k of an ADT structure contains a point with coordinates xk, thefollowing condition must be satisfied:

(17.7)

17.4.2 Geometric Searching

Consider now a set of points stored in an ADT structure. The fact that Eq. 17.7 is satisfied by every pointprovides the key to the efficient solution of a geometric searching problem. To illustrate this, note firstthat the recursive structure of the bisection process described above implies that the region related to agiven node k contains all the subregions related to notes descending from k; consequently, all pointsstored in these nodes must also lie inside the region represented by node k. For instance, all points inthe ADT structure are stored in nodes descended from the root and, clearly, all of them lie inside theunit hypercube — the region associated with the root. Analogously, the complete set of points stored inany subtree is inside the region represented by the root of the subtree.

This feature can be effectively used to reduce the cost of a geometric searching process by checking,at any node k, the intersection between the searching range (a, b) and the region represented by node k,namely (ck, dk). If these two regions fail to overlap, then the complete set of points stored in the subtreerooted at k can be disregarded from the search, thus avoiding the need to examine the coordinates ofevery single point.

Consequently, a systematic procedure to select the points that lie inside a given searching range (a, b)can be derived from the traversal algorithm previously presented. Now the generic operation “visit theroot” can be reinterpreted as checking whether the point stored in the root falls inside the searchingrange. Additionally, the left and right subtrees need to be traversed only if the regions associated withtheir respective root nodes intersect with the range.

17.4.3 Geometric Intersection

Geometrical intersection problems can be found in many applications; for instance, a common problemthat may emerge in contact algorithms [8], hidden-line removal applications, or in the advancing frontmesh generation algorithm presented in Section 17.2, is to determine from a set of three-nodedtriangular elements those which intersect with a given line segment. Similar problems, involving othergeometrical objects, are encountered in a wide range of geometrical applications. In general, a geo-metric intersection problem consists of finding from a set of geometrical objects those which intersectwith a given object. If every one-to-one intersection is investigated, the solution of these problems canbecome very expensive, especially when complex objects such as curves or surfaces are involved.Fortunately, many of these one-to-one intersections can be quickly discarded by means of a simplecomparison between the coordinate limits of every given pair of objects. For instance, a triangle withx-coordinate varying from 0.5 and 0.7 cannot intersect with a segment with x-coordinate ranging from0.1 to 0.3. Generally, the intersection between two objects in the N-dimensional Euclidean space,requires each of the N pairs of coordinate ranges to overlap. Consider for instance the intersectionproblem between triangular facets and a target straight line segment in R3; then, if (xk,min, xk,max) arethe coordinate limits of element k and (x0,min, x0,max) are the lower and upper limits of the target segment(see Figure 17.18), an important step toward the solution of a geometric intersection problem is toselect those that satisfy the inequality

c x d i Nki

ki

ki≤ < =for ...1 2, , ,

Page 18: Chapter 17: Advancing Front Grid Generationebrary.free.fr/Mesh Generation/Handbook_of_Grid...of grid generation in which the domain is initially subdivided into an unstructured assembly

©1999 CRC Press LLC

(17.8)

The cost of checking Eq. 17.8 for every element grows proportionally to n, and for very numerous setsmay become prohibitive. This cost, however, can be substantially reduced by using a simple devicewhereby the process of selecting those elements that satisfy Eq. 17.8 can be interpreted as a geometricsearching problem. Additionally, since the number of elements that satisfy Eq. 17.8 will normally be muchsmaller than n, the cost of determining which of these intersects with the target segment becomesaffordable.

In order to interpret Eq. 17.8 as a geometric searching problem, it is first convenient to assume thatall the elements to be considered lie inside a unit hypercube — a requirement that can be easily satisfiedthrough adequate scaling of the coordinate values. Consequently, Eq. 17.8 can be rewritten as

(17.9)

Consider now a given object k in RN with coordinate limits xk,min, and xk,max; combining this two setsof coordinate values, it is possible to view an object k in RN as a point in R2N with coordinates xi

k for i= 1, 2, …, 2N defined as (see Figure 17.19):

(17.10)

Using this representation of a given object k, Eq. 17.9 becomes simply:

FIGURE 17.18 The definition of coordinate limits for triangular elements and straight line segments.

x x

i N

x x

k mini

maxi

k maxi

mini

, ,

, ,

, ,...,

≤=

0

0

1 2 for

0

0

1

1

101

0

01 1

0

≤ ≤

≤ ≤

≤ ≤

≤ ≤

x x

x x

x x

x x

k min max

k minN

maxN

min k max

minN

k maxN

, ,

, ,

, ,

, ,

M

M

xk k min k minN

k max k maxN T

x x x x= [ ], , , ,..., , ,...,1 1

Page 19: Chapter 17: Advancing Front Grid Generationebrary.free.fr/Mesh Generation/Handbook_of_Grid...of grid generation in which the domain is initially subdivided into an unstructured assembly

©1999 CRC Press LLC

(17.11)

where a and b can be interpreted as the lower and upper vertices of a “hyper-rectangular” region in R2N

and, recalling Eq. 17.9, their components can be obtained in terms of the coordinate limits of the targetobject (see Figure 17.20) as

(17.12)

Consequently, the problem of finding which objects in RN satisfy Eq. 17.8 becomes equivalent to ageometric searching problem in R2N, i.e., obtaining the points xk that lie inside the region limited by aand b. Once this subgroup of elements has been selected, the intersection of each one of them with thetarget object must be checked to complete the solution of the geometric intersection problem.

17.4.4 The Use of the ADT for Mesh Generation

The advancing front algorithm described in Section 17.2 requires frequent use of operations such assearching, for the points inside a certain region of the space, and determining intersections betweengeometrical objects — in this case sides and faces. The complexity of the problem is increased by thefact that the set of faces forming the generation front changes continuously as new faces need to beinserted and deleted during the process. Clearly, for meshes consisting of a large number of elements thecost of performing this operations can be very important.

A successful implementation of the above algorithms has been accomplished by making extensive useof the ADT data structure. For instance, the algorithm for tetrahedra generation employs two treestructures; one for the faces in the front and the other for the sides defined by the intersection betweeneach pair of faces in the front. This combination allows a high degree of flexibility so that the operations

FIGURE 17.19 The representation of a region in R1 as a point in R2.

FIGURE 17.20 The intersection problem in R1 as a searching problem in R2.

a x b for i Niki≤ ≤ =1 1 2 2 , ,...,

a

b

= [ ]= [ ]

0 0

1 1

01

01

0

,..., , ,...,

,..., , ,...,

, ,

, ,

x x

x x

max o maxN T

min minN T

Page 20: Chapter 17: Advancing Front Grid Generationebrary.free.fr/Mesh Generation/Handbook_of_Grid...of grid generation in which the domain is initially subdivided into an unstructured assembly

©1999 CRC Press LLC

of insertion, deletion, geometric searching, and geometric intersection can be performed optimally. Theoverall computational performance of the algorithm is demonstrated by generating tetrahedral meshes,using the above method, for a unit cube (see Figure 17.21). Different numbers of elements have beenobtained by varying the mesh size. In Figure 17.21 the computer time required on a VAX 8700 machinehas been plotted against the number NE of elements generated. It can be observed that a typical NE ×log (NE) behavior is attained. Using this approach, meshes containing up to one million elements havebeen generated and no degradation in the performance has been detected.

17.5 Conclusions

A detailed description of the basics of a mesh generation procedure, based upon advancing front concepts,has been presented. Although no meshes for three-dimensional computational domains have beenincluded, there are numerous examples in the literature of the power of the approach when it is appliedto the problem of discretizing three dimensional domains of general complex shape [26, 17]. Recentimplementations [22] have been shown to be extremely robust and achieve a high level of computationalefficiency.

References

1. Allwright, S., Multiblock topology specification and grid generation for complete aircraft config-urations, Applications of Mesh Generation to Complex 3D Configurations, AGARD ConferenceProceedings, No. 464, pp. 11.1–11.11, 1990.

2. Baker, T. J., Unstructured mesh generation by a generalized Delaunay algorithm, Applications ofMesh Generation to Complex 3D Configurations, AGARD Conference Proceedings 1990, No. 464,pp. 20.1–20.10.

3. Bentley J. L. and Friedman, J.H., Data structures for range searching, Computing Surveys, 11, No4, 1979.

4. Blacker T. D. and Sthepenson, M.B., Paving: a new approach to automated quadrilateral meshgeneration, Int. J. Num. Meth. Eng., 32, pp. 811–847, 1991.

5. Blacker T. D. and Meyers, R.J., Seams and wedges in plastering: a 3d hexahedral mesh generationalgorithm, Eng. Computers, 9, pp. 83–93, 1993.

6. Bentley, J. L., Multidimensional binary search trees used for associative searching, Comm. ACM.18, No 1, 1975.

FIGURE 17.21 Mesh generation CPU times.

Page 21: Chapter 17: Advancing Front Grid Generationebrary.free.fr/Mesh Generation/Handbook_of_Grid...of grid generation in which the domain is initially subdivided into an unstructured assembly

7. Bonet J. and Peraire, J., An alternating digital tree (adt) algorithm for geometric searching andintersection problems, Int. J. Num. Meth. Eng., 31, pp. 1–17, 1990.

©1999 CRC Press LLC

8. Bonet, J., Finite element analysis of thin sheet superplastic forming process, Ph.D. Thesis, Univer-sity of Wales, C/PhD/128/89, 1989.

9. Boris, J., A vectorised algorithm for determining the nearest neighbours, J. Comp. Phys., 66, pp.1–20, 1986.

10. Cavendish, J. C., Field, D. A., and Frey, W. H., An approach to automatic three dimensional finiteelement mesh generation, Int. J. Num. Meth. Eng., 21, pp 329–348, 1985.

11. Faux, I. D. and Pratt, M. J., Computational Geometry for Design and Manufacture, Ellis Horwood,Chichester, 1981.

12. Formaggia, L., An unstructured mesh generation algorithm for three-dimensional aircraft config-urations, Numerical Grid Generation in CFD and Related Fields. (Ed.) Sanchez-Arcilla, A., et al.,

13. Frykestig, J., Advancing front mesh generation techniques with application to the finite elementmethod, Dept. of Structural Mechanics Publication 94, 10, Chalmers University of Technology,Göteborg, Sweden, 1994.

14. George, A. J., Computer implementation of the finite element method, Ph.D. Thesis, StanfordUniversity, STAN–CS–71–208, 1971.

15. Golgolab, A., Mailleur 3D automatique pour des géométries complexes, INRIA Research ReportNo 1004, March 1989.

16. Huet, F., Generation de maillage automatique dans des configurations tridimensionnelles com-plexes. Utilisation d’une Methode de Front, Applications of Mesh Generation to Complex 3D Con-figurations, AGARD Conference Proceedings, No. 464, pp 17.1–17.12, 1990.

17. Jin H. and Tanner, R.I., Generation of unstructured tetrahedral meshes by advancing front tech-nique,” Int. J. Num. Meth. Eng., 36, pp 1805–1823, 1993.

18. Knuth, D., The Art Of Computer Programming — Sorting And Searching, Vol. 3, Addison-Wesley,1973.

19. Lo, S. H., A new mesh generation scheme for arbitrary planar domains, Int. J. Num. Meth. Eng.,21, pp. 1403–1426, 1985,.

20. Lo, S. H., Volume discretization into tetrahedra — II. 3D triangulation by advancing frontapproach, Comp. Struct., 39, No 5, pp. 501–511, 1991.

21. Löhner R. and Parikh, P., Generation of three-dimensional unstructured grids by the advancing-front method, AIAA Paper AIAA-88-0515, 1988.

22. Löhner, R., Extensions and improvements of the advancing front grid generation technique, Comm.Num. Meth. Eng., 12, pp 683–702, 1996.

23. Möller P. and Hansbo, P., On advancing front mesh generation in three dimensions, Int. J. Num.Meth. Eng., 38, pp. 3551–3569, 1995.

24. Peiró, J., Peraire J., and Morgan, K., FELISA system reference manual. Part I: basic theory, CivilEng. Dept. Report, CR/821/94, University of Wales, Swansea, U.K., 1994. (More information aboutthe FELISA system is available at http://ab00.larc.nasa.gov/~kbibb/felisa.html.)

25. Peraire, J., Vahdati, M., Morgan, K., and Zienkiewicz, O.C., Adaptive remeshing for compressibleflow computations, J. Comp. Phys., 72, pp. 449–466, 1987.

26. Peraire, J. Peiró, J., Formaggia, L., Morgan, K., and Zienkiewicz, O.C., Finite element Eulercomputations in three dimensions, Int. J. Num. Meth. Eng., 26, pp. 2135–2159, 1988.

27. Peraire, J., Morgan, K., and Peiró, J., Unstructured finite element mesh generation and adaptiveprocedures for CFD, Applications of Mesh Generation to Complex 3D Configurations, AGARDConference Proceedings, No. 464, pp 18.1–18.12, 1990.

28. Peraire, J., Peiró, J., and Morgan, K., Adaptive remeshing for three-dimensional compressible flowcomputations, J. Comp. Phys., 103, pp. 269–285, 1992.

29. Requicha, A. A. G. and Voelcher, H. B., Solid modeling: a historical summary and contemporaryassessment, IEEE Computer Graphics and Applications, 3, 2, pp. 9–24, 1982.

Page 22: Chapter 17: Advancing Front Grid Generationebrary.free.fr/Mesh Generation/Handbook_of_Grid...of grid generation in which the domain is initially subdivided into an unstructured assembly

30. Shamos M. I. and Hoey, D., Geometric intersection problems, 17th Annual Symposium on Foun-dations of Computer Science, IEEE, 1976.

©1999 CRC Press LLC

31. Thompson, J. F., Warsi, Z. U. A., and Mastin, C. W., Numerical Grid Generation — Foundationsand Application, North-Holland, 1985.

32. Thomasset, F., Implementation of Finite Element Methods for Navier–Stokes Equations, SpringerSeries in Comp. Physics, 1981.

33. Weatherill, N. P., Mesh generation in computational fluid dynamics, von Karman Institute forFluid Dynamics Lecture Series 1989-04, Brussels, 1989.

34. Zhu, J. Z., Zienkiewicz, O. C., Hinton, E., and Wu, J., A new approach to the development ofautomatic quadrilateral mesh generation, Int. J. Num. Meth. Eng., 32, pp. 894–866, 1991.