Introduction
Particle-in-cell (PIC) simulations provide insights into the kinetic properties of particles (such as velocity and position) during plasma interactions by tracking charged particles under the influence of both self-consistent and external electromagnetic fields. This technique provides an intuitive understanding of the kinetic behavior of field-particle interactions and is a vital tool for evaluating various plasma physics problems [1-3], such as inertial confinement fusion (ICF) [4, 5], ion acceleration [6, 7], laser–nuclear interactions [8], and positron generation [9-12]. Although PIC simulations of plasma physical processes are widely used, two critical challenges need to be addressed in practical applications: 1) numerical noise, which can be suppressed significantly with various methods [13] (e.g., variable weights [14], adaptive mesh refinement [15]), and 2) the more critical challenge of the high computational cost, which results in long simulation times even on parallel computers [16]. Therefore, optimizing PIC codes is important and necessary to increase the capabilities of the corresponding simulations [17, 18].
In PIC simulations, the kinetic modeling of plasmas is usually dominated by collective effects. Most PIC codes omit short-range Coulomb collisions between particles. At high temperatures (
Initially, the particle distribution in plasma was determined by directly solving the Fokker–Planck kinetic equation. The key to this method is the calculation of the Rosenbluth potential to assess the contribution of Coulomb collisions to the scattering coefficient [21]. However, coupling this method with PIC simulations was initially complex. In addition, this method requires numerous simulated particles to accurately calculate the Rosenbluth potential. In practical PIC simulations, most models are based on the “binary collision” proposed by Takizuka and Abe (TA77) [22]. This model replaces direct collisions by calculating the Coulomb cross-section between particles in the same cell and randomly selecting the appropriate scattering angle. In addition, this methodology enables the simultaneous consideration of multiple elastic and inelastic collision channels in a pairwise process. Lavell et al. [23] applied the corrected binary collision model originally developed for charged-particle collisions to all the scattering channels considered. They validated the accuracy and utility of their model in a wide range of plasma environments. However, in binary collision modeling, the computational efficiency (i.e., computational speed and accuracy) of high-dimensional Monte Carlo (MC) high-dimensional integration methods depends strongly on the sampling method used. A simple and efficient MC method for computing arbitrary ion velocity distributions was proposed by Xie et al. [24]. A method similar to Monte Carlo collision (MCC) to simulate the transition region between collisionless plasma and Coulomb collision plasma is presented in Ref. [25]. A lattice-based “collision field” concept handles the collision process between different types of particles. This has significant advantages for high-dimensional simulations. Manheimer et al. [26] developed a Coulomb collision model for electron–electron and electron–ion collisions. It was simplified to an isotropic scattering model. The N97 [27] method uses the same order N binary-pairing procedure presented in TA77. However, it uses a different distribution function for the scattering angle. A grid-based binary model for Coulomb collisions was described by Cohen et al. [28]. It defines the unique particle counterpart of a particle on the grid by randomly sampling the velocity distribution. The model omits the process of direct pairing of particles in the simulation cell, significantly reducing the CPU runtime.
However, all these methods assume that the macroparticles have identical weights so that the real particle density is linearly proportional to the number of macroparticles in a cell. In many simulations, variable weights are necessary to render the computational task feasible. Using the appropriate pairing statistics, Miller and Combi [29] applied the TA77 method to differentially weighted particles. The algorithm preserves energy and momentum and produces suitable relaxation time scales compared with theoretical predictions. Subsequently, Nanbu and Yonemura [30] considered a Coulomb collision algorithm for weighted particles based on the cumulative properties of Coulomb collisions in plasma. The effectiveness of the proposed algorithm was verified using several examples. Higginson et al. [31] detailed a method for applying fusion to a PIC simulation with different particle weights and validated the method using analytical benchmarks in thermonuclear and beam-target fusion reactions. Unlike the work of Higginson et al. [31], Wu et al. presented an algorithm for pairwise fusion applicable to macroparticles of arbitrary weights at relativistic energies [32]. It is compatible with the Coulomb scattering algorithm widely used by Nanbu [30] and Sentoku [33] and can be implemented in the PIC simulation code with Coulomb scattering with marginal effort. Recently, Angus et al. [34] described a method for adjusting particle velocities post-scatter to restore the exact conservation of momentum and energy. They also illustrated its efficacy with various test problems.
In the present work, we described an efficient optimization method for the nuclear fusion algorithm and its implementation within the existing PIC code Smilei [35]. The aim was to develop collision-operator schemes with maximum efficiency while maintaining simulation accuracy. Based on the classical nuclear fusion algorithm described in Ref. [22], our algorithm simplifies particle pairing and reduces the computational overhead by eliminating the particle address randomization step. Collision particles are selected randomly. This significantly reduces the CPU time and improves the computational efficiency of the collision processes.
Optimization of the nuclear fusion algorithm
Theoretical background
The two fusion-reactant macroparticles a and b undergo fusion and create two products A and B with an energy gain of Q. This is described by Eq. (1):_2026_06/1001-8042-2026-06-103/alternativeImage/1001-8042-2026-06-103-M001.png)
_2026_06/1001-8042-2026-06-103/alternativeImage/1001-8042-2026-06-103-M002.png)
_2026_06/1001-8042-2026-06-103/alternativeImage/1001-8042-2026-06-103-M003.png)
Note that the transformation of the coordinate system during the implementation of nuclear fusion in the code is mandatory. When a fusion reaction occurs, the fusion products are generated in the CM frame, transformed into the laboratory frame, and finally transformed back into the simulation frame.
In the laboratory frame, the coordinate origin is fixed at a point in the laboratory similar to the target nucleus in a nuclear experiment. Particle a moves at a relative velocity of vrel. Therefore, the velocity in the simulation frame should first be transformed into the relative velocity in the laboratory frame by the transformation
The sum of the kinetic energy of the incident particle a and target nucleus b relative to the center of mass is typically referred to as the kinetic energy of their relative motion. It is denoted as Ecm. It represents the kinetic energy of the CM frame. As shown in Fig. 1, the distance between the incident particle a and target nucleus b is denoted by x, whereas that between the center of mass and target nucleus is denoted by xc. According to the definition of the center of mass,_2026_06/1001-8042-2026-06-103/alternativeImage/1001-8042-2026-06-103-M004.png)
_2026_06/1001-8042-2026-06-103/alternativeImage/1001-8042-2026-06-103-M005.png)
_2026_06/1001-8042-2026-06-103/alternativeImage/1001-8042-2026-06-103-M006.png)
_2026_06/1001-8042-2026-06-103/alternativeImage/1001-8042-2026-06-103-M007.png)
_2026_06/1001-8042-2026-06-103/alternativeImage/1001-8042-2026-06-103-M008.png)
_2026_06/1001-8042-2026-06-103/alternativeImage/1001-8042-2026-06-103-M009.png)
_2026_06/1001-8042-2026-06-103/alternativeImage/1001-8042-2026-06-103-M010.png)
_2026_06/1001-8042-2026-06-103/alternativeImage/1001-8042-2026-06-103-M011.png)
_2026_06/1001-8042-2026-06-103/alternativeImage/1001-8042-2026-06-103-M012.png)
_2026_06/1001-8042-2026-06-103/alternativeImage/1001-8042-2026-06-103-M013.png)
_2026_06/1001-8042-2026-06-103/alternativeImage/1001-8042-2026-06-103-M014.png)
_2026_06/1001-8042-2026-06-103/alternativeImage/1001-8042-2026-06-103-M015.png)
_2026_06/1001-8042-2026-06-103/alternativeImage/1001-8042-2026-06-103-F001.jpg)
Optimizing the algorithm
Most PIC codes (including Smilei [35]) with different collision models [27, 37, 38] were inspired by TA77 [22]. The time steps of these codes follow a similar procedure, as follows:
Particle groups. The particles are stored as a linked list within each simulation cell. This data structure has significant advantages for parallel computations.
Particle address index randomization. This ensures the randomness of the subsequent particle pairing.
Pairing similar particles. Pairs of particles of the same species are determined from the top of the addresses.
Pairing of unlike-particles. Pairs of particles from different species are selected from the top of the addresses.
Finally, new particles are generated by the fusion of the paired particles. The original linked list is updated, and the product particle information is stored. The primary steps of the algorithm described above are summarized in Fig. 2.
_2026_06/1001-8042-2026-06-103/alternativeImage/1001-8042-2026-06-103-F002.jpg)
The relaxation time used in the Coulomb collision calculation is more accurate than the standard approximation. However, it is computationally expensive and requires substantial CPU time. This presents a significant challenge for large-scale PIC simulations. To improve the computational efficiency while maintaining the accuracy of the Coulomb collision model, we implemented targeted optimizations using the classical binary collision algorithm.
First, we eliminated the particle address index randomization. Macroparticles may collide multiple times during the simulation period. However, the collision pair selection is, on average, performed once per execution of the optimization algorithm. This would be a significant time investment if particle address index randomization is considered at each time step. The selection of colliding particle pairs is achieved by random numbers. This ensures the randomness of particle pairing and eliminates the need for a particle address randomization operation.
We then optimized the pairing of like-particles. As illustrated in Fig. 2(e), when particle pairs belong to the same type, Nnum denotes the total number of particles in the simulation cell. Two random numbers Ra and Rb are generated subsequently (
| Input: Information regarding all macroparticles in the simulation cell; Number of particles in the cell (Nnum) |
| Output: Information of Nnum/2 particle collision pairs |
| 1 repeat |
| 2 Generate two random |
| // Determine the index of particle pairs |
| 3 |
| // If particle pairs have an equal index within valid bounds |
| 4 pa = pa + 1; |
| 5 else |
| // If particle pairs have an equal boundary index |
| 6 pa = pa - 1; |
| 7 end |
| 8 end |
| 9 until Select Nnum/2 Pairs of colliding particles; |
| 10 return Nnum/2 particle colliding pairs; |
Third, we optimized the pairing of unlike-particles. For different types of particle pairings, the total number of particles with a lower density Na and that of particles with a higher density Nb should be determined first. This is similar to the optimization of the pairing of like-particles, where two random numbers
| Input: Information regarding all macroparticles in the cell; Number of particles with lower density in the cell (Na); Number of particles with higher density in the cell (Nb) |
| Output: Information of Na particle collision pairs |
| 1 repeat |
| 2 Generate two random |
| // Determine different density particle index |
| 3 |
| 4 |
| 5 until Select Na pairs of colliding particles; |
| 6 return Na particle colliding pairs; |
The spatial grid size in this procedure is of the order of the Debye radius. Because it is unnecessary to consider the Coulomb collisions between particles spaced farther apart than the Debye radius, the interactions between the particles in different simulation cells can be omitted. This also enables parallel computation of the simulation procedures. A flowchart comparison between the classic binary collision algorithm (TA77) and optimization algorithm (NEW) is shown in Fig. 3.
_2026_06/1001-8042-2026-06-103/alternativeImage/1001-8042-2026-06-103-F003.jpg)
Benchmarks
To evaluate the efficiency of the optimization algorithm, we present three typical simulations: D(d,n)3He and D(t,n)4He thermonuclear fusion and D(d,n)3He beam-target fusion. The results demonstrate that the optimization algorithm computes the Coulomb collision process with maximum efficiency without compromising physical accuracy. These benchmarks were implemented using the PIC code Smilei [35]. All the tests were performed on a disabled field. Simulations can use cross-sectional data derived from experimental measurements or parametric fitting equations. In this case, the second approach was preferred to ensure a direct comparison of the simulation results with the theoretical predictions.
It is important to emphasize that the optimization algorithm operates on probability-driven random pairing, rather than on the complete traversal of all particles. Although the number of pairings is limited by lower-density species, the optimization algorithm leverages MC methods to achieve a robust sampling of high-density species. In nuclear fusion, the velocity distribution of ions follows the Maxwell–Boltzmann distribution, wherein energetic particles (although sparse) contribute significantly to the fusion reaction [31]. Random pairing cumulatively covers the high-energy region using multiple independent samplings (cycling each time step) rather than relying on a single-step traversal. Consequently, the statistical rise and fall of random pairing is attenuated by time-averaging effects in the long-duration simulations. This ensures the accuracy of the kinetic evolution.
D(d,n)3He thermonuclear fusion
In the first benchmark, we created a simulation box with dimensions Lx = 40πc/ωr and Ly = 40πc/ωr. We divided it into a 100 × 100 grid, with each cell containing an equal number of D ions. The number density of D ions was 1020 cm-3, and the particles were weighted unequally. Thermonuclear fusion occurs when ions attain high temperatures. Because the cross-section for fusion depends strongly on the relative velocity of the particles, most fusion events occur between ions in the tails of the distribution, with kinetic energies several times higher than the mean energy of the plasma. Simulations were performed at different temperatures to evaluate the fusion reactivity and neutron spectra.
The neutron energy spectra obtained at different temperatures are shown in Fig. 4. TA77 and the optimization algorithm yielded similar neutron energy spectra. The full width at half maximum (FWHM) of the neutron energy spectra increased as the initial ion temperature did. To validate the accuracy of the energy spectra generated by the optimization algorithm, the number of particles per cell (PPC) was fixed at 1000 for all the simulations. As illustrated in Fig. 5(a), by varying the initial temperature of the D ions, we compared the effective FWHM of the simulated energy spectra with the analytical fit of Ballabio [39] using relativistic kinematics. The results reveal a remarkable agreement. The ultimate goal of the optimization algorithm is to improve the computational efficiency without altering the underlying physics. Figure 5(b) presents the CPU runtime for the D(d,n)3He thermonuclear fusion simulation with an initial temperature of 10 keV. Compared with the simulation results of TA77, the CPU runtime reduced by 30.5%. Although the improvement in computational efficiency may not be universal, it is more evident when simulating a larger number of particles in complex collisions.
_2026_06/1001-8042-2026-06-103/alternativeImage/1001-8042-2026-06-103-F004.jpg)
_2026_06/1001-8042-2026-06-103/alternativeImage/1001-8042-2026-06-103-F005.jpg)
D(t,n)4He thermonuclear fusion
To test the optimization algorithm in the case of unlike-particles and illustrate the case of unequal weighting, a simulation was conducted for D(t,n)4He thermonuclear fusion. The initial conditions were similar to those of the first benchmark, with a density of 1020 cm-3 for both ions and an initial temperature of 5 keV. The neutron energy spectra were benchmarked by varying the initial numbers of D and T ions in each cell. As shown in Fig. 6(a), when the initial number of D ions was less than that of the T ions (ND = 100 ppc, NT = 1000 ppc), the optimization algorithm matched the neutron energy spectrum from the TA77 simulation. In the other case, with the particle number reversed (ND = 1000 ppc, NT = 100 ppc), the results were as anticipated (see Fig. 6(b)). Furthermore, when equal weights were maintained and the initial density ratios of the D and T ions were varied, the neutron energy distribution was unaffected by the variations in initial particle density. It influenced only the peak of the energy spectrum. Because the nuclear reaction mechanism of the second benchmark is different from that of the first, we performed multiple sets of simulations. The evolution of the neutron energy FWHM with ion temperature is shown in Fig. 7(a). It again demonstrates the remarkable agreement between the simulation results of the optimization algorithm (NEW) and the theory (Ballabio). In addition, we compared the computational efficiency of D(t,n)4He thermonuclear fusion in both cases, as shown in Fig. 7(b)). This revealed a 25.5% reduction in the CPU runtime of the optimized algorithm compared with the TA77 results.
_2026_06/1001-8042-2026-06-103/alternativeImage/1001-8042-2026-06-103-F006.jpg)
_2026_06/1001-8042-2026-06-103/alternativeImage/1001-8042-2026-06-103-F007.jpg)
D(d,n)3He beam-target fusion
Two distinct tests were conducted to investigate the feasibility of the D(d,n)3He beam-target fusion using an optimization algorithm. In the simulations, D(d,n)3He beam-target fusion occurred when a high-energy beam impacted a cold stationary D ions target. In this case, the kinetic energy of the beam determined the magnitude of the fusion cross-section.
One group of D ions was considered as a stationary background with a density of 1020 cm-3. The other group with an equal density was considered as a projectile. Two simulations with projectile velocities of 0.05 c and 0.1 c were conducted. The resulting neutron spectra are presented in Fig. 8. Here, Fig. 8(a) and Fig. 8(b) illustrate the simulation results with initial velocities of 0.05 c and 0.1 c, respectively. As shown, the optimization algorithm accurately reproduced the energy spectra of the neutrons. Because the optimization algorithm partially removed the particle traversal steps, we illustrate the relative error in the total kinetics during the simulation in Fig. 9(a). For the optimization algorithm, the peak of the relative error stabilized at ±0.02%. This is an insignificant energy deviation considering the effect of statistical fluctuations during the simulation. In addition, as shown in Fig. 9(b), the optimization algorithm significantly reduced the CPU runtime (by 32.5%).
_2026_06/1001-8042-2026-06-103/alternativeImage/1001-8042-2026-06-103-F008.jpg)
_2026_06/1001-8042-2026-06-103/alternativeImage/1001-8042-2026-06-103-F009.jpg)
Conclusion
In this study, we focused on the computationally inefficient problem of multiparticle complex collisions in PIC simulations and optimized the classical PIC binary Coulomb collision algorithm. The particle-pairing process was simplified by removing the particle address randomization step. Additionally, collision particle pairs were selected using random numbers. This eliminated the need to traverse all the particle address information within the simulation cell and significantly reduced the CPU runtime. The optimized algorithm was benchmarked in like-particles D(d,n)3He, unlike-particles D(t,n)4He, thermonuclear fusion, and beam-target fusion. The results show that the CPU runtime can be generally reduced by approximately 30% while maintaining physical accuracy. The minimal errors in energy and momentum enable the optimized algorithm to minimize its effect on the underlying physics.
For plasmas with a significantly high density (
Numerical heating in particle-in-cell simulations with Monte Carlo binary collisions
. Phys. Rev. E 103,Transition from collisional to collisionless regimes in interpenetrating plasma flows on the national ignition facility
. Phys. Rev. Lett. 118,Modeling of axion and electromagnetic fields interaction in particle-in-cell simulations
. Matter Radiat. Extrem. 9,Laser-direct-drive program: promise, challenge, and path forward
. Matter Radiat. Extrem. 2, 37–54 (2017). https://doi.org/10.1016/j.mre.2017.03.001Energetic deuterium-ion beams and neutron source driven by multiple-laser interaction with pitcher-catcher target
. Nucl. Fusion 60,Selective ion acceleration by intense radiation pressure
. Phys. Rev. Lett. 127,Ion acceleration with an intense short-pulse laser and large-area suspended graphene in an extremely thin target regime
. High-energy density Phys. 55,Laser-assisted α decay of the deformed odd-A nuclei
. Nucl. Sci. Tech. 36, 69 (2025). https://doi.org/10.1007/s41365-024-01610-2Relativistic quasimonoenergetic positron jets from intense laser-solid interactions
. Phys. Rev. Lett. 105,All-optical quasi-monoenergetic GeV positron bunch generation by twisted laser fields
. Commun. Phys. 5, 15 (2022). https://doi.org/10.1038/s42005-021-00797-9Simulations of spin/polarization-resolved laser–plasma interactions in the nonlinear QED regime
. Matter Radiat. Extrem. 8,Bright X/γ-ray emission and lepton pair production by strong laser fields: a review
. Rev. Mod. Plasma Phys. 8, 24 (2024). https://doi.org/10.1007/s41614-024-00158-33-D ICEPIC simulations of the relativistic klystron oscillator
. IEEE Trans. Plasma Sci. 8, 24 (2024). https://doi.org/10.1109/27.887733A dynamical particle merging and splitting algorithm for particle-in-cell simulations
. Comput. Phys. Commun. 294,Octree particle management for DSMC and PIC simulations
. J. Comput. Phys. 327, 943–966 (2016). https://doi.org/10.1016/j.jcp.2016.01.020Particle simulation of plasmas: review and advances
. Plasma Phys. Control. Fusion 47Physical and numerical methods of speeding up particle codes and paralleling as applied to RF discharges
. Plasma Sources Sci. Technol. 9, 413 (2000). https://doi.org/10.1088/0963-0252/9/3/319Calculation algorithm for the space charge force of a train with infinite bunches
. Nucl. Sci. Tech. 36, 96 (2025). https://doi.org/10.1007/s41365-025-01673-9Optimization of PIC codes by improved memory management
. J. Comput. Phys. 225, 829–839 (2007). https://doi.org/10.1016/j.jcp.2007.01.002A comparison of particle-in-cell and fokker-planck methods as applied to the modeling of auxiliary-heated mirror plasmas
. J. Comput. Phys. 102, 39–48 (1992). https://doi.org/10.1016/S0021-9991(05)80003-8A binary collision model for plasma simulation with a particle code
. J. Comput. Phys. 25, 205–219 (1977). https://doi.org/10.1016/0021-9991(77)90099-7Verification of a Monte Carlo binary collision model for simulating elastic and inelastic collisions in particle-in-cell simulations
. Phys. Plasmas 31,A simple and fast approach for computing the fusion reactivities with arbitrary ion velocity distributions
. Comput. Phys. Commun. 292,A grid-based Coulomb collision model for PIC codes
. J. Comput. Phys. 123, 169–181 (1996). https://doi.org/10.1006/jcph.1996.0014Langevin representation of Coulomb collisions in PIC simulations
. J. Comput. Phys. 138, 563–584 (1997). https://doi.org/10.1006/jcph.1997.5834Momentum relaxation of a charged particle by small-angle Coulomb collisions
. Phys. Rev. E. 56, 7314–7314 (1997). https://doi.org/10.1103/PhysRevE.56.7314A grid-based binary model for Coulomb collisions in plasmas
. J. Comput. Phys. 234, 33–43 (2013). https://doi.org/10.1016/j.jcp.2012.08.046A Coulomb collision algorithm for weighted particle simulations
. Geophys. Res. Lett. 21, 1735–1738 (1994). https://doi.org/10.1029/94GL01835Weighted particles in Coulomb collision simulations based on the theory of a cumulative scattering angle
. J. Comput. Phys. 145, 639–654 (1998). https://api.semanticscholar.org/CorpusID:123672030A pairwise nuclear fusion algorithm for weighted particle-in-cell plasma simulations
. J. Comput. Phys. 388, 439–453 (2019). https://doi.org/10.1016/j.jcp.2019.03.020A pairwise nuclear fusion algorithm for particle-in-cell simulations: weighted particles at relativistic energies
. AIP Adv. 11,Numerical methods for particle simulations at extreme densities and temperatures: weighted particles, relativistic collisions and reduced currents
. J. Comput. Phys. 227, 6846–6861 (2008). https://doi.org/10.1016/j.jcp.2008.03.043Moment-preserving Monte-Carlo Coulomb collision method for particle codes
. J. Comput. Phys. 531,Smilei: a collaborative, open-source, multi-purpose particle-in-cell code for plasma simulation
. Comput. Phys. Commun. 222, 351–373 (2018). https://doi.org/10.1016/j.cpc.2017.09.024Extended parameterization of nuclear-reaction cross sections for few-nucleon nuclei
. Nucl. Phys. A 551, 255–268 (1993). https://doi.org/10.1016/0375-9474(93)90481-CA Monte Carlo collision model for the particle-in-cell method: applications to argon and oxygen discharges
. Comput. Phys. Commun. 87, 179–198 (1995). https://doi.org/10.1016/0010-4655(94)00171-WA treecode algorithm for simulating electron dynamics in a Penning–Malmberg trap
. Comput. Phys. Commun. 164, 306–310 (2004). https://doi.org/10.1016/j.cpc.2004.06.076Relativistic calculation of fusion product spectra for thermonuclear plasmas
. Nucl. Fusion 38, 1723 (1998). https://doi.org/10.1088/0029-5515/38/11/310The authors declare that they have no competing interests.

