HEAD | PREVIOUS |

Atomistic and Particle-in-Cell Simulation

Figure 10.1: Approximate space and time scales for Molecular Dynamics
atomistic simulation of condensed matter. Molecular vibration must
be accommodated. Then computations of heroic effort are required
to explore many orders of magnitude above
it.

For materials modelling where we are considering atoms whose thermal
velocities are perhaps $1000$m/s, moving over lengths perhaps
${10}^{-7}$m, the required rough time duration is ${10}^{-10}$s for
Figure 10.2: Example of a crystal lattice atomistic simulation in three
dimensions. Study of a region of nanocrystaline metal with 840,000
atoms ready to be deformed. (Courtesy: Ju Li, Massachusetts
Institute of Technology.)

Atomistic modelling therefore represents the interatomic forces
arising from
electron orbital interactions 1. | Calculate the force at current position $\mathit{x}$ on each particle due to all the others. |

2. | Accelerate and move particles for $\mathit{\Delta}t$, getting new velocities $\mathit{v}$ and positions $\mathit{x}$. |

3. | Repeat from 1. |

$\begin{array}{ccc}\multicolumn{1}{c}{{\mathit{x}}_{n+1}}& =\hfill & {\mathit{x}}_{n}+{\mathit{v}}_{n}\mathit{\Delta}t+{\mathit{a}}_{n}\mathit{\Delta}{t}^{2}/2\hfill \\ \multicolumn{1}{c}{{\mathit{v}}_{n+1}}& =\hfill & {\mathit{v}}_{n}+({\mathit{a}}_{n}+{\mathit{a}}_{n+1})\mathit{\Delta}t/2\hfill & \hfill \hspace{1em}\hspace{1em}\hspace{1em}\hspace{1em}\hspace{1em}\hspace{1em}(10.1)\end{array}$ |

where ${\mathit{a}}_{n}$ is the acceleration corresponding to position ${\mathit{x}}_{n}$.${}^{62}$ We also usually need to store a record of where the particles go, since that is the major result of our simulation. And we need methods to analyse and visualize the large amount of data that will result: the number of steps ${N}_{t}$ times the number of particles ${N}_{p}$ times at least 6 (3 space, and 3 velocity) components.

Figure 10.3: Potential and corresponding force forms for (a)
Lennard-Jones (eq. 10.2) and (b) Morse (eq. 10.3) expressions.

A very common form of interatomic
potential that gives this kind of attraction and repulsion is the
Lennard-Jones (12:6) potential (see
Fig. 10.3(a))
$\mathit{F}=-\nabla U\mathrm{\hspace{1em}\hspace{1em}\hspace{1em}\hspace{1em}\hspace{1em}\hspace{1em}}\text{with}\mathrm{\hspace{1em}\hspace{1em}\hspace{1em}\hspace{1em}\hspace{1em}\hspace{1em}}U={E}_{0}[{\left(\frac{{r}_{0}}{r}\right)}^{12}-2{\left(\frac{{r}_{0}}{r}\right)}^{6}]$ | $(10.2)$ |

$U={E}_{0}({e}^{-2\mathit{\alpha}(r-{r}_{0})}-2{e}^{-\mathit{\alpha}(r-{r}_{0})}).$ | $(10.3)$ |

$U=\sum _{i}{U}_{1}({\mathit{x}}_{i})+\sum _{\mathit{ij}}{U}_{2}({\mathit{x}}_{i},{\mathit{x}}_{j})+\sum _{\mathit{ijk}}{U}_{3}({\mathit{x}}_{i},{\mathit{x}}_{j},{\mathit{x}}_{k})+\dots$ | $(10.4)$ |

Figure 10.4: Neighbor List (a), and Block (b), algorithms enable testing
only nearby particles for force influence. The neigbors whose
influence must be calculated are inside the radius ${r}_{l}$ or inside
the shaded region.

Suppose ${r}_{c}$ is the
cutoff radius beyond which interparticle forces are negligible. For
each particle $i$, designate as neighbors particles within a larger
sphere $|{\mathit{x}}_{j}-{\mathit{x}}_{i}|=r<{r}_{l}$. Suppose the fastest speed a
particle has is ${v}_{\mathit{max}}$; then we know that no particle, starting
from outside the sphere ${r}_{l}$, can reach the sphere ${r}_{c}$ in less than
a time $({r}_{l}-{r}_{c})/{v}_{\mathit{max}}$, that is, in fewer timesteps than
${N}_{l}=({r}_{l}-{r}_{c})/{v}_{\mathit{max}}\mathit{\Delta}t$. Consequently, we need to update the
neighbor lists only every ${N}_{l}$ steps. The average neighbor list cost
per step is ${N}_{p}^{2}/{N}_{l}$. This is smaller than ${N}_{p}^{2}$, and if ${N}_{l}$ is large
(because the maximum velocity is small), much smaller. However, it is
still of order ${N}_{p}^{2}$.${}^{63}$
$\nabla}^{2}\mathit{\phi}=\frac{{d}^{2}\mathit{\phi}}{{\mathit{dx}}^{2}}=-\frac{{\mathit{\rho}}_{q}}{{\mathit{\epsilon}}_{0}}=-\frac{q[n(x)-{n}_{i}]}{{\mathit{\epsilon}}_{0}$ | $(10.5)$ |

1. | Assign the charge from all the particles onto the grid cells. |

2. | Solve Poisson's equation to find the potential ${\mathit{\phi}}_{j}$. |

3. | For each particle, find $\nabla \mathit{\phi}$ at its position, ${x}_{i}$, by interpolation from the ${x}_{j}$. |

4. | Accelerate, by the corresponding force, and move the particles. |

5. | Repeat from 1. |

Figure 10.6: A curved grid (relatively unusual for PIC) shaded to
represent the density normalized to the distant value.
A few representative particle orbits in the vicinity of a spherical
object are shown, and arrows indicate the mean ion
velocity.

Why introduce this cell mesh? Because this approach is computationally
far more efficient than adding up the
inverse square law forces between individual particles. An atomistic
pair-force approach costs $~{N}_{p}^{2}$ per step. By contrast the
particle moving stage, once the force is known is $~{N}_{p}$. If the
potential grid has a total of ${N}_{g}$ points, then an efficient
iterative Poisson solution costs $~{N}_{g}{N}_{g}^{1/{N}_{d}}$ per step, in
${N}_{d}$ dimensions${}^{65}$, or can
be done by tridiagonal elimination in
$~{N}_{g}$ operations in one dimension. Generally the number of
particles per cell is fairly large, so ${N}_{g}$ is much smaller than
${N}_{p}$ and the Poisson cost scales linearly or nearly linearly with
${N}_{g}$. Therefore for practical purposes, the costs are dominantly
those of interpolating the electric field to the particle and moving
it: an order ${N}_{p}$ cost, not ${N}_{p}^{2}$ like the pair-force approach.
Sometimes the dynamics of the ions is just as important to model as
the electrons. Then the ions must be treated through the PIC approach
as a second species of particles obeying Newton's law. Actually it is
sometimes advantageous to treat only the ions this way, and treat
electrons as a continuum whose density is a known function of
$\mathit{\phi}$. The latter approach is
often called "Hybrid" PIC.
$\frac{d}{\mathit{dt}}\left(\genfrac{}{}{0ex}{}{\mathit{x}}{\mathit{v}}\right)=\left(\genfrac{}{}{0ex}{}{\mathit{v}}{\mathit{a}}\right).$ | $(10.6)$ |

Figure 10.7: Example of phase-space locations of electrons. A
one-dimensional $v$ versus $x$ calculation is illustrated, using
the code XES1 (by Birdsall, Langdon, Verboncoeur and Vahedi,
originally distributed with the text by Birdsall and Langdon) for
two streams of particles giving rise to an instability whose
wavelength is four times the domain length. Each electron position
is marked as a point. Their motion can be viewed like a
movie.

Particle in cell codes are a backbone of much computational plasma
physics, important for modelling semiconductor processing tools, space
interactions, accelerators, and fusion experiments. An example of a
one-dimensional PIC calculation is shown in Fig. 10.7. They are
particularly useful for collisionless or nearly collisionless problems
that are widespread in the field. They can also be modified to include
collisions of various different types, as the conditions require
them. In plasmas, though, charged-particle collisions are often
dominated by small scattering angles and are much better approximated
by a Fokker-Planck diffusion in phase space than by discrete events.
Figure 10.8: Example of position plot in two space dimensions of tenuous
gas flow past a plate. Different colors (shadings) indicate molecules that
have been influenced by the plate through collisions.

Figure 10.9: Particles that cross outer periodic boundaries (a) are
relocated to the opposite side of the domain. This is equivalent (b)
to modelling an (infinite) periodic array made up of repetitions
of the smaller domain.

Periodic boundaries mean that the computation represents the phenomena
of a periodic array of domains all connected to one another and all
doing the same thing. Sometimes that is actually what one wants. But
more often it is an approximation to a larger domain. If nothing of
interest happens at a scale equal to or larger than the smaller
computational domain, then the artifically imposed periodicity is
unimportant, and the periodic conditions are a convenient way to
represent the computation of a small sub-volume within a much larger,
uniform, medium. Fig. 10.9 illustrates this point.
Sometimes, however, it is not appropriate to use periodic
conditions. In that case a particle that leaves the domain is simply
removed from the calculation. If the calculation is approximately
steady, then clearly there must also be particles created within the
domain or Well, it depends on how fine-scale the potential variation might be. That depends on the parameters of the particles (electrons). Suppose they have approximately a Maxwell-Boltzmann velocity-distribution of temperature ${T}_{e}$. We can estimate the finest scale of potential variation as follows. We'll consider just a one-dimensional problem. Suppose there is at some position $x$, a perturbed potential $\mathit{\phi}(x)$ such that $|\mathit{\phi}|<<{T}_{e}/e$, measured from a chosen reference ${\mathit{\phi}}_{\mathit{\infty}}=0$ in the equilibrium background where the density is ${n}_{e}={n}_{\mathit{\infty}}={n}_{i}$. (Referring to the background as $\mathit{\infty}$ is a helpful notation that avoids implying the value at $x=0$; it means the distant value.) Then the electron density at $x$ can be deduced from the fact that $f(v)$ is constant along orbits (characteristics). In the collisionless steady-state, energy is conserved; so for any orbit $\frac{1}{2}{\mathit{mv}}^{2}-e\mathit{\phi}=\frac{1}{2}{\mathit{mv}}_{\mathit{\infty}}^{2}$, where ${v}_{\mathit{\infty}}$ is the velocity on that orbit when it is "at infinity" in the background, where $\mathit{\phi}=0$. Consequently, $f(v)={f}_{\mathit{\infty}}({v}_{\mathit{\infty}})={n}_{\mathit{\infty}}\sqrt{\frac{m}{2\mathit{\pi}{T}_{e}}}\mathrm{exp}(-{\mathit{mv}}_{\mathit{\infty}}^{2}/2{T}_{e})={n}_{\mathit{\infty}}\sqrt{\frac{m}{2\mathit{\pi}{T}_{e}}}\mathrm{exp}(-{\mathit{mv}}^{2}/2{T}_{e}+e\mathit{\phi}/{T}_{e})$. Hence at $x$, $f(v)$ is Maxwellian with density $n=\int f(v)\mathit{dv}={n}_{\mathit{\infty}}\mathrm{exp}(e\mathit{\phi}/{T}_{e})$. Now let's find analytically the steady potential arising for $x>0$ when the potential slope at $x=0$ is $d\mathit{\phi}/\mathit{dx}=-{E}_{0}$. Poisson's equation in one-dimension is

$\frac{{d}^{2}\mathit{\phi}}{{\mathit{dx}}^{2}}=-\frac{{\mathit{en}}_{\mathit{\infty}}}{{\mathit{\epsilon}}_{0}}[1-\mathrm{exp}(e\mathit{\phi}/{T}_{e})]\approx \left(\frac{{e}^{2}{n}_{\mathit{\infty}}}{{\mathit{\epsilon}}_{0}{T}_{e}}\right)\mathit{\phi}.$ | $(10.7)$ |

$\mathit{\phi}(x)={E}_{0}\mathit{\lambda}{e}^{-x/\mathit{\lambda}},\mathrm{\hspace{1em}\hspace{1em}\hspace{1em}}\text{where}\mathrm{\hspace{1em}\hspace{1em}\hspace{1em}}{\mathit{\lambda}}^{2}=\left(\frac{{e}^{2}{n}_{\mathit{\infty}}}{{\mathit{\epsilon}}_{0}{T}_{e}}\right).$ | $(10.8)$ |

1. The Verlet scheme for particle advance is

$\begin{array}{ccc}\multicolumn{1}{c}{{\mathit{x}}_{n+1}}& =\hfill & {\mathit{x}}_{n}+{\mathit{v}}_{n}\mathit{\Delta}t+{\mathit{a}}_{n}\mathit{\Delta}{t}^{2}/2\hfill \\ \multicolumn{1}{c}{{\mathit{v}}_{n+1}}& =\hfill & {\mathit{v}}_{n}+({\mathit{a}}_{n}+{\mathit{a}}_{n+1})\mathit{\Delta}t/2.\hfill & \hfill \hspace{1em}\hspace{1em}\hspace{1em}\hspace{1em}\hspace{1em}\hspace{1em}(10.9)\end{array}$ |

Suppose that the velocity at integer timesteps is related to that at half integer timesteps by ${\mathit{v}}_{n}=({\mathit{v}}_{n-1/2}+{\mathit{v}}_{n+1/2})/2$. With this identification, derive the Verlet scheme from the leap-frog scheme,

$\begin{array}{ccc}\multicolumn{1}{c}{{\mathit{x}}_{n+1}}& =\hfill & {\mathit{x}}_{n}+{\mathit{v}}_{n+1/2}\mathit{\Delta}t\hfill \\ \multicolumn{1}{c}{{\mathit{v}}_{n+3/2}}& =\hfill & {\mathit{v}}_{n+1/2}+{\mathit{a}}_{n+1}\mathit{\Delta}t,\hfill & \hfill \hspace{1em}\hspace{1em}\hspace{1em}\hspace{1em}\hspace{1em}\hspace{1em}(10.10)\end{array}$ |

and thus show they are equivalent.

2. A block algorithm is applied to an atomistic simulation in a cubical 3 dimensional region, containing ${N}_{p}=1000000$ atoms approximately uniformly distributed. Only two-particle forces are to be considered. The cut-off range for particle-particle force is 4 times the average particle spacing. Find (a) The optimal size of blocks into which to divide the domain for fastest execution. (b) How many force evaluations per time-step will be required. (c) If the force evaluations require 5 multiplications, a Verlet advance is used, and the calculation is done on a single processor which takes 1 nanosecond per multiplication on average, roughly what is the total time taken per timestep (for the full 1,000,000 particles).

3. (a) Prove from the definition of a characteristic (see section 8.3.2) that the equation of the characteristics of the collisionless Boltzmann equation is

$\frac{d}{\mathit{dt}}\left(\genfrac{}{}{0ex}{}{\mathit{x}}{\mathit{v}}\right)=\left(\genfrac{}{}{0ex}{}{\mathit{v}}{\mathit{a}}\right).$ | $(10.11)$ |

HEAD | NEXT |