gradient calculation ball for ball mills