Difference between revisions of "ParaView"

From OSUPDOCS
Jump to navigation Jump to search
Line 6: Line 6:


# Download and install [http://www.paraview.org ParaView]. It is available for many platforms and can run in parallel (hence the name) if installed on a multiprocessor system or cluster of computers.
# Download and install [http://www.paraview.org ParaView]. It is available for many platforms and can run in parallel (hence the name) if installed on a multiprocessor system or cluster of computers.
# Run from [[NairnMPM]] calculations that use the [[VTKArchive Custom Task]] to save results as VTK legacy files
# Run from [[NairnMPM]] calculations that use the [[VTKArchive Custom Task]] to save results as VTK legacy files. Save the quantties you might want to plot and one of them should be mass (because it is used in many plot options)
# Run ParaView, choose the open command and select the block of VTK legacy files that were just created. The files will be found in the archived results folder with the naming stlye "MPM_#.vtk" where "MPM" is the root name you used for the calculation's archived files and "#" is the step number. ParaView will let you select these as a block to open them all at once, or expand the block and select a single file. You need to open as a block to get movies of results.
# ParaView does not actually read files when they are opened. To read them, click the "Apply" button in the object inspector. When it is done reading, a wire frame surroinding the analysis space should appear in the plot area, but still not plot.
# These are numerous types of plots you can create. To try one, click the "Contour" icon. In the object inspector, set it to countour by mass. In the isosurfaces section, set the contour value to some number less than the maximum mass. The optimal value will depend on the structure of your model. You need a lowed number to visualize porous objects or a higher number for solid objects. You can also add several numbers to create contours at several values of mass.
# Finally, use the "Coloring" menu (in tool bar or in object inspector) to choose archived component to apply color the the mass surface. If you pick a tensor or vector, you can pick which component to use in the second menu.
# If you loading the VTK files as a block, you can use the movies controls to animate the results.


<p><a href="http://www.paraview.org">ParaView</a> is advanced software with many options and ample documentation on the <a href="http://www.paraview.org">web or in books</a>. This section just gives steps to get one plot from NairnMPM output:</p>
These instructions gets just one time of plot. Once you have data in the ParaView, you can explore all its other options for plotting.
 
<ol>
 
<li>Run NairnMPM calculations using the <a href="../xmlformat/custom.html#VTKArchive">VTKArchive custom task</a>.</li>
<li>Run ParaView, choose the open command and select the block of VTK legacy files. The files will be found in the archived results folder with the naming stlye &quot;MPM_#.vtk&quot; where &quot;MPM&quot; is the root name you used for the calculations archived files and &quot;#&quot; is the step number. ParaView will let you select these as a block and open the entire block at once. It will load them in the correct order.</li>
 
<li>ParaView does not actually read files when they are opened. To read them, click the &quot;Apply&quot; button in the object inspect. When it is done reading, a wire frame of the space should appear in the plot area.</li>
 
<li>To get a plot, click the &quot;Contour&quot; icon. In the object inspector, set it to countour by mass. In the isosurfaces section, set the contour value to some number less than the maximum mass.</li>
 
<li>Finally, use the &quot;Color by&quot; menu (in tool bar or in object inspector) to choose archived component to apply color the the mass surface</li>
 
</ol>
 
<p>ParaView has many more options for plotting and reading results from <code>NairnMPM</code> run using the <a href="../xmlformat/custom.html#VTKArchive">VTKArchive custom task</a>. The above just get one plot.</p>


== Particle Plots in ParaView ==
== Particle Plots in ParaView ==

Revision as of 09:52, 2 January 2014

ParaView is free andadvanced software with many options for visualization, especially when doing 3D calculations.

Getting Started with ParaView

This section gives the basic steps needs to start using ParaView to visualize material point method output for NairnMPM.

  1. Download and install ParaView. It is available for many platforms and can run in parallel (hence the name) if installed on a multiprocessor system or cluster of computers.
  2. Run from NairnMPM calculations that use the VTKArchive Custom Task to save results as VTK legacy files. Save the quantties you might want to plot and one of them should be mass (because it is used in many plot options)
  3. Run ParaView, choose the open command and select the block of VTK legacy files that were just created. The files will be found in the archived results folder with the naming stlye "MPM_#.vtk" where "MPM" is the root name you used for the calculation's archived files and "#" is the step number. ParaView will let you select these as a block to open them all at once, or expand the block and select a single file. You need to open as a block to get movies of results.
  4. ParaView does not actually read files when they are opened. To read them, click the "Apply" button in the object inspector. When it is done reading, a wire frame surroinding the analysis space should appear in the plot area, but still not plot.
  5. These are numerous types of plots you can create. To try one, click the "Contour" icon. In the object inspector, set it to countour by mass. In the isosurfaces section, set the contour value to some number less than the maximum mass. The optimal value will depend on the structure of your model. You need a lowed number to visualize porous objects or a higher number for solid objects. You can also add several numbers to create contours at several values of mass.
  6. Finally, use the "Coloring" menu (in tool bar or in object inspector) to choose archived component to apply color the the mass surface. If you pick a tensor or vector, you can pick which component to use in the second menu.
  7. If you loading the VTK files as a block, you can use the movies controls to animate the results.

These instructions gets just one time of plot. Once you have data in the ParaView, you can explore all its other options for plotting.

Particle Plots in ParaView

To get started using <a href="http://www.paraview.org">ParaView</a> for particle plots, try the following example simulation and analysis:

  1. Run the TwoSpheres.fmcmd example in nairn-mpm-fea/NairnMPM/input and save the results.
  2. Use ExtractMPM on a file from the Results folder with the following command line:
    ExtractMPM -V -q sxx -q velx -q dispx -n Example -o TwoSpheres spheres.264
    
  3. Download, install, and run <a href="htpp://www.paraview.org">ParaView</a>. Use it to open the TwoSpheres.vtk file created by the above extraction. Then:
    • Click "Apply" in the object inspector.
    • Click or use menu command to add Glyphs.
    • Select Glyph Type "Sphere."
    • Enter Radius = 1.25 (1/4 of the 5 mm cell size).
    • Scroll down, click to "Edit Scale" and edit it to be 1.
    • Click "Apply" to get the particle plot

You should have gotten a plot of two spheres in contact. You can explore all the <a href="http://www.paraview.org">ParaView</a> options for ways to visualize the results. You can color by any of the properties extracted to the file. If you extract multiple files and load them all into <a href="http://www.paraview.org">ParaView</a>, you can animate the results. When extracting results from multiple files in a single simulation, you should use the -s option to include step number in the file name. This method insures that <a href="http://www.paraview.org">ParaView</a> will read the files in the correct order.