One method of calculating the force produced by a magnetic field involves an understanding of the way in which the energy represented by the field changes. To derive an expression for the field energy we'll look at the behaviour of the field within a simple toroidal inductor. We equate the field energy to the electrical energy needed to establish the coil current.
When the coil current increases so does the magnetic field strength, H. That, in turn, leads to an increase in magnetic flux, greek letter phi. The increase in flux induces a voltage in the coil. It's the power needed to push the current into the coil against this voltage which we now calculate.
Ideal toroid inductor We choose a toroid because over its cross-sectional area, A, the flux density should be approximately uniform (particularly if the core radius is large compared with it's cross section). We let the flux path length around the core be equal to Lf and the cross-sectional area be equal to Ax. We assume that the core is initially unmagnetized and that the electrical energy (W) supplied to the coil will all be converted to magnetic field energy in the core (we ignore eddy currents).