Page 158 - Basic Structured Grid Generation
P. 158
Differential models for grid generation 147
geometry is not too complex, however, it may be convenient to decompose it into
a small number of blocks of fairly simple geometry, in each of which a grid can be
generated with desirable features, such as orthogonality. For two dimensional problems
the following procedure (as implemented on the accompanying disk in the subdirec-
tory Book/Winslow gds,file orthog.g.f ) is proposed here for patching at the common
boundaries.
Consider typical (two-dimensional) blocks A and B, whose common boundary can
be represented as a cubic spline. Suppose that the length of this boundary, which may
be calculated using the integral formula for a plane curve, is L AB . Next suppose that
a structured grid is generated independently for each block using an elliptic generator,
say, so that block A may be mapped onto the square 0 <ξ < 1, 0 <η < 1in
computational space, while block B is mapped onto a similar square using a different
mapping. The grid in block A is generated using a discrete set of ξ-values, 0 =
ξ 1 ,ξ 2 ,. ..,ξ n = 1, and a discrete set of η-values. To give some measure of control the
sizes of successive intervals (ξ i − ξ i−1 ) between ξ-values are either taken to follow
a geometric progression in the program orthog.g.f., or are obtained using a stretching
function.
The same set of ξ-values is used to generate the grid in block B, according to the
mapping for block B. A point on the boundary in physical space corresponding to ξ i
has known cartesian co-ordinates (x Ai ,y Ai ), according to the mapping of block A, with
respect to some set of cartesian axes. Similarly, these ξ-values produce grid-nodes along
the boundary according to the mapping of block B with, in general, different cartesian
co-ordinates (x Bi ,y Bi ). Note that the number of grid-nodes along the boundary here
is the same for both A and B.
The following algorithm is used to match the boundary grid-points of A to those in B:
1. The closeness of the matching is tested by calculating a residual defined by
n
|x Ai − x Bi | |y Ai − y Bi |
ResMAT = + .
L AB L AB
i=1
2. If ResMAT is greater than some user-specified value, say10 −4 , then some adjustment
of the A nodes is carried out so that they will coincide more closely with those of B.
3. For typical grid-points of block A and block B corresponding to a value ξ i ,for
some i, the length L 1 of the boundary curve between them may be calculated. In
the program this is done by dividing the difference (x Bi − x Ai ) into ten equal parts
x, calculating the corresponding ys using the cubic spline expression for the
boundary curve, and then calculating the approximation
10 #
$ 2 2 %
L 1 = ( x) + ( y) .
1
4. A similar calculation gives the length L 2 of the boundary curve between the grid-
nodes (x Bi ,y Bi ) and (x A(i+1) ,y A(i+1) ).The sum (L 1 + L 2 ) then gives an approxi-
mation to the distance along the curve between (x Ai ,y Ai ) and (x A(i+1) ,y A(i+1) ).