A Byte of PhysicsLogo

Lorentz force simulations

Magnetic force bends a moving charged particle perpendicular to both its velocity and the field. In a uniform field with no electric field, that perpendicular force does no instantaneous work: it turns velocity but does not change ideal kinetic energy. A trajectory curve alone is weak evidence; a simulation should report the force, speed, energy, turn rate, and numerical drift that generated it.

Think like a programmer

Keep charge, mass, position, velocity, electric field, and magnetic field as separate state/input values with SI units. Calculate the Lorentz force in a pure vector helper, then feed acceleration—not force—into a named integrator. Log v·F, speed, kinetic energy, step size, and accumulated angle. Use a fixed uniform-field fixture before rendering an orbit, because a picture can look circular while the integrator steadily adds energy.

Model checklist

Inputs
Charge in coulombs, mass in kg, initial position and velocity, electric field, magnetic field, start/end time, step size, integrator, coordinate convention, and output schedule.
State
Timestamped position, velocity, force, acceleration, speed, kinetic energy, accumulated turn, and diagnostic history.
Rule
Evaluate F = q(E + v × B), divide by mass for acceleration, and advance the state under the declared integrator.
Output
Trajectory, force/velocity vectors, energy and perpendicularity residuals, observed turn rate, and refinement history.
Check
For E = 0, v·F is near zero and speed/kinetic energy remain bounded; reversing q or B reverses curvature; velocity parallel to B has zero magnetic force; the observed uniform-field angular frequency approaches |qB|/m as steps shrink.
\[\mathbf F=q\mathbf v\times\mathbf B\]

In the page’s two-dimensional reference, velocity lies in x-y and a uniform magnetic field lies in ±z. For positive charge, vx with positive Bz produces a negative y force under the stated helper convention. Reversing either charge or field reverses the curvature; reversing both leaves it unchanged. If velocity is parallel to the field, the cross product vanishes. These are basis fixtures, not optional visual interpretations.

\[\mathbf F=q(\mathbf E+\mathbf v\times\mathbf B),\qquad \mathbf v\cdot(\mathbf v\times\mathbf B)=0,\qquad \omega_c=\frac{|qB|}{m}\]

For E = 0 and a uniform field perpendicular to velocity, the ideal path is a circle with radius r = mv⊥/(|q|B). The sign determines which way it turns; the radius uses speed magnitude. That gives two independent reference quantities: angular frequency should not depend on speed in this nonrelativistic model, while radius should scale linearly with perpendicular speed. Do not infer either from screen pixels—measure from physical state samples.

The integrator matters. Velocity Verlet’s usual position-force assumptions do not directly apply when acceleration depends on velocity, so document that limitation instead of calling it automatically superior. Compare a simple method against a smaller-step run or an appropriate analytic uniform-field solution. Store sample times consistently; an energy value sampled before velocity update cannot be compared blindly with a position after the update.

Try this experiment

Prediction: Reversing charge reverses curvature without changing the ideal radius or speed, and a velocity parallel to the field has no magnetic force.

Use a positive charge with initial velocity in +x and uniform B in +z. Predict the initial force axis, then reverse q. Check v·F, speed, and kinetic energy at each recorded time. Halve the step twice and compare the observed turn rate with |qB|/m. Finally rotate velocity to +z in a three-dimensional formulation and predict the zero magnetic force.

Where this model breaks

Relativistic speeds change momentum and cyclotron behavior; radiation, electric fields, nonuniform fields, collisions, material response, and quantum effects alter the ideal orbit. Numerical updates can inject or remove energy even when the analytic magnetic force does no work. A two-dimensional simulation cannot represent velocity components parallel to B or full three-dimensional field geometry.

Summary

Integrate the Lorentz force from explicit state, but validate more than curvature: check the zero-work dot product, speed/energy ledger, basis-direction fixtures, cyclotron turn rate, and step refinement against the scope of the chosen integrator.

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 Lorentz Force Simulations, 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 Lorentz Force Simulations 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 Lorentz Force Simulations into a test

Integrate charged-particle motion from a vector Lorentz force and test its no-work property.

  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: