A Byte of PhysicsLogo

Magnetic fields from motion

Moving charge and current produce magnetic fields. A current is a coarse-grained stream of charge: for a small amount of charge crossing a surface, I = dq/dt; for a continuum model, current density is J = ρv. The magnetic field retains direction information, so a simulation cannot replace a source velocity or wire orientation with only a positive magnitude.

Think like a programmer

Represent source motion, segment direction, and probe displacement as typed vectors in one declared frame. Put every cross product in a named pure helper, with a test for each basis-axis direction. Do not bury a right-hand-rule sign flip in camera transforms, particle sprites, or CSS coordinate inversion. A renderer may choose screen y downward; the physics state should not silently inherit that choice.

Model checklist

Inputs
Source charge or current, source velocity/segment direction, source and probe positions in metres, medium permeability, time sample, validity regime, and coordinate convention.
State
Oriented source representation, probe displacement vectors, magnetic-field vector in tesla, accumulated contributions, and any excluded near-source samples.
Rule
Evaluate an oriented nonrelativistic current/charge contribution and add compatible source fields at each probe.
Output
Magnetic-field vector, magnitude, circulation direction, source-by-source contribution ledger, and an applicability warning.
Check
Reversing current or velocity negates B; a probe on the source-velocity line has zero cross-product contribution in the reference model; equal opposite sources cancel at a symmetric probe; dimensions and basis-axis signs agree with the stated convention.

For a slowly moving point charge, a useful low-speed, near-instantaneous reference is:

\[\mathbf B(\mathbf r)\approx\frac{\mu_0}{4\pi}\frac{q\,\mathbf v\times\mathbf R}{\lVert\mathbf R\rVert^3},\qquad \mathbf R=\mathbf r-\mathbf r_{source}\]

R points from source to probe. If velocity and R are parallel, their cross product is zero in this reference model; if they are perpendicular, the magnitude is largest for the same speed and distance. The direction is not a memorized gesture: choose +x, +y, +z, calculate v × R, and compare it with a basis test. Swapping the operands produces R × v = −(v × R), a common global sign bug.

At macroscopic scale, do not add every electron one by one unless that is the model’s intentional resolution. A wire is normally represented by conventional current—a direction assigned to positive charge flow—even when mobile carriers are electrons moving the other way. The segment model uses the current direction directly. It is compatible with the ideal straight-wire reference only after its finite geometry is sufficiently far from the probe and its segment sum has converged.

The phrase “field from motion” is therefore not permission to mix time models. A static current formula assumes a source configuration that is effectively steady over the signal-travel time relevant to the problem. Store the observation time, source time policy, and speed regime in the run record. If a source accelerates or changes rapidly, a field evaluated from its current screen position is not automatically physically causal.

Try this experiment

Prediction: In the nonrelativistic reference, reversing the source velocity reverses the magnetic field, while moving the probe onto the velocity line makes the cross-product contribution zero.

Use a source velocity in +x. Predict the field direction at a probe displaced in +y, then reverse the velocity. Next place the probe on the positive x axis and state why the reference output is zero. Write those three cases as pure-function tests before connecting them to a field visual.

Where this model breaks

The displayed moving-charge expression is a low-speed, quasi-static reference, not a replacement for retarded electromagnetic fields. It omits radiation from acceleration, signal delay, relativity, material response, finite charge distributions, and self-fields. A real current in matter also depends on carrier density, scattering, boundaries, and the chosen continuum scale.

Summary

Make source orientation, timing policy, and coordinate convention first-class model data. Use cross-product fixtures to protect direction signs, then refine from a simple moving-charge or wire reference only within its stated regime.

Glossary

Sources

Model contract

Treat the lesson as a small function before treating it as a fact to memorize. Give every value a unit, keep only the state needed for the next step, and make the output easy to inspect.

\[\text{observable output} = f(\text{inputs},\,\text{state})\]
Inputs
Quantities you set or measure, with units and useful bounds.
State
Values the program must retain to reproduce the next result.
Rule
The relationship or update that turns inputs and state into a result.
Check
A known limit, unit check, invariant, or measured result that can expose a bad model.

Implement the idea as a model

For Magnetic Fields from Motion, write down the quantities you can control, the values your program must retain, and the result a reader could inspect. In Magnetism and Induction, the useful program is not the drawing: it is the smallest explicit model that makes a prediction you can test.

Guided experiment

Prediction: changing one declared input while holding the others fixed should change only the outputs that the model connects to that input. Choose one input, predict the direction of change, then check a limiting case such as zero, a symmetric arrangement, or a familiar low-speed or small-change approximation.

Where this model breaks

This lesson is a teaching model, not a complete simulator. Before using it outside the stated question, check which interactions, scales, uncertainties, boundary conditions, and measurement limits it leaves out.

Summary

Treat Magnetic Fields from Motion as a contract: named inputs and units enter a rule, the rule produces an observable result, and a known limit or invariant checks whether the implementation deserves trust.

Glossary

  • Input: a measured value or chosen parameter supplied to a model.
  • State: the smallest set of values needed to continue or reproduce a model.
  • Validation: comparing an output with a known result, limit, invariant, or measurement.

Self-check

  1. Which values are inputs, and which values must remain state?
  2. What observable result would tell you the model is behaving as expected?
  3. Which assumption would you test first before applying the model to a real system?

Model review: turn Magnetic Fields from Motion into a test

Represent current orientation and coordinate conventions explicitly in magnetic field functions.

  1. Name the inputs and units that the magnetism and induction model needs.
  2. Separate the state you must keep from values you can calculate when needed.
  3. Write one rule that maps the current state and inputs to an observable result.
  4. Choose a limiting case, unit check, invariant, or known result before trusting an output.
  5. State one assumption you would change before using this simplified model for a real decision.

Share to: