Discrete element analysis of granular materials.