Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

Journal of Physics: Conference

Series

PAPER • OPEN ACCESS You may also like


- Kinetic simulations of collision-less
Implicit particle-in-cell development for ion source plasmas in open magnetic geometries
Atul Kumar and Juan F Caneses Marin
plasmas - Simulations of laser plasma instabilities
using a particle-mesh method
H H Ma, C F Wu, S M Weng et al.
To cite this article: N. Savard et al 2024 J. Phys.: Conf. Ser. 2743 012003
- HiPACE: a quasi-static particle-in-cell code
T Mehrling, C Benedetti, C B Schroeder et
al.

View the article online for updates and enhancements.

This content was downloaded from IP address 202.152.142.186 on 23/05/2024 at 05:55


20th International Conference on Ion Sources IOP Publishing
Journal of Physics: Conference Series 2743 (2024) 012003 doi:10.1088/1742-6596/2743/1/012003

Implicit particle-in-cell development for ion source


plasmas
N. Savard1,2 , G. Fubiani3 , R. Baartman1 , M. Dehnel2
1
TRIUMF, 4004 Wesbrook Mall, Vancouver, BC V6T 2A3, Canada
2
D-Pace Inc., Suite 305 625 Front Street, Nelson, BC V1L 4B6, Canada
3
LAPLACE, CNRS, Université de Toulouse, Toulouse, 31077 France
E-mail: [email protected]

Abstract. Particle-in-Cell (PIC) codes used to study plasma dynamics within ion sources
typically use an explicit scheme. These methods can be slow when simulating regions of high
electron density in ion sources, which require resolving the Debye length in space and the
plasma frequency in time. Recent developments on fully-implicit PIC models in curvilinear
geometries have shown that these spatial/time scales can be significantly decreased/increased
respectively, allowing for notable speed-ups in simulation time, and thus making it a potential
tool for studying the physics of ion sources. For this purpose, a charge and energy conserving
implicit PIC code has been developed in 1D to determine its potential for simulating bounded
plasmas. In this paper, we use this model to simulate a 1D benchmark of a bounded plasma
with fixed plasma density and electron/ion temperatures. The results are shown to compare
well to the benchmark and to the results using an explicit PIC code. It is shown that the total
amount of macro-particles used in the simulation is a better figure of merit for accurate results
than the standard particles per cell used in literature. Significant speed-ups in computation
time can be achieved for high plasma densities if the accuracy requirements are relaxed. In this
case, we demonstrate the ability of the implicit PIC code to speed-up simulation time by nearly
a factor of 12 compared to explicit PIC.

1. Introduction
Ion sources are an essential part of an accelerator system. They are typically operated by
generating a plasma within a chamber and extracting the ions through an orifice [1]. Research
and development on ion sources is usually done through experimentation due to the difficulty
of simulating their plasma dynamics. The low gas pressure and high electric/magnetic fields in
these plasmas makes the assumptions of Maxwellian-distributed electrons with short mean-free-
paths inaccurate [2]. For this reason, particle-in-cell (PIC) methods are often used [3, 4, 5, 6, 7].
PIC simulations approximate the Boltzmann equation for a plasma using Lagrangian particles
(called macro-particles) and a Eulerian grid for the electromagnetic fields in Maxwell’s equations
[8]. Explicit leap-frog integration is the simplest PIC scheme. Though this method has been
successful at modeling plasmas, it has two restrictions that make it difficult to apply to high
density, low temperature plasmas found in many ion sources. First, the grid spacing ∆x must
be sufficiently
q smaller than the Debye length, λDe , to avoid the finite-grid instability [9]. Since
Te
λDe ∝ ne , with Te the electron temperature and ne the electron density, ∆x gets smaller
with larger densities, making the amount of grid nodes needed within the volume increase

Content from this work may be used under the terms of the Creative Commons Attribution 3.0 licence. Any further distribution
of this work must maintain attribution to the author(s) and the title of the work, journal citation and DOI.
Published under licence by IOP Publishing Ltd 1
20th International Conference on Ion Sources IOP Publishing
Journal of Physics: Conference Series 2743 (2024) 012003 doi:10.1088/1742-6596/2743/1/012003

significantly. In addition, the Courant-Friedrichs-Lewy (CFL) condition requires the time steps
−1/2
∆t < ω1pe ∝ ne , with ωpe the plasma frequency. This further reduces the time step at higher
densities, ultimately making the simulations unrealisable for finding steady-state solutions.
These limitations led to the development of semi-implicit schemes in the 1980s [10, 11, 12],
which have evolved to fully-implicit energy-conserving schemes [13, 14]. Furthermore, work
has also been done to make these schemes charge-conserving [15, 16], with the ability to use
curvilinear grids being successfully shown [17, 18]. The latter schemes are unconditionally stable
for ∆t > ω1pe and ∆x > λDe . This allows for a decrease in the degrees of freedom solved for
over each time step, along with a decrease in the amount of total time steps required. Dramatic
speed-ups can therefore be attained despite the large cost of a non-linear solve. These papers
claim up to 10× increase in speed for 1D simulations, which would correspond to a 1000×
increase in 3D assuming direct scaling of the amount of grid nodes and particles with each
dimension. This would make particle-in-cell codes more practical for simulations used as part
of the engineering process to develop or optimize an ion source.
However, as far as the authors are aware, there are no articles showing fully-implicit energy-
and-charge-conserving PIC code speed-ups over explicit codes for bounded low-temperature
plasmas. In addition, many papers make the assumption that implicit PIC codes simply require
the same amount of particles-per-cell (PPC) as an explicit scheme, which may not be the case
for grids with very high ∆x. In this paper, a 1D energy-and-charge-conserving implicit PIC
code using curvilinear coordinates is compared to a standard explicit PIC code using a bounded
plasma benchmark for comparison. The purpose is to determine whether this method can provide
the speedups claimed, and if so, under what conditions. This is a first step to determining
whether implicit PIC codes can be used to simulate high-density ion source plasmas in 3D.

2. PIC Implementation
A 1D electrostatic energy-and-charge conserving implicit PIC code in curvilinear coordinates
has been implemented. The primary details of this model can be found in the work by Chacon
[17]. The interpolation scheme used in this work is a nearest-grid-point (NGP) interpolation for
the electric fields and current density. Particle sub-stepping is used within each cell to provide
charge conservation. The algorithm was programmed in modern Fortran. The equation that is
discretized is the divergence of Ampere’s law in the electrostatic case:

∂∇2 ϕ
ϵ0 =∇·j (1)
∂t
where j is the current density and ϕ the electric potential. This equation is solved over a
fixed time step which goes from the previous time (tn ) to the next point in time (tn+1 ). Since
the scheme is implicit over a fixed time step, ϕ and j (deposited by moving particles) are
interdependent. In order to make the non-linear solve practical, kinetic enslavement is used [19].
This essentially encapsulates the particle push (to derive j) to be a function of the potential.
The field solver for some iteration k is then in the form:

Aϕk+1 = b(j(ϕk ), ϕk ) (2)

where A is a matrix representing the discretization of ∇2 ϕ. The potential solver can then be
iterated in Picard fashion until convergence. In this work, convergence is when the root-mean-
square of (ϕk+1 − ϕk ) over the grid nodes of the simulation domain is less than 10−8 . This
value is chosen since the electric potential is typically on the order 10 Volts; therefore an error
of 10−8 Volts is negligible. Anderson acceleration is used to achieve convergence for ∆t > ω1pe .
The particle mover and deposition to the grid are parallelized using OpenMP [20]. Linear solves

2
20th International Conference on Ion Sources IOP Publishing
Journal of Physics: Conference Series 2743 (2024) 012003 doi:10.1088/1742-6596/2743/1/012003

are achieved using the Thomas algorithm [21]. An explicit code has been developed in parallel
keeping as many similarities as possible in order to have a fair comparison between the two in
timing.
The benchmark model is a bounded plasma with a sheath forming at the boundary described
by Emmert et.al. [22]. This is a non-linear model that includes a kinetic equation for the ions
with a uniform source term S over the entire domain that is proportional to a flux-Maxwellian
distribution:
mv 2
S ∝ |v| exp(− ) (3)
2T
where v is the particle velocity, m the particle mass, and T the particle temperature. The
other boundary is a symmetric-Neumann boundary with electric field set to 0. Electrons are
represented via the Boltzmann relation. The Poisson equation is then used to solve the problem.
The implementation of this model to an explicit PIC code is described by Procassini et al. [23].
A key feature is the “reflux” boundary required at the Neumann boundary in order to keep
particle temperature fixed. This is implemented by changing the velocity of a particle reflected
at this boundary with a flux-Maxwellian at the particle temperature in the direction of motion
at the end of a time step. The total amount of electrons (and hence average electron density
n̄e ) in the simulation domain was kept constant by re-introducing each electron lost to the wall
(Dirichlet boundary condition) uniformly within the volume with an ion pair. The electrons are
introduced with temperature Te from a Maxwellian distribution, and the ions sampled from the
flux-Maxwellian with temperature Ti . ∆x = λDe for the implicit code close to the grounded
boundary, and gets larger closer to the Neumann-symmetric boundary.

3. Benchmark Comparison
The solution to the benchmark model for Te = 5 eV, Ti = 1 eV, n̄e = 2.5×1016 m−3 , and domain
length 0.05 m was found. The ions have the mass and charge of a proton. It is compared to a
time averaged solution of the potential and density profiles from the explicit and implicit models
as shown in Figure 1. The implicit PIC used 64 nodes with ∆t = ω2pe and 2048 PPC. The explicit
code uses 128 PPC with ∆x = 0.5λDe (952 nodes) and ∆t = ω0.2 pe
, which ensures negligible effect
from the finite-grid instability. We see that the match between the PIC codes and benchmark
model are good, verifying the implementation used in the PIC codes.

17.5 3.0
15.0
2.5
12.5
ni (1016 m 3)

10.0 2.0
(V)

7.5
1.5
5.0
2.5 Explicit 1.0 Explicit
Implicit Implicit
0.0 Model Model
0.00 0.01 0.02 0.03 0.04 0.05 0.00 0.01 0.02 0.03 0.04 0.05
Distance (m) Distance (m)

Figure 1: Variations of ϕ and ni (ion density) over the domain. Shown are the solution to the
benchmark model (green), explicit PIC (dashed blue), and implicit PIC (dashed orange).

3
20th International Conference on Ion Sources IOP Publishing
Journal of Physics: Conference Series 2743 (2024) 012003 doi:10.1088/1742-6596/2743/1/012003

The reader should note that the implicit and explicit algorithms have a similar number of
simulated particles (NSP). Attempting to use the same PPC for the implicit as the explicit
drastically lowers the accuracy of the model, likely because of the lack of particle statistics in
the plasma sheath. In other words, the velocity distribution function for the particles is under-
resolved in the sheath. For this reason, it is useful to compare how the accuracy of the PIC
simulations changes as a function of NSP rather than PPC. To do this, an explicit run at 128
PPC, ∆x = 0.15λDe and ∆t = 0.05 ωpe is used as a reference (i.e. the ’true’ solution). The percent
difference relative to this reference for various PIC simulations is shown in Figure 2. A reduction
of NSP for implicit PIC generally leads to worse accuracy in the sheath and pre-sheath when
compared to the quasi-neutral region near the symmetric boundary. The implicit run at 15200
NSP is about 1.6× faster than the explicit run shown at 60864 NSP. However, the explicit PIC
can still go to lower NSP and still have relatively similar accuracy, which then eliminates this
time advantage.

3
0.0 2
1
100 × (ni ni, ref)/ni, ref

0.5
ref)/ ref

0
1.0 1
1.5 2
100 × (

2.0 Exp., 60864 NSP 3 Exp., 60864 NSP


Imp., 60864 NSP 4 Imp., 60864 NSP
2.5 Imp. 30432 NSP Imp. 30432 NSP
Imp. 15200 NSP 5 Imp. 15200 NSP
0.00 0.01 0.02 0.03 0.04 0.05 0.00 0.01 0.02 0.03 0.04 0.05
Distance (m) Distance (m)

Figure 2: Percent difference of ϕ and ni with respect to convergent solution over the domain for
PIC simulations with various NSP. The explicit PIC run uses ∆x = 0.5λDe and ∆t = ω0.2 pe
. The
2
implicit PIC runs use 64 nodes and ∆t = ωpe .

One should note that by having a large PPC for the implicit model, and keeping this the
same for the explicit model, the implicit case will have a significant gain in computation time.
This would be an impractical comparison though since for engineering purposes, one would
keep the PPC in the explicit model as low as possible while still retaining acceptable accuracy.
Therefore to increase the accuracy of the models, one needs to increase the NSP to increase
particle statistics in the sheath region. It was found that for high accuracy solutions though
(within 5% of the reference solution), an explicit model can generally have similar or slightly
slower computation times compared to the implicit by reducing the NSP. However, if the NSP
in the explicit case is ultra-low, to the point where there are less than 10 PPC on average,
the computation time plateaus because generating the solution to the field quantities on the
mesh takes more computation time than moving the particles. In addition, the lack of particle
statistics starts to severely reduce the accuracy of the explicit model. Since at high densities
explicit models are untenable from an engineering context, a user of an explicit model would
accept milder constraints on accuracy due to low NSP (or PPC) for shorter computation time, as
long as the resulting steady-state solution well represents the physics. Since there are stringent
requirements on ∆x and ∆t in explicit PIC, the best way to reduce time is reducing the number
of particles to the point where the field solver starts to become dominant.

4
20th International Conference on Ion Sources IOP Publishing
Journal of Physics: Conference Series 2743 (2024) 012003 doi:10.1088/1742-6596/2743/1/012003

This is done for an explicit PIC run with the parameters as stated previously, but with
n̄e = 1018 m−3 . A reference solution at ∆x = 0.5λDe and ∆t = ω0.2 pe
with 128 PPC (770048
NSP) was found. Then the NSP was lowered to achieve a percent difference of roughly 10%
in the voltage with respect to this reference. A few implicit runs were performed at 32 nodes
with ∆t = ω2pe using different NSP. These are shown in Figure 3. The red dots are for the
implicit with convergence criterion relaxed to 10−4 . We see that for each run with implicit PIC,
the overall percent differences in the potential profile are smaller when compared to the low
resolution explicit PIC. The percent differences in the particle density profiles do not change
significantly. Despite the better accuracy in potential, the 8000 NSP implicit run is about 8.6×
faster than the explicit run, while the 8000 NSP run with lower convergence criterion is 12×
faster. Assuming the amount of grid nodes and particles scale to the power of the dimension,
this would lead to more than 1000× speedup in 3D.

0
5
100 × (ni ni, ref)/ni, ref 10
ref)/ ref

10 5
15
0
100 × (

20 Exp., 64000 NSP Exp., 64000 NSP


Imp., 16000 NSP 5 Imp., 16000 NSP
25 Imp., 8000 NSP Imp., 8000 NSP
Imp., 8000 NSP, Imp., 8000 NSP,
30 low res. 10 low res.
0.00 0.01 0.02 0.03 0.04 0.05 0.00 0.01 0.02 0.03 0.04 0.05
Distance (m) Distance (m)

Figure 3: Percent difference of ϕ and ni with respect to convergent solution over the domain for
PIC simulations with various NSP at n̄e = 1018 m−3 . The explicit PIC run uses ∆x = 0.5λDe
and ∆t = ω0.2
pe
. The implicit PIC runs use 32 nodes and ∆t = ω2pe .

It should be noted that since these simulations are not self-consistent (particle temperatures
are set), the advantages of the implicit being energy-and-charge conserving will not be shown.
To show this, a self-consistent 1D discharge will need to be simulated in the future. In addition,
the non-linear iteration is not optimally preconditioned, which could potentially lead to even
larger speed-ups [24]. However, this work uses an analytical pusher for the particles in each sub-
step. In multiple dimensions, the additional complexity would likely require a Picard iteration
for the particles, which will likely generate further slowdown in runtime.

4. Conclusion
A charge-and-energy conserving implicit PIC code has been developed, and compared to an
explicit PIC code for a 1D bounded plasma benchmark. It was found that the implicit PIC
could achieve significant speed-ups compared to the explicit (up to 12×) when lowering the
number of simulated particles. Future work will be to apply a similar benchmark in 2D to
determine whether the speed-up scales to the power of the dimension as estimated here. In
addition, these simulations will be applied to a self-consistent discharge to determine whether
the stability of an implicit scheme will allow even less particles than an explicit.

5. Acknowledgements
We’d like to acknowledge that this project is funded by a MITACS grant with ID IT29655.

5
20th International Conference on Ion Sources IOP Publishing
Journal of Physics: Conference Series 2743 (2024) 012003 doi:10.1088/1742-6596/2743/1/012003

References
[1] Wolf B 2017 Handbook of Ion Sources ISBN 9781315214054
[2] Savard N 2022 Development and characterization of a Penning ion
source using helium Ph.D. thesis University of British Columbia URL
https://open.library.ubc.ca/collections/ubctheses/24/items/1.0412647
[3] Montellano I M, Wünderlich D, Mochalskyy S and Fantz U 2019 Journal of Physics D: Applied Physics 52
235202 URL https://dx.doi.org/10.1088/1361-6463/ab0f44
[4] Carlsson J, Kaganovich I, Powis A, Raitses Y, Romadanov I and Smolyakov
A 2018 Physics of Plasmas 25 061201 ISSN 1070-664X (Preprint
https://pubs.aip.org/aip/pop/article-pdf/doi/10.1063/1.5017467/15937917/061201 1 online.pdf)
URL https://doi.org/10.1063/1.5017467
[5] Fubiani G, Garrigues L, Hagelaar G, Kohen N and Boeuf J P 2017 New Journal of Physics 19 015002 URL
https://dx.doi.org/10.1088/1367-2630/19/1/015002
[6] Fubiani G, Agnello R, Furno I, Garrigues L, Guittienne P, Hagelaar G, Howling A, Jacquier R, Re-
man B, Simonin A and Taccogna F 2021 Physics of Plasmas 28 063503 ISSN 1070-664X (Preprint
https://pubs.aip.org/aip/pop/article-pdf/doi/10.1063/5.0044358/13316662/063503 1 online.pdf)
URL https://doi.org/10.1063/5.0044358
[7] Schiesko L, Wünderlich D and Montellano I M 2020 Journal of Applied Physics 127 033302 ISSN 0021-8979
(Preprint https://pubs.aip.org/aip/jap/article-pdf/doi/10.1063/1.5132596/16727197/033302 1 online.pdf)
URL https://doi.org/10.1063/1.5132596
[8] Birdsall C K and Langdon A B 2005 Plasma physics via computer simulation (Institute of Physics Pub.)
[9] Langdon A 1970 Journal of Computational Physics 6 247–267 ISSN 0021-9991 URL
https://www.sciencedirect.com/science/article/pii/0021999170900240
[10] Mason R J 1981 Journal of Computational Physics 41 233–244 ISSN 0021-9991 URL
https://www.sciencedirect.com/science/article/pii/0021999181900942
[11] Denavit J 1981 Journal of Computational Physics 42 337–366 ISSN 0021-9991 URL
https://www.sciencedirect.com/science/article/pii/0021999181902497
[12] Langdon A, Cohen B I and Friedman A 1983 Journal of Computational Physics 51 107–138 ISSN 0021-9991
URL https://www.sciencedirect.com/science/article/pii/0021999183900839
[13] Markidis S and Lapenta G 2011 Journal of Computational Physics 230 7037–7052 ISSN 0021-9991 URL
https://www.sciencedirect.com/science/article/pii/S0021999111003445
[14] Mattei S, Nishida K, Onai M, Lettry J, Tran M and Hatayama A
2017 Journal of Computational Physics 350 891–906 ISSN 0021-9991 URL
https://www.sciencedirect.com/science/article/pii/S0021999117306745
[15] Chen G, Chacón L and Barnes D 2011 Journal of Computational Physics 230 7018–7036 ISSN 0021-9991
URL https://www.sciencedirect.com/science/article/pii/S0021999111003421
[16] Eremin D 2022 Journal of Computational Physics 452 110934 ISSN 0021-9991 URL
https://www.sciencedirect.com/science/article/pii/S0021999121008299
[17] Chacón L, Chen G and Barnes D 2013 Journal of Computational Physics 233 1–9 ISSN 0021-9991 URL
https://www.sciencedirect.com/science/article/pii/S0021999112004275
[18] Chacón L and Chen G 2019 Journal of Computational Physics 391 216–225 ISSN 0021-9991 URL
https://www.sciencedirect.com/science/article/pii/S0021999119302785
[19] Taitano W 2010 Development of a Jacobian-free Newton-Krylov method with kinetic enslavement to implicitly
solve Vlasov-Poisson system in plasma physics Ph.D. thesis
[20] URL https://www.openmp.org/
[21] Conte S D and de Boor C 2017 Elementary Numerical Analysis (Philadelphia, PA: Society for Industrial and
Applied Mathematics) (Preprint https://epubs.siam.org/doi/pdf/10.1137/1.9781611975208) URL
https://epubs.siam.org/doi/abs/10.1137/1.9781611975208
[22] Emmert G A, Wieland R M, Mense A T and Davidson J N 1980 The Physics of Fluids 23 803–812 ISSN 0031-
9171 (Preprint https://pubs.aip.org/aip/pfl/article-pdf/23/4/803/12267918/803 1 online.pdf)
URL https://doi.org/10.1063/1.863062
[23] Procassini R J, Birdsall C K and Morse E C 1990 Physics of Fluids B: Plasma Physics 2 3191–3205 ISSN 0899-
8221 (Preprint https://pubs.aip.org/aip/pfb/article-pdf/2/12/3191/12275708/3191 1 online.pdf)
URL https://doi.org/10.1063/1.859229
[24] Chen G, Chacón L, Leibs C, Knoll D and Taitano W 2014 Journal of Computational Physics 258 555–567
ISSN 0021-9991 URL https://www.sciencedirect.com/science/article/pii/S0021999113007286

You might also like