Time electric pulses so the particle hugs the glowing ring. Feel how F = q(E + v × B) sets orbit radius while gusty magnetic drift and flux pickups keep every run fresh.
Charged particles rarely travel in straight lines. Inside cathode‑ray tubes, electrons arc toward phosphor screens; in space, solar wind ions spiral along Earth’s magnetic field; in mass spectrometers, molecular fragments curve under carefully tuned fields. These trajectories are all governed by the Lorentz force, the vector sum of electric and magnetic influences acting on moving charge. Traditional calculators output a single force magnitude, yet they fail to convey the resulting motion. The simulator above retains the original goal of computing Lorentz force but augments it with an animated particle whose path is updated in real time. As you tweak charge, mass, field strengths, or time step, the dot on the canvas swirls according to the same physics that steer beams in particle accelerators. Energy bars reveal how electric fields do work while magnetic fields redirect without changing speed. A downloadable CSV captures every time step for further analysis, transforming a static equation into a tangible experiment.
The model considers a point particle of charge
and mass moving in the
plane. Uniform electric fields
x,
The Lorentz force in vector form is
For our two‑dimensional motion with z only, the force components reduce to
,
Position evolves via and . Kinetic energy is . Electric potential energy in uniform fields is . Magnetic forces do no work, so total energy should remain constant; deviations 0 signal numerical error.
The coupled first‑order system is integrated using the classical fourth‑order Runge–Kutta (RK4) method. For each step of size , four derivative estimates sample the acceleration at the current state, two half steps, and a trial endpoint. The weighted average advances both position and velocity. RK4’s global error scales with , so halving the step shrinks drift by roughly a factor of sixteen. The algorithm is explicit and thus stable provided is short compared with the fastest gyration period . The simulation reports the energy deviation each frame, giving a direct measure of integration accuracy and serving as an educational tool for numerical analysis.
Consider a singly charged dust grain with −⁶ C and −³ kg injected into a region where , , and T. The particle enters with m/s and . With no electric field, the motion should be a circle of radius m and period s. Enter these values and press Play: the dot loops smoothly, energy bars remain constant, and the CSV shows periodic position data. If we introduce an electric field V/m, the path becomes a cycloid drifting in , illustrating the drift exploited in plasma devices. Energy stays constant because the electric field does work while the magnetic field merely redirects.
The table summarizes how changing field strengths alters motion, based on simulation output after one gyration.
Scenario | E_y (V/m) | B_z (T) | Radius (m) | Drift Speed (m/s) |
---|---|---|---|---|
Baseline | 0 | 0.10 | 0.10 | 0.00 |
Electric field | 50 | 0.10 | 0.10 | 500 |
Stronger B | 50 | 0.20 | 0.05 | 250 |
A doubled magnetic field halves the gyroradius and, combined with the same electric field, halves the drift speed, reinforcing the inverse relationship between and both quantities.
The canvas displays a top‑down view with the origin centered. A blue trail traces the particle’s past path, while an orange disk marks its current position. Because the canvas is square and auto‑scales to the largest excursion, circular or helical orbits remain centered regardless of parameters. The striped orange bar indicates kinetic energy; the striped blue bar shows the magnitude of electric potential energy. Their combined length corresponds to the initial total energy, so any shrinkage or growth signals numerical drift. The caption beneath the canvas narrates time, position, speed, and energy deviation for screen‑reader users, and an identical text summary is mirrored in the hidden fallback div. Keyboard users can tab to the canvas and press the space bar to toggle play and pause. Tooltips on inputs remind you of SI units, ensuring the simulation remains grounded in real measurements.
The simulator assumes uniform, time‑independent fields and neglects radiation reaction, space charge effects, collisions, and relativistic corrections. At speeds approaching light, mass increases with the Lorentz factor and the equations of motion change. Extremely strong electric fields may accelerate the particle beyond non‑relativistic limits within a few steps, invalidating the model. The visualization is confined to two dimensions; a true three‑dimensional treatment would show helices when the velocity has a component parallel to the magnetic field. Numerical integration, while robust, still accumulates error for large or extreme field values, so the energy drift readout should always be monitored. Finally, the potential energy definition assumes the electric field remains constant over the simulation range, which may not hold in laboratory devices with electrodes.
Future versions could include three‑dimensional motion, relativistic momentum, or spatially varying fields computed from analytic expressions. Incorporating collisions with background gas would model plasma diffusion, while an adaptive time step could maintain accuracy during periods of strong acceleration. Phase‑space plots of velocity versus position would reveal conserved quantities and resonance structures. Another extension would let users superimpose multiple particles to visualize beams and collective effects.
For background reading on electromagnetic motion, consult J. D. Jackson’s Classical Electrodynamics or D. J. Griffiths’ Introduction to Electrodynamics. The equations for charged particle drifts are summarized in many plasma physics texts, including F. F. Chen’s Introduction to Plasma Physics and Controlled Fusion. Explore related calculators on this site: estimate relativistic effects with the Lorentz Factor Calculator, compute cyclotron periods using the Cyclotron Frequency Calculator, or visualize static fields with the Point Charge Electric Field Simulator.