K - 4   RSGRID File Format

The .rsgrid file speeds up grid loading. It contains the same grid geometry as the original input file, but with all post-processing completed. Post-processing includes corner smoothing, removal of inactive cells, node sharing, and face neighbor calculation. The file format is used for both .rsgrid and .rsgridi files.

There are several ways to create the .rsgrid file. When you first load a grid file in Tecplot RS, Tecplot RS creates the file automatically. It is generally rebuilt only when the original grid file is updated or when you change the grid loading options. It may also be updated when an updated version of Tecplot RS requires a change in the file format.

Tecplot RS also provides a utility called RSPreprocess. This creates the .rsgrid file outside the program environment, and is designed for use as a post-processing step after a simulator run. We also make the RSGRID file format public, giving you to option to modify the simulator to output the RSGrid file directly. The format of this binary file is shown following.

HEADER

Quantity

Data type

Value

1

4 byte integer

Version ID. Currently 2741. ID number will change if format changes.

1

4 byte integer

File type ID from which RSGRID was originally created. 1=Eclipse, 2=VIP, 4=VDB, 5=Sensor, 6=CMG

1

4 byte integer

Corner optimization option used when rsgrid file was solved.

1 = no optimization.

2 = shift method

3 = average method

1

4 byte integer

Radial flag. 0 if Cartesian, 1 if radial.

1

4 byte integer

Dual-porosity flag. 0 if single grid, 1 if dual-porosity grid.

1

char[64]

Variable used to flag inactive cells (used only for VIP grids, but must be present in all files).

1

4 byte integer

Inactive cell operator:

1 = Equal to (* not recommended for use)

2 = Less than

3 = Greater than

1

4 byte real

Inactive cell comparison value

1

4 byte integer

Total number of grids (global grid plus all LGRs).

FOR EACH GRID

1

char[16]

Grid/LGR name (“GLOBAL” for main grid)

1

char[16]

Parent grid name for LGRs.

1

4 byte integer

Number of I planes

1

4 byte integer

Number of J planes

1

4 byte integer

Number of K planes

1

4 byte integer

Number of active bricks (see notes)

1

4 byte integer

Total number of bricks (NUMBRICKS)

1

4 byte integer

I1 range of parent grid (if LGR)

1

4 byte integer

I2 range of parent grid

1

4 byte integer

J1 range of parent grid

1

4 byte integer

J2 range of parent grid

1

4 byte integer

K1 range of parent grid

1

4 byte integer

K2 range of parent grid

1

4 byte integer

Total number of nodes (NUMNODES)

NUMNODES * 3

4 byte reals

X, Y and Z coordinates for each node

NUMBRICKS * 13

4 byte integers

Items 1-3: Brick I, J, and K

Items 4-11: connectivity list of 8 node numbers (1-based) which form the brick. See the following diagram.

Item 12: Brick status

 0 = inactive

 1 = active in matrix grid

 2 = active in fracture grid

 3 = active in both matrix and fracture

Item 13: Face neighbor flag

Each of the first 6 bits determines whether the face is shared by the adjacent (logical IJK) cell. A face is shared if all four nodes are shared.

 

/*  node and face ordering

*

 *                                        (Max,Max,Max)

*         n8+---------------------------------+n7

*          /|                                /|

*         / |              /                / |

*        /  |            -f6-              /  |

*       /   |            /  |             /   |

 *      /    |              -f4-          /    |

*    Z/     |               |           /     |

*  n5+---------------------------------+n6 |/ |

*    |  f1  |                          |  f2  |

*    |  /|  |Y                         |  /|  |

*    |    n4+----------|---------------|------+n3

 *    |     /          -f3-             |     /

*    |    /            |   /           |    /

*    |   /               -f5-          |   /

*    |  /                /             |  /

*    | /                               | /

*    |/                                |/

*  n1+---------------------------------+ X

*(Min,Min,Min)                         n2

*/

 

NOTES

The efficiency of the RSGRID comes from the fact that shared nodes are not repeated. In other words, two adjacent bricks that share a common corner will point to the same node number.

The RSGRID file contains only active bricks, so the total number of bricks (NUMBRICKS) and the number of active bricks should be the same. (This duplication is a function of backward compatibility with earlier versions of the file). This value should correspond to the NACTIV value in the Eclipse Restart file.