Magnetic separation in sand processing