Commit 603e0ffe authored by Matthieu Schaller's avatar Matthieu Schaller

Revert "Revert "Merge branch 'master' into 'updated_MAC'""

This reverts commit 4dec23e9.
parent c549d4cb
......@@ -60,34 +60,89 @@ CGS. Entries in the file look like:
.. code:: YAML
SelectOutput:
# Particle Type Gas
Coordinates_Gas: 1 # Co-moving positions of the particles. ::: Conversion to physical CGS: a U_L [ cm ]
Velocities_Gas: 1 # Peculiar velocities of the stars. This is (a * dx/dt) where x is the co-moving positions of the particles. ::: Conversion to physical CGS: U_L U_t^-1 [ cm s^-1 ]
Masses_Gas: 1 # Masses of the particles. ::: Conversion to physical CGS: U_M [ g ]
SmoothingLengths_Gas: 1 # Co-moving smoothing lengths (FWHM of the kernel) of the particles. ::: Conversion to physical CGS: a U_L [ cm ]
Users can select the particle fields to output in snapshot using the
YAML parameter file. In section ``SelectOutput``, users can demand to
remove a field by adding a parameter formatted in the following way
``field_parttype`` where ``field`` is the name of the field that is to
be removed (e.g. ``Masses``) and ``parttype`` is the type of particles
that contains this field (``Gas``, ``DM``, ``Stars`` or ``BH``). For
a parameter, the only values accepted are ``0`` (skip this field when
writing) or ``1`` (default, do not skip this field when writing). By
default all fields are written.
This field is mostly used to remove unnecessary output by listing them
with 0's. A classic use-case for this feature is a DM-only simulation
(pure n-body) where all particles have the same mass. Outputting the
mass field in the snapshots results in extra i/o time and unnecessary
waste of disk space. The corresponding section of the ``yaml``
parameter file would look like:
Default:
# Particle Type Gas
Coordinates_Gas: off # Co-moving positions of the particles : a U_L [ cm ]
Velocities_Gas: on # Peculiar velocities of the stars. This is (a * dx/dt) where x is the co-moving positions of the particles : U_L U_t^-1 [ cm s^-1 ]
Masses_Gas: on # Masses of the particles : U_M [ g ]
SmoothingLengths_Gas: on # Co-moving smoothing lengths (FWHM of the kernel) of the particles : a U_L [ cm ]
...
Users can select the particle fields to output in snapshot using a (separate)
YAML parameter file. By default, you can define a section `Default` at the
top level of this file (in the exact same way as the file dumped by using the
`-o` option in SWIFT). By default, all fields are written, but by using the
"off" string, you can force the code to skip over unwanted outputs.
You must then, in the regular SWIFT parameter file, select the following
options:
.. code:: YAML
SelectOutput:
Masses_DM: 0
Snapshots:
select_output_on: 1
select_output: your_select_output_yaml.yml
This field is mostly used to remove unnecessary output by listing them with
0's. A classic use-case for this feature is a DM-only simulation (pure
n-body) where all particles have the same mass. Outputting the mass field in
the snapshots results in extra i/o time and unnecessary waste of disk space.
The corresponding section of the YAML file would look like:
.. code:: YAML
Default:
Masses_DM: off
Entries can simply be copied from the ``output.yml`` generated by the
``-o`` runtime flag.
Combining Output Lists and Output Selection
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
It is possible to combine the behaviour of the output list and the select
output file. To do so, you will need to enable both the ``select_output`` and
``output_list`` options in your main ``parameter_file.yml`` as follows:
.. code:: YAML
Snapshots:
output_list_on: 1
output_list: "output_list.txt"
select_output_on: 1
select_output: "select_output.yml"
A typical use case for such a scenario is the dumping of 'snapshots' and
so-called 'snipshots', containing less information than their full snapshot
cousins. To do this, we will define two top-level sections in our
``select_output.yml`` file as follows:
.. code:: YAML
# Only turn off DM masses in snapshots, everything else is turned on
Snapshot:
Masses_DM: off
# Turn off lots of stuff in snipshots!
Snipshot:
Metal_Mass_Fractions_Gas: off
Element_Mass_Fractions_Gas: off
...
To then select which outputs are 'snapshots' and which are 'snipshots', you
will need to add the ``Select Output`` column to the ``output_list.txt`` as
follows::
# Redshift, Select Output
100.0, Snapshot
90.0, Snipshot
80.0, Snipshot
70.0, Snipshot
60.0, Snapshot
...
This will enable your simulation to perform partial dumps only at the outputs
labelled as ``Snipshot``. The name of the output selection that corresponds
to your choice in the output list will be written to the snapshot header as
``Header/SelectOutput``.
Small LCDM cosmological simulation generated by C. Power. Cosmology
is WMAP9 and the box is 100Mpc/h in size with 64^3 particles.
We use a softening length of 1/25th of the mean inter-particle separation.
The ICs have been generated to run with Gadget-2 so we need to switch
on the options to cancel the h-factors and a-factors at reading time.
We generate gas from the ICs using SWIFT's internal mechanism and set the
temperature to the expected gas temperature at this redshift.
The 'plotTempEvolution.py' plots the temperature evolution of the gas
in the simulated volume.
This version uses an output list that has 'snapshots' and 'snipshots'
as a useful example for this functionality.
MD5 checksum of the ICs:
08736c3101fd738e22f5159f78e6022b small_cosmo_volume.hdf5
#!/bin/bash
wget http://virgodb.cosma.dur.ac.uk/swift-webstorage/ICs/small_cosmo_volume.hdf5
# Scale Factor, Select Output
0.019607843137254943, Snapshot
0.02352941176470591, Snipshot
0.027450980392156876, Snipshot
0.03137254901960784, Snipshot
0.03529411764705881, Snipshot
0.039215686274509776, Snapshot
0.04313725490196085, Snipshot
0.04705882352941182, Snipshot
0.050980392156862786, Snipshot
0.05490196078431375, Snipshot
0.05882352941176472, Snapshot
0.06274509803921569, Snipshot
0.06666666666666665, Snipshot
0.07058823529411762, Snipshot
0.07450980392156858, Snipshot
0.07843137254901966, Snapshot
0.08235294117647063, Snipshot
0.0862745098039216, Snipshot
0.09019607843137256, Snipshot
0.09411764705882353, Snipshot
0.0980392156862745, Snapshot
0.10196078431372546, Snipshot
0.10588235294117654, Snipshot
0.1098039215686275, Snipshot
0.11372549019607847, Snipshot
0.11764705882352944, Snapshot
0.1215686274509804, Snipshot
0.12549019607843137, Snipshot
0.12941176470588234, Snipshot
0.1333333333333333, Snipshot
0.13725490196078427, Snapshot
0.14117647058823535, Snipshot
0.14509803921568631, Snipshot
0.14901960784313728, Snipshot
0.15294117647058825, Snipshot
0.1568627450980392, Snapshot
0.16078431372549018, Snipshot
0.16470588235294115, Snipshot
0.16862745098039222, Snipshot
0.1725490196078432, Snipshot
0.17647058823529416, Snapshot
0.18039215686274512, Snipshot
0.1843137254901961, Snipshot
0.18823529411764706, Snipshot
0.19215686274509802, Snipshot
0.196078431372549, Snapshot
0.19999999999999996, Snipshot
0.20392156862745103, Snipshot
0.207843137254902, Snipshot
0.21176470588235297, Snipshot
0.21568627450980393, Snapshot
0.2196078431372549, Snipshot
0.22352941176470587, Snipshot
0.22745098039215683, Snipshot
0.2313725490196079, Snipshot
0.23529411764705888, Snapshot
0.23921568627450984, Snipshot
0.2431372549019608, Snipshot
0.24705882352941178, Snipshot
0.25098039215686274, Snipshot
0.2549019607843137, Snapshot
0.2588235294117647, Snipshot
0.26274509803921564, Snipshot
0.2666666666666667, Snipshot
0.2705882352941177, Snipshot
0.27450980392156865, Snapshot
0.2784313725490196, Snipshot
0.2823529411764706, Snipshot
0.28627450980392155, Snipshot
0.2901960784313725, Snipshot
0.2941176470588236, Snapshot
0.29803921568627456, Snipshot
0.3019607843137255, Snipshot
0.3058823529411765, Snipshot
0.30980392156862746, Snipshot
0.3137254901960784, Snapshot
0.3176470588235294, Snipshot
0.32156862745098036, Snipshot
0.3254901960784313, Snipshot
0.3294117647058824, Snipshot
0.33333333333333337, Snapshot
0.33725490196078434, Snipshot
0.3411764705882353, Snipshot
0.34509803921568627, Snipshot
0.34901960784313724, Snipshot
0.3529411764705882, Snapshot
0.3568627450980393, Snipshot
0.36078431372549025, Snipshot
0.3647058823529412, Snipshot
0.3686274509803922, Snipshot
0.37254901960784315, Snapshot
0.3764705882352941, Snipshot
0.3803921568627451, Snipshot
0.38431372549019605, Snipshot
0.388235294117647, Snipshot
0.3921568627450981, Snapshot
0.39607843137254906, Snipshot
0.4, Snipshot
0.403921568627451, Snipshot
0.40784313725490196, Snipshot
0.4117647058823529, Snapshot
0.4156862745098039, Snipshot
0.41960784313725497, Snipshot
0.42352941176470593, Snipshot
0.4274509803921569, Snipshot
0.43137254901960786, Snapshot
0.43529411764705883, Snipshot
0.4392156862745098, Snipshot
0.44313725490196076, Snipshot
0.44705882352941173, Snipshot
0.4509803921568627, Snapshot
0.4549019607843138, Snipshot
0.45882352941176474, Snipshot
0.4627450980392157, Snipshot
0.4666666666666667, Snipshot
0.47058823529411764, Snapshot
0.4745098039215686, Snipshot
0.4784313725490196, Snipshot
0.48235294117647065, Snipshot
0.4862745098039216, Snipshot
0.4901960784313726, Snapshot
0.49411764705882355, Snipshot
0.4980392156862745, Snipshot
0.5019607843137255, Snipshot
0.5058823529411764, Snipshot
0.5098039215686274, Snapshot
0.5137254901960784, Snipshot
0.5176470588235293, Snipshot
0.5215686274509804, Snipshot
0.5254901960784314, Snipshot
0.5294117647058824, Snapshot
0.5333333333333333, Snipshot
0.5372549019607843, Snipshot
0.5411764705882354, Snipshot
0.5450980392156863, Snipshot
0.5490196078431373, Snapshot
0.5529411764705883, Snipshot
0.5568627450980392, Snipshot
0.5607843137254902, Snipshot
0.5647058823529412, Snipshot
0.5686274509803921, Snapshot
0.5725490196078431, Snipshot
0.5764705882352941, Snipshot
0.580392156862745, Snipshot
0.5843137254901961, Snipshot
0.5882352941176471, Snapshot
0.592156862745098, Snipshot
0.596078431372549, Snipshot
0.6, Snipshot
0.603921568627451, Snipshot
0.607843137254902, Snapshot
0.611764705882353, Snipshot
0.615686274509804, Snipshot
0.6196078431372549, Snipshot
0.6235294117647059, Snipshot
0.6274509803921569, Snapshot
0.6313725490196078, Snipshot
0.6352941176470588, Snipshot
0.6392156862745098, Snipshot
0.6431372549019607, Snipshot
0.6470588235294118, Snapshot
0.6509803921568628, Snipshot
0.6549019607843137, Snipshot
0.6588235294117647, Snipshot
0.6627450980392157, Snipshot
0.6666666666666667, Snapshot
0.6705882352941177, Snipshot
0.6745098039215687, Snipshot
0.6784313725490196, Snipshot
0.6823529411764706, Snipshot
0.6862745098039216, Snapshot
0.6901960784313725, Snipshot
0.6941176470588235, Snipshot
0.6980392156862745, Snipshot
0.7019607843137254, Snipshot
0.7058823529411764, Snapshot
0.7098039215686275, Snipshot
0.7137254901960784, Snipshot
0.7176470588235294, Snipshot
0.7215686274509804, Snipshot
0.7254901960784313, Snapshot
0.7294117647058824, Snipshot
0.7333333333333334, Snipshot
0.7372549019607844, Snipshot
0.7411764705882353, Snipshot
0.7450980392156863, Snapshot
0.7490196078431373, Snipshot
0.7529411764705882, Snipshot
0.7568627450980392, Snipshot
0.7607843137254902, Snipshot
0.7647058823529411, Snapshot
0.7686274509803921, Snipshot
0.7725490196078432, Snipshot
0.7764705882352941, Snipshot
0.7803921568627451, Snipshot
0.7843137254901961, Snapshot
0.788235294117647, Snipshot
0.7921568627450981, Snipshot
0.7960784313725491, Snipshot
0.8, Snipshot
0.803921568627451, Snapshot
0.807843137254902, Snipshot
0.8117647058823529, Snipshot
0.8156862745098039, Snipshot
0.8196078431372549, Snipshot
0.8235294117647058, Snapshot
0.8274509803921568, Snipshot
0.8313725490196078, Snipshot
0.8352941176470589, Snipshot
0.8392156862745098, Snipshot
0.8431372549019608, Snapshot
0.8470588235294118, Snipshot
0.8509803921568627, Snipshot
0.8549019607843138, Snipshot
0.8588235294117648, Snipshot
0.8627450980392157, Snapshot
0.8666666666666667, Snipshot
0.8705882352941177, Snipshot
0.8745098039215686, Snipshot
0.8784313725490196, Snipshot
0.8823529411764706, Snapshot
0.8862745098039215, Snipshot
0.8901960784313725, Snipshot
0.8941176470588236, Snipshot
0.8980392156862745, Snipshot
0.9019607843137255, Snapshot
0.9058823529411765, Snipshot
0.9098039215686274, Snipshot
0.9137254901960784, Snipshot
0.9176470588235294, Snipshot
0.9215686274509804, Snapshot
0.9254901960784314, Snipshot
0.9294117647058824, Snipshot
0.9333333333333333, Snipshot
0.9372549019607843, Snipshot
0.9411764705882353, Snapshot
0.9450980392156862, Snipshot
0.9490196078431372, Snipshot
0.9529411764705882, Snipshot
0.9568627450980393, Snipshot
0.9607843137254902, Snapshot
0.9647058823529412, Snipshot
0.9686274509803922, Snipshot
0.9725490196078431, Snipshot
0.9764705882352941, Snipshot
0.9803921568627451, Snapshot
0.9843137254901961, Snipshot
0.9882352941176471, Snipshot
0.9921568627450981, Snipshot
0.996078431372549, Snipshot
1.0, Snapshot
################################################################################
# This file is part of SWIFT.
# Copyright (c) 2018 Matthieu Schaller (matthieu.schaller@durham.ac.uk)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
################################################################################
# Computes the temperature evolution of the gas in a cosmological box
# Physical constants needed for internal energy to temperature conversion
k_in_J_K = 1.38064852e-23
mH_in_kg = 1.6737236e-27
# Number of snapshots generated
n_snapshots = 200
import matplotlib
matplotlib.use("Agg")
from pylab import *
import h5py
import os.path
# Plot parameters
params = {'axes.labelsize': 10,
'axes.titlesize': 10,
'font.size': 9,
'legend.fontsize': 9,
'xtick.labelsize': 10,
'ytick.labelsize': 10,
'text.usetex': True,
'figure.figsize' : (3.15,3.15),
'figure.subplot.left' : 0.14,
'figure.subplot.right' : 0.99,
'figure.subplot.bottom' : 0.12,
'figure.subplot.top' : 0.99,
'figure.subplot.wspace' : 0.15,
'figure.subplot.hspace' : 0.12,
'lines.markersize' : 6,
'lines.linewidth' : 2.,
'text.latex.unicode': True
}
rcParams.update(params)
rc('font',**{'family':'sans-serif','sans-serif':['Times']})
# Read the simulation data
sim = h5py.File("snap_0000.hdf5", "r")
boxSize = sim["/Header"].attrs["BoxSize"][0]
time = sim["/Header"].attrs["Time"][0]
scheme = sim["/HydroScheme"].attrs["Scheme"][0]
kernel = sim["/HydroScheme"].attrs["Kernel function"][0]
neighbours = sim["/HydroScheme"].attrs["Kernel target N_ngb"][0]
eta = sim["/HydroScheme"].attrs["Kernel eta"][0]
alpha = sim["/HydroScheme"].attrs["Alpha viscosity"][0]
H_mass_fraction = sim["/HydroScheme"].attrs["Hydrogen mass fraction"][0]
H_transition_temp = sim["/HydroScheme"].attrs["Hydrogen ionization transition temperature"][0]
T_initial = sim["/HydroScheme"].attrs["Initial temperature"][0]
T_minimal = sim["/HydroScheme"].attrs["Minimal temperature"][0]
git = sim["Code"].attrs["Git Revision"]
# Cosmological parameters
H_0 = sim["/Cosmology"].attrs["H0 [internal units]"][0]
gas_gamma = sim["/HydroScheme"].attrs["Adiabatic index"][0]
unit_length_in_cgs = sim["/Units"].attrs["Unit length in cgs (U_L)"]
unit_mass_in_cgs = sim["/Units"].attrs["Unit mass in cgs (U_M)"]
unit_time_in_cgs = sim["/Units"].attrs["Unit time in cgs (U_t)"]
unit_length_in_si = 0.01 * unit_length_in_cgs
unit_mass_in_si = 0.001 * unit_mass_in_cgs
unit_time_in_si = unit_time_in_cgs
# Primoridal ean molecular weight as a function of temperature
def mu(T, H_frac=H_mass_fraction, T_trans=H_transition_temp):
if T > T_trans:
return 4. / (8. - 5. * (1. - H_frac))
else:
return 4. / (1. + 3. * H_frac)
# Temperature of some primoridal gas with a given internal energy
def T(u, H_frac=H_mass_fraction, T_trans=H_transition_temp):
T_over_mu = (gas_gamma - 1.) * u * mH_in_kg / k_in_J_K
ret = np.ones(np.size(u)) * T_trans
# Enough energy to be ionized?
mask_ionized = (T_over_mu > (T_trans+1) / mu(T_trans+1, H_frac, T_trans))
if np.sum(mask_ionized) > 0:
ret[mask_ionized] = T_over_mu[mask_ionized] * mu(T_trans*10, H_frac, T_trans)
# Neutral gas?
mask_neutral = (T_over_mu < (T_trans-1) / mu((T_trans-1), H_frac, T_trans))
if np.sum(mask_neutral) > 0:
ret[mask_neutral] = T_over_mu[mask_neutral] * mu(0, H_frac, T_trans)
return ret
z = np.zeros(n_snapshots)
a = np.zeros(n_snapshots)
T_mean = np.zeros(n_snapshots)
T_std = np.zeros(n_snapshots)
T_log_mean = np.zeros(n_snapshots)
T_log_std = np.zeros(n_snapshots)
T_median = np.zeros(n_snapshots)
T_min = np.zeros(n_snapshots)
T_max = np.zeros(n_snapshots)
# Loop over all the snapshots
for i in range(n_snapshots):
sim = h5py.File("snap_%04d.hdf5"%i, "r")
z[i] = sim["/Cosmology"].attrs["Redshift"][0]
a[i] = sim["/Cosmology"].attrs["Scale-factor"][0]
u = sim["/PartType0/InternalEnergies"][:]
# Compute the temperature
u *= (unit_length_in_si**2 / unit_time_in_si**2)
u /= a[i]**(3 * (gas_gamma - 1.))
Temp = T(u)
# Gather statistics
T_median[i] = np.median(Temp)
T_mean[i] = Temp.mean()
T_std[i] = Temp.std()
T_log_mean[i] = np.log10(Temp).mean()
T_log_std[i] = np.log10(Temp).std()
T_min[i] = Temp.min()
T_max[i] = Temp.max()
# CMB evolution
a_evol = np.logspace(-3, 0, 60)
T_cmb = (1. / a_evol)**2 * 2.72
# Plot the interesting quantities
figure()
subplot(111, xscale="log", yscale="log")
fill_between(a, T_mean-T_std, T_mean+T_std, color='C0', alpha=0.1)
plot(a, T_max, ls='-.', color='C0', lw=1., label="${\\rm max}~T$")
plot(a, T_min, ls=':', color='C0', lw=1., label="${\\rm min}~T$")
plot(a, T_mean, color='C0', label="${\\rm mean}~T$", lw=1.5)
fill_between(a, 10**(T_log_mean-T_log_std), 10**(T_log_mean+T_log_std), color='C1', alpha=0.1)
plot(a, 10**T_log_mean, color='C1', label="${\\rm mean}~{\\rm log} T$", lw=1.5)
plot(a, T_median, color='C2', label="${\\rm median}~T$", lw=1.5)
legend(loc="upper left", frameon=False, handlelength=1.5)
# Expected lines
plot([1e-10, 1e10], [H_transition_temp, H_transition_temp], 'k--', lw=0.5, alpha=0.7)
text(2.5e-2, H_transition_temp*1.07, "$T_{\\rm HII\\rightarrow HI}$", va="bottom", alpha=0.7, fontsize=8)
plot([1e-10, 1e10], [T_minimal, T_minimal], 'k--', lw=0.5, alpha=0.7)
text(1e-2, T_minimal*0.8, "$T_{\\rm min}$", va="top", alpha=0.7, fontsize=8)
plot(a_evol, T_cmb, 'k--', lw=0.5, alpha=0.7)
text(a_evol[20], T_cmb[20]*0.55, "$(1+z)^2\\times T_{\\rm CMB,0}$", rotation=-34, alpha=0.7, fontsize=8, va="top", bbox=dict(facecolor='w', edgecolor='none', pad=1.0, alpha=0.9))
redshift_ticks = np.array([0., 1., 2., 5., 10., 20., 50., 100.])
redshift_labels = ["$0$", "$1$", "$2$", "$5$", "$10$", "$20$", "$50$", "$100$"]
a_ticks = 1. / (redshift_ticks + 1.)
xticks(a_ticks, redshift_labels)
minorticks_off()
xlabel("${\\rm Redshift}~z$", labelpad=0)
ylabel("${\\rm Temperature}~T~[{\\rm K}]$", labelpad=0)
xlim(9e-3, 1.1)
ylim(20, 2.5e7)
savefig("Temperature_evolution.png", dpi=200)
#!/bin/bash
# Generate the initial conditions if they are not present.
if [ ! -e small_cosmo_volume.hdf5 ]
then
echo "Fetching initial conditions for the small cosmological volume example..."
./getIC.sh
fi
# Run SWIFT
../../swift --cosmology --hydro --self-gravity --threads=8 small_cosmo_volume.yml 2>&1 | tee output.log
# Plot the temperature evolution
python plotTempEvolution.py
# All fields are written by default so in some sense the repeated 'on's are
# unnecessary, but they are included for completeness.
Snapshot:
# Particle Type Gas
Coordinates_Gas: on # Co-moving positions of the particles : a U_L [ cm ]
Velocities_Gas: on # Peculiar velocities of the stars. This is (a * dx/dt) where x is the co-moving positions of the particles : U_L U_t^-1 [ cm s^-1 ]
Masses_Gas: on # Masses of the particles : U_M [ g ]
SmoothingLengths_Gas: on # Co-moving smoothing lengths (FWHM of the kernel) of the particles : a U_L [ cm ]
Entropies_Gas: on # Co-moving entropies per unit mass of the particles : U_M^-1.6667 U_L^4 U_t^-2 [ g^-1.6667 cm^4 s^-2 ]
ParticleIDs_Gas: on # Unique IDs of the particles : [ - ]
Densities_Gas: on # Co-moving mass densities of the particles : a^-3 U_M U_L^-3 [ g cm^-3 ]
InternalEnergies_Gas: on # Co-moving thermal energies per unit mass of the particles : a^-2 U_L^2 U_t^-2 [ cm^2 s^-2 ]
Pressures_Gas: on # Co-moving pressures of the particles : a^-5 U_M U_L^-1 U_t^-2 [ g cm^-1 s^-2 ]
Potentials_Gas: on # Co-moving gravitational potential at position of the particles : a^-1 U_L^2 U_t^-2 [ cm^2 s^-2 ]
Temperatures_Gas: on # Temperature of the particles : U_T [ K ]
VELOCIraptorGroupIDs_Gas: on # Group IDs of the particles in the VELOCIraptor catalogue : [ - ]
# Particle Type DM
Coordinates_DM: on # Co-moving position of the particles : a U_L [ cm ]
Velocities_DM: on # Peculiar velocities of the stars. This is a * dx/dt where x is the co-moving position of the particles. : U_L U_t^-1 [ cm s^-1 ]
Masses_DM: on # Masses of the particles : U_M [ g ]
ParticleIDs_DM: on # Unique ID of the particles : [ - ]
Softenings_DM: on # Co-moving Plummer-equivalent softening lengths of the particles. : a U_L [ cm ]
VELOCIraptorGroupIDs_DM: on # Group IDs of the particles in the VELOCIraptor catalogue : [ - ]
Snipshot:
# Particle Type Gas
Coordinates_Gas: on # Co-moving positions of the particles : a U_L [ cm ]
Velocities_Gas: on # Peculiar velocities of the stars. This is (a * dx/dt) where x is the co-moving positions of the particles : U_L U_t^-1 [ cm s^-1 ]
Masses_Gas: on # Masses of the particles : U_M [ g ]
SmoothingLengths_Gas: on # Co-moving smoothing lengths (FWHM of the kernel) of the particles : a U_L [ cm ]
Entropies_Gas: off # Co-moving entropies per unit mass of the particles : U_M^-1.6667 U_L^4 U_t^-2 [ g^-1.6667 cm^4 s^-2 ]
ParticleIDs_Gas: on # Unique IDs of the particles : [ - ]
Densities_Gas: off # Co-moving mass densities of the particles : a^-3 U_M U_L^-3 [ g cm^-3 ]
InternalEnergies_Gas: off # Co-moving thermal energies per unit mass of the particles : a^-2 U_L^2 U_t^-2 [ cm^2 s^-2 ]
Pressures_Gas: off # Co-moving pressures of the particles : a^-5 U_M U_L^-1 U_t^-2 [ g cm^-1 s^-2 ]
Potentials_Gas: off # Co-moving gravitational potential at position of the particles : a^-1 U_L^2 U_t^-2 [ cm^2 s^-2 ]
Temperatures_Gas: off # Temperature of the particles : U_T [ K ]
VELOCIraptorGroupIDs_Gas: off # Group IDs of the particles in the VELOCIraptor catalogue : [ - ]
# Particle Type DM
Coordinates_DM: on # Co-moving position of the particles : a U_L [ cm ]
Velocities_DM: on # Peculiar velocities of the stars. This is a * dx/dt where x is the co-moving position of the particles. : U_L U_t^-1 [ cm s^-1 ]
Masses_DM: off # Masses of the particles : U_M [ g ]
ParticleIDs_DM: on # Unique ID of the particles : [ - ]
Softenings_DM: off # Co-moving Plummer-equivalent softening lengths of the particles. : a U_L [ cm ]
VELOCIraptorGroupIDs_DM: off # Group IDs of the particles in the VELOCIraptor catalogue : [ - ]
# Define the system of units to use internally.
InternalUnitSystem:
UnitMass_in_cgs: 1.98841e43 # 10^10 M_sun
UnitLength_in_cgs: 3.08567758e24 # 1 Mpc
UnitVelocity_in_cgs: 1e5 # 1 km/s
UnitCurrent_in_cgs: 1 # Amperes
UnitTemp_in_cgs: 1 # Kelvin
Cosmology: # WMAP9 cosmology
Omega_m: 0.276
Omega_lambda: 0.724
Omega_b: 0.0455
h: 0.703
a_begin: 0.019607843 # z_ini = 50.
a_end: 1.0 # z_end = 0.
# Parameters governing the time integration
TimeIntegration:
dt_min: 1e-6
dt_max: 1e-2
# Parameters for the self-gravity scheme
Gravity:
eta: 0.025
theta: 0.5
comoving_DM_softening: 0.0889 # 1/25th of the mean inter-particle separation: 88.9 kpc
max_physical_DM_softening: 0.0889 # 1/25th of the mean inter-particle separation: 88.9 kpc
comoving_baryon_softening: 0.0889 # 1/25th of the mean inter-particle separation: 88.9 kpc
max_physical_baryon_softening: 0.0889 # 1/25th of the mean inter-particle separation: 88.9 kpc
mesh_side_length: 64
# Parameters of the hydro scheme
SPH:
resolution_eta: 1.2348 # "48 Ngb" with the cubic spline kernel
h_min_ratio: 0.1
CFL_condition: 0.1
initial_temperature: 7075. # (1 + z_ini)^2 * 2.72K
minimal_temperature: 100.
# Parameters governing the snapshots
Snapshots:
basename: snap