4
$\begingroup$

I want to use GADGET-4 "a parallel cosmological N-body and SPH code meant for simulations of cosmic structure formation and calculations relevant for galaxy evolution and galactic dynamics" or similar computational tools to study and emulate how two galaxies interact, based on a set of initial conditions (ICs) that I define. I tried GADGET - 4 for a set of demo ICs that came with the model. However, I could not find any tool to define the ICs of my choice. Is there some cookbook I can refer to which will guide me on how to go about the same?

$\endgroup$

1 Answer 1

4
$\begingroup$

Whether there is a tool that allows to define ICs of your choice, mainly depends on what is your choice. If you want to start from cosmological initial conditions, there are various flags in the code that can help you do that. See section "IC Generation" of the Gadget-4 manual. As instance:

NGENIC = 256 This master switch enables the creation of cosmological initial conditions for simulations with periodic boundary conditions. The value of NGENIC should be set to the FFT-grid size used for IC generation, which should be at least as fine as the particle resolution per dimension. If the code is started without restartflag (i.e. when normally initial conditions are read), the code instead creates the ICs first, followed by evolving them with the code, i.e. in this case the initial conditions do not need to exist on disk. One can however also start the code with restartflag 6, in which case the ICs are produced and written to disk, followed by a stop of the code. One can then also use the produced files as ICs in a regular start of GADGET-4 without having the NGENIC option set.

Otherwise, if you want to simulate a particular region of space, such as a single galaxy, then the most correct way would be to first run a cosmological simulation (or download the data from a simulation already done) and then zoom-in in a particular region, where your object of interest is forming. You can take the initial conditions from the cosmological simulation and then increase the resolution as necessary. Anyway, it's not something that can be done in an afternoon, there are many subtleties involved. Hydro simulations are complicated.

Maybe you could find some useful references in this review

Cosmological Simulations of Galaxy Formation - Vogelsberger (2019)

or in this document

Cosmological Zoom Simulations

Otherwise, if you want to simulate something very specific, such as a particular geometrical configuration not necessarily related to astrophysics, if no one has yet tried this configuration and published the initial conditions, then you should write some code to generate it for you.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .