My friend Joss Ives got this blog post rolling with this tweet:
What I decided to do to check this out was to integrate the field for a true coiled wire. The first thing I did was figure out the parametric equation for a coil. Here’s what I came up with:
and here’s what that curve looks like:
For that picture I had u go from 0 to 16 pi or 8 round trips.
Now that I had a mathematical expression for the coil, I could go about determining the exact magnetic field for it, rather than assuming it was 8 perfect circular loops. The field is given by:
The trick to getting this to work was to figure out . I got that by calculating the directional derivative of the parametric curve, f'(u). I wasn’t, at first, convinced that f'(u) would be right, so I thought about an easier integral first, namely, the length of the parametric curve. For that, you need which is given by , also known as the length of f'(u). For the vector form of dl, I needed a normalized unit vector in the direction of dl times its length, but that’s just the same as the original vector, f'(u).
Ok, then I was off and running. I could figure out r and r’ from the coordinates, and I just need to ask Mathematica to numerically integrate all three components of the field. Here’s the code that did that:
You give bfield the location where you want to calculate the field.
To answer Joss’ question, I decided to look at the field strength on the axis, and compare it to the field for an 8-turn coil with an adjustable radius. That latter field is given by:
I’ve purposely factored the numerator to show where the length of the coil comes into play. What I did was to calculate the coil field at several points on the axis and then fit that data to the equation above. The result was:
I also show the value of R for the best fit along with the error on that. What’s interesting is how close the best value of R is to the midpoint of the coil:
However, it’s important to realize that the length of the two coils I’m comparing are not the same. The best fit length is:
while the length of the spiraled coil is given by integrating the dl mentioned above to get 56.61.
Thanks, Joss, that was fun!