Mathematical Modeling in Mechanics of Granular Materials