ParaView Plugins#

tecio reads Tecplot data from any of its file formats into NumPy arrays, which makes it straightforward to hand that data to VTK objects and from there to ParaView. The plugins in the plugins/paraview folder of the repository do this as a ParaView reader and writer for Tecplot files.

ParaView already has readers for binary PLT and ASCII Tecplot files. However, it has no support for the Tecplot SZL format, and its Tecplot reader does not properly read STRANDID in the zone headers of DAT files. These plugins also carry Tecplot auxiliary data into VTK field data, and read and write polygon and polyhedron zones.

They are intended for users who have access to Tecplot (through a university or other institution, for example) but prefer to visualize their data in ParaView. Tecplot files are a common output of CFD solvers and meshing software, and the format stores complex multi-block and time-dependent field data efficiently.

Plugin

File

ParaView name

Purpose

Reader

TecplotTecioReader.py

Tecplot 360 Reader (TecIO)

Opens .szplt, .plt, .bin, .dat and .tec files as a multi-block dataset with one block per zone

Writer

TecplotTecioWriter.py

Tecplot 360 Writer (TecIO)

Saves a dataset or multi-block dataset to one of the same file types, chosen by the file extension

Requirements#

  • A ParaView with Python support.

  • The tecio package must be importable from the same Python interpreter that ParaView uses to run the plugins.

  • tecio must be able to find the TecIO shared library from a Tecplot installation, see Locating the TecIO Shared Library.

Loading a plugin#

External plugins may be automatically added and loaded by setting the PV_PLUGIN_PATH environment variable or following the directions below.

export PV_PLUGIN_PATH=/path/to/share/tecio/plugins/paraview
  1. In ParaView, open Tools > Manage Plugins…. 2. Click Load New… and select TecplotTecioReader.py or TecplotTecioWriter.py. 3. Expand the plugin in the list and tick Auto Load to load it each time ParaView starts.

Once loaded, the reader handles the supported extensions in File > Open and the writer is offered under File > Save Data.


Reader#

ParaView reader plugin for Tecplot 360 data files, built on tecio.

This plugin closes three gaps in ParaView’s built-in Tecplot reader: it cannot read .szplt, it errors out on some ASCII zone header fields, and does not read auxiliary data as VTK vtkFieldData.

Output structure

Each file is read into one vtkMultiBlockDataSet, one block per zone, named after the zone’s title (or "Zone <n>" if untitled):

  • ORDERED zones become vtkStructuredGrid blocks.

  • Classic finite-element zones (line, triangle, quadrilateral, tetrahedron, brick) become vtkUnstructuredGrid blocks.

  • FEPOLYGON zones become vtkUnstructuredGrid blocks of VTK_POLYGON cells, and FEPOLYHEDRON zones become blocks of VTK_POLYHEDRON cells. The face-based connectivity is converted per element: polygon edges are chained into the element’s node loop, and polyhedron faces are listed for each of the two elements that share them (reversed for the right element) so every face points out of its cell. Faces whose neighbor is another zone (boundary connections) are treated as plain boundary faces.

  • FEMIXED zones are not yet supported and are skipped with a printed warning.

  • A zone whose aux data marks it a non-Wall boundary (see “Zone visibility” below) still becomes a block, but its entry in the Zones property defaults to unchecked, matching Tecplot’s own default display convention.

Auxiliary data has no first-class equivalent in VTK, so it is mapped onto the nearest matching vtkFieldData, each item as a one-element array named after the aux-data key – numeric (int64/float64) when the value parses cleanly as a number, else a vtkStringArray. Tecplot itself treats aux data as usable scalars in its own equations, and a numeric VTK array is the equivalent for ParaView: it works directly in the Python Calculator, Calculator filter, and numeric-oriented annotation filters, not just as inert display text.

  • Dataset-level aux data -> the root vtkMultiBlockDataSet’s field data.

  • Variable-level aux data -> also the root field data, keyed "<variable name>::<aux key>" (there is no per-array metadata slot that ParaView’s UI surfaces to users).

  • Zone-level aux data -> that zone’s own block’s field data.

Coordinates

Tecplot data files do not tag which variables are spatial coordinates (that is ordinarily a plot/frame setting, not a file-format concept), so this reader resolves each axis in priority order:

  1. The XArray/YArray/ZArray properties, if set to a real variable name.

  2. The dataset aux data items Common.XVar/Common.YVar/Common.ZVar, per the Tecplot data format guide – each holds the 1-based dataset variable number to use for that axis, when the file itself specifies one.

  3. A name match against some spelling of x/y/z (case-insensitively, e.g. "X", "x-coordinate").

  4. For X and Y only, positional fallback to the first and second dataset variables, since almost every Tecplot CFD file leads with its coordinates. Z has no positional fallback beyond the third variable and defaults to all-zero (2-D data) when nothing is found by steps 1-3.

Vector components

If the dataset aux data specifies Common.UVar/Common.VVar/Common.WVar (or the UArray/VArray/WArray properties are set manually), this reader assembles those component variables into one 3-component array per zone so glyphs, streamlines, and vector-magnitude coloring work without a separate Calculator step. Unlike coordinates, there’s no name-based guessing here (solver vector naming varies too much to guess reliably), so nothing is built at all unless at least one of U/V/W actually resolves; a resolved-but-missing component (2-D flow, or passive in a particular zone) is treated as zero rather than blocking the other components. The array is named "Velocity" if the dataset aux item Common.VectorVarsAreVelocity is truthy, else "Momentum".

Zone visibility

Tecplot sets default visiblilty for zones with auxdata that marks them a boundary that isn’t a wall (Common.IsBoundaryZone true and Common.BoundaryCondition not "Wall").

Known limitations (first pass)
  • FEMIXED zones are skipped. Polygon and polyhedron zones need a tecio that reads them (PLT and DAT files only; SZPLT files cannot hold them yet), and are skipped with a printed warning when it does not.

  • A polygon element is assumed to have its left face neighbors on the left of each directed edge (counterclockwise). If an element’s edges do not chain into one closed loop, the loop is rebuilt without relying on edge direction.

  • SOLUTION-only files (grid coordinates stored in a separate, unopened GRID file) have no coordinate data to build geometry from and are not handled specially; they will fail coordinate resolution unless the variables happen to still be present.

  • Boundary connections between zones, custom labels, geometry/text annotations, and Tecplot’s classic-PLT auxiliary record types outside dataset/zone/variable aux data are not handled by tecio data readers.

Indexing

tecio’s Python API is 0-based, so zone titles that are missing fall back to "Zone <zone_index>" counting from 0, and the Zones property keys are "<zone_index>: <title>". File-level values that Tecplot defines as 1-based (the Common.XVar/YVar/ZVar/UVar/VVar/WVar aux items) are still read as 1-based variable numbers.

Requirements

The tecio package must be importable from the same Python interpreter ParaView uses to run this plugin.

ParaView properties#

The reader exposes these properties in the Properties panel. Each one is backed by a method of the plugin class.

Property

Method

FileName

SetFileName()

Arrays

GetDataArraySelection()

Zones

GetZoneSelection()

XArray, YArray, ZArray

SetXArray(), SetYArray(), SetZArray()

UArray, VArray, WArray

SetUArray(), SetVArray(), SetWArray()

VariableInfo

GetVariableInfo()

TimestepValues

GetTimestepValues()

Class reference#

TecplotReader

Reads Tecplot SZL/PLT/DAT files into a vtkMultiBlockDataSet.


Writer#

ParaView writer plugin for Tecplot 360 data files, built on tecio.

The counterpart to TecplotTecioReader: writes whatever is on the input port out as a Tecplot SZL/PLT/DAT file, so a pipeline (or a filter’s output) can be exported without going through ParaView’s own, more limited Tecplot writer. As with the reader, the output format is chosen by the saved file’s extension.

Output structure

The input may be a single vtkDataSet or a vtkMultiBlockDataSet; every leaf block becomes one Tecplot zone, named after the block’s composite-data name (or "Zone <n>", counting from 0, if unnamed). Geometry is mapped per block:

  • vtkStructuredGrid, vtkRectilinearGrid, and vtkImageData become ORDERED (IJK) zones.

  • vtkPolyData and vtkUnstructuredGrid (and any other dataset exposing explicit points and cells) become finite-element zones, one per VTK cell type present: line, triangle, quadrilateral, tetrahedron, and hexahedron cells give classic FELINESEG/FETRIANGLE/FEQUADRILATERAL/FETETRAHEDRON/ FEBRICK zones, VTK_POLYGON cells give an FEPOLYGON zone, and VTK_POLYHEDRON cells give an FEPOLYHEDRON zone. A block mixing cell types (e.g. a surface with both triangles and polygons) is split into one zone per type, each zone keeping only the points its own cells reference.

  • Any other cell type (triangle strip, vertex, wedge, pyramid, …) is not representable by these zone types and is skipped with a printed warning – the rest of the block is still written.

  • Polygon and polyhedron zones are stored face by face, each face with the one or two elements on its sides, so the faces are matched up between neighboring cells. Polyhedron faces are turned to point out of their cell (using the sign of its volume), and polygons are turned counterclockwise when all the points have the same z. Polygon and polyhedron zones can be saved to .plt and .dat files, not yet .szplt.

Coordinates

The first three dataset variables are always named x, y, z and carry each zone’s point coordinates (z is all-zero for 2-D geometry). The dataset aux items Common.XVar/YVar/ZVar are set to 1/2/3 so this plugin’s own reader (and Tecplot 360 itself) auto-detect them on reopen.

Variables

Every point-data and cell-data array across every block contributes to one dataset-wide variable list (in first-seen order, after the three coordinates); a block missing a given array has that variable marked passive for its own zone(s). A multi-component array (a vector or tensor) has no scalar equivalent in classic Tecplot zones, so each component becomes its own scalar variable: 2- and 3-component arrays use "<name>_X"/"_Y"/"_Z" suffixes, matching how TecplotTecioReader reassembles Common.UVar/VVar/WVar into one vector array; wider arrays fall back to "<name>_0", "<name>_1", etc. An array named exactly "Velocity" or "Momentum" additionally gets Common.UVar/VVar/WVar (and, for "Velocity", Common.VectorVarsAreVelocity) pointing at its decomposed components, so it round-trips back into one vector array when reopened through this plugin’s reader.

Auxiliary data

The input’s field data has no first-class Tecplot equivalent, so it is mapped the same way TecplotTecioReader reads it back, in reverse: the root dataset’s field data becomes dataset-level aux data (a "<variable name>::<key>" array name is split back into variable-level aux for that variable, if the name resolves), and each block’s own field data becomes that zone’s aux data. Only the first value of a multi-valued field-data array is kept, since Tecplot aux items are single strings.

Known limitations (first pass)
  • No coordinate, connectivity, or variable sharing is attempted between zones. Zone-to-zone sharing (as used elsewhere in this project, e.g. tecmerge’s grid sharing) would reduce output size for such pipelines, but is not implemented here.

  • This plugin writes one static snapshot of its input. It does not loop over the pipeline’s time steps itself; ParaView’s own “write a file per time step” animation/file-series mechanism, where supported by the installed ParaView version, is the way to export a transient pipeline through this writer.

  • Triangle-strip, vertex, wedge, and pyramid cells are skipped rather than approximated. A polygon edge or polyhedron face shared by more than two cells cannot be stored, and the cells of that type in that block are skipped.

  • Points not referenced by any kept cell are dropped from their zone rather than written as isolated, cell-less nodes (classic Tecplot FE zones have no concept of an unused node).

Indexing

tecio’s Python API is 0-based, so an unnamed block is titled "Zone <n>" counting from 0 and variable-level aux data is keyed by 0-based variable index. Values that Tecplot defines as 1-based in the file (Common.XVar/YVar/ ZVar/UVar/VVar/WVar) are still written as 1-based variable numbers.

Requirements

The tecio package must be importable from the same Python interpreter ParaView uses to run this plugin.

ParaView properties#

Property

Method

FileName

SetFileName()

Class reference#

TecplotWriter

Writes the input's current data as one Tecplot SZL/PLT/DAT file.