Particle Motion¶
For a charged particle with mass \(m\) and charge \(q\) in the presence of electromagnetic fields, the equation of motion (EOM) is given by:
Here we have defined the particle’s position \(\mathbf{r}\) and velocity \(\mathbf{v}\). The electric fields is \(\mathbf{E}\) and the magnetic fields is \(\mathbf{B}\) are measured at the particle’s position.
The equation of motion can be solved using a variety of numerical methods. The most common method is the Boris pusher, which is a second-order accurate method for solving the equation of motion.
Boris Pusher¶
Boris pusher is a second-order accurate symplectic integrator for solving the particle EOM. In order to use the Boris pusher, we define the particle velocity at half time steps \(\mathbf{v}^{n + 1/2}\) and particle position at full time steps \(\mathbf{r}^{n}\).
The velocity is updated using:
The position can then be updated trivially using: