genhalo: Generate an equilibrium Hernquist halo

Description Usage Arguments Details Value Author(s) See Also Examples

Description

This function generates a Herquist halo in thermal equilibrium. You can add net spatial and velocity offsets, making it easy to generate a family of halos for Gadget ICs.

Usage

1
2
genhalo(x = 0, y = 0, z = 0, vx = 0, vy = 0, vz = 0, Npart = 1000, Mpart = 1,
 conc = 10, iseed = 87618820, Munit=1e10, Lunit=1e3, Vunit=1, IDoffset=0)

Arguments

x

Net x positional offset in units of Lunit (default Kpc)

y

Net y positional offset in units of Lunit (default Kpc)

z

Net z positional offset in units of Lunit (default Kpc)

vx

Net x velocity offset in units of Vunit (default km/s)

vy

Net y velocity offset in units of Vunit (default km/s)

vz

Net z velocity offset in units of Vunit (default km/s)

Npart

The number of particles within the Virial radius desired (number of particles generated will be a few 10

Mpart

The mass of each particle in units of Munit (default 1e10*Msun)

conc

The concentration of the profile desired

iseed

The initial random seed

Munit

Mass unit relative to Msun for Mpart, default is 1e10 (i.e. 1e10*Msun)

Lunit

x, y, z distance unit scaling relative to parsecs, default is 1e3 (i.e. Kpc)

Vunit

vx, vy, vz velocity unit scaling relative to km/s, default is 1 (i.e. km/s)

IDoffset

The offset for the ID numbering- this is helpful when joining together multiple ICs

Details

This function runs a Fortan routine that guarantees the gneerated halo is in thermal equilibrium.

Value

part

A data.frame containing the main particle level information. Columns included are:

ID particle ID
x x position in units of Lunit (default Kpc)
y y position in units of Lunit (default Kpc)
z z position in units of Lunit (default Kpc)
vx x velocity in units of Vunit (default km/s)
vy y velocity in units of Vunit (default km/s)
vz z velocity in units of Vunit (default km/s)
Mass particle mass in units of Munit (default 1e10*Msun)
params

A vector containing key set up information:

ID particle ID
Npart Number of particles within Virial radius
Mpart Mass of each particle in units of Msun
Mvir The mass of the halo within the virial radius in units of Msun
Mtot The mass of all particles generated in units of Msun
sigma Velocity dispersion of particles (implied directly from Mvir) in units km/s
conc Hernquist profile concentration
iseed Initial random seed

Author(s)

Aaron Robotham, Chris Power

See Also

snapread,snapwrite,addhead,genparam,cosdist,virialfuncs

Examples

1
2
3
4
5
temp=genhalo()

str(temp)

plot(temp$part[,c('x','y')],pch='.',xlim=c(-100,100),ylim=c(-100,100))

asgr/simpack documentation built on May 12, 2019, 4:40 a.m.