Computational Granular Dynamics: Models and Algorithms