wiki:VisItBasics

Version 38 (modified by Erica Kaminski, 12 years ago) ( diff )

VisIt Basics


Setting Up and Running VisIt

VisIt is currently installed on clover and grass. Clover does not have modules installed, so a different setup process is required on each machine.

Clover

Since clover doesn't have the modules program installed on it, you will have to manually add the visit executable's directory to your search path:

  1. Go to your home directory and open your .bashrc file.
  2. Add the following line to your .bashrc:
    export PATH=/opt/visit2/bin:$PATH
    
  3. Close your .bashrc file and enter the command source .bashrc to add the change to your environment.
  4. Enter the command visit to start VisIt.

Grass

VisIt is installed as a module on grass, so the setup is much more straightforward. The steps for making it part of your default environment, however, are very similar:

  1. Go to your home directory and open your .bashrc file.
  2. Add the following line to your .bashrc:
    module load visit
    
  3. Close your .bashrc file and enter the command source .bashrc to add the change to your environment.
  4. Enter the command visit to start VisIt.

Bluehive

  1. Login to Bluehive's shell cluster by giving the command: ssh -Y <username>@shell.crc.rochester.edu. See the CRC guide for further instructions if necessary- CRC guide.
  2. Load module for VisIt by giving command: module load visit from the terminal.
  3. Enter the command qVisit [np] [g_ram] to specify the number of processors and the amount of ram you require.

In any case, once you see a screen like the one below, you are ready to go.


Opening Files in Visit


Visit reads HDF5 files and can recognize them from the File open screen, provided they have the .hdf extension. If a collection of .hdf files with the same numbering convention exists in a directory, Visit will group them together and open them as a batch, which makes producing images and animations easier. The process is as follows:

  1. Go to the directory containing the files you want to open. This is not strictly necessary, but will make your life easier in the long run.
  1. Enter the visit command to start VisIt (see the instructions above to make VisIt part of your environment, if you have not already done so).
  1. Click File->Open file... to bring up the File open screen.
  1. Enter the directory path of the files in the Path field.
  1. The grouped HDF5 files are listed as .hdf databases in the File open window, with the individual files under the group header. Select the group you want and make sure that the "Open as File Type" box is set to "Chombo".


Creating a Pseudocolor Plot


One of the most common and useful plots at our disposal is the pseudocolor plot, which presents the intensity of a scalar attribute as a color spectrum. In two dimensions, this is fairly straightforward; in three dimensions an additional slice operation (see below) is usually required to get any useful information.

To practice creating pseudocolor plots, we will be using a 2D field

To create a pseudocolor plot:

  1. Enter the command
    cp /home/bshroyer/FieldLoopAdvection_2D_documentation_test}}} <home_directory>
    cd <home_directory>FieldLoopAdvection_documentation_test
    

This copies a 2D field loop advection problem to your home directory and moves into that directory as well.

  1. Open a Chombo file or group of Chombo files (see above).
  1. Under Plots, click Add->Pseudocolor->fieldname. In the case of the field loop problem, we'll be using the Bx field.

  1. Click the Draw button. This will draw a pseudocolor image in the VisIt window to the right of the control window. For high-resolution images, this may take several minutes.

If the Chombo file is one of a series, you can animate them by clicking the play buttons. You can advance or retreat a single frame by clicking the skip buttons.


3D Plots and the Slice Operator

Pseudocolor plots are opaque by default. This means that if you try to create a pseudocolor plot of a 3D dataset, you will get a large colored block. The boundary conditions of the dataset will be visible, but you will probably want to see some of the interior. This is where the slice operator comes in.

The slice operator creates a 2D plot by taking a planar slice of a 3D one. This is especially effective for problems with some kind of axial symmetry, where a cross section of a coordinate plane will give you a pretty good idea of what's going on throughout the simulation.

To try out a slice operation on a 3D pseudocolor plot on clover:

  1. Enter the command
    cp /home/bshroyer/FieldLoopAdvection_documentation_test}}} <home_directory>
    cd <home_directory>FieldLoopAdvection_documentation_test
    

This copies a 3D field loop advection problem to your home directory and moves into that directory as well.

  1. Create a 3D pseudocolor plot (i.e., steps 2-4 "Creating a Pseudocolor Plot" above).
  1. Under Plots, select Operators->Slicing-Slice. You have now attached a Slice operator to your plot.

  1. In the Plots display, click on the arrow next to your plot to expand it. Then double-click on Slice to open the attributes window.

  1. Select your intercept option in the Normal box. This indicates the axis perpendicular to the slice. Choosing the Z-Axis option, for instance, will create a slice along the xy-plane.
  1. Select the Intercept option in the Origin box. This indicates the point along your selected axis from which you will start slicing. For the 3D field loop problem, we will use 0.5 as an intercept.

Note: By default, VisIt uses 0 as the left boundary of the display. This means that problems centered on the origin will find their display coordinates shifted; the field loop problem, for instance, has its coordinates changed from [-1, 1], [-.5, .5], [-.5, .5] to [0, 2], [0, 1], [0, 1]. This is why the intercept is .5—because .5 is the new origin for the z-axis.

  1. Once you have modified your attribute settings to taste, click Apply. This will apply the slice operator to your 3D pseudocolor plot. Be aware that the slice operator might not slice precisely along the designated intercept. This is because the spatially-valued intercept cannot bisect cells. When it tries, VisIt simply rounds up to the nearest whole cell. This most likely to be a problem on extremely low-resolution problems, but it can cause undue alarm in comparison tests.

BackLinks

Attachments (11)

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.