Calculations involving ion beam source