⛱️ Granular Materials — Sand Pile

Drop grains of sand onto a pile and watch complex collective behaviour emerge: heap formation, the characteristic angle of repose, and sudden avalanches triggered when local slope exceeds the critical angle. A cellular automaton (BTW model) governs redistribution.

🇺🇦 Українська

Info

Mode

Parameters

Statistics

Total grains0
Avalanche events0
Max height (cells)0
Angle of repose
BTW Sandpile:
If z[i] - z[i±1] > zc:
z[i] -= 1, z[i±1] += 1
(toppling cascade → avalanche)
θ = arctan(zc/grain_d)

Granular Physics

Granular materials (sand, grain, gravel) behave like solids, liquids, or gases depending on conditions — they are a distinct state of matter. The angle of repose θ is the maximum stable angle a pile can sustain before grains slide: θ depends on grain shape, surface roughness, and moisture. The Bak-Tang-Wiesenfeld (BTW) cellular automaton models how local slope relaxation cascades into large avalanches following a power-law size distribution — a signature of self-organised criticality. When the pile reaches the critical slope globally, it hovers at the edge of stability; any added grain may or may not trigger an avalanche.

About Granular Materials

Granular materials are collections of discrete macroscopic particles—sand, gravel, rice, pharmaceutical powders—that interact through contact forces (friction and normal forces) and behave in ways unlike any conventional state of matter. They can flow like liquids (avalanches, hourglasses), support stress like solids (sandcastles), and compress like gases in some geometries, yet are none of these. The physics of granular materials is inherently athermal: grains are too large for Brownian motion to matter, so the system does not explore phase space spontaneously—it stays in whatever mechanically stable configuration it reached.

Key phenomena include: the angle of repose (the maximum slope a granular pile can sustain before avalanching—typically 25–35° depending on particle shape, roughness, and moisture); pressure saturation with depth (unlike liquids where pressure increases linearly, granular pressure saturates in silos due to friction against walls—Janssen effect); size segregation under vibration (large particles migrate to the top—Brazil nut effect); and intermittent flow with arching (arch formation blocks outflow from orifices, causing clogging—a critical problem in industrial hoppers and pharmaceutical processing).

This simulator models granular dynamics using discrete element method (DEM) with Hertzian contact mechanics, friction, and restitution coefficients. You can shake a pile, pour grains through a funnel, vary friction and restitution to transition between sticky and bouncy grains, and observe angle of repose, arching, and size segregation. Applications span civil engineering (soil mechanics), pharmaceutics (powder flow in tablet presses), food processing, geophysics (landslides, volcanic deposits), and planetary science (regolith on asteroids and the Moon).

Frequently Asked Questions

Why do granular materials behave differently from liquids and solids?

Liquids and solids are in thermodynamic equilibrium—thermal fluctuations continuously explore accessible microstates. Granular particles are so large that thermal energy kT is negligibly small compared to gravitational potential energy of a single grain—the ratio is ~10⁻¹² for 1mm sand grains. Grains do not spontaneously rearrange; they remain in their mechanically stable configuration until external energy (shaking, vibration, shear) is applied. This makes granular materials history-dependent: the same material can be dense or loose, strong or weak, depending on its preparation history.

What is the angle of repose and what determines it?

The angle of repose is the steepest angle at which a granular pile is stable against avalanching, typically 25–40° for dry granular materials. It is determined primarily by interparticle friction: higher friction allows steeper slopes. Particle shape matters—angular particles have higher angles than spheres because interlocking increases effective friction. Moisture causes capillary bridges between particles, dramatically increasing cohesion. The dynamic angle of repose (angle during flow) is slightly lower than the static angle of repose (angle at rest), causing the characteristic avalanche cycle.

What is the Brazil nut effect?

The Brazil nut effect describes the puzzling observation that when a mixture of particles of different sizes is shaken vertically, large particles migrate to the top while small particles sink to the bottom. This counterintuitive result is driven by convection: shaking creates upward convective flow in the center and downward flow near the walls. Large particles ride the convective roll upward in the center but are too wide to descend the narrow wall region, accumulating at the top. Percolation also contributes: when the granular bed dilates, small particles fall into gaps below large ones.

What is the Janssen effect and why does it matter for silo design?

In a tall silo filled with granular material, pressure at the base does not increase indefinitely with fill height (as it would in a liquid) but saturates after a depth of roughly one silo diameter. This Janssen effect arises because friction with the silo walls redirects some of the weight horizontally onto the walls rather than downward. The wall-directed horizontal force multiplied by the wall friction coefficient carries an increasing fraction of the weight as depth increases, until wall friction supports nearly all additional weight. Silo designers must account for Janssen saturation to correctly calculate base and wall pressures and avoid catastrophic silo collapses.

How does the discrete element method (DEM) simulate granular materials?

DEM (developed by Cundall and Strack in 1979) represents each particle as a sphere (or other shape) and tracks its position, velocity, and orientation. At each timestep, contact detection identifies overlapping particle pairs; contact forces are computed using spring-dashpot or Hertz contact models for normal force and a friction model for tangential force (Coulomb friction). Newton's second law (F = ma) integrates position and velocity; torques drive rotation. DEM is the standard tool for industrial granular flow simulation, pharmaceutical powder processing, and geomechanical analysis of slope stability.

What does the Critical slope z_c slider control in this sandpile model?

z_c (1 to 8) is the height difference a column of the sandpile can sustain relative to its neighbours before it topples in this cellular-automaton model, adapted from the classic Bak-Tang-Wiesenfeld sandpile. Once a column's height exceeds z_c above a neighbouring column, grains are redistributed to that neighbour, which may in turn push it over its own threshold — a lower z_c makes the pile topple and avalanche more readily, producing more frequent but typically smaller cascades.

Why do avalanche sizes in this simulation follow a power law rather than clustering around one typical size?

This is the hallmark of self-organized criticality: as grains are added one at a time, the pile naturally evolves toward a critical slope where a single new grain can trigger anything from no collapse to a system-spanning avalanche. Because there is no characteristic avalanche size built into the toppling rule, the distribution of avalanche sizes follows a power law, meaning small avalanches are common and huge ones are rare but not exponentially suppressed — the same statistical signature seen in real sandpiles, earthquakes, and forest fires.

What does the Drop rate slider change, and does adding grains faster make bigger avalanches?

Drop rate (1 to 20 grains per frame) sets how many new grains are added to the pile each animation frame. It speeds up how quickly the pile fills and reaches its critical state, but it does not change the underlying power-law statistics of individual avalanches, since each toppling event is still resolved one grain-column interaction at a time according to the same z_c threshold rule.

What happens when I press Clear, and why does the pile behave differently right after?

Clear resets every column height in the grid back to zero, removing all accumulated grains. Immediately afterward the pile is far below its critical slope everywhere, so the first grains added simply accumulate without triggering any avalanches — the characteristic bursty, power-law avalanche behaviour only re-emerges once enough grains have piled up for column heights to approach the z_c threshold again.

Is this sandpile model the same thing as the physical angle-of-repose behaviour described above?

They are related but distinct: the angle of repose describes the maximum stable slope angle of a real 3D granular pile under gravity and friction, while this simulation is a simplified discrete cellular-automaton abstraction (the Bak-Tang-Wiesenfeld sandpile) where toppling is governed purely by an integer height-difference rule z_c rather than continuous physical forces. The cellular model captures the same qualitative self-organized-criticality behaviour — periodic avalanches of many sizes — without simulating the actual friction, shape, and moisture effects that determine a real pile's angle of repose.