Wiki
Clone wikiSunrise / RunningWithArepo
The Sunrise/Arepo interface
If you are so lucky so as to have access to Arepo and want to process your outputs with Sunrise, here are some things to keep in mind.
The Sunrise/Arepo interface is different from how it handles all the other codes. For SPH codes, Sunrise does its own gridding of the density field, and for adaptive-mesh codes like ART and Enzo, Sunrise reads the grid structure directly using a file written by YT. Arepo uses a Voronoi tessellation of space (See the paper for more info) and to take maximum advantage of this, Sunrise traces the photons through the same tessellation. Since Arepo has a highly optimized routine for doing the tessellation, Sunrise makes use of this by linking directly to the Arepo code and making calls to Arepo functions to load the snapshot and do the tessellation.
Apart from the need to link to the Arepo library when compiling Sunrise, here are a few things to keep in mind:
- You enable the Arepo functionality by setting
nbodycod
toarepo
. - The Arepo simulation box extends from (0,0,0) to (boxsize,boxsize,boxsize), so objects are generally not at the origin. To have the cameras point at the correct location, set either
translate_origin
to point the cameras at a specific location or `center_galaxy -1' to center on the particles. - The Arepo units are always h^-1, so to ensure consistency, the
h-inverse_units
keyword is automatically set to true when running sfrhist. This means that the positions you see will be different from what they are in Arepo, e.g. if the galaxy is at x=200 in Arepo, when running Sunrise it will be at x=200/h. - Like in grid codes, there is no way to associate a specific parcel of gas between snapshots. This means that the functionality for setting metallicity and age distributions in sfrhist using the
metallicity_gradient1
and associated keywords does not work. Instead, you need to create the galaxies with correct initial metallicity and age distributions of gas and stars. The new "MakeGalaxy" code is capable of this. (When running sfrhist, you should see the message "Ages and metallicities of old star particles already set in snapshot".) - You may have to increase
MaxMemSize
in the Arepo parameter file. Because Sunrise runs Arepo in single-processor mode, it needs to be able to fit the entire simulation in memory on one task. - You can safely set
load_gas
andload_halo
tofalse
in the sfrhist configuration, which will speed up loading of the snapshot.
Updated