<previous: Generating the Physical Model
up to Table of Contents
next: Boundary Conditions >
open Reference Guide (in this window)
open Applet Page (in new window)

Generating the Grid

    A grid must consist of pairs of points -- a spatial coordinate and a corresponding area at that location.  Gryphon is a cell centered finite volume scheme code, so each pair of consecutive grid points forms a cell with those two grid points at the left and right boundaries.  This grid structure can come from two sources.  An externally built grid which is imported via the File / Import menu, or from a physical model.

Physical Model

    Once the physical model has been properly generated as discussed in the previous section, it is a simple matter to press the "Create Grid" button on the Model navigation tab (shown in Fig. 5), or select the Create Grid command from the Grid menu (shown in Fig. 3b).  Both do the same thing.  The physical model information is verified to insure that valid area definitions have been applied to all segments and that the physical model is correctly built.  If there is an error, Gryphon returns an error message explaining the problem.  If all is satifactory, the grid spatial distribution is generated based on the division and spacing information specified by the user.  This grid is stored, and the physical model in the contour window is replaced by an image of the grid showing the area profile as an equivalent linear distance from the nominal line and all the grid division lines.  Subsequently making changes to the physical model and pressing the "Create Grid" button again will overwrite the existing grid completely along with all of its solution data.  Overwriting a grid should not be done lightly, but can be useful if the user want to do some trial-and-error type procedure to build a desirable grid.
    One note on the area definition is with respect to the area list.  Since the generated grid points will most likely not fall on the area list points exactly, linear interpolation is used between the two nearest points.  Gryphon also applies extrapolation if the area list does not sufficiently span the domain of the segment.  Thus, a more detailed area list will generate a better area distribution for the resulting grid.  This is not a problem with area rules since Gryphon can calculated the exact area at a given x value.

Grid Import

    Importing a grid from an outside source is also possible, as selected from the File menu.  The grid file can have any extension, but must be a text file consisting of pairs of numbers in the form of an x-coordinate and its area value.  The values can be either decimal or exponential, and can be of arbitrary precision.  Gryphon internally makes everything double precision anyway.  The values must be separated by spaces, tabs, or new line characters.  If there is not an even number of values in the file or the file contains any invalid characters, it is rejected.  If sucessful, the grid will be created exactly as the file specifies with that number of points and distribution.  Gryphon can re-import an exported text file from itself if this is desirable for some reason.  An option in the import dialogs allows for the first row of the text file to be ignored if it is known to be a header row.  In this case, Gryphon parses until it finds a new line character and then begins the import.  Once a grid is imported in this way, the existing physical model is deleted and is no longer available.

<previous: Generating the Physical Model
up to Table of Contents
next: Boundary Conditions >