Magnetic potential energy