Discrete Element Method (DEM): Simulating Granular Materials
Sand, grain in a silo, rocks in a landslide, pharmaceutical powders — these granular materials behave neither like a solid nor a fluid. They form avalanches, build stable piles with a specific angle of repose, transmit force along invisible chains of contact, and jam unpredictably. The Discrete Element Method models every grain individually, resolving all these phenomena from first principles.
1. What Makes Granular Materials Hard
A pile of sand has ~10¹⁰ grains. Even a small laboratory sample of 10 000 grains cannot be described by classical continuum mechanics (which treats materials as differentiable fields) because:
- Contacts are unilateral: grains push but never pull. Forces are compressive-only, creating asymmetric, history-dependent behaviour.
- Friction is directional and rate-independent: the Coulomb friction model relates tangential to normal force, not to velocity.
- No thermodynamic equilibrium: granular systems are athermal — random thermal energy at room temperature is negligible compared to grain weight. The system is always in a non-equilibrium, metastable state.
- Jammed states: shaken grains flow; stopped grains jam rigidly. The jamming transition is not well described by standard phase-transition theory.
The Discrete Element Method (DEM), introduced by Cundall and Strack in 1979, treats every grain as a rigid body and computes all contact forces explicitly. The collective grain behaviour emerges from millions of individual two-body interactions — no constitutive law for the bulk material is assumed.
2. Contact Detection
Before computing forces, we must determine which pairs of particles are in contact. For spheres (the predominant DEM grain shape), contact is simple:
Non-spherical grains (ellipsoids, polyhedral rocks, rounded cubes) require more complex contact detection — GJK or SAT algorithms — and are 10–100× more expensive per contact pair, which is why DEM studies overwhelmingly use spheres.
Broad-Phase: Finding Candidate Pairs
Checking every pair of N particles costs O(N²). With N = 100 000 this is 10¹⁰ checks per timestep — impossible. A spatial hash grid or bounding volume hierarchy (BVH) reduces this to O(N) with a small constant:
The grid must be rebuilt each timestep (particles move). For highly dynamic simulations, a linked-list-per-cell structure that supports O(1) insert/delete is preferred over rebuilding from scratch.
3. Contact Force Models
Linear Spring-Dashpot (LSD)
The simplest contact model represents each contact as a spring (elastic repulsion proportional to overlap) and a dashpot (viscous damping proportional to relative velocity):
The spring stiffness kₙ is a critical parameter. It must be large enough that overlaps remain physically small (δ ≪ r), but larger kₙ requires smaller timesteps (stability condition: Δt ≤ π × √(m/kₙ)). In practice kₙ is chosen to yield overlaps of ~0.5–2% of particle radius.
Hertz–Mindlin Contact Model
The more physically accurate model derives from Hertz contact theory, which predicts that the contact area grows with load and the force scales as δ^(3/2) rather than δ linearly:
Hertz–Mindlin requires material parameters (Young's modulus E, Poisson's ratio ν) that can be measured experimentally, making calibration to real materials straightforward. LSD requires choosing kₙ somewhat arbitrarily.
4. Time Integration
DEM uses Newton's second law for both translational and rotational motion of each particle:
DEM timesteps are tiny: typically Δt ≈ 10⁻⁶–10⁻⁵ seconds (far smaller than the simulation duration of seconds to minutes). The critical timestep is set by the natural oscillation period of the spring-dashpot system. Violating it causes numerical instability — overlaps grow without bound.
5. Friction, Rolling, and Cohesion
Coulomb Tangential Friction
A grain resists sliding tangentially. The classic Coulomb friction model limits the tangential force to a fraction of the normal force:
Rolling Resistance
Perfect spheres roll without rolling resistance — they would form unrealistically flat piles. A rolling friction torque resists rotation at the contact, parametrised by a rolling friction coefficient μᵣ ≪ μ:
Cohesion (van der Waals / Capillary)
Fine powders (d < 100 μm) experience significant inter-particle attraction from van der Waals forces. Wet sand gains cohesion from liquid bridges (capillary adhesion). These are modelled by adding an attractive force component, using a Johnson–Kendall–Roberts (JKR) or Derjaguin–Müller–Toporov (DMT) contact mechanics extension, or a simplified "cohesion energy density" approach where grains slightly outside contact still attract.
6. Emergent Phenomena: Force Chains & Angle of Repose
Force Chains
Strike a sand pile and the impact force does not spread uniformly — it travels along force chains: narrow, branching paths of heavily loaded grains surrounded by nearly unloaded "spectator" grains. The heterogeneity is striking: the most-loaded grains carry 10× the average load.
DEM simulations predicted force chains before they were imaged experimentally. Photoelastic disk experiments (using birefringent discs that show stress optically under polarised light) confirmed DEM predictions in the 1990s. Force chains are critical to understanding stress transmission in granular media and the sudden onset of flow (avalanche).
Angle of Repose
Pour sand into a pile: it builds to a maximum slope angle — the angle of repose θᵣ — and stops. Add more, and small avalanches maintain that slope. DEM naturally produces this:
- Coulomb friction coefficient μ → tan(θᵣ) ≈ μ (for uniform spheres on a flat surface)
- Rolling friction increases θᵣ (angular particles have higher effective rolling friction)
- Grain size distributions affect θᵣ (wider distributions → higher θᵣ due to interlocking)
Size Segregation (Brazil-Nut Effect)
Shake a container of mixed grain sizes: larger grains rise to the top — the Brazil-nut effect. DEM simulations reproduce this through a convection/void-filling mechanism: small grains fall into gaps below large grains during vibration, ratcheting large grains upward. The effect reverses (inverse Brazil-nut) for dense large grains, and is sensitive to grain size ratio, density ratio, and vibration parameters.
7. Performance: Spatial Hashing & GPU DEM
CPU DEM Performance
A well-optimised CPU DEM code handles ~10⁵–10⁶ particles at interactive speeds (a few timesteps per second for slow dynamics). Key optimisations:
- Verlet neighbour lists: Rebuild contact candidates only every few steps. Check every timestep if particles have moved more than a "skin depth" since last rebuild.
- Linked-list-per-cell: O(1) insert/remove from spatial grid as particles move.
- SIMD: Vectorise force calculations over batches of contact pairs using AVX2/AVX-512.
- OpenMP: Parallelize force computation over particles (beware race conditions on shared force arrays — use thread-local accumulators or atomic operations).
GPU DEM
GPU DEM pushes to 10⁷–10⁸ particles by executing contact force kernels with one GPU thread per contact pair. Challenges unique to GPU DEM:
- Atomic force accumulation: Multiple threads simultaneously add forces to the same particle. Use CUDA atomicAdd or split into phases where each thread "owns" a particle.
- GPU spatial hashing: Sort particles by cell key using GPU radix sort (CUB library). Then scan to find cell boundaries. Rebuild every timestep but each step is only ~1 ms on a modern GPU.
- Memory layout: AoS (Array of Structs) is cache-inefficient for GPU. SoA (Struct of Arrays) packs x-coordinates together, y-coordinates together — far better coalescing.
8. Industrial Applications
DEM is used wherever granular materials play a key role:
- Mining & mineral processing: Ball mill grinding (ore + steel balls), conveyor design, silo flow and discharge rates, funnel flow vs mass flow regimes. DEM predicts clogging — where an arch of grains blocks a hopper — critical for preventing costly production stoppages.
- Pharmaceutical: Tablet coating in rotating drums, powder blending uniformity, capsule filling. Granule breakage models predict dissolution rate differences. FDA increasingly requires DEM-based process validation.
- Geotechnical engineering: Landslide run-out prediction, debris flow, earthquake-induced liquefaction, retaining wall design, underground cave-in mechanics.
- Food processing: Cereal, rice, coffee bean handling — predicting segregation by size and density, conveyor wear, bulk storage optimisation.
- Additive manufacturing: Metal powder bed fusion (SLM, EBM) — DEM predicts powder bed density and uniformity, which determines laser energy coupling and final part porosity.
- Planetary science: Regolith mechanics on asteroids (OSIRIS-REx mission used DEM models to plan the touchdown and sample collection on Bennu), crater formation, ring dynamics in Saturn's rings.