2D Grid Files: Difference between revisions
From XMS Wiki
Jump to navigationJump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
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. | 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. | ||
{| | {|class = "wikitable" | ||
|- | |- | ||
|width="250"|GRID2D | |width="250"|GRID2D | ||
Line 37: | Line 37: | ||
{| | {|class = "wikitable" | ||
|- | |- | ||
|GRID2D | |GRID2D | ||
Line 73: | Line 73: | ||
The card types used in the 2D grid file format are as follows: | The card types used in the 2D grid file format are as follows: | ||
{| | {|class = "wikitable" | ||
|- | |- | ||
!Card Type | !Card Type | ||
Line 86: | Line 86: | ||
{| | {|class = "wikitable" | ||
|- | |- | ||
!Card Type | !Card Type | ||
Line 117: | Line 117: | ||
{| | {|class = "wikitable" | ||
|- | |- | ||
!Card Type | !Card Type | ||
Line 151: | Line 151: | ||
{| | {|class = "wikitable" | ||
|- | |- | ||
!Card Type | !Card Type | ||
Line 218: | Line 218: | ||
{| | {|class = "wikitable" | ||
|- | |- | ||
!Card Type | !Card Type |
Revision as of 18:04, 28 November 2012
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. |