Next: An example 1D PIC
Up: Particle-in-cell codes
Previous: Evaluation of electron number
Consider the solution of Poisson's equation:
![\begin{displaymath}
\frac{d^2\phi(x)}{dx^2} = \rho(x),
\end{displaymath}](img1129.png) |
(303) |
where
. Note that
in normalized
units. Let
and
.
We can write
which automatically satisfies the periodic boundary conditions
and
.
Note that
, since
. The other
are obtained
from
![\begin{displaymath}
\hat{\rho}_j = \frac{1}{J}\sum_{j'=0,J-1}\rho_{j'} \,{\rm e}^{-{\rm i}\,j\,j'\,2\,\pi/J},
\end{displaymath}](img1143.png) |
(306) |
for
.
The Fourier transformed version of Poisson's equation yields
![\begin{displaymath}
\hat{\phi}_0 = 0
\end{displaymath}](img1144.png) |
(307) |
and
![\begin{displaymath}
\hat{\phi}_j = - \frac{\hat{\rho}_j}{j^2\,\kappa^2}
\end{displaymath}](img1145.png) |
(308) |
for
, where
. Finally,
![\begin{displaymath}
\hat{\phi}_j = \hat{\phi}^\ast_{J-j}
\end{displaymath}](img1148.png) |
(309) |
for
to
, which ensures that the
remain real.
The discretized version of Eq. (297) is
![\begin{displaymath}
E_j = \frac{\phi_{j-1}-\phi_{j+1}}{2\,\delta x}.
\end{displaymath}](img1152.png) |
(310) |
Of course,
and
are special cases which can be resolved using the periodic
boundary conditions.
Finally, suppose that the coordinate of the
th electron lies between the
th and
th
grid-points: i.e.,
. We can then use linear interpolation to
evaluate the electric field seen by the
th electron:
![\begin{displaymath}
E(r_i) = \left(\frac{x_{j+1}-r_i}{x_{j+1}-x_j}\right)E_j+\left(\frac{r_i - x_j}{x_{j+1}-x_j}\right)
E_{j+1}.
\end{displaymath}](img1154.png) |
(311) |
Next: An example 1D PIC
Up: Particle-in-cell codes
Previous: Evaluation of electron number
Richard Fitzpatrick
2006-03-29