Post Processing Overview

Post processing is required to reassemble the partitioned restart files, this is accomplished using post_nsu3d. The output of post_nsu3d can be used in tecform, a post-processor which constructs a file for input to a visualization program.

For an example of how to use the post processing tools see the tutorial.

postnsu3d

post_nsu3d is a facility for reassembling partitioned restart files generated from parallel nsu3d runs into a single restart file which can then be used as input to other post-processors such as slice and tecform. post_nsu3d can also be used in reverse mode, to partition an existing assembled restart file into a form suitable for use as input to a parallel nsu3d run. Two applications of post_nsu3d can be use to convert a partitioned restart file into restart file partitioned into a different number of partitions by first assembling the existing partitioned restart file, and then repartitioning this file.

post_nsu3d not only assembles or partitions the restart files, but also reorders the data internally in order to correspond to the architecture-optimized ordering imposed by prensu3d on the grid data. For this reason, post_nsu3d must be invoked even for restart files resulting from non-parallel nsu3d runs.

To achieve these functions, post_nsu3d requires as input the restart directory produced by the flow solver, (or the single restart file, when using the reverse mode) and the directory of partitioned grid data produced by post_nsu3d. In actual fact, only the order.n files from this directory are required by post_nsu3d, but it is most often simplest to supply the entire directory without separating out different files.

A sample parameter input file for post nsu3d is given below:

For convenience, the NSU3D flow solver automatically creates 2 post_nsu3d input files in the ./WRK (restart) directory. These include the appropriate mesh and solution file path names such that post_nsu3d can be run directly from the directory where the NSU3D case was run as:

post_nsu3d < WRK/input.postnsu3d
(creates restart.unf file in ./WRK)

post_nsu3d < WRK/input.turb.postnsu3d
(creates restart.aux.unf file in ./WRK)

Tecform

tecform is a post-processor which constructs a file for input to a visualization program. tecform can be used to view a grid and its associated patch system or components, to check the validity of a boundary condition (*.bcs) file applied to a particular grid, or the component file (*.comp), or to view a computed solution on a surface grid or in the interior volume grid.

Beginning with Version 5.0, input mesh file formats include:
1: Formatted *.mcell.form files (ASCII) (not recommented)
2: Unformatted *.mcell.unf or *.mcell files (default)
3: Binary *.ugrid mesh files

There are 4 supported output file formats:
1: *.dat ASCII files for tecplot
2: *.plt binary files for tecplot (also readable by Paraview)
3: *.szplt binary files for tecplot (newer more efficient tecplot format)
4: *.vtu files for Paraview
Additionally, formats (5) for Ensight and (6) for Fieldview are still available but no longer fully supported, as these applications now accept other file formats.

The *.plt and *.szplt binary tecplot files require the source code to be linked to the tecio library, which is included in distributed executables of teform. For source code compilation in cases where this library is not available, the tecform makefile provides a compile option which omits linking the library, while disabling the binary file output option. This is achieved by setting the TECIO variable in the makefile as TECIO = TECIO_OFF. When TECIO = TECIO_ON is specified, the tecio library will be linked. In this case, the location of the library must be specified in the TECLIB makefile variable.

Surface or volume files can be generated with tecform. For surface plot files, multiple zones can be created using the No. Of Zones parameter. Surface zones can be created based on all patches in the mesh (-1.0), all boundary conditions specified in a *.bcs file (0.0), all components specified in a *.comp file (-2.0), or all bodies specified in a *.comp file (-3.0).

For volume plots, two zones are created for a mixed element mesh, one for all tetrahedral elements and a second zone for all other element types. The exception is for the *.szplt and *.vtu file formats, where a single zone is created for all element types. Alternatively, a single zone file can be created for all tetrahedral elements only, or all other element types for all output formats. (see Line 13 parameter)

A sample input file for tecform is given below:

  • Line 1: A title describing the particular case. This title is written to the TECPLOT binary (only) files and appears in the TECPLOT window when the file is read in.

  • Line 3: Name of grid input file, this can be a *.mcell or *.ugrid file. (mixed element unstructured grid cell files). Format should be 2.0 for a mixed element unstructured grid mcell (unformatted fortran) file, Format = 3.0 is used for ugrid (binary) files. The format parameter can be OMITTED and the file format will be automatically detected from the file extension name. Note that *.lb8.ugrid (little endian) and *.b8.ugrid (big endian) files can both be read in, although tecform must be recompiled for the correct endian format of these respective files, or the appropriate ENV runtime variable must be used, if available. *.r8.ugrid files are also supported under the same conditions. Format -2.0 can still be used for old obsolete tetrahedral-only cell files.

  • Line 5: Name of NSU3D restart file. Format should be 2.0. If only viewing grid and no solution or restart file is available, this file name can be skipped or replaced with "none" and also by specifying 0.0 plot variables on Line 13, and deleting lines 17 through 21.

  • Line 7: Name of output file to be written. The following output format options are available:
    IFORM=1.0 : *.dat Formatted Tecplot ASCII file
    IFORM=2.0 : *.plt Binary Tecplot file (also readable by Paraview)
    IFORM=3.0 : *.szplt Improved Binary Tecplot file
    IFORM=4.0 : *vtu Binary file(s) for Paraview
    IFORM=5.0 : Ensight files (available but no longer supported)
    IFORM=6.0 : Fieldview Files (available but no longer supported)
    Automatic Selection: If the output filename includes the appropriate suffix (i.e. *.plt, *.vtu) the filename will not be changed. Otherwise the suffix for the generated file type will be appended. This allows the user to specify a generic output file name and control the file type through the FORMAT parameter.

  • Line 13: For surface plot only use 1.0, for a volume plot set equal to 2.0. Surface plots are most often used due to the much smaller amount of data. Surface plots can be divided up into multiple zones (see line 23). Volume plots are treated as a single zone for *.szplt and *.vtu output files, or two zones for *.dat and *.plt output files which include a separate zone for tetrahedral elements and other element types. Alternatively, a single zone containing only tetrahedral elements or other element types can be obtained by specifying values 3.0 and 4.0, respectively, for all output formats.

  • Line 16: This is the number of variables to be output for plotting. There can be a maximum of 9 variables, and a minimum of 0 variables. The number of lines under the heading of Line 17 (lines 18 through 21 in this case) must be equal to the specified number of plotting variables. In the event that no plotting variables are desired, this value can be set to 0.0, and lines 17 through 21 can be omitted. In this case, no solution/restart file is read in.

  • Lines 18 - 21: Specify plotting variables. Number of lines must be same as stated number of variables on Line 16. IPLOT value is a dummy counter. Variable name must be selected from one of the following: density, rhou, rhov, rhow, energy, mach, cp, cptotal, entropy, STANDARD (or standard) and dummy. The first five of these names correspond to the values in the five locations in the solution/restart file (usually conserved variables). The next four variables are computed from these variables within tecform. Specifying STANDARD will use the names and values as they appear directly in the restart file with no modifications. Dummy sets all values to 1.0 for testing purposes. Note that for restart.aux.unf solution input files (which contain predefined values), the input values are never modified and the listed names in the tecform input file are ignored. Tecform lists the output variable names at the end of execution to std out.

  • Line 23: Number of zones for surface plotting. Most often, one of the following options will be used:
    NZONE = -3.0: Create zones based on Bodies defined in *.comp file (listed on Line 24)
    NZONE = -2.0: Create zones based on components defined in *.comp file (listed on Line 24)
    NZONE = -1.0: Create zones based on patches listed in original mesh file read in on Line 3
    NZONE = 0.0: Create zones based on boundary conditions assigned by *.bcs file (listed on Line 24)
    Zones based on patches (-1.0) can be used to visually set boundary conditions or components/bodies as sets of patches. The other options can be used to check the validity of the *.bcs or *.comp files created to define boundary conditions and components prior to running the flow solver. Note that for components or bodies, if a *.comp file is not found, the component/body definition contained in the *.mcell file will be used. *.ugrid files do not contain component information and thus will default to a single component if no component file is found. Alternatively, a positive > 0 NZONE value can be set and the zones can be specified as a collection of patches following the same format as the *.comp file. (see example below from old format (V4) documentation). However, this will only define zones for the tecplot output file, and will not modify the mesh file or be used in the flow solver runs.
    For volume plotting this entry and all subsequent lines are not read in.


For previous version documentation click here ((tecform V4 and older)

slice

slice is a post-processor which takes two-dimensional slices of data defined by a grid (*.cell) file and a solution (restart.out) file. The output can consist of one-dimensional line data along the intersection of the three-dimensional surface grid and the slicing plane, or two-dimensional field data at the intersection of the slicing plane and the volume grid. slice can compute coordinate-aligned as well as oblique planar cuts and can also be used to produce files for plot13d andplot23d (unsupported 1D and 2D plotting packages), or for TECPLOT (both 2D and 3D).

Beginning with Version 2.5, binary (3D only) files for TECPLOT are supported. This format is specified by setting the format variable on Line 9 in the input list to 2.0. Binary files are desirable because they are much smaller and faster to read and write. Binary TECPLOT files usually have a *.plt su x. In order to write binary TECPLOT files, the tecutil.a library must be linked by slice. For cases where this library is not available, the slice make file provides a compile option which omits linking the library, while disabling the binary file output option. This is achieved by setting the TECIO variable in the make file as TECIO = TECIO_OFF. When TECIO = TECIO_ON is specified, the tecutil library will be linked. In this case, the location of the library must be specified in the TECLIB make file variable.

A sample input file for slice is given below:

  • Line 1: A title describing the particular case
  • Line 3: Name of grid input file, this is a *.cell file (mixed element unstructured grid cell file). Format should be 2.0 for a mixed element unstructured grid cell file (most common), or -2.0 for old obsolete tetrahedral-only cell files.
  • Line 5: Name of NSU3D restart file. Format should be 2.0
  • Line 7: Name of boundary condition (*.bcs) file. This file is required only if surface types are picked by boundary condition type (see Lines 22-24), otherwise it is not read in.
  • Line 9: Format for output files. Select 0.0 for surface and volume slice files compatible with plot13d and plot23d (unsupported line and 2D plotting packages). Select 1.0 for formatted 2D and 3D TECPLOT files. Select 2.0 for binary 3D TECPLOT files (2D surface file remains formatted). When binary output is selected, the tecutil.a library must be linked at compile time using the TECIO and TECLIB variables in the makefile.
  • Line 11: Select surface (= 1.0) or volume (= 2.0) plot, or both (= 3.0) A surface only plot will produce data of conserved variables on the one dimensional surface/plane intersection. This data can either be viewed with the unsupported program plot13d, or by reformatting for TECPLOT. Volume intersections produce two-dimensional planar data that is output in a format consistent with the unsupported program plot23d. This data can also be reformatted for TECPLOT. When a surface and volume cut are selected ( = 3.0), the surface plot will include skin friction data at the surface-planar cut intersection. This is not done in the case where a surface plot only is selected ( = 1.0) since this requires information from the interior volume grid (i.e. the first point off the wall for a gradient), which cannot be assumed to exist if only a surface values are supplied.
  • Line 13: Tolerance for search: The intersection routines are performed in real arithmetic (64 bit). A tolerance is required to test for intersections. A small value should be specified here. If anomalies in the output are detected, this value can be altered to a effect the outcome of the intersection test. In general, this should not require adjustment.
  • Lines 15 - 16: A bounding box for the intersection test can be specified in order to clip extraneous data. This is specified as a range on the three coordinate axes outside of which data is ignored. Line 13 specifies the minimum x,y,z values for this range, and Line 14 specifies the maximum x,y,z values. To avoid any clipping, these values should be set larger than the extent of the grid.
  • Line 18: The cutting plane is defined on this line. There are two ways of defining the cutting plane. For cuts aligned with one of the coordinate axes, a coordinate direction and value are defined. The coordinate direction is defined by the first entry FKIND. FKIND = 1.0, 2.0, or 3.0 denotes a planar cut at x= constant, y = constant, or z = constant. The location of the planar cut is then defined by the second input, FPOSITION, which corresponds to the constant value of the x,y, or z coordinate. Oblique planar cuts can be specified with a negative entry for the first variable on Line 16, i.e. FKIND = -1, -2, -3, or -4. In this case, a series of 6 real numbers must follow, specifying the x,y,z coordinates of the plane origin, and the direction cosines of its normal. The resulting intersected data will be projected onto one of the coordinate axes depending on the value of FKIND:
fkind = -1 : Projected onto x-axis (y-z coords)
fkind = -2 : Projected onto y-axis (x-z coords)
fkind = -3 : Projected onto z-axis (x-y coords)
fkind = -4 : No projection, plane coords centered at xpos,ypos,zpos

  • Line 22: A rotation of the resulting intersected data may be applied to obtain a desired orientation. Specified in degrees.
  • Line 24: A reflection of the resulting intersected data about the x-axis may be applied to obtain a desired orientation. Reflection is applied if the value 1.0 is entered on Line 22. If 0.0 is entered, no reflection is performed.
  • Lines 26 - 28: These lines determine which portions of the surface grid are to be intersected by the planar cut. These can be chosen based on boundary condition type (enter 0.0 on line 26), patch type (1.0 entry), component type (2.0 entry) or body type (3.0 entry). If boundary condition type is specified, then a valid boundary condition (*.bcs) file must be listed on Line 7, and a valid boundary condition type must be listed on line 28. In all other cases, the numerical id of the patch/component/body must be listed on line 28.
  • Line 30: The number of plot variables to be output is specified here. The maximum number is 5 and the minimum 0.
  • Lines 32-36: List the desired plot variables, one per line.
Additional Information:
Coordinate Plane Definition:
fkind = 1 ---> Plane defined by : x = fposition
fkind = 2 ---> Plane defined by : y = fposition
fkind = 3 ---> Plane defined by : z = fposition
Oblique Plane Options:
fkind = 0 ---> Physical Coordinates (x-y-z)
and x/c,y/c,z/c, (c= local chord(min-max))
fkind = -1 ---> Projected onto x-axis (y-z coords)
fkind = -2 ---> Projected onto y-axis (x-z coords)
fkind = -3 ---> Projected onto z-axis (x-y coords)
fkind = -4 ---> No projection, plane coords
centered at xpos,ypos,zpos
Plane Defined by point: xpos,ypos,zpos
and Direction Cosines : fn1,fn2,fn3
AVAILABLE VARIABLE TYPES:
density
rhou
rhov
rhow
energy
mach
cp
cptotal
entropy
cf
dist
dummy