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:
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.
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
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.
......
......@@ -183,6 +183,7 @@ EAGLEAGN:
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.
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
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.
......
......@@ -184,6 +184,7 @@ EAGLEAGN:
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.
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
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.
......
......@@ -182,6 +182,7 @@ EAGLEAGN:
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.
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
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.
......
......@@ -481,6 +481,7 @@ EAGLEAGN:
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.
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
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.
......
......@@ -30,7 +30,7 @@
#include "./black_holes/EAGLE/black_holes.h"
#include "./black_holes/EAGLE/black_holes_iact.h"
#else
#error "Invalid choice of star model"
#error "Invalid choice of black hole model"
#endif
#endif
......@@ -453,6 +453,7 @@ __attribute__((always_inline)) INLINE static void black_holes_prepare_feedback(
denominator_inv * denominator_inv * denominator_inv;
/* Compute the reduction factor from Rosas-Guevara et al. (2015) */
if (props->with_angmom_limiter) {
const double Bondi_radius = G * BH_mass / gas_c_phys2;
const double Bondi_time = Bondi_radius / gas_c_phys;
const double r_times_v_tang = Bondi_radius * tangential_velocity;
......@@ -464,6 +465,7 @@ __attribute__((always_inline)) INLINE static void black_holes_prepare_feedback(
/* Limit the Bondi rate by the Bondi viscuous time ratio */
Bondi_rate *= f_visc;
}
/* Compute the Eddington rate (internal units) */
const double Eddington_rate =
......
......@@ -63,6 +63,9 @@ struct black_holes_props {
/*! Feedback coupling efficiency of the black holes. */
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 */
float alpha_visc;
......@@ -165,6 +168,11 @@ INLINE static void black_holes_props_init(struct black_holes_props *bp,
parser_get_param_float(params, "EAGLEAGN:radiative_efficiency");
bp->epsilon_f =
parser_get_param_float(params, "EAGLEAGN:coupling_efficiency");
/* 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 ---------------------------------- */
......
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