This website was created to provide a basic understanding of simulations used in Astrophysics & Cosmology. In particular, basic tools used to simulate on different scales and what information these simulations can provide. Some basic examples have also been provided.
Preliminary Information
Software
The simulations were implemented using python 3.7. More information can be found here. The code used to create the simulations can also be found on GitHub here. Gravity The force exerted on particles used in these simulations is a modification to Newtons Law of gravitation that simplifies the coding: \[\vec{F}_{i}=\sum_{j \neq i} \frac{M^{2}\left(\overrightarrow{r_{j}}-\overrightarrow{r_{i}}\right)}{\left|\overrightarrow{r_{j}}-\vec{r}_{i}\right|^{3}} \] Note here that the particles mentioned above depends on the scale of the simulation we wish to simulate. If for example we are looking at regions on the order of a solar system, our 'particles' may be planets. However, in the case of cosmological simulations, our 'particles' may represent clusters of galaxies. Softening The force equation above also describes strong collisions of particles. For our simulations however, collisions are rare. Therefore, we modify the above equation so that strong collisions do not occur by enforcing a minimum distance between particles. |
The Expanding Universe The expansion of the universe is an intrinsic expansion (that is accelerating!) where the scale of space itself increases. As a result, the distance between any two events (instantaneous occurrence associated with a point in spacetime), will increase. Therefore, on small time scales, and depending on what we wish to simulate, we may neglect this intrinsic expansion. However, on cosmological time scales, and if we wish to simulate something resembling our observable universe, the expansion will need to be considered. Periodic Boundary Conditions Particles close to the boundaries of the cube may feel gravitational forces from matter outside the region of our simulation. Furthermore, the cosmological principle states that the universe is essentially homogeneous at large scales. If required, we can account for this by adding a periodic term to the force equation, and insisting that particles leaving one boundary will reappear on another. As implied by the definition of the cosmological principle above, periodic boundary conditions become particularly important in the largest scale simulations. |
Planetary Scales
Simulations of planetary scales can be considered isolated systems and likely do not require boundary conditions or the inclusion of the expansion of the universe. Some examples of why these simulations are useful include providing detail on the history of our solar system and helping to test theories of gravity.
Galactic Scales
Galactic scales are intermediary. Depending on what we are investigating, and at what epoch, simulations at these scales may require expansion effects. Feedback processes and re-ionization of the universe are more accurately modelled with expansion effects. However, when investigating galactic collisions & mergers these events could potentially be modelled as an isolated system.
Cosmological Scales
The cosmological scales are the largest and require boundary conditions. Furthermore, if we wish to model our observable universe, consideration must be made for the expansion. At these scales we investigate the large scale structure of the universe, which not only provide information regarding the density of the components within the universe, but also can provide a wealth of information on the early universe and the Big Bang.
Beyond N-body Simulations
Although N-body simulations are exact, they consider pairwise calculation of gravitational forces which scales computationally as \[O(N^2)\] To reduce computational effort, more advanced methods are used. Some examples of these are, the tree-code method, which groups distant particles together, the particle-mesh method which overlays a grid on the simulation that allows for the addition of sub-grids in area's of interest and a combination of the two.