# The Unapologetic Mathematician

## Energy and the Magnetic Field

Last time we calculated the energy of the electric field. Now let’s repeat with the magnetic field, and let’s try to be a little more careful about it since magnetic fields can be slippery.

Let’s consider a static magnetic field $B$ generated by a collection of circuits $C_i$, each carrying a current $I_i$. Recall that Gauss’ law for magnetism tells us that $\nabla\cdot B=0$; since space is contractible, we know that its homology is trivial, and thus $B$ must be the curl of some other vector field $A$, which we call the “magnetic potential” or “vector potential”. Now we can write down the flux of the magnetic field through each circuit:

$\displaystyle\Phi_i=\int\limits_{S_i}B\cdot dS_i=\int\limits_{C_i}A\cdot dr_i$

Now Faraday’s law tells us about the electromotive force induced on the circuit:

$\displaystyle V_i=\frac{d\Phi_i}{dt}$

This electromotive force must be counterbalanced by a battery maintaining the current or else the magnetic field wouldn’t be static.

We can determine how much power the battery must expend to maintain the current; a charge $q$ moving around the circuit goes down by $qV_i$ in potential energy, which the battery must replace to send it around again. If $n$ such charges pass around in unit time, this is a work of $nqV_i$ per unit time; since $nq=I$ — the current — we find that the power expenditure is $P_i=I_iV_i$, or.

$\displaystyle P_i=I_i\frac{d\Phi_i}{dt}$

Thus if we want to ramp the currents — and the field — up from a cold start in a time $T$ it takes a total work of

$\displaystyle W=\sum\limits_{i=1}^N\int\limits_0^TI_i\frac{d\Phi_i}{dt}\,dt$

which is then the energy stored in the magnetic field.

This expression doesn’t depend on exactly how the field turns on, so let’s say the currents ramp up linearly:

$\displaystyle I_i(t)=I_i(T)\frac{t}{T}$

and since the fluxes are proportional to the currents they must also ramp up linearly:

$\displaystyle\Phi_i(t)=\Phi_i(T)\frac{t}{T}$

Plugging these in above, we find:

$\displaystyle W=\sum\limits_{i=1}^N\int\limits_0^TI_i(T)\Phi_i(T)\frac{t}{T^2}\,dt=\frac{1}{2}\sum\limits_{i=1}^NI_i(T)\Phi_i(T)$

Now we can plug in our original expression for the flux:

$\displaystyle W=\frac{1}{2}\sum\limits_{i=1}^NI_i\int\limits_{C_i}A\cdot dr_i$

This is great. But to be more general, let’s replace our currents with a current distribution:

$\displaystyle W=\frac{1}{2}\int\limits_{\mathbb{R}^3}A\cdot J\,dV$

Now we can use Ampère’s law to write

\displaystyle\begin{aligned}W&=\frac{1}{2\mu_0}\int\limits_{\mathbb{R}^3}A\cdot(\nabla\times B)\,dV\\&=\frac{1}{2\mu_0}\int\limits_{\mathbb{R}^3}B\cdot(\nabla\times A)-\nabla\cdot(A\times B)\,dV\\&=\frac{1}{2\mu_0}\int\limits_{\mathbb{R}^3}B\cdot B\,dV-\frac{1}{2\mu_0}\int\limits_{\mathbb{R}^3}\nabla\cdot(A\times B)\,dV\end{aligned}

We can pull the same sort of trick last time to make the second integral go away; use the divergence theorem to convert to

$\displaystyle\frac{1}{2\mu_0}\lim\limits_{R\to\infty}\int\limits_{S_R}(A\times B)\cdot dA$

and take the surface far enough away that the integral becomes negligible. We handwave that $A\times B$ falls off roughly as the inverse fifth power of $R$, while the area of $S_R$ only grows as the second power, and say that the term goes to zero.

So now we have a similar expression as last time for a magnetic energy density:

$\displaystyle u_B=\frac{1}{2\mu_0}\lvert B\rvert^2$

Again, we can check the units; the magnetic field has units of force per unit charge per unit velocity:

$\displaystyle\frac{\mathrm{kg}}{\mathrm{C}\cdot\mathrm{s}}$

while the magnetic constant has units of henries per meter:

$\displaystyle\frac{\mathrm{m}\cdot\mathrm{kg}}{\mathrm{C}^2}$

Putting together an inverse factor of the magnetic constant and two of the magnetic field and we get:

$\displaystyle\frac{\mathrm{C}^2}{\mathrm{m}\cdot\mathrm{kg}}\frac{\mathrm{kg}}{\mathrm{C}\cdot\mathrm{s}}\frac{\mathrm{kg}}{\mathrm{C}\cdot\mathrm{s}}=\frac{\mathrm{kg}\cdot\mathrm{m}^2}{\mathrm{m}^3\cdot\mathrm{s}^2}=\frac{\mathrm{J}}{\mathrm{m}^3}$

or, units of energy per unit volume, just like we expect for an energy density.

February 14, 2012 -

## 4 Comments »

1. […] calculating the potential energy of the magnetic field, we calculated the power needed to run a certain current around a certain circuit. Let’s look […]

Pingback by Ohm’s Law « The Unapologetic Mathematician | February 16, 2012 | Reply

2. […] On the left, we’re taking the derivative of the combined energy densities of the electric and magnetic […]

Pingback by Conservation of Electromagnetic Energy « The Unapologetic Mathematician | February 17, 2012 | Reply

3. […] contractible spaces, but we must make mention of the fact that our space is contractible! In fact, I did exactly that when I needed to get ahold of the magnetic potential […]

Pingback by A Short Rant about Electromagnetism Texts « The Unapologetic Mathematician | February 18, 2012 | Reply

4. […] Energy and the Magnetic Field (unapologetic.wordpress.com) […]

Pingback by Magnetic fields, again | cartesian product | February 26, 2012 | Reply