VisIt-Bout-Tutorial-2015

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

Visit gui.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.

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. Open Icon.png

  3. This brings up the File open window.
  4. BOUT Open File Dialog.png

  5. Change the Path field to be "bout_visit_tutorial".
  6. Change the Filter field to be "*.nc".
  7. Highlight the file "te_DIIID144382_2500_nosheath_t770.nc".
  8. Click OK.
  9. If you are running on a cluster you will most likely be prompted to launch a compute engine.
  10. BOUT Engine Launch Dialog.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 32 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 32 and Num nodes to 4.
  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.
  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 menu bar at the top of the main GUI window.
  10. Select Selection->Clip from the OpAtts menu.
  11. BOUT Clip Attributes.png

  12. Change Quality to Accurate.
  13. Change Plane 1 Normal to 0 0 1.
  14. Click Apply.
  15. Click Draw on the main GUI window.
  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 Annotation... from the Controls menu.
  19. BOUT Annotation.png

  20. Click No annotations.
  21. Click Apply.

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


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

Variables in BOUT files

VisIt automatically populates the variable menus with zshifted and non-zshifted versions of the variables in the file as well as the zShift field in 2d.

BOUT Variable menu.png

  • The variable te is the non-zshifted variable in 3d.
  • The variable te_diverter is the zshifted variable on the diverter in 3d.
  • The variable te_zshift is the zshifted variable 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.

BOUT 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. BOUT 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_zshift from the Add icon.
  8. Click Draw.
  9. You will now see the zshifted te on the exterior of the grid. You will see some artifacts on the exterior of the grid due to rendering long skinny polygons that are created due to the zshifting.
  10. Let's change some of the Pseudocolor plot attributes.
  11. Select PlotAtts->Pseudocolor from the PlotAtts menu on the top menu bar on the main GUI window.
  12. BOUT Pseudocolor 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 Selection->Clip from the OpAtts menu.
  3. BOUT Clip Attributes.png

  4. Change Quality to Accurate.
  5. Change Plane 1 Normal to 0 0 1.
  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 Annotation... from the Control menu.
  3. BOUT Annotation2.png

  4. Toggle the Legend toggle to on.
  5. Click Apply.
  6. Select the Objects tab.
  7. BOUT 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. BOUT 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.

BOUT Sophisticated image.png

Create a clipped 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.
  3. We'll create this image from the last time state.
  4. Move the time slider on the main GUI window until the time shows 154.
  5. Now we can create a Pseudocolor plot of the exterior shell with the default attributes. This time we will use the non zshifted version to eliminate the rendering artifacts.
  6. Select Pseudocolor->te from the Add icon.
  7. Click Draw.
  8. You will now see te on the exterior of the grid.
  9. Let's change some of the Pseudocolor plot attributes as done earlier.
  10. Select PlotAtts->Pseudocolor from the PlotAtts menu.
  11. BOUT Pseudocolor Attributes2.png

  12. Change Minimum to -0.28 and Maximum to 0.028.
  13. Change Color table to RdBu.
  14. Toggle the Invert setting to on.
  15. Click Apply.
  16. Now we will apply the clip operator.
  17. Select Selection->Clip from the Operators icon.
  18. Select Selection->Clip from the OpAtts menu.
  19. BOUT Clip Attributes2.png

  20. Change Quality to Accurate.
  21. Change Plane 1 Normal to 0.5 0 0.866.
  22. Toggle Plane 2 to on to enable clipping out a quadrant of the grid.
  23. Change Plane 2 Normal to -0.5 0 0.866.
  24. 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 Annotation... from the Controls menu.
  2. BOUT Annotation5.png

  3. Toggle Let VisIt manage legend position to off.
  4. Change Legend position to 0.04 0.86.
  5. Change X-scale to 120% and Y-scale to 140%.
  6. Click Apply.
  7. Select the Appearance tab.
  8. BOUT Annotation6.png

  9. Toggle Draw title to off.
  10. Toggle Draw min/max to off.
  11. Change Font height to 0.025.
  12. Toggle Bold to on.
  13. Click Apply.
  14. Click Text to add a text annotation.
  15. BOUT Annotation7.png

  16. Change Lower left to 0.03 0.93.
  17. Change Height to 3%.
  18. Change Text to Electron temperature.
  19. Toggle Bold to on.
  20. Click Apply.
  21. Click Text to add a second text annotation.
  22. Change Lower left to 0.03 0.89.
  23. Change Height to 3%.
  24. Change Text to perturbation.
  25. Toggle Bold to on.
  26. Click Apply.

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

Add 2 slices to show te_zshift on the clipped surfaces

The plot doesn't show any rendering artifacts but unfortunately doesn't show the zshifted te on the clipped surfaces. We can correct this by adding 2 clips of the zshifted te that correspond to the clipped surfaces.

  1. By default operators and subset selections are applied to all the plots in the Plot list. In this case we want different operators applied to each plot so we need to turn this off.
  2. Toggle both Apply operators to all plots and Apply subset selection to all plots to off. These settings are located half way down the main GUI window, just below the Plot list.
  3. BOUT Apply All Plots.png

Add the first slice

  1. Add a Pseudocolor plot of te_zshift.
  2. Select Pseudocolor->te_zshift from the Add icon.
  3. Select PlotAtts->Pseudocolor from the PlotAtts menu.
  4. BOUT Pseudocolor Attributes4.png

  5. Change Minimum to -0.28 and Maximum to 0.028.
  6. Change Color table to RdBu.
  7. Toggle the Invert setting to on.
  8. Toggle Legend to off.
  9. Click Apply.
  10. Now we will apply the Slice operator.
  11. Select Slicing->Slice from the Operators icon.
  12. Select Slicing->Slice from the OpAtts menu.
  13. BOUT Slice Attributes.png

  14. Change Theta-Phi to -90 60.
  15. Change Origin to Point.
  16. Change Point to 0 0 0.0001.
  17. Toggle Project to 2D to off.
  18. Click Apply.
  19. Now we apply a Clip operator since the Slice operator intersects the grid twice and the second intersection will create an artifact.
  20. Select Selection->Clip from the Operators icon.
  21. Select Selection->Clip from the OpAtts menu.
  22. BOUT Clip Attributes3.png

  23. Change Quality to Accurate.
  24. Change Plane 1 Normal to 0 0 -1.
  25. Click Apply.
  26. Click Draw.

Add the second slice

  1. Add a second Pseudocolor plot of te_zshift.
  2. Select Pseudocolor->te_zshift from the Add icon.
  3. Select PlotAtts->Pseudocolor from the PlotAtts menu.
  4. BOUT Pseudocolor Attributes4.png

  5. Change Color table to RdBu.
  6. Toggle the Invert setting to on.
  7. Change Minimum to -0.28 and Maximum to 0.028.
  8. Toggle Legend to off.
  9. Click Apply.
  10. Now we will apply the Slice operator.
  11. Select Slicing->Slice from the Operators icon.
  12. Select Slicing->Slice from the OpAtts menu.
  13. BOUT Slice Attributes2.png

  14. Change Normal to Theta-Phi.
  15. Change Theta-Phi to 90 60.
  16. Change Origin to Point.
  17. Change Point to 0 0 0.0001.
  18. Toggle Project to 2D to off.
  19. Click Apply.
  20. Now we apply a Clip operator.
  21. Select Selection->Clip from the Operators icon.
  22. Select Selection->Clip from the OpAtts menu.
  23. BOUT Clip Attributes3.png

  24. Change Quality to Accurate.
  25. Change Plane 1 Normal to 0 0 -1.
  26. Click Apply.
  27. Click Draw.

This results in the following image.
BOUT Sophisticated Image3.png

Add an isosurface of te_zshift to show the field lines

  1. Add a Pseudocolor plot of te_zshift.
  2. Select Pseudocolor->te_zshift from the Add icon.
  3. Select PlotAtts->Pseudocolor from the PlotAtts menu.
  4. BOUT Pseudocolor Attributes4.png

  5. Change Color table to RdBu.
  6. Toggle the Invert setting to on.
  7. Change Minimum to -0.28 and Maximum to 0.028.
  8. Toggle Legend to off.
  9. Click Apply.
  10. Now we will apply the Isosurface operator.
  11. Select Slicing->Isosurface from the Operators icon.
  12. Select Slicing->Isosurface from the OpAtts menu.
  13. BOUT Isosurface Attributes.png

  14. Change Select by to Value(s).
  15. Change the Value(s) text field to 0.26.
  16. Click Apply.
  17. Click Draw.

This results in the final image displayed earlier.