The Bezier Boundary File


The following description really needs to be updated. For the moment, look at the source code to see what is expected.


The geometric description of the flow domain is read in from the Bezier file (e.g. sod2.bez) and is used by mb_prep to set up the grids and initial flow solution (i.e. at t = 0). The preferred way to set up the Bezier file is to use the scriptit, however the Bezier file is a normal text file that may be written "by hand" with any text editor.

The geometry for each block is specified as a set of 4 polylines; one for each of the 4 block boundaries.

Line 1 of the the Bezier file provides a title. Line 2 specifies the number of blocks nblock. The data for blocks 0 through nblock-1 follow from line 3.

The data for each block consists of a one-line title, one line for the grid-generation option
0 = Coons patch (transfinite interpolation),
1 = AO grid generation (Knupp's elliptic method),
2 = Ruled-grid (where internal grid lines are straight),
followed by 4 sets of polyline data for the South, North, West and East boundaries respectively. For each polyline, the data are specified as...

Line P.1: n_element, end_1, end_2, beta_1, beta_2
n_element is the number of degree-3 Bezier curves that make up the polyline.
If end_1 is 1, nodes are clustered toward the left end of the line. If end_2 is 1, nodes are clustered toward the right end of the line. Alternate values are 0.
beta_1 is the value of Robert's clustering (or stretching) parameter. A value of 0.0 indicates no clustering while values greater than 1.0 indicate clustering. The closer the value to 1.0, the stronger the clustering.
beta_2 is not used presently but is intended to allow variable clustering from one end of the block to the other.
Note that:
(a) nodes can be clustered to both ends of the line simultaneously;
(b) since the exchange of flow information between blocks is a direct copy from source cell to target cell, the stretching along adjacent boundaries needs to be consistent; and
(c) the left end of the North and South boundaries is at the West boundary while the left end of the West and East boundaries is at the South boundary.
Lines P.2 to P.n_element+1: x0, y0, x1, y1, x2, y2, x3, y3
Coordinates (in metres) of the Bezier control points for a single segment, starting with index 0 on the left end of the line and progressing to index 3 on the right. The coordinates at the right-end of one Bezier segment must match the coordinates at the left-end of the following segment.
Also, for the grid generation procedure to work correctly, the end points of the polylines must be consistent such that the four boundaries form a closed curve.

Here is the sod2.bez Bezier file as an example...

One-dimensional shock tube (Sod test case)
2   nblock
Block 0 is the driver section
0  generation option
1 0 0 0.0 0.0    South: generated by quad.c
0.000000 0.000000 0.166667 0.000000 0.333333 0.000000 0.500000 0.000000
1 0 0 0.0 0.0    North : generated by quad.c
0.000000 0.100000 0.166667 0.100000 0.333333 0.100000 0.500000 0.100000
1 0 0 0.0 0.0    West : generated by quad.c
0.000000 0.000000 0.000000 0.033333 0.000000 0.066667 0.000000 0.100000
1 0 0 0.0 0.0    East : generated by quad.c
0.500000 0.000000 0.500000 0.033333 0.500000 0.066667 0.500000 0.100000
Block 1 is the driven section
0  generation option
1 0 0 0.0 0.0    South: generated by quad.c
0.500000 0.000000 0.666667 0.000000 0.833333 0.000000 1.000000 0.000000
1 0 0 0.0 0.0    North : generated by quad.c
0.500000 0.100000 0.666667 0.100000 0.833333 0.100000 1.000000 0.100000
1 0 0 0.0 0.0    West : generated by quad.c
0.500000 0.000000 0.500000 0.033333 0.500000 0.066667 0.500000 0.100000
1 0 0 0.0 0.0    East : generated by quad.c
1.000000 0.000000 1.000000 0.033333 1.000000 0.066667 1.000000 0.100000

Since points on the Bezier curves are essentially weighted summations of the control-point positions, a nonuniform distribution of control-point locations will result in a nonuniform distribution of points along the Bezier curve. This is most easily demonstrated with 4 colinear control points defining a straight line. Putting the intermediate control points at any 2 locations along the line will still result in the Bezier curve being a straight line. However, to get a uniform distribution of points along the line, the intermediate control points need to be set at distances 1/3 and 2/3 along the line. This effect has implications for the AO grid generator since the first stage of the generator makes use of what is assumed to be a set uniformly distributed cells. If, for a particular Bezier curve, a uniform variation of Bezier parameter results in a very nonuniform distribution of points in the physical plane, a very strange grid will be generated.


MB_CNS (C) P. A. Jacobs
Last Updated 19-Nov-1997, 11-Sep-99.