PeriDEM  0.1.0
Peridynamics-based discrete element method (PeriDEM) model of granular systems

Implementation of high-fidelity model of granular media that combines the advantages of peridynamics and discrete element method (DEM). The model has following advantages over existing mechanical models for granular media:

  • handle intra-particle deformation and breakage/damage
  • handle arbitrary shape of particle. Inter-particle contact is not specific to any shape of particle
  • tunable inter-particle contact paramters
  • easy to add different mechanical constitutive laws within peridynamics for individual particle deformation

For more details about the model and results, we refer to the paper:

Prashant K. Jha, Prathamesh S. Desai, Debdeep Bhattacharya, Robert P Lipton (2020). Peridynamics-based discrete element method (PeriDEM) model of granular systems involving breakage of arbitrarily shaped particles. Journal of the Mechanics and Physics of Solids, Volume 151, 2021. Doi https://doi.org/10.1016/j.jmps.2021.104376.

Download pdf here.

Some example cases. For more details, look at the problem_setup.py file or input_0.yaml file in examples.

To create example input files, the python script is provided. Python script allows parameterization of various modeling, geometrical parameters, and creating .geo files for gmsh and particle locations file. Typically, the input files consists of:

  • input.yaml – the main instruction file for PeriDEM with details about material models, particle geometries, time step, etc
  • particle_locations.csv – this file provides location and other details of the individual particles. Each row in the file consists of
  • i – zone id that particle belongs to
  • x – x-coordinate of the center of the particle. Next two columns are similarly for y and z coordinates
  • r – radius of the particle
  • o – orientation in radians. This is used to give particle (particle mesh) a rotation
  • mesh.msh – mesh file for the reference particle or wall. For example, in compressive test example, there are total four mesh files: one each for circular and hexagon shaped particle and one each for fixed and mobile wall
Circular without damping Circular without damping
Different materials Different radius Different radius different material
Concave particles

Setup for this test consists of 502 circular and hexagonal shaped particles of varrying radius and orientation within a rectangle container. The top wall of the container is moving downward with prescribed speed resulting in compression of the particle system. The quantity of interest is the compressive strength of media; it is expected that the moving wall register reaction for with increasing penetration, however, after a certain amount of compression of media, the damage will initiate in individual particles especially those connected by force chain resulting in yielding of the media. For more details, we refer to Jha et al 2021

Compressive test setup
Top: Plot of reaction force per unit area on top wall. Bottom: Particle state at four times. Color shows the damage at nodes. Damage 1 or above indicates the presence of broken bonds in the neighborhood of a node.
Compressive test simulation

Core dependencies for building the executible:

  • cmake
  • boost
  • hwloc
  • jemalloc
  • hpx
  • vtk
  • flann
  • pcl
  • yaml
  • fmt (included as external library in the code)

Dependencies for running the examples:

  • gmsh
  • python3
  • numpy

If all the libraries are installed in global space, commands for building the code is as simple as

cmake -DEnable_Documentation=ON \
-DEnable_Tests=ON \
-DCMAKE_BUILD_TYPE=Release \
<PeriDEM source directory>
make -j 4

If libraries such as hpx, pcl are installed in custom paths, we will write

cmake -DHPX_DIR="<hpx directory>/lib/cmake/HPX" \
-DPCL_DIR="<pcl directory>" \
-DEnable_Documentation=ON \
-DEnable_Tests=ON \
-DCMAKE_BUILD_TYPE=Release \
<PeriDEM source directory>
make -j 4
  1. Install following dependencies
    sudo apt-get install libboost-dev libvtk7-dev \
    libyaml-cpp-dev libhwloc-dev libjemalloc-dev libflann-dev
  2. Build hpx and pcl. See shell scripts ubuntu 18.04 and ubuntu 20.04 For mac too the steps will be same assuming all other dependencies are installed using brew.
  3. Build peridem see script
    cmake -DHPX_DIR="<hpx directory>/lib/cmake/HPX" \
    -DPCL_DIR="<pcl directory>" \
    -DEnable_Documentation=ON \
    -DEnable_Tests=ON \
    -DCMAKE_BUILD_TYPE=Release \
    <PeriDEM source directory>
    make -j 4
  4. Running the simulation. Assuming that the input file is input.yaml and all other files such as .msh file for particle and wall and particle locations file are created and their filenames with paths are provided in the input.yaml file, we will run the problem (using 4 threads)
<path of PeriDEM>/bin/PeriDEM -i input.yaml --hpx:threads=4

Some shell scripts are provided that may help in building the code on ubuntu 18.04, 20.04, and mac.

We also provide the docker image of the peridem code. The docker image is built using the three layers

  • layer 1 (u1804-base or u2004-base) – base ubuntu 18.04 or ubuntu 20.04 with some essential libraries installed
  • layer 2 (u1804-pd or u2004-pd) – built hpx and pcl on layer 1
  • layer 3 (PeriDEM) – built PeriDEM on layer 2

Dockerfile associated to all layers listed above can be found in build scripts. Image corresponding to layer 2 above can be downloaded from the dockerhub: