Home▸Fluid Dynamics & Aerodynamics▸SandLab 2D — Granular Flow & Angle of Repose

SandLab 2D — Granular Flow & Angle of Repose

2D granular-flow lab: sand rains from a nozzle onto a pile, builds up column by column, and slides in real angle-of-repose avalanches when the slope gets too steep.

Fluid Dynamics & Aerodynamics2DModerate60 FPS📱 Mobile-adapted⇄ 3D version
2d-sand-flow-simulator ↗ Open standalone

This 2D companion drives the same granular-flow mechanic as the 3D SandLab through a plain side-view canvas: a nozzle you can reposition rains grains that build a pile column by column, and once a column's slope exceeds the material's angle of repose the excess slides to its neighbor in a real avalanche step — the same cellular-automaton rule that models real sandpiles.

⚙ Under the hood

Grains fall under gravity onto a column-height grid; when a column's slope exceeds tan(θ) for the chosen material (fine, dry or damp sand, each with a different real angle of repose), an avalanche step redistributes the excess to its neighbor.

granular flowangle of reposesandpileavalanche

2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)