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
b2778ab4
Commit
b2778ab4
authored
4 years ago
by
Matthieu Schaller
Browse files
Options
Downloads
Patches
Plain Diff
Code formatting
parent
00b54df5
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!1261
BH sound speed near EoS
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/black_holes/EAGLE/black_holes_iact.h
+5
-6
5 additions, 6 deletions
src/black_holes/EAGLE/black_holes_iact.h
src/black_holes/EAGLE/black_holes_properties.h
+3
-3
3 additions, 3 deletions
src/black_holes/EAGLE/black_holes_properties.h
with
8 additions
and
9 deletions
src/black_holes/EAGLE/black_holes_iact.h
+
5
−
6
View file @
b2778ab4
...
...
@@ -21,6 +21,8 @@
/* Local includes */
#include
"black_holes_parameters.h"
#include
"entropy_floor.h"
#include
"equation_of_state.h"
#include
"gravity.h"
#include
"hydro.h"
#include
"random.h"
...
...
@@ -28,8 +30,6 @@
#include
"space.h"
#include
"timestep_sync_part.h"
#include
"tracers.h"
#include
"equation_of_state.h"
#include
"entropy_floor.h"
/**
* @brief Density interaction between two particles (non-symmetric).
...
...
@@ -56,8 +56,7 @@ runner_iact_nonsym_bh_gas_density(
const
struct
gravity_props
*
grav_props
,
const
struct
black_holes_props
*
bh_props
,
const
struct
entropy_floor_properties
*
floor_props
,
const
integertime_t
ti_current
,
const
double
time
)
{
const
integertime_t
ti_current
,
const
double
time
)
{
float
wi
,
wi_dx
;
...
...
@@ -92,8 +91,8 @@ runner_iact_nonsym_bh_gas_density(
/* Check whether we are close to the entropy floor. If we are, we
* re-calculate the sound speed using the fixed internal energy */
const
float
u_EoS
=
entropy_floor_temperature
(
pj
,
cosmo
,
floor_props
)
*
bh_props
->
temp_to_u_factor
;
const
float
u_EoS
=
entropy_floor_temperature
(
pj
,
cosmo
,
floor_props
)
*
bh_props
->
temp_to_u_factor
;
if
(
pj
->
u
<
u_EoS
*
bh_props
->
fixed_T_above_EoS_factor
&&
pj
->
u
>
bh_props
->
fixed_u_for_soundspeed
)
{
/*const float cj_old = cj; */
...
...
This diff is collapsed.
Click to expand it.
src/black_holes/EAGLE/black_holes_properties.h
+
3
−
3
View file @
b2778ab4
...
...
@@ -24,6 +24,7 @@
/* Local includes. */
#include
"chemistry.h"
#include
"exp10.h"
#include
"hydro_properties.h"
/* Includes. */
...
...
@@ -130,7 +131,6 @@ struct black_holes_props {
/*! Fixed T (expressed as internal energy) for sound speed near EoS */
float
fixed_u_for_soundspeed
;
/* ---- Properties of the feedback model ------- */
/*! AGN feedback model: random, isotropic or minimum distance */
...
...
@@ -389,8 +389,8 @@ INLINE static void black_holes_props_init(struct black_holes_props *bp,
bp
->
with_fixed_T_near_EoS
=
parser_get_param_int
(
params
,
"EAGLEAGN:with_fixed_T_near_EoS"
);
if
(
bp
->
with_fixed_T_near_EoS
)
{
bp
->
fixed_T_above_EoS_factor
=
pow
(
10
.,
parser_get_param_float
(
params
,
"EAGLEAGN:fixed_T_above_EoS_dex"
));
bp
->
fixed_T_above_EoS_factor
=
exp10
(
parser_get_param_float
(
params
,
"EAGLEAGN:fixed_T_above_EoS_dex"
));
bp
->
fixed_u_for_soundspeed
=
parser_get_param_float
(
params
,
"EAGLEAGN:fixed_T_near_EoS_K"
)
/
units_cgs_conversion_factor
(
us
,
UNIT_CONV_TEMPERATURE
)
*
...
...
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