Theinformation required to perform this task is: a a description of the bounding surfaces of the domain to be discretized; b a description of the desired element size, shape and orientat
Trang 1Element type
Micro-structured
Figure 3.1 Characterization of different mesh types
Element type describes the polyhedron used to discretize space Typical element types
include triangles and quads for 2-D domains, and tetrahedra, prisms and bricks for 3-Ddomains
In principle, any of the four classifications can be combined randomly, resulting in a verylarge number of possible grid types However, most of these combinations prove worthless
As an example, consider an unstructured grid of tetrahedra that is not body conforming Theremay be some cases where this grid optimally solves a problem, but in most cases Cartesianhexahedral cells will lead to a much faster solver and a better suited solution At present, themain contenders for generality and ease of use in CFD are as follows
(a) Multiblock grids These are conformal, surface-aligned, macro-unstructured, micro
structured grids consisting of quads or bricks The boundaries between the individualmicro-structured grids can either be conforming or non-conforming The latter class
of multiblock grids includes the possibility of overlapped micro-structured grids, also
known as Chimera grids (Benek et al (1985), Meakin and Suhs (1989), Dougherty and
Kuan (1989))
(b) Adaptive Cartesian grids These are non-conformal, non-surface-aligned,
micro-unstructured grids consisting of quads or bricks The geometry is simply placed into
Trang 2an initial coarse Cartesian grid that is refined further until a proper resolution of the
geometry is achieved (Melton et al (1993), Aftosmis et al (2000)) The imposition of
proper boundary conditions at the edges or faces that intersect the boundary is left tothe field solver
(c) Unstructured uni-element grids These are conformal, surface-aligned,
micro-unstructured grids consisting of triangles or tetrahedra
Consider the task of generating an arbitrary mesh in a given computational domain Theinformation required to perform this task is:
(a) a description of the bounding surfaces of the domain to be discretized;
(b) a description of the desired element size, shape and orientation in space;
(c) the choice of element type; and
(d) the choice of a suitable method to achieve the generation of the desired mesh
Historically, the work progressed in the opposite order to the list given above This is notsurprising, as the same happened when solvers were being developed In the same way thatthe need for grid generation only emerged after field solvers were sufficiently efficient andversatile, surface definition and the specification of element size and shape only becameissues once sufficiently versatile grid generators were available
3.1 Description of the domain to be gridded
There are two possible ways of describing the surface of a computational domain:
(a) using analytical functions; and
(b) via discrete data
3.1.1 ANALYTICAL FUNCTIONS
This is the preferred choice if a CAD-CAM database exists for the description of the domain,and has been used almost exclusively to date Splines, B-splines, non-uniform rational B-splines (NURBS) surfaces (Farin (1990)) or other types of functions are used to definethe surface of the domain An important characteristic of this approach is that the surface
is continuous, i.e there are no ‘holes’ in the information While generating elements onthe surface, the desired element size and shape is taken into consideration via mappings
(Löhner and Parikh (1988b), Lo (1988), Peiro et al (1989), Nakahashi and Sharov (1995),
Woan (1995))
3.1.2 DISCRETE DATA
Here, instead of functions, a cloud of points or an already existing surface triangulationdescribes the surface of the computational domain This choice may be attractive when noCAD-CAM database exists Examples are remote sensing data, medical imaging data, data
Trang 3sets from virtual reality (training, simulation, film making) and data sets from computergames For ‘reverse engineering’ or ‘clay to CAD’, commercial digitizers can gather surfacepoint information at speeds higher than 30 000/points/s, allowing a very accurate description
of a scaled model or the full configuration (Merriam and Barth (1991b)) The surfacedefinition is completed with the triangulation of the cloud of points This triangulation process
is far from trivial and has been the subject of major research and development efforts (see,
e.g., Choi et al (1988), Hoppe et al (1992, 1993)) This approach can lead to a discontinuous
surface description In order not to make any mistakes when discretizing the surface duringmesh generation, only the points given in the cloud of points should be selected The re-
triangulation required for surfaces defined in this way has been treated by Hoppe et al (1993),
Lo (1995), Löhner (1996), Cebral and Löhner (1999, 2001), Frey and Borouchaki (1998),Frey and George (2000), Ito and Nakahashi (2002), Tilch and Löhner (2002), Surazhsky and
Gotsman (2003) and Wang et al (2007).
The current incompatibility of formats for the description of surfaces makes the surfacedefinition by far the most labour-intensive task of the CFD analysis process Grid generation,flow solvers and visualization are processes that have been automated to a high degree This
is not the case with surface definition, and may continue to be so for a long time It may alsohave to do with the nature of analysis: for a CFD run a vast portion of CAD-CAM data has
to be filtered out (nuts, bolts, etc., are not required for the surface definition required for astandard CFD run), and the surface patches used by the designers seldomly match, leavinggaps or overlap regions that have to be treated manually For some recent work on ‘geometrycleaning’ see Dawes (2005, 2006)
3.2 Variation of element size and shape
After the surface of the domain to be gridded has been described, the next task is to definehow the element size and shape should vary in space The parameters required to generate anarbitrary element are shown in Figure 3.2
S2G
S1G
2
3 x
y
z
G
1
Figure 3.2 Parameters required for an arbitrary element
They consist of the side distance parameter δ, commonly known as the element length, two stretching parameters S1, S2, and two associated stretching directions s1,s2 Furthermore, the
assumption that S3= 1, s3= s1× s2is made
Trang 43.2.1 INTERNAL MEASURES OF GRID QUALITY
The idea here is to start from a given surface mesh After the introduction of a new point orelement, the quality of the current grid or front is assessed Then, a new point or element isintroduced in the most critical region This process is repeated until a mesh that satisfies
a preset measure of quality is achieved (Holmes and Snyder (1988), Huet (1990)) Thistechnique works well for equilateral elements, requiring minimal user input On the otherhand, it is not very general, as the surface mesh needs to be provided as part of the procedure.3.2.2 ANALYTICAL FUNCTIONS
In this case, the user codes in a small subroutine the desired variation of element size, shapeand orientation in space Needless to say, this is the least general of all procedures, requiringnew coding for every new problem On the other hand, if the same problem needs to bediscretized many times, an optimal discretization may be coded in this way Although it mayseem inappropriate to pursue such an approach within unstructured grids, the reader may bereminded that most current airfoil calculations are carried out using this approach
3.2.3 BOXES
If all that is required are regions with uniform mesh sizes, one may define a series of boxes
in which the element size is constant For each location in space, the element size taken isthe smallest of all the boxes containing the current location When used in conjunction withsurface definition via quad/octrees or embedded Cartesian grids, one can automate the pointdistribution process completely in a very elegant way (Yerry and Shepard (1984), Shephard
and Georges (1991), Aftosmis et al (2000), Dawes (2006, 2007)).
3.2.4 POINT/LINE/SURFACE SOURCES
A more flexible way that combines the smoothness of functions with the generality of boxes
or other discrete elements is to define sources The element size for an arbitrary location x in
space is given as a function of the closest distance to the source, r(x) Consider first the line
source given by the points x1,x2shown in Figure 3.3
x
r (X) n
x 2 g
1
x 1
Figure 3.3 Line source The vector x can be decomposed into a portion lying along the line and the normal to it.
With the notation of Figure 3.3, we have
Trang 5The ξ can be obtained by scalar multiplication with g1and is given by
g2
x2 x
g3x1
x
x
r ( x )
r ( x )
Figure 3.4 Surface source
The vector x can be decomposed into a portion lying in the plane given by the surface
source points and the normal to it With the notation of Figure 3.4, we have
If this condition is violated, the point x is closest to one of the given edges, and the distance
to the surface is evaluated by checking the equivalent line sources associated with the edges
Trang 6If (3.8) is satisfied, the closest distance between the surface and the point is given by
δ( x) = |(1 − ξ − η)x1+ ξx2+ ηx3− x|. (3.9)
As one can see, the number of operations required to determine δ(x) is not considerable if
one can pre-compute and store the geometrical parameters of the sources (gi ,gi , etc.) A
line source may be obtained by collapsing two of the three points (e.g x3→ x2), and a pointsource by collapsing all three points into one In order to reduce the internal complexity of acode, it is advisable to only work with one type of source Given that the most general source
is the surface source, line and point sources are prescribed as surface sources, leaving a smalldistance between the points to avoid numerical problems (e.g divisions by zero)
Having defined the distance from the source, the next step is to select a function that isgeneral yet has a minimum of input to define the element size as a function of distance.Typically, a small element size is desired close to the source and a large element size away
from it Moreover, the element size should be constant (and small) in the vicinity r < r0ofthe source An elegant way to satisfy these requirements is to work with functions of thetransformed variable
For obvious reasons, the parameter r1is called the scaling length Commonly used functions
of ρ to define the element size in space are:
(a) power laws, given by expressions of the form (Löhner et al (1992))
with the four input parameters δ0, r0, r1, γ ; where, typically, 1.0 ≤ γ ≤ 2.0;
(b) exponential functions, which are of the form (Weatherill (1992), Weatherill and Hassan
(1994))
with the four parameters δ0, r0, r1, γ;
(c) polynomial expressions, which avoid the high cost of exponents and logarithms by
employing expressions of the form
with the n + 3 parameters δ0, r0, r1, a i, where, typically, quadratic polynomials are
employed (i.e n= 2, implying five free parameters)
Given a set of m sources, the minimum is taken whenever an element is to be generated:
δ( x) = min(δ1, δ1, , δ m ). (3.14)Some authors, notably Prizadeh (1993a), have employed a smoothing procedure to combinebackground grids with sources The effect of this smoothing is a more gradual increase inelement size away from regions where small elements are required
Trang 7Sources offer a convenient and general way to define the desired element size in space.They may be introduced rapidly in interactive mode with a mouse-driven menu once thesurface data is available For moving or tumbling bodies the points defining the sourcesrelevant to them may move in synchronization with the corresponding body This allowshigh-quality remeshing when required for this class of problem (Löhner (1990b), Baum
and Löhner (1993), Baum et al (1995, 1996), Löhner et al (1999), Tremel et al (2006)).
On the other hand, sources suffer from one major disadvantage: at every instance, the
generation parameters of all sources need to be evaluated For a distance distribution given
by equations (3.10)–(3.14), it is very difficult to ‘localize’ the sources in space in order tofilter out the relevant ones As an example, consider the 1-D situation shown in Figure 3.5
Although sources S3, S5are closer to the shaded region than any other source, the source that
yields the smallest element size δ in this region is S2
x
G
1 s 2 s
3 s 4
Figure 3.5 Minimum element size from different surface sources
The evaluation of the minimum distance obtained over the sources may be vectorized in a
straightforward way Nevertheless, a large number of sources (N s >100) will have a markedimpact on CPU times, even on a vector machine Experience shows that the large number ofsources dictated by some complex geometries can lead to situations where the dominant CPUcost is given by the element-size evaluations of the sources, not the grid generation methoditself
3.2.5 BACKGROUND GRIDS
Here, a coarse grid is provided by the user At each of the nodes of this background grid, theelement size, stretching and stretching direction are specified Whenever a new element orpoint is introduced during grid generation, this background grid is interrogated to determinethe desired size and shape of elements While very general and flexible, the input of suitablebackground grids for complex 3-D configurations can become tedious The main use ofbackground grids is for adaptive remeshing: given a first grid and a solution, the elementsize and shape for a mesh that is more suited for the problem at hand can be determined from
an error indicator With this information, a new grid can be generated by taking the current
grid as the background grid (Peraire et al (1987, 1988), Löhner (1988b, 1990b), Peraire et al.
(1990, 1992b)) For this reason, background grids are still prevalent in most unstructured gridgenerators, and are employed in conjunction with sources or other means of defining elementsize and shape
Trang 83.2.6 ELEMENT SIZE ATTACHED TO CAD DATA
For problems that require gridding complex geometries, the specification of proper elementsizes can be a tedious process Conventional background grids would involve many tetrahe-dra, whose generation is a labour-intensive, error-prone task Point, line or surface sourcesare not always appropriate either Curved ‘ridges’ between surface patches, as sketched inFigure 3.6, may require many line sources
Surface Patch 2
Surface Patch 1 Ridge Where Small Elements Are Required
Figure 3.6 Specifying small element size for curved ridges
Similarly, the specification of gridding parameters for surfaces with high curvature mayrequire many surface sources The net effect is that for complex geometries one is faced withexcessive labour costs (background grids, many sources) and/or CPU requirements duringmesh generation (many sources)
A better way to address these problems is to attach element size (or other griddingparameters) directly to CAD data For many problems, the smallest elements are requiredclose to the boundary Therefore, if the element size for the points of the current front isstored, the next element size may be obtained by multiplying it with a user-specified increase
factor cincr The element size for each new point introduced is then taken as the minimum
obtained from the background grid δ bg , the sources δs and the minimum of the point sizes
corresponding to the face being deleted, multiplied by a user-specified increase factor ci:
δ = min(δ bg , δ s , c i min(δ A , δ B , δ C )). (3.15)
Typical values for c i are c i = 1.2–1.5.
3.2.7 ADAPTIVE BACKGROUND GRIDS
As was seen from the previous sections, the specification of proper element size and shape
in space can be a tedious, labour-intensive task Adaptive background grid refinement may
be employed in order to reduce the amount of user intervention to a minimum As with any
other mesh refinement scheme, one has to define where to refine and how to refine Because
of its very high speed, classic h-refinement (Löhner and Baum (1992)) is used to subdividebackground grid elements In this way the possible interactivity on current workstations ismaintained
The selection as to where to refine the background mesh is made with the followingassumptions:
(a) points have already been generated;
(b) at each of these points, a value for the characteristic or desired element size δ is given;
Trang 9(c) for each of these points, the background grid element containing it is known;
(d) a desired increase factor c i between elements is known
The refinement selection is then made in two passes (see Figure 3.7)
Figure 3.7 Background grid refinement: (a) generated surface points; (b) adjust background grid
element size to surface point size; (c) refine background grid as required
Pass 1: Background grid adjustment
Suppose a background grid element has very large element sizes defined at its nodes If itcontains a generated point with characteristic length that is much smaller, an incompatibility
is present The aim of this first pass is to prevent these incompatibilities by comparing lengths
Given a set of two points with coordinates x1,x2, as well as an element length parameter δ1,the maximum allowable element length at the second point may be determined from thegeometric progression formula
δbg = min(δ bg , δ∗(x
Trang 10Pass 2: Selection of elements to be refined
After the element lengths at the points of the background grid have been made compatiblewith the lengths of the actual points, the next step is to decide where to refine the backgroundgrid The argument used here is that if there is a significant difference between the elementsize at generated points and the points of the background grid, the element should be refined.This simple criterion is expressed as
min
a,b,c,d (δ bg ) > c f δ p⇒ refine (3.19)
where, typically, 1.5 ≤ c f ≤ 3 All elements flagged by this last criterion are subdivided
further via classic h-refinement (Löhner and Baum (1992)), and the background grid variablesare interpolated linearly for the newly introduced points
3.2.8 SURFACE GRIDDING WITH ADAPTIVE BACKGROUND GRIDS
Background grid adaptation may be used to automatically generate grids that represent thesurface within a required or prescribed accuracy Consider, as a measure for surface accuracy,the angle variation between two adjacent faces
With the notation defined in Figure 3.8, the angle between two faces is given by
Figure 3.8 Measuring surface curvature
This implies that, for a given element size hg and angle αg, the element size for a prescribed angle α pshould be
h p = h g
tan(αp / 2)
For other measures of surface accuracy, similar formulae will be encountered Given a
prescribed angle αp, the point distances for the given surface triangulation are compared to
those obtained from (3.21) and reduced appropriately:
Trang 11Area of Potential Gridding Problems
Figure 3.9 Planar surface patch with close lines
Left untreated, even if the surface grid generator were able to generate a mesh, the quality
of these surface elements would be such that the resulting tetrahedra would be of poor quality.Therefore, in order to avoid elements of bad quality, the recourse taken is to analyse theproximity of the line in the surface patch, and then reduce the distance parameter for the
points δi accordingly These new point distances are then used to further adjust and/or refinethe background grid, and a new surface triangulation is generated This process is repeateduntil the surface representation is accurate enough
Adaptive background grids combine a number of advantages:
- possible use in combination with CAD-based element size specification and/or ground sources;
back automatic gridding to specified surface deviation tolerance;
- automatic gridding to specified number of elements in gaps;
- smooth transition between surface faces of different size;
- smooth transition from surface faces to volume-elements
Thus, they may be used to arrive at automatic, minimal-input grid generators
3.3 Element type
Almost all current unstructured grid generators can only generate triangular or tetrahedralelements If quad-elements in two dimensions are required, they can either be generated using
an advancing front (Zhu et al (1991)) or paving (Blacker and Stephenson (1992)) technique,
or by first generating a grid of triangles that is modified further (Rank et al (1993)) This last
option can be summarized in the following five algorithmic steps
Q1 Generate a triangular mesh with elements whose sides are twice as long as the ones ofthe quad-elements required
Q2 Fuse as many pairs of triangles into quads as possible without generating quads thatare too distorted This process will leave some triangles in the domain
Q3 Improve this mixed mesh of quads and triangles by adding/removing points, switchingdiagonals and smoothing the mesh
Trang 12(a) (b)
Figure 3.10 Generation of quad grids from triangles: (a) mesh of triangles; (b) after joining triangles
into quads; (c) after switching/improvement; (d) after global h-refinement
Q4 H-refine globally the mesh of triangles and quads (see Figure 3.10) In this way, theresulting mesh will only contain quads Moreover, the quads will now be of the desiredsize
Q5 Smooth the final mesh of quads
Some of the possible operations required to improve a mixed mesh have been summarized
in Figures 3.11(a)–(c)
The procedure outlined earlier will not work in three dimensions, the problem being theface-diagonals that appear when tetrahedra are matched with brick elements (see Figure 3.12).The face disappears in two dimensions (only edges are present), making it possible togenerate quad-elements from triangles
3.4 Automatic grid generation methods
There appear to be only the two following ways to fill space with an unstructured mesh
M1 Fill empty, i.e not yet gridded space The idea here is to proceed into as yet ungridded
space until the complete computational domain is filled with elements This has been showndiagrammatically in Figure 3.13
The ‘front’ denotes the boundary between the region in space that has been filled withelements and that which is still empty The key step is the addition of a new volume or
element to the ungridded space Methods falling under this category are called advancing front techniques (AFTs).
M2 Modify and improve an existing grid In this case, an existing grid is modified by the
introduction of new points After the introduction of each point, the grid is reconnected orreconstructed locally in order to improve the mesh quality This procedure has been sketched
in Figure 3.14