ParaView

From OSUPDOCS
Revision as of 08:16, 2 January 2014 by Nairnj (talk | contribs)
Jump to navigation Jump to search

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

<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:

  1. Run NairnMPM calculations using the <a href="../xmlformat/custom.html#VTKArchive">VTKArchive custom task</a>.
  2. 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 "MPM_#.vtk" where "MPM" is the root name you used for the calculations archived files and "#" 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.
  3. ParaView does not actually read files when they are opened. To read them, click the "Apply" button in the object inspect. When it is done reading, a wire frame of the space should appear in the plot area.
  4. To get a plot, 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.
  5. Finally, use the "Color by" menu (in tool bar or in object inspector) to choose archived component to apply color the the mass surface

ParaView has many more options for plotting and reading results from NairnMPM run using the <a href="../xmlformat/custom.html#VTKArchive">VTKArchive custom task</a>. The above just get one plot.

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.