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
2c9335f0
Commit
2c9335f0
authored
5 years ago
by
Matthieu Schaller
Browse files
Options
Downloads
Patches
Plain Diff
Flag the BHs that need merging in the new loop of the EAGLE BH model.
parent
311eef6a
No related branches found
No related tags found
1 merge request
!863
Black holes mergers
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/black_holes/EAGLE/black_holes_iact.h
+33
-1
33 additions, 1 deletion
src/black_holes/EAGLE/black_holes_iact.h
with
33 additions
and
1 deletion
src/black_holes/EAGLE/black_holes_iact.h
+
33
−
1
View file @
2c9335f0
...
...
@@ -196,7 +196,39 @@ runner_iact_nonsym_bh_bh_swallow(const float r2, const float *dx,
struct
bpart
*
restrict
bi
,
struct
bpart
*
restrict
bj
,
const
struct
cosmology
*
cosmo
,
const
integertime_t
ti_current
)
{}
const
integertime_t
ti_current
)
{
/* Compute relative peculiar velocity between the two BHs
* Recall that in SWIFT v is (v_pec * a) */
const
float
delta_v
[
3
]
=
{
bi
->
v
[
0
]
-
bj
->
v
[
0
],
bi
->
v
[
1
]
-
bj
->
v
[
1
],
bi
->
v
[
2
]
-
bj
->
v
[
2
]};
const
float
v2
=
delta_v
[
0
]
*
delta_v
[
0
]
+
delta_v
[
1
]
*
delta_v
[
1
]
+
delta_v
[
2
]
*
delta_v
[
2
];
const
float
v2_pec
=
v2
*
cosmo
->
a2_inv
;
/* Find the bigger of the two BHs */
float
M
=
bi
->
subgrid_mass
;
float
h
=
hi
;
if
(
bj
->
subgrid_mass
>
M
)
{
M
=
bj
->
subgrid_mass
;
h
=
hj
;
}
const
float
G
=
43
.;
/* Merge if gravitationally bound
* Note that we use the kernel support here as the size and not just the
* smoothing length */
if
(
v2_pec
<
G
*
M
/
(
kernel_gamma
*
h
))
{
/* This particle is swallowed by the BH with the largest ID of all the
* candidates wanting to swallow it */
if
(
bj
->
merger_data
.
swallow_id
<
bi
->
id
&&
bj
->
id
<
bi
->
id
)
{
bj
->
merger_data
.
swallow_id
=
bi
->
id
;
}
}
}
/**
* @brief Feedback interaction between two particles (non-symmetric).
...
...
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