J - 1   RSPreprocess

After loading a grid file with time-varying grid variables, when you choose a new time step for display, Tecplot RS retrieves the data from the file. This method of loading decreases the time needed to load the grid file initially. To do this efficiently, Tecplot RS creates a “map” to the start of each time step in the file. The minimum and maximum values for each variable over all time steps are also saved, to correctly set up the legend for contour values.

Tecplot RS stores the optimized version of the grid geometry in an .rsgrid file and uses it to make loading the data faster and more memory efficient. The .rsgrid file contains information only on active cells. A corresponding .rsgridi file may also be present for any inactive cells in the grid.

Tecplot RS creates a WELLNUM variable in each cell in a grid that identifies cells that contain completions or are penetrated by a wellbore. This variable is visible when probing and is also used when activating the Well Blanking option for Inside Views in a 3D grid. The process of computing intersected cells between completions can be a lengthy one, so Tecplot RS also creates an auxiliary .rswells file to store it so it does not need to be computed each time a grid is loaded.

Tecplot RS also saves the indexes and ranges in small index files. The index file with extension .rsinit stores the static data. The file with extension .rsrst stores the time-dependent data. The .rsrst file has the same root name as the grid file, except in the case of VIP data, where it matches the recurrent file.

Tecplot RS creates any auxiliary file that does not exist or is out of date when it loads the grid file. However, for Tecplot RS to create these files, the user must have create and modify rights to the folder containing the simulator files. Creating the files can also slows down the initial loading of the data, sometimes significantly (for very large grid files).

To avoid these difficulties, the Tecplot RS installation includes a small executable named rspreprocess.exe which you can run separately. This file runs as a simple command-line executable (there is no user interface). You can set this up to run at the conclusion of a simulator run, ensuring that the Tecplot RS files will exist when individual users first load the grid data.

The rspreprocess.exe file installs to the bin folder in your Tecplot RS installation folder1. The utility program is available for both Windows and Linux systems.

For most formats, the preprocessor finds all associated data files and creates RSGRID, RSINIT, and RSRST files. For VIP files, the preprocessor does not search for any associated files. If you pass in an INIT map file, Tecplot RS creates RSGRID and RSINIT files. If you pass in a RECURR map file, Tecplot RS creates only the RSRST file. For VDB grids, Tecplot RS requires you to specify the path to the VDB folder and the case from within the folder that you wish to read.

warning00470.pngRSPreprocess cannot be used with with UTCHEM or GRDECL data files.

J - 1.1   Running RSPreprocess

To run the preprocessor, type the following on the command line (or include it in your script).

rspreprocess gridfilename

The gridfilename represents the name of the file that you would normally enter in the Grid field of the Load Grid Data dialog. If you wish to use a VDB folder, specify the location of the VDB. For all file types, you must include the file extension. For Eclipse file, if both the .grid and .egrid files exist, use the .grid file to use less RAM during the process. If your folder or file name contains spaces, enclose the grid file name in quotation marks. Even though you provide only the grid name, for Eclipse files, the program also requires that the restart data be available (either in individual or unified restart files).

Additionally, for VDB folders, you must include the case name after the grid file name, in the following format. Here, vdbdirectory replaces gridfilename:

rspreprocess vdbdirectory -case [value]

In this syntax, value represents the case to read from within the VDB folder. If it contains spaces, enclose the case in quotation marks.

J - 1.2   Additional RSPreprocess Parameters

RSPreprocess also includes optional parameters that you can include if you wish to change the default settings. To include one or more optional parameters, add them to the same line required to run the preprocessor, in the following manner (do not include the brackets):

rspreprocess gridfilename -[flag] [value]

In the syntax given, the flag represents one of the following parameters, and the value indicates the string or number you wish to assign, according to the following definitions. Do not include the brackets.

-smoothing [value]

The optional smoothing parameters enables you to specify a smoothing method. Use a number from one to three, to indicate the following:

1 = No smoothing (smoothing may occur based on x, y, or z tolerances)

2 = Smooth using shift method

3 = Smooth using node averaging (Default)

-xytol [value], -ztol [value]

Use either of these tolerance parameters instead of a smoothing method to indicate a tolerance used to determine whether adjacent corner nodes should be joined. (The X and Y values must match within this tolerance before corners are averaged to create the replacement node. The Z value determines the tolerance used when sharing nodes between K-planes.) Use a value greater than or equal to 0. The program uses a default of 0.05 for both xytol and ztol parameters.

-inactive “VARIABLE [OP] VALUE”

This value specifies the inactive cell condition for VIP files. Use a variable, followed by an operator (=, <, or >), followed by a value. By default, the program uses KID<0.

-units [value]

Use the specified units when reading CMG files. The value provided must be an integer between 0 and 8 inclusive, corresponding to one of the unit values listed below. The default value is 1 (FIELD).

Number

Units

0

SI (metric)

1

FIELD

2

LAB

3

MODIFIED SI

4

CHEARS/ECLIPSE

5

GEM SI

6

GEM FIELD

7

STARS LAB

On Windows, instead of using the command line, you can also run RSPreprocess by creating a shortcut on your desktop to the RSPreprocess executable, and drag and drop the grid file name to the executable icon.

Refer to Section 12 - 5 “Index File (.rsrst)” for additional information.

1.   For Windows users, Tecplot RS typically installs to C:/Program Files/Tecplot/TecRS 2023 R1.