Home / Science / Physics / Plasma physics / Particle drift simulatorTool #953

Particle drift simulator: E × B, grad-B, curvature and gravity drifts with a Boris pusher animation

Watch a proton, electron or any ion spiral in a magnetic field and drift sideways when there is an electric field, a field gradient, curved field lines or a steady force. The path is worked out step by step with the Boris method and compared with guiding-centre theory.

Keep it one tap away for everyday use.

Bookmark Particle drift simulator?

Press Ctrl + D now. Your browser opens its own bookmark box, where you choose the name and folder.

  1. Fields
  2. Gyrate
  3. Drift
  4. Compare
Nothing is uploadedWorks offline once open

Fields and particle

Field values are made up and editable. The particle starts with its guiding centre at the origin. Fewer steps per gyration run faster but less accurately; the Boris method still keeps the speed exact in a pure magnetic field.

Path and drift

Non-relativistic Boris pusher in the given fields, compared with first-order guiding-centre theory. The two agree when the gyroradius is small compared with the gradient length or radius of curvature. For study and teaching.

Download

What it does

A charged particle in a magnetic field circles around the field lines. If anything else acts on it, an electric field, a change in field strength, a bend in the field lines or a steady force such as gravity, the circle does not close and the particle walks sideways. These drifts explain why plasmas leak out of simple magnetic bottles, how the Earth’s ring current forms, and why a tokamak needs a twisted field.

This page follows a single particle step by step with the Boris pusher, the standard method in plasma simulation codes, and animates its path. It then measures the drift of the guiding centre (the centre of the circle) and compares it with the textbook formula.

How to use it

  1. Choose the drift: E × B, grad-B, curvature (a curved field like a tokamak’s) or gravity (any steady force).
  2. Choose the particle, or “Other…” to type a charge (with sign) and a mass in atomic mass units.
  3. Set the magnetic field in millitesla and the value that causes the drift: the electric field E, the gradient length L, the radius of curvature R or the acceleration.
  4. Give the particle’s energy across and along the field in electronvolts.
  5. Choose how many gyrations to follow and how many time steps per gyration. Use Pause, Play again and the speed setting for the animation.

Worked example

The page opens on a proton in a 1 mT field with an electric field of 20 V/m and 100 eV of energy across the field. Its gyroradius is 1.445 m and one turn takes 65.59 µs. The E × B drift from theory is E/B = 20000 m/s down the screen (−y); the simulated guiding centre moves at 20000 m/s −y, the same to four figures. Switch to the grad-B drift with L = 20 m: the proton drifts at 5003 m/s +y against 5000 m/s from first-order theory (+0.06 %), the small difference being the next-order term in gyroradius ÷ L (here 0.072). Switch the particle to an electron and it drifts the other way.

Tips

  • E × B drift is the same for every charge and mass; the others flip with the sign of the charge, which is how they create currents.
  • Make the gyroradius ÷ scale length larger (a shorter L or R, or more energy) and watch theory and simulation part ways.
  • In the curvature case both the bend and the 1/R fall-off of the field push the particle vertically; that is why a purely toroidal field cannot hold a plasma.

FAQ

Why the Boris method? It conserves the particle’s speed exactly in a magnetic field, however large the time step, so orbits do not spiral in or out artificially.

Why does the energy change in the E × B case? The particle speeds up and slows down as it moves along and against E each turn; averaged over a turn the energy is constant.

Is it relativistic? No. Keep speeds well below light speed (electrons below about 10 keV).

What is this for? Study and teaching; it is not a substitute for a full simulation code or professional judgement.

Where the numbers come from

  • Boris, J. P. (1970), Relativistic plasma simulation: optimization of a hybrid code, Proceedings of the Fourth Conference on Numerical Simulation of Plasmas (the Boris pusher, non-relativistic form here).
  • Guiding-centre drift formulas: standard results, for example Chen, F. F., Introduction to Plasma Physics and Controlled Fusion, chapter 2.
  • Checked against the drift formulas and an independent high-accuracy SciPy (DOP853) integration of the Lorentz force written for the tests. Constants are CODATA values; field values are made up.

Standard scientific values, such as constants, atomic weights and melting points, are facts found in every textbook; we name where ours were checked. If you are an author or publisher and want a value, a credit or a table changed or removed, tell us and we will act quickly.

Last updated 2026-11-09.

Related tools

Plasma parameter calculator #952 From density, electron and ion temperatures, magnetic field and the ion, get the Debye length, plasma and cyclotron frequencies, gyroradii, thermal, sound and Alfvén speeds, Coulomb logarithm, collision times and mean free paths, plasma beta and a plain verdict on what kind of plasma it is. Langmuir probe analyser #954 Paste or open a Langmuir probe current-voltage trace and get the electron temperature from the exponential region, the floating and plasma potentials, the ion and electron saturation currents and the plasma density worked out two ways, with the fits drawn on the curve. Uncertainty propagation calculator #25 Type your formula and your measurements with their uncertainties, or paste repeated readings. Get the result with its uncertainty, which input matters most, and a Monte Carlo check. Orbit transfer calculator #47 Delta-v, burn by burn, and transfer time between two circular orbits around Earth, the Moon, Mars, Jupiter or the Sun, with the target's lead angle, how often launch windows come round, and a bi-elliptic comparison. Paschen curve calculator #955 Work out the DC voltage that makes a spark jump a gap from the gas, pressure and gap with Paschen's law, find the Paschen minimum, see which gaps a given voltage can break down, and draw the curve for one gas or all of them. The A and B constants are rounded and editable. 1D Schrödinger solver #923 Choose a textbook potential, type a formula or draw your own, and get the lowest energy levels and wavefunctions of the one-dimensional Schrödinger equation by the matrix (finite-difference) method, with the exact levels alongside for the box, harmonic oscillator, finite well, Morse, linear and Pöschl–Teller potentials.