Tutorial 7: Property Setter

Tutorial 7. Part 3. Setting Properties for a User Defined Code

The property setter is most useful for independent codes that are being developed by the user. GridPro implements functions for outputting a grid in any given solver format as a plug-in script and executable. For example, the user can add to the GridPro Graphics Manager the capability of outputting the grid in a given solver format without the requirement of knowing, changing or recompiling the GridPro source code.

Step 1. Set the Solver Format

After the grid is created and you have set the properties, you must save the grid in the format of your choice.

Step 2. Writing the Output Script

As mentioned in Step 1, when a grid is saved the GridPro graphics manager makes a system call to execute the outE_MyCode.script (or the outM_MyCode.script). It is the users responsibility to write the script, however, an existing script can be copied, edited and saved in the GridPro/az_mngr/ directory. The script should read in the elementary block grid, the .conn and .pty file, and the property mapping ptymap.MyCode file (which will be discussed later) and output the grid in MyCode format. A user can also use GridPro utilities such as trf, mrgb (merge block) or chfmt (change format) in the script to accomplish some of the tasks involved. In general, the user needs to write one C or FORTRAN program to finish the final conversion. Typically, the program will read GridPro files, i.e. blk.grd, blk.grd.conn, and optionally a blk.grid.pty file for elementary blocks or blk.grd.conn_n for super blocks.

Step 3. Adding Your Solver Name into the Property Sub-Menu

The property mappings map the internally used property identifications (in number format) to solver specific internal names and appear in the pty=SOLVER sub-menu at the top and in the property settings pull down menu located in the set surface parameters-popup dialog box.

Step 4. Writing the ptymap.MyCode file

It is the user’s responsibly to create the property mapping file to be saved in a file named ptymap.MyCode. The internal property names will be what the user sees when using the GridPro Graphics Manager. These names or labels will be assigned to the grids in the user defined format. Note that the GridPro grid is solver independent in that the properties are represented as numbers. It is the ptymap.MyCode file that must make the connection from the numbers to the internal names that are specific to the solver. To create a ptymap.MyCode file you can either copy and edit the ptymap.template or the ptymap.code_name of another solver.