Warwick-Plasma / epoch

Particle-in-cell code for plasma physics simulations
https://epochpic.github.io
GNU General Public License v3.0
182 stars 58 forks source link

Equations dominating generated EM field from particles, in 1D PIC #680

Closed sudoriente closed 3 months ago

sudoriente commented 3 months ago

Dear sir,

I've been trying to understand which equations govern and update the EM field from moving particles for several days (without any energy sources). However, the equations I know can't exactly explain the EM field intensity that I obtained from a 1D PIC simulation.

Simulation conditions:

Single macro electron particle (npart 1, placed at zero on the X-axis, temperature 100 eV, density 1.0e14, charge -1, mass 1) 30 µm simulation window size, nx 15000, simulation time 100 fs (update data every 10 fs) Boundaries: open

The most confusing point: This 1D PIC simulation gave me a plot of the Ex electric field intensity map that shows negative intensity over time. Question1

What I understand: A single macro particle moves to the negative side on the X-axis. Step shapes in the Ex field follow the positions of the electron density. There are small gradations at the end of the Ex field, which follow the electron density profile of the single macro electron particle. The Ex field due to the movement of a single macro particle will continue to update in the direction the macro particle moves, and the sum of the Ex field intensity will remain the same. This can numerically be explained by equations related to the Poisson equation. Question3 Question2

My problem: The results of the 1D PIC simulation do not match with the equations I know for the 'electric field from moving particles' or the 'electric field from the Poisson equation and Gauss's law'. Can I get a hint on how a 1D PIC updates the EM field by particle?

Thank you for your help!

TomGoffrey commented 3 months ago

I'll keep my answer brief, because I think a full explanation of plasma physics is beyond the scope of this forum.

  1. EPOCH evolves the EM fields according to Maxwell's equations. Specifically it uses Ampere's law and Faraday's law.
  2. The particle positions and momenta are updated by solving the Lorentz force, and the EM fields. The resulting current density is then calculated, and this is used to update the EM fields. This process is then repeated.
  3. The equations you quote are electrostatic. EPOCH is an electromagnetic code.
  4. Whilst Gauss' for the EM field is not used explicitly in the code, these are constraints on your initial fields. If you initialise the simulation as you describe (single electron species, zero initial electric field) you are implicitly specifying a stationary neutralising background of ions. If you want to simulate an electron species without such a background you have to also provide a consistent initial electric field.