3.2 Methods for Setting up Galaxy Simulations
3.2.1 The Distribution Function and Collisionless Systems
To set up anN-body simulation, it is desirable to generate particle distributions with density
profiles representative of observed galaxies. In this case, the spiral arms grow naturally and the model can be tuned to produce either grand-design galaxies or flocculent discs. However, such simulations may be computationally expensive. AnN-body model requires knowledge of
the system’s distribution function to sample the particles’ positions and velocities.
A problem in building N-body models is to obtain particle distributions that are repre-
sentative of a galaxy’s observed matter distribution and kinematics and that remain stable for several galactic rotations in a simulation. As a star orbits a galaxy, its path is gradually modified by interactions with neighbouring stars. This occurs on a relaxation timescale,
tr≈ 0.1N
lnN tc, (3.13)
istic particle velocity and Lis the scale of the system.
For self-gravitating systems, the relaxation time introduces a distinction between collisional and collisionless particle systems. For galaxies, tr ≫ tc and much larger than their typical
ages, thus it is possible to treat them as collisionless systems. This implies that the Collisionless Boltzmann Equation can be used to find a distribution function for generating initial conditions forN-body models. This is described in more detail in this subsection.
The Distribution Function
A system’s dynamical state is described by its phase-space coordinates: (q,p), where qand pare the generalised position and momentum vectors, respectively. A particle system can be
represented in phase-space by the distribution function (DF) f(q,p), which is defined such
that the number of particles δN in an element of hypervolume d3qd3pis (e. g. Binney and
Tremaine 2008):
δN= f(q,p)d3qd3p. (3.14)
The mass density as a function of position is obtained by multiplying equation (3.14) by the particle mass and integrating with respect top,
ρ(q) =
&
m f(q,p)d3p. (3.15)
Then, integrating this with respect toqgives the system’s total mass.
The Collisionless Boltzmann Equation
If collisions are neglected and mass conservation is assumed, it is possible to obtain (e. g. Bin- ney & Tremaine 2008):
∂f
∂t +∇X·(fX˙) =0, (3.16)
where X = (q,p)is the state vector. This is an expression for the CBE and is analogous to
the continuity equation. When collisions are not negligible, source and sink terms should be included in the right-hand-side of equation (3.16). By expanding the divergence and using the Lagrangian derivative, it can be rewritten as:
Df
3.2. Methods for Setting up Galaxy Simulations
For a Hamiltonian system,
˙ p=−∂H ∂q, ˙q= ∂H ∂p, (3.18) from which ∇X·X˙=∇q·˙q+∇p·˙p= ∂ ∂q ∂H ∂p − ∂ ∂p ∂H ∂q =0 (3.19)
This reduces equation (3.17) to
Df
Dt =0 (3.20)
which means that the DF is constant along a particle’s path (Binney and Tremaine 2008). Given that ˙X= (q˙, ˙p) = (q˙,−∇qΦ), equation (3.16) becomes:
∂f ∂t +q˙· * ∂f ∂q + − * ∂Φ ∂q + · * ∂f ∂p + =0. (3.21)
Implications of the CBE for theN-body problem
With the HamiltonianH=1/2v2+Φ(x), the CBE can be expressed in Cartesian positions and
velocities (e. g. Binney & Tremaine 2008):
∂f ∂t +v· *∂ f ∂x + − *∂ Φ ∂x + · *∂ f ∂v + =0. (3.22)
This is a first-order linear partial differential equation and its behaviour can be studied with the method of characteristics (e. g. Courant & Hilbert 1962). Given a first-order linear PDE of the form n ! i=1 Ki∂f ∂xi =L, (3.23)
whereKi =Ki(xi, ...,xn), L= L(xi, ...,xn), f is the function of interest, and ∂∂x
i is the partial
derivative with respect to thei-th variable, the characteristic curves are given by
dxi
ds =Ki(x1, ...,xn), (3.24)
which are a function of a parameters. The solution to this system of differential equations
To picture the idea, equation (3.23) is written as n ! i=1 Ki∂f ∂xi − L=0, (3.25)
which can be expressed as the dot product of a vector of the coefficients andLin the last compo-
nent〈K1, ...,Kn,L〉and of derivatives with a−1 in the last component:〈∂f/∂x1, ...,∂f/∂xn,−1〉.
The last vector is essentially the normal to the solution surface, so the first has to be tangent to this surface. This means that the characteristic curves trace the surface of the solution.
Applying this method to the CBE means that the coefficients for the spatial derivatives
(∂/∂xi)are the velocities vi, and for the velocity derivatives(∂/∂vi)the coefficients are the
local acceleration components expressed as ∂Φ/∂xi. The coefficient for ∂f/∂t is 1, which
means that the characteristics can be parametrised in terms of time. Then, the characteristic curves become dxi dt =vi, (3.26) dvi dt =ai =− ∂Φ ∂xi , (3.27) df dt =0 (3.28)
whereicorresponds to each coordinate(x,y,z). The first two sets of equations are simply the
equations of motion of the particles subject to the potential Φ. The third equation states that f is constant along a curve, which is another statement of equation (3.20) (e. g. King 1990;
Dosch & Zank 2016).
This result has an important implication for theN-body problem. It shows that integrating
the equations of motion of an ensemble of particles sampled from a given DF as an N-body
simulation is a method for solving the CBE (Binney & Tremaine, 2008). This means that if the DF of a galaxy model is specified, it can be used to generate the initial conditions for anN-body
simulation of this system. The question becomes how to specify such a DF and determine if it will be in equilibrium.
Equilibrium solutions of the CBE
A given DF satisfying the CBE may not necessarily be a steady-state solution. An isolated galaxy can be assumed to be in a steady-state (King, 1990). For this reason, in galaxy simulations it
3.2. Methods for Setting up Galaxy Simulations
is of interest to find a steady-state DF.
As described in Courant & Hilbert (1962), a PDE of the form of equation (3.23) has a solution that depends only onn−1 parameters
Ci=Gi(xi, ...,xn), (3.29)
wherenis the number of independent variables. The functionGi remains constant along the
characteristic curves and the solution to the PDE can be expressed as a function depending on these integrals: F(G1, ...,Gn−1).
For the CBE, xi →(x,v)andGbecomes a function of position and velocity that is constant
along the particle’s path. Such quantities are the integrals of motion of the orbit. Then, a distribution function that satisfies the CBE can be expressed as a function of the integrals of motion (e. g. King 1990).
The Jeans (1915) theorem provides a useful result for specifying an equilibrium DF. It states that any DF that depends only on the integrals of motion will be a steady-state solution of the CBE. The strong Jeans theorem says that for a galaxy with a potential that allows orbits such that most of these are regular, then the DF can be expressed in terms of three independent isolating integrals of motion (see Binney & Tremaine (2008) for a discussion).
This provides a useful principle for specifying a DF for modelling particle distributions in terms of integrals such as the energy, the angular momentum, or the vertical component of the angular momentum. However, its application for full galaxy models is not straightforward and has been widely studied in the literature. For example, Shu (1969) presented a DF for a razor- thin disc as a model for stellar discs. A more detailed disc DF is proposed in Dehnen (1999). Hernquist (1990) obtained a DF for a density profile assumed to be representative of spherical systems such as galactic bulges. Osipkov (1979) and Merritt (1985) explored DFs for spherical systems applicable to galactic halos. Examples of full galaxy models based on combinations of the individual DFs for the bulge, disc, and halo have been proposed in Kuijken & Dubinski (1995) and McMillan & Dehnen (2007), to mention some examples.