Visualization

Currently the VTF project at Caltech endorses only two off-the-shelf packages: VisIt and Paraview. The goal is to use these packages for interactive visualization and analisys of data resulting from VTF coupled simulations. This mostly means AMR meshes as well as unstructured triangle and tetrahedronal meshes.

AMR

AMR visualization is focused on data resulting from AMROC simulations. Data resulting from AMROC is by default written in HDF4 format. In order to be able to be fed into either Paraview or VisIt it needs to be first preprocesses.

AMROC HDF4 to Paraview

The main tool for data conversion in AMROC is called hdf2file. hdf2file currently has four filters which result in the flattening of the level data into a single unstructured mesh. These for formats are:

[10] legacy VTK ascii

[11] legacy VTK binary

[12] VTU (VTK XML) ascii

[13] VTU (VTK XML) binary

Binary VTU is currently the best format to use for Paraview. There is a fifth alternative, though it has not been completely carried out due to a major deficiency. The Paraview PVD format is a collection format which can point to a series of structured blocks, and even append some meta information such as level. However, each of these blocks it points to must be a separate file. So, in order to dump a generally medium size AMR mesh into ![14] PVD it would require hundreds to thousands of files for each structured subblock. This may change in the future.

AMROC HDF4 to VisIt

The main tool for data conversion in AMROC is called hdf2file. hdf2file currently has two filters which result in the flattening of the level data into a single unstructured mesh. These for formats are:

[10] legacy VTK ascii

[11] legacy VTK binary

[15] legacy SILO binary (structured hierarchical) data

Unfortunatelly these legacy VTK formats cannot store level information, nor do they use the more modern VTK XML formats. Thus the current VTK filters flatten the mesh into an unstructured mesh. Meanwhile, the native LLNL Silo format, dumps all data blocks into a single Silo file. Blocks are then collected in levels, all_levels, and variables. These collections are what are exposed to the user in Visit. To create different collections (for example levels 3 and up), you can do this by manipulating directly the display_file.in directly. See below, or the official Amroc page, for more info.

Using hdf2file

Using hdf2file after running your VTF (Amroc) simulation is quite simple. All it requires is display_file.in which describes what variables you will be dumping, and what format. Here is a sample display_file.in used along with the 3D/Spheres AMROC demo.

Type describes whether to dump cell data (0) or vertex data (6). Notice that even though both Paraview and VisIt can handle cell data, some ghost-cells might dump NANs. The conversion (actual conversion happens in hdf2file) to vertex data will most likely clean this up and make either tool run in a more stable fashion.

After you have your display_file.in setup, then you can run hdf2file. A sample execution of hdf2file:

hdf2file -m -f display_file.in -fs solver.in > spheres.01.vtu

UNSTRUCTURED MESHES (i.e. ADLIB/SFC MESHES)

Thin shells modeled as 3d triangle meshes, as well as more complex polycrystal models made up as tetrahedronal meshes have a simple direct conversion into VTK formats. There are a couple of VTU filters for these meshes written by Santiago Lombeyda within the VTF repository.

One single filter called tec2file is now available, which can convert a series of ASCII Tecplot files into a single VTU (ascii or binary vtk xml) or legacy VTK (ascii or binary). Notice the legacy binary format is the most compact and most compatible across different visualization software.

Its use is fairly simple. For instance, on asap, for a collection of triangle mesh pieces for one frame (triangles versus tetrahedra need to be flagged explicitly), you would do:

For more info see the FAQ. There is also a quick explanation on some of the OtherVizFilters.

THE TOOLS

Both VisIt and Paraview were designed to work in parallel. Visit runs in parallel through the use of profiles. Paraview gets executed in parallel from the command line using mpirun or starting each component manually.