Step-by-Step Guide to Running Your First DEM Simulation Successfully
August 15, 2026
STEP-BY-STEP GUIDE TO RUNNING YOUR FIRST DEM SIMULATION SUCCESSFULLY
EXECUTIVE SUMMARY
Discrete Element Method (DEM) simulation lets you model how thousands of particles behave when they collide, slide, or stick. If you’re reading this, you likely need to predict flow in a hopper, mixer, or conveyor—but don’t yet know where to start. This guide walks you through a minimal working example from geometry to post-processing, using free or low-cost tools. Expect to spend 4–6 hours on your first run, not counting software installation. The steps are tool-agnostic; I’ll call out LIGGGHTS-PUBLIC (open-source) and EDEM (commercial) where choices matter. By the end, you’ll have a single 30-second simulation of 10 000 spheres falling into a box, plus the confidence to tweak it for your own problem.
WHAT YOU’LL NEED BEFORE YOU BEGIN
Hardware: A 6-core CPU, 16 GB RAM, and 50 GB free disk space. GPU acceleration helps but isn’t mandatory for the first run.
Software: LIGGGHTS-PUBLIC (v3.8.0) or EDEM (2023.2). Both offer free academic licenses; EDEM has a 30-day trial.
Geometry: A simple STL of a box (1 m × 1 m × 0.5 m). You can export one from any CAD package or download a pre-made file.
Particles: A text file listing sphere diameters and positions. I’ll provide a template.
Time: Block a half-day. Compiling LIGGGHTS from source takes 1–2 hours; EDEM installs in 20 minutes.
STEP 1: INSTALL THE SOFTWARE
LIGGGHTS-PUBLIC (Linux/Windows WSL)
Open a terminal. Clone the repository: git clone –recursive https://github.com/CFDEMproject/LIGGGHTS-PUBLIC.git
cd LIGGGHTS-PUBLIC/src
Make sure you have gcc ≥ 7.5, OpenMPI, and FFTW3 installed. Run make auto to detect your system.
If you hit missing library errors, install them via apt or yum, then re-run make auto. Compilation takes 30–90 minutes.
Test with mpirun -np 4 ./lmp_auto -in in.simple. If you see “Total wall time” you’re good.
EDEM (Windows)
Download the installer from Altair’s portal. Run it, accept the defaults.
Launch EDEM Creator, register with your trial license, and verify the splash screen shows “Academic” or “Trial”.
No compilation needed; you’re ready in 20 minutes.
STEP 2: PREPARE THE GEOMETRY
Create a box in CAD (Fusion 360, FreeCAD, or Onshape). Dimensions: 1 m × 1 m × 0.5 m, wall thickness 0.01 m.
Export as STL (ASCII format, not binary). Name it box.stl.
If you don’t have CAD, download a pre-made STL from GrabCAD or Thingiverse; search “1m cube STL”.
Important: STL units must be meters. If your CAD exports in mm, scale the STL in MeshLab or Blender before importing.
STEP 3: GENERATE THE PARTICLE INPUT FILE
You need a text file listing each particle’s diameter, x, y, z coordinates, and optional properties.
Template (save as particles.txt):
# diameter x y z
0.02 0.2 0.2 0.6
0.02 0.25 0.2 0.6
… repeat for 10 000 spheres.
For LIGGGHTS, use the “create_atoms” command in the input script; for EDEM, use the Particle Factory.
Pro tip: Use Python to generate the file. Example snippet:
import numpy as np
np.savetxt(‘particles.txt’, np.random.uniform(0.1, 0.3, (10000, 3)), fmt=’0.02 %.3f %.3f %.3f’)
STEP 4: WRITE THE INPUT SCRIPT (LIGGGHTS)
Below is a minimal LIGGGHTS input script (save as in.simple):
# Units: SI (kg, m, s)
units si
atom_style sphere
boundary p p p
newton off
# Geometry
read_data box.stl
# Particles
region fill block 0.1 0.9 0.1 0.9 0.6 1.0 units box
create_atoms 1 region fill
set atom 1 diameter 0.02
set atom 1 density 2500
# Bulk Material Processing properties
pair_style gran model hertz tangential history
pair_coeff * * 0.5 0.3 0.1 0.1 0.1 0.1 0.1 0.1 0.1
# Time step and run
timestep 1e-5
run 300000
Explanation:
– units si: metric system.
– atom_style sphere: particles have diameter and density.
– boundary p p p: periodic in all directions (change to f f f for walls).
– read_data box.stl: imports the STL as a triangulated surface.
– region fill: defines a volume where particles are created.
– create_atoms: populates the region with spheres.
– pair_style gran: contact model (Hertz-Mindlin with history).
– timestep 1e-5: 10 microseconds; safe for 2 cm spheres.
– run 300000: 300 000 steps × 1e-5 s = 3 s real time.
STEP 5: SET UP THE SIMULATION (EDEM)
Launch EDEM Creator.
Click File → New → Simulation.
Set units to SI.
Click Geometry → Import → STL and select box.stl.
Click Particles → Particle Factory → Sphere.
Set diameter to 0.02 m, count to 10 000.
Click Generate Particles; drag the factory above the box (z > 0.5 m).
Click Physics → Materials → Create New.
Name it “Glass”, density 2500 kg/m³, Poisson’s ratio 0.25, Young’s modulus 70 GPa, restitution 0.5, static friction 0.3, rolling friction 0.1.
Assign the material to both particles and geometry.
Click Physics → Contact → Particle-Particle and Particle
