# fraction of magnetic energy stored outside a solenoid

If I have a long solenoid, e.g. length $l$ and radius $r$ with $l = kr$, where k >> 1, with a nonpermeable (e.g. air) core, how much of the magnetic energy is stored outside as compared to inside?

If I go by the Wikipedia article on solenoids, $B = \frac{\mu Ni}{l} \to H = \frac{Ni}{l}$ inside the coil, so the energy density should be $\frac{1}{2}\mu H^2$, and therefore the total energy inside the coil is $\frac{\mu N^2i^2}{2l^2}l\pi r^2 = \frac{\mu N^2 i^2}{2l}\pi r^2$.

The inductance is supposed to be $L = \frac{\mu N^2 A}{l} = \frac{\mu N^2 \pi r^2}{l}$, and if you compute energy $\frac{1}{2} Li^2$ you get $\frac{\mu N^2 i^2 \pi r^2}{2l}$ which is the same answer as the energy inside the coil calculated above, which relies on approximations, so we can't subtract these and figure out the energy stored outside.

Are there practical rules of thumb?

-

Let $r,L$ be the radius and length, and let $K$ be the surface current density -- i.e., $K=(N/L)I$ where $N$ is the number of turns. The standard, approximate formula for the energy stored is $$U_0 = {1\over 2}\mu_0K^2\pi r^2L.$$ Let $U_{\rm in},U_{\rm out}$ be the exact expressions for the energy stored inside and outside the solenoid: $$U_{\rm in}={1\over 2\mu_0}\int_{\rm interior} B^2 d\tau,$$ where $d\tau$ is a volume element, and the integral is taken over the inside of the solenoid, and similarly for $U_{\rm out}$.

I claim that, for $L\gg r$, difference between $U_{\rm in}$ and $U_0$ is approximately $$U_{\rm in}-U_0\approx -c_1U_0{r\over L}.$$ where $c_1$ is some constant of order 1. Here's why. For large values of $L/r$, the magnetic field inside the solenoid will be almost exactly equal to the value you get for an infinite solenoid (i.e., $B=\mu_0K$). The deviations will occur only near the ends, in a region of order $r$. The field in this region near the end cap will not depend on $L$ -- near one end, the solenoid "looks" semi-infinite. So that energy difference should depend on $r$ but not $L$. Moreover, it must be proportional to $\mu_0K^2$. On dimensional grounds, then, it's got to be of the form $\mu_0K^2r^3$ times some dimensionless constant. That's equivalent to the form I have above.

Oh, and the field gets weaker near the ends of the solenoid -- that's why I put in that minus sign.

The same sort of argument applies to the energy outside the solenoid. The energy stored outside the solenoid is $$U_{\rm out}\approx c_2U_0{r\over L},$$ where $c_2$ is some dimensionless constant of order 1.

The fraction of the total energy stored inside the solenoid $${U_{\rm in}\over U_{\rm in}+U_{\rm out}}={1-c_1(r/L)\over 1+(c_2-c_1)(r/L)}\approx 1-c_2(r/L)$$ (the approximation being the leading term in an expansion in $r/L$ as usual). That's the fraction of the actual total energy. The fraction of the nominal total energy is $${U_{\rm in}\over U_0}=1-c_1(r/L).$$ Either way, the rfaction approaches 1 for large $L$.

Now all that's left is to find $c_1$ and $c_2$. This is messy. The magnetic field of a finite solenoid can be written out exactly in terms of elliptic integrals. Just square them and do the appropriate volume integrals, and you have it.

Actually, the easiest thing to work out from these formulas is the total energy in all space, $U_{\rm in}+U_{\rm out}$. The reason is that this one can be computed from the vector potential, by integrating ${\bf J}\cdot{\bf A}$, rather than from the field. It turns out that $$U_{\rm in}+U_{\rm out}=U_0\frac{\sqrt{\lambda ^2+4} \left(\lambda ^2 K\left(\frac{4}{\lambda ^2+4}\right)-\left(\lambda ^2-4\right) E\left(\frac{4}{\lambda ^2+4}\right)\right)-8}{3 \pi \lambda }$$ where $\lambda=L/r$. Taylor expanding in $1/\lambda$, we get $$U_{\rm in}+U_{\rm out} \approx U_0\left(1-{8\over 3\pi}{r\over L}\right)$$ for large $L$. In other words, $$c_2-c_1=-{8\over 3\pi}=-0.8488.$$ To get the $c$'s individually, the best thing I could find to do was to numerically integrate $B^2$ in the interior of the cylinder. This results in $c_1\approx 1.50$, which means $c_2\approx 0.65$.

-
I think you mean $U_\text{out} \approx c_2 U_0 r/L$. –  Edgar Bonet Jul 26 '11 at 9:26
Nice argument... I've been trying to work through the integrals in Mathematica for the past few hours but they're proving resistant to solution. (In particular I haven't been able to verify the expression given in the Wikipedia article for $\mathbf{A}$) –  David Z Jul 26 '11 at 9:34
Because self inductance, usually abreviated with a L, lures beyond solenoids, I'd not use L for length. Normally lower case letters are used for lengths, is this "law", and who decides on such conventions in physics? –  Georg Jul 26 '11 at 9:58
@Edgar Bonet -- Indeed I do. I'll fix it. Thanks! –  Ted Bunn Jul 26 '11 at 13:24
@David Zaslavsky -- I think I've confirmed, to my own satisfaction, the Wikipedia formula for A. I couldn't convince Mathematica to derive it by doing the various integrals, but I plugged the formula in and verified that $\nabla^2{\bf A}=0$ everywhere away from $\rho=a$ (as you'd expect, since $\nabla^2{\bf A}\propto{\bf J}$ in Coulomb gauge). I also spot-checked, for various choices of $(L,z)$, that ${\bf A}$ has a discontinuity in slope at $\rho=a$ that is the same magnitude for all $|z|<L/2$ and has a continuous slope for other $z$ (as you'd expect for a uniform current density). –  Ted Bunn Jul 26 '11 at 17:28

I don't think Vladimir Kalitvianski's answer is correct, but his approach of considering equivalent magnetic charges is certainly worth exploring.

The field created by the soleniod outside itself is equivalent to that created by a uniformly magnetized bar magnet. In terms of magnetic charges (i.e. magnetic poles), we have two uniformly charged discs of radius $r$ with charge density $\sigma = \pm Ni/l$. When $l \gg r$, I would neglect the interaction between the discs. Along the axis, the field created by a single disc is $\sigma/2$ near its surface, and $\sigma r^2/4d^2$ at a distance $d \gg r$. These two limits are the same as for a sphere of radius $r' = r/\sqrt{2}$ and surface charge density $\sigma' = \sigma/2$. Thus, I argue that the fields and the field energies should be of the same order of magnitude. Integrating $\mu_0 H^2/2$ for such a sphere gives $$U_\text{sphere} = \mu_0 \frac{\pi}{4\sqrt{2}} \sigma^2 r^3$$ Then, for the solenoid, to within a factor of order unity, $$U_\text{ext} \approx \mu_0 \left( \frac{Ni}{l} \right)^2 r^3$$

-
P.S.: I wrote this answer because I thought Ted Bunn's answer was wrong. Actually his answer is correct, only his first version had a typo in the equation for $U_\text{out}$. Now that his answer is more complete, by comparing my expression to his numerical results, I can tell that my “factor of order unity” is actually $c_2\pi/2 \approx 1.02$. –  Edgar Bonet Jul 27 '11 at 8:26
I think that's closest to one I've ever seen a "factor of order one" be. –  BebopButUnsteady Jul 27 '11 at 18:31

To get the answer as exactly as possible, think of the solenoid as a collection of current loops. For a single current loop with current $dI$, radius $R$ centered in cylindrical coordinates, the magnetic field at the point $(z,r,\theta)$ can be written in terms of elliptical integrals. (For example, see: http://www.netdenizen.com/emagnet/offaxis/iloopoffaxis.htm )

From this, for any particular $L$ and $r$, one can compute the total magnetic field by integrating over $dI$ and then compute the energy in various regions by numerical integration.

-

Magnetic field outside a long solenoid looks like a dipole electric field - two "magnetic" charges at a distance. The energy of such a field is the potential energy of interaction of two magnetic charges at this distance. Presently I am not ready to supply more information.

-
I didn't downvote, but most of the field energy outside the solenoid is still going to be very near the solenoid, so I'm not sure how a dipole field would help, as it's an approximation valid at large distances. –  Jason S Jul 25 '11 at 21:05
@Jason S: Wrong. The field outside the solenoid is a dipole field. The distances should be larger than the solenoid diameter but not so much. –  Vladimir Kalitvianski Jul 25 '11 at 21:41
I didn't downvote either, but I don't think your answer is correct: The interaction energy between the magnetic charges goes to zero when $L \to \infty$, while the energy of the field does not, because there is always some finite field coming out from the ends of the solenoid. –  Edgar Bonet Jul 26 '11 at 8:17
@Edgar Bonet: Wrong. When L→∞ the field inside decreases too due to increasing volume (at a given voltage V). It is equivalent to decreasing magnetic charges and their fields. –  Vladimir Kalitvianski Jul 26 '11 at 9:10
@Vladimir Kalitvianski: I am considering the limit where $L \to \infty$ while keeping $Ni/l$ constant. –  Edgar Bonet Jul 26 '11 at 9:17