Grid Generation Basics

When generating grids in CVLGrid there are generally three steps in the process: first load a file with which to shape the model domain, next create splines around the model domain and finally create the grid. Often when a grid is being created it is because the user needs to make a model of some geographic domain. Thus the grid should reflect the shape of that domain. CVLGrid allows the user to upload a polygon shape file that outlines the model domain, shown in Figure 1. Once this outline is visible in the workspace of CVLGrid, the user must create splines to outline the desired domain. Splines are the most essential part of generating grids correctly and accurately. Four splines enclosing a region are required to generate one grid. If the model domain is a simple shape, the user may be able to accurately model the area with only one grid. However, if the domain is complex with branches and heavy curves, the user will have to create several sub domains and connect multiple grids.



Figure 1  P2D Polygon shape file of the model domain.


To create a grid, four splines must be created and must completely enclose the whole or part of the model domain. The first spline will define "I index" of cells in grid. The spline intersects the first spline will define "J index" of cells in grid. The method for drawing the splines will depend on the particular features of the domain. For a very simple domain the first spline is drawn along the bottom of the domain from left to right. The second spline is drawn along the top of the domain. The last two splines are drawn along the sides of the domain and must intersect the previous two splines. Figure 2 shows how these splines are drawn.

Figure 2 Spline drawing guide.


In order to improve orthogonality it is good practice to make the intersecting lines as close to perpendicular as possible. This will simplify the computation and create a more orthogonal grid.
Once four splines are created, fully enclosing the desired area, the user may then generate the grid using the Generate Grid button . After clicking the Generate Grid icon, the user must specify the number of cells in the I and J (x and y) axis from the pop-up box, as shown in Figure 3. The first spline defines the I axis and the side splines define the J axis.



Figure 3 Grid cell specification on I and J axis.


Once the grid is generated the user can view properties of the grid, such as orthogonal deviation or the coordinates, by using the CVLGrid Options menu in the sidebar. The user can RMC (right mouse click) in the workspace to see options for modifying and improving the grid.

Only one grid with a specific of cells number is generated with a layer of splines. This means if the user wants to generate a new grid they need to create a new layer of splines. To create a new spline layer, click on the New button on Layer Control menu shown in Figure 4.



Figure 4 New layer button.


A new pop-up menu will appear, choosing Layer Type as Splines and a new name for the layer before clicking the OK button to create a new spline layer as shown in Figure 5.



Figure 5 Defining a new layer.