alinik
۱۴ مهر ۱۳۸۸, ۰۰:۱۱
8.1.2
Some authors suggest use of a set of regular grids to cover irregular solution
domains. One can combine rectangular, cylindrical, spherical or nonorthogonal
grids near bodies with Cartesian grids in the rest of the solution
domain. An example is shown in Fig. 2.4. The disadvantage of this approach
is that the programming and coupling of the grids can be complicated. The
computation is usually sequential; the solution method is applied on one grid
after another, the interpolated solution from one grid providing the boundary
conditions for the next iteration on adjacent grids. It is also difficult to
maintain conservation at the interfaces, and the interpolation process may
introduce errors or convergence problems if the solution exhibits strong variation
near the interface.
This method has also some attractive features. It allows - without additional
difficulty - calculation of flows around bodies which move relative
to the environment or each other. Each grid is attached to one reference
frame, including some which move with the bodies. In such a case, the overlap
region changes with time and has to be determined (together with the
interpolation factors) after each time step. The grid has to be recalculated
after each time step in any problem containing a moving body no matter
what method is used, so this is not a drawback. The only additional effort
is the interpolation from one reference frame to the other at the interfaces.
8.2 Grid Generation 219
Grids of this kind are called Chimera grids in the literature (the Chimera
is a mythological creature with lion's head, goat's body, and snake's tail).
Examples of the use of overlapping grids are found in papers by Hinatsu and
Ferziger (1991), Perng and Street (1991), Tu and Fuchs (1992), and Hubbard
and Chen (1994,1995), among others.
8.1.3 Boundary-Fitted Non-Orthogonal Grids
Boundary-fitted non-orthogonal grids are most often used to calculate flows
in complex geometries (most commercial codes use such grids). They can be
structured, block-structured, or unstructured. The advantage of such grids is
that they can be adapted to any geometry, and that optimum properties are
easier to achieve than with orthogonal curvilinear grids. Since the grid lines
follow the boundaries, the boundary conditions are more easily implemented
than with stepwise approximation of curved boundaries. The grid can also
be adapted to the flow, i.e. one set of grid lines can be chosen to follow
the streamlines (which enhances the accuracy) and the spacing can be made
smaller in regions of strong variable variation, especially if block-structured
or unstructured grids are used.
Non-orthogonal grids have also several disadvantages. The transformed
equations contain more terms thereby increasing both the difficulty of programming
and the cost of solving the equations, the grid non-orthogonality
may cause unphysical solutions and the arrangement of variables on the grid
affects the accuracy and efficiency of the algorithm. These issues are discussed
further below.
In the remainder of this book we shall assume that the grid is nonorthogonal.
The principles of discretization and solution methods which we
shall present are valid for orthogonal grids as well, since they can be viewed
as a special case of a non-orthogonal grid. We shall also discuss the treatment
of block-structured grids.
8.2 Grid Generation
The generation of grids for complex geometries is an issue which requires too
much space to be dealt with in great detail here. We shall present only some
basic ideas and the properties that a grid should have. More details about
various methods of grid generation can be found in books and conference
proceedings devoted to this topic, e.g. Thompson et al. (1985) and Arcilla et
al. (1991).
Even though necessity demands that the grid be non-orthogonal, it is important
to make it as nearly orthogonal as possible. In FV methods orthogonality
of grid lines at CV vertices is unimportant - it is the angle between
the cell face surface normal vector and the line connecting the CV centers on
220 8. Complex Geometries
either side of it that matters. Thus, a 2D grid made of equilateral triangles
is equivalent to an orthogonal grid, since lines connecting cell centers are
orthogonal to cell faces. This will be discussed further in Sect. 8.6.2.
Cell topology is also important. If the midpoint rule integral approximation,
linear interpolation, and central differences are used to discretize the
equations, then the accuracy will be higher if the CVs are quadrilaterals in
2D and hexahedra in 3D, than if we use triangles and tetrahedra, respectively.
The reason is that parts of the errors made at opposite cell faces when
discretizing diffusion terms cancel partially (if cell faces are parallel and of
equal area, they cancel completely) on quadrilateral and hexahedral CVs.
To obtain the same accuracy on triangles and tetrahedra, more sophisticated
interpolation and difference approximations must be used. Especially near
solid boundaries it is desirable to have quadrilaterals or hexahedra, since all
quantities vary substantially there and accuracy is especially important in
this region.
Accuracy is also improved if one set of grid lines closely follows the streamlines
of the flow, especially for the convective terms. This cannot be achieved
if triangles and/or tetrahedra are used, but is possible with quadrilaterals
and hexahedra.
Non-uniform grids are the rule rather than exception when complex geometries
are treated. The ratio of the sizes of adjacent cells should be kept
under control, as accuracy is adversely affected if it is large. Especially when
block-structured grids are used, one should take care that the cells are of
nearly equal size near block interfaces; a factor of two variation should be the
maximum. An experienced user may know where strong variation of velocity,
pressure, temperature, etc. can be expected; the grid should be fine in these
regions since the errors are most likely to be large there. However, even an
experienced user will encounter occasional surprises and more sophisticated
methods are useful in any event. Errors are convected and diffused across the
domain, as discussed in Sect. 3.9, making it essential to achieve as uniform
a distribution of truncation error as possible. It is possible, however, to start
with a coarse grid and later refine it locally according to an estimate of the
discretization error; methods for doing this are called solution adaptive grid
methods and will be described in Chap. 11.
Finally, there is the issue of grid generation. When the geometry is complex,
this task usually consumes the largest amount of user time by far; it is
not unusual for a designer to spend several weeks generating a single grid.
Since the accuracy of the solution depends as much (if not more) on the grid
quality as on the approximations used for discretization of the equations, grid
optimization is a worthwhile investment of time.
Many commercial codes for grid generation exist. Automation of the grid
generation process, aimed at reducing the user time and speeding up the process
is the major goal in this area. Overlapping grids are easier to generate,
but there are geometries in which application of this approach is difficult
8.2 Grid Generation 221
due to the existence of too many irregular pieces (e.g. coolant flow in an
engine block). Generation of triangular and tetrahedral meshes is easier to
automate, which is one of the reasons for their popularity. One usually specifies
mesh points on the bounding surface and proceeds from there towards
the center of the domain. When a surface grid has been created, tetrahedra
that have one base on the surface are generated above it and the process
is continued towards the center of the volume along a marching front; the
entire process is something like solving an equation by a marching procedure
and, indeed, some methods are based on the solution of elliptic or hyperbolic
partial differential equations.
Tetrahedral cells are not desirable near walls if the boundary layer needs
to be resolved because the first grid point must be very close to the wall
while relatively large grid sizes can be used in the directions parallel to the
wall. These requirements lead to long thin tetrahedra, creating problems in
the approximation of diffusive fluxes. For this reason, some grid generation
methods generate first a layer of prisms or hexahedra near solid boundaries,
starting with a triangular or quadrilateral discretization of the surface; on top
of this layer, a tetrahedral mesh is generated automatically in the remaining
part of the domain. An example of such a grid is shown in Fig. 8.2.
Fig. 8.2. An example of a grid made up of prisms near the walls and tetrahedra
in the remaining part of the solution domain (courtesy of ICEM CFD Engineering
GmbH; grid generated automatically using ICEM CFD Tetra/Prism grid generator)
This approach enhances grid quality near walls and leads to both more
accurate solutions and better convergence of numerical solution methods;
however, it can be only used if the solution method allows for mixed control
222 8. Complex Geometries
volume types. In principle, any type of method (FD, FV, FE) can be adapted
to this kind of grid.
Another approach to automatic grid generation is to cover the solution
domain with a (coarse) Cartesian grid, and adjust the cells cut by domain
boundaries to fit the boundary. The problem with this approach is that the
cells near boundary are irregular and may require special treatment.
Some authors suggest use of a set of regular grids to cover irregular solution
domains. One can combine rectangular, cylindrical, spherical or nonorthogonal
grids near bodies with Cartesian grids in the rest of the solution
domain. An example is shown in Fig. 2.4. The disadvantage of this approach
is that the programming and coupling of the grids can be complicated. The
computation is usually sequential; the solution method is applied on one grid
after another, the interpolated solution from one grid providing the boundary
conditions for the next iteration on adjacent grids. It is also difficult to
maintain conservation at the interfaces, and the interpolation process may
introduce errors or convergence problems if the solution exhibits strong variation
near the interface.
This method has also some attractive features. It allows - without additional
difficulty - calculation of flows around bodies which move relative
to the environment or each other. Each grid is attached to one reference
frame, including some which move with the bodies. In such a case, the overlap
region changes with time and has to be determined (together with the
interpolation factors) after each time step. The grid has to be recalculated
after each time step in any problem containing a moving body no matter
what method is used, so this is not a drawback. The only additional effort
is the interpolation from one reference frame to the other at the interfaces.
8.2 Grid Generation 219
Grids of this kind are called Chimera grids in the literature (the Chimera
is a mythological creature with lion's head, goat's body, and snake's tail).
Examples of the use of overlapping grids are found in papers by Hinatsu and
Ferziger (1991), Perng and Street (1991), Tu and Fuchs (1992), and Hubbard
and Chen (1994,1995), among others.
8.1.3 Boundary-Fitted Non-Orthogonal Grids
Boundary-fitted non-orthogonal grids are most often used to calculate flows
in complex geometries (most commercial codes use such grids). They can be
structured, block-structured, or unstructured. The advantage of such grids is
that they can be adapted to any geometry, and that optimum properties are
easier to achieve than with orthogonal curvilinear grids. Since the grid lines
follow the boundaries, the boundary conditions are more easily implemented
than with stepwise approximation of curved boundaries. The grid can also
be adapted to the flow, i.e. one set of grid lines can be chosen to follow
the streamlines (which enhances the accuracy) and the spacing can be made
smaller in regions of strong variable variation, especially if block-structured
or unstructured grids are used.
Non-orthogonal grids have also several disadvantages. The transformed
equations contain more terms thereby increasing both the difficulty of programming
and the cost of solving the equations, the grid non-orthogonality
may cause unphysical solutions and the arrangement of variables on the grid
affects the accuracy and efficiency of the algorithm. These issues are discussed
further below.
In the remainder of this book we shall assume that the grid is nonorthogonal.
The principles of discretization and solution methods which we
shall present are valid for orthogonal grids as well, since they can be viewed
as a special case of a non-orthogonal grid. We shall also discuss the treatment
of block-structured grids.
8.2 Grid Generation
The generation of grids for complex geometries is an issue which requires too
much space to be dealt with in great detail here. We shall present only some
basic ideas and the properties that a grid should have. More details about
various methods of grid generation can be found in books and conference
proceedings devoted to this topic, e.g. Thompson et al. (1985) and Arcilla et
al. (1991).
Even though necessity demands that the grid be non-orthogonal, it is important
to make it as nearly orthogonal as possible. In FV methods orthogonality
of grid lines at CV vertices is unimportant - it is the angle between
the cell face surface normal vector and the line connecting the CV centers on
220 8. Complex Geometries
either side of it that matters. Thus, a 2D grid made of equilateral triangles
is equivalent to an orthogonal grid, since lines connecting cell centers are
orthogonal to cell faces. This will be discussed further in Sect. 8.6.2.
Cell topology is also important. If the midpoint rule integral approximation,
linear interpolation, and central differences are used to discretize the
equations, then the accuracy will be higher if the CVs are quadrilaterals in
2D and hexahedra in 3D, than if we use triangles and tetrahedra, respectively.
The reason is that parts of the errors made at opposite cell faces when
discretizing diffusion terms cancel partially (if cell faces are parallel and of
equal area, they cancel completely) on quadrilateral and hexahedral CVs.
To obtain the same accuracy on triangles and tetrahedra, more sophisticated
interpolation and difference approximations must be used. Especially near
solid boundaries it is desirable to have quadrilaterals or hexahedra, since all
quantities vary substantially there and accuracy is especially important in
this region.
Accuracy is also improved if one set of grid lines closely follows the streamlines
of the flow, especially for the convective terms. This cannot be achieved
if triangles and/or tetrahedra are used, but is possible with quadrilaterals
and hexahedra.
Non-uniform grids are the rule rather than exception when complex geometries
are treated. The ratio of the sizes of adjacent cells should be kept
under control, as accuracy is adversely affected if it is large. Especially when
block-structured grids are used, one should take care that the cells are of
nearly equal size near block interfaces; a factor of two variation should be the
maximum. An experienced user may know where strong variation of velocity,
pressure, temperature, etc. can be expected; the grid should be fine in these
regions since the errors are most likely to be large there. However, even an
experienced user will encounter occasional surprises and more sophisticated
methods are useful in any event. Errors are convected and diffused across the
domain, as discussed in Sect. 3.9, making it essential to achieve as uniform
a distribution of truncation error as possible. It is possible, however, to start
with a coarse grid and later refine it locally according to an estimate of the
discretization error; methods for doing this are called solution adaptive grid
methods and will be described in Chap. 11.
Finally, there is the issue of grid generation. When the geometry is complex,
this task usually consumes the largest amount of user time by far; it is
not unusual for a designer to spend several weeks generating a single grid.
Since the accuracy of the solution depends as much (if not more) on the grid
quality as on the approximations used for discretization of the equations, grid
optimization is a worthwhile investment of time.
Many commercial codes for grid generation exist. Automation of the grid
generation process, aimed at reducing the user time and speeding up the process
is the major goal in this area. Overlapping grids are easier to generate,
but there are geometries in which application of this approach is difficult
8.2 Grid Generation 221
due to the existence of too many irregular pieces (e.g. coolant flow in an
engine block). Generation of triangular and tetrahedral meshes is easier to
automate, which is one of the reasons for their popularity. One usually specifies
mesh points on the bounding surface and proceeds from there towards
the center of the domain. When a surface grid has been created, tetrahedra
that have one base on the surface are generated above it and the process
is continued towards the center of the volume along a marching front; the
entire process is something like solving an equation by a marching procedure
and, indeed, some methods are based on the solution of elliptic or hyperbolic
partial differential equations.
Tetrahedral cells are not desirable near walls if the boundary layer needs
to be resolved because the first grid point must be very close to the wall
while relatively large grid sizes can be used in the directions parallel to the
wall. These requirements lead to long thin tetrahedra, creating problems in
the approximation of diffusive fluxes. For this reason, some grid generation
methods generate first a layer of prisms or hexahedra near solid boundaries,
starting with a triangular or quadrilateral discretization of the surface; on top
of this layer, a tetrahedral mesh is generated automatically in the remaining
part of the domain. An example of such a grid is shown in Fig. 8.2.
Fig. 8.2. An example of a grid made up of prisms near the walls and tetrahedra
in the remaining part of the solution domain (courtesy of ICEM CFD Engineering
GmbH; grid generated automatically using ICEM CFD Tetra/Prism grid generator)
This approach enhances grid quality near walls and leads to both more
accurate solutions and better convergence of numerical solution methods;
however, it can be only used if the solution method allows for mixed control
222 8. Complex Geometries
volume types. In principle, any type of method (FD, FV, FE) can be adapted
to this kind of grid.
Another approach to automatic grid generation is to cover the solution
domain with a (coarse) Cartesian grid, and adjust the cells cut by domain
boundaries to fit the boundary. The problem with this approach is that the
cells near boundary are irregular and may require special treatment.