Skip to content
Snippets Groups Projects
Commit 40e3198b authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Corrected typo in the normalisation constant of the KS law. Units are kpc^2 not pc^2

parent 1bc5d153
Branches
Tags
1 merge request!705Star formation following Schaye08
...@@ -443,8 +443,10 @@ INLINE static void starformation_init_backend( ...@@ -443,8 +443,10 @@ INLINE static void starformation_init_backend(
phys_const->const_solar_mass / phys_const->const_solar_mass /
(phys_const->const_parsec * phys_const->const_parsec); (phys_const->const_parsec * phys_const->const_parsec);
/* Get the SF surface density unit Msun / pc^2 / yr in internal units */ /* Get the SF surface density unit Msun / kpc^2 / yr in internal units */
const double Msun_per_pc2_per_year = Msun_per_pc2 / phys_const->const_year; const double kpc = 1000. * phys_const->const_parsec;
const double Msun_per_kpc2_per_year =
phys_const->const_solar_mass / (kpc * kpc) / phys_const->const_year;
/* Conversion of number density from cgs */ /* Conversion of number density from cgs */
const double number_density_from_cgs = const double number_density_from_cgs =
...@@ -495,7 +497,7 @@ INLINE static void starformation_init_backend( ...@@ -495,7 +497,7 @@ INLINE static void starformation_init_backend(
/* Convert to internal units */ /* Convert to internal units */
starform->KS_normalization = starform->KS_normalization =
starform->KS_normalization_MSUNpYRpKPC2 * Msun_per_pc2_per_year; starform->KS_normalization_MSUNpYRpKPC2 * Msun_per_kpc2_per_year;
/* Calculate the starformation pre-factor (eq. 12 of Schaye & Dalla Vecchia /* Calculate the starformation pre-factor (eq. 12 of Schaye & Dalla Vecchia
* 2008) */ * 2008) */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment