Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
SWIFTsim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SWIFT
SWIFTsim
Commits
11b87e1b
Commit
11b87e1b
authored
4 years ago
by
Matthieu Schaller
Browse files
Options
Downloads
Patches
Plain Diff
Fix the AGN Booth&Schaye boost factor to also work with beta < 1
parent
9fc77e2a
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/black_holes/EAGLE/black_holes.h
+12
-5
12 additions, 5 deletions
src/black_holes/EAGLE/black_holes.h
with
12 additions
and
5 deletions
src/black_holes/EAGLE/black_holes.h
+
12
−
5
View file @
11b87e1b
...
...
@@ -777,16 +777,23 @@ __attribute__((always_inline)) INLINE static void black_holes_prepare_feedback(
}
}
/* Compute the boost factor from Booth &
^^
Schaye (2009) */
/* Compute the boost factor from Booth & Schaye (2009) */
if
(
props
->
with_boost_factor
)
{
const
double
XH
=
0
.
75
;
const
double
gas_rho_phys
=
bp
->
rho_gas
*
cosmo
->
a3_inv
;
const
double
n_H
=
gas_rho_phys
*
XH
/
proton_mass
;
const
double
boost_ratio
=
n_H
/
props
->
boost_n_h_star
;
const
double
boost_factor
=
(
props
->
boost_alpha_only
)
?
props
->
boost_alpha
:
max
(
pow
(
boost_ratio
,
props
->
boost_beta
),
props
->
boost_alpha
);
double
boost_factor
=
1
.;
if
(
props
->
boost_alpha_only
)
{
boost_factor
=
props
->
boost_alpha
;
}
else
{
/* Booth & Schaye (2009), eq. 4 */
if
(
n_H
>
props
->
boost_n_h_star
)
{
boost_factor
=
pow
(
boost_ratio
,
props
->
boost_beta
);
}
}
Bondi_rate
*=
boost_factor
;
bp
->
accretion_boost_factor
=
boost_factor
;
}
else
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment