
Extracting MPM Particle Results
When MPM results are in the front window, you can use the File→Export→Particle VTKs... menu command to export MPM results to particle-based VTK files that can be opened in other software (e.g., Paraview or VisIt). This option sets up and runs the ExtractMPM tool. The ExtractMPM process is as follows:
- Choose the File→Export→Particle VTKs... menu command and a dialog box appears
- Enter a root name into the editing field. The exported files will be in the same folder as the simulation's archive files and their names will append underscore, step number, and extension "vtk" ro your entered root name (e.g., "RootName_34.vtk"). If a file of that name already exists, it will be overwritten. Most third-party visualization tools will recognize such a set of files as a group of vtk files to opened together and ordered by step number.
- Use the pop-up menu to select any number of particle quantities to include in the exported files. The menu will list all data that is both available in the current simulation and is supported by the ExtractMPM tool.
- Alternatively, you can type quantities into the editing field on the right. Type one quantity per line. The quantities are case sensitive and must match a
-q
option documented for the ExtractMPM tool. - Alternatively, click the "Default Set" to replace all currently entered export options with the most-commonly exported quantities that are available in the current data. After getting these default quantities, you can delete any not needed or add more by typing or by using the pop-up menu menu.
- When done entering all quantities, click "Save" to export all results to a series of
VTK
files.
The export process is handled using the ExtractMPM tool and its executable must be in the same folder used for the NairnMPM binary set up in the Code Preferences. The output will be streamed to the text area in the box. If the export is taking too long, you can abort the process using the "Stop" button. After an export finishes, the "Reset" button will be enabled to reset the export commands in case you want to alter the export options and try again. If an error occurs, the reason will appear in the text field. You can "Reset" to prior commands, fix the error, and try again.
ExtractMPM Options
The above process handles most needs, but you can also make use of other features in the ExtractMPM tool. Any line in the editing field on the right that does not begin in a dash (-) is assumed to be a quantity for exporting (it is passed to ExtractMPM using a -q command). Any line starting in a dash is assumed to be valid command and is passed to ExtractMPM when run. You can use any valid ExtractMPM command. The most commonly used options:
-T
: export to tab-delimited text files. This command is best used in conjunction with-h
that includes a header with information about what is in each column of the files.-M #
: include material number specified by "#" in the export. If no-M
commands are used, all materials are exported. If any are used, only the specified materials are exported.-m #
: omit material with number specified by "#" from the export. If a material is both included and omitted, the omission take precedence.