# Equation of magnetic field produced by a solenoid

1. Oct 12, 2016

### kregg34

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

For a lab we need the equation of the magnetic field strength produced by a solenoid a distance r away from it (outside of it). I tried looking online and couldn't find one that didn't involve a bunch of cross products or similar. Wonder if anyone knows the formula? I know its of the form B(r) = (1/r^3)((some stuff*unit vector in r direction) + (some stuff*unit vector in θ direction)). The experiment only looked at the field strength in the xy-plane (or in polar the rθ-plane) so I do not need the third unit vector in the B(r) equation.
My professor said we can find it online but no luck.
2. Relevant equations

3. The attempt at a solution

2. Oct 12, 2016

Google "magnetic dipole". There will be a constant scaling factor that is determined by the geometry of the solenoid including the number of turns, the radius, and the current.

3. Oct 12, 2016

### kregg34

Ok I found two equations for the two components, (y is perpendicular to coil, z is parallel)
B(in y) =(|μ|/r^3)*(3cos(θ)-1)
B(in z) =(3|μ|/r^3)*(sin(θ)cos(θ))
but what is μ and how do I calculate it?

4. Oct 12, 2016

Magnetic moment $\mu=N \, I \, A/c$ in c.g.s. units where $A$ is the cross-sectional area of the solenoid.. I'll need to look it up to see what the constants are in M.K.S. units. Incidentally, the magnetic dipole formula only works well for medium distances or larger. At close range the magnetic field of a solenoid obeys other formulas. e.g. the magnetic field inside a long solenoid is nearly uniform and is given by $B=\mu_o n \, I$ where $n=N/L$ and points in the z direction (in the direction of the axis of the solenoid). Also, in general, the magnetic field inside a solenoid is usually of much more interest than the magnetic field outside of a solenoid at a large distance from it. If your distance $r$ meanwhile is measured from one opening of the solenoid and is not large compared to the length of the solenoid, you will see an inverse square law for the fall-off of the magnetic field strength with distance i.e. especially on axis as you move away from the exit aperture. Could you please supply some additional info of the geometry of the problem? It could be quite relevant=what was the length $L$ of the solenoid, what was the radius "a" of the solenoid , and what range did your distance $r$ cover and where was it measured from? Also, how many turns $N$ did the solenoid have and what was the current $I$ ? editing... I would try googling magnetic dipole one more time. Wikipedia does a good job (M.K.S.) and defines $m=NIS$ ($m$ instead of $\mu$, with $S$ in place of $A$), and their formulas for $B$ have a $\mu_o/(4 \pi)$ multiplying expressions similar to what you presented. Also your formulas are incorrect. It should read $B_z=m(\mu_o/(4 \pi))(3 cos^2(\theta)-1)/|r|^3$ and $B_y=m(\mu_o/(4 \pi))3 sin(\theta)cos(\theta)/|r|^3$. If your distance $r$ was measured from the center of the solenoid and was a good deal larger than the length of the solenoid, these formulas should be reasonably good.

Last edited: Oct 12, 2016
5. Oct 13, 2016

Note in the above that $\theta$ is measured from the z-axis. Hopefully the formulas are in good agreement with your data. Additional note is the professor may be trying to get you acquainted with microscopic(atomic-size) magnetic dipoles, and this is an experiment with a macroscopic one.

6. Oct 15, 2016

### rude man

Computing off-axis magnetic fields of solenoids outside the solenoid is prohibitively difficult, so I assume you're looking for the on-axis B field outside the solenoid.

A standard way is to use Biot-Savart; you can either sum the contributions of each winding to the observation point or, more elegantly, you can approximate by assuming an arbitrarily large number of windings N of arbitrarily small current Δi such that N Δi = no. of turns x current of the solenoid. The latter approach works better the more number of (equally spaced) turns of the solenoid per unit length.

7. Oct 15, 2016

It appears the instructor doesn't expect them to do an exact calculation, but wants them to use the magnetic dipole formulation which assumes the field from the solenoid can be approximated by one plus magnetic pole at the center of one exit aperture and a minus magnetic pole at the center of the other. With the proper geometry at a large enough distance from the solenoid, this can be a good approximation. It's not exact, but that's apparently what their instructor is looking for. It would be interesting to hear from the OP again to give us additional feedback.

8. Oct 15, 2016

### rude man

OK. How do you visualize how the solenoid is oriented? Axis = x axis, solenoid running from -L/2 to +L/2? Or is L infinite and the distance vector is in the y-z plane?

9. Oct 15, 2016

Solenoid is oriented along the z-axis. $\theta$ is measured from the z-axis. $L$ is finite, and the shorter, the better. $\\$ Additional note: The computation of the field is exact outside the solenoid if one assumes a plus pole evenly distributed across one aperture and a minus pole evenly distributed across the other aperture with the inverse square law. In any case, the dipole formulas are approximations that are reasonably good. They assume the poles are centered at the center of the aperture and that $r>>L/2$. Under these conditions, the dipole formulas are readily derived.

Last edited: Oct 15, 2016
10. Oct 15, 2016

### rude man

OK. Not really intro physics IMO.

11. Oct 15, 2016

It looks like a rather interesting laboratory experiment, but the professor should provide the necessary equations and not expect them to google something that is this advanced. Most would probably have little luck in finding it. They would have no idea what to google.

12. Oct 15, 2016

### rude man

Yeah, and I find the idea of using the mag moment dubious. A winding far away counts just as much as a winding close-by, which I guess is why you said 'the shorter the better" in regard to solenoid length.

13. Oct 15, 2016