Unit content
Using Ampère's law for ideal solenoids and toroids
Ampère's circuital law is especially powerful when the current distribution has enough symmetry to make the magnetic-field circulation simple:
$$\oint_C\mathbf B\cdot d\boldsymbol\ell=\mu_0I_{\rm enc}.$$
Two standard examples are the ideal long solenoid and the ideal toroid.
Long ideal solenoid
A solenoid is a coil with many closely spaced turns. Let
$$n=\frac{N}{L}$$
be the number of turns per unit length, and let each turn carry current $I$.
For a solenoid that is very long compared with its diameter, symmetry and the superposition of many turns make the magnetic field approximately
- parallel to the solenoid axis and nearly uniform inside;
- very small outside, away from the ends.
Choose a rectangular Amperian loop with one side of length $\ell$ inside the solenoid, parallel to the field, and the opposite side outside where the ideal field is taken to vanish. The two short sides are perpendicular to $\mathbf B$ and contribute no circulation.
Therefore
$$\oint\mathbf B\cdot d\boldsymbol\ell\approx B\ell.$$
The loop encloses
$$n\ell$$
turns, each carrying current $I$, so
$$I_{\rm enc}=n\ell I.$$
Ampère's law gives
$$B\ell=\mu_0n\ell I,$$
hence
$$\boxed{B=\mu_0nI}$$
inside an ideal long air-core solenoid.
The field direction follows the right-hand rule: curl the fingers in the current direction around the windings and the thumb points along the interior field.
Worked solenoid example
A long solenoid has
$$n=1000,\mathrm{turns/m}$$
and carries
$$I=0.80,\mathrm A.$$
The ideal interior field is
$$B=(4\pi\times10^{-7})(1000)(0.80) \approx1.01\times10^{-3},\mathrm T.$$
Thus
$$\boxed{B\approx1.0,\mathrm{mT}}.$$
Near the ends of a finite solenoid, the field spreads outward and the ideal infinite-solenoid approximation becomes less accurate.
Ideal toroid
A toroid can be pictured as a solenoid bent into a closed ring. Suppose $N$ turns carry current $I$ around a toroidal winding.
For an ideal tightly wound toroid, symmetry makes the field tangent to circles centered on the toroid's central axis. At radius $r$ within the winding region, choose a circular Amperian loop of circumference $2\pi r$.
The field magnitude is constant along that loop and parallel to $d\boldsymbol\ell$, so
$$\oint\mathbf B\cdot d\boldsymbol\ell=B(2\pi r).$$
The loop links all $N$ turns, giving
$$I_{\rm enc}=NI.$$
Therefore
$$B(2\pi r)=\mu_0NI,$$
and
$$\boxed{B(r)=\frac{\mu_0NI}{2\pi r}}$$
within the ideal toroidal winding region.
Unlike the ideal long solenoid, the toroidal field is not spatially uniform: it is stronger on the inner side of the torus because the same circulation is distributed around a smaller circumference.
Field outside the ideal toroid
For a circular Amperian loop lying in the central hole, no winding current pierces a suitable spanning surface, so
$$I_{\rm enc}=0$$
and the ideal field there is zero.
For a loop completely outside the toroidal winding, the net current through a spanning surface is also zero: each closed turn pierces such a surface in opposite senses, so the signed contributions cancel. Thus the ideal toroid confines its field largely to the winding region.
Real toroids have leakage fields because the winding is discrete and the geometry is finite.
Choosing Ampère rather than Biot–Savart
Ampère's law works efficiently here because symmetry tells us the direction of $\mathbf B$ and where its magnitude is constant or negligible along the chosen loop.
For an arbitrary finite coil, the law remains true but usually does not isolate $B$ so simply. Biot–Savart or numerical field calculation may then be more useful.
The essential technique is the same as in electrostatic Gauss-law problems: identify source symmetry first, then choose an integration path that converts a field integral into a simple product.