Magnetic Energy
Strengthen the field and see the energy
The gold helix is the coil, and the brightness of the glow filling it shows the energy density. Strengthening the field inside the coil with the slider brightens the cyan flux lines, and the glow inside brightens even more steeply. The percentage on the indicator lets you check how many times the energy grows when the field doubles.
Where the energy is
Raising the current in a coil stores energy (EM-17). But where is that energy? It seems to sit on the current, yet the deeper answer is that it is held in the magnetic field the coil creates. Cut the current suddenly, and as the field collapses that energy is released all at once as a high back EMF and a spark, which is why a switch in a circuit with a coil sparks when it opens. Magnetic energy is spread throughout the space the field fills.
Energy density u=B²/2μ
The energy per unit volume at a point in space with a magnetic field is called the energy density, written u = B²/(2μ). The key point is that it is proportional to the square of the field, B². Doubling the field makes the energy density four times larger, so even a small increase in the field raises the energy steeply. It has the same shape as the electrostatic energy u = ½εE², and on the first screen the glow inside the coil brightened faster than the flux lines because of exactly this relation.
It concentrates where the field is strong
Since the energy density is proportional to B², energy crowds where the field is strong. In a long solenoid the field inside is uniform and the field outside weak, so nearly all the energy is trapped inside the coil. Note also that for the same B, the energy density inside an iron core with large permeability μ is small. That is why an inductor meant to store energy has a thin air gap in its core, where the energy collects, while the iron core does the job of gathering the flux into a narrow path and guiding it. With a map of the magnetic field, you can read at once where and how much energy is stored.
Coil energy = field energy
The two views meet here. The circuit view's coil energy U = ½LI² and the field view's energy density integrated over volume, ∫u dV, are exactly the same value. You can check this directly for a solenoid. Put B = μnI and the volume Al into u = B²/(2μ), and ½LI² comes straight out. Count the same energy by currents or by fields, and there is one answer. This view that energy lives in the field, as seen with electrostatic energy, leads on to the reason electromagnetic waves carry energy through empty space.
Back to the first screen
On the first screen, strengthening the field made the glow inside the coil brighten steeply, and doubling the field made it four times brighter. That is because the energy density follows the square of the field, u = B²/(2μ). That glow was the energy spread through space. What held the energy was not the current but the magnetic field, and the ½LI² gathered in the coil exactly equals the sum of B²/(2μ) over every bit of volume.
This completes the seven units of magnetostatics, the world of steady currents, from Biot-Savart through Ampère, the Lorentz force, inductance, and magnetic materials to magnetic energy. Until now electrostatics and magnetostatics stood apart, but once fields change in time, the two begin to intertwine. The first unit of the next block is Faraday's law (EM-20), in which a changing magnetic field makes an electric field. The view that energy lives in fields reaches its peak in the Poynting vector of electromagnetic waves (EM-24).