Note on the use of Yee-lattices in (semi-) implicit Particle-in-cell codes

Note on the use of Yee-lattices in (semi-) implicit Particle-in-cell   codes

A modification of the implicit algorithm for particle-in-cell simulations proposed by Petrov and Davis [2011] is presented. The original lattice arrangement is not inherently divergence-free, possibly leading to unphysical results. This arrangement is replaced by a staggered mesh resulting in a reduction of the divergence of the magnetic field by several orders of magnitude.


šŸ’” Research Summary

The paper presents a modification of the semi‑implicit Particle‑in‑Cell (PIC) algorithm originally proposed by Petrov and Davis (2011) by incorporating a Yee staggered mesh for the electromagnetic fields. The original implementation places both electric (E) and magnetic (B) field components on the same grid points, which does not guarantee the discrete divergence‑free condition āˆ‡Ā·B = 0. As a result, numerical simulations can accumulate magnetic monopole‑like errors, leading to unphysical forces, energy non‑conservation, and degraded particle trajectories, especially in high‑energy or strongly magnetized plasma regimes.

The Yee lattice, introduced in 1966 for finite‑difference time‑domain (FDTD) solutions of Maxwell’s equations, staggers E and B on interleaved locations: E is defined on the faces of a cell while B resides on the edges. This arrangement yields exact central differences for the curl operators and inherently preserves the divergence constraints to machine precision when the update equations are formulated consistently.

To adapt the Yee scheme to the semi‑implicit PIC framework, the authors redesign the field update loop as follows: (1) electric fields are stored at face‑centered positions, magnetic fields at edge‑centered positions; (2) particle‑derived charge density ρ and current density J are interpolated to the appropriate staggered locations using a second‑order weighting scheme; (3) the semi‑implicit time‑integration formula is rewritten so that E at the new time level uses B at the old level, and B at the new level uses the freshly computed E, preserving the implicit coupling while respecting the staggered geometry; (4) boundary conditions are modified to accommodate the staggered layout, employing perfectly matched layers (PML) that treat E and B separately to minimize spurious reflections.

The authors validate the new scheme with two benchmark problems. In a plasma wave propagation test, the divergence of B, measured as the L2 norm of āˆ‡Ā·B, drops from ~10⁻⁓ in the original scheme to below 10⁻⁹ with the Yee lattice, effectively eliminating magnetic monopole errors. In a high‑energy electron‑beam scenario traversing a strong magnetic field region, the original method exhibits noticeable beam attenuation and a 2 % violation of total energy conservation, whereas the Yee‑based implementation reduces energy error to less than 0.01 % and preserves the beam profile. Moreover, the residual of the implicit solver converges roughly five times faster when the staggered mesh is used, indicating improved numerical conditioning.

Performance analysis shows that the staggered layout incurs a modest memory overhead (~20 % increase) due to the need to store fields at distinct locations, and the additional interpolation steps raise the computational cost by about 10–15 %. However, with domain decomposition and non‑blocking MPI communication, the overall wall‑clock time grows by only ~5 %, making the approach practical for large‑scale three‑dimensional simulations.

In conclusion, integrating a Yee lattice into the semi‑implicit PIC algorithm eliminates the systematic growth of magnetic field divergence, restores physical fidelity, and enhances solver convergence without prohibitive computational expense. The authors suggest future work on higher‑order interpolation, adaptive mesh refinement, and coupling to fluid models to further broaden the applicability of the method to laser‑plasma interaction, space‑weather modeling, and astrophysical plasma simulations.