Modified in order to be compatible with Python3 among other minor changes, possibly making it easier for future usage and maintenance.
Made possible with advice and contributions from Prof. Dr. Rubens Machado.
Script that generates a snapshot in the GADGET-2 format containing a galaxy cluster halo in equilibrium. The halo is made of a dark matter component and a gas component, with the latter representing the ICM. Each of these components follows a Dehnen density profile (Dehnen 1993), with gamma=0 or gamma=1. If gamma=1, then the profile corresponds to a Hernquist profile (Hernquist 1990). See Ruggiero & Lima Neto (2017) for a discussion on the difference between these two options.
The value for the gravitational constant G used in this code is such that the unit for length is 1.0 kpc, for mass 1.0e10 solar masses, and for velocity 1.0 km/s. This is the default for GADGET-2, and works out of the box in RAMSES with the DICE patch.
(and the names of the packages in Debian-like systems)
- NumPy (python-numpy)
- SciPy (python-scipy)
- Cython (cython), higher than 0.17.4
- Matplotlib (python-matplotlib)
- Argparse (python-argparse)
- python-dev
This code doesn't need to be installed, but a custom Cython
library which is included has to be compiled. For that, just cd to
/cluster
and run make
. A new file, named optimized_funcions.so
,
will be created, and then clustep.py
will be ready for execution.
You can run python clustep.py --help
to see the message below.
Please check out the params_cluster.ini
file to see the available free parameters.
usage: clustep.py [-h] [--no-dm] [--no-gas] [-i params_cluster.ini] [-o init.dat] [--hdf5]
Generates an initial conditions file for a galaxy cluster halo simulation.
optional arguments:
-h, --help show this help message and exit
--no-dm No dark matter particles in the initial conditions. The dark matter
potential is still used when calculating the gas temperatures.
--no-gas Gas is completely ignored, and only dark matter is included.
-i params_cluster.ini
The name of the input file.
-o init.dat The name of the output file.
--hdf5 Writes output in HDF5 format. If this flag is not parsed, the programs
defaults to Gadget2 bynary format
Some analysis scripts are also included in the analysis/
folder, you can try
these out. I haven't documented them because they are changed all the time and
aren't all that well written as of now.
Credits for Prof. Dr. Rubens Machado (http://paginapessoal.utfpr.edu.br/rubensmachado), for the vital support and suggestions in writing this code.
Feel free to use this code in your work, but please link this page and Ruggiero's original code in your paper.