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

Add a small cosmological volume example with gas and a script to plot the...

Add a small cosmological volume example with gas and a script to plot the temperature evolution of the Universe.
parent 206ee51f
No related branches found
No related tags found
No related merge requests found
......@@ -4,6 +4,11 @@ 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.
MD5 checksum of the ICs:
08736c3101fd738e22f5159f78e6022b small_cosmo_volume.hdf5
......@@ -7,5 +7,8 @@ then
./getIC.sh
fi
../swift -c -G -t 8 small_cosmo_volume.yml 2>&1 | tee output.log
# Run SWIFT
../swift -c -s -G -t 8 small_cosmo_volume.yml 2>&1 | tee output.log
# Plot the temperature evolution
python plotTempEvolution.py
......@@ -6,14 +6,6 @@ InternalUnitSystem:
UnitCurrent_in_cgs: 1 # Amperes
UnitTemp_in_cgs: 1 # Kelvin
# Structure finding options
StructureFinding:
config_file_name: stf_input_6dfof_dmonly_sub.cfg
basename: ./stf
output_time_format: 1
scale_factor_first: 0.02
delta_time: 1.02
Cosmology: # WMAP9 cosmology
Omega_m: 0.276
Omega_lambda: 0.724
......@@ -34,7 +26,14 @@ Gravity:
comoving_softening: 0.0889 # 1/25th of the mean inter-particle separation: 88.9 kpc
max_physical_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
CFL_condition: 0.1
initial_temperature: 7075. # (1 + z_ini)^2 * 2.72K
minimal_temperature: 100.
# Parameters governing the snapshots
Snapshots:
basename: snap
......@@ -55,3 +54,5 @@ InitialConditions:
file_name: small_cosmo_volume.hdf5
cleanup_h_factors: 1
cleanup_velocity_factors: 1
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.
......@@ -219,7 +219,7 @@ void hydro_props_print_snapshot(hid_t h_grpsph, const struct hydro_props *p) {
io_write_attribute_f(h_grpsph, "Hydrogen mass fraction",
p->hydrogen_mass_fraction);
io_write_attribute_f(h_grpsph, "Hydrogen ionization transition temperature",
p->hydrogen_ionization_temperature);
p->hydrogen_ionization_temperature);
io_write_attribute_f(h_grpsph, "Alpha viscosity", const_viscosity_alpha);
}
#endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment