Skip to content
Snippets Groups Projects
Commit 9d15ed1b authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Merge branch 'master' into fix_h_max

parents 1e334e82 3f0b92ee
Branches
Tags
1 merge request!768Update h_max
Showing
with 7694 additions and 1679 deletions
......@@ -60,6 +60,10 @@ if test "x$ax_enable_debug" != "xno"; then
AC_DEFINE([SWIFT_DEVELOP_MODE],1,[Enable developer code options])
fi
# C++ in GCC 6 and above has an issue with undefined the min() and max()
# macros. This hack works around that.
AC_DEFINE([_GLIBCXX_INCLUDE_NEXT_C_HEADERS],1,[Hack for min() and max() using g++ 6+])
# Enable POSIX and platform extension preprocessor macros.
AC_USE_SYSTEM_EXTENSIONS
......@@ -361,6 +365,18 @@ fi
# Check whether we have any of the ARM v8.1 tick timers
AX_ASM_ARM_PMCCNTR
AX_ASM_ARM_CNTVCT
# See if we want memuse reporting.
AC_ARG_ENABLE([memuse-reports],
[AS_HELP_STRING([--enable-memuse-reports],
[Output reports about significant memory allocations@<:@yes/no@:>@]
)],
[enable_memuse_reports="$enableval"],
[enable_memuse_reports="no"]
)
if test "$enable_memuse_reports" = "yes"; then
AC_DEFINE([SWIFT_MEMUSE_REPORTS],1,[Enable memory usage reports])
fi
# Define HAVE_POSIX_MEMALIGN if it works.
AX_FUNC_POSIX_MEMALIGN
......
.. AnalysisTools
Loic Hausammann 20th March 2019
Peter W. Draper 28th March 2019
.. _analysistools:
......@@ -33,3 +34,48 @@ or install ``npm`` and then run the following commands
http-server .
Now you can open the web page ``http://localhost:8080/cell_hierarchy.html``.
Memory usage reports
--------------------
When SWIFT is configured using the ``--enable-memuse-reports`` flag it will
log any calls to allocate or free memory that make use of the
``swift_memalign()``, ``swift_malloc()``, ``swift_calloc()`` and
``swift_free()`` functions and will generate a report at the end of each
step. It will also attempt to dump the current memory use when SWIFT is
aborted by calling the ``error()`` function. Failed memory allocations will be
reported in these logs.
These functions should be used by developers when allocating significant
amounts of memory -- so don't use these for high frequency small allocations.
Each call to the ``swift_`` functions differs to the standard calls by the
inclusion of a "label", this should match between allocations and frees and
ideally should be a short label that describes the use of the memory, i.e.
"parts", "gparts", "hydro.sort" etc.
Calls to external libraries that make allocations you'd also like to log
can be made by calling the ``memuse_log_allocation()`` function directly.
The output files are called ``memuse_report-step<n>.dat`` or
``memuse_report-rank<m>-step<n>.dat`` if running using MPI. These have a line
for each allocation or free that records the time, memory address, step,
whether an allocation or free, the label and when an allocation, the amount of
memory. The comments in this file also record the actual memory use of the
process (including threads) as reported by the operating system at the end of
the step.
To post process these files into a memory used timeline and get a report of
the peak memory use, as well as the memory still in use at the end of the step
there is an basic analysis script ``analyse_memuse_logs.py`` and two wrappers
that process a directory of logs, these are ``./process_memuse_logs.sh`` and
``./process_memuse_logs_MPI.sh`` for non-MPI and MPI runs respectively.
Note that the process scripts process each step individually and also process
all the logs as a single sequence. When interpreting these some care should be
taken as they are not all the memory allocated, just important allocations in
SWIFT and when looking at a single step the context of any previous steps is
not used, so you only see allocations made in that step and the effect of any
matching frees (so allocations made in previous steps that are freed in this
step will not be understood and will be ignored, you need the global analysis
to understand that).
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -17,9 +17,10 @@ Entropy floors
The gas particles in the EAGLE model are prevented from cooling below a
certain temperature. The temperature limit depends on the density of the
particles. Two floors are used in conjonction. Both are implemented as
polytropic "equations of states" :math:`P = P_c
\left(\rho/\rho_c\right)^\gamma`, with the constants derived from the user
input given in terms of temperature and Hydrogen number density.
polytropic "equations of states":math:`P = P_c
\left(\rho/\rho_c\right)^\gamma` (all done in physical coordinates), with
the constants derived from the user input given in terms of temperature and
Hydrogen number density.
The first limit, labelled as ``Cool``, is typically used to prevent
low-density high-metallicity particles to cool below the warm phase because
......@@ -27,12 +28,7 @@ of over-cooling induced by the absence of metal diffusion. This limit plays
only a small role in practice. The second limit, labelled as ``Jeans``, is
used to prevent the fragmentation of high-density gas into clumps that
cannot be resolved by the coupled hydro+gravity solver. The two limits are
sketched on the following figure. An additional over-density criterion is
applied to prevent gas not collapsed into structures from being
affected. This criterion demands that :math:`\rho > \Delta_{\rm floor}
\Omega_b \rho_{\rm crit}`, with :math:`\Delta_{\rm floor}` specified by the
user and :math:`\rho_{\rm crit}` the critical density at that redshift
[#f1]_.
sketched on the following figure.
.. figure:: EAGLE_entropy_floor.svg
:width: 400px
......@@ -51,6 +47,15 @@ user and :math:`\rho_{\rm crit}` the critical density at that redshift
the figure for clarity reasons, typical values for EAGLE runs place
both anchors at the same temperature.
An additional over-density criterion above the mean baryonic density is
applied to prevent gas not collapsed into structures from being
affected. To be precise, this criterion demands that the floor is applied
only if :math:`\rho_{\rm com} > \Delta_{\rm floor}\bar{\rho_b} =
\Delta_{\rm floor} \Omega_b \rho_{\rm crit,0}`, with :math:`\Delta_{\rm
floor}` specified by the user, :math:`\rho_{\rm crit,0} = 3H_0/8\pi G` the
critical density at redshift zero [#f1]_, and :math:`\rho_{\rm com}` the
gas co-moving density. Typical values for :math:`\Delta_{\rm floor}` are of
order 10.
The model is governed by 4 parameters for each of the two
limits. These are given in the ``EAGLEEntropyFloor`` section of the
......@@ -389,8 +394,61 @@ the snapshots for each gas and star particle:
.. _EAGLE_star_formation:
Star formation: Schaye+2008
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Star formation: Schaye+2008 modified for EAGLE
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. figure:: EAGLE_SF_Z_dep.svg
:width: 400px
:align: center
:figclass: align-center
:alt: Metal-dependance of the threshold for star formation in the
EAGLE model.
The dependency of the SF threshold density on the metallicty of the gas
in the EAGLE model (black line). The function is described by the four
parameters indicated on the figure. These are the slope of the
dependency, its position on the metallicity-axis and normalisation
(black circle) as well as the maximal threshold density allowed. For
reference, the black arrow indicates the value typically assumed for
solar metallicity :math:`Z_\odot=0.014` (note, however, that this value
does *not* enter the model at all). The values used to produce this
figure are the ones assumed in the reference EAGLE model.
.. figure:: EAGLE_SF_EOS.svg
:width: 400px
:align: center
:figclass: align-center
:alt: Equation-of-state assumed for the star-forming gas
The equation-of-state assumed for the star-forming gas in the EAGLE
model (black line). The function is described by the three parameters
indicated on the figure. These are the slope of the relation, the
position of the normalisation point on the density axis and the
temperature expected at this density. Note that this is a normalisation
and *not* a threshold. Gas at densities lower than the normalisation
point will also be put on this equation of state when computing its
star formation rate. The values used to produce this figure are the
ones assumed in the reference EAGLE model.
.. code:: YAML
# EAGLE star formation parameters
EAGLEStarFormation:
EOS_density_norm_H_p_cm3: 0.1 # Physical density used for the normalisation of the EOS assumed for the star-forming gas in Hydrogen atoms per cm^3.
EOS_temperature_norm_K: 8000 # Temperature om the polytropic EOS assumed for star-forming gas at the density normalisation in Kelvin.
EOS_gamma_effective: 1.3333333 # Slope the of the polytropic EOS assumed for the star-forming gas.
KS_normalisation: 1.515e-4 # The normalization of the Kennicutt-Schmidt law in Msun / kpc^2 / yr.
KS_exponent: 1.4 # The exponent of the Kennicutt-Schmidt law.
KS_min_over_density: 57.7 # The over-density above which star-formation is allowed.
KS_high_density_threshold_H_p_cm3: 1e3 # Hydrogen number density above which the Kennicut-Schmidt law changes slope in Hydrogen atoms per cm^3.
KS_high_density_exponent: 2.0 # Slope of the Kennicut-Schmidt law above the high-density threshold.
KS_temperature_margin_dex: 0.5 # Logarithm base 10 of the maximal temperature difference above the EOS allowed to form stars.
KS_max_density_threshold_H_p_cm3: 1e5 # Hydrogen number density above which a particle gets automatically turned into a star in Hydrogen atoms per cm^3.
threshold_norm_H_p_cm3: 0.1 # Normalisation of the metal-dependant density threshold for star formation in Hydrogen atoms per cm^3.
threshold_Z0: 0.002 # Reference metallicity (metal mass fraction) for the metal-dependant threshold for star formation.
threshold_slope: -0.64 # Slope of the metal-dependant star formation threshold
threshold_max_density_H_p_cm3: 10.0 # Maximal density of the metal-dependant density threshold for star formation in Hydrogen atoms per cm^3.
gas_fraction: 0.1 # The gas fraction used internally by the model.
.. _EAGLE_enrichment:
......
import matplotlib
matplotlib.use("Agg")
from pylab import *
from scipy import stats
# Plot parameters
params = {
"axes.labelsize": 10,
"axes.titlesize": 10,
"font.size": 9,
"font.sans-serif": [
"Computer Modern",
"Computer Modern Roman",
"CMU Serif",
"cmunrm",
"DejaVu Sans",
],
"mathtext.fontset": "cm",
"legend.fontsize": 9,
"xtick.labelsize": 10,
"ytick.labelsize": 10,
"text.usetex": False,
"figure.figsize": (3.15, 3.15),
"lines.markersize": 6,
"figure.subplot.left": 0.15,
"figure.subplot.right": 0.99,
"figure.subplot.bottom": 0.13,
"figure.subplot.top": 0.99,
"figure.subplot.wspace": 0.15,
"figure.subplot.hspace": 0.12,
"lines.linewidth": 2.0,
}
rcParams.update(params)
# Equations of state
eos_SF_rho = np.logspace(-10, 5, 1000)
eos_SF_T = (eos_SF_rho / 10 ** (-1)) ** (1.0 / 3.0) * 8000.0
# Plot the phase space diagram
figure()
subplot(111, xscale="log", yscale="log")
plot(eos_SF_rho, eos_SF_T, "k-", lw=1.0)
plot([1e-10, 1e-1], [8000, 8000], "k:", lw=0.6)
plot([1e-1, 1e-1], [20, 8000], "k:", lw=0.6)
plot([1e-1, 1e1], [20000.0, 20000.0 * 10.0 ** (2.0 / 3.0)], "k--", lw=0.6)
text(
0.5e-1,
200000,
"$n_{\\rm H}$^EOS_gamma_effective",
va="top",
rotation=43,
fontsize=6.5,
family="monospace",
)
text(
0.95e-1,
25,
"EOS_density_norm_H_p_cm3",
rotation=90,
va="bottom",
ha="right",
fontsize=7,
family="monospace",
)
text(5e-8, 8400, "EOS_temperature_norm_K", va="bottom", fontsize=7, family="monospace")
scatter([1e-1], [8000], s=4, color="k")
xlabel("Hydrogen number density $n_{\\rm H}$ [cm$^{-3}$]", labelpad=0)
ylabel("Temperature $T$ [K]", labelpad=2)
xlim(3e-8, 3e3)
ylim(20.0, 2e5)
savefig("EAGLE_SF_EOS.svg", dpi=200)
import matplotlib
matplotlib.use("Agg")
from pylab import *
from scipy import stats
# Plot parameters
params = {
"axes.labelsize": 10,
"axes.titlesize": 10,
"font.size": 9,
"font.sans-serif": [
"Computer Modern",
"Computer Modern Roman",
"CMU Serif",
"cmunrm",
"DejaVu Sans",
],
"mathtext.fontset": "cm",
"legend.fontsize": 9,
"xtick.labelsize": 10,
"ytick.labelsize": 10,
"text.usetex": False,
"figure.figsize": (3.15, 3.15),
"lines.markersize": 6,
"figure.subplot.left": 0.15,
"figure.subplot.right": 0.99,
"figure.subplot.bottom": 0.13,
"figure.subplot.top": 0.99,
"figure.subplot.wspace": 0.15,
"figure.subplot.hspace": 0.12,
"lines.linewidth": 2.0,
}
rcParams.update(params)
# Metal dependance parameters
Z_0 = 0.002
norm = 0.1
slope = -0.64
max_n = 10.0
# Function
Z = logspace(-8, 3, 1000)
n = norm * (Z / Z_0) ** slope
n = np.minimum(n, np.ones(np.size(n)) * (max_n))
# Plot the phase space diagram
figure()
subplot(111, xscale="log", yscale="log")
plot(Z, n, "k-", lw=1.0)
plot([3e-4, 3e-2], [1.0, 1.0 * 100.0 ** (slope)], "k--", lw=0.6)
plot([1e-10, 1e10], [max_n, max_n], "k:", lw=0.6)
plot([Z_0, Z_0], [1e-10, norm], "k:", lw=0.6)
plot([1e-10, Z_0], [norm, norm], "k:", lw=0.6)
scatter([Z_0], [norm], s=4, color="k")
annotate(
"",
xy=(0.014, 1e-3),
xytext=(0.014, 3e-4),
arrowprops=dict(
facecolor="black", shrink=0.0, width=0.1, headwidth=3.0, headlength=5.0
),
)
text(0.016, 3.5e-4, "${Z_\\odot}$", fontsize=9)
text(
3e-4,
1.45,
"Z^threshold_slope",
va="top",
rotation=-40,
fontsize=7,
family="monospace",
)
text(3e-5, 12.0, "threshold_max_density_H_p_cm3", fontsize=7, family="monospace")
text(3e-7, 0.12, "threshold_norm_H_p_cm3", fontsize=7, family="monospace")
text(
0.0018,
0.0004,
"threshold_Z0",
rotation=90,
va="bottom",
ha="right",
fontsize=7,
family="monospace",
)
xlabel("Metallicity (metal mass fraction) $Z$ [-]", labelpad=2)
ylabel("SF threshold number density $n_{\\rm H, thresh}$ [cm$^{-3}$]", labelpad=-1)
xlim(1e-7, 1.0)
ylim(0.0002, 50)
savefig("EAGLE_SF_Z_dep.svg", dpi=200)
import matplotlib
matplotlib.use("Agg")
from pylab import *
from scipy import stats
......@@ -8,53 +9,97 @@ params = {
"axes.labelsize": 10,
"axes.titlesize": 10,
"font.size": 9,
"font.sans-serif": [
"Computer Modern",
"Computer Modern Roman",
"CMU Serif",
"cmunrm",
"DejaVu Sans",
],
"mathtext.fontset": "cm",
"legend.fontsize": 9,
"xtick.labelsize": 10,
"ytick.labelsize": 10,
"text.usetex": True,
"text.usetex": False,
"figure.figsize": (3.15, 3.15),
"lines.markersize": 6,
"figure.subplot.left": 0.15,
"figure.subplot.right": 0.99,
"figure.subplot.bottom": 0.13,
"figure.subplot.top": 0.99,
"figure.subplot.wspace": 0.15,
"figure.subplot.hspace": 0.12,
"lines.markersize": 6,
"lines.linewidth": 2.0,
"text.latex.unicode": True,
}
rcParams.update(params)
rc("font", **{"family": "sans-serif", "sans-serif": ["Times"]})
# Equations of state
eos_cool_rho = np.logspace(-5, 5, 1000)
eos_cool_T = eos_cool_rho**0. * 8000.
eos_cool_T = eos_cool_rho ** 0.0 * 8000.0
eos_Jeans_rho = np.logspace(-1, 5, 1000)
eos_Jeans_T = (eos_Jeans_rho/ 10**(-1))**(1./3.) * 4000.
eos_Jeans_T = (eos_Jeans_rho / 10 ** (-1)) ** (1.0 / 3.0) * 4000.0
# Plot the phase space diagram
figure()
subplot(111, xscale="log", yscale="log")
plot(eos_cool_rho, eos_cool_T, 'k-', lw=1.)
plot(eos_Jeans_rho, eos_Jeans_T, 'k-', lw=1.)
plot([1e-10, 1e-5], [8000, 8000], 'k:', lw=0.6)
plot([1e-10, 1e-1], [4000, 4000], 'k:', lw=0.6)
plot([1e-5, 1e-5], [20, 8000], 'k:', lw=0.6)
plot([1e-1, 1e-1], [20, 4000], 'k:', lw=0.6)
plot([3e-6, 3e-4], [28000, 28000], 'k--', lw=0.6)
text(3e-6, 22500, "$n_{\\rm H}~\\widehat{}~{\\tt Cool\\_gamma\\_effective}$", va="top", fontsize=7)
plot([3e-1, 3e1], [15000., 15000.*10.**(2./3.)], 'k--', lw=0.6)
text(3e-1, 200000, "$n_{\\rm H}~\\widehat{}~{\\tt Jeans\\_gamma\\_effective}$", va="top", rotation=43, fontsize=7)
text(0.95e-5, 25, "${\\tt Cool\\_density\\_threshold\\_H\\_p\\_cm3}$", rotation=90, va="bottom", ha="right", fontsize=7)
text(0.95e-1, 25, "${\\tt Jeans\\_density\\_threshold\\_H\\_p\\_cm3}$", rotation=90, va="bottom", ha="right", fontsize=7)
text(5e-8, 8800, "${\\tt Cool\\_temperature\\_norm\\_K}$", va="bottom", fontsize=7)
text(5e-8, 4400, "${\\tt Jeans\\_temperature\\_norm\\_K}$", va="bottom", fontsize=7)
fill_between([1e-5, 1e5], [10, 10], [8000, 8000], color='0.9')
fill_between([1e-1, 1e5], [4000, 400000], color='0.9')
scatter([1e-5], [8000], s=4, color='k')
scatter([1e-1], [4000], s=4, color='k')
xlabel("${\\rm Density}~n_{\\rm H}~[{\\rm cm^{-3}}]$", labelpad=0)
ylabel("${\\rm Temperature}~T~[{\\rm K}]$", labelpad=2)
plot(eos_cool_rho, eos_cool_T, "k-", lw=1.0)
plot(eos_Jeans_rho, eos_Jeans_T, "k-", lw=1.0)
plot([1e-10, 1e-5], [8000, 8000], "k:", lw=0.6)
plot([1e-10, 1e-1], [4000, 4000], "k:", lw=0.6)
plot([1e-5, 1e-5], [20, 8000], "k:", lw=0.6)
plot([1e-1, 1e-1], [20, 4000], "k:", lw=0.6)
plot([3e-6, 3e-4], [28000, 28000], "k--", lw=0.6)
text(
3e-6,
22500,
"$n_{\\rm H}$^Cool_gamma_effective",
va="top",
fontsize=6,
family="monospace",
)
plot([3e-1, 3e1], [15000.0, 15000.0 * 10.0 ** (2.0 / 3.0)], "k--", lw=0.6)
text(
3e-1,
200000,
"$n_{\\rm H}$^Jeans_gamma_effective",
va="top",
rotation=43,
fontsize=6,
family="monospace",
)
text(
0.95e-5,
23,
"Cool_density_threshold_H_p_cm3",
rotation=90,
va="bottom",
ha="right",
fontsize=6,
family="monospace",
)
text(
0.95e-1,
23,
"Jeans_density_threshold_H_p_cm3",
rotation=90,
va="bottom",
ha="right",
fontsize=5.5,
family="monospace",
)
text(5e-8, 8800, "Cool_temperature_norm_K", va="bottom", fontsize=6, family="monospace")
text(
5e-8, 4400, "Jeans_temperature_norm_K", va="bottom", fontsize=6, family="monospace"
)
fill_between([1e-5, 1e5], [10, 10], [8000, 8000], color="0.9")
fill_between([1e-1, 1e5], [4000, 400000], color="0.9")
scatter([1e-5], [8000], s=4, color="k")
scatter([1e-1], [4000], s=4, color="k")
xlabel("Hydrogen number density $n_{\\rm H}$ [cm$^{-3}$]", labelpad=0)
ylabel("Temperature $T$ [K]", labelpad=2)
xlim(3e-8, 3e3)
ylim(20., 2e5)
savefig("EAGLE_entropy_floor.png", dpi=200)
ylim(20.0, 2e5)
savefig("EAGLE_entropy_floor.svg", dpi=200)
Initial conditions corresponding to the 25 Mpc volume
of the EAGLE suite. The ICs only contain DM particles. The
gas particles will be generated in SWIFT.
# Define the system of units to use internally.
InternalUnitSystem:
UnitMass_in_cgs: 1.98848e43 # 10^10 M_sun in grams
UnitLength_in_cgs: 3.08567758e24 # Mpc in centimeters
UnitVelocity_in_cgs: 1e5 # km/s in centimeters per second
UnitCurrent_in_cgs: 1 # Amperes
UnitTemp_in_cgs: 1 # Kelvin
# Cosmological parameters
Cosmology:
h: 0.6777 # Reduced Hubble constant
a_begin: 0.0078125 # Initial scale-factor of the simulation
a_end: 1.0 # Final scale factor of the simulation
Omega_m: 0.307 # Matter density parameter
Omega_lambda: 0.693 # Dark-energy density parameter
Omega_b: 0.0455 # Baryon density parameter
# Parameters governing the time integration
TimeIntegration:
dt_min: 1e-10 # The minimal time-step size of the simulation (in internal units).
dt_max: 1e-2 # The maximal time-step size of the simulation (in internal units).
# Parameters governing the snapshots
Snapshots:
basename: eagle # Common part of the name of output files
scale_factor_first: 0.05
delta_time: 1.02
# Parameters governing the conserved quantities statistics
Statistics:
delta_time: 1.02
scale_factor_first: 0.05
# Parameters for the self-gravity scheme
Gravity:
eta: 0.025 # Constant dimensionless multiplier for time integration.
theta: 0.7 # Opening angle (Multipole acceptance criterion)
comoving_softening: 0.0026994 # Comoving softening length (in internal units).
max_physical_softening: 0.0007 # Physical softening length (in internal units).
mesh_side_length: 128
# Parameters for the hydrodynamics scheme
SPH:
resolution_eta: 1.2348 # Target smoothing length in units of the mean inter-particle separation (1.2348 == 48Ngbs with the cubic spline kernel).
h_min_ratio: 0.1 # Minimal smoothing in units of softening.
CFL_condition: 0.1 # Courant-Friedrich-Levy condition for time integration.
minimal_temperature: 100.0 # (internal units)
initial_temperature: 268.7
Scheduler:
max_top_level_cells: 16
cell_split_size: 100
tasks_per_cell: 5
Restarts:
delta_hours: 1.0
# Parameters related to the initial conditions
InitialConditions:
file_name: EAGLE_L0025N0376_ICs.hdf5
periodic: 1
cleanup_h_factors: 1 # Remove the h-factors inherited from Gadget
cleanup_velocity_factors: 1 # Remove the sqrt(a) factor in the velocities inherited from Gadget
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.
# Impose primoridal metallicity
EAGLEChemistry:
init_abundance_metal: 0.
init_abundance_Hydrogen: 0.752
init_abundance_Helium: 0.248
init_abundance_Carbon: 0.0
init_abundance_Nitrogen: 0.0
init_abundance_Oxygen: 0.0
init_abundance_Neon: 0.0
init_abundance_Magnesium: 0.0
init_abundance_Silicon: 0.0
init_abundance_Iron: 0.0
# EAGLE cooling parameters
EAGLECooling:
dir_name: ./coolingtables/
H_reion_z: 11.5
H_reion_eV_p_H: 2.0
He_reion_z_centre: 3.5
He_reion_z_sigma: 0.5
He_reion_eV_p_H: 2.0
# EAGLE star formation parameters
EAGLEStarFormation:
EOS_density_norm_H_p_cm3: 0.1 # Physical density used for the normalisation of the EOS assumed for the star-forming gas in Hydrogen atoms per cm^3.
EOS_temperature_norm_K: 8000 # Temperature om the polytropic EOS assumed for star-forming gas at the density normalisation in Kelvin.
EOS_gamma_effective: 1.3333333 # Slope the of the polytropic EOS assumed for the star-forming gas.
KS_normalisation: 1.515e-4 # The normalization of the Kennicutt-Schmidt law in Msun / kpc^2 / yr.
KS_exponent: 1.4 # The exponent of the Kennicutt-Schmidt law.
KS_min_over_density: 57.7 # The over-density above which star-formation is allowed.
KS_high_density_threshold_H_p_cm3: 1e3 # Hydrogen number density above which the Kennicut-Schmidt law changes slope in Hydrogen atoms per cm^3.
KS_high_density_exponent: 2.0 # Slope of the Kennicut-Schmidt law above the high-density threshold.
KS_temperature_margin_dex: 0.5 # Logarithm base 10 of the maximal temperature difference above the EOS allowed to form stars.
threshold_norm_H_p_cm3: 0.1 # Normalisation of the metal-dependant density threshold for star formation in Hydrogen atoms per cm^3.
threshold_Z0: 0.002 # Reference metallicity (metal mass fraction) for the metal-dependant threshold for star formation.
threshold_slope: -0.64 # Slope of the metal-dependant star formation threshold
threshold_max_density_H_p_cm3: 10.0 # Maximal density of the metal-dependant density threshold for star formation in Hydrogen atoms per cm^3.
# Parameters for the EAGLE "equation of state"
EAGLEEntropyFloor:
Jeans_density_threshold_H_p_cm3: 0.1 # Physical density above which the EAGLE Jeans limiter entropy floor kicks in expressed in Hydrogen atoms per cm^3.
Jeans_over_density_threshold: 10. # Overdensity above which the EAGLE Jeans limiter entropy floor can kick in.
Jeans_temperature_norm_K: 8000 # Temperature of the EAGLE Jeans limiter entropy floor at the density threshold expressed in Kelvin.
Jeans_gamma_effective: 1.3333333 # Slope the of the EAGLE Jeans limiter entropy floor
Cool_density_threshold_H_p_cm3: 1e-5 # Physical density above which the EAGLE Cool limiter entropy floor kicks in expressed in Hydrogen atoms per cm^3.
Cool_over_density_threshold: 10. # Overdensity above which the EAGLE Cool limiter entropy floor can kick in.
Cool_temperature_norm_K: 8000 # Temperature of the EAGLE Cool limiter entropy floor at the density threshold expressed in Kelvin.
Cool_gamma_effective: 1. # Slope the of the EAGLE Cool limiter entropy floor
#!/bin/bash
wget http://virgodb.cosma.dur.ac.uk/swift-webstorage/ICs/EAGLE_ICs/EAGLE_L0025N0376_ICs.hdf5
#!/bin/bash
# Generate the initial conditions if they are not present.
if [ ! -e EAGLE_L0025N0376_ICs.hdf5 ]
then
echo "Fetching initial conditions for the EAGLE 25Mpc example..."
./getIC.sh
fi
../../swift --cosmology --hydro --self-gravity --stars --threads=16 eagle_25.yml 2>&1 | tee output.log
Initial conditions corresponding to the 50 Mpc volume
of the EAGLE suite. The ICs only contain DM particles. The
gas particles will be generated in SWIFT.
# Define the system of units to use internally.
InternalUnitSystem:
UnitMass_in_cgs: 1.98848e43 # 10^10 M_sun in grams
UnitLength_in_cgs: 3.08567758e24 # Mpc in centimeters
UnitVelocity_in_cgs: 1e5 # km/s in centimeters per second
UnitCurrent_in_cgs: 1 # Amperes
UnitTemp_in_cgs: 1 # Kelvin
# Cosmological parameters
Cosmology:
h: 0.6777 # Reduced Hubble constant
a_begin: 0.0078125 # Initial scale-factor of the simulation
a_end: 1.0 # Final scale factor of the simulation
Omega_m: 0.307 # Matter density parameter
Omega_lambda: 0.693 # Dark-energy density parameter
Omega_b: 0.0455 # Baryon density parameter
# Parameters governing the time integration
TimeIntegration:
dt_min: 1e-10 # The minimal time-step size of the simulation (in internal units).
dt_max: 1e-2 # The maximal time-step size of the simulation (in internal units).
# Parameters governing the snapshots
Snapshots:
basename: eagle # Common part of the name of output files
scale_factor_first: 0.05
delta_time: 1.02
# Parameters governing the conserved quantities statistics
Statistics:
delta_time: 1.02
scale_factor_first: 0.05
# Parameters for the self-gravity scheme
Gravity:
eta: 0.025 # Constant dimensionless multiplier for time integration.
theta: 0.7 # Opening angle (Multipole acceptance criterion)
comoving_softening: 0.0026994 # Comoving softening length (in internal units).
max_physical_softening: 0.0007 # Physical softening length (in internal units).
mesh_side_length: 256
# Parameters for the hydrodynamics scheme
SPH:
resolution_eta: 1.2348 # Target smoothing length in units of the mean inter-particle separation (1.2348 == 48Ngbs with the cubic spline kernel).
h_min_ratio: 0.1 # Minimal smoothing in units of softening.
CFL_condition: 0.1 # Courant-Friedrich-Levy condition for time integration.
minimal_temperature: 100.0 # (internal units)
initial_temperature: 268.7
Scheduler:
max_top_level_cells: 32
cell_split_size: 100
tasks_per_cell: 5
Restarts:
delta_hours: 1.0
# Parameters related to the initial conditions
InitialConditions:
file_name: EAGLE_L0050N0752_ICs.hdf5
periodic: 1
cleanup_h_factors: 1 # Remove the h-factors inherited from Gadget
cleanup_velocity_factors: 1 # Remove the sqrt(a) factor in the velocities inherited from Gadget
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.
# Impose primoridal metallicity
EAGLEChemistry:
init_abundance_metal: 0.
init_abundance_Hydrogen: 0.752
init_abundance_Helium: 0.248
init_abundance_Carbon: 0.0
init_abundance_Nitrogen: 0.0
init_abundance_Oxygen: 0.0
init_abundance_Neon: 0.0
init_abundance_Magnesium: 0.0
init_abundance_Silicon: 0.0
init_abundance_Iron: 0.0
# EAGLE cooling parameters
EAGLECooling:
dir_name: ./coolingtables/
H_reion_z: 11.5
H_reion_eV_p_H: 2.0
He_reion_z_centre: 3.5
He_reion_z_sigma: 0.5
He_reion_eV_p_H: 2.0
# EAGLE star formation parameters
EAGLEStarFormation:
EOS_density_norm_H_p_cm3: 0.1 # Physical density used for the normalisation of the EOS assumed for the star-forming gas in Hydrogen atoms per cm^3.
EOS_temperature_norm_K: 8000 # Temperature om the polytropic EOS assumed for star-forming gas at the density normalisation in Kelvin.
EOS_gamma_effective: 1.3333333 # Slope the of the polytropic EOS assumed for the star-forming gas.
KS_normalisation: 1.515e-4 # The normalization of the Kennicutt-Schmidt law in Msun / kpc^2 / yr.
KS_exponent: 1.4 # The exponent of the Kennicutt-Schmidt law.
KS_min_over_density: 57.7 # The over-density above which star-formation is allowed.
KS_high_density_threshold_H_p_cm3: 1e3 # Hydrogen number density above which the Kennicut-Schmidt law changes slope in Hydrogen atoms per cm^3.
KS_high_density_exponent: 2.0 # Slope of the Kennicut-Schmidt law above the high-density threshold.
KS_temperature_margin_dex: 0.5 # Logarithm base 10 of the maximal temperature difference above the EOS allowed to form stars.
threshold_norm_H_p_cm3: 0.1 # Normalisation of the metal-dependant density threshold for star formation in Hydrogen atoms per cm^3.
threshold_Z0: 0.002 # Reference metallicity (metal mass fraction) for the metal-dependant threshold for star formation.
threshold_slope: -0.64 # Slope of the metal-dependant star formation threshold
threshold_max_density_H_p_cm3: 10.0 # Maximal density of the metal-dependant density threshold for star formation in Hydrogen atoms per cm^3.
# Parameters for the EAGLE "equation of state"
EAGLEEntropyFloor:
Jeans_density_threshold_H_p_cm3: 0.1 # Physical density above which the EAGLE Jeans limiter entropy floor kicks in expressed in Hydrogen atoms per cm^3.
Jeans_over_density_threshold: 10. # Overdensity above which the EAGLE Jeans limiter entropy floor can kick in.
Jeans_temperature_norm_K: 8000 # Temperature of the EAGLE Jeans limiter entropy floor at the density threshold expressed in Kelvin.
Jeans_gamma_effective: 1.3333333 # Slope the of the EAGLE Jeans limiter entropy floor
Cool_density_threshold_H_p_cm3: 1e-5 # Physical density above which the EAGLE Cool limiter entropy floor kicks in expressed in Hydrogen atoms per cm^3.
Cool_over_density_threshold: 10. # Overdensity above which the EAGLE Cool limiter entropy floor can kick in.
Cool_temperature_norm_K: 8000 # Temperature of the EAGLE Cool limiter entropy floor at the density threshold expressed in Kelvin.
Cool_gamma_effective: 1. # Slope the of the EAGLE Cool limiter entropy floor
#!/bin/bash
wget http://virgodb.cosma.dur.ac.uk/swift-webstorage/ICs/EAGLE_ICs/EAGLE_L0050N0752_ICs.hdf5
#!/bin/bash
# Generate the initial conditions if they are not present.
if [ ! -e EAGLE_L0050N0752_ICs.hdf5 ]
then
echo "Fetching initial conditions for the EAGLE 50Mpc example..."
./getIC.sh
fi
../../swift --cosmology --hydro --self-gravity --stars --threads=16 eagle_50.yml 2>&1 | tee output.log
......@@ -13,4 +13,4 @@ The particle load of the main EAGLE simulation can be reproduced by
running these ICs on 8 cores.
MD5 checksum of the ICs:
88877f5bb0ee21488c20b8f065fc74db EAGLE_ICs_12.hdf5
d1ebf1c7ffb0488c3628e08ed6d2dbf4 EAGLE_ICs_12.hdf5
......@@ -83,7 +83,6 @@ EAGLEStarFormation:
EOS_density_norm_H_p_cm3: 0.1 # Physical density used for the normalisation of the EOS assumed for the star-forming gas in Hydrogen atoms per cm^3.
EOS_temperature_norm_K: 8000 # Temperature om the polytropic EOS assumed for star-forming gas at the density normalisation in Kelvin.
EOS_gamma_effective: 1.3333333 # Slope the of the polytropic EOS assumed for the star-forming gas.
gas_fraction: 0.3 # The gas fraction used internally by the model.
KS_normalisation: 1.515e-4 # The normalization of the Kennicutt-Schmidt law in Msun / kpc^2 / yr.
KS_exponent: 1.4 # The exponent of the Kennicutt-Schmidt law.
KS_min_over_density: 57.7 # The over-density above which star-formation is allowed.
......
......@@ -13,4 +13,4 @@ The particle load of the main EAGLE simulation can be reproduced by
running these ICs on 64 cores.
MD5 checksum of the ICs:
02cd1c353b86230af047b5d4ab22afcf EAGLE_ICs_25.hdf5
592faecfc51239a00396f5a4acc2fa4d EAGLE_ICs_25.hdf5
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment