Equations (8 - 9) are solved using finite
differences with a constant step in space
x =
y =
z = 1 and a constant step in the expansion parameter
a . We
use the ``leap-frog'' scheme to advance coordinates and velocities
from one moment to another. (In the following we drop tildas for all
dimensionless variables.) At any moment
an = a0 + n
a , we have the
coordinates
x n and the potential
. Velocities
p n - 1/2 are defined at
an - 1/2 = an -
a/2 . The coordinates and the velocities for the next moment are found using:
| p n + 1/2 | = |
p n - 1/2 - F(an) | |
| x n + 1 | = |
x n + p n + 1/2 | (14) |
In order to solve eq.(9) we approximate the Laplacian operator using the 7-point ``crest'' template:
|
| (15) |
where
(i,j,k) = 1,...,Ngrid .
This leads to a large system of linear equations relating unknown
variables
with known right-hand side of the discrete
form of the Poisson equation
3
(
- 1)/2a .
The system of equations is solved exactly by the FFT technique.
The density on the mesh
is obtained from particle
positions using the Cloud-In-Cell method. In order to find the
``acceleration''
g = - ![]()
for each particle, the gravitational
potential is differentiated on the mesh:
|
gx = - ( | (16) |
Thus, the main scheme of the PM method consists of the following four blocks repeated every time step: