Skip to content
Snippets Groups Projects
Commit 28632968 authored by Darwin's avatar Darwin Committed by Matthieu Schaller
Browse files

GEAR: Fix improper handling of IMF transition in star_population_continuous_IMF

parent a410a0f1
Branches
Tags
3 merge requests!2112Prep for remix merge,!2109Catching the zoom branch up with master,!2101GEAR: Fix improper handling of IMF transition in star_population_continuous_IMF
...@@ -492,16 +492,25 @@ void stellar_evolution_evolve_spart( ...@@ -492,16 +492,25 @@ void stellar_evolution_evolve_spart(
/* Star particles representing only the continuous part of the IMF need a /* Star particles representing only the continuous part of the IMF need a
special treatment. They do not contain stars above the mass that separate the special treatment. They do not contain stars above the mass that separate the
IMF into two parts (variable called minimal_discrete_mass_Msun in the sink IMF into two parts (variable called minimal_discrete_mass_Msun in the sink
module). So, if m_beg_step > minimal_discrete_mass_Msun, you don't do module). So, if m_end_step > minimal_discrete_mass_Msun, you don't do
feedback. Note that the sm structure contains different information for the feedback. Note that the sm structure contains different information for the
'first stars' and the 'late stars'. The right sm data is passed to this 'first stars' and the 'late stars'. The right sm data is passed to this
function so we do not need any special treatment here. */ function so we do not need any special treatment here. */
if (sp->star_type == star_population_continuous_IMF) { if (sp->star_type == star_population_continuous_IMF) {
/* If it's not time yet for feedback, exit. Notice that both masses are in /* If it's not time yet for feedback, exit. Notice that both masses are in
solar mass. */ solar mass. */
if (m_beg_step > sm->imf.minimal_discrete_mass_Msun) { if (m_end_step > sm->imf.minimal_discrete_mass_Msun) {
return; return;
} }
/* If we are in a case where
m_beg_step > minimal_discrete_mass_Msun > m_end_step,
then we need to be careful. We don't want feedback from the discrete
part, only the continuous part. Hence, we need to update m_beg_step.
*/
if (m_beg_step > sm->imf.minimal_discrete_mass_Msun) {
m_beg_step = sm->imf.minimal_discrete_mass_Msun;
}
} }
/* Check if the star can produce a supernovae */ /* Check if the star can produce a supernovae */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment