The motivation behind this question comes from an unsettling statement said in an electrical engineering course that if you have a ferromagnetic core with a coil looped around it in one limb with an air gap at the other limb, the two separate faces across the air gap experience a force that tries to "increase the stored energy in the magnetic field".This statement was followed by a derivation of this force in terms of the change in stored energy in the magnetic field in the air gap if one of the faces is pushed apart by a slight amount.
I have got two main problems with this idea : firstly the force experienced by a particle in a force field is in the direction of decreasing stored energy and not increasing :secondly , magnetic forces can't even do work in the first place so I don't see the motivation for seeing a link between magnetic energy and mechanical work
This made me think over what is it that happens in the relatively familiar problem of two magnets attracting each other, what forces do the work?I could probably understand the forces involved here by using: $ \vec{F} = \nabla(\vec{m}.\vec{B})$, but if i try to analyse the forces in terms of the energies I come to a complete standstill , I have trouble seeing how the electric fields are doing any work here.
I would be thankful to know if there are models to compute the force using the energies involved.Also to confirm if this actually makes sense does the stored magnetic field energy increase when the two magnets attract each other?
Here's the basic derivation I received in class:
Let there be a flux $\phi$ in the air gap , then the field is given by: $B = \frac{\phi}{A}$(assume field to be uniform)
Let there be an external force F that separates the two faces by an amount $dx$,
Then the mechanical work done = $dW_M = F.dx$
Increase in stored magnetic energy : $dW_f = \frac{B^2}{2\mu_0}.Adx$
If the system is ideal with no losses and the process is done slowly, then
$dW_M = dW_f$
$F.dx=\frac{B^2}{2\mu_0}.Adx$
$F = \frac{B^2A}{2\mu_0}$