VTKpytools/Barfiletools
From PHASTA Wiki
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
- Create "blank" MultiBlock VTK (VTM,
*.vtm
) file using custom Python script - Load *bar file data onto blank VTM file using
bar2vtk
CLI program - 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:
- Loading the coordinate and connectivity information of the spanwise mesh
- Generating the
data
object from the coordinate and connectivity data using - Extract wall data