How do I find the potential energy lost by a ball bearing moving away from a magnet? I am carrying out a physics project over the next few weeks and am looking at the Gaussian gun. I'm sure most are familiar with it, but if not it is the experiment where you roll a ball bearing into some magnets and the ball bearing on the other side fires out much faster.
I am looking at different variables and how it effects the speed of the fired ball as soon as it leaves the magnet, but to find this I am looking at the speed further away, using a light gate, and then using energy transfers to find the initial speed of the ball.
My dilemma is I dont know how to find the potential energy gained as the ball bearing moves away from the magnet as all the equations I find all use current, but the magnet isn't an electromagnet. I do have access to a hall probe to find the magnetic field strength at various different points but I'm not sure how to convert this to potential energy. So I am asking if there is an equation to link magnetic field strength to magnetic potential energy of a magnet, not an electromagnet, and if so what is it?
Any help would be greatly appreciated.
 A: A magnetic dipole with moment $\vec \mu$ has an interaction energy with the field
$$
U = -\vec\mu\cdot\vec B
$$
That is, a constant-magnitude magnetic moment can release energy by rotating to align with with the field direction.  An already-aligned magnetic moment can release energy by moving from a weak-field region to a strong-field region.  A strongly-polarizable material like iron can also release energy by letting its moment $\vec\mu$ evolve to be more strongly parallel to $\vec B$.
In the setup shown in your video, each stage of the gun is
(B)  [M](B)(B)
     to
  (B)[M](B)          (B)

That is, the incident bearing on the left is allowed to reach the strong-field region closest to the permanent magnet. The ejected bearing on the right leaves the weak-field region which is further from the magnet.  So even in the approximation that your ball bearings have constant moment $\vec\mu$, the gun is transferring momentum from strong-field regions to weak-field regions.
Your steel ball bearings have varying $\vec\mu$, which is roughly proportional to $\vec B$ but has some amount of hysteresis, and which also rotates as the bearing rolls.
You’re going to have a complicated time reconstructing the initial energy from the final energy.
