Difference between revisions of "VTKpytools/Barfiletools"
From PHASTA Wiki
(Created page with "start") |
(save state) |
||
Line 1: | Line 1: | ||
− | + | '''bar2vtk''' is a module within the [[VTKpytools]] package containing functions for converting *bar files (<code>velbar</code>, <code>stsbar</code>, etc.) into VTK files and for post-processing those VTK files. | |
+ | |||
+ | == Overview of Post-Processing *bar Files == | ||
+ | |||
+ | # Create "blank" MultiBlock VTK (VTM, <code>*.vtm</code>) file using custom Python script | ||
+ | # Load *bar file data onto blank VTM file using <code>bar2vtk</code> CLI program | ||
+ | # Read the "loaded" VTM file and post-process | ||
+ | |||
+ | Examples of each of the three processes listed above can be found in the [https://github.com/PHASTA/vtkpytools/tree/master/example/bar2vtk 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: <code>data</code> and <code>wall</code>. | ||
+ | |||
+ | ; <code>data</code> | ||
+ | : A VTK Unstructured Grid of the 2D spanwise mesh and (after running <code>bar2vtk</code>) the data associated with each node | ||
+ | ; <code>wall</code> | ||
+ | : A VTK PolyData of the line that defines the wall of the domain. It is a subset of the connectivity and vertices of <code>data</code> | ||
+ | |||
+ | The process of creating the blank VTM file is: | ||
+ | |||
+ | # Loading the coordinate and connectivity information of the spanwise mesh | ||
+ | # Generating the <code>data</code> object from the coordinate and connectivity data using | ||
+ | # Extract wall data | ||
+ | |||
+ | |||
+ | [[Category:VTKpytools]] |
Revision as of 18:22, 24 August 2020
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