4 - 28   VTK Data Loader

The VTK Data Loader loads unstructured VTK (Visualization Toolkit) files which have the filename extension, .vtu. The VTU format is an XML-based format used by solvers. The loader is designed to work with ASCII, inline-binary, and appended formats with "raw" or "base64" encoding and either big or little-endian byte ordering, with or without ZLib compression. The supported VTK cell types are Vertex, Line, Triangle, Pixel, Quad, Tetra, Voxel, Hexahedron, Wedge, and Pyramid. These types are loaded into Tecplot 360 EX as ordered-point, FE-Lineseg, FE-Triangle, FE-Quad, FE-Tetra, and FE-Brick data. The VTK loader has no advanced options dialog but does provide advanced options that can be set via the macro language by augmenting the VTK Data Loader instructions in the $!READDATASET command of a layout or macro file.

Multiple VTU files can loaded at one time or appended to an existing dataset. Multiple VTU files loaded at one time must all have the same number of variables (VTK DataArray elements) and the same variable names in the same order.

The VTK Data Loader can also load .pvtu and .vtm files. A .pvtu file is a parallel VTU file that references one or more VTK data files and assembles them together to form a single zone, one for each .pvtu file. A .vtm file is a multi-block file that references one or more VTK data files and assembles them into multiple zones, one for each data file referenced.

The VTK Data Loader will read the <FieldData> section of the files and add any scalars it finds there to the zone's auxiliary data. If all of the files have a scalar named "time" in the <FieldData> section, the loader can use the "time" scalar variable for the zone's solution time. If the loader is instructed to use the "time" scalar for solution time, it will not add the "time" scalar to the zone's auxiliary data. The VTK loader can optionally detect a consistent pattern of incrementing numeric values in the names of the files themselves and use them for the zone's solution time. If the loader cannot follow the instruction it is given, because not all of the files have the "time" scalar or because there is no consistent pattern of values in the filenames, it will not assign a solution time or strand ID.

To tell the loader how to assign solution times, add the name/value pair "SOLUTIONTIMESOURCE" <setting> to the loader instructions. The settings are listed below.

4 - 28.1   Macro Language Commands for the VTK Data Loader

The syntax for loading VTU data files with the Tecplot macro language is through the $READDATASET command as follows:

$!READDATASET

' "STANDARDSYNTAX" "1.0" "...one or more VTK Data Loader instructions..."'

DATASETREADER = 'VTK Data Loader'

The VTK DATA Loader instructions are in name/value pairs and each name/value pair should be independently surrounded by double quotes. Refer to the Scripting Guide for details on working with the Tecplot macro language.:

Keyword

Value(s)

Default

Notes

STANDARDSYNTAX

"1.0"

n/a

Must be the first instruction.

FILENAME_FILE

"filename"

n/a

Specify a single file name.

FILELIST_DATAFILES

"n" "file-1" "file-2".... "file-n"

n/a

Specify the number of solution files, followed by each file name.

SOLUTIONTIMESOURCE

"FromFieldData", "FromFilename", "Auto", "None"

"Auto"

Select one solution time source:

"Auto": Favors the "time" scalar for the solution time over the numbers embedded in file names,

"None": Does not assign solution time or Strand ID,

"FromFieldData": Uses the "time" scalar for solution time,

"FromFileName": Uses the solution time embedded in the file names.