As you know I'm working on an game and I want to implement sand displacement but I have no idea of what type of algorthm I could use, can someone give me an idea of how to do this? I have particles which are dropped on to each other but I want them to behave like solids and displace each other to form an pile up.

I mean like a sand effect Pile, which is like when you drop particles they create an pryamid like pile up like this: http://images.wisegeek.com/pile-of-sand.jpg