# Calculating on-axis elements of a solenoid

1. May 22, 2013

### eigenstaytes

I wanted to mention that this solenoid has many winds over many layers. The thickness of the windings is 2.4 inches coming off of the engineering schematics, and has many many many turns, which is unknown. It has a 6T field at the zeroth point on-axis.

I'm doing research with a professor and I'm tasked with calculating the magnetic field produced by a solenoid. I have the measured values from the solenoid from the engineering company that made it. However, I have to make a model for it, though the model isn't coming out right. I've tried 2 separate equations, and they all decay too fast to be useful for my model. These are the two equations that I used. The way that I fit these models, as the number of turns in the coil is unknown, and using the impedance wasn't producing the correct result, was by fitting the point at z = 0 to the known value of z = 0. Therefore it was starting at the right point.

$B_{z}=\frac{1}{2}\mu_{0}\frac{N}{\ell}I(\cos(\theta_{1})-\cos(\theta_{2}))$

$\theta_{1}=\tan^{-1}(\frac{r}{z}) \quad \theta_{2}=\tan^{-1}(\frac{r}{z+\ell})$​

Where theta1 and theta2 are the angle that the on-axis element makes with the left end (theta2) and the right end (theta1) of the solenoid. These can be found via simple trig equations since they make right triangles. I is the current, N is the number of turns, script L is the length of the solenoid, and mu-naught is the permeability of free space. I got this equation from this link, though the plus was changed to a negative. I found out the sign was wrong after finding a few other powerpoints with this equation, which I don't have the link to.

This produced the following plot over all the points

I tested a few of these points, and they're wrong. Off by almost a factor of 5, right where the values are most important. I got approximately 380 Gauss, but the actual value is about 1500 Gauss. The plot above is in Tesla, incase you didn't catch that, with the horizontal axis being the point along the z axis.

The next equation I tried I got from Physics for Scientists and Engineers: Standard Version, Volume 1 by Tipler and Mosca. The equation that they gave is the following

$B_{z}=\frac{1}{2}\mu_{0}r^{2}NI\int_{z_{1}}^{z_{2}}\frac{dz}{(z^{2}+r^{2})^{\frac{3}{2}}}$​

Where r is the radius of the coil, z1 and z2 are the ends of the solenoid, though I made z2 be zero and z1 just be the negative length of the solenoid to make it easier to find my positions, and the other terms still apply. However, the following is the plot that I got for that one.

This produced about 390 Gauss at the same point where it's supposed to be approximately 1500 Gauss.

Does anyone have any idea what's going on, or know of an equation to use to model the magnetic field that works? After this, I have to calculate the off-axis elements as well.

For clarification, this is what is meant by "on axis" and "off axis"

Last edited: May 22, 2013