# Ampere's law on solenoid, using a circular loop

Suppose we take a long and tightly wound solenoid with current I going in it. We can find the field inside, by ampere's law, taking a rectangular loop and assuming the magnetic field just outside the solenoid is 0.

However if we take a circular loop around the solenoid, then:

$$\int \mathbf{B}\cdot d\mathbf{r} = 0$$ as the field outside the solenoid is 0, but current passing through the loop is not 0. The current is entering at a near-90 degree angle, but it passes through the loop(as charge comes from left side, it must exit through the loop through the right side).

Since the angle at which the current goes through the loop does not matter in Ampere's law, we will still count that "I" current passes through the loop. This means that Ampere's law is not working, as current is passing through the loop, but $$\int\mathbf{B}\cdot d\mathbf{r} = 0$$.

Why isn't Ampere's law working in the above case?

You've discovered an important, real feature of coiled wire solenoids. Ampere's law is working correctly, and it shows that the magnetic field outside is indeed not zero. Instead, even for an infinite solenoid, it approximately obeys $$B_{\mathrm{out}} (2 \pi r) = \mu_0 I.$$ We don't mention this in introductory textbooks because it's a relatively small contribution. Right outside the solenoid, we will have $$B_{\mathrm{out}} = \mu_0 I / (2 \pi R)$$, but the field inside the solenoid is $$B_{\mathrm{in}} = \mu_0 n I = \frac{\mu_0 I}{d}$$ where $$d$$ is the spacing between wires. So we have $$B_{\mathrm{out}} / B_{\mathrm{in}} = d / (2 \pi R)$$ which is very small, if the solenoid is wound tightly. The more tightly you wind it, the smaller the ratio gets.

But if you're designing a real solenoid, and you need the field outside to be very precisely zero, then you'd need to account for this effect. For example, you can "counterwind" the solenoid, meaning you wind it clockwise going down the axis, and clockwise again going back up the axis. Then the current enclosed in your Amperian loop will be zero.

• "it shows that the magnetic field outside is indeed not zero. Instead, even for an infinite solenoid, it approximately obeys Bout(2πr)=μ0I." I do understand this that B outside should be there due to Ampere's law. However, I still have a doubt. First off, even in a real solenoid, provided it is long enough should have a very small field outside it. And on top of that, direction of B is nearly perpendicular to dl vector. Therefore the dot product should be pretty must negligible. B(2πR) tells us that the solenoid is acting like a straight wire, which seems a bit absurd(From Biot Savart's law) Commented Jul 20 at 16:53
• $I\frac d {2\pi R}$ is $\vec I \cdot \hat n$.
– JEB
Commented Jul 20 at 18:33
• @EagerToLearn The field outside the solenoid is like that of a straight wire going along the axis. The real wire winds around the axis while moving along the axis. The contribution from the first cancels out, and the second gives the magnetic field of a wire along the axis. Commented Jul 22 at 4:49
• Thanks for the answer. I am having some trouble understanding the direction of field too. The field lines of a solenoid seem to be perpendicular to dr vector on the loop, giving the dot product to be zero. In a real life solenoid, some field should escape through the gaps, but that will also be perpendicular to dr. By using field lines and Biot Savart's law, we are getting a different conclusion, which conflicts ampere's law. Are there any more conditions on it. Also, I would be very thankful if you share how the field lines of a "real", but "long" solenoid look like. Commented Jul 23 at 18:09
• +1. I was at first puzzled by this question, and made a long solenoid to check. The clamp ammeter reads the same current around the wires connecting the coil to the source and around the coil. As the device readings depends on the magnetic field, it is clear that Ampère's Law works:) It is misleading to say that the field is negligible. It is as strong as around a wire with the same current. Commented Jul 23 at 21:26

So, you're just doing:

$$\epsilon \rightarrow 0$$

but never getting there, and then asking:

"Hey, why is $$\epsilon \ne 0$$"

The field outside the solenoid is not zero, it is only zero if:

1. The 'noid is infinitely long

2. the screw-rate of the coils is 0

So imagine an infinite stack of a ring of disconnected super conducting rings of current.

Expensive to make, but should make it all work out.

• Yeah, it must be a infinitely long solenoid for magnetic field to be 0. But if we make it really long, like mentioned in the question, the field will be small, while current still remains same. So integral B.dr is not equal to μI. Why is the law not working? Commented Jul 18 at 16:07
• He just told you. You have a drift current along the solenoid, because those many solenoid loops are not exactly perpendicular to the solenoid. That causes the field outside the solenoid to never be zero no matter how long the solenoid is. Commented Jul 18 at 18:31
• Yeah, I understand that the field will not be exactly 0. But if the solenoid loops are nearly perpendicular (not exactly 90deg, but lets say 89.99999 deg), then the field will be very less. But the current passing through is not negligible. Commented Jul 20 at 15:07
• Also even if there was some magnetic field outside the solenoid, the field direction is along the axis, therefore B.dl is 0 as B and dl is perpendicular Commented Jul 20 at 15:11
• @EagerToLearn The current would be negligible. $I$ in Amperes law would not be the total current following through the wire, but rather the component perpendicular to the plane of the ring. Commented Jul 21 at 0:03

The previous answers explain what is happening, I will just throw in some equations for completeness. You can model your solenoid as a cylindrical sheet of current. For an idealized solenoid, the current density is purely orthoradial, but in general it will have an longitudinal component as well.

Mathematically, for current $$I$$ and $$n$$ loops per unit length: $$|j|=nI$$ and at an angle $$\alpha$$ with respect to the radial plane, in cylindrical coordinates: $$j=nI\cos\alpha e_\phi+nI\sin\alpha e_z$$ The corresponding magnetic field outside the solenoid is: $$B=\frac{\mu_0}{2\pi r}nI\sin\alpha e_\phi$$ which vanishes for fixed $$I,n$$ but shallow angle $$\alpha\to0$$. For completeness, inside it is: $$B=\frac{\mu_0}{2\pi R}nI\sin\alpha e_\phi+\mu_0 nI\cos\alpha e_z$$ with $$R$$ the radius of the solenoid. In the same limit, only the logitudinal component survives.

• $\oint \vec B\cdot \,\vec dl = \mu_0 I$. So, for any circular ring enclosing an orthogonal plane to the coil, we have from the symmetry of a long solenoid: $B_{\phi} = \frac{\mu_0 I}{2\pi R}$ in the outside at a distance R from the center. It doesn't depend on $\alpha$ or n. Commented Jul 23 at 23:49
• @ClaudioSaspinski I don’t think so. From Ampère’s law, you rather have $$\oint B\cdot dl=\mu_0I\sin\alpha$$Your formula only applies when the current is perpendicular to the plane of the coil, ie when $\alpha=\pi/2$. This is why it agrees with my formula only in this case. The OP is looking for the influence of the helicoidal current lines which I parametrize by $\alpha$, in which case your analysis needs to be corrected.
– LPZ
Commented Jul 24 at 15:27
• $\oint B\cdot dl = \mu_0 \int_S \vec j\cdot \vec n\, dS$. The result of the surface integral is always the current crossing the surface. If that surface is a transverse plane, the angle of $\vec j$ with respect to the coil axis is compensated by the bigger area of the wire being cut by that plane. (It is an elongated ellipse, not a circle). Commented Jul 24 at 16:49
• I agree with you for a single wire. However, for a solenoid, many wires cross the plane, so their density matters hence the dependence on angle. This is why I model it with a sheet of current in the continuum limit. Even by explicit computation using the formulas of my answer, you can check the angle dependence.
– LPZ
Commented Jul 24 at 17:26
• The picture in the question shows that only one wire of the coil is cut by the plane. No matter how tight is the coil, the situation doesn't change, because the plane has no thickness. Commented Jul 24 at 18:18