Whittaker's History (1910), reviewed › The review's files › sim/whittaker/partC/

w7_neumann_induction.py

In the investigation at sim/whittaker/partC/w7_neumann_induction.py · last changed in commit 28bc522, 22 November 2026 · 4,034 bytes


#!/usr/bin/env python3
"""W7.1: Neumann's induction potential (1845) against the Lorentz force.

Whittaker 1910, pp. 223-225: the mutual potential of two circuits carrying
currents i, i' is  i i' Int Int (ds . ds')/r  (Neumann's formula), it equals
i times the flux of the other circuit's field through the first, and the
induced electromotive force is its time derivative. Neumann wrote the
induced e.m.f. in a moving element as -eps v C ds (Ostwald 10, section 1,
read at source).

Test [D]: two coaxial circular loops. Compute
  (a) Neumann's double integral numerically,
  (b) the closed form in elliptic integrals,
  (c) the flux of loop 1's Biot-Savart field through loop 2,
  (d) the e.m.f. in loop 2 when it moves along the axis at speed v, once as
      -i dM/dt (Neumann/Faraday) and once as the line integral of (v x B).dl
      (Lorentz force on the carriers).
Terms: a, b loop radii; d axial separation; mu_0 the vacuum permeability;
i the current in loop 1; M the mutual inductance (Neumann's potential per
unit currents); B the magnetic induction; v the speed of loop 2.

Run: OMP_NUM_THREADS=1 ~/aspden-review-venv/bin/python3 w7_neumann_induction.py
"""
import subprocess
import numpy as np
from scipy.special import ellipk, ellipe

print("git HEAD:", subprocess.run(["git", "rev-parse", "HEAD"], cwd="/home/doug/aetherscience.org",
                                  capture_output=True, text=True).stdout.strip())

mu0 = 1.25663706127e-6     # H/m, CODATA 2022 [S]
a, b, d = 0.10, 0.07, 0.05  # m
i1 = 1.0                    # A

def loop(radius, z, n):
    t = (np.arange(n) + 0.5) * 2 * np.pi / n
    pts = np.stack([radius * np.cos(t), radius * np.sin(t), np.full(n, z)], -1)
    ds = np.stack([-radius * np.sin(t), radius * np.cos(t), np.zeros(n)], -1) * (2 * np.pi / n)
    return pts, ds

def M_neumann(n=2000):
    p1, d1 = loop(a, 0.0, n)
    p2, d2 = loop(b, d, n)
    r = np.linalg.norm(p1[:, None, :] - p2[None, :, :], axis=-1)
    return mu0 / (4 * np.pi) * np.sum((d1[:, None, :] * d2[None, :, :]).sum(-1) / r)

def M_closed(dd):
    k2 = 4 * a * b / ((a + b)**2 + dd**2)
    k = np.sqrt(k2)
    return mu0 * np.sqrt(a * b) * ((2 / k - k) * ellipk(k2) - (2 / k) * ellipe(k2))

def B_biot_savart(points, n=4000):
    p1, d1 = loop(a, 0.0, n)
    B = np.zeros_like(points)
    for q in range(len(points)):
        rv = points[q] - p1
        rn = np.linalg.norm(rv, axis=-1)[:, None]
        B[q] = mu0 * i1 / (4 * np.pi) * np.sum(np.cross(d1, rv) / rn**3, axis=0)
    return B

def flux_through_loop2(dd, nr=200, nphi=200):
    rr = (np.arange(nr) + 0.5) * b / nr
    pp = (np.arange(nphi) + 0.5) * 2 * np.pi / nphi
    RR, PP = np.meshgrid(rr, pp, indexing="ij")
    pts = np.stack([RR * np.cos(PP), RR * np.sin(PP), np.full(RR.shape, dd)], -1).reshape(-1, 3)
    Bz = B_biot_savart(pts)[:, 2].reshape(RR.shape)
    return np.sum(Bz * RR * (b / nr) * (2 * np.pi / nphi))

Mn = M_neumann()
Mc = M_closed(d)
Phi = flux_through_loop2(d)
print(f"\nLoops: a = {a} m, b = {b} m, separation d = {d} m, i = {i1} A")
print(f"  Neumann double integral  M = {Mn:.6e} H")
print(f"  closed form (elliptic)   M = {Mc:.6e} H   (ratio {Mn/Mc:.6f})")
print(f"  flux of loop 1 through 2 / i = {Phi/i1:.6e} H   (ratio {Phi/i1/Mc:.6f})")
print("  Neumann's potential equals the linked flux, as Whittaker says (p. 224).")

# e.m.f. when loop 2 moves along the axis at speed v
v = 2.0   # m/s
h = 1e-4
dMdd = (M_closed(d + h) - M_closed(d - h)) / (2 * h)
emf_neumann = -i1 * dMdd * v
# Lorentz: emf = Int (v x B) . dl around loop 2 with v along +z
p2, d2 = loop(b, d, 2000)
B2 = B_biot_savart(p2)
vvec = np.array([0.0, 0.0, v])
emf_lorentz = np.sum((np.cross(vvec, B2) * d2).sum(-1))
print(f"\nLoop 2 moving away along the axis at {v} m/s:")
print(f"  e.m.f. = -i dM/dt (Neumann, Faraday's law) = {emf_neumann:.6e} V")
print(f"  e.m.f. = Int (v x B).dl (Lorentz force)    = {emf_lorentz:.6e} V   (ratio {emf_lorentz/emf_neumann:.6f})")
print("  Lenz: positive sign convention aside, the induced current opposes the motion.")