Skip to content

Support feedback from resolved Type II supernovae#434

Open
hsinhaoHHuang wants to merge 20 commits intogamer-project:mainfrom
hsinhaoHHuang:FB_ResolvedSNeII
Open

Support feedback from resolved Type II supernovae#434
hsinhaoHHuang wants to merge 20 commits intogamer-project:mainfrom
hsinhaoHHuang:FB_ResolvedSNeII

Conversation

@hsinhaoHHuang
Copy link
Copy Markdown
Contributor

@hsinhaoHHuang hsinhaoHHuang commented Feb 14, 2025

Goal

  • To support the Type II SNe feedback for isolated galaxy simulations.

Changes

  • Generalize the feedback to the leaf patches on levels < MAX_LEVEL

    • Change the option FB_LEVEL to FB_MIN_LEVEL to specify the minimum AMR level to apply feedback.
    • Add an array recording the non-leaf patches as an argument to the feedback routine. Non-local feedback should not be applied to the non-leaf patches in the feedback routine.
    • Particles in the non-leaf patches will not give feedback.
  • Add feedback routine FB_Resolved_SNeII() and its runtime options FB_RESOLVED_SNEII* in Input__Parameter

    • Suitable when there is sufficiently high star particle mass resolution to have at most one SN per particle (Maximum star particle mass*FB_RESOLVED_SNEII_N_PER_MASS<=1).
    • Suitable when there is sufficiently high grid resolution to resolve the Sedov phase of the blast wave caused by SN (so no kinetic/momentum feedback is needed).
    • Each newly formed star particle will be randomly sampled as an SN progenitor with a probability based on the star particle mass and the number of SN per stellar mass (FB_RESOLVED_SNEII_N_PER_MASS).
    • Each SN has the same fixed delay time (FB_RESOLVED_SNEII_DELAY_TIME). The explosion time is then decided during the star formation.
    • Each SN explosion deposits the thermal energy, mass, and metal (FB_RESOLVED_SNEII_EJECT_ENGY, FB_RESOLVED_SNEII_EJECT_MASS, FB_RESOLVED_SNEII_EJECT_METAL) into surrounding fluid cells where the particle is located.
    • If the mass of the cell where the particle is in is sufficient, then the feedback is applied to a single cell. Otherwise, the diameter of the feedback region will increase (1, 2,… FB_GHOST_SIZE+1) until the enclosed mass is higher than the given threshold FB_RESOLVED_SNEII_MIN_M_GAS. The feedback of mass and energy will be distributed uniformly in an inscribed sphere with the decided diameter.
    • Turn on FB_RESOLVED_SNEII_RECORD to record the information of the feedback event.
    • Must turn on --feedback=true and --par_attribute_flt=1(to have the ParSNIITime attribute) for configure.py during compilation.
  • Add a new test problem, Hydro/SNFeedbackBlastWave

    • To simulate the effect when an SN explodes in a background ISM environment.
    • To see the blast wave caused by the SN explosion and compare it to Hydro/BlastWave.
    • To test the delay time of the SN explosion.
    • To test the amount of the deposited energy, mass, and metal by the SN.
  • Add SNeII feedback in Hydro/AGORA_IsolatedGalaxy

    • To test the number of randomly sampled SNe and compare it to the number of stars.
    • To test the delay time of the SN by examining the recorded SNII explosion time.
    • This is for testing only and is not physically reasonable (the star particle mass is too large for this feedback scheme).

Results

Results of the SNeII feedback in Hydro/SNFeedbackBlastWave

  • Input
    • Background density = 1.0e-22 g/cm^3
    • Background temperature = 10 K
    • Grid resolution = 3.5 pc
    • Star particle mass = 100 Msun
    • Star metal mass = 12.95 Msun
    • Star particle velocity ~ 17 km/s along the diagonal line of the box
    • SN delay time = 10 Myr
    • SN deposited internal energy = 1.0e51 erg
    • SN deposited mass = 15 Msun
    • SN deposited metal = 3 Msun
  • Slices of density
    • See the blast wave
      Slice_z_density
  • Slices of temperature
    • See the total internal energy increases by 10^51 erg at t = 10 Myr
      Slice_z_temperature
  • Slices of metal density
    • See the total metal mass increases by 3 Msun at t = 10 Myr while the particle metal mass decreases by 3 Msun and the particle total mass decreases by 15 Msun.
      Slice_z_metal_density
  • Without the deposited mass and compared to the Hydro/BlastWave test problem (with the modified input files attached in example/test_problem/Hydro/SNFeedbackBlastWave/ForBlastWave/) --> very similar
    SNFeedbackBlastWave BlastWave
    image image
    image image
  • Non-local feedback tests
    • background $\rho=10^{-24}\ \mathrm{g/cm^3}$, $dh=3.5\ \mathrm{pc}$, gas mass per cell = $0.63\ M_\odot$,target minimum gas mass = $10\ M_\odot$, actual enclosed mass = $12\ M_\odot$

      Slic_3
      image

    • background $\rho=10^{-24}\ \mathrm{g/cm^3}$, $dh=3.5\ \mathrm{pc}$, gas mass per cell = $0.63\ M_\odot$,target minimum gas mass = $1000\ M_\odot$, actual enclosed mass = $246\ M_\odot$ (limited by FB_GHOST_SIZE = 8)
      Slic_5
      image

    • background $\rho=10^{-24}\ \mathrm{g/cm^3}$, $dh=3.5\ \mathrm{pc}$, gas mass per cell = $0.63\ M_\odot$, target minimum gas mass = $10\ M_\odot$, actual enclosed mass = $5.1\ M_\odot$. When the particle is too close to the AMR coarse-fine boundary, the feedback region will be limited such that no feedback will be applied at the coarse level.
      Slic_7
      image

  • Non-MAX_LEVEL feedback
    • FB_MIN_LEVEL = 3, MAX_LEVEL = 4. The feedback can work as usual on the leaf-patches of Lv 3.
      Slic_1
      Data_000010_Slice_z_temperature_zoom-in_1
    • FB_MIN_LEVEL = 3, MAX_LEVEL = 4. The feedback will not cross the AMR coarse-fine boundary and is only applied to the leaf patches.
      Slic_2
      Data_000010_Slice_z_temperature_zoom-in_2

Results of the SNeII feedback in Hydro/AGORA_IsolatedGalaxy

  • Input
    • SF_CREATE_STAR_MIN_STAR_MASS = 3.2e4 Msun
    • FB_RESOLVED_SNEII_N_PER_MASS = 1.0e-5 per Msun
    • FB_RESOLVED_SNEII_DELAY_TIME = 100.0 Myr
      --> Note that the parameters for SNeII feedback are not physical and are for testing only.
  • Particle mass with exploded SN per year compared to the formed star mass per year, which are consistent. (Assumed each star particle has the same mass as the minimum star mass)
    image
  • The bitwise reproducibility with different MPI ranks and OpenMP threads are checked for non-local feedback.

@hyschive hyschive added particle Particles hydro Hydrodynamics test Test problems new feature labels Feb 15, 2025
@hsinhaoHHuang
Copy link
Copy Markdown
Contributor Author

I have updated the non-local feedback part, and this PR is ready for review again.

@hsinhaoHHuang
Copy link
Copy Markdown
Contributor Author

I have updated the feedback for leaf patches on non-MAX_LEVEL, and this PR is ready for review again.

@hyschive hyschive removed the request for review from ChunYen-Chen February 10, 2026 03:56
@hyschive hyschive self-requested a review February 10, 2026 03:56
@hyschive hyschive assigned hyschive and unassigned ChunYen-Chen Feb 10, 2026
@hyschive hyschive requested review from ChunYen-Chen and removed request for hyschive February 10, 2026 03:57
@hyschive hyschive assigned ChunYen-Chen and unassigned hyschive Feb 10, 2026
@hyschive hyschive requested review from HsunYeong and removed request for ChunYen-Chen February 12, 2026 08:18
@hyschive hyschive assigned HsunYeong and unassigned ChunYen-Chen Feb 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hydro Hydrodynamics new feature particle Particles test Test problems

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants