Simulating falling sand is no diffrerent from any other cellular automata
.
It has a big grid of cells and a set of rules that get applied to each cell every frame.
sand-simulator
has an automatic installer.
Copy the line bellow to your console and execute it.
It will automatically download the repo, create the necessary folders.
bash -c "$(curl -fsSL https://raw.github.com/jeekpark/sand-simulator/main/install.sh)"