Ampere's Law: Wire, Solenoid, Toroid
When a current arrangement is symmetric enough, you never have to add up the Biot-Savart contributions: Ampere's law hands you the field for free. The closed line integral of the magnetic field around any loop equals the current it encircles, $\oint \mathbf{B}\cdot d\boldsymbol{\ell} = \mu_0 I_{\text{enc}}$. Choose a loop where $B$ is constant and parallel to it, and the integral collapses to $B$ times the loop length, so $B$ pops straight out. Around a long straight wire a circular loop gives $B = \mu_0 I / 2\pi r$, falling off as $1/r$. Inside a long solenoid a rectangular loop straddling the wall (one leg inside, one in the field-free outside) gives the uniform $B = \mu_0 n I$. Inside a toroid a circular loop encircling all $N$ turns gives $B = \mu_0 N I / 2\pi r$. Drag the Amperian loop and watch the readout confirm the circulation equals the enclosed current every time.
WHAT TO TRY
- Wire: drag the loop in and out. The circulation and the enclosed current stay equal even though $B$ falls as $1/r$, because the loop length grows as $r$ to compensate.
- Solenoid: stretch the rectangular loop. Only the inside leg sits in the field, the enclosed current is the turns it crosses ($n\ell I$), and $B = \mu_0 n I$ is uniform, independent of where you are inside.
- Toroid: move the loop between the inner and outer radius. It always encircles all $N$ turns, so $B = \mu_0 N I / 2\pi r$ falls as $1/r$ across the windings, and is zero in the hole and outside.
- Turn up the current: $B$ scales with it everywhere, and the circulation tracks the enclosed current exactly.