VTKpytools/Barfiletools

From PHASTA Wiki
Revision as of 17:22, 24 August 2020 by Jrwrigh (talk | contribs) (save state)
Jump to: navigation, search

bar2vtk is a module within the VTKpytools package containing functions for converting *bar files (velbar, stsbar, etc.) into VTK files and for post-processing those VTK files.

Overview of Post-Processing *bar Files

  1. Create "blank" MultiBlock VTK (VTM, *.vtm) file using custom Python script
  2. Load *bar file data onto blank VTM file using bar2vtk CLI program
  3. Read the "loaded" VTM file and post-process

Examples of each of the three processes listed above can be found in the examples directory of the vtkpytools repository.

Creating Blank VTM File

The VTM file simply holds the coordinate, connectivity, and geometry information for the domain. It should contain two blocks: data and wall.

data
A VTK Unstructured Grid of the 2D spanwise mesh and (after running bar2vtk) the data associated with each node
wall
A VTK PolyData of the line that defines the wall of the domain. It is a subset of the connectivity and vertices of data

The process of creating the blank VTM file is:

  1. Loading the coordinate and connectivity information of the spanwise mesh
  2. Generating the data object from the coordinate and connectivity data using
  3. Extract wall data