Mostly taken from Andrey’s PM notes

In proper coordinates, gravitational potential and equations of motion for particles:

time and spatial derivatives are also with respect to proper coordinates.

Now we change to comoving variables and make them dimensionless:

where $\tilde{\textbf{x}}$, $\textbf{v} \, = \, \textbf{u} - H\textbf{r} \, = \, a\mathbf{ \dot{x} }$ is the peculiar velocity and $\phi$ is the peculiar potential defined as (Peebles 1980)

where

To make the variables dimensionless we define:

Now using the scale factor as the time variable, the Poisson equation and the equations of motion are:

here $\delta$ is the overdensity in comoving coordinates and $\dot{a}$ is given by:

In dimensionless variables these equations become:

where $\tilde{\delta} = \tilde{\rho} - 1$ and

To do the time evolution of the DM particles, these last equations are used in the three main steps of the PM code:

• Solve the Poisson equation using the density field estimated with the current particle positions.

• Advance the momentum of the particles using the new potential.

• Update particle positions using the new momenta ( Leap-Frog scheme ).