This chapter discusses the use of programs in the TRIGRID package to produce a grid suitable for use in model computations, using the demonstration data supplied with TRIGRID to illustrate the various steps required. An irregular triangulated depth grid covering the domain to be modelled (see previous chapter) must be available before development of a model grid can begin.
It is assumed that the triangular elements of the model grid are to have the following properties:
To form appropriately sized grid elements, the TRIGRID package employs a novel method of creating variably-spaced points to form the basis for triangulation. The basic idea used is to partition the model domain into non-overlapping cells, proportional in area to the local water depth, and use the centres of area of these cells, together with selected points on the boundaries, as the nodes for the proposed model grid.
The first stage in this procedure is to create a fine resolution regular grid with square elements, covering the whole model domain, and then to calculate the water depth in every mesh of this grid by linear interpolation from the depth grid.The regular grid created for the demonstration case is shown in Figure 3.1. The resolution interval of this regular grid should be no greater than the linear size of the smallest triangles proposed for the model grid, and optimally about half this size. This dimension depends on the closeness of fit required to the model boundaries, on the number of grid points desired per wavelength (preferably more than 10) and on computer memory limits to the number of grid point variables that can be stored.
[IMAGE ]
Figure: The fine regular mesh that is laid over the model domain
and used by program NODER in preparation for model
grid generation.
The next step is to partition the interior of the model domain into cells whose area is proportional to water depth. Starting at the point of greatest water depth, a cluster of adjacent squares from the regular grid is built up by adding squares in a "square spiral" pattern around the original seed square, until the ratio of the cluster area to average water depth over the cluster reaches a specified value. A new seed point is chosen at the next deepest free square and another cluster is built up in the square spiral pattern, but excluding squares already belonging to existing clusters, until the required area to depth ratio is reached. Further clusters are formed in the same way until insufficient squares remain to form clusters with area/depth ratios close to the specified value. An example of a model domain partitioned into clusters of squares is shown in Fig. 3.2. Orphan squares, that is, those not belonging to any cluster, do not normally cause any problems, but it is known from experiments that poorly shaped triangles are obtained eventually if very irregularly shaped clusters are permitted. Such clusters are avoided by abandoning formation of a cluster if its second moment of area becomes 50% larger than the second moment of area of a square spiral cluster containing the same number of squares. This eliminates straggling clusters, at the cost of leaving more orphan squares.
[IMAGE ]
Figure: The grouping of the squares fron the regular mesh that
form clusters in program NODER.
When all suitable clusters have been formed, the centroids (centres of area) of the clusters, together with the boundary points used earlier in the depth grid are taken to serve as nodes for a preliminary model grid. The example in Fig. 3.3 shows clearly how the resulting density of node distribution varies with water depth in the demonstration case. Nodes lie progressively further apart as one moves from shallow to deep water.
[IMAGE ]
Figure: The centroids of the clusters in Figure 3.2 that are
used for nodes in the model grid.
Triangulation of these nodes is then carried out using the same program, GRIDIT, as was used earlier for triangulating the irregular depth grid. The property of approximately uniform area to depth ratio carries over from the clusters of square cells to the triangles based on their centroids.
The principal programs used for preparing the model grid are :