Using ParaView

From ScorecWiki

Revision as of 16:37, 19 February 2008; view current revision
←Older revision | Newer revision→
Jump to: navigation, search

NOTE: This needs to be updated for the new ParaView version and the new XML format for phasta input


Before Starting

Make sure you have your Phasta restarts and a copy of ParaView. This tutorial was made using Paraview version 1.2. The PHASTA reader is able to read restart files from Phasta 1.9.

Here is the tutorial for Building ParaView.

Here is an executable that should work on windows link. It is a tgz file that should be saved and exploded where you would like to keep ParaView. It contains a small test example. If you have trouble with the installation, this movie might be helpful. It also steps through some of the visualization techniques.


On the Linux computers, the ParaView executable is located at


Reading Results

ParaView supports many file formats natively, including that of several commercial visualization packages such as Ensight.

Specifically when using ParaView with Phasta, you must create a meta file. This process is described in PHT File Format.


  • Launch ParaView
  • Go to File > Open Data. Select your input file.
  • Apply Filters to your result.


Please see the Running ParaView In Parallel page.



The contour filter computes isolines or isosurfaces using a selected value.


The cut filter extacts a portion of the data that lies along a specified plane or sphere.


The glyph filter generates a glyph (arrow, cone, line, sphere, etc) at each point in the input data set. They can be oriented and scaled by input point-centered scalars and vectors.

Stream Tracer

The stream tracer generates streamlines in a vector field from a collection of seed points.

Applying Filters

Making Vectors

Make sure the scalar quantity is in front of the unit vector. If the unit vector is placed in front of the scalar quantity in the muliplication, it will cause the value to always be 1.


Ensa_Fields_1*iHat + Ensa_Fields_2*jHat + Ensa_Fields_3*kHat

Creating Isosurfaces

An isosurface represents a surface drawn consisting of points of a constant value within a volume of space.

  • Apply Calculator filter by going to Filter > Calculator.
  • Enter equation that you wish to solve for into the calculator and click Accept.
  • Go to Filter > Contour.
  • Go to the Display tab and make sure the Color by: is set to Point Result
  • Click Edit Color Map...'.
  • Change the Resolution. This sets the number of different colors in the color map.
  • Click Reset Range and then click Back.
  • Go to the Parameters tab and add values that you would like to generate an isosurface for. You may also generate a range of values here, or delete values you do not wish to use.
  • Click Accept when you are done. This should generate your isosurface.

Video: Creating an Isosurface

Isosurface in ParaView
Isosurface in ParaView

Creating a Mesh

  • Go to the Display tab.
  • Change Representation to Wireframe of Surface
Isosurface Mesh in ParaView
Isosurface Mesh in ParaView

Displaying Velocity Vectors

  • Apply Calculator filter by going to Filter > Calculator.
  • Enter vector that you wish to solve for into the calculator and click Accept.
  • Go to Filter > Glyph.
  • Select your representation of the vector in the Glyph drop-down box.
  • Change the Input to the vector you would like to calculate.
  • Change the Max. Number of Glyphs to the max number of glyphs you would like to display.
  • Click Accept.
Glyphs in ParaView
Glyphs in ParaView

Creating Streamlines

Streamlines are lines which is everywhere tangent to the velocity of flow.

  • Apply Calculator filter by going to Filter > Calculator.
  • Create a vector in the calculator.
  • Click Accept.
  • Go to Filter > Streamtracer.
  • Change the Vector to the vector you would like to calculate.
  • Change the Seed to either Point Cloud or Line.
  • Click Accept.
  • Highlight the stream in the selection window.
  • Go to Filter > Tubes or Filter > Ribbons.
  • Adjust parameters and click Accept.
Streamlines in ParaView
Streamlines in ParaView

Nate's Tutorials

Basic introduction to Paraview: Intro to Paraview

Creating isosurfaces and adding velocity vectors: Creating Isosurfaces/Velocity Vectors

Extracting Grids: Extracting Grids in Paraview

Creating Streamlines: Creating streamlines in Paraview

Issues about Paraview 3.2.1

Paraview new version 3.2.1 is currently the latest stable version. The serial and parallel versions of Paraview are both compiled for 32 bit and 64 bit. They are available to use in /usr/local/paraview/latest

To use Paraview version 3.2.1 properly, the path of Qt library should be set up properly first:

  export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/Trolltech/Qt-4.2.3/lib/

To use parallel version paraview, refer the the following link for starting the server:

Practical example of running in parallel on Borg:

1. In borg window, add the path to the Qt library to LD_LIBRARY_PATH as specified above:

  export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/Trolltech/Qt-4.2.3/lib/

2. Launch Paraview from borg:

  /usr/local/paraview/latest/parallel/bin/paraview &

3. Establish a connection to the server. If you don't have one already then you will need to create one. Select File-->Connection and then select Add Server. You will see the following:

Now click Add Server and type in a name and choose Server Type = Client/Server (reverse connection)

Now click Configure and set the Startup Type to Manual

Select Save. This configures the server. Now double-click the server name to establish a connection. You'll get the following message indicating that it is wating to receive a handshake from the server side.

4. Now that the client is in 'listen' mode, we can now startup the server. To do this we must submit a parallel job to the Borg queue that launches the Paraview pvserver command. Note that you must run on the same number of processors as there are partitions to view. The sample job script I used is given here:

  export P4_RSHCOMMAND=rsh
  export PATH=/usr/local/mpich/latest/ch_p4/bin:$PATH
  export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/Trolltech/Qt-4.2.3/lib/
  echo 'Starting job'
  /usr/local/mpich/latest/ch_p4/bin/mpirun -np $NSLOTS -machinefile $TMPDIR/machines      /usr/local/paraview/latest/parallel/bin/pvserver --use-offscreen-rendering -rc
  echo 'Job completed'
  exit 0

submit the jobscript via:

   qsub -cwd -o stdout -e stderr -pe mpich 4 jobscript

5. A warning will pop up stating that rendering cannot be done on the server side so it will be disabled. Hit OK.


6. You should now see the connection displayed in the Paraview Pipeline Browser as csrc://localhost:11111. You can now proceed to load results.

7. When you are done then you should disconnect from the server (use File-->Disconnect). This will terminate the pvserver job in the queue.

Personal tools