Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SWIFT
SWIFTsim
Commits
dc9ed272
Commit
dc9ed272
authored
May 04, 2020
by
Matthieu Schaller
Browse files
Make the Rosas-Guevara 2015 accretion model optional. Switched on in all the EAGLE examples
parent
dd49570e
Changes
8
Hide whitespace changes
Inline
Side-by-side
examples/EAGLE_ICs/EAGLE_100/eagle_100.yml
View file @
dc9ed272
...
...
@@ -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.
...
...
examples/EAGLE_ICs/EAGLE_12/eagle_12.yml
View file @
dc9ed272
...
...
@@ -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.
...
...
examples/EAGLE_ICs/EAGLE_25/eagle_25.yml
View file @
dc9ed272
...
...
@@ -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.
...
...
examples/EAGLE_ICs/EAGLE_50/eagle_50.yml
View file @
dc9ed272
...
...
@@ -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.
...
...
examples/parameter_example.yml
View file @
dc9ed272
...
...
@@ -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.
...
...
src/black_holes.h
View file @
dc9ed272
...
...
@@ -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
src/black_holes/EAGLE/black_holes.h
View file @
dc9ed272
...
...
@@ -453,17 +453,19 @@ __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) */
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
;
const
double
r_times_v_tang_3
=
r_times_v_tang
*
r_times_v_tang
*
r_times_v_tang
;
const
double
viscous_time
=
2
.
*
M_PI
*
r_times_v_tang_3
/
(
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
;
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
;
const
double
r_times_v_tang_3
=
r_times_v_tang
*
r_times_v_tang
*
r_times_v_tang
;
const
double
viscous_time
=
2
.
*
M_PI
*
r_times_v_tang_3
/
(
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
;
}
/* Compute the Eddington rate (internal units) */
const
double
Eddington_rate
=
...
...
src/black_holes/EAGLE/black_holes_properties.h
View file @
dc9ed272
...
...
@@ -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,7 +168,12 @@ 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"
);
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 ---------------------------------- */
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment