Next: Solution of Poisson's equation
Up: Particleincell codes
Previous: Solution of electron equations
In order to obtain the electron number density
from the electron coordinates we adopt a socalled particleincell (PIC) approach.
Let us define a set of equally
spaced spatial gridpoints located at coordinates

(300) 
for , where
. Let
.
Suppose that the th electron lies between the th and th gridpoints:
i.e.,
. We let

(301) 
and

(302) 
Thus, increases by 1 if the electron is at the th gridpoint,
increases by 1 if the electron is at the th gridpoint, and and
both increase by if the electron is halfway between the two gridpoints, etc.
Performing a similar assignment for each electron in turn allows us to
build up the from the electron coordinates (assuming that all the are initialized
to zero at the start of this process).
Next: Solution of Poisson's equation
Up: Particleincell codes
Previous: Solution of electron equations
Richard Fitzpatrick
20060329