Skip to content

Using VisIt Silo

wbinventor edited this page Apr 2, 2012 · 14 revisions

Using VisIt/Silo

VisIt is a powerful visualization environment developed out of LANL and is used extensively in the scientific computing community. OpenMOC utilizes a small subset of the plotting tools in VisIt and opening up your data files in VisIt is a simple process.

In this tutorial, we will discuss:

  • The VisIt user interface
  • How to open and plot pdb and HDF5 (.h5) files in VisIt
  • How to output your data in a generic image file (png, jpg, tiff, etc.)
  • How to access addition commands in VisIt
  • Where to find additional help on using VisIt/Silo

The VisIt user interface

The VisIt user interface consist of two windows: the Main GUI and the viewer. The Main GUI contains all commands that you will need to open files, add plot types (psuedocolor, mesh, etc), and control the viewer window.

VisIt main GUI
VisIt viewer window

How to open and plot pdb and h5 (hdf5) files in VisIt

Before explaining how to open a file, we will first note that VisIt does not open all HDF5 (.h5) files. HDF5 files come in different "flavors" depending on the library used to create them. VisIt has a plugin to open HDF5 files that created using the Silo I/O library, but there are no guarantees that other HDF5 files can be opened.

You can open files in VisIt by clicking on the "Open" button in the main window and navigating to the correct directory. After opening a file, you will need to add a plot type using the "Add" button. The plot type that you will use most often with OpenMOC is pseudocolor, which allows you to view a the flux distribution and other plots that describe the geometry and solving procedure in a rich, informative color mapping. To add a pseudocolor plot, click Add->Pseudocolor->parameter. This will create an object in the Plots pane, but will not output anything to the viewer. To display a plot on the viewer, click the "Draw" button in the main window.

Oftentimes you will be viewing multiple plots at once and need to switch between them. To do this, first open all the plot files that contain data to be plotted and add the plot types for each file. There should be several plot objects within the Plots pain. Clicking the Draw button will overlay all these plots using individual color scales. You can toggle between plots using the "Hide/Show" button in the main window. As its name implies, this will temporarily hide or show a certain plot in the viewer window.

Now you know how to open multiple files, add plot types, and output plot types to the viewer window. In using VisIt, you will likely encounter the situation where you open a file, plot the data in the viewer window, and then re-run your simulation and generate a new plot file. VisIt is not smart enough to recognize that the file has been modified, so you will have to do this manually. Simply by have that file as the "Active source" and clicking the "Reopen" button will reopen that file and update the viewer window with the new data.

To close files in VisIt, you will first need to delete all plot types for that file from the Plots pane. To do this, click on the plot object in the Plots pane and click "Delete". Next, make the file you want to close the Active source and click the "Close" button.

How to output your data in a generic image file (png, jpg, tiff, etc.)

VisIt will output your files in a variety of formats. Before outputting a file, first set the file output properties by clicking File->set Save Options.... This will display the Set save options window. The important parameters to set are the Filename and output path and plot type. After setting these parameters, click "Save" in the lower left corner and then "Dismiss" to close the window. To save the image displayed in the viewer window, click File->Save window.

VisIt save window

How to access addition commands in VisIt

The commands described above are only a small subset of the VisIt commands and the most essential ones you will need in using OpenMOC. You can access additional commands by opening up other "command windows". Command windows can be found in the main toolbar and include all the options with the format "command window...". After opening other command windows, you can add it as a tab in the main VisIt window by clicking the "Post" button. There are around one hundred command windows that your are encouraged to play around to get more familiar with VisIt's features.

Where to find additional help on using VisIt/Silo

A tutorial for getting data into visit can be downloaded by clicking HERE. This tutorial is a great primer for learning how to use the Silo C and Fortan API for writing your data to a .silo, .pdb, .vtk, or .h5 (HDF5) file.

A tutorial on using Silo can be downloaded by clicking HERE. Silo is a great I/O library that has both a C and Fortran API. The tutorial includes detailed descriptions of all Silo functions and is a great resource for learning how to output various structured and unstructured meshes.

The VisIt-users wiki is another resource for finding information on using VisIt.