CLUMPY  Version 2011.09_corr2
profiles.h File Reference

Profile and related functions (applicable for halos, sub-halos...) More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Functions

double rho_ZHAO (double &r, double par[5])
double rho_EINASTO (double &r, double par[3])
double rho_EINASTO_N (double &r, double par[3])
string get_name_prof (double par_prof[4])
double get_rsat (double par[6])
double get_rvir (double par[6], double const &rho_vir)
void rho (double &r, double par[6], double &res)
void rho2 (double &r, double par[6], double &res)
void r2rho (double &r, double par[6], double &res)
void r2rho2 (double &r, double par[6], double &res)
void rho_mix (double &r, double par[21], double &res)
void rho2_mix (double &r, double par[21], double &res)
void r2rho_mix (double &r, double par[21], double &res)
void r2rho2_mix (double &r, double par[21], double &res)
double factor_r_2_to_rscale (double par_prof[4])
double r_2_to_rscale (double const &r_2, double par_prof[4])
double rscale_to_r_2 (double const &rs, double par_prof[4])
void set_par0_given_mref (double par[6], double const &r_ref, double const &m_ref, double const &eps)
void set_par0_given_rhoref (double par[6], double &r_ref, double const &rho_ref)

## Detailed Description

Profile and related functions (applicable for halos, sub-halos...)

________________________________________

I. Dark Matter profiles

A DM profile is fully characterised by a normalisation , a scale radius , the physical size of the DM halo (usually taken to be , the virial radius), and several shape parameters. Note that an important quantity is , the radius for which the slope is , i.e.

which can be related to for any given profile (see below).

We implemented different families of such profiles in CLUMPY, assuming spherical symmetry.

• Zhao's profile (kZHAO in CLUMPY)
Many DM profiles used in the literature can be written in terms of a three parameter family (Hernquist 1990 and Zhao 1996):

• - normalisation . Beware, that with the above definition,
• - transition slope
• - outer slope
• - inner slope
For this profile, we have .

• Einasto's logarithmic inner-slope profiles
In the last decade, it has been realised that the inner slope of the DM halo should decrease as decreases, which has given rise to several logarithmic inner-slope parameterisations, generally based on the Einasto profile which follows

and was first used by Einasto to describe the mass and light distributions in galaxies. Note that it is formally identical to Sersic's law which is traditionally applied to projected (surface) density profiles rather that space density profiles. In the literature, two main expressions of the Einasto density profile of DM halos have been formulated, which may lead to some confusion.
• Standard Einasto (kEINASTO in CLUMPY)
It is used for instance in Navarro et al. (2004) and Springel et al. (2008), where

and both team find that the shape parameter allows a good description of the density profile of DM halos. Springel et al. (2008) also finds that describes well the spatial distribution of sub-halos . For this profile, we have
• - normalisation . With the above definition, we have
• - radius for which the slope is
• - shape parameter

• Einasto 's (kEINASTO_N in CLUMPY)
Merritt et al. (2006) implemented a so-called Einasto's that differs slightly from the original definition

The quantity is adjusted such as the total mass of an Einasto profile is given by Eqs. (20) and (22) of Merritt et al. 2006). For an integer, which is mandatory in CLUMPY, . The profile has been shown to provide good fits to N-body simulations, and (if ).
• - normalisation . With the above definition, we have
• - radius which contains half the mass of the halo
• - shape parameter (required to be an integer in CLUMPY)
For this profile, we have (Graham et al. 2006).

A few useful definitions of functions related to

Note that the expressions above are valid for the spherical-halo case only.

________________________________________

II. Popular profiles and their parameters

Dark matter simulations usually provide (from the total density of DM measured in shells) and , the spatial distribution of sub-clumps within a clump. The above families of profiles can be used to describe both the total DM density of a clump and their spatial distribution. Remember however that they will come with different values of their structural parameters , , etc.

In CLUMPY, we generically call the scale radius appearing in the different profiles. However, depending on the chosen parameterisation, it can mean , or (see profiles.h). It is up to the user to check that the values for he/she uses in the input parameter file are "realistic". In the same spirit, there are three shape parameters denoted , , and , although only is used for kEINASTO and kEINASTO_N (for which corresponds to ). The table below provides several shape parameters proposed in the literature. They also gives some "reasonable" values as found from simulations for the scale parameter for the Galaxy (or Galactic-type halos). Use with caution!

Refs
Iso 2. 2. 0. - 4 kpc 28 kpc
NFW 1. 3. 1. Navarro, Frenk & White (1997) 21.7 kpc -
Moore 1.5 3. 1.5 Moore et al. (1998) 34.5 kpc -
DMS04 1. 3. 1.2 Diemand, Moore & Stadel (2004) 32.6 -
EINASTO_N 6 - - Merritt et al. (2006) 250 kpc -
EINASTO 0.17 - - Navarro et al. (2004), Springel et al. (2008) 21.7 kpc -
EINASTO 0.68 - - Springel et al. (2008) - 199 kpc

From Lavalle et al. (2008).
From Tab. II of Fornengo, Pieri & Scopel (2004).

________________________________________

III. Implementation in the code and functions based on

For all applications and functions in other parts of the code (e.g., in clumps.h, jdsph.h), the profile families are never called directly. In practice, we use functions that can switch to the desired quantity: this switch is set by picking a value of the global enum gENUM_PROFILE constants, which is associated to the string name gNAMES_PROFILE[gENUM_PROFILE] (see params.h).

Beware that this "scale" radius means different things depending on what profile is considered: for standard configurations, for EINASTO, and for EINASTO_N. A list of "reasonable" values of taken from the above papers can be found above. In any case, the function set_par0_given_rhoref() will ensure that the proper normalisation par[0] is calculated, according to the specified "scale" radius.

For instance, setting the switch to the value kZHAO, gives gNAMES_PROFILE[kZHAO] = "ZHAO". This applies all the above profiles. Let us now describe all the functions of this file:

• rho_ZHAO(), rho_EINASTO(), and rho_EINASTO_N()
Parameters:
 [in] r Distance from the halo centre [kpc] [in] par[0] Normalisation: density or proxy for [in] par[1] Scale radius [kpc] [in] par[2] Shape parameter #1 [in] par[3] Shape parameter #2 [in] par[4] Shape parameter #3
Returns:
, where XXX = ZHAO, EINASTO, or EINASTO_N

• rho(), rho2(), r2rho(), and r2rho2()
The format of these functions is fn(double &r, double par[6], double &res), to get functions of .
Parameters:
 [in] r Radial distance from the halo centre [kpc] [in] par[0] Normalisation: density or proxy for [in] par[1] Scale radius [kpc] [in] par[2] Shape parameter #1 [in] par[3] Shape parameter #2 [in] par[4] Shape parameter #3 [in] par[5] card_profile (see enum gENUM_PROFILE in params.h) [out] res , , , or .
• rho_mix(), rho2_mix(), r2rho_mix(), and r2rho2_mix()
The format of these functions is fn(double &r, double par[21], double &res), such that they can be passed to the integrator for a more general profile (e.g.,
Parameters:
 [in] r Radial distance from the halo centre [kpc] [in] par[0] normalisation: density or proxy for [in] par[1] scale radius [kpc] [in] par[2] shape parameter #1 [in] par[3] shape parameter #2 [in] par[4] shape parameter #3 [in] par[5] card_profile (see enum gENUM_PROFILE in params.h) [in] par[6] UNUSED [in] par[7] UNUSED [in] par[8] UNUSED [in] par[9] UNUSED [in] par[10] switch_rho - selects which combination of and to use if 0, , if 1, , if 2, . [in] par[11] normalisation: density or proxy for [in] par[12] scale radius [kpc] [in] par[13] shape parameter #1 [in] par[14] shape parameter #2 [in] par[15] shape parameter #3 [in] par[16] card_profile (see enum gENUM_PROFILE in params.h) [in] par[17] UNUSED [in] par[18] UNUSED [in] par[19] UNUSED [in] par[20] UNUSED [out] res , , , or .
• get_name_prof() returns a string of the profile name/parameters to be used in displays
Parameters:
 [in] par_prof[0] Shape parameter #1 [in] par_prof[1] Shape parameter #2 [in] par_prof[2] Shape parameter #3 [in] par_prof[3] card_profile (see enum gENUM_PROFILE in params.h)
• get_rsat()
Parameters:
 [in] par[0] Normalisation: density or proxy for [in] par[1] Scale radius [kpc] [in] par[2] Shape parameter #1 [in] par[3] Shape parameter #2 [in] par[4] Shape parameter #3 [in] par[5] card_profile (see enum gENUM_PROFILE in params.h)
Returns:
Saturation radius [kpc] for which .

• get_rvir()
Parameters:
 [in] par[0] Normalisation: density or proxy for [in] par[1] Scale radius [kpc] [in] par[2] Shape parameter #1 [in] par[3] Shape parameter #2 [in] par[4] Shape parameter #3 [in] par[5] card_profile (see enum gENUM_PROFILE in params.h) [in] rho_vir DM density we wish to reach at the viral radius
Returns:
[kpc] such as to have .

• factor_r_2_to_rscale()
Parameters:
 [in] par[0] Shape parameter #1 [in] par[1] Shape parameter #2 [in] par[2] Shape parameter #3 [in] par[3] card_profile (see enum gENUM_PROFILE in params.h)
Returns:
, the factor to convert to and vice-versa.

• r_2_to_rscale() and rscale_to_r_2()
Parameters:
 [in] r_2(rs) Radius from which the slope is -2 (or scale radius ) [kpc] [in] par[0] Shape parameter #1 [in] par[1] Shape parameter #2 [in] par[2] Shape parameter #3 [in] par[3] card_profile (see enum gENUM_PROFILE in params.h)
Returns:

• set_par0_given_mref()
Parameters:
 [out] par[0] Proper normalisation to ensure for this profile [in] par[1] Scale radius [kpc] [in] par[2] Shape parameter #1 [in] par[3] Shape parameter #2 [in] par[4] Shape parameter #3 [in] par[5] card_profile (see enum gENUM_PROFILE in params.h) [in] r_ref Reference radius [kpc] [in] m_ref Mass within r_ref [ ] [in] eps - relative precision sought for the integration
• set_par0_given_rhoref()
Parameters:
 [out] par[0] Proper normalisation to ensure for this profile [in] par[1] Scale radius [kpc] [in] par[2] Shape parameter #1 [in] par[3] Shape parameter #2 [in] par[4] Shape parameter #3 [in] par[5] card_profile (see enum gENUM_PROFILE in params.h) [in] r_ref Reference radius [kpc] [in] rho_ref DM density value for the reference radius r_ref
________________________________________

IV. Plots of , , and

The following figures display a comparison of the various profiles in central regions. The saturation density is reached for some of them (1 )

1. DM smooth profile squared (normalised to at )
2. Function mass
3. Function intrinsic luminosity )
Remarks:
To calculate the mass and luminosity of a clump, the function shown in the last two previous plots need to be integrated. We split the integration in several parts to speed-up the calculation:

The first part is integrated with the linear step simpson_lin_adapt(), and the second and third parts and are integrated with the adaptive logarithmic step simpson_log_adapt(), as described in integr.h.

Definition in file profiles.h.