Note
Go to the end to download the full example code.
Faraday’s law of induction: mutual inductance and a spinning loop#
On 29 August 1831 Michael Faraday wound two coils on an iron ring and saw a galvanometer on one kick whenever he switched the current in the other on or off. A steady current did nothing; only a changing one induced a current. In modern form the emf around a circuit is
When the flux through circuit 2 comes from a current in circuit 1, \(\Phi_2 = M I_1\). In 1845 Franz Neumann showed that the mutual inductance \(M\) depends only on the geometry,
mutual_inductance() evaluates this double
integral over polyline circuits. This example checks it against Maxwell’s
elliptic-integral formula for two coaxial loops, the dipole limit
\(\mu_0\pi a^2b^2/2d^3\), and a small loop inside a long solenoid
(\(\mu_0 n\pi a^2\)). It then spins a loop in a uniform field, the
principle of every AC generator, and switches on an RL circuit.
import matplotlib.pyplot as plt
import numpy as np
from physicskit.fields import (
MU0,
circular_loop_path,
coaxial_loops_mutual_inductance,
motional_emf,
mutual_inductance,
rl_transient,
solenoid_path,
)
Two coaxial loops: Neumann against Maxwell#
Loops of radius 10 cm and 7 cm, their planes a distance d apart. Close together M grows like a logarithm; far apart it falls as the dipole coupling 1/d^3.
a, b = 0.1, 0.07
d = np.geomspace(0.003, 2.0, 25)
loop_a = circular_loop_path(a, 400)
M_neumann = np.array([mutual_inductance(loop_a, circular_loop_path(b, 400, center=(0, 0, dk))) for dk in d])
M_maxwell = coaxial_loops_mutual_inductance(a, b, d)
M_dipole = MU0 * np.pi * a**2 * b**2 / (2 * d**3)
for dk, mn, mm in zip(d[::6], M_neumann[::6], M_maxwell[::6]):
print(f"d = {dk:7.4f} m Neumann {mn * 1e9:9.4f} nH Maxwell {mm * 1e9:9.4f} nH")
d = 0.0030 m Neumann 122.6897 nH Maxwell 122.6922 nH
d = 0.0152 m Neumann 112.5042 nH Maxwell 112.5069 nH
d = 0.0775 m Neumann 41.7693 nH Maxwell 41.7712 nH
d = 0.3936 m Neumann 1.3864 nH Maxwell 1.3865 nH
d = 2.0000 m Neumann 0.0120 nH Maxwell 0.0120 nH
A small loop inside a long solenoid#
Inside an ideal solenoid B = mu0 n I, so the flux through a coaxial loop of radius r is mu0 n I pi r^2, and M = mu0 n pi r^2.
loop in solenoid: M = 157.7011 nH, mu0 n pi r^2 = 157.9137 nH
A loop spinning in a uniform field#
A loop turning at angular velocity omega about an axis in its plane,
perpendicular to B, sees the flux B A cos(omega t), so the emf is
B A omega sin(omega t). Here it comes from the force v x B on the
charges in each moving segment, motional_emf().
B0, R, omega = 0.3, 0.2, 2 * np.pi * 50
n = 512
flat = circular_loop_path(R, n)
area = 0.5 * n * R**2 * np.sin(2 * np.pi / n) # area of the 512-gon
t = np.linspace(0.0, 0.04, 161)
emf = np.empty_like(t)
for k, tk in enumerate(t):
th = omega * tk
rot = np.array([[1, 0, 0], [0, np.cos(th), -np.sin(th)], [0, np.sin(th), np.cos(th)]])
path = flat @ rot.T
emf[k] = motional_emf(path, np.cross([omega, 0.0, 0.0], path), [0.0, 0.0, B0])
emf_exact = B0 * area * omega * np.sin(omega * t)
Self-induction: switching on an RL circuit#
The back emf -L di/dt keeps the current from jumping. It rises as (V/R)(1 - exp(-t R/L)).
V, Rr, L = 12.0, 4.0, 0.2
tau = L / Rr
t_rl = np.linspace(0, 5 * tau, 400)
i_rl = rl_transient(V, Rr, L, t_rl)
fig, axes = plt.subplots(1, 3, figsize=(14, 4))
axes[0].loglog(d, M_maxwell * 1e9, "k-", label="Maxwell (elliptic integrals)")
axes[0].loglog(d, M_neumann * 1e9, "o", ms=4, label="Neumann (numerical)")
axes[0].loglog(d, M_dipole * 1e9, "--", label=r"$\mu_0\pi a^2b^2/2d^3$")
axes[0].set_xlabel("separation d (m)")
axes[0].set_ylabel("M (nH)")
axes[0].set_title("coaxial loops, a = 10 cm, b = 7 cm")
axes[0].legend()
axes[1].plot(t * 1e3, emf, label="motional emf")
axes[1].plot(t * 1e3, emf_exact, "k--", label=r"$BA\omega\sin\omega t$")
axes[1].set_xlabel("t (ms)")
axes[1].set_ylabel("emf (V)")
axes[1].set_title("loop spinning at 50 Hz in 0.3 T")
axes[1].legend()
axes[2].plot(t_rl / tau, i_rl)
axes[2].axhline(V / Rr, color="k", ls="--", lw=0.8)
axes[2].set_xlabel(r"t / $\tau$")
axes[2].set_ylabel("i (A)")
axes[2].set_title("RL circuit switched on")
fig.tight_layout()
plt.show()

Check#
Neumann’s integral matches Maxwell’s closed form at every separation and the dipole limit far away; the loop in the solenoid gives mu0 n pi r^2; the spinning loop gives B A omega sin(omega t); the RL current reaches 1 - 1/e of V/R after one time constant.
Total running time of the script: (0 minutes 0.255 seconds)