Skip to content
Snippets Groups Projects
Commit de5de7c1 authored by Folkert Nobels's avatar Folkert Nobels
Browse files

Add the effective equation of state to the print backend

parent 24451b39
Branches
Tags
1 merge request!705Star formation following Schaye08
...@@ -115,6 +115,9 @@ struct star_formation { ...@@ -115,6 +115,9 @@ struct star_formation {
/*! EOS density norm */ /*! EOS density norm */
double EOS_density_norm; double EOS_density_norm;
/*! EOS density norm in user units */
float EOS_density_norm_HpCM3;
}; };
/* /*
...@@ -379,9 +382,10 @@ INLINE static void starformation_init_backend( ...@@ -379,9 +382,10 @@ INLINE static void starformation_init_backend(
parameter_file, "SchayeSF:EOS_Jeans_GammaEffective"); parameter_file, "SchayeSF:EOS_Jeans_GammaEffective");
starform->EOS_temperature_norm = parser_get_param_double( starform->EOS_temperature_norm = parser_get_param_double(
parameter_file, "SchayeSF:EOS_Jeans_TemperatureNorm_K"); parameter_file, "SchayeSF:EOS_Jeans_TemperatureNorm_K");
starform->EOS_density_norm = starform->EOS_density_norm_HpCM3 =
parser_get_param_double(parameter_file, parser_get_param_double(parameter_file,
"SchayeSF:EOS_JEANS_DensityNorm_HpCM3") * "SchayeSF:EOS_JEANS_DensityNorm_HpCM3");
starform->EOS_density_norm = starform->EOS_density_norm_HpCM3 *
conversion_numb_density; conversion_numb_density;
/* Calculate the EOS pressure normalization */ /* Calculate the EOS pressure normalization */
...@@ -445,17 +449,22 @@ INLINE static void starformation_print_backend( ...@@ -445,17 +449,22 @@ INLINE static void starformation_print_backend(
message("Star formation law is Schaye and Dalla Vecchia (2008)"); message("Star formation law is Schaye and Dalla Vecchia (2008)");
message("With properties: normalization = %e Msun/kpc^2/yr, slope of the" message("With properties: normalization = %e Msun/kpc^2/yr, slope of the"
"Kennicutt-Schmidt law = %e, gas fraction = %e, threshold " "Kennicutt-Schmidt law = %e and gas fraction = %e ",
"density = %e #/cm^3 and threshold temperature = %e K", starform->KS_normalization_MSUNpYRpKPC2, starform->KS_power_law, starform->fgas);
starform->KS_normalization_MSUNpYRpKPC2, starform->KS_power_law, starform->fgas, message("The effective equation of state is given by: polytropic "
starform->density_threshold_HpCM3, starform->Temperature_threshold); "index = %e , normalization density = %e #/cm^3 and normalization temperature = "
message("Density threshold to form stars is given by Schaye (2004)"); "%e K", starform->polytropic_index, starform->EOS_density_norm_HpCM3,
starform->EOS_temperature_norm);
message("Density threshold is given by Schaye (2004)");
message( message(
"the normalization of the star formation law is given by" "the normalization of the density threshold is given by"
" %e #/cm^3, with metallicity slope of %e, and metallicity normalization" " %e #/cm^3, with metallicity slope of %e, and metallicity normalization"
"of %e, the maximum density threshold is given by %e #/cm^3", "of %e, the maximum density threshold is given by %e #/cm^3",
starform->density_threshold_HpCM3, starform->n_Z0, starform->Z0, starform->density_threshold_HpCM3, starform->n_Z0, starform->Z0,
starform->density_threshold_max_HpCM3); starform->density_threshold_max_HpCM3);
message("Temperature threshold is given by Dalla Vecchia and Schaye (2012)");
message(
"The temperature threshold is given by: %e K", starform->Temperature_threshold);
} }
#endif /* SWIFT_SCHAYE_STARFORMATION_H */ #endif /* SWIFT_SCHAYE_STARFORMATION_H */
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment