Lesson2 RunningScripts
Lesson2 RunningScripts
This lesson will show you some examples of EDEMpy scripts and will demonstrate how to run scripts from
EDEM.
The EDEMpy library is useful when post-processing EDEM data. This video looks at a simple example
demonstrating how to run a script. This script plots the stress on geometry walls over time. Here we see
a box being filled with rocks. At each timestep, the particle data, geometry data and interaction data is
saved in HDF5 format to an H5 file. By running a Python script which calls specific functions from the
EDEMpy library, you can access and manipulate this data.
You can find several example scripts on the Altair One website. This is a useful place to start to get an idea
of what you can do with EDEMpy, since the examples demonstrate a variety of ways to manipulate EDEM
data.
Note before running a script to postprocess data from a specific EDEM deck, the Python script should first
be added to the same directory as that deck. Depending on how the script is written, you might need to
adapt the code to function with the simulation file that you are analyzing. Some of the example zip files
contain text documents with instructions that highlight when these changes are necessary.
After your simulation run is complete, in the Analyst panel click File and scroll to the option ‘Run
EDEMpy Script’. A dialog box then appears. Here you can select the Python script that you want to run.
Enter any arguments in the ‘Arguments’ box and click ‘Run Script’. Any results will then be printed in the
EDEM prompt window, and any graphs will pop up in the display. You can terminate the program by
clicking ‘Stop Script’. You can then return to the EDEM Analyst by selecting cancel or exiting the dialog.