Commit bfc539fa authored by Matthieu Schaller's avatar Matthieu Schaller

Merge branch 'master' into 'updated_MAC'

# Conflicts:
#   src/Makefile.am
parents 861e5f8b dc75fcd5
......@@ -40,6 +40,7 @@ Parameters:
-u, --fof Run Friends-of-Friends algorithm and
black holes seeding.
-x, --velociraptor Run with structure finding.
--line-of-sight Run with line-of-sight outputs.
--limiter Run with time-step limiter.
--sync Run with time-step synchronization
of particles hit by feedback events.
......
......@@ -127,6 +127,7 @@ Parameters:
-u, --fof Run Friends-of-Friends algorithm to
perform black hole seeding.
-x, --velociraptor Run with structure finding.
--line-of-sight Run with line-of-sight outputs.
--limiter Run with time-step limiter.
--sync Run with time-step synchronization
of particles hit by feedback events.
......
......@@ -1383,6 +1383,17 @@ if test "$ax_cv_c_compiler_vendor" = "clang"; then
AC_CHECK_LIB([m],[__exp10f], [AC_DEFINE([HAVE___EXP10F],1,[The __exp10f function is present.])])
fi
# Check if we have native sincos and sincosf functions. If not failback to our
# implementations. On Apple/CLANG we have __sincos, so also check for that
# if the compiler is clang.
AC_CHECK_LIB([m],[sincos], [AC_DEFINE([HAVE_SINCOS],1,[The sincos function is present.])])
AC_CHECK_LIB([m],[sincosf], [AC_DEFINE([HAVE_SINCOSF],1,[The sincosf function is present.])])
if test "$ax_cv_c_compiler_vendor" = "clang"; then
AC_CHECK_LIB([m],[__sincos], [AC_DEFINE([HAVE___SINCOS],1,[The __sincos function is present.])])
AC_CHECK_LIB([m],[__sincosf], [AC_DEFINE([HAVE___SINCOSF],1,[The __sincosf function is present.])])
fi
# Add warning flags by default, if these can be used. Option =error adds
# -Werror to GCC, clang and Intel. Note do this last as compiler tests may
# become errors, if that's an issue don't use CFLAGS for these, use an AC_SUBST().
......
......@@ -37,6 +37,7 @@ can be found by typing ``./swift -h``:
-u, --fof Run Friends-of-Friends algorithm to
perform black hole seeding.
-x, --velociraptor Run with structure finding.
--line-of-sight Run with line-of-sight outputs.
--limiter Run with time-step limiter.
--sync Run with time-step synchronization
of particles hit by feedback events.
......
......@@ -7,8 +7,75 @@
Implementation details
======================
This section contains technical information about internals of the code.
Random number generator
~~~~~~~~~~~~~~~~~~~~~~~
Often subgrid models require random numbers, for this purpose
SWIFT has a random number generator. The random number generator
of SWIFT is based on a combination of the standard `rand_r` and `erand48`
random number generators. Since for some applications in cosmology
we want to be able to sample random numbers with a probability lower than
:math:`10^{-8}`, we could not simply use the 32-bit `rand_r` due to its cut-off
and spacing of around :math:`2^{-32} \approx 2 \times 10^{-10}`.
For the `erand48` algorithm with 48 bits the spacing and cutoff are
significantly smaller and around :math:`2^{-48} \approx 3.5 \times 10^{-15}`,
so this is very suitable for our applications.
Reproducible random numbers
---------------------------
In our simulations we want to be able to reproduce the exact same random
numbers if we do exactly the same simulation twice. Because of this we
want to seed the random number generator in a reproducible way. In order to do this
we seed with the particle ID of the current particle and the current
integer simulation time.
To produce several different types of random numbers we have an additional
argument called the type of random number which is basically the nth random
number for the specified seed, which is added to the particle ID, thus providing
a distinct state per random number type.
If the user wishes to run a simulation with a different set of random number,
an option during the configuration (``--with-random-seed=INT``) is available.
This option simply flip some bits in the initial number composed of the ID and the
current simulation time through the binary operator XOR.
Implementation
--------------
Our random number generator packs the particle ID (plus the random number type) and
the current simulation time as two 64-bit values, plus a constant 16-bit value,
into a 144-bit buffer. This buffer is treated as an array of 9 `uint16` values.
In a first pass we initialize the seed to 0 and run through the 9 `uint16` values,
xor-ing them with the seed and calling `rand_r` on the seed to advance it. Using
`rand_r` with the thus-generated seed, we generate a sequence of 9 16-bit values
and xor them with the original 144-bit buffer.
The 9 bytes of this modified buffer are then used for three passes of `erand48`,
xor-ing the state in the same way as before. `erand48` is then called one final
time with the last state, producing a random double-precision value with a
48-bit mantissa.
What to do if we break the random number generator?
---------------------------------------------------
The most likely case is that the RNG is not strong enough for our application,
in this case we could simply do multiple passes of both shuffling the state and
generating the final value from the state. This increases the computational cost but
will make the random number generator stronger.
An other case is that we need probabilities that are lower than :math:`1 \times 10^{-17}`,
in this case we simply cannot use our random number generator and for example
need to generate two random numbers in order to probe these low probabilities.
------------------------------------------------------
Generating new unique IDs
-------------------------
~~~~~~~~~~~~~~~~~~~~~~~~~
When spawning new particles (not converting them) for star formation or other
similar processes, the code needs to create new unique particle IDs. This is
......
.. Snapshots
Matthieu Schaller, 23rd May 2020
.. _line_of_sight:
Line-of-sights outputs
======================
The line-of-sight outputs are designed to be processed by the
``SpecWizard`` tool (`Theuns et al. 1998 <https://ui.adsabs.harvard.edu/abs/1998MNRAS.301..478T/>`_,
`Tepper-Garcia et al. 2011
<https://ui.adsabs.harvard.edu/abs/2011MNRAS.413..190T/>`_).
TO BE DONE.
......@@ -742,7 +742,8 @@ full section would be:
delta_time: 1.02
invoke_stf: 1
Showing all the parameters for a basic hydro test-case, one would have:
Showing all the parameters for a basic non-cosmological hydro test-case, one
would have:
.. code:: YAML
......@@ -767,6 +768,36 @@ following pages:
* :ref:`Output_list_label` (to have snapshots not evenly spaced in time),
* :ref:`Output_selection_label` (to select what particle fields to write).
.. _Parameters_line_of_sight:
Line-of-sight outputs
---------------------
The ``LineOfSight`` section of the parameter file contains all the options related to
the dump of simulation outputs in the form of HDF5 :ref:`line_of_sight` data to
be processed by the ``SpecWizard`` tool
(See `Theuns et al. 1998 <https://ui.adsabs.harvard.edu/abs/1998MNRAS.301..478T/>`_,
`Tepper-Garcia et al. 2011
<https://ui.adsabs.harvard.edu/abs/2011MNRAS.413..190T/>`_). The parameters are:
.. code:: YAML
LineOfSight:
basename: los
scale_factor_first: 0.02 # Only used when running in cosmological mode
delta_time: 1.02
time_first: 0.01 # Only used when running in non-cosmological mode
output_list_on: 0 # Overwrite the regular output times with a list of output times
num_along_x: 0
num_along_y: 0
num_along_z: 100
allowed_los_range_x: [0, 100.] # Range along the x-axis where LoS along Y or Z are allowed
allowed_los_range_y: [0, 100.] # Range along the y-axis where LoS along X or Z are allowed
allowed_los_range_z: [0, 100.] # Range along the z-axis where LoS along X or Y are allowed
range_when_shooting_down_x: 100. # Range along the x-axis of LoS along x
range_when_shooting_down_y: 100. # Range along the y-axis of LoS along y
range_when_shooting_down_z: 100. # Range along the z-axis of LoS along z
.. _Parameters_fof:
Friends-Of-Friends (FOF)
......
......@@ -23,14 +23,14 @@ difference is the parameter file that will need to be adapted for SWIFT.
HydroSchemes/index
TimeStepping/index
SubgridModels/index
random
Planetary/index
FriendsOfFriends/index
VELOCIraptorInterface/index
LineOfSights/index
EquationOfState/index
ExternalPotentials/index
NewOption/index
Task/index
VELOCIraptorInterface/index
AnalysisTools/index
Logger/index
ImplementationDetails/index
.. Random number generator
Folkert Nobels, 11th of July 2019
Random number generator
=======================
Often subgrid models require random numbers, for this purpose
SWIFT has a random number generator. The random number generator
of SWIFT is based on a combination of the standard `rand_r` and `erand48`
random number generators. Since for some applications in cosmology
we want to be able to sample random numbers with a probability lower than
:math:`10^{-8}`, we could not simply use the 32-bit `rand_r` due to its cut-off
and spacing of around :math:`2^{-32} \approx 2 \times 10^{-10}`.
For the `erand48` algorithm with 48 bits the spacing and cutoff are
significantly smaller and around :math:`2^{-48} \approx 3.5 \times 10^{-15}`,
so this is very suitable for our applications.
Reproducible random numbers
~~~~~~~~~~~~~~~~~~~~~~~~~~~
In our simulations we want to be able to reproduce the exact same random
numbers if we do exactly the same simulation twice. Because of this we
want to seed the random number generator in a reproducible way. In order to do this
we seed with the particle ID of the current particle and the current
integer simulation time.
To produce several different types of random numbers we have an additional
argument called the type of random number which is basically the nth random
number for the specified seed, which is added to the particle ID, thus providing
a distinct state per random number type.
If the user wishes to run a simulation with a different set of random number,
an option during the configuration (``--with-random-seed=INT``) is available.
This option simply flip some bits in the initial number composed of the ID and the
current simulation time through the binary operator XOR.
Implementation
~~~~~~~~~~~~~~
Our random number generator packs the particle ID (plus the random number type) and
the current simulation time as two 64-bit values, plus a constant 16-bit value,
into a 144-bit buffer. This buffer is treated as an array of 9 `uint16` values.
In a first pass we initialize the seed to 0 and run through the 9 `uint16` values,
xor-ing them with the seed and calling `rand_r` on the seed to advance it. Using
`rand_r` with the thus-generated seed, we generate a sequence of 9 16-bit values
and xor them with the original 144-bit buffer.
The 9 bytes of this modified buffer are then used for three passes of `erand48`,
xor-ing the state in the same way as before. `erand48` is then called one final
time with the last state, producing a random double-precision value with a
48-bit mantissa.
What to do if we break the random number generator?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The most likely case is that the RNG is not strong enough for our application,
in this case we could simply do multiple passes of both shuffling the state and
generating the final value from the state. This increases the computational cost but
will make the random number generator stronger.
An other case is that we need probabilities that are lower than :math:`1 \times 10^{-17}`,
in this case we simply cannot use our random number generator and for example
need to generate two random numbers in order to probe these low probabilities.
......@@ -91,6 +91,15 @@ InitialConditions:
generate_gas_in_ics: 1 # Generate gas particles from the DM-only ICs
cleanup_smoothing_lengths: 1 # Since we generate gas, make use of the (expensive) cleaning-up procedure.
# Parameters of the line-of-sight outputs
LineOfSight:
basename: eagle_los
num_along_x: 0
num_along_y: 0
num_along_z: 100
scale_factor_first: 0.1
delta_time: 1.1
# Impose primoridal metallicity
EAGLEChemistry:
init_abundance_metal: 0.
......@@ -104,6 +113,7 @@ EAGLEChemistry:
init_abundance_Silicon: 0.0
init_abundance_Iron: 0.0
# EAGLE cooling parameters
EAGLECooling:
dir_name: ./coolingtables/
H_reion_z: 7.5 # Planck 2018
......@@ -180,15 +190,23 @@ EAGLEFeedback:
# EAGLE AGN model
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.
AGN_delta_T_K: 3.16228e8 # Change in temperature to apply to the gas particle in an AGN feedback event in Kelvin.
AGN_num_ngb_to_heat: 1. # Target number of gas neighbours to heat in an AGN feedback event.
max_reposition_mass: 2e8 # Maximal BH mass considered for BH repositioning in solar masses.
threshold_major_merger: 0.333 # Mass ratio threshold to consider a BH merger as 'major'
threshold_minor_merger: 0.1 # Mass ratio threshold to consider a BH merger as 'minor'
subgrid_seed_mass_Msun: 1.5e5 # Black hole subgrid mass at creation time in solar masses.
multi_phase_bondi: 0 # Compute Bondi rates per neighbour particle?
with_angmom_limiter: 1 # Are we applying the Rosas-Guevara et al. (2015) viscous time-scale reduction term?
viscous_alpha: 1e6 # Normalisation constant of the viscous time-scale in the accretion reduction term
radiative_efficiency: 0.1 # Fraction of the accreted mass that gets radiated.
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.
coupling_efficiency: 0.15 # Fraction of the radiated energy that couples to the gas in feedback events.
AGN_delta_T_K: 3.16228e8 # Change in temperature to apply to the gas particle in an AGN feedback event in Kelvin.
AGN_num_ngb_to_heat: 1. # Target number of gas neighbours to heat in an AGN feedback event.
max_reposition_mass: 2e8 # Maximal BH mass considered for BH repositioning in solar masses.
max_reposition_distance_ratio: 3.0 # Maximal distance a BH can be repositioned, in units of the softening length.
with_reposition_velocity_threshold: 1 # Should we only reposition to particles that move slowly w.r.t. the black hole?
max_reposition_velocity_ratio: 0.5 # Maximal velocity offset of a particle to reposition a BH to, in units of the ambient sound speed of the BH. Only meaningful if with_reposition_velocity_ratio is 1.
min_reposition_velocity_threshold: -1.0 # Minimal value of the velocity threshold for repositioning [km/s], set to < 0 for no effect. Only meaningful if with_reposition_velocity_ratio is 1.
set_reposition_speed: 0 # Should we reposition black holes with (at most) a prescribed speed towards the potential minimum?
threshold_major_merger: 0.333 # Mass ratio threshold to consider a BH merger as 'major'
threshold_minor_merger: 0.1 # Mass ratio threshold to consider a BH merger as 'minor'
merger_threshold_type: 2 # Type of velocity threshold for BH mergers (0: v_circ at kernel edge, 1: v_esc at actual distance, with softening, 2: v_esc at actual distance, no softening).
merger_max_distance_ratio: 3.0 # Maximal distance over which two BHs can merge, in units of the softening length.
......@@ -11,7 +11,7 @@ fi
if [ ! -e yieldtables ]
then
echo "Fetching EAGLE yield tables..."
../getEagleYieldtable.sh
../getEagleYieldTable.sh
fi
if [ ! -e coolingtables ]
......
......@@ -91,6 +91,15 @@ InitialConditions:
generate_gas_in_ics: 1 # Generate gas particles from the DM-only ICs
cleanup_smoothing_lengths: 1 # Since we generate gas, make use of the (expensive) cleaning-up procedure.
# Parameters of the line-of-sight outputs
LineOfSight:
basename: eagle_los
num_along_x: 0
num_along_y: 0
num_along_z: 100
scale_factor_first: 0.1
delta_time: 1.1
# Impose primoridal metallicity
EAGLEChemistry:
init_abundance_metal: 0.
......@@ -181,15 +190,23 @@ EAGLEFeedback:
# EAGLE AGN model
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.
AGN_delta_T_K: 3.16228e8 # Change in temperature to apply to the gas particle in an AGN feedback event in Kelvin.
AGN_num_ngb_to_heat: 1. # Target number of gas neighbours to heat in an AGN feedback event.
max_reposition_mass: 2e8 # Maximal BH mass considered for BH repositioning in solar masses.
threshold_major_merger: 0.333 # Mass ratio threshold to consider a BH merger as 'major'
threshold_minor_merger: 0.1 # Mass ratio threshold to consider a BH merger as 'minor'
subgrid_seed_mass_Msun: 1.5e5 # Black hole subgrid mass at creation time in solar masses.
multi_phase_bondi: 0 # Compute Bondi rates per neighbour particle?
with_angmom_limiter: 1 # Are we applying the Rosas-Guevara et al. (2015) viscous time-scale reduction term?
viscous_alpha: 1e6 # Normalisation constant of the viscous time-scale in the accretion reduction term
radiative_efficiency: 0.1 # Fraction of the accreted mass that gets radiated.
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.
coupling_efficiency: 0.15 # Fraction of the radiated energy that couples to the gas in feedback events.
AGN_delta_T_K: 3.16228e8 # Change in temperature to apply to the gas particle in an AGN feedback event in Kelvin.
AGN_num_ngb_to_heat: 1. # Target number of gas neighbours to heat in an AGN feedback event.
max_reposition_mass: 2e8 # Maximal BH mass considered for BH repositioning in solar masses.
max_reposition_distance_ratio: 3.0 # Maximal distance a BH can be repositioned, in units of the softening length.
with_reposition_velocity_threshold: 1 # Should we only reposition to particles that move slowly w.r.t. the black hole?
max_reposition_velocity_ratio: 0.5 # Maximal velocity offset of a particle to reposition a BH to, in units of the ambient sound speed of the BH. Only meaningful if with_reposition_velocity_ratio is 1.
min_reposition_velocity_threshold: -1.0 # Minimal value of the velocity threshold for repositioning [km/s], set to < 0 for no effect. Only meaningful if with_reposition_velocity_ratio is 1.
set_reposition_speed: 0 # Should we reposition black holes with (at most) a prescribed speed towards the potential minimum?
threshold_major_merger: 0.333 # Mass ratio threshold to consider a BH merger as 'major'
threshold_minor_merger: 0.1 # Mass ratio threshold to consider a BH merger as 'minor'
merger_threshold_type: 2 # Type of velocity threshold for BH mergers (0: v_circ at kernel edge, 1: v_esc at actual distance, with softening, 2: v_esc at actual distance, no softening).
merger_max_distance_ratio: 3.0 # Maximal distance over which two BHs can merge, in units of the softening length.
......@@ -11,7 +11,7 @@ fi
if [ ! -e yieldtables ]
then
echo "Fetching EAGLE yield tables..."
../getEagleYieldtable.sh
../getEagleYieldTable.sh
fi
if [ ! -e coolingtables ]
......
......@@ -89,6 +89,15 @@ InitialConditions:
generate_gas_in_ics: 1 # Generate gas particles from the DM-only ICs
cleanup_smoothing_lengths: 1 # Since we generate gas, make use of the (expensive) cleaning-up procedure.
# Parameters of the line-of-sight outputs
LineOfSight:
basename: eagle_los
num_along_x: 0
num_along_y: 0
num_along_z: 100
scale_factor_first: 0.1
delta_time: 1.1
# Impose primoridal metallicity
EAGLEChemistry:
init_abundance_metal: 0.
......@@ -179,15 +188,23 @@ EAGLEFeedback:
# EAGLE AGN model
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.
AGN_delta_T_K: 3.16228e8 # Change in temperature to apply to the gas particle in an AGN feedback event in Kelvin.
AGN_num_ngb_to_heat: 1. # Target number of gas neighbours to heat in an AGN feedback event.
max_reposition_mass: 2e8 # Maximal BH mass considered for BH repositioning in solar masses.
threshold_major_merger: 0.333 # Mass ratio threshold to consider a BH merger as 'major'
threshold_minor_merger: 0.1 # Mass ratio threshold to consider a BH merger as 'minor'
subgrid_seed_mass_Msun: 1.5e5 # Black hole subgrid mass at creation time in solar masses.
multi_phase_bondi: 0 # Compute Bondi rates per neighbour particle?
with_angmom_limiter: 1 # Are we applying the Rosas-Guevara et al. (2015) viscous time-scale reduction term?
viscous_alpha: 1e6 # Normalisation constant of the viscous time-scale in the accretion reduction term
radiative_efficiency: 0.1 # Fraction of the accreted mass that gets radiated.
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.
coupling_efficiency: 0.15 # Fraction of the radiated energy that couples to the gas in feedback events.
AGN_delta_T_K: 3.16228e8 # Change in temperature to apply to the gas particle in an AGN feedback event in Kelvin.
AGN_num_ngb_to_heat: 1. # Target number of gas neighbours to heat in an AGN feedback event.
max_reposition_mass: 2e8 # Maximal BH mass considered for BH repositioning in solar masses.
max_reposition_distance_ratio: 3.0 # Maximal distance a BH can be repositioned, in units of the softening length.
with_reposition_velocity_threshold: 1 # Should we only reposition to particles that move slowly w.r.t. the black hole?
max_reposition_velocity_ratio: 0.5 # Maximal velocity offset of a particle to reposition a BH to, in units of the ambient sound speed of the BH. Only meaningful if with_reposition_velocity_ratio is 1.
min_reposition_velocity_threshold: -1.0 # Minimal value of the velocity threshold for repositioning [km/s], set to < 0 for no effect. Only meaningful if with_reposition_velocity_ratio is 1.
set_reposition_speed: 0 # Should we reposition black holes with (at most) a prescribed speed towards the potential minimum?
threshold_major_merger: 0.333 # Mass ratio threshold to consider a BH merger as 'major'
threshold_minor_merger: 0.1 # Mass ratio threshold to consider a BH merger as 'minor'
merger_threshold_type: 2 # Type of velocity threshold for BH mergers (0: v_circ at kernel edge, 1: v_esc at actual distance, with softening, 2: v_esc at actual distance, no softening).
merger_max_distance_ratio: 3.0 # Maximal distance over which two BHs can merge, in units of the softening length.
\ No newline at end of file
......@@ -11,7 +11,7 @@ fi
if [ ! -e yieldtables ]
then
echo "Fetching EAGLE yield tables..."
../getEagleYieldtable.sh
../getEagleYieldTable.sh
fi
if [ ! -e coolingtables ]
......
Initial conditions corresponding to the 50 Mpc volume
of the EAGLE suite at 8x lower resolution.
The ICs only contain DM particles. The gas particles will be generated in SWIFT.
This diff is collapsed.
#!/bin/bash
wget http://virgodb.cosma.dur.ac.uk/swift-webstorage/ICs/EAGLE_ICs/EAGLE_L0050N0376_ICs.hdf5
# Redshift
18.08
15.28
13.06
11.26
9.79
8.57
7.54
6.67
5.92
5.28
4.72
4.24
3.81
3.43
3.09
2.79
2.52
2.28
2.06
1.86
1.68
1.51
1.36
1.21
1.08
0.96
0.85
0.74
0.64
0.55
0.46
0.37
0.29
0.21
0.14
0.07
0.00
#!/bin/bash
# Generate the initial conditions if they are not present.
if [ ! -e EAGLE_L0050N0376_ICs.hdf5 ]
then
echo "Fetching initial conditions for the EAGLE 50Mpc low-res. example..."
./getIC.sh
fi
# Grab the cooling and yield tables if they are not present.
if [ ! -e yieldtables ]
then
echo "Fetching EAGLE yield tables..."
../getEagleYieldTable.sh
fi
if [ ! -e coolingtables ]
then
echo "Fetching EAGLE cooling tables..."
../getEagleCoolingTable.sh
fi
# The following run-time options are broken down by line as:
# Basic run-time options
# Create and run with stars
# Radiative options - run with cooling and stellar feedback
# Run with the time-step limiter required to capture feedback
# Run with black holes - fof is needed for the seeding
# Threading options - run with threads and pinning (latter not required but improves performance)
# The corresponding parameter file for this run
../../swift \
--cosmology --eagle \
--threads=16 --pin \
eagle_50.yml
......@@ -4,7 +4,7 @@ and phases are the same as used in the original suite. The only
difference is the file format, adapted for SWIFT.
Compared to the original EAGLE runs of Schaye et al. 2015),
the following changes have been made:
the following changes have been made (at standard resolution):
- The dark matter softening lengths have been increased to 1.3
pkpc and 3.32 ckpc. The comoving baryon softening lengths have
......@@ -23,6 +23,9 @@ the following changes have been made:
distribution and not using a fixed delay of 30 Myr any more.
- The black hole accretion rate is now limited to 100% of the
Eddington rate (from 100/h = 150 %).
- The circular velocity threshold for BH mergers is measured
at the actual distance linking the BHs not at the kernel support
length any more.
The scripts in this directory download the tables required to
run the EAGLE model. Plotting scripts are also provided
......
......@@ -178,15 +178,23 @@ EAGLEFeedback:
# EAGLE AGN model
EAGLEAGN:
subgrid_seed_mass_Msun: 1.5e5 # Black hole subgrid mass at creation time in solar masses.
max_eddington_fraction: 1.5 # 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.
AGN_delta_T_K: 3.16228e8 # Change in temperature to apply to the gas particle in an AGN feedback event in Kelvin.
AGN_num_ngb_to_heat: 1. # Target number of gas neighbours to heat in an AGN feedback event.
max_reposition_mass: 2e8 # Maximal BH mass considered for BH repositioning in solar masses.
threshold_major_merger: 0.333 # Mass ratio threshold to consider a BH merger as 'major'
threshold_minor_merger: 0.1 # Mass ratio threshold to consider a BH merger as 'minor'
subgrid_seed_mass_Msun: 1.5e5 # Black hole subgrid mass at creation time in solar masses.
multi_phase_bondi: 0 # Compute Bondi rates per neighbour particle?
with_angmom_limiter: 1 # Are we applying the Rosas-Guevara et al. (2015) viscous time-scale reduction term?
viscous_alpha: 1e6 # Normalisation constant of the viscous time-scale in the accretion reduction term
radiative_efficiency: 0.1 # Fraction of the accreted mass that gets radiated.
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.
coupling_efficiency: 0.15 # Fraction of the radiated energy that couples to the gas in feedback events.
AGN_delta_T_K: 3.16228e8 # Change in temperature to apply to the gas particle in an AGN feedback event in Kelvin.
AGN_num_ngb_to_heat: 1. # Target number of gas neighbours to heat in an AGN feedback event.
max_reposition_mass: 2e8 # Maximal BH mass considered for BH repositioning in solar masses.
max_reposition_distance_ratio: 3.0 # Maximal distance a BH can be repositioned, in units of the softening length.
with_reposition_velocity_threshold: 1 # Should we only reposition to particles that move slowly w.r.t. the black hole?
max_reposition_velocity_ratio: 0.5 # Maximal velocity offset of a particle to reposition a BH to, in units of the ambient sound speed of the BH. Only meaningful if with_reposition_velocity_ratio is 1.
min_reposition_velocity_threshold: -1.0 # Minimal value of the velocity threshold for repositioning [km/s], set to < 0 for no effect. Only meaningful if with_reposition_velocity_ratio is 1.
set_reposition_speed: 0 # Should we reposition black holes with (at most) a prescribed speed towards the potential minimum?
threshold_major_merger: 0.333 # Mass ratio threshold to consider a BH merger as 'major'
threshold_minor_merger: 0.1 # Mass ratio threshold to consider a BH merger as 'minor'
merger_threshold_type: 2 # Type of velocity threshold for BH mergers (0: v_circ at kernel edge, 1: v_esc at actual distance, with softening, 2: v_esc at actual distance, no softening).
merger_max_distance_ratio: 3.0 # Maximal distance over which two BHs can merge, in units of the softening length.
......@@ -182,15 +182,23 @@ EAGLEFeedback:
# EAGLE AGN model
EAGLEAGN:
subgrid_seed_mass_Msun: 1.5e5 # Black hole subgrid mass at creation time in solar masses.
max_eddington_fraction: 1.5 # 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.
AGN_delta_T_K: 3.16228e8 # Change in temperature to apply to the gas particle in an AGN feedback event in Kelvin.
AGN_num_ngb_to_heat: 1. # Target number of gas neighbours to heat in an AGN feedback event.
max_reposition_mass: 2e8 # Maximal BH mass considered for BH repositioning in solar masses.
threshold_major_merger: 0.333 # Mass ratio threshold to consider a BH merger as 'major'
threshold_minor_merger: 0.1 # Mass ratio threshold to consider a BH merger as 'minor'
subgrid_seed_mass_Msun: 1.5e5 # Black hole subgrid mass at creation time in solar masses.
multi_phase_bondi: 0 # Compute Bondi rates per neighbour particle?
with_angmom_limiter: 1 # Are we applying the Rosas-Guevara et al. (2015) viscous time-scale reduction term?
viscous_alpha: 1e6 # Normalisation constant of the viscous time-scale in the accretion reduction term
radiative_efficiency: 0.1 # Fraction of the accreted mass that gets radiated.
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.
coupling_efficiency: 0.15 # Fraction of the radiated energy that couples to the gas in feedback events.
AGN_delta_T_K: 3.16228e8 # Change in temperature to apply to the gas particle in an AGN feedback event in Kelvin.
AGN_num_ngb_to_heat: 1. # Target number of gas neighbours to heat in an AGN feedback event.
max_reposition_mass: 2e8 # Maximal BH mass considered for BH repositioning in solar masses.
max_reposition_distance_ratio: 3.0 # Maximal distance a BH can be repositioned, in units of the softening length.
with_reposition_velocity_threshold: 1 # Should we only reposition to particles that move slowly w.r.t. the black hole?
max_reposition_velocity_ratio: 0.5 # Maximal velocity offset of a particle to reposition a BH to, in units of the ambient sound speed of the BH. Only meaningful if with_reposition_velocity_ratio is 1.
min_reposition_velocity_threshold: -1.0 # Minimal value of the velocity threshold for repositioning [km/s], set to < 0 for no effect. Only meaningful if with_reposition_velocity_ratio is 1.
set_reposition_speed: 0 # Should we reposition black holes with (at most) a prescribed speed towards the potential minimum?
threshold_major_merger: 0.333 # Mass ratio threshold to consider a BH merger as 'major'
threshold_minor_merger: 0.1 # Mass ratio threshold to consider a BH merger as 'minor'
merger_threshold_type: 2 # Type of velocity threshold for BH mergers (0: v_circ at kernel edge, 1: v_esc at actual distance, with softening, 2: v_esc at actual distance, no softening).
merger_max_distance_ratio: 3.0 # Maximal distance over which two BHs can merge, in units of the softening length.
......@@ -173,15 +173,23 @@ EAGLEFeedback:
# EAGLE AGN model
EAGLEAGN:
subgrid_seed_mass_Msun: 1.5e5 # Black hole subgrid mass at creation time in solar masses.
max_eddington_fraction: 1.5 # 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.
AGN_delta_T_K: 3.16228e8 # Change in temperature to apply to the gas particle in an AGN feedback event in Kelvin.
AGN_num_ngb_to_heat: 1. # Target number of gas neighbours to heat in an AGN feedback event.
max_reposition_mass: 2e8 # Maximal BH mass considered for BH repositioning in solar masses.
threshold_major_merger: 0.333 # Mass ratio threshold to consider a BH merger as 'major'
threshold_minor_merger: 0.1 # Mass ratio threshold to consider a BH merger as 'minor'
subgrid_seed_mass_Msun: 1.5e5 # Black hole subgrid mass at creation time in solar masses.
multi_phase_bondi: 0 # Compute Bondi rates per neighbour particle?
with_angmom_limiter: 1 # Are we applying the Rosas-Guevara et al. (2015) viscous time-scale reduction term?
viscous_alpha: 1e6 # Normalisation constant of the viscous time-scale in the accretion reduction term
radiative_efficiency: 0.1 # Fraction of the accreted mass that gets radiated.
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.
coupling_efficiency: 0.15 # Fraction of the radiated energy that couples to the gas in feedback events.
AGN_delta_T_K: 3.16228e8 # Change in temperature to apply to the gas particle in an AGN feedback event in Kelvin.
AGN_num_ngb_to_heat: 1. # Target number of gas neighbours to heat in an AGN feedback event.
max_reposition_mass: 2e8 # Maximal BH mass considered for BH repositioning in solar masses.
max_reposition_distance_ratio: 3.0 # Maximal distance a BH can be repositioned, in units of the softening length.
with_reposition_velocity_threshold: 1 # Should we only reposition to particles that move slowly w.r.t. the black hole?
max_reposition_velocity_ratio: 0.5 # Maximal velocity offset of a particle to reposition a BH to, in units of the ambient sound speed of the BH. Only meaningful if with_reposition_velocity_ratio is 1.
min_reposition_velocity_threshold: -1.0 # Minimal value of the velocity threshold for repositioning [km/s], set to < 0 for no effect. Only meaningful if with_reposition_velocity_ratio is 1.
set_reposition_speed: 0 # Should we reposition black holes with (at most) a prescribed speed towards the potential minimum?
threshold_major_merger: 0.333 # Mass ratio threshold to consider a BH merger as 'major'
threshold_minor_merger: 0.1 # Mass ratio threshold to consider a BH merger as 'minor'
merger_threshold_type: 2 # Type of velocity threshold for BH mergers (0: v_circ at kernel edge, 1: v_esc at actual distance, with softening, 2: v_esc at actual distance, no softening).
merger_max_distance_ratio: 3.0 # Maximal distance over which two BHs can merge, in units of the softening length.
......@@ -188,15 +188,23 @@ EAGLEFeedback:
# EAGLE AGN model
EAGLEAGN:
subgrid_seed_mass_Msun: 1.5e5 # Black hole subgrid mass at creation time in solar masses.
max_eddington_fraction: 1.5 # 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