Three‐dimensional discrete element method for granular materials