The science
F = q (E + v x B) Lorentz force
omega_c = |q| B / m gyro-frequency, f_c = omega_c / 2 pi
r_L = m v_perp / (|q| B) Larmor radius
v_E = (E x B) / B^2 E x B drift: |v_E| = E/B,
independent of q and m
Boris step: v- = v + (qE/m) dt/2 ; rotate by angle 2 atan(q B dt / 2m) ; v += (qE/m) dt/2
Seen along B, every particle runs in a circle. An ion speeds up while it moves with the electric force and slows while it moves against it, so its circle is flatter on one side and the whole orbit slides sideways: the path is a trochoid. Because the electron is lighter and turns the other way round, its loops are small and run the other way, yet the centre of both slides at the same E/B, which is why no sideways current appears from the drift alone.
Simplifications. Collisionless test particles with no mutual forces or self-generated fields, non-relativistic, uniform static B and E. The top view wraps periodically at the box edge. Species constants are dimensionless (ion m=1.6, q=+1; electron m=0.35, q=−1.4); the real mass ratio is 1836.
Independent numerical checks compare the integrator with closed forms: Larmor radius, gyro-period, kinetic-energy conservation and E×B drift speed for both species.
Not run yet.