Dynamic stock pile of sand/gravel

I need to create a pile of sand which can be dug by a machine (Loader). Then the material should be loaded in the machine with some effects like sand falling down as the machine digs the material pile. I’m not sure how to begin with creating such a pile. Please help me!