Ampère's law finds fields in one line when you can choose a path where $\vec{B}$ is constant and runs along the path (or is zero). Three shapes allow this: a long straight wire (inside and out), a long solenoid, and a toroid.
Key idea
Long solenoid with $n$ turns per meter: $B = \mu_0 nI$ inside, nearly zero outside.
Toroid of $N$ turns, inside the windings: $B = \dfrac{\mu_0 NI}{2\pi r}$.
Why it works
Solenoid: use a rectangle with one long side of length $\ell$ inside, along the axis, and the other outside. Outside the field is negligible, and on the short sides $\vec{B}$ is perpendicular to the path. Only the inside side counts: $B\ell = \mu_0(n\ell)I$.
Toroid: a circle of radius $r$ inside the doughnut links all $N$ turns: $B(2\pi r) = \mu_0 NI$. Unlike a solenoid's, the field is weaker toward the outer edge.
Fusion machines such as tokamaks and stellarators hold hot plasma in a toroid's field. Because that field is weaker toward the outside of the doughnut, a field that only runs around the ring cannot hold the plasma: the charged particles drift, and the plasma is pushed outward. So these machines give the field lines a twist, winding them into helices. Explore twisted magnetic bottles in Magnetic Bottles for Fusion in the Science Lab.
Worked examples
Worked example: Inside a thick wire
- $B(1.0\ \text{mm}) = \dfrac{\mu_0 I r}{2\pi R^2} = \dfrac{(4\pi \times 10^{-7})(10)(1.0 \times 10^{-3})}{2\pi(2.0 \times 10^{-3})^2} = 0.500\ \text{mT}$.
- At the surface, $\dfrac{\mu_0 I}{2\pi R} = 1.00\ \text{mT}$: the field grows linearly from zero at the axis to its peak at the surface, then falls as $1/r$.
Answer: $0.500\ \text{mT}$ and $1.00\ \text{mT}$
Worked example: A solenoid
- $n = 500/0.25\ \text{m} = 2000\ \text{m}^{-1}$.
- $B = \mu_0 nI = (4\pi \times 10^{-7})(2000)(2.0) = 5.03\ \text{mT}$.
Answer: $B \approx 5.03\ \text{mT}$
Worked example: A toroid
- $B = \dfrac{\mu_0 NI}{2\pi r}$: at $8.0\ \text{cm}$, $2.50\ \text{mT}$; at $12\ \text{cm}$, $1.67\ \text{mT}$.
Answer: $2.50\ \text{mT}$ to $1.67\ \text{mT}$
Common mistake