10.7. PLOT3D Results File Format

PLOT3D input data consists of the following:

  • Geometry file (required) (GRID file).

  • Results file (optional).

  • EnSight5 Measured/Particle Files (optional). The measured .res file references the measured geometry and variable files.

PLOT3D data files can be read as:

  • Workstation: ASCII, C Binary, or FORTRAN binary

  • Cray: ASCII, C Binary, or COS-Blocked FORTRAN binary

PLOT3D Reader

Due to the different number of representations on a Cray Research vector system and workstations, binary files created on a Cray Research vector system can not be read on the workstation, and visa versa.

EnSight attempts to ensure that the format of the file being read matches the format you have selected in the Data Reader dialog. However, if you specify that the file is C binary, and it is really FORTRAN binary, this will not be detected and erroneous values will be loaded.

EnSight reads the geometry (xyz files) directly. However, an EnSight-like results file (described below) is needed in order to read the results, unless a "standard" Q-file is provided in its place.

PLOT3D Geometry File Notes

The following information is required in order to read PLOT3D files correctly:

  1. whether there is Iblanking information in the file

  2. whether files are in ASCII, C Binary, or FORTRAN binary

  3. whether the file is "Single Zone" or Multi-Zoned"

  4. whether the model is 1D, 2D, or 3D in nature.

Iblanking can be one of the following:

  • 0 = Outside (Blanked Out)

  • 1 = Inside

  • 2 = Interior boundaries

  • <0 = zone that neighbors

If single zone with Iblanking, you can build EnSight Parts from the inside portions, blanked-out portions, or internal boundary portions. If single zone, you can also specify I, J, K limiting ranges for Parts to be created.

If Multi-zoned with Iblanking, you can additionally build Parts that are the boundary between two zones. (For boundary you must specify exactly two zones.)

If Multi-zoned and not using the "between boundary" option, a Part can span several zones.

If Multi-zoned, the dimension of the problem is forced to be 3D.

There can be nodes in different zones which have the same coordinates. No attempt has been made to merge these. Thus, on shared zone boundaries, there will likely be nodes on top of nodes. One negative effect of this is that node labels will be on top of each other.

Currently EnSight only prints out the global conditions in the solution file, fsmach, alpha, re, and time. It does not do anything else with them.

Node and element numbers are assigned in a sequential manner. Queries can be made on these node and element numbers or on nodes by I, J, and K.

10.7.1. PLOT3D Result file format

The PLOT3D result file was defined by Ansys and is very similar to the EnSight results file and contains information needed to relate variable names to variable files, step information, etc. There is a slight variation from the normal EnSight results file because of the differences between the solution (Q file) and function files. The difference lies on the lines which relate variable filenames to a description. These lines have the following format:

<filename> <type> <number(s)> <description>

See PLOT3D Result File below for the definition of each.

The following information is included in a PLOT3D result file:

  • Number of scalar variables

  • Number of vector variables

  • Number of time steps

  • Starting file number extension and skip-by value

  • Flag that specifies whether there is changing geometry.

  • Names of the files that contain the values of scalar and vector variables. An indication as to the type of the file being used for the variable, which variable in the file and the name given to that variable.

  • The names of the geometry files that will be used for the changing geometry.

10.7.2. Generic PLOT3D Result File Format

The format of the Result file is as follows:

  • Optional first line, Line 0

  • Contains the maximum, never-to-exceed number of timesteps. This is used if the number of timesteps is changing over time, perhaps being written out by a solver. Your first load of the data might include a few of the timesteps. The presence of this keyword indicates that the user may request an update and the reader may update the number of timesteps available in EnSight. The value entered is an integer number of timesteps.

  • Line 1

  • Contains the number of scalar variables, the number of vector variables and a geometry changing flag. If the geometry changing flag is 0, the geometry of the model does not change over time. Only the coordinates can change for a PLOT3D file at present time.

  • Line 2

  • Indicates the number of time steps that are available.


Note:  If this number is positive, then EnSight will assign the time values listed in Line 3 to the Analysis_Time constant variable. If this value is negative, the time values in Line 3 must be removed and EnSight will assign the TIME (or Tvref for OVERFLOW restart q-file(s) ) value from the header of the q-file(s) to the Analysis_Time constant variable. This is noted under PLOT3D and/or OVERFLOW readers (see Other Readers).


  • Line 3

  • Lists the time that is associated with each time step. There must be the same number of values as are indicated in Line 2. This "line" can actually span several lines in the file. (Exists if Line 2 is a positive, non-zero value).

  • Line 4

  • Specified only if more than one time step is indicated in Line 2. The two values on this line indicate the file extension value for the first time step and the offset between files. If the values on this line are 0 5, the first time step available has a subscript of 0, the second time step available has a subscript of 5, the third time step has a subscript of 10, and so on.

  • Line 5

  • This line exists only if the changing geometry flag on Line 1 has been set to 1. Line contains name of the PLOT3D xyz file. The file name must follow the EnSight wild card specification.

  • Line 6 through Line [5+N] where N is the number of scalar variables specified in Line 1.

  • List the file names that correspond to each scalar variable. There must be a file name for each scalar variable that is specified in Line 1. If there is more than one time step, the file name must follow the EnSight wild card specification.

  • These lines also contain the type of file being used, solution or function, and the location of the variable value in the file. The contents are:

  • <filename> <type> <number> <description>

  • where filename is the name of solution file or function file containing the variable; type is "S" for solution file, or "F" for function file; number is which variable in the file to use (specify just one number); and description is the Description of the variable.

  • The solution file ("s") is the traditional .q file in which normally the first variable is density, the second through fourth variables are the components of momentum, and the fifth variable is total energy.

  • Lines that follow the scalar variable files.

  • List the file names that correspond to each vector variable. There must be a file name for each vector variable that is specified in Line 1. If there is more than one time step, the file name must follow the EnSight wild card specification.

  • These lines also contain the type of file being used, solution or function, and the location(s) of the variable values in the file. The contents are:

  • <filename> <type> <numbers> <description>

  • where filename is the name of solution file or function file containing the variable; type is "S" for solution file, or "F" for function file; numbers are which variables in the file to use (specify just three numbers); and description is the Description of the variable.

The generic format of the result file is as follows:

maximum time steps: tm
#_of_scalars #_of_vectors geom_chng_flag
#_of_timesteps
time1 time2 time3 .....
start_file_# skip_by_value
geometry_file_name.geo**
scalar0_file_name** type # description
scalar1_file_name** type # description
.
.
.
vector0_file_name** type # # # description
vector1_file_name** type # # # description
.
.
.

PLOT3D Example

This example illustrates a result file that specifies a non-changing geometry with only one time step. You would not enter the max number of timesteps keyword as the data is not transient.

3 2 0
1
0.0
block.sol S 1 Density
block.sol S 5 Total_Energy
block.scl F 1 Temperature
block.var F 1 2 3 Displacement
block.sol S 2 3 4 Momentum

Thus, this model will get two scalars from the solution file (block.sol). The first is Density in the first location in the file and the next is Total energy in the fifth location in the solution file. It will also get a Temperature scalar from the first location in the function file (block.scl).

It will get a Displacement vector from the function file called block.var. The three components of this vector are in the 1st, 2nd, and 3rd locations in the file. Finally, a Momentum vector will be obtained from the 2nd, 3rd, and 4th locations of the solution file.

Vectors can be 1D, 2D, or 3D. For a vector, always provide three numbers, but a zero will indicate that a component is empty, thus:

block.var F 1 0 3 XZ_Displacement

would be a 2D vector variable with components only in the X-Z plane.

If the above example had transient variables (but not geometry), with 3 time steps, it would appear as:

3 2 0
3
0.0 1.5 4.0
1 1
block.sol** S 1 Density
block.sol** S 5 Total_Energy
block.scl** F 1 Temperature
block.var** F 1 2 3 Displacement
block.sol** S 2 3 4 Momentum

The files needed would then be:

block.sol01

block.scl01

block.var01

block.sol02

block.scl02

block.var02

block.sol03

block.scl03

block.var03

EnSight Gold Undefined Variable Values Format


Note:  Because the maximum time steps keyword was entered, more files can be written after postprocessing in EnSight as begun (here up to 100), and the user can update and get the new timesteps as needed. See the Advanced section of How To Load Transient Data. Leave this keyword out if you do not expect to add more files and more timesteps during your EnSight session.


And if the geometry changed as well as the variables, it would appear as:

maximum time steps: 223
3 2 1
3
0.0 1.5 4.0
1 1
block.geo**
block.sol** S 1 Density
block.sol** S 5 Total_Energy
block.scl** F 1 Temperature
block.var** F 1 2 3 Displacement
block.sol** S 2 3 4 Momentum

The files needed would then be:

block.sol01

block.scl01

block.var01

block.geo01

block.sol02

block.scl02

block.var02

block.geo02

block.sol03

block.scl03

block.var03

block.geo03


Note:  Because the maximum time steps keyword was entered, more files can be written after postprocessing in EnSight as begun (here up to a total of 223 timesteps), and the user can update and get the new timesteps as needed. See the Advanced section of How To Load Transient Data. Leave this keyword out if you do not expect to add more files and more timesteps during your EnSight session.



Note:  A standard Q-file can be substituted for PLOT3D result file format if desired. A standard Q-file has 5 variable components (First is density, then the three components of momentum, and last is energy).