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

Allow the user to switch on/off the individual feedback and enrichment channels.

parent 1e2c339e
No related branches found
No related tags found
1 merge request!787Eagle stellar evolution matthieu
# Define the system of units to use internally. # Define the system of units to use internally.
InternalUnitSystem: InternalUnitSystem:
UnitMass_in_cgs: 1.98848e43 # 10^10 M_sun in grams UnitMass_in_cgs: 1.98848e43 # 10^10 M_sun in grams
UnitLength_in_cgs: 3.08567758E21 # 1 kpc UnitLength_in_cgs: 3.08567758e21 # 1 kpc in cm
UnitVelocity_in_cgs: 1E5 # km/s UnitVelocity_in_cgs: 1e5 # 1 km/s in cm/s
UnitCurrent_in_cgs: 1 # Amperes UnitCurrent_in_cgs: 1 # Amperes
UnitTemp_in_cgs: 1 # Kelvin UnitTemp_in_cgs: 1 # Kelvin
# Parameters for the self-gravity scheme # Parameters for the self-gravity scheme
Gravity: Gravity:
mesh_side_length: 32 # Number of cells along each axis for the periodic gravity mesh.
eta: 0.025 # Constant dimensionless multiplier for time integration. eta: 0.025 # Constant dimensionless multiplier for time integration.
theta: 0.7 # Opening angle (Multipole acceptance criterion). theta: 0.7 # Opening angle (Multipole acceptance criterion).
comoving_softening: 0.01 # Comoving softening length (in internal units). comoving_softening: 0.01 # Comoving softening length (in internal units).
...@@ -18,7 +17,7 @@ Gravity: ...@@ -18,7 +17,7 @@ Gravity:
TimeIntegration: TimeIntegration:
time_begin: 0. # The starting time of the simulation (in internal units). time_begin: 0. # The starting time of the simulation (in internal units).
time_end: 0.1 # The end time of the simulation (in internal units). time_end: 0.1 # The end time of the simulation (in internal units).
dt_min: 1e-9 # The minimal time-step size of the simulation (in internal units). dt_min: 1e-14 # The minimal time-step size of the simulation (in internal units).
dt_max: 1e-2 # The maximal time-step size of the simulation (in internal units). dt_max: 1e-2 # The maximal time-step size of the simulation (in internal units).
# Parameters governing the snapshots # Parameters governing the snapshots
...@@ -27,7 +26,6 @@ Snapshots: ...@@ -27,7 +26,6 @@ Snapshots:
time_first: 0. # (Optional) Time of the first output if non-cosmological time-integration (in internal units) time_first: 0. # (Optional) Time of the first output if non-cosmological time-integration (in internal units)
delta_time: 0.001 # Time difference between consecutive outputs (in internal units) delta_time: 0.001 # Time difference between consecutive outputs (in internal units)
# Parameters governing the conserved quantities statistics # Parameters governing the conserved quantities statistics
Statistics: Statistics:
delta_time: 1e-2 # Time between statistics output delta_time: 1e-2 # Time between statistics output
...@@ -110,18 +108,35 @@ EAGLEEntropyFloor: ...@@ -110,18 +108,35 @@ EAGLEEntropyFloor:
Cool_temperature_norm_K: 8000 # Temperature of the EAGLE Cool limiter entropy floor at the density threshold expressed in Kelvin. Cool_temperature_norm_K: 8000 # Temperature of the EAGLE Cool limiter entropy floor at the density threshold expressed in Kelvin.
Cool_gamma_effective: 1. # Slope the of the EAGLE Cool limiter entropy floor Cool_gamma_effective: 1. # Slope the of the EAGLE Cool limiter entropy floor
# EAGLE feedback model
EAGLEFeedback: EAGLEFeedback:
filename: ./yieldtables/ use_SNe_feedback: 1 # Global switch for SNe thermal feedback.
IMF_min_mass_Msun: 0.1 use_AGB_enrichment: 1 # Global switch for enrichement from AGB stars.
IMF_max_mass_Msun: 100.0 use_SNII_enrichment: 1 # Global switch for enrichement from SNII stars.
SNII_min_mass_Msun: 6.0 use_SNIa_enrichment: 1 # Global switch for enrichement from SNIa stars.
SNII_max_mass_Msun: 100.0 filename: ./yieldtables/ # Path to the directory containing the EAGLE yield tables.
SNII_wind_delay_Gyr: 0.0003 IMF_min_mass_Msun: 0.1 # Minimal stellar mass considered for the Chabrier IMF in solar masses.
SNII_delta_T_K: 3.16228e7 IMF_max_mass_Msun: 100.0 # Maximal stellar mass considered for the Chabrier IMF in solar masses.
SNII_Energy_erg: 1.0e51 # Energy of one SNII explosion SNII_min_mass_Msun: 6.0 # Minimal mass considered for SNII feedback (not SNII enrichment!) in solar masses.
SNII_Energy_fraction_min: 0.3 SNII_max_mass_Msun: 100.0 # Maximal mass considered for SNII feedback (not SNII enrichment!) in solar masses.
SNII_Energy_fraction_max: 3.0 SNII_wind_delay_Gyr: 0.03 # Time in Gyr between a star's birth and the SNII thermal feedback event.
SNII_Energy_fraction_Z_0: 0.0012663729 # Z_sun / 10 SNII_delta_T_K: 3.16228e7 # Change in temperature to apply to the gas particle in a SNII thermal feedback event in Kelvin.
SNII_Energy_fraction_n_0_H_p_cm3: 0.67 # cm^-3 SNII_Energy_erg: 1.0e51 # Energy of one SNII explosion in ergs.
SNII_Energy_fraction_n_n: 0.8686 # 2/ln(10) SNII_Energy_fraction_min: 3.0 # Maximal fraction of energy applied in a SNII feedback event.
SNII_Energy_fraction_n_Z: 0.8686 # 2/ln(10) SNII_Energy_fraction_max: 0.3 # Minimal fraction of energy applied in a SNII feedback event.
SNII_Energy_fraction_Z_0: 0.0012663729 # Pivot point for the metallicity dependance of the SNII energy fraction (metal mass fraction).
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.
SNII_yield_factor_Hydrogen: 1.0 # (Optional) Correction factor to apply to the Hydrogen yield from the SNII channel.
SNII_yield_factor_Helium: 1.0 # (Optional) Correction factor to apply to the Helium yield from the SNII channel.
SNII_yield_factor_Carbon: 0.5 # (Optional) Correction factor to apply to the Carbon yield from the SNII channel.
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_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.
...@@ -26,22 +26,22 @@ then ...@@ -26,22 +26,22 @@ then
./getSolutions.sh ./getSolutions.sh
fi fi
../../swift --limiter --feedback --stars --hydro --external-gravity --threads=4 stellar_evolution.yml -P EAGLEChemistry:init_abundance_metal:0.08 2>&1 | tee output.log ../../swift --feedback --stars --hydro --external-gravity --threads=4 stellar_evolution.yml -P EAGLEChemistry:init_abundance_metal:0.08 2>&1 | tee output.log
python plot_box_evolution.py python plot_box_evolution.py
../../swift --limiter --feedback --stars --hydro --external-gravity --threads=4 stellar_evolution.yml -P EAGLEChemistry:init_abundance_metal:0.04 2>&1 | tee output.log ../../swift --feedback --stars --hydro --external-gravity --threads=4 stellar_evolution.yml -P EAGLEChemistry:init_abundance_metal:0.04 2>&1 | tee output.log
python plot_box_evolution.py python plot_box_evolution.py
../../swift --limiter --feedback --stars --hydro --external-gravity --threads=4 stellar_evolution.yml -P EAGLEChemistry:init_abundance_metal:0.01 2>&1 | tee output.log ../../swift --feedback --stars --hydro --external-gravity --threads=4 stellar_evolution.yml -P EAGLEChemistry:init_abundance_metal:0.01 2>&1 | tee output.log
python plot_box_evolution.py python plot_box_evolution.py
../../swift --limiter --feedback --stars --hydro --external-gravity --threads=4 stellar_evolution.yml -P EAGLEChemistry:init_abundance_metal:0.001 2>&1 | tee output.log ../../swift --feedback --stars --hydro --external-gravity --threads=4 stellar_evolution.yml -P EAGLEChemistry:init_abundance_metal:0.001 2>&1 | tee output.log
python plot_box_evolution.py python plot_box_evolution.py
../../swift --limiter --feedback --stars --hydro --external-gravity --threads=4 stellar_evolution.yml -P EAGLEChemistry:init_abundance_metal:0.0001 2>&1 | tee output.log ../../swift --feedback --stars --hydro --external-gravity --threads=4 stellar_evolution.yml -P EAGLEChemistry:init_abundance_metal:0.0001 2>&1 | tee output.log
python plot_box_evolution.py python plot_box_evolution.py
...@@ -38,9 +38,11 @@ Statistics: ...@@ -38,9 +38,11 @@ Statistics:
SPH: SPH:
resolution_eta: 1.2348 # Target smoothing length in units of the mean inter-particle separation resolution_eta: 1.2348 # Target smoothing length in units of the mean inter-particle separation
CFL_condition: 0.1 # Courant-Friedrich-Levy condition for time integration. CFL_condition: 0.1 # Courant-Friedrich-Levy condition for time integration.
minimal_temperature: 10. # Kelvin
# Properties of the stars
Stars: Stars:
birth_time: 0. birth_time: 0. # Give the star in the ICs a decent birth time
# Parameters related to the initial conditions # Parameters related to the initial conditions
InitialConditions: InitialConditions:
...@@ -61,7 +63,8 @@ EAGLEEntropyFloor: ...@@ -61,7 +63,8 @@ EAGLEEntropyFloor:
Cool_temperature_norm_K: 8000 # Temperature of the EAGLE Cool limiter entropy floor at the density threshold expressed in Kelvin. Cool_temperature_norm_K: 8000 # Temperature of the EAGLE Cool limiter entropy floor at the density threshold expressed in Kelvin.
Cool_gamma_effective: 1. # Slope the of the EAGLE Cool limiter entropy floor Cool_gamma_effective: 1. # Slope the of the EAGLE Cool limiter entropy floor
EAGLEChemistry: # Metallicites read in for the gas and star # Metallicites read in for the gas and star
EAGLEChemistry:
init_abundance_metal: 0.01 init_abundance_metal: 0.01
init_abundance_Hydrogen: 0.752 init_abundance_Hydrogen: 0.752
init_abundance_Helium: 0.248 init_abundance_Helium: 0.248
...@@ -73,13 +76,30 @@ EAGLEChemistry: # Metallicites read in for the gas and star ...@@ -73,13 +76,30 @@ EAGLEChemistry: # Metallicites read in for the gas and star
init_abundance_Silicon: 0.0 init_abundance_Silicon: 0.0
init_abundance_Iron: 0.0 init_abundance_Iron: 0.0
# Properties of the EAGLE feedback and enrichment model.
EAGLEFeedback: EAGLEFeedback:
use_SNe_feedback: 0 # No SNe feedback in this test.
use_AGB_enrichment: 1
use_SNII_enrichment: 1
use_SNIa_enrichment: 1
filename: ./yieldtables/ filename: ./yieldtables/
IMF_min_mass_Msun: 0.1 IMF_min_mass_Msun: 0.1
IMF_max_mass_Msun: 100.0 IMF_max_mass_Msun: 100.0
SNII_min_mass_Msun: 6.0 SNII_min_mass_Msun: 6.0
SNII_max_mass_Msun: 100.0 SNII_max_mass_Msun: 100.0
SNII_yield_factor_Hydrogen: 1.0 SNII_wind_delay_Gyr: 0.03
SNII_delta_T_K: 3.16228e7
SNII_Energy_erg: 1.0e51
SNII_Energy_fraction_min: 3.0
SNII_Energy_fraction_max: 0.3
SNII_Energy_fraction_Z_0: 0.0012663729
SNII_Energy_fraction_n_0_H_p_cm3: 0.67
SNII_Energy_fraction_n_n: 0.8686
SNII_Energy_fraction_n_Z: 0.8686
SNIa_max_mass_Msun: 8.0
SNIa_timescale_Gyr: 2.0
SNIa_efficiency_p_Msun: 0.002
SNII_yield_factor_Hydrogen: 1.0 # Correction to the yields following the EAGLE REF values
SNII_yield_factor_Helium: 1.0 SNII_yield_factor_Helium: 1.0
SNII_yield_factor_Carbon: 0.5 SNII_yield_factor_Carbon: 0.5
SNII_yield_factor_Nitrogen: 1.0 SNII_yield_factor_Nitrogen: 1.0
...@@ -88,15 +108,3 @@ EAGLEFeedback: ...@@ -88,15 +108,3 @@ EAGLEFeedback:
SNII_yield_factor_Magnesium: 2.0 SNII_yield_factor_Magnesium: 2.0
SNII_yield_factor_Silicon: 1.0 SNII_yield_factor_Silicon: 1.0
SNII_yield_factor_Iron: 0.5 SNII_yield_factor_Iron: 0.5
SNII_wind_delay_Gyr: 0.03
SNII_delta_T_K: 3.16228e7
SNII_Energy_erg: 1.0e51 # Energy of one SNII explosion
SNII_Energy_fraction_min: 0.
SNII_Energy_fraction_max: 0.
SNII_Energy_fraction_Z_0: 0.0012663729 # Z_sun / 10
SNII_Energy_fraction_n_0_H_p_cm3: 0.67 # cm^-3
SNII_Energy_fraction_n_n: 0.8686 # 2/ln(10)
SNII_Energy_fraction_n_Z: 0.8686 # 2/ln(10)
SNIa_max_mass_Msun: 8.0
SNIa_timescale_Gyr: 2.0
SNIa_efficiency_p_Msun: 0.002
...@@ -697,7 +697,9 @@ void compute_stellar_evolution(const struct feedback_props* feedback_props, ...@@ -697,7 +697,9 @@ void compute_stellar_evolution(const struct feedback_props* feedback_props,
sp->feedback_data.to_distribute.enrichment_weight = enrichment_weight; sp->feedback_data.to_distribute.enrichment_weight = enrichment_weight;
/* Compute properties of the stochastic SNe feedback model. */ /* Compute properties of the stochastic SNe feedback model. */
compute_SNe_feedback(sp, age, dt, ngb_gas_mass, feedback_props); if (feedback_props->with_SNe_feedback) {
compute_SNe_feedback(sp, age, dt, ngb_gas_mass, feedback_props);
}
/* Calculate mass of stars that has died from the star's birth up to the /* Calculate mass of stars that has died from the star's birth up to the
* beginning and end of timestep */ * beginning and end of timestep */
...@@ -724,12 +726,18 @@ void compute_stellar_evolution(const struct feedback_props* feedback_props, ...@@ -724,12 +726,18 @@ void compute_stellar_evolution(const struct feedback_props* feedback_props,
/* Compute elements, energy and momentum to distribute from the /* Compute elements, energy and momentum to distribute from the
* three channels SNIa, SNII, AGB */ * three channels SNIa, SNII, AGB */
evolve_SNIa(log10_min_dying_mass_Msun, log10_max_dying_mass_Msun, if (feedback_props->with_SNIa_enrichment) {
feedback_props, sp, star_age_Gyr, dt_Gyr); evolve_SNIa(log10_min_dying_mass_Msun, log10_max_dying_mass_Msun,
evolve_SNII(log10_min_dying_mass_Msun, log10_max_dying_mass_Msun, feedback_props, sp, star_age_Gyr, dt_Gyr);
stellar_yields, feedback_props, sp); }
evolve_AGB(log10_min_dying_mass_Msun, log10_max_dying_mass_Msun, if (feedback_props->with_SNII_enrichment) {
stellar_yields, feedback_props, sp); evolve_SNII(log10_min_dying_mass_Msun, log10_max_dying_mass_Msun,
stellar_yields, feedback_props, sp);
}
if (feedback_props->with_AGB_enrichment) {
evolve_AGB(log10_min_dying_mass_Msun, log10_max_dying_mass_Msun,
stellar_yields, feedback_props, sp);
}
/* Compute the total mass to distribute (H + He metals) */ /* Compute the total mass to distribute (H + He metals) */
sp->feedback_data.to_distribute.mass = sp->feedback_data.to_distribute.mass =
...@@ -766,6 +774,20 @@ void feedback_props_init(struct feedback_props* fp, ...@@ -766,6 +774,20 @@ void feedback_props_init(struct feedback_props* fp,
const struct hydro_props* hydro_props, const struct hydro_props* hydro_props,
const struct cosmology* cosmo) { const struct cosmology* cosmo) {
/* Main operation modes ------------------------------------------------- */
fp->with_SNe_feedback =
parser_get_param_int(params, "EAGLEFeedback:use_SNe_feedback");
fp->with_AGB_enrichment =
parser_get_param_int(params, "EAGLEFeedback:use_AGB_enrichment");
fp->with_SNII_enrichment =
parser_get_param_int(params, "EAGLEFeedback:use_SNII_enrichment");
fp->with_SNIa_enrichment =
parser_get_param_int(params, "EAGLEFeedback:use_SNIa_enrichment");
/* Properties of the IMF model ------------------------------------------ */ /* Properties of the IMF model ------------------------------------------ */
/* Minimal and maximal mass considered */ /* Minimal and maximal mass considered */
......
...@@ -73,9 +73,27 @@ struct lifetime_table { ...@@ -73,9 +73,27 @@ struct lifetime_table {
*/ */
struct feedback_props { struct feedback_props {
/* ------------ Main operation modes ------------- */
/*! Are we doing SNe feedback? */
int with_SNe_feedback;
/*! Are we doing AGB enrichment? */
int with_AGB_enrichment;
/*! Are we doing SNII enrichment? */
int with_SNII_enrichment;
/*! Are we doing SNIa enrichment? */
int with_SNIa_enrichment;
/* ------------ Energy injection ----------------- */
/* Kinetic energy of SN ejecta per unit mass (check name with Richard)*/ /* Kinetic energy of SN ejecta per unit mass (check name with Richard)*/
float ejecta_specific_thermal_energy; float ejecta_specific_thermal_energy;
/* ------------ Yield tables ----------------- */
/* Yield tables for AGB and SNII */ /* Yield tables for AGB and SNII */
struct yield_table yield_AGB; struct yield_table yield_AGB;
struct yield_table yield_SNII; struct yield_table yield_SNII;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment