20. Paraview visualization

ComFLOW snapshots are stored in the VTK-XML format) and can be visualized in most of the commonly available visualization suites, e.g. Paraview, Tecplot and Visit. The ComFLOW output is primarily designed for Paraview, hence to use all of the available post-processing features we strongly recommended to use Paraview. ComFLOW-dedicated plugins are available which facilitate various post-processing steps and provide additional options, such as:

  • automatic setup of the coordinate transformations for moving (STL) objects
  • inertial and body-fixed viewing perspectives for moving reference frames
  • visualization of subgrids
  • visualization of relative water height probes
  • visualization of monitor surfaces
  • inclusion of ASCII or binary tabular data files (e.g. data from experiments)

20.1. Paraview plugins

Post-processing of VTK files in Paraview is based on the concept of sources and filters which are connected to each other in a hierarchical fashion. At the root of the hierarchy lies a data source which loads the complete data (e.g. a file). Filters and/or sources can then be attached to filter or modify the input data (for example by selecting a subset or adding new data).

The ComFLOW plugins follow the same principle. A ComFLOW simulation output directory (containing a.o. subfolders intermediate, proc_1) is treated as a data source. Filters can then be attached to load snapshots, monitor surfaces, time traces et cetera.

Warning

To properly use the Paraview plugins it is important that the folder structure of the simulation output remains unchanged and that the file output_summary.xml and the subfolders intermediate and proc_1 are still present.

20.1.1. Installation

Installation of the ComFLOW plugins for Paraview is fairly straightforward and consists of the following three steps:

  1. Add the ComFLOW Python library to the Python path (see also Section 21.1). For persistent installation it is recommended to include these line in your startup script (typically ~/.bashrc). On Linux:

    export PYTHONPATH="/path_to_comflow/python:$PYTHONPATH"
    

    or on Windows:

    setx PYTHONPATH "c:\path_to_comflow\python;%PYTHONPATH%"
    
  2. Open Paraview (version 5.6 or higher) and select the menu “Tools/Manage plugins…” In the section Local Plugins press the button “Load New …” and select the file python/CMFPlugins.py in the ComFLOW distribution directory.

  3. Make sure to check the “Auto Load” box to automatically load the plugins upon restart of Paraview. All ComFLOW plugins are available in the menu “Filters/ComFLOW”.

20.1.2. Opening ComFLOW simulations [SOURCE]

Post-processing ComFLOW simulations in Paraview always starts with loading the appropriate simulation output directory. This can be done by opening the file output_summary.xml in the “File/Open” menu (Ctrl+O) of Paraview. Make sure to open the file as “ComFLOW output summary (*.xml)” in order for Paraview to recognize the correct file type.

After opening the ComFLOW simulation the visualization area will show the domain extents of the opened simulation. The pipeline browser now shows the entry “output_summary.xml”, which is the data source corresponding to the selected ComFLOW simulation. Filters can now be attached to load various output objects (e.g. snapshots, monitor surfaces, moving objects) as explained in the following sections.

20.1.3. ComFLOW/ComFLOW snapshot series [FILTER]

This filter plugin can be used to access the VTK snapshots of a ComFLOW simulation. The resulting output is a unstructured grid series containing field variables such as pressure, velocity and cell fill ratios.

Input ComFLOW simulation (see Section 20.1.2)
Output series of unstructured grids (vtkUnstructuredGrid) corresponding to the VTK snapshots proc_1/vtk/cmf*.vtu in the simulation output folder.
GUI options inertial or body-fixed viewing perspective for moving frames

20.1.4. ComFLOW/ComFLOW relative water height lines [FILTER]

This filter plugin can be used to visualize (moving) relative water height lines and to plot the corresponding time traces.

Input ComFLOW simulation (see Section 20.1.2)
Output a multiblock object (vtkMultiBlock) containing a geometric description of the (moving) relative water height lines (vtkPolydata) as well as the corresponding time traces (vtkTable).
GUI options n.a.

20.1.5. ComFLOW/ComFLOW moving STL object [FILTER]

This filter plugin can be used to include moving STL objects corresponding to one of the moving objects in the simulation.

Input ComFLOW simulation (see Section 20.1.2)
Output a vtkPolyData object representing the selected STL file
GUI options object identifier (used to load the appropriate motion time trace); reference frame properties cf. the INI input of the corresponding moving object (these can typically be found in the comflow.cfi input file)

20.1.6. ComFLOW/ComFLOW subgrids [FILTER]

This filter plugin can be used to visualize the subgrids in a VTK snapshot.

Input ComFLOW snapshot (vtkUnstructuredGrid) (see Section 20.1.3)
Output an unstructured grid (vtkUnstructuredGrid) describing the grid layout and storing for each subgrid properties such as refinement level and index ranges
GUI options n.a.

20.1.7. ComFLOW/ComFLOW monitor surfaces [FILTER]

This filter plugin can be used to get a visual representation of the monitor surfaces that were included in the simulation. If applicable, the monitor surface automatically follows the motion of the moving object to which it is attached.

Input ComFLOW simulation (see Section 20.1.2)
Output a vtkMultiBlock object containing an unstructured grid (vtkUnstructuredGrid) for each monitor surface typically storing either pressures or velocities and liquid fill ratios
GUI options inertial or body-fixed viewing perspective

20.1.8. Tabular data source [SOURCE]

This source can be used to import basic ASCII or binary tabular data (for example from an experiment). Custom expressions can be used to quickly filter (e.g. time shift or scale) the input data without the need of additional Paraview filters.

Output a vtkMultiBlock object containing an unstructured grid (vtkUnstructuredGrid) for each monitor surface typically storing either pressures or velocities and liquid fill ratios
GUI options file name, filter expression for X variable, filter expression for Y variable