diff --git a/src/starformation/schaye08/starformation.h b/src/starformation/schaye08/starformation.h index 2c5a98922910d292b127e6122596763d6ff270aa..71182fd2202b330667bb26002dce4e8b215563ea 100644 --- a/src/starformation/schaye08/starformation.h +++ b/src/starformation/schaye08/starformation.h @@ -209,6 +209,33 @@ static void starformation_init_backend( starform->gamma = parser_get_opt_param_double( parameter_file, "SchayeSF:gamma", gamma_default); + /* Calculate the power law of the star formation */ + starform->nstar = (starform->nks - 1.f)/2.f; + + /* Get the appropriate constant to calculate the + * star formation constant */ + const double G_newton = phys_const->const_newton_G; + + /* Read the critical temperature from the parameter file */ + starform->T_crit = parser_get_param_double(parameter_file, + "SchayeSF:T_crit"); + + /* Read the gas fraction from the file */ + starform->fg = parser_get_param_double(parameter_file, + "SchayeSF:fg"); + + /* Read the normalization */ + const double normalization = parser_get_opt_param_double( + parameter_file, "SchayeSF:A", normalization_default); + + /* Read the Kennicutt-Schmidt power law exponent */ + starform->nks = parser_get_opt_param_double( + parameter_file, "SchayeSF:nks", KS_power_law_default); + + /* Read the heat capacity ratio gamma */ + starform->gamma = parser_get_opt_param_double( + parameter_file, "SchayeSF:gamma", gamma_default); + /* Calculate the power law of the star formation */ starform->nstar = (starform->nks - 1.f)/2.f; @@ -284,8 +311,8 @@ static void starformation_init_backend( * @param starform the star formation law properties. * */ static void starformation_print_backend( - const struct star_formation* starform - ){ + const struct star_formation* starform){ + message("Star formation law is Schaye and Dalla Vecchia (2008)" " with properties, normalization = %e, slope of the Kennicutt" "-Schmidt law = %e, gamma = %e, gas fraction = %e, critical "