diff --git a/doc/RTD/source/SubgridModels/EAGLE/index.rst b/doc/RTD/source/SubgridModels/EAGLE/index.rst index 2e6d19199531e2010c3a6ebbee04a17a08bf433c..55ce89ac3d1b50374a807b49b74b892ffa283de1 100644 --- a/doc/RTD/source/SubgridModels/EAGLE/index.rst +++ b/doc/RTD/source/SubgridModels/EAGLE/index.rst @@ -547,6 +547,89 @@ For a normal EAGLE run, that section of the parameter file reads: Stellar enrichment: Wiersma+2009b ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +The enrichment is governed by three "master" parameters in the +``EAGLEFeedback`` section of the parameter file. Each individual channel +can be switched on or off individually: + +.. code:: YAML + + # EAGLE stellar enrichment master modes + EAGLEFeedback: + use_AGB_enrichment: 1 # Global switch for enrichement from AGB stars. + use_SNII_enrichment: 1 # Global switch for enrichement from SNII stars. + use_SNIa_enrichment: 1 # Global switch for enrichement from SNIa stars. + +Setting one of these switches to 0 will cancel the mass transfer, metal +mass transfer and energy transfer (AGB only) from the stars. + +The lifetime and yield tables are provided to the code via pre-computed +tables whose location is given by the ``filename`` parameter. + +Choice of IMF properies +----------------------- + +Enrichment from SNII & AGB stars +-------------------------------- + +Enrichment from SNIa stars +-------------------------- + +The enrichment from SNIa is done over the lifetime of the stars and uses a +delay time distribution (DTD) to parametrize the number of SNIa events for +a star of a given age. Two functional forms are available: an exponentially +decaying function and a power-law with a slope of -1. The parameter +``SNIa_DTD`` can hence take the two values: ``PowerLaw`` or +``Exponential``. + +In the case of an exponential DTD, two parameters must be defined, the +normalisation (``SNIa_DTD_exp_norm_p_Msun``) and the time-scale +(``SNIa_DTD_exp_timescale_Gyr``). The original EAGLE model is reproduced by +setting the parameters to :math:`0.002` and :math:`2.0` respectively. + +In the case of a power-law DTD, only a normalisation needs to be provided +via the parameter (``SNIa_DTD_power_law_norm_p_Msun``). The examples in the +repository use a value of :math:`0.0012` for this. + +Additionally, the age above which SNIa stars start to go off has to be +provided. Below that age, there are no explosions; above that age, the DTD +is used to determine the number of supernovae exploding in a given +time-step. This is controlled by the parameter ``SNIa_DTD_delay_Gyr`` which +sets the minimal age of SNIa in giga-years. A value of :math:`0.04~\rm{Gyr} += 40~\rm{Myr}` is used in all the examples. This corresponds +approximatively to the lifetime of stars of mass :math:`8~\rm{M}_\odot`. + +Finally, the energy injected by a single SNIa explosion has to be provided +via the parameter ``SNIa_energy_erg``. The canonical value of +:math:`10^{51}~\rm{erg}` is used in all the examples. + +The SNIa section of the YAML file for an original EAGLE run looks like: + +.. code:: YAML + + # EAGLE-Ref SNIa enrichment and feedback options + EAGLEFeedback: + use_SNIa_feedback: 1 + use_SNIa_enrichment: 1 + SNIa_DTD: Exponential + SNIa_DTD_exp_norm_p_Msun: 0.002 + SNIa_DTD_exp_timescale_Gyr: 2.0 + SNIa_DTD_delay_Gyr: 0.04 + SNIa_energy_erg: 1.0e51 + +whilst for the more recent runs we use: + +.. code:: YAML + + # EAGLE-Ref SNIa enrichment and feedback options + EAGLEFeedback: + use_SNIa_feedback: 1 + use_SNIa_enrichment: 1 + SNIa_DTD: PowerLaw + SNIa_DTD_power_law_norm_p_Msun: 0.0012 + SNIa_DTD_delay_Gyr: 0.04 + SNIa_energy_erg: 1.0e51 + + .. _EAGLE_feedback: Supernova feedback: Dalla Vecchia+2012 & Schaye+2015 @@ -575,9 +658,11 @@ Supernova feedback: Dalla Vecchia+2012 & Schaye+2015 SNII_energy_fraction_n_0_H_p_cm3: 1.4588 # Pivot point for the birth density dependance of the SNII energy fraction in cm^-3. SNII_energy_fraction_n_Z: 0.8686 # Power-law for the metallicity dependance of the SNII energy fraction. SNII_energy_fraction_n_n: 0.8686 # Power-law for the birth density dependance of the SNII energy fraction. - SNIa_max_mass_Msun: 8.0 # Maximal mass considered for SNIa feedback and enrichment in solar masses. - SNIa_timescale_Gyr: 2.0 # Time-scale of the exponential decay of the SNIa rates in Gyr. - SNIa_efficiency_p_Msun: 0.002 # Normalisation of the SNIa rates in inverse solar masses. + SNIa_DTD: PowerLaw # Functional form of the SNIa delay time distribution Two choices: 'PowerLaw' or 'Exponential'. + SNIa_DTD_delay_Gyr: 0.04 # Stellar age after which SNIa start in Gyr (40 Myr corresponds to stars ~ 8 Msun). + SNIa_DTD_power_law_norm_p_Msun: 0.0012 # Normalization of the SNIa delay time distribution in the power-law DTD case (in Msun^-1). + SNIa_DTD_exp_norm_p_Msun: 0.002 # Normalization of the SNIa delay time distribution in the exponential DTD case (in Msun^-1). + SNIa_DTD_exp_timescale_Gyr: 2.0 # Time-scale of the SNIa delay time distribution in the exponential DTD case (in Gyr). SNIa_energy_erg: 1.0e51 # Energy of one SNIa explosion in ergs. AGB_ejecta_velocity_km_p_s: 10.0 # Velocity of the AGB ejectas in km/s. SNII_yield_factor_Hydrogen: 1.0 # (Optional) Correction factor to apply to the Hydrogen yield from the SNII channel. @@ -586,7 +671,7 @@ Supernova feedback: Dalla Vecchia+2012 & Schaye+2015 SNII_yield_factor_Nitrogen: 1.0 # (Optional) Correction factor to apply to the Nitrogen yield from the SNII channel. SNII_yield_factor_Oxygen: 1.0 # (Optional) Correction factor to apply to the Oxygen yield from the SNII channel. SNII_yield_factor_Neon: 1.0 # (Optional) Correction factor to apply to the Neon yield from the SNII channel. - SNII_yield_factor_Magnesium: 2.0 # (Optional) Correction factor to apply to the Magnesium yield from the SNII channel. + SNII_yield_factor_Magnesium: 4.0 # (Optional) Correction factor to apply to the Magnesium yield from the SNII channel. SNII_yield_factor_Silicon: 1.0 # (Optional) Correction factor to apply to the Silicon yield from the SNII channel. SNII_yield_factor_Iron: 0.5 # (Optional) Correction factor to apply to the Iron yield from the SNII channel. @@ -594,6 +679,11 @@ Note that the value of ``SNII_energy_fraction_n_0_H_p_cm3`` given here is different from the value (:math:`0.67`) reported in table 3 of `Schaye (2015) <http://adsabs.harvard.edu/abs/2015MNRAS.446..521S>`_ , as a factor of :math:`h^{-2} = 0.6777^{-2} = 2.1773` is missing in the paper. + +The Magnesium yields from SNII have also been doubled since the +original EAGLE simulations were run. + + .. _EAGLE_black_hole_seeding: diff --git a/examples/EAGLE_ICs/EAGLE_12/eagle_12.yml b/examples/EAGLE_ICs/EAGLE_12/eagle_12.yml index cf4d711c5cb3bff4e355587343a33282f03a84b9..a6964ea3039615c8cf6534c59d45101515edca07 100644 --- a/examples/EAGLE_ICs/EAGLE_12/eagle_12.yml +++ b/examples/EAGLE_ICs/EAGLE_12/eagle_12.yml @@ -153,9 +153,9 @@ EAGLEFeedback: SNII_energy_fraction_n_0_H_p_cm3: 1.4588 # Pivot point for the birth density dependance of the SNII energy fraction in cm^-3. SNII_energy_fraction_n_Z: 0.8686 # Power-law for the metallicity dependance of the SNII energy fraction. SNII_energy_fraction_n_n: 0.8686 # Power-law for the birth density dependance of the SNII energy fraction. - SNIa_max_mass_Msun: 8.0 # Maximal mass considered for SNIa feedback and enrichment in solar masses. - SNIa_timescale_Gyr: 2.0 # Time-scale of the exponential decay of the SNIa rates in Gyr. - SNIa_efficiency_p_Msun: 0.002 # Normalisation of the SNIa rates in inverse solar masses. + SNIa_DTD: PowerLaw # Functional form of the SNIa delay time distribution. + SNIa_DTD_delay_Gyr: 0.04 # Stellar age after which SNIa start in Gyr (40 Myr corresponds to stars ~ 8 Msun). + SNIa_DTD_power_law_norm_p_Msun: 0.0012 # Normalization of the SNIa delay time distribution (in Msun^-1). SNIa_energy_erg: 1.0e51 # Energy of one SNIa explosion in ergs. AGB_ejecta_velocity_km_p_s: 10.0 # Velocity of the AGB ejectas in km/s. SNII_yield_factor_Hydrogen: 1.0 # (Optional) Correction factor to apply to the Hydrogen yield from the SNII channel. diff --git a/examples/EAGLE_ICs/EAGLE_25/eagle_25.yml b/examples/EAGLE_ICs/EAGLE_25/eagle_25.yml index ddd0470c2af2d547b5a9e642e0587cb9d8306ae9..21bf89b94a23b0685942633b487f49dbcf37010e 100644 --- a/examples/EAGLE_ICs/EAGLE_25/eagle_25.yml +++ b/examples/EAGLE_ICs/EAGLE_25/eagle_25.yml @@ -154,9 +154,9 @@ EAGLEFeedback: SNII_energy_fraction_n_0_H_p_cm3: 1.4588 # Pivot point for the birth density dependance of the SNII energy fraction in cm^-3. SNII_energy_fraction_n_Z: 0.8686 # Power-law for the metallicity dependance of the SNII energy fraction. SNII_energy_fraction_n_n: 0.8686 # Power-law for the birth density dependance of the SNII energy fraction. - SNIa_max_mass_Msun: 8.0 # Maximal mass considered for SNIa feedback and enrichment in solar masses. - SNIa_timescale_Gyr: 2.0 # Time-scale of the exponential decay of the SNIa rates in Gyr. - SNIa_efficiency_p_Msun: 0.002 # Normalisation of the SNIa rates in inverse solar masses. + SNIa_DTD: PowerLaw # Functional form of the SNIa delay time distribution. + SNIa_DTD_delay_Gyr: 0.04 # Stellar age after which SNIa start in Gyr (40 Myr corresponds to stars ~ 8 Msun). + SNIa_DTD_power_law_norm_p_Msun: 0.0012 # Normalization of the SNIa delay time distribution (in Msun^-1). SNIa_energy_erg: 1.0e51 # Energy of one SNIa explosion in ergs. AGB_ejecta_velocity_km_p_s: 10.0 # Velocity of the AGB ejectas in km/s. SNII_yield_factor_Hydrogen: 1.0 # (Optional) Correction factor to apply to the Hydrogen yield from the SNII channel. diff --git a/examples/EAGLE_ICs/EAGLE_50/eagle_50.yml b/examples/EAGLE_ICs/EAGLE_50/eagle_50.yml index c12e8b33b4dac82cd03eb7fc7a1a737271f0b78a..7e935e4db69055dbe6e894c9120400d424115bda 100644 --- a/examples/EAGLE_ICs/EAGLE_50/eagle_50.yml +++ b/examples/EAGLE_ICs/EAGLE_50/eagle_50.yml @@ -154,9 +154,9 @@ EAGLEFeedback: SNII_energy_fraction_n_0_H_p_cm3: 1.4588 # Pivot point for the birth density dependance of the SNII energy fraction in cm^-3. SNII_energy_fraction_n_Z: 0.8686 # Power-law for the metallicity dependance of the SNII energy fraction. SNII_energy_fraction_n_n: 0.8686 # Power-law for the birth density dependance of the SNII energy fraction. - SNIa_max_mass_Msun: 8.0 # Maximal mass considered for SNIa feedback and enrichment in solar masses. - SNIa_timescale_Gyr: 2.0 # Time-scale of the exponential decay of the SNIa rates in Gyr. - SNIa_efficiency_p_Msun: 0.002 # Normalisation of the SNIa rates in inverse solar masses. + SNIa_DTD: PowerLaw # Functional form of the SNIa delay time distribution. + SNIa_DTD_delay_Gyr: 0.04 # Stellar age after which SNIa start in Gyr (40 Myr corresponds to stars ~ 8 Msun). + SNIa_DTD_power_law_norm_p_Msun: 0.0012 # Normalization of the SNIa delay time distribution (in Msun^-1). SNIa_energy_erg: 1.0e51 # Energy of one SNIa explosion in ergs. AGB_ejecta_velocity_km_p_s: 10.0 # Velocity of the AGB ejectas in km/s. SNII_yield_factor_Hydrogen: 1.0 # (Optional) Correction factor to apply to the Hydrogen yield from the SNII channel. diff --git a/examples/EAGLE_ICs/README b/examples/EAGLE_ICs/README index 7a9cdae549f5d74145009739add71e8555d0df41..6be7c4b97af3f77966281d363cff264af603f64e 100644 --- a/examples/EAGLE_ICs/README +++ b/examples/EAGLE_ICs/README @@ -6,9 +6,15 @@ difference is the file format, adapted for SWIFT. Compared to the original EAGLE runs, the following changes have been made: - - The redshift of reionization has been lowered to 7.5 (from 11.5) + - The metallicity-dependent density threshold for star formation + uses the smoothed metallicities and not the raw metallicities + any more. + - The redshift of H reionization has been lowered to 7.5 (from 11.5). - The Magnesium yields from SNII stars have been boosted by a factor of 2. + - The delay time distribution of the SNIa has been changed to a + power-law of slope -1 (instead of the exponential model) and + the rates have been renormalized. The scripts in this directory download the tables required to run the EAGLE model. Plotting scripts are also provided diff --git a/examples/EAGLE_low_z/EAGLE_12/eagle_12.yml b/examples/EAGLE_low_z/EAGLE_12/eagle_12.yml index 0b846e8513e5ea9d22f0f6767db8681fefe02d58..c5757b6d7047e34e6f629c1fefd562e68bda6f73 100644 --- a/examples/EAGLE_low_z/EAGLE_12/eagle_12.yml +++ b/examples/EAGLE_low_z/EAGLE_12/eagle_12.yml @@ -150,9 +150,9 @@ EAGLEFeedback: SNII_energy_fraction_n_0_H_p_cm3: 1.4588 # Pivot point for the birth density dependance of the SNII energy fraction in cm^-3. SNII_energy_fraction_n_Z: 0.8686 # Power-law for the metallicity dependance of the SNII energy fraction. SNII_energy_fraction_n_n: 0.8686 # Power-law for the birth density dependance of the SNII energy fraction. - SNIa_max_mass_Msun: 8.0 # Maximal mass considered for SNIa feedback and enrichment in solar masses. - SNIa_timescale_Gyr: 2.0 # Time-scale of the exponential decay of the SNIa rates in Gyr. - SNIa_efficiency_p_Msun: 0.002 # Normalisation of the SNIa rates in inverse solar masses. + SNIa_DTD: PowerLaw # Functional form of the SNIa delay time distribution. + SNIa_DTD_delay_Gyr: 0.04 # Stellar age after which SNIa start in Gyr (40 Myr corresponds to stars ~ 8 Msun). + SNIa_DTD_power_law_norm_p_Msun: 0.0012 # Normalization of the SNIa delay time distribution (in Msun^-1). SNIa_energy_erg: 1.0e51 # Energy of one SNIa explosion in ergs. AGB_ejecta_velocity_km_p_s: 10.0 # Velocity of the AGB ejectas in km/s. SNII_yield_factor_Hydrogen: 1.0 # (Optional) Correction factor to apply to the Hydrogen yield from the SNII channel. diff --git a/examples/EAGLE_low_z/EAGLE_25/eagle_25.yml b/examples/EAGLE_low_z/EAGLE_25/eagle_25.yml index 4c47bd4ef8853ba54f92558b823d8b29b63afb4e..547b7698783afbb2faaebe22bf974dec470a3152 100644 --- a/examples/EAGLE_low_z/EAGLE_25/eagle_25.yml +++ b/examples/EAGLE_low_z/EAGLE_25/eagle_25.yml @@ -158,9 +158,9 @@ EAGLEFeedback: SNII_energy_fraction_n_0_H_p_cm3: 1.4588 # Pivot point for the birth density dependance of the SNII energy fraction in cm^-3. SNII_energy_fraction_n_Z: 0.8686 # Power-law for the metallicity dependance of the SNII energy fraction. SNII_energy_fraction_n_n: 0.8686 # Power-law for the birth density dependance of the SNII energy fraction. - SNIa_max_mass_Msun: 8.0 # Maximal mass considered for SNIa feedback and enrichment in solar masses. - SNIa_timescale_Gyr: 2.0 # Time-scale of the exponential decay of the SNIa rates in Gyr. - SNIa_efficiency_p_Msun: 0.002 # Normalisation of the SNIa rates in inverse solar masses. + SNIa_DTD: PowerLaw # Functional form of the SNIa delay time distribution. + SNIa_DTD_delay_Gyr: 0.04 # Stellar age after which SNIa start in Gyr (40 Myr corresponds to stars ~ 8 Msun). + SNIa_DTD_power_law_norm_p_Msun: 0.0012 # Normalization of the SNIa delay time distribution (in Msun^-1). SNIa_energy_erg: 1.0e51 # Energy of one SNIa explosion in ergs. AGB_ejecta_velocity_km_p_s: 10.0 # Velocity of the AGB ejectas in km/s. SNII_yield_factor_Hydrogen: 1.0 # (Optional) Correction factor to apply to the Hydrogen yield from the SNII channel. diff --git a/examples/EAGLE_low_z/EAGLE_50/eagle_50.yml b/examples/EAGLE_low_z/EAGLE_50/eagle_50.yml index 8cdc90dc0a485a431e279074d5c2366f7cbad99f..1473010fb5ec302275c9fff7c1f3fb6fdd2f1f0c 100644 --- a/examples/EAGLE_low_z/EAGLE_50/eagle_50.yml +++ b/examples/EAGLE_low_z/EAGLE_50/eagle_50.yml @@ -149,9 +149,9 @@ EAGLEFeedback: SNII_energy_fraction_n_0_H_p_cm3: 1.4588 # Pivot point for the birth density dependance of the SNII energy fraction in cm^-3. SNII_energy_fraction_n_Z: 0.8686 # Power-law for the metallicity dependance of the SNII energy fraction. SNII_energy_fraction_n_n: 0.8686 # Power-law for the birth density dependance of the SNII energy fraction. - SNIa_max_mass_Msun: 8.0 # Maximal mass considered for SNIa feedback and enrichment in solar masses. - SNIa_timescale_Gyr: 2.0 # Time-scale of the exponential decay of the SNIa rates in Gyr. - SNIa_efficiency_p_Msun: 0.002 # Normalisation of the SNIa rates in inverse solar masses. + SNIa_DTD: PowerLaw # Functional form of the SNIa delay time distribution. + SNIa_DTD_delay_Gyr: 0.04 # Stellar age after which SNIa start in Gyr (40 Myr corresponds to stars ~ 8 Msun). + SNIa_DTD_power_law_norm_p_Msun: 0.0012 # Normalization of the SNIa delay time distribution (in Msun^-1). SNIa_energy_erg: 1.0e51 # Energy of one SNIa explosion in ergs. AGB_ejecta_velocity_km_p_s: 10.0 # Velocity of the AGB ejectas in km/s. SNII_yield_factor_Hydrogen: 1.0 # (Optional) Correction factor to apply to the Hydrogen yield from the SNII channel. diff --git a/examples/EAGLE_low_z/EAGLE_6/eagle_6.yml b/examples/EAGLE_low_z/EAGLE_6/eagle_6.yml index bf56b800c52b224c58a78460e74f12060639c242..e07ad47d0ca42e2cb3c71e00e8299a7b2935adaf 100644 --- a/examples/EAGLE_low_z/EAGLE_6/eagle_6.yml +++ b/examples/EAGLE_low_z/EAGLE_6/eagle_6.yml @@ -159,9 +159,9 @@ EAGLEFeedback: SNII_energy_fraction_n_0_H_p_cm3: 1.4588 # Pivot point for the birth density dependance of the SNII energy fraction in cm^-3. SNII_energy_fraction_n_Z: 0.8686 # Power-law for the metallicity dependance of the SNII energy fraction. SNII_energy_fraction_n_n: 0.8686 # Power-law for the birth density dependance of the SNII energy fraction. - SNIa_max_mass_Msun: 8.0 # Maximal mass considered for SNIa feedback and enrichment in solar masses. - SNIa_timescale_Gyr: 2.0 # Time-scale of the exponential decay of the SNIa rates in Gyr. - SNIa_efficiency_p_Msun: 0.002 # Normalisation of the SNIa rates in inverse solar masses. + SNIa_DTD: PowerLaw # Functional form of the SNIa delay time distribution. + SNIa_DTD_delay_Gyr: 0.04 # Stellar age after which SNIa start in Gyr (40 Myr corresponds to stars ~ 8 Msun). + SNIa_DTD_power_law_norm_p_Msun: 0.0012 # Normalization of the SNIa delay time distribution (in Msun^-1). SNIa_energy_erg: 1.0e51 # Energy of one SNIa explosion in ergs. AGB_ejecta_velocity_km_p_s: 10.0 # Velocity of the AGB ejectas in km/s. SNII_yield_factor_Hydrogen: 1.0 # (Optional) Correction factor to apply to the Hydrogen yield from the SNII channel. diff --git a/examples/IsolatedGalaxy/IsolatedGalaxy_feedback/isolated_galaxy.yml b/examples/IsolatedGalaxy/IsolatedGalaxy_feedback/isolated_galaxy.yml index 365412195b7ac34834604c5c09f8f14bfb56a02f..91e1f30c54535a0f213863fa0fb9cf65349d8602 100644 --- a/examples/IsolatedGalaxy/IsolatedGalaxy_feedback/isolated_galaxy.yml +++ b/examples/IsolatedGalaxy/IsolatedGalaxy_feedback/isolated_galaxy.yml @@ -134,9 +134,9 @@ EAGLEFeedback: SNII_energy_fraction_n_0_H_p_cm3: 1.4588 # Pivot point for the birth density dependance of the SNII energy fraction in cm^-3. SNII_energy_fraction_n_Z: 0.8686 # Power-law for the metallicity dependance of the SNII energy fraction. SNII_energy_fraction_n_n: 0.8686 # Power-law for the birth density dependance of the SNII energy fraction. - SNIa_max_mass_Msun: 8.0 # Maximal mass considered for SNIa feedback and enrichment in solar masses. - SNIa_timescale_Gyr: 2.0 # Time-scale of the exponential decay of the SNIa rates in Gyr. - SNIa_efficiency_p_Msun: 0.002 # Normalisation of the SNIa rates in inverse solar masses. + SNIa_DTD: PowerLaw # Functional form of the SNIa delay time distribution. + SNIa_DTD_delay_Gyr: 0.04 # Stellar age after which SNIa start in Gyr (40 Myr corresponds to stars ~ 8 Msun). + SNIa_DTD_power_law_norm_p_Msun: 0.0012 # Normalization of the SNIa delay time distribution (in Msun^-1). SNIa_energy_erg: 1.0e51 # Energy of one SNIa explosion in ergs. AGB_ejecta_velocity_km_p_s: 10.0 # Velocity of the AGB ejectas in km/s. SNII_yield_factor_Hydrogen: 1.0 # (Optional) Correction factor to apply to the Hydrogen yield from the SNII channel. diff --git a/examples/parameter_example.yml b/examples/parameter_example.yml index b23c0a58b2d92161aa369fce5db26f1679f422fa..7119605b19c995d72813e08e5c312a09534f2da5 100644 --- a/examples/parameter_example.yml +++ b/examples/parameter_example.yml @@ -404,9 +404,11 @@ EAGLEFeedback: SNII_energy_fraction_n_0_H_p_cm3: 0.67 # Pivot point for the birth density dependance of the SNII energy fraction in cm^-3. SNII_energy_fraction_n_Z: 0.8686 # Power-law for the metallicity dependance of the SNII energy fraction. SNII_energy_fraction_n_n: 0.8686 # Power-law for the birth density dependance of the SNII energy fraction. - SNIa_max_mass_Msun: 8.0 # Maximal mass considered for SNIa feedback and enrichment in solar masses. - SNIa_timescale_Gyr: 2.0 # Time-scale of the exponential decay of the SNIa rates in Gyr. - SNIa_efficiency_p_Msun: 0.002 # Normalisation of the SNIa rates in inverse solar masses. + SNIa_DTD: PowerLaw # Functional form of the SNIa delay time distribution Two choices: 'PowerLaw' or 'Exponential'. + SNIa_DTD_delay_Gyr: 0.04 # Stellar age after which SNIa start in Gyr (40 Myr corresponds to stars ~ 8 Msun). + SNIa_DTD_power_law_norm_p_Msun: 0.0012 # Normalization of the SNIa delay time distribution in the power-law DTD case (in Msun^-1). + SNIa_DTD_exp_norm_p_Msun: 0.002 # Normalization of the SNIa delay time distribution in the exponential DTD case (in Msun^-1). + SNIa_DTD_exp_timescale_Gyr: 2.0 # Time-scale of the SNIa delay time distribution in the exponential DTD case (in Gyr). SNIa_energy_erg: 1.0e51 # Energy of one SNIa explosion in ergs. AGB_ejecta_velocity_km_p_s: 10.0 # Velocity of the AGB ejectas in km/s. SNII_yield_factor_Hydrogen: 1.0 # (Optional) Correction factor to apply to the Hydrogen yield from the SNII channel. diff --git a/src/feedback/EAGLE/feedback.c b/src/feedback/EAGLE/feedback.c index 260e955e6f2672c02fb73dbc459cf1f433901662..08e3c4375f735f8992ad014357c6b910314220b8 100644 --- a/src/feedback/EAGLE/feedback.c +++ b/src/feedback/EAGLE/feedback.c @@ -59,9 +59,7 @@ double eagle_feedback_number_of_SNII(const struct spart* sp, /** * @brief Computes the number of supernovae of type Ia exploding for a given - * star particle between time t and t+dt - * - * We follow Foerster et al. 2006, MNRAS, 368 + * star particle between time t0 and t1 * * @param M_init The inital mass of the star particle in internal units. * @param t0 The initial time (in Gyr). @@ -72,11 +70,42 @@ double eagle_feedback_number_of_SNIa(const double M_init, const double t0, const double t1, const struct feedback_props* props) { - /* The calculation is written as the integral between t0 and t1 of - * eq. 3 of Schaye 2015 paper. */ - const double tau = props->SNIa_timescale_Gyr_inv; - const double nu = props->SNIa_efficiency; - const double num_SNIa_per_Msun = nu * (exp(-t0 * tau) - exp(-t1 * tau)); + double num_SNIa_per_Msun = 0.; + +#ifdef SWIFT_DEBUG_CHECKS + if (t1 < t0) error("Negative time range!"); + if (t0 < props->SNIa_DTD_delay_Gyr) + error("Initial time smaller than the delay time!"); +#endif + + switch (props->SNIa_DTD) { + + case eagle_feedback_SNIa_DTD_exponential: { + + /* We follow Foerster et al. 2006, MNRAS, 368 */ + + /* The calculation is written as the integral between t0 and t1 of + * eq. 3 of Schaye 2015 paper. */ + const double tau = props->SNIa_DTD_exp_timescale_Gyr_inv; + const double nu = props->SNIa_DTD_exp_norm; + num_SNIa_per_Msun = nu * (exp(-t0 * tau) - exp(-t1 * tau)); + break; + } + + case eagle_feedback_SNIa_DTD_power_law: { + + /* We follow Graur et al. 2011, MNRAS, 417 */ + + const double norm = props->SNIa_DTD_power_law_norm; + num_SNIa_per_Msun = norm * log(t1 / t0); + break; + } + + default: { + num_SNIa_per_Msun = 0.; + error("Invalid choice of SNIa delay time distribution!"); + } + } return num_SNIa_per_Msun * M_init * props->mass_to_solar_mass; } @@ -272,31 +301,25 @@ INLINE static void determine_bin_yields(int* index_Z_low, int* index_Z_high, INLINE static void evolve_SNIa( const double log10_min_mass, const double log10_max_mass, const double M_init, const double Z, const struct feedback_props* props, - double star_age_Gyr, double dt_Gyr, + double star_age_Gyr, const double dt_Gyr, struct feedback_spart_data* const feedback_data) { + const double star_age_end_step_Gyr = star_age_Gyr + dt_Gyr; + /* Check if we're outside the mass range for SNIa */ - if (log10_min_mass >= props->log10_SNIa_max_mass_msun) return; + if (star_age_end_step_Gyr < props->SNIa_DTD_delay_Gyr) return; #ifdef SWIFT_DEBUG_CHECKS if (dt_Gyr < 0.) error("Negative time-step length!"); if (star_age_Gyr < 0.) error("Negative age!"); #endif - /* If the max mass is outside the mass range update it to be the maximum - * and use updated values for the star's age and timestep in this function */ - if (log10_max_mass > props->log10_SNIa_max_mass_msun) { - - const double max_mass = props->SNIa_max_mass_msun; - const double lifetime_Gyr = lifetime_in_Gyr(max_mass, Z, props); - - dt_Gyr = max(star_age_Gyr + dt_Gyr - lifetime_Gyr, 0.); - star_age_Gyr = lifetime_Gyr; - } + /* Only consider stars beyond the minimal age for SNIa */ + star_age_Gyr = max(star_age_Gyr, props->SNIa_DTD_delay_Gyr); /* Compute the number of SNIa */ const float num_SNIa = eagle_feedback_number_of_SNIa( - M_init, star_age_Gyr, star_age_Gyr + dt_Gyr, props); + M_init, star_age_Gyr, star_age_end_step_Gyr, props); /* Compute mass of each metal */ for (int i = 0; i < chemistry_element_count; i++) { @@ -938,16 +961,38 @@ void feedback_props_init(struct feedback_props* fp, /* Properties of the SNIa enrichment model -------------------------------- */ - fp->SNIa_max_mass_msun = - parser_get_param_double(params, "EAGLEFeedback:SNIa_max_mass_Msun"); - fp->log10_SNIa_max_mass_msun = log10(fp->SNIa_max_mass_msun); + fp->SNIa_DTD_delay_Gyr = + parser_get_param_double(params, "EAGLEFeedback:SNIa_DTD_delay_Gyr"); + + char temp[32] = {0}; + parser_get_param_string(params, "EAGLEFeedback:SNIa_DTD", temp); + + if (strcmp(temp, "Exponential") == 0) { + + fp->SNIa_DTD = eagle_feedback_SNIa_DTD_exponential; - /* Read SNIa timescale model parameters */ - fp->SNIa_efficiency = - parser_get_param_float(params, "EAGLEFeedback:SNIa_efficiency_p_Msun"); - fp->SNIa_timescale_Gyr = - parser_get_param_float(params, "EAGLEFeedback:SNIa_timescale_Gyr"); - fp->SNIa_timescale_Gyr_inv = 1.f / fp->SNIa_timescale_Gyr; + /* Read SNIa exponential DTD model parameters */ + fp->SNIa_DTD_exp_norm = parser_get_param_float( + params, "EAGLEFeedback:SNIa_DTD_exp_norm_p_Msun"); + fp->SNIa_DTD_exp_timescale_Gyr = parser_get_param_float( + params, "EAGLEFeedback:SNIa_DTD_exp_timescale_Gyr"); + fp->SNIa_DTD_exp_timescale_Gyr_inv = 1.f / fp->SNIa_DTD_exp_timescale_Gyr; + + } else if (strcmp(temp, "PowerLaw") == 0) { + + fp->SNIa_DTD = eagle_feedback_SNIa_DTD_power_law; + + /* Read SNIa power-law DTD model parameters */ + fp->SNIa_DTD_power_law_norm = parser_get_param_float( + params, "EAGLEFeedback:SNIa_DTD_power_law_norm_p_Msun"); + + /* Renormalize everything such that the integral converges to + 'SNIa_DTD_power_law_norm' over 13.6 Gyr. */ + fp->SNIa_DTD_power_law_norm /= log(13.6 / fp->SNIa_DTD_delay_Gyr); + + } else { + error("Invalid SNIa DTD model: '%s'", temp); + } /* Energy released by supernova type Ia */ fp->E_SNIa_cgs = diff --git a/src/feedback/EAGLE/feedback_properties.h b/src/feedback/EAGLE/feedback_properties.h index 63928b59c153951747af0dcc5151bb7b118814d7..0f1848c90f8cb93fae7e9d818c23eae72c929cee 100644 --- a/src/feedback/EAGLE/feedback_properties.h +++ b/src/feedback/EAGLE/feedback_properties.h @@ -71,6 +71,18 @@ struct lifetime_table { double **dyingtime; }; +/** + * @brief Functional form of the SNIa delay time distribution. + */ +enum eagle_feedback_SNIa_DTD { + + /*! Power-law with slope -1 */ + eagle_feedback_SNIa_DTD_power_law = 1, + + /*! Exponential model (EAGLE default) */ + eagle_feedback_SNIa_DTD_exponential = 2 +}; + /** * @brief Properties of the EAGLE feedback model. */ @@ -127,20 +139,25 @@ struct feedback_props { /* ------------- SNIa parameters --------------- */ - /*! Efficiency of the SNIa model */ - float SNIa_efficiency; + /* What delay time distribution are we using? */ + enum eagle_feedback_SNIa_DTD SNIa_DTD; + + /*! Normalisation of the SNIa DTD in the exponential model */ + float SNIa_DTD_exp_norm; - /*! Time-scale of the SNIa decay function in Giga-years */ - float SNIa_timescale_Gyr; + /*! Time-scale of the SNIa decay function in the exponential model in + * Giga-years */ + float SNIa_DTD_exp_timescale_Gyr; - /*! Inverse of time-scale of the SNIa decay function in Giga-years */ - float SNIa_timescale_Gyr_inv; + /*! Inverse of time-scale of the SNIa decay function in the exponential model + * in Giga-years */ + float SNIa_DTD_exp_timescale_Gyr_inv; - /*! Maximal mass used for SNIa feedback (in solar masses) */ - double SNIa_max_mass_msun; + /*! Normalisation of the SNIa DTD in the power-law model */ + float SNIa_DTD_power_law_norm; - /*! Log 10 of the maximal mass used for SNIa feedback (in solar masses) */ - double log10_SNIa_max_mass_msun; + /*! Stellar age below which no SNIa explode in Giga-years */ + float SNIa_DTD_delay_Gyr; /*! Energy released by one supernova type II in cgs units */ double E_SNIa_cgs;