From 78019f2c6e852b25b2a351eabc44bc7045da3fc1 Mon Sep 17 00:00:00 2001 From: Folkert Nobels <nobels@strw.leidenuniv.nl> Date: Fri, 24 May 2019 14:45:44 +0200 Subject: [PATCH] Add mean baryonic density criteria instead of critical density criteria --- src/star_formation/EAGLE/star_formation.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/star_formation/EAGLE/star_formation.h b/src/star_formation/EAGLE/star_formation.h index aaec019710..79e9a42f5e 100644 --- a/src/star_formation/EAGLE/star_formation.h +++ b/src/star_formation/EAGLE/star_formation.h @@ -212,9 +212,9 @@ INLINE static int star_formation_is_star_forming( const struct cooling_function_data* restrict cooling, const struct entropy_floor_properties* restrict entropy_floor_props) { - /* Minimal density (converted from critical density) for star formation */ - const double rho_crit_times_min_over_den = - cosmo->critical_density * starform->min_over_den; + /* Minimal density (converted from mean baryonic density) for star formation */ + const double rho_mean_b_times_min_over_den = + cosmo->mean_density_Omega_b * starform->min_over_den; /* Physical density of the particle */ const double physical_density = hydro_get_physical_density(p, cosmo); @@ -225,7 +225,7 @@ INLINE static int star_formation_is_star_forming( * threshold is reached or if the metallicity dependent * threshold is reached, after this we calculate if the * temperature is appropriate */ - if (physical_density < rho_crit_times_min_over_den) return 0; + if (physical_density < rho_mean_b_times_min_over_den) return 0; /* In this case there are actually multiple possibilities * because we also need to check if the physical density exceeded -- GitLab