Magnetic field
This is a historic model.
Oersted observed that a magnetic field wraps around an electric current using the right-hand rule.
A magnet has two poles. Ampere stuck a bar magnet to a rotatable platform around an electric current and observed that there is no torque on the platform.
Therefore magnetic force on the poles $F\propto 1/r$. This means that the work done $W=2\pi r F$ to move a pole around the wire does not depend on $r$.
Define the pole strength $$ \begin{align*} p = \frac{W}{I} \end{align*} $$ where $W$ is the work done to move the pole around a current $I$. Then $$ \begin{align*} F = \frac{pI}{2\pi r} \end{align*} $$
Define the magnetic field $$ \begin{align*} \v H = \frac{\v F}{p} \end{align*} $$ and magnetic flux density $$ \begin{align*} \v B = \mu_0 \v H. \end{align*} $$
Due to a current, $$ \begin{align*} \v B = \frac{\mu_0 I}{2\pi r}. \end{align*} $$
Ampere argued that no work can be extracted by moving a magnet around a wire, so all trajectories should give the same loop integral of $\v H$: $$ \begin{align*} \oint_C \v B\cdot d\v r = \mu_0 I = \mu_0\int_S \v J\cdot d\v A \iff \nabla\times\v B = \mu_0 \v J. \end{align*} $$
With a time-varying electric field, we have to consider charge conservation: we have the continuity equation $$ \begin{align*} \int_{\partial V} \v J\cdot d\v A &= -\dd{t}\int_{V} \rho\, dV &&\iff & \nabla\cdot \v J &= -\dot\rho = -\epsilon_0\nabla\cdot\dv E \end{align*} $$ or physically, if current cannot continue, charges build up as $J = \dot\sigma$. This leads to an increasing electric field $J = \epsilon_0 \dot E$ (displacement current density).
We should have $$ \begin{align*} \nabla\times\v B = \mu_0\left(\v J + \epsilon_0 \dfd{\v E}{t}\right). \end{align*} $$
Taking a current element $I\, d\v l$ as the origin, it causes a magnetic field at $\v r$ $$ \begin{align*} d\v B = \frac{\mu_0 I\,d\v l\times \vhat r}{4\pi r^2}. \end{align*} $$
We observe that magnetic field is produced by currents, never by isolated magnetic poles. Therefore $$ \begin{align*} \int_S \v B\cdot d\v A = 0 \iff \nabla\cdot\v B = 0. \end{align*} $$
The magnetic field at distance $z$ along the axis from the centre of a current loop with radius $a$ and current $I$ is $$ \begin{align*} B(z) = \frac{\mu_0 I a^2}{2(a^2+z^2)^{3/2}}. \end{align*} $$ (Derivation)
-
Helmholtz coils: to create almost uniform magnetic field, put two current loops with radius $R$ and the same current direction at a distance $R$ apart.
-
Maxwell coils: to createagnetic field with almost constant gradient, put two current loops with radius $R$ and the opposite current direction at a distance $\sqrt{3}R$ apart.
A solenoid is a thin wire coiled around a cylindrical tube of radius $R$. An ideal solenoid is infinitely long and tightly wound, having cylindrical symmetry and purely azimuthal current.
It produces a magnetic field of $$ \begin{align*} \v B ={}& \begin{cases} \v 0, &r>R, \\ μ_0 IN, &r<R \end{cases} \end{align*} $$ where $N$ is the number of turns per unit length and $I$ is the current.
At the end of a long solenoid, field is halved: consider joining two ends together.