Skip to main content
Jump to: navigation, search

Difference between revisions of "Visualizing Output with ICE"

(CSV Plotting Tools)
(ParaView)
Line 21: Line 21:
  
 
===ParaView===
 
===ParaView===
Using the ''ParaView Tools'' requires an installation of [http://www.paraview.org/download/ ParaView] (version 5.0 or newer) on a Linux or Mac OS X machine.
+
Using the ParaView tools requires an installation of [http://www.paraview.org/download/ ParaView] (version 5.0 or newer) on a Linux or Mac OS X machine.
  
 
The "[[#Project_Explorer_.28Option_1.29|Project Explorer]]" allows a user to configure and launch a ParaView session through ICE. There is currently no mechanism for launching ParaView in the "Visualization Perspective."
 
The "[[#Project_Explorer_.28Option_1.29|Project Explorer]]" allows a user to configure and launch a ParaView session through ICE. There is currently no mechanism for launching ParaView in the "Visualization Perspective."

Revision as of 12:31, 25 January 2017

Currently, ICE features three plugins for visualizing and plotting simulation output data:

  • VisIt Tools - An interactive 3-D visualization tool for rendering meshes, scalar plots, contour plots, and more.
  • ParaView Tools - Another interactive 3-D visualization tool offered as an alternative to VisIt.
  • CSV Plotting Tools - A customizable 2-D data plotting utility for .csv data files.

ICE's VisIt tool for 3D visualzation ICE's CSV plotter for 2D graphing

Prerequisites

VisIt

To use the VisIt Tools, ICE requires the installation of Lawrence Livermore National Laboratory's VisIt software (version 2.8.2 to 2.9.2) either locally or on a remote machine.

There are currently two ways to interact with VisIt through ICE.

  1. Using the "Project Explorer" (Novice) is an easier task and does not require the user to manually connect to VisIt in each session.
  2. Using the "Visualization Perspective" (Advanced) requires more work but enables the user to send Python commands to the VisIt client.

The VisIt website offers example data files that you can use to familiarize yourself with the VisIt tools.

ParaView

Using the ParaView tools requires an installation of ParaView (version 5.0 or newer) on a Linux or Mac OS X machine.

The "Project Explorer" allows a user to configure and launch a ParaView session through ICE. There is currently no mechanism for launching ParaView in the "Visualization Perspective."

CSV Plotting Tools

The CSV plotting tools are built into ICE and require no additional software to be installed.

The "Visualization Perspective" allows a user to configure and launch a visualization session using .csv data files. There is currently no mechanism for launching a visualization using .csv data files in the "Project Explorer."

Visualizing Output

Using the Project Explorer (Option 1)

Although not as feature rich as the "Visualization Perspective," using and configuring the "Project Explorer" view for VisIt and ParaView makes the process easier for a novice user.

Adding the Data File

The data file must first be placed in the "Project Explorer." This view lists files imported into ICE. To access the "Project Explorer," use the the main menu bar at the top of the window and navigate to:

Window > Show View > Other

In the resulting "Show View" dialog, select:

General > Project Explorer and click OK.

Show view project explorer stc.png

By default, the "Project Explorer" should automatically import the  ICEFiles/default  and  ICEFiles/itemDB  folders. If it does not, or if you want to import a different folder into ICE, right click in the "Project Explorer" view and select Import... from the context menu.

In the resulting "Import" dialog, select General > File System from the tree and then click the Next button.

Import view visit stc.png

From the resulting "File System" dialog, you can then select directories and/or files to import into the "Project Explorer."

In this example, we're loading a 3-D silo from VisIt's library of examples into "Project 1."

ProjectExplorerImportFilesDialog ICE.png

For .csv files, you can simply double click their listing in the "Project Explorer" view to open them.

Similarly, VisIt and ParaView files can be opened by double clicking, but you must first establish a connection to VisIt or ParaView.

Configuring the VisIt Connection

Creating a default VisIt connection will enable ICE to automatically connect to VisIt at launch. To start:

  • Windows or Linux: in ICE's toolbar, select Window > Preferences, then Visualization > VisIt in the tree of the "Preferences" page.
  • Mac OS X: in ICE's toolbar, select ICE > Preferences, then Visualization > VisIt in the tree of the "Preferences" page.

Press the new row button (stylized as a "+" symbol) in the upper-right corner of the resulting dialog box.

VisItPreferencePage ICE.png

The default values supplied automatically by ICE should be fine for most users. However, two fields may need to be changed to accommodate a user's configuration, and you can click on each cell to edit the parameter.

  • Host: The default value for this field is "localhost," which is used for connecting to a local installation of VisIt on a user's machine. To launch a remote VisIt connection, the remote hostname/address should be entered into this field.
  • Path: If correctly installed, the VisIt path should populate in ICE by default. If not, the user should add the full path to the local VisIt installation. The path should end with the folder containing the VisIt executable.
    • On a Windows machine with VisIt installed in the default location, the path would be:
      • C:\Users\[UserName]\AppData\Local\Programs\LLNL\VisIt 2.9.2\
    • On a Linux machine, the path will be based on where you extracted the  visit2_9_2.linux-x86  folder, ending with  ~/visit2_9_2.linux-x86_64/bin. For example, if unzipped to the desktop, it would be:
      • /home/[UserName]/Desktop/visit2_9_2.linux-x86_64/bin/
    • On Mac OS X, VisIt should be installed in the machine's "Applications" directory, unless otherwise specified by the user.
      • /Applications/VisIt.app/Contents/Resources/bin/

Once finished, press Apply, then OK. ICE will then open VisIt and connect to it.

Visit connection apply stc.png

If you are connecting to a remote host, you may be prompted to "allow" the connection to the remote host. Click Yes to trust the connection, and enter the credentials for the remote machine in the prompt.

Configuring the ParaView Connection

As with VisIt, creating a default ParaView connection will enable ICE to automatically connect to ParaView at launch. To start:

  • Windows or Linux: in ICE's toolbar, select Window > Preferences, then Visualization > ParaView in the tree of the "Preferences" page.
  • Mac OS X: in ICE's toolbar, select ICE > Preferences, then Visualization > ParaView in the tree of the "Preferences" page.

Press the new row button (stylized as a "+" symbol) in the upper-right corner of the resulting dialog box.

Add para connection stc.png

The default values supplied automatically by ICE should be fine for most users. However, some fields may need to be changed to accommodate a user's configuration, and you can click on each cell to edit the parameter.

  • Host: The default value for this field is "localhost," which is used for connecting to a local installation of ParaView on a user's machine; keep this setting if you are running ParaView on the same machine as the ICE framework. To launch a remote ParaView connection, the remote hostname/address should be entered into this field.
  • Path: If correctly installed, the ParaView path should populate in ICE by default. If not, the user should add the full path to the local ParaView installation. The path should end with the folder containing the ParaView executable.
    • On a Windows machine, the path will be based on where you extracted the contents of the  ParaView-5.2.0-Qt4-OpenGL2-Windows-64bit.zip  archive. For example, if you unzipped to the desktop without renaming the archive, the path would be:
      • C:\Users\[UserName]\Desktop\ParaView-5.2.0-Qt4-OpenGL2-Windows-64bit\
    • On a Linux machine, the path will be based on where you extracted the contents of the  ParaView-5.2.0-Qt4-OpenGL2-MPI-Linux-64bit.tar.gz  archive. For example, if you unzipped to the desktop without renaming the archive, the path would be:
      • /home/[UserName]/Desktop/ParaView-5.2.0-Qt4-OpenGL2-MPI-Linux-64bit/
    • On Mac OS X, ParaView's executable should be installed in the machine's "Applications" directory, unless otherwise specified by the user. Therefore, the path would simply be:
      • /Applications/
  • Server Script Path: The full path to the  http_pvw_server.py  file, ending with the folder containing it. For example, if the file is on your desktop, the path might be (for Linux): /home/[UserName]/Desktop/.
  • Visualizer Port: Port number for the ParaView web visualizer. The default number (9601) should work but can be changed if needed. If changed, it must differ from the ParaView port number (9600).
  • Remote OS: The operating system of the remote machine on which ParaView will be launched. If you are launching ParaView on your local machine, ignore this cell.
  • Remote ParaView Version Number: The version of ParaView you are using. This may be ignored unless you are launching a remote ParaView session on a Linux machine. You can check your installation's version number by looking inside the top level  lib  directory. The  lib  directory should contain a folder named  paraview-  followed by the version number.

Once finished, click Apply, and then click OK. ICE will open ParaView and connect to it.

Para connection apply stc.png

If you are connecting to a remote host, you may be prompted to "allow" the connection to the remote host. Click Yes to trust the connection, and enter the credentials for the remote machine in the prompt.

Plot Editors

Once a connection with VisIt or ParaView has been established, the "Plot Editor" view will appear and display the contents of the file that was imported into "Project 1." This view allows the user to manipulate the visualization just as they would with the VisIt or ParaView GUI.

For .csv files, right clicking or using the Select series... button in the upper left of the "Plot Editor" pane allows the user to add or remove data series from the graph.

If at any point you should close the "Plot Editor," simply double click on the imported file to redraw the visualization.

Visit visualizer ICE stc.png

Similarly, a VisIt and ParaView plot editor will allow you to choose the mesh and scalar to model and the model's representation. These editors also feature a slider at the bottom, allowing the user to interact with time data.

TimeSliderWidget ICE.png

The arrow buttons move to the previous or next time step, and the triangle button causes the Plot Editor to play the simulation automatically. The final button displays playback options. The current time is displayed, and you can manually drag the slider along the timeline to choose a specific time step to display.

The ParaView plot editor will also have a Launch in Web Visualizer button to open the file in ParaView's Web Visualizer inside of ICE. The full functionality of the Web Visualizer is beyond the scope of this article, but interested readers can learn more from the official documentation.

Using the Visualization Perspective (Option 2)

Using the "Visualization Perspective" (Option 2) gives the user more control over their visualization within ICE. To access the "Visualization Perspective," which includes various UI components necessary for visualization that are not exposed in the default ICE perspective, use the the main menu bar at the top of the window and navigate to:

Window > Open Perspective > Other...

In the resulting dialog window, select Visualization and click OK.

Perspective dialog ICE stc.png

Alternatively, you can also access the same pop-up dialog by clicking the Open Perspective button (stylized as a "+") in the upper right-hand corner of the ICE workbench.

ICE OpenPerspective.png

Once the "Visualization Perspective" opens, you should notice the workbench contains some new UI components. Make note of the panels highlighted below, as this tutorial will refer to them in the following sections.

ICE VisualizationPerspective.png

VisIt in the Visualization Perspective

Once the "Visualization Perspective" has loaded, the first step is to connect to the VisIt installation (local or remote) through ICE. To do this, click on the Launch VisIt button in the top-left of the ICE toolbar.

ICE VisItLaunchButton.png

This action will prompt a dialog that offers three options for connecting to VisIt.

ICE VisItLaunchOptions.png

The connection dialog gives the user three options: (1) launch VisIt locally, (2) Launch VisIt remotely, and (3) connect to an existing VisIt session.

Launch VisIt Locally

If you installed VisIt on your local machine, use the Browse button to direct ICE to your local installation directory. Using this method will launch a new VisIt session. Optionally, you can also set a port number (default 9600) and—if you want to share your VisIt session with another user—a password.

  • Path: The path to VisIt should end with the folder containing the VisIt executable.
    • On a Windows machine with VisIt installed in the default location, the path would be:
      • C:\Users\[UserName]\AppData\Local\Programs\LLNL\VisIt 2.9.2\
    • On a Linux machine, the path will be based on where you extracted the contents of the  visit2_9_2.linux-x86_64  archive, ending with  ~/visit2_9_2.linux-x86_64/bin. For example, if unzipped to the desktop, it would be:
      • /home/[UserName]/Desktop/visit2_9_2.linux-x86_64/bin/
    • On Mac OS X, VisIt should be installed in the machine's "Applications" directory, unless otherwise specified by the user.
      • /Applications/VisIt.app/Contents/Resources/bin/
Launch VisIt Remotely

If you installed VisIt on a remote machine, specify the hostname and full path to the VisIt installation directory. Using this method will launch a new VisIt session. Optionally, you can specify a port number (default 9600) and—if you want to share your VisIt session with another user—a password. If you need or want to use an external gateway or proxy to access the remote VisIt installation, you may also specify its URL and port number.

Connect to Existing VisIt Session

If you would like to connect to a VisIt session already running somewhere else, specify the hostname, port number, and password as they are set on the VisIt session; you will need to obtain this information from the person who initially configured the VisIt session. If you need or want to use an external gateway or proxy to access the remote VisIt installation, you may also specify its URL and port number.

Idea.png
If you need to find the VisIt installation in Windows, find a shortcut to VisIt either on your desktop or in the start menu. Right-click the shortcut and open its Properties. The path to the VisIt executable's directory will be shown next to Target.


Regardless of which method you choose to connect to VisIt, enter a Connection name at the bottom of the dialog. This will allow you to re-use this connection information in the future.

If you are connecting to an existing session, specify a Window ID between 1 and 16. Which Window ID you use depends on how you would like to connect to VisIt. If multiple users connect using the same Window ID, they will all see and be able to interact with the same VisIt view. However, if you would like multiple users to each have their own unique session—each with its own controls—assign a unique Window ID to each user. The VisIt installation can support up to 16 unique window IDs at a time.

Once you are done configuring the connection to VisIt, click the Finish button at the bottom. If configured correctly, ICE will then initiate a connection to VisIt.

Adding/Removing Files

To open a file, find the green "+" icon in the Visualization File Viewer. Clicking directly on the green "+" icon will prompt a local file browser to pop up. However, if your file is located on a remote machine, or if you would like to add a file set, click on the drop-down button next to the green "+" icon.

ICE VisItAddFileButton.png

This will offer you four ways to open file(s):

  • Open a local file
  • Open a remote file
  • Open a local file set
  • Open a local SILO set

Once you have selected your file(s), they should appear in the Visualization File Viewer.

Lastly, if you would like to remove a file from the Visualization File Viewer list, select it, and click the red "X" button.

Warning2.png
When using the VisIt utilities, you currently cannot open local files with remote VisIt sessions or remote files with local VisIt sessions.


Adding/Removing Plots

To begin adding plots, select your file in the Visualization File Viewer and click the green "+" icon in the VisIt Plot Viewer.

ICE VisItAddPlotButton.png

If there is any plottable data in your file, a dialog will pop up with a list of options to choose from. This can include mesh plots, scalar plots, vector plots, material block plots, and so forth. If there are multiple plots of each type available, you can select them all by checking off the entire category, or expand it to check off only selected plots.

ICE VisItPlotSelection.png

When you are done selecting your plot(s), click OK. The selected plots should be added to the list in the VisIt Plot Viewer.

Lastly, if you would like to remove a plot from the VisIt Plot Viewer list, select it and click the red "X" button.

Rendering Plots

To render a plot, double click it in the VisIt Plot Viewer, and it will appear in the main VisIt Editor.

The VisIt Plot Viewer contains a drop-down menu with a list of plotting styles available for the currently selected plot. Depending on your selected plot, this can include mesh, pseudo-color, contour, volume, and so forth. Use this drop-down menu to select the plotting style you prefer, and the VisIt Editor will update in real time.

ICE VisItPlotStyleMenu.png

The VisIt Editor is also interactive in that you can move your plot around by clicking and dragging the canvas or zoom by using the mouse wheel. This may not necessarily be useful for 2D plots but enables a fully rotatable look at 3D plots as in the example below.

ICE VisIt3DNoise.png

Lastly, if there is any time series data associated to your plot, you can manually walk through the time steps, or play them continuously as a short video, using the playback buttons located in the VisIt Plot Viewer.

ICE VisItPlaybackButtons.png

Executing Python Commands

While many of VisIt's features are already accessible in ICE, work to enable a more robust feature set is on-going. In the meantime, features not yet integrated into ICE can still be accessed via Python commands by clicking the Python script button located in the VisIt Plot Viewer.

ICE VisItPythonScriptButton.png

Writing Python scripts for VisIt is beyond the scope of this tutorial. However, you are welcome to refer to the VisIt Python Interface Manual provided by the VisIt development team at Lawrence Livermore National Laboratory.

CSV Plot Viewer in the Visualization Perspective

ICE includes, out of the box, basic CSV data plotting utilities for fast and easy x/y graph visualizations. This section describes how to open your CSV data using the Plot Editor in the Visualization Perspective.

Adding/Removing Files

To open a file, find the green "+" icon in the Visualization File Viewer. Clicking directly on the green "+" icon will prompt a local file browser to pop up. You can also access this option by clicking on the drop-down button next to the green "+" icon.

ICE VisItAddFileButton.png

This will offer you four ways to open file(s):

  • Open a local file
  • Open a remote file
  • Open a local file set
  • Open a local SILO set
Note.png
ICE's CSV Plot Viewer can only open local files, so when opening CSV files for plotting, you need only click the green "+" button to select and add local files.


Once you have selected your file(s), they should appear in the Visualization File Viewer.

Lastly, if you would like to remove a file from the Visualization File Viewer list, select it, and click the red "X" button.

Alternatively, you may open .csv files directly through the Project Explorer. This may be done by clicking Window -> Show View -> Other... and selecting Project Explorer. Within the Project Explorer, right click and click Import...

ICE CSV Plot Editor Import File1.png

In the pop-up window, select General -> File System as shown above, then click next

ICE CSV Plot Editor Import File2.png

Select the directory housing the data you wish to visualize in the From Directory field, then select which sub-directories and/or files you wish to import in the two boxes below it. Select the folder to import the files into in the Into folder field and click Next. The files will appear within the selected folder in the Project Explorer, and can be opened by double clicking them or right clicking and selecting Open With -> PlotEditor.

Note.png
The CSV Plot Viewer requires data to be in an [m x n] format, meaning that files that contain rows with empty values cannot be plotted. Furthermore, the first row is expected to include column headers—the variable names—while each subsequent row should include the numerical data in columns.



Selecting Series

By default, the first series in the file will be used as the independent variable while the second is graphed as a dependent variable. These can both be changed.

To set the independent series, which is used to determine the x-axis values of all points, right click in the Plot Editor and select Set independent series..., which will open a new window. Select the series you want and click the OK button.

There are two ways to select the graphed series. The Select series... button in the upper left corner will allow you to select a single series to graph, removing all others. You may graph multiple series by right clicking in the Plot Editor and clicking Select series.... You may then choose which series to graph by clicking the check boxes in the new window and clicking the OK button. Finally, you may remove all graphed series by right clicking and choosing Remove all series.

Plot Toolbar

The plotting widget used by ICE's CSV Plot Editor includes a toolbar with helpful utilities for navigating your plotted data or customizing the plot's appearance. You can hover the mouse cursor over each button to view a tool tip describing what the button does.

Clicking the first button will open a dialog that allows you to customize the appearance of the plot or individual series on the plot, including titles, scales, grids, colors, and fonts. The last button allows you to save the current appearance of the plot to a .png image file. Feel free to try out the different utilities available in this toolbar.

Back to the top