Skip to content

Modularize Stellar Feedback in GEAR for Pre-Supernova Prescriptions

In this MR, I'm preparing GEAR module for our future pre-supernova feedback prescriptions. The refactoring changes the structure but should be identical to the previous version in terms of physical output until the new pre-SN prescription is implemented in a future MR.

There is no new physics implemented.

Changelog:

  • I split the stellar evolution functions (stellar_evolution_evolve_spart() and stellar_evolution_evolve_individual_star()) into smaller functions to handle supernova and pre-supernova feedback separately (stellar_evolution_compute_preSN_feedback_individual_star(), stellar_evolution_compute_SN_feedback_individual_star(), stellar_evolution_compute_preSN_feedback_spart() and stellar_evolution_compute_SN_feedback_spart(). Now, the stellar evolution functions only handle common computations. Hence, the SN feedback logic was moved to the new SN functions. Currently, the pre-SN feedback functions are placeholders for the physics.
  • Note that these changes are made for both individual stars, continuous and SSP spart.
  • I added an attribute to flag a spart as dead after it goes into SN (feedback_data.is_dead)
  • I added a timestep function for the feedback and propagated this change to all feedback modules. Currently, it's only a placeholder for future timestep criteria and returns FLT_MAX.

Merge request reports

Loading