Magnetic field of elliptical coil (at all points in space)

1. Jul 22, 2010

JSand

1. The problem statement, all variables and given/known data

What I actually need to find is the magnetic field at any point in space for an elliptical solenoid. I think the way to do this would be to find the magnetic field caused by an elliptical current loop, and then to use some kind of summation for multiple loops to get the field caused by a solenoid. If there's a better way and someone can point me in that direction, I would appreciate it. However, based on that I'm working on the magnetic field of the elliptical loop and could use some help verifying if my work is correct. I have access to MATLAB and will use that as necessary, but I need to set up the application of Biot-Savart to plug in to MATLAB.

2. Relevant equations

Biot-Savart Law: $$\bf{\vec{B}} = \int{\frac{{\mu _0 }}{{4\pi }}\frac{{Id\vec{\ell} \times {\bf{\vec{r}}}}}{{|\bf{\vec{r}}|^3 }}}$$

3. The attempt at a solution

The first thing I worked on is getting the vector $$\vec{r}$$ from the wire element to the point being evaluated. The arbitrary point being evaluated is $$(x_0,y_0,z_0)$$.

For a coil parallel to the x-y plane:

$$R(\theta)=\frac{a \cdot b}{\sqrt{b^2\cos^2(\theta)+a^2\sin^2(\theta)}}$$
Where a is the major axis radius and b is the semi-major axis radius.

$$x=R(\theta) \cdot \sin(\theta)$$
$$y=R(\theta) \cdot \cos(\theta)$$
$$z=z$$

The vector is $$\vec{r}=(x_0-x)\hat{i}+(y_0-y)\hat{j}+(z_0-z)\hat{k}=(x_0-R(\theta) \cdot \sin(\theta))\hat{i}+(y_0-R(\theta) \cdot \cos(\theta))\hat{j}+(z_0-z)\hat{k}$$

I'm not sure about the $$d\vec{\ell}$$ term. Would it be $$d\vec{\ell}=\frac{-a\sin(\theta)\hat{i}+b\cos(\theta)\hat{j}}{\sqrt{a^2\sin^2(\theta)+b^2\cos^2(\theta)}}$$?

These terms would then just be plugged into the Biot-Savart Law equation and the integral would be evaluated from the lower bound of 0 to to the upper bound which would be the circumference of the ellipse.

Does this look correct?

Thanks

Last edited: Jul 22, 2010
2. Jul 26, 2010

marcusl

The first part looks right but I'm not sure about $$d\vec{l}$$. I once worked out its magnitude and got

$$\left|\frac{dl}{d\theta}\right|=ab\sqrt{\frac{b^4cos^2\theta+a^4sin^2\theta}{(b^2cos^2\theta+a^2sin^2\theta)^3}}$$

This result was not checked, however.

Be careful with the integral. The integral is not over radius from 0 to r; it's over theta, evaluated from 0 to 2*pi.

Exact results can be obtained from the field equations in elliptic cylinder coordinates, using Mathieu functions, if you want to knock yourself out!
Petropoulos, et al, Meas. Sci. Technol, vol. 4, p.349 (1993).

Last edited: Jul 27, 2010
3. Jul 28, 2010

JSand

Thanks, I'll look into that.

I set up what I have in a MATLAB script and it's turning out kind of weird. I'm pretty sure the issues are coming from an error with the $$d\vec{\ell}$$ term.

I modified my script to plot the unit tangent vector $$d\hat{\ell}=\frac{-a\sin(\theta)\hat{i}+b\cos(\theta)\hat{j}}{\sqrt{a ^2\sin^2(\theta)+b^2\cos^2(\theta)}}$$ at various values of $$\theta$$ and found that the vectors aren't tangent like they should be. That expression is directly from http://mathworld.wolfram.com/Ellipse.html so I have no idea why that's not working.

4. Jul 29, 2010

marcusl

Ah, I see your problem. You mis-interpreted Wolfram's parameter t as theta, which it isn't. There is a conformal mapping that takes a circle to an ellipse, and t is the polar angle on the circle that corresponds to a given theta on the ellipse. Your expression for dl will be correct (though not immediately useful) if you replace theta with t. Then substitute

$$t=tan^{-1}\left(\frac{a}{b} tan \theta\right)$$

and try plotting again, all should be well. Its magnitude should also match my expression above.

If the circle to ellipse conformal map interests you, a thorough treatment is in
Smythe, Static and Dynamic Electricity, ch. 4.

Last edited: Jul 29, 2010
5. Aug 1, 2010

JSand

Thanks, using that term for conformal mapping fixed the issue for the unit tangent vector.

I'd like to try and confirm what you have for the magnitude of dl for myself. I'm not really sure how to go about that. Could you point me in the right direction as to how I would go about solving for that?

Thanks.

6. Aug 2, 2010

marcusl

Sure. Calculate $$\frac{d\vec{l}}{d\theta}$$ from your expression, then take the magnitude. But if your graph is showing the correct tangent at every point on the ellipse, then you probably have it right.

I worked out $$d\vec{l}$$ for you anyway. If u, v are elliptic cylinder coordinates, where u is the size of the ellipse and v is elliptic angle of the complementary hyperbolae, then the unit vector tangent to the ellipse is

$$\hat{v}=\frac{1}{h_v}\frac{\partial\hat{r}}{\partial v}$$

where
$$h_v=f\sqrt{\sinh^2 u+\sin^2 v}$$
is the elliptic coordinate metric, and
$$f=\sqrt{a^2-b^2}$$
is the focus. The radial unit vector is

$$\hat{r}=\hat{x}f\cosh u\cos v+\hat{y}f\sinh u\sin v$$

You can find these in any book that treats coordinates (e.g., Morse and Feshbach's Methods of Theoret. Phys., or Arfken's Math Methods for Physicists).

Evaluate the derivative, substitute a=f cosh u and b = f sinh u, and convert to polar coordinates, and you have

$$d\vec{l}=\frac{ds}{d\theta}\ d\theta\ \hat{v}=ab\ \frac{-\hat{x}a^2\sin\theta+\hat{y}b^2\cos\theta}{(b^2\cos^2\theta+a^2\sin^2\theta)^{3/2}}\ d\theta$$

The magnitude matches my earlier expression. See if it looks anything like what you got...

Last edited: Aug 2, 2010