The acceleration of particles in the vicinity of comets