This open-source code provides Discrete Element Method (DEM) simulations, including the following examples:
- Granular Column Collapse (2D)
- Cylinder Lift (2D)
| Granular Column Collapse | Cylinder Lift |
|---|---|
![]() |
![]() |
Tip
For DEM study, Basic_theory_DEM.pdf might be a helpful resource.
This code is written in Fortran (for DEM calculations) and Python (for visualization).
| Category | Requirement | Notes |
|---|---|---|
| Operating System | Unix-like environment | Tested on Windows Subsystem for Linux (WSL) |
| Compiler | Intel Fortran / gfortran | Tested with ifx (default) and gfortran |
| Build Tool | make |
For building Fortran files |
| Visualization | Python |
Tested with Python 3.12.0 and requires matplotlib |
| Movie Generation | ffmpeg |
Required for Python scripts to generate movies |
Tip
If ffmpeg is not installed, run sudo apt install ffmpeg .
- Navigate to the simulation directory (e.g.,
dem_code/granular_column_collapse_2D/source_code/) - Run
maketo build the Fortran programs. - Run
./start_calculationto start the simulation. - After the simulation finishes, run
python main.pyto generate figures.
Note
Each problem statement is described in the README.md in its directory.
Shobuzako, K. (2025). DEM-Examples (Version 1.1.0) [Computer software].
Zenodo. https://doi.org/10.5281/zenodo.16356866
Contributions are welcome!
If you would like to improve the code, report a bug, or add a new feature, feel free to submit a pull request.
This project is licensed under the MIT License .

