236
8. Complex Geometries
The non-orthogonality of the lines defining the CV boundaries is not relevant - only the angle between the cell face normal n and the line E connecting
the cell centers on either side is important. A 2D grid of equilateral triangles
is orthogonal in the above sense, since the directions of < and n coincide. It
is also uniform in the sense that the distances from cell face centers to CV
centers are equal. It is much easier to optimize a grid with respect to the
angle between < and n than the angles at the CV corners, especially if CVs
of different topology are used in the same grid.
This diffusive flux approximation (8.32) prevents oscillatory solutions. It
is very simple to implement, since only the cell face surface vector and the
positions of CV centers are needed. It is of second order accuracy on uniform
grids, and when the grid is refined systematically, the convergence behavior is
of second order even when the grid is non-uniform (see Sect. 3.3.1 for details).
It is applicable to CVs of arbitrary shape and can be adapted to schemes of
higher order.
The above scheme makes the calculation of derivatives with respect to
Cartesian coordinates very simple. By using expressions (8.22) and (8.31),
one can calculate the derivative in any direction. A subroutine which calculates derivatives is easy to program and can be used for all variables. There is
no need t o transform the equations from Cartesian coordinates into another
system. This is especially handy when implementation of turbulence models
is considered, see Chap. 9 (especially for the complicated ones): the model
equations are usually complicated enough in Cartesian coordinates - transformation to non-orthogonal coordinates makes them even more complex. It
is also very easy to validate the part of the computer code that calculates
gradients, by setting 4 to be an analytic function whose derivatives can be
computed exactly.
When structured grids are used, one can also start from the expression
(8.25) and transform the derivative with respect to n into derivatives with
respect t o local coordinates (<,q, C), where < connects the CV centers on
either side and the other two coordinates lie in the face and follow the grid
directions. This procedure is similar to the one described in the preceding
section and will not be discussed in detail here. A 2D code that uses nonorthogonal structured grids is available via Internet; see appendix for details.
In the momentum equations, the diffusive flux contains a few more terms
than does the corresponding term in the generic conservation equation, e.g.
for ui:
The underlined term is absent in the generic conservation equation. If p and
p are constant, the sum of underlined terms over all CV faces is zero by virtue
of the continuity equation, see Sect. 7.1. If p and p are not constant, they -
except near shocks - vary smoothly and the integral of underlined terms over
Précédent

- 247/779

Suivant