ParaView

From OSUPDOCS
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. 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

Using the VTKArchive Custom Task always gets grid-based plots. By extracting particle data using ExtractMPM, you can also use ParaView to view particle-based plots. Here is an example to get started with particle plots in ParaView:

  1. Run the TwoDisks.fmcmd example in nairn-mpm-fea/NairnMPM/input/Scripted_Input using #analysis$="3D MPM".
  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

  1. Run ParaView
  • 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.