VisIt-Bout-Tutorial-2018

Getting Started

This tutorial will be hands on, running VisIt in client / server mode with the client running on the desktop and the server running on the Cori system at NERSC. We will be using the standard version of the 2.13.2 client and a pre-release version of VisIt on Cori.

You will first need to configure VisIt on your desktop to connect to the pre-release version of VisIt on Cori.

  1. Download version 2.13.2 on your system.
  2. Install VisIt 2.13.2 on your system.
  3. When installing VisIt on a Windows or Linux system, you will be prompted if you would like to choose a system configuration file. Choose NERSC network.
  4. If you have already installed VisIt or are installing VisIt on a Mac, you can install the system configuration when you run VisIt.

Starting VisIt

The way you start VisIt depends on the platform you are on:

  • On Windows, double click on the VisIt desktop icon
  • On Mac, double click on the VisIt icon where you installed it (generally in the /Applications folder).
  • On Unix, invoke: /path/to/visit/bin/visit
    • Most people ultimately put /path/to/visit/bin in their $PATH and then just say visit.

What you see

BOUT18 GUI and Viewer.png

  • The tall grey window on the left is called the "GUI". It is the primary mechanism for driving VisIt.
  • The window on the right is call the "visualization window". It displays results.

Installing the system configuration

If you have not already installed the NERSC system configuration, do so now.

  1. Select Options->Host profiles and Configuration Setup... from the main menu.
  2. BOUT18 Host profiles and Configuration Setup.png

  3. This brings up the Setup Host Profiles and Configuration window.
  4. BOUT18 Setup Host Profiles.png

  5. Select National Energy Scientific Research Computing Center (NERSC) network from the list of computing centers.
  6. Click Install.
  7. Select Options->Save Settings.
  8. Restart VisIt.
  9. Select Options->Host profiles... from the main menu.
  10. BOUT18 Host Profiles.png

  11. Select NERSC Cori from the Hosts list.
  12. Change the Path to VisIt installation to /project/projectdirs/visit/bout_workshop/visit.
  13. Change the Username to your username at NERSC.
  14. Click Apply.
  15. Select Options->Save Settings.

Opening files

The first thing to do is to open a solution file.

  1. Go to the main GUI window and click on the Open icon.
  2. BOUT18 Open icon.png

  3. This brings up the File open window.
  4. BOUT18 File open.png

  5. Change the Path field to be /project/projectdirs/visit/bout_workshop/data1.
  6. Change the Filter field to be *.nc.
  7. Highlight the file te_DIIID144382_2500_nosheath_t770.nc.
  8. Click OK.
  9. You will now be prompted to launch a compute engine.
  10. BOUT18 Engine Select options.png

  11. It is best to set the number of processors to match the number of blocks in the grid. In this case we know that the grid has 4 blocks so we use that. If you use a smaller number VisIt won't operate as quickly and if you use a larger number you are wasting resources since VisIt can't make use of more processors than blocks.
  12. Change Num procs to 4, Num nodes to 4 and Time limit to 00:60:00.
  13. Click Ok.

You've opened the file!

The grid structure

Now let's explore how VisIt decomposes your grid data with the Subset plot.

  1. You can create a Subset plot by clicking on the Add icon. It is located about half way down the main GUI window.
  2. Select Subset->domains(mesh) from the Add icon to add a Subset plot.
  3. Click Draw on the main GUI window.
  4. This will display each block in the grid a different color.
  5. You can see the internal structure of the grid by adding the Clip operator to remove a portion of the grid.
  6. You can add operators by clicking on the Operators icon. It is located next to the Add icon.
  7. Select Selection->Clip from the Operators icon.
  8. The image will go blank so that you can change the Clip attributes before performing the operation and rendering the image.
  9. The operator attribute windows can be brought up using the OpAtts menu on the main menu.
  10. Select OpAtts->Selection->Clip from the main menu.
  11. BOUT18 Clip operator attributes.png

  12. Change Quality to Accurate.
  13. Select both Plane 1 and Plane 3. This will remove a quarter of the tokamak.
  14. Click Apply.
  15. Click Draw.
  16. Let's get rid of the extraneous annotations so that we can better see the different grid blocks.
  17. The Annotation attributes window can be brought up using the Controls menu on the menu bar at the top of the main GUI window.
  18. Select Controls->Annotation... from the main menu.
  19. BOUT18 Annotation.png

  20. Click No annotations.
  21. Click Apply.

This will create the following image.
BOUT Subset plot.png


VisIt will create one block for a circular mesh, 4 blocks for a 1 X mesh and 7 blocks for a 2 X mesh.

Variables in BOUT files

VisIt automatically populates the variable menus with zshifted versions of the variables in the file on the entire tokamak and just the diverter, as well as the zShift field in 2d.

BOUT18 Variable menu.png

  • The variable te is the zshifted variable in 3d.
  • The variable te_diverter is the zshifted variable on the diverter in 3d.
  • The variable zShift is the 2d zShift variable.

Creating a Simple plot

We will create this Pseudocolor plot of electron temperature with a clip operator applied.

BOUT18 Simple Image.png

Create the Pseudocolor plot of the exterior shell

  1. First we have to delete the old image.
  2. Click the Delete icon in the main GUI window. It is located to the right of the Operators icon.
  3. The variables aren't very interesting at the initial time state so let's switch to a more interesting time state.
  4. BOUT18 Time Slider.png

  5. Move the time slider above the plot list on the main GUI window until the time shows 109.
  6. Now we can create a Pseudocolor plot of the exterior shell with the default attributes.
  7. Select Pseudocolor->te from the Add icon.
  8. Click Draw.
  9. You will now see the zshifted te on the exterior of the grid.
  10. Let's change some of the Pseudocolor plot attributes.
  11. Select PlotAtts->Pseudocolor from the main menu.
  12. BOUT18 Pseudocolor plot attributes.png

  13. Change Color table to RdBu.
  14. Toggle the Invert setting to on.
  15. Click Apply.

Apply the Clip operator to see inside the grid

  1. Select Selection->Clip from the Operators icon.
  2. Select OpAtts->Selection->Clip from the main menu.
  3. BOUT18 Clip operator attributes.png

  4. Change Quality to Accurate.
  5. Select both Plane 1 and Plane 3. This will remove a quarter of the tokamak.
  6. Click Apply.
  7. Click Draw.

Add back the color bar for the Pseudocolor plot

We removed all the annotation from the plot when we displayed the Subset plot to see the decomposition of the grid into blocks. Now we would like to enable legends so that we can see the Pseudocolor plot legend.

  1. Let's add back the color bar for the Pseudocolor plot.
  2. Select Controls->Annotation... from the main menu.
  3. BOUT18 Annotation2.png

  4. Toggle the Legend toggle to on.
  5. Click Apply.
  6. Select the Objects tab.
  7. BOUT18 Annotation3.png

  8. Change Legend position to 0.04 0.94.
  9. Change X-scale to 120%.
  10. Change Y-scale to 160%.
  11. Click Apply.
  12. Select the Appearance tab.
  13. BOUT18 Annotation4.png

  14. Toggle Draw min/max to off.
  15. Change Font height to 0.024.
  16. Toggle Bold to on.
  17. Click Apply.

Creating a more sophisticated image

We will create this sophisticated image with a better Pseudocolor plot of electron temperature along with some field lines of the electron temperature.

BOUT18 Sophisticated Image.png

We will start with the simple image generated earlier and build from there.

Improve the Pseudocolor plot

  1. We'll create this image from the last time state.
  2. Move the time slider on the main GUI window until the time shows 154.
  3. Now let's improve the Pseudocolor plot a bit.
  4. Select PlotAtts->Pseudocolor from the main menu.
  5. BOUT18 Pseudocolor plot attributes2.png

  6. Change Minimum to -0.28 and Maximum to 0.028.
  7. Click Apply.

Improve the color bar

The plot of te looks good, except that the legend is difficult to read. Let's make the color bar more readable and add a better title.

  1. Select Controls->Annotation... from the main menu.
  2. BOUT18 Annotation5.png

  3. Change Legend position to 0.04 0.86.
  4. Change Y-scale to 140%.
  5. Click Apply.
  6. Select the Appearance tab.
  7. BOUT18 Annotation6.png

  8. Toggle Draw title to off.
  9. Change Font height to 0.025.
  10. Click Apply.
  11. Click Text to add a text annotation.
  12. BOUT18 Annotation7.png

  13. Change Lower left to 0.03 0.93.
  14. Change Text to Electron temperature.
  15. Toggle Bold to on.
  16. Click Apply.
  17. Click Text to add a second text annotation.
  18. Change Lower left to 0.03 0.89.
  19. Change Text to perturbation.
  20. Toggle Bold to on.
  21. Click Apply.

This results in the following image.
BOUT18 Sophisticated Image2.png

Add an isosurface of te to show the field lines

  1. Add a Pseudocolor plot of te.
  2. Before doing so we need to turn off Apply operators to all plots. This is because if it is set (which it is by default), whenever you add a new plot, it will apply all the existing operators to it. In this case it would apply the Clip operator and we don't want to do that.
  3. BOUT18 Apply operators to all plots.png

  4. Toggle Apply operators to all plots to off.
  5. Select Pseudocolor->te from the Add icon.
  6. Select PlotAtts->Pseudocolor from the main menu.
  7. BOUT18 Pseudocolor plot attributes3.png

  8. Change Color table to RdBu.
  9. Toggle Invert to on.
  10. Change Minimum to -0.28 and Maximum to 0.028.
  11. Toggle Legend to off.
  12. Click Apply.
  13. Now we will apply the Isosurface operator.
  14. Select Slicing->Isosurface from the Operators icon.
  15. Select OpAtts->Slicing->Isosurface from the main menu.
  16. BOUT18 Isosurface operator attributes.png

  17. Change Select by to Value(s).
  18. Change Value(s) to 0.26.
  19. Click Apply.
  20. Click Draw.

This results in the final image displayed earlier.