TExcelTAD

Magnetic Forces and Torques

Every motor, loudspeaker, relay, Hall sensor and old cathode-ray tube exploits one law: a magnetic field pushes sideways on moving charge. Engineers meet it at three scales. A single charge curves in a field (electron beams, mass spectrometers, the Hall effect); a wire carrying current feels a force per metre (motors, busbars pulling together during a short circuit); a current loop feels a torque (motors, meters, compass needles). This lesson writes all three from the Lorentz force and computes them in code. The school treatment is in Force on a Current, Force on a Moving Charge and The Electric Motor.

The Lorentz force

F=q(E+v×B)\mathbf{F} = q(\mathbf{E} + \mathbf{v} \times \mathbf{B})

The magnetic part is perpendicular to the velocity, so it changes the direction of motion but never the speed: a static magnetic field does no work on a free charge. In a uniform B\mathbf{B} a charge moving perpendicular to it travels in a circle:

mv2r=∣q∣vB⇒r=mv∣q∣B,fc=∣q∣B2πm\frac{mv^2}{r} = |q|vB \quad\Rightarrow\quad r = \frac{mv}{|q|B}, \qquad f_c = \frac{|q|B}{2\pi m}

The cyclotron frequency fcf_c does not depend on the speed: 28.0 MHz28.0\ \text{MHz} per millitesla for electrons. A velocity component along B\mathbf{B} is unaffected, so the general path is a helix.

The Hall effect. Current II flows along a strip of thickness tt in a field BB perpendicular to it. The carriers are pushed to one side until the transverse electric field they build balances the magnetic force: qEH=qvdBqE_H = qv_dB. With J=nqvdJ = nqv_d this gives the Hall voltage

VH=IBnqtV_H = \frac{IB}{nqt}

Its sign tells the sign of the carriers, which is how holes in p-type silicon were confirmed. Because VH∝1/nV_H \propto 1/n, metals give microvolts and lightly doped semiconductors give tens to hundreds of millivolts, which is why Hall sensors are semiconductor devices (Position, Light and Hall Sensors).

Force on a current

Summing qv×Bq\mathbf{v} \times \mathbf{B} over the carriers in a wire element gives

dF=I dl×B,F=IL×B  (straight wire, uniform B),F=BILsin⁡θd\mathbf{F} = I\,d\mathbf{l} \times \mathbf{B}, \qquad \mathbf{F} = I\mathbf{L} \times \mathbf{B} \ \ (\text{straight wire, uniform } \mathbf{B}), \qquad F = BIL\sin\theta

Two parallel wires a distance dd apart: wire 1 makes B=μ0I1/(2πd)B = \mu_0 I_1/(2\pi d) at wire 2, so

Fℓ=μ0I1I22πd\frac{F}{\ell} = \frac{\mu_0 I_1 I_2}{2\pi d}

attractive for currents in the same direction, repulsive for opposite currents. Until 2019 this defined the ampere (2×10−7 N/m2 \times 10^{-7}\ \text{N/m} for 1 A1\ \text{A} at 1 m1\ \text{m}). It matters in power hardware: the forces grow with I2I^2, so a short-circuit current of tens of kiloamperes can bend busbars, which switchgear is designed and tested to withstand (calculation only in this course).

Torque on a loop

NS B m theta FF side view: current out (dot), back in (cross)

In a uniform field the forces on opposite sides of a closed loop cancel (∮I dl×B=I(∮dl)×B=0\oint I\,d\mathbf{l} \times \mathbf{B} = I(\oint d\mathbf{l}) \times \mathbf{B} = 0), but they act along different lines and form a couple. For a flat coil of NN turns and area SS:

T=m×B,m=NIS n^,T=mBsin⁡θ\mathbf{T} = \mathbf{m} \times \mathbf{B}, \qquad \mathbf{m} = NIS\,\hat{\mathbf{n}}, \qquad T = mB\sin\theta

where n^\hat{\mathbf{n}} follows the current by the right-hand rule. The torque turns m\mathbf{m} towards B\mathbf{B}, like a compass needle, and the stored energy is U=−m⋅BU = -\mathbf{m} \cdot \mathbf{B}. In a DC motor the commutator reverses the coil current every half turn, just as m\mathbf{m} passes B\mathbf{B}, so the torque keeps its sign; real motors use many coils so the torque ripple is small (more in Electrical Machines & Transformers). In a non-uniform field a loop also feels a net force, F=∇(m⋅B)\mathbf{F} = \nabla(\mathbf{m} \cdot \mathbf{B}): that is how a magnet picks up a paper clip.

Interactive: force on a wire between poles

The lab draws a wire of length LL in a uniform field between magnet poles. Set B=0.5 TB = 0.5\ \text{T}, I=4 AI = 4\ \text{A}, L=10 cmL = 10\ \text{cm}, θ=60∘\theta = 60^\circ: F=BILsin⁡θ=0.5⋅4⋅0.1⋅0.866=0.173 NF = BIL\sin\theta = 0.5 \cdot 4 \cdot 0.1 \cdot 0.866 = 0.173\ \text{N}, and 0.200 N0.200\ \text{N} at 90∘90^\circ. Press Play to sweep θ\theta: the force vanishes when the wire lies along the field, and reverses direction if you reverse the current or swap the poles.

NBIθF = 0.17 NSFleming's left handB FirstI seCondF thuMb

Worked example: a small motor coil

Given: a rectangular coil of N=100N = 100 turns, 4 cm×5 cm4\ \text{cm} \times 5\ \text{cm}, carrying I=0.5 AI = 0.5\ \text{A} in a radial-gap field modelled as uniform B=0.3 TB = 0.3\ \text{T}.

Find: the magnetic moment, the largest torque, and the torque when m\mathbf{m} is 30∘30^\circ from B\mathbf{B}.

Solve:

m=NIS=100⋅0.5 A⋅(0.04⋅0.05) m2=0.1 A⋅m2Tmax=mB=0.1 A⋅m2⋅0.3 T=0.03 N⋅m=30 mN⋅mT(30∘)=mBsin⁡30∘=15 mN⋅m\begin{aligned} m &= NIS = 100 \cdot 0.5\ \text{A} \cdot (0.04 \cdot 0.05)\ \text{m}^2 = 0.1\ \text{A} \cdot \text{m}^2 \\ T_\text{max} &= mB = 0.1\ \text{A} \cdot \text{m}^2 \cdot 0.3\ \text{T} = 0.03\ \text{N} \cdot \text{m} = 30\ \text{mN} \cdot \text{m} \\ T(30^\circ) &= mB\sin 30^\circ = 15\ \text{mN} \cdot \text{m} \end{aligned}

Check: each 5 cm5\ \text{cm} side carries NI=50 ANI = 50\ \text{A} effectively, so feels F=0.3⋅50⋅0.05=0.75 NF = 0.3 \cdot 50 \cdot 0.05 = 0.75\ \text{N}; with a lever arm of half the 4 cm4\ \text{cm} side on each, 2⋅0.75⋅0.02=0.03 N⋅m2 \cdot 0.75 \cdot 0.02 = 0.03\ \text{N} \cdot \text{m}. A small hobby motor indeed delivers tens of mN⋅m\text{mN} \cdot \text{m}.

In Python: a charge in a field, torque and forces

The electron is pushed with the Boris method, the standard particle-in-cell step: it rotates the velocity exactly, so the speed is conserved as physics requires. The rest are direct formulas.

python · try it yourself
import numpy as np
MU0 = 4e-7 * np.pi
q, m = -1.602e-19, 9.109e-31              # electron
B = np.array([0.0, 0.0, 1e-3])            # 1 mT along z
v = np.array([1e6, 0.0, 0.0])             # 1000 km/s along x
x = np.zeros(3)
T = 2 * np.pi * m / (abs(q) * B[2])
dt = T / 200
xs = []
for _ in range(200):                       # one period with the Boris rotation (exact |v|)
    t = q * B / m * dt / 2
    s = 2 * t / (1 + t @ t)
    vp = v + np.cross(v, t)
    v = v + np.cross(vp, s)
    x = x + v * dt
    xs.append(x.copy())
xs = np.array(xs)
r_num = (xs[:, 1].max() - xs[:, 1].min()) / 2
print(f"radius: numerical {r_num*1e3:.3f} mm, m v/(|q| B) = {m*1e6/(abs(q)*1e-3)*1e3:.3f} mm")
print(f"cyclotron frequency {abs(q)*B[2]/(2*np.pi*m)/1e6:.2f} MHz, speed kept: {np.linalg.norm(v):.4e} m/s")
print(f"turns {'counter-clockwise' if xs[10,1] > 0 else 'clockwise'} seen from +z")

N, I, a, b, B0 = 100, 0.5, 0.04, 0.05, 0.3
mom = N * I * a * b
for deg in (0, 30, 60, 90):
    print(f"angle between m and B = {deg:2d} deg: torque = {mom*B0*np.sin(np.radians(deg))*1e3:5.2f} mN m")

for I1, d in ((100, 0.01), (10, 0.002)):
    print(f"parallel wires {I1} A, {d*1e3:.0f} mm apart: {MU0*I1*I1/(2*np.pi*d):.3f} N/m")

e = 1.602e-19
print(f"Hall voltage, copper strip 0.1 mm, 1 A, 0.5 T: {1.0*0.5/(8.5e28*e*1e-4):.3e} V")
print(f"Hall voltage, semiconductor film (n = 1e22 /m^3, 10 um), 10 mA, 0.5 T: {0.01*0.5/(1e22*e*1e-5):.3e} V")
radius: numerical 5.686 mm, m v/(|q| B) = 5.686 mm
cyclotron frequency 27.99 MHz, speed kept: 1.0000e+06 m/s
turns counter-clockwise seen from +z
angle between m and B =  0 deg: torque =  0.00 mN m
angle between m and B = 30 deg: torque = 15.00 mN m
angle between m and B = 60 deg: torque = 25.98 mN m
angle between m and B = 90 deg: torque = 30.00 mN m
parallel wires 100 A, 10 mm apart: 0.200 N/m
parallel wires 10 A, 2 mm apart: 0.010 N/m
Hall voltage, copper strip 0.1 mm, 1 A, 0.5 T: 3.672e-07 V
Hall voltage, semiconductor film (n = 1e22 /m^3, 10 um), 10 mA, 0.5 T: 3.121e-01 V

The electron (negative charge) circles counter-clockwise seen from the tip of B\mathbf{B}; a positive charge would go clockwise. The Hall voltage in copper is 0.37 μV0.37\ \mu\text{V} even at 1 A1\ \text{A} and 0.5 T0.5\ \text{T}, while the semiconductor film gives 0.31 V0.31\ \text{V} at a hundredth of the current: a factor of a million, from the carrier density.

Guided lab: weigh the force on a wire

Hand calculation. A wire segment of L=5 cmL = 5\ \text{cm} in the gap of a magnet assembly with B≈0.2 TB \approx 0.2\ \text{T}, at I=2 AI = 2\ \text{A}: F=0.02 NF = 0.02\ \text{N}, equivalent to 2.0 g2.0\ \text{g} on a scale.

Simulation. Set the lab above to B=0.2 TB = 0.2\ \text{T}, I=2 AI = 2\ \text{A}, L=5 cmL = 5\ \text{cm}, θ=90∘\theta = 90^\circ and read 0.020 N0.020\ \text{N}.

What you would measure. Put a U-shaped magnet assembly (two flat ferrite or neodymium magnets on a steel yoke) on a kitchen scale with 0.01 g0.01\ \text{g} resolution and tare it. Hold a stiff copper wire through the gap from a clamp that does not touch the scale, and feed 00 to 2 A2\ \text{A} from a bench supply in constant-current mode (limit 3 V3\ \text{V}). By Newton's third law the magnet's apparent weight changes by F/gF/g. Plot the reading against II: a straight line through zero whose slope is BL/gBL/g; reversing the current reverses the change. From the slope get BB (compare with a Hall probe in the gap). Expect ±5 %\pm 5\ \% scatter: the field is not uniform across the gap, and the effective LL is uncertain by the fringe region (about one gap width at each side).

Hazards and safe setup. Low voltage, current-limited; the thin wire warms at 2 A2\ \text{A}. Neodymium magnets snap together with enough force to pinch skin and shatter; slide them apart, keep them away from phones, cards and pacemakers, and handle them one at a time.

Pitfalls

  • Magnetic force does no work on free charges. Motors convert electrical energy via the induced back-EMF, not because qv×Bq\mathbf{v} \times \mathbf{B} does work (Motional EMF and Generators).
  • Sign of the charge. Electrons curve the other way, and the Hall voltage of n-type and p-type material has opposite signs.
  • F=IL×B\mathbf{F} = I\mathbf{L} \times \mathbf{B} needs a uniform field. Otherwise integrate I dl×BI\,d\mathbf{l} \times \mathbf{B} along the wire.
  • Torque on a loop is zero when m∥B\mathbf{m} \parallel \mathbf{B} (the stable position), not when the coil's plane is parallel to the field (that is the maximum).

Practice

  1. A proton (1.67×10−27 kg1.67 \times 10^{-27}\ \text{kg}) moves at 105 m/s10^5\ \text{m/s} perpendicular to B=0.1 TB = 0.1\ \text{T}. Find the radius and the cyclotron frequency.
  2. Two long parallel conductors 5 mm5\ \text{mm} apart carry 20 A20\ \text{A} in opposite directions. Find the force per metre and its direction.
  3. A circular coil of 20 turns, radius 1 cm1\ \text{cm}, carries 0.2 A0.2\ \text{A} in the Earth's horizontal field 20 μT20\ \mu\text{T}. What is the largest torque?
Answer
  1. r=mv/(qB)=1.67×10−27⋅105/(1.602×10−19⋅0.1)=10.4 mmr = mv/(qB) = 1.67 \times 10^{-27} \cdot 10^5/(1.602 \times 10^{-19} \cdot 0.1) = 10.4\ \text{mm}; fc=qB/(2πm)=1.53 MHzf_c = qB/(2\pi m) = 1.53\ \text{MHz}.
  2. F/ℓ=4π×10−7⋅400/(2π⋅0.005)=0.016 N/mF/\ell = 4\pi \times 10^{-7} \cdot 400/(2\pi \cdot 0.005) = 0.016\ \text{N/m}, repulsive.
  3. m=20⋅0.2⋅π⋅10−4=1.257×10−3 A⋅m2m = 20 \cdot 0.2 \cdot \pi \cdot 10^{-4} = 1.257 \times 10^{-3}\ \text{A} \cdot \text{m}^2, T=mB=2.5×10−8 N⋅mT = mB = 2.5 \times 10^{-8}\ \text{N} \cdot \text{m}.

Test yourself

A static magnetic field acting on a free moving charge…

  1. speeds it up
  2. changes only its direction
  3. slows it down
  4. stops it

Two parallel wires carry currents in the same direction. They…

  1. attract
  2. repel
  3. feel no force
  4. twist

A coil with moment m\mathbf{m} sits in a uniform B\mathbf{B}. The torque is largest when…

  1. m\mathbf{m} is parallel to B\mathbf{B}
  2. m\mathbf{m} is perpendicular to B\mathbf{B}
  3. m\mathbf{m} is antiparallel to B\mathbf{B}
  4. the coil's plane is perpendicular to B\mathbf{B}

Why are Hall sensors made from semiconductors rather than copper?

  1. copper is not magnetic
  2. VH∝1/nV_H \propto 1/n, and semiconductors have far fewer carriers
  3. semiconductors conduct better
  4. copper has holes

In the lab, B=0.5 TB = 0.5\ \text{T}, I=4 AI = 4\ \text{A}, L=10 cmL = 10\ \text{cm}, θ=60∘\theta = 60^\circ. The force is…

  1. 0.100 N0.100\ \text{N}
  2. 0.173 N0.173\ \text{N}
  3. 0.200 N0.200\ \text{N}
  4. 0.346 N0.346\ \text{N}