Stored Energy
Key facts
The energy stored in a magnetic field is given by:
where $V$ is the volume, $H$ the magnetic field strength, and $B$ the magnetic flux density.
In the particular case of no magnetic saturation, the energy stored becomes:
where $\mu_0$ is the magnetic permeability of free space, and $\mu_r$ the relative magnetic permeability.
<br/>
Constants
Energy stored in a magnetic field, also considering the case of no magnetic saturation
If we are to neglect the resistance of the circuit wire, then there would be no energy loss in maintaining a magnetic field. However, energy is required to establish the field, and it can then be recovered when the field is destroyed.
For a toroid, the induced voltage $e$ at any instant is:
where $N$ is the number of turns, and $\Phi$ the magnetic flux.
If the current at any instant is $i$, then the instantaneous power ($Watts$) is:
The energy ($Joules$) released from the coil in a time $dt$ is:
or, by considering (4):
The total energy stored in the coil then becomes:
In order to further define the energy stored in a magnetic field, consider a magnetic circuit of length $l$ and cross-sectional area $A$, as diagramed in Figure 1.

We know that the magnetic flux density $B$ can be defined as:
which leads to:
from which:
Taking into account equations (11) and (8), we obtain the energy stored in the magnetic circuit:
which can also be written as:
We know that if the magnetic field strength $H$ is uniform, then:
Taking into account (14), equation (13) becomes:
where $V$ ($=A l$) is the volume. Although this equation was proved for a toroid, it can in fact be demonstrated for all magnetic circuits.
For a $BH$ curve as the one diagramed in Figure 2, $\int H dB$ is the blue shaded area:

It can be noted that, if there is no magnetic saturation (i.e. the $BH$ curve is straight), then:
We also know that the magnetic field strength $H$ is related to the magnetic flux density $B$ with the equation:
or:
\calc{V*(B^2/(8*π*10^(-7)*mu_r))} "Instant calculator eq(16)"
where $\mu_0$ is the magnetic permeability of free space, and $\mu_r$ the relative magnetic permeability.
Taking into account equations (18), (16), and (15), the energy stored in this particular case becomes: