Commit dc9ed272 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Make the Rosas-Guevara 2015 accretion model optional. Switched on in all the EAGLE examples

parent dd49570e
...@@ -183,6 +183,7 @@ EAGLEAGN: ...@@ -183,6 +183,7 @@ EAGLEAGN:
subgrid_seed_mass_Msun: 1.5e5 # Black hole subgrid mass at creation time in solar masses. subgrid_seed_mass_Msun: 1.5e5 # Black hole subgrid mass at creation time in solar masses.
max_eddington_fraction: 1.0 # Maximal allowed accretion rate in units of the Eddington rate. max_eddington_fraction: 1.0 # Maximal allowed accretion rate in units of the Eddington rate.
eddington_fraction_for_recording: 0.1 # Record the last time BHs reached an Eddington ratio above this threshold. eddington_fraction_for_recording: 0.1 # Record the last time BHs reached an Eddington ratio above this threshold.
with_angmom_limiter: 1 # Are we applying the Rosas-Guevara (2015) viscous time-scale reduction term?
viscous_alpha: 1e6 # Normalisation constant of the Bondi viscuous time-scale accretion reduction term viscous_alpha: 1e6 # Normalisation constant of the Bondi viscuous time-scale accretion reduction term
radiative_efficiency: 0.1 # Fraction of the accreted mass that gets radiated. radiative_efficiency: 0.1 # Fraction of the accreted mass that gets radiated.
coupling_efficiency: 0.15 # Fraction of the radiated energy that couples to the gas in feedback events. coupling_efficiency: 0.15 # Fraction of the radiated energy that couples to the gas in feedback events.
......
...@@ -183,6 +183,7 @@ EAGLEAGN: ...@@ -183,6 +183,7 @@ EAGLEAGN:
subgrid_seed_mass_Msun: 1.5e5 # Black hole subgrid mass at creation time in solar masses. subgrid_seed_mass_Msun: 1.5e5 # Black hole subgrid mass at creation time in solar masses.
max_eddington_fraction: 1.0 # Maximal allowed accretion rate in units of the Eddington rate. max_eddington_fraction: 1.0 # Maximal allowed accretion rate in units of the Eddington rate.
eddington_fraction_for_recording: 0.1 # Record the last time BHs reached an Eddington ratio above this threshold. eddington_fraction_for_recording: 0.1 # Record the last time BHs reached an Eddington ratio above this threshold.
with_angmom_limiter: 1 # Are we applying the Rosas-Guevara (2015) viscous time-scale reduction term?
viscous_alpha: 1e6 # Normalisation constant of the Bondi viscuous time-scale accretion reduction term viscous_alpha: 1e6 # Normalisation constant of the Bondi viscuous time-scale accretion reduction term
radiative_efficiency: 0.1 # Fraction of the accreted mass that gets radiated. radiative_efficiency: 0.1 # Fraction of the accreted mass that gets radiated.
coupling_efficiency: 0.15 # Fraction of the radiated energy that couples to the gas in feedback events. coupling_efficiency: 0.15 # Fraction of the radiated energy that couples to the gas in feedback events.
......
...@@ -184,6 +184,7 @@ EAGLEAGN: ...@@ -184,6 +184,7 @@ EAGLEAGN:
subgrid_seed_mass_Msun: 1.5e5 # Black hole subgrid mass at creation time in solar masses. subgrid_seed_mass_Msun: 1.5e5 # Black hole subgrid mass at creation time in solar masses.
max_eddington_fraction: 1.0 # Maximal allowed accretion rate in units of the Eddington rate. max_eddington_fraction: 1.0 # Maximal allowed accretion rate in units of the Eddington rate.
eddington_fraction_for_recording: 0.1 # Record the last time BHs reached an Eddington ratio above this threshold. eddington_fraction_for_recording: 0.1 # Record the last time BHs reached an Eddington ratio above this threshold.
with_angmom_limiter: 1 # Are we applying the Rosas-Guevara (2015) viscous time-scale reduction term?
viscous_alpha: 1e6 # Normalisation constant of the Bondi viscuous time-scale accretion reduction term viscous_alpha: 1e6 # Normalisation constant of the Bondi viscuous time-scale accretion reduction term
radiative_efficiency: 0.1 # Fraction of the accreted mass that gets radiated. radiative_efficiency: 0.1 # Fraction of the accreted mass that gets radiated.
coupling_efficiency: 0.15 # Fraction of the radiated energy that couples to the gas in feedback events. coupling_efficiency: 0.15 # Fraction of the radiated energy that couples to the gas in feedback events.
......
...@@ -182,6 +182,7 @@ EAGLEAGN: ...@@ -182,6 +182,7 @@ EAGLEAGN:
subgrid_seed_mass_Msun: 1.5e5 # Black hole subgrid mass at creation time in solar masses. subgrid_seed_mass_Msun: 1.5e5 # Black hole subgrid mass at creation time in solar masses.
max_eddington_fraction: 1.0 # Maximal allowed accretion rate in units of the Eddington rate. max_eddington_fraction: 1.0 # Maximal allowed accretion rate in units of the Eddington rate.
eddington_fraction_for_recording: 0.1 # Record the last time BHs reached an Eddington ratio above this threshold. eddington_fraction_for_recording: 0.1 # Record the last time BHs reached an Eddington ratio above this threshold.
with_angmom_limiter: 1 # Are we applying the Rosas-Guevara (2015) viscous time-scale reduction term?
viscous_alpha: 1e6 # Normalisation constant of the Bondi viscuous time-scale accretion reduction term viscous_alpha: 1e6 # Normalisation constant of the Bondi viscuous time-scale accretion reduction term
radiative_efficiency: 0.1 # Fraction of the accreted mass that gets radiated. radiative_efficiency: 0.1 # Fraction of the accreted mass that gets radiated.
coupling_efficiency: 0.15 # Fraction of the radiated energy that couples to the gas in feedback events. coupling_efficiency: 0.15 # Fraction of the radiated energy that couples to the gas in feedback events.
......
...@@ -481,6 +481,7 @@ EAGLEAGN: ...@@ -481,6 +481,7 @@ EAGLEAGN:
subgrid_seed_mass_Msun: 1.5e5 # Black hole subgrid mass at creation time in solar masses. subgrid_seed_mass_Msun: 1.5e5 # Black hole subgrid mass at creation time in solar masses.
max_eddington_fraction: 1. # Maximal allowed accretion rate in units of the Eddington rate. max_eddington_fraction: 1. # Maximal allowed accretion rate in units of the Eddington rate.
eddington_fraction_for_recording: 0.1 # Record the last time BHs reached an Eddington ratio above this threshold. eddington_fraction_for_recording: 0.1 # Record the last time BHs reached an Eddington ratio above this threshold.
with_angmom_limiter: 1 # Are we applying the Rosas-Guevara (2015) viscous time-scale reduction term?
viscous_alpha: 1e6 # Normalisation constant of the Bondi viscuous time-scale accretion reduction term viscous_alpha: 1e6 # Normalisation constant of the Bondi viscuous time-scale accretion reduction term
radiative_efficiency: 0.1 # Fraction of the accreted mass that gets radiated. radiative_efficiency: 0.1 # Fraction of the accreted mass that gets radiated.
coupling_efficiency: 0.15 # Fraction of the radiated energy that couples to the gas in feedback events. coupling_efficiency: 0.15 # Fraction of the radiated energy that couples to the gas in feedback events.
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
#include "./black_holes/EAGLE/black_holes.h" #include "./black_holes/EAGLE/black_holes.h"
#include "./black_holes/EAGLE/black_holes_iact.h" #include "./black_holes/EAGLE/black_holes_iact.h"
#else #else
#error "Invalid choice of star model" #error "Invalid choice of black hole model"
#endif #endif
#endif #endif
...@@ -453,17 +453,19 @@ __attribute__((always_inline)) INLINE static void black_holes_prepare_feedback( ...@@ -453,17 +453,19 @@ __attribute__((always_inline)) INLINE static void black_holes_prepare_feedback(
denominator_inv * denominator_inv * denominator_inv; denominator_inv * denominator_inv * denominator_inv;
/* Compute the reduction factor from Rosas-Guevara et al. (2015) */ /* Compute the reduction factor from Rosas-Guevara et al. (2015) */
const double Bondi_radius = G * BH_mass / gas_c_phys2; if (props->with_angmom_limiter) {
const double Bondi_time = Bondi_radius / gas_c_phys; const double Bondi_radius = G * BH_mass / gas_c_phys2;
const double r_times_v_tang = Bondi_radius * tangential_velocity; const double Bondi_time = Bondi_radius / gas_c_phys;
const double r_times_v_tang_3 = const double r_times_v_tang = Bondi_radius * tangential_velocity;
r_times_v_tang * r_times_v_tang * r_times_v_tang; const double r_times_v_tang_3 =
const double viscous_time = 2. * M_PI * r_times_v_tang_3 / r_times_v_tang * r_times_v_tang * r_times_v_tang;
(1e-6 * alpha_visc * G * G * BH_mass * BH_mass); const double viscous_time = 2. * M_PI * r_times_v_tang_3 /
const double f_visc = max(Bondi_time / viscous_time, 1.); (1e-6 * alpha_visc * G * G * BH_mass * BH_mass);
const double f_visc = max(Bondi_time / viscous_time, 1.);
/* Limit the Bondi rate by the Bondi viscuous time ratio */
Bondi_rate *= f_visc; /* Limit the Bondi rate by the Bondi viscuous time ratio */
Bondi_rate *= f_visc;
}
/* Compute the Eddington rate (internal units) */ /* Compute the Eddington rate (internal units) */
const double Eddington_rate = const double Eddington_rate =
......
...@@ -63,6 +63,9 @@ struct black_holes_props { ...@@ -63,6 +63,9 @@ struct black_holes_props {
/*! Feedback coupling efficiency of the black holes. */ /*! Feedback coupling efficiency of the black holes. */
float epsilon_f; float epsilon_f;
/*! Are we using the Rosas-Guevara et al. (2015) term? */
int with_angmom_limiter;
/*! Normalisation of the viscuous angular momentum accretion reduction */ /*! Normalisation of the viscuous angular momentum accretion reduction */
float alpha_visc; float alpha_visc;
...@@ -165,7 +168,12 @@ INLINE static void black_holes_props_init(struct black_holes_props *bp, ...@@ -165,7 +168,12 @@ INLINE static void black_holes_props_init(struct black_holes_props *bp,
parser_get_param_float(params, "EAGLEAGN:radiative_efficiency"); parser_get_param_float(params, "EAGLEAGN:radiative_efficiency");
bp->epsilon_f = bp->epsilon_f =
parser_get_param_float(params, "EAGLEAGN:coupling_efficiency"); parser_get_param_float(params, "EAGLEAGN:coupling_efficiency");
bp->alpha_visc = parser_get_param_float(params, "EAGLEAGN:viscous_alpha");
/* Rosas-Guevara et al. (2015) model */
bp->with_angmom_limiter =
parser_get_param_int(params, "EAGLEAGN:with_angmom_limiter");
if (bp->with_angmom_limiter)
bp->alpha_visc = parser_get_param_float(params, "EAGLEAGN:viscous_alpha");
/* Feedback parameters ---------------------------------- */ /* Feedback parameters ---------------------------------- */
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment