PyGranAnalysis is an open-source toolkit primarily designed for analyzing DEM simulation data. It is part of the PyGran ecosystem.
If your find PyGran useful in your research, please consider citing the following paper:
@article{aam2019pygran,
title={PyGran: An object-oriented library for DEM simulation and analysis},
author={Abi-Mansour, Andrew},
journal={SoftwareX},
volume={9},
pages={168--174},
year={2019},
publisher={Elsevier},
doi={10.1016/j.softx.2019.01.016}
}
PyGranAnalysis is typically installed with other PyGran packages. See here for more info. For a solo installation, simply run:
pip install pygran_analysis
You can alternatively clone this repository run setup.py
to build and/install the package from its source code. See setup.py -h
for more info.
Doing post-analysis with PyGranAnalysis is quite straight forward. Computing particle overlaps shown below for instance can be done in few lines of code:
import pygran_analysis
# Instantiate a System class from a dump file
gran = pygran_analysis.System(Particles='granular.dump')
# Instantiate a nearest-neighbors class
nns = analysis.Neighbors(Particles=Gran.Particles)
overlaps = nns.overlaps
For more examples on using PyGran for analyzing DEM simulation, check out the examples page.