Particle-in-cell (PIC) is a methodology of solving coupled Maxwell-Boltzmann equations (Vlasov system) for a relativistic collisionless plasma. Instead of dealing with a 6-dimensional distribution function as in full Vlasov system, particle-in-cell instead samples the distribution function with a finite number of macroparticles, carrying the information about the mass and momenta distributions. These macroparticles live on a discrete grid, where the values of the electric and magnetic fields (as well as the currents) are being stored. The positions and velocities of macroparticles are updated according to the Lorentz force they experience, and along with that particles feedback on the fields by depositing currents. The fields themselves are self-consistently updated according to Faraday’s and Ampere’s laws.
Generic PIC code employs the following steps.
0. Initialize particles and fields
We start by initializing all the particles and field components. Notice that in Tristan
we a-priori initialize the electric fields to zeros, meaning that all the particles have to start in the same position (in such a way, that the charge density is zero).
1. Faraday’s law for half timestep
Advance B
-field half step forward according to Faraday’s law.
2. Lorentz force
Compute the Lorentz forces on particles and advance their velocities and positions according to that.
3. Faraday’s law for half timestep and Ampere’s law
Advance B
-field for the remaining half step (Faraday’s law) and also advance the E
-field according to Ampere’s law (without current).
4. Current deposition
Compute currents deposited by moving particles on the grid.
5. Ampere’s law with currents
Add currents to the Ampere’s law.
6. Output
And return to step 1.