2D Grid Files
From XMS Wiki
(Redirected from 2D Grid Files Card Types)
This is the approved revision of this page, as well as being the most recent.
Jump to navigationJump to search
This is the approved revision of this page, as well as being the most recent.
Two-dimensional grids are stored in 2D grid files. The grids can be either cell-centered or mesh-centered. If the grid is mesh-centered, a set of material IDs may be included in the file. The 2D grid file format is shown in Figure 1, and a sample file in Figure 2.
GRID2D | /* File type */ |
TYPE i | /* Type of grid. Mesh or Cell centered. */ |
IJ ±idir ±jdir | /* Card for defining rows, columns. */ |
DIM nx ny | /* # of cell boundaries in each direction. */ |
x1 | /* X coord. of cell boundaries. */ |
x2 | |
. | |
. | |
xnx | |
y1 | /* Y coord. of cell boundaries. */ |
y2 | |
. | |
. | |
yny | |
DELEV el | /* Default elevation for grid. */ |
Figure 1. 2D Grid File Format.
GRID2D |
ID 5758 |
TYPE 1 |
DELEV 0.000000000000000e+00 |
IJ -y +x |
DIM 4 4 |
0.000000000000000e+00 |
3.333333333333334e+01 |
6.666666666666667e+01 |
1.000000000000000e+02 |
0.000000000000000e+00 |
3.333333333333334e+01 |
6.666666666666667e+01 |
1.000000000000000e+02 |
Figure 2. Sample 2D Grid File.
2D Grid Files Card Types
The card types used in the 2D grid file format are as follows:
Card Type | GRID2D |
---|---|
Description | File type identifier. Must be on first line of file. No fields. |
Required | YES |
Card Type | TYPE | ||
---|---|---|---|
Description | Defines the type of grid as either cell- or mesh-centered. | ||
Required | YES | ||
Format | TYPE i | ||
Sample | TYPE 0 | ||
Field | Variable | Value | Description |
1 | i | 0,1 | The type code:
|
Card Type | IJ | ||
---|---|---|---|
Description | Defines the orientation of the i,j indices. | ||
Required | YES | ||
Format | IJ ±idir ±jdir | ||
Sample | IJ +x -y | ||
Field | Variable | Value | Description |
1 | ±idir | ±x,±y | The direction corresponding to an increasing i index. |
2 | ±jdir | ±x,±y | The direction corresponding to an increasing j index. |
Card Type | DIM | ||
---|---|---|---|
Description | Defines the dimensions of the grid. | ||
Required | YES | ||
Format |
| ||
Sample |
| ||
Field | Variable | Value | Description |
1 | nx | + | The number of cell boundaries in the x direction. |
2 | ny | + | The number of cell boundaries in the y direction. |
3 to (nx+2) | x1-xnx | ± | The coordinates of the x boundaries. |
(nx+3) to (nx+ny+2) | y1-yny | ± | The coordinates of the y boundaries. |
Card Type | DELEV | ||
---|---|---|---|
Description | Defines a default elevation for the grid. | ||
Required | NO | ||
Format | DELEV el | ||
Sample | DELEV 100.0 | ||
Field | Variable | Value | Description |
1 | el | ± | The default elevation. |