A mathematical analysis of milling mechanics in a planetary ball mill