boris_push(x, v, B, E, q, m, dt)¶
The explicit Boris pusher.
ndarray) – particle position at full timestep, in SI (meter) units.
ndarray) – particle velocity at half timestep, in SI (meter/second) units.
ndarray) – magnetic field at full timestep, in SI (tesla) units.
float) – electric field at full timestep, in SI (V/m) units.
float) – particle charge, in SI (coulomb) units.
float) – particle mass, in SI (kg) units.
float) – timestep, in SI (second) units.
Conceptually, the algorithm has three phases:
Add half the impulse from electric field.
Rotate the particle velocity about the direction of the magnetic field.
Add the second half of the impulse from the electric field.
This ends up causing the magnetic field action to be properly “centered” in time, and the algorithm, being a symplectic integrator, conserves energy.