Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • 840-unit-test-testtimeline-fails
  • 875-wendland-c6-missing-neighbour-contributions
  • 887-code-does-not-compile-with-parmetis-installed-locally-but-without-metis
  • CubeTest
  • FS_Del
  • GEARRT_Iliev1
  • GEARRT_Iliev3
  • GEARRT_Iliev4
  • GEARRT_Iliev5
  • GEARRT_Iliev5-fixed-nr-subcycles
  • GEARRT_Iliev7
  • GEARRT_Iliev_static
  • GEARRT_Ivanova
  • GEARRT_fixed_nr_subcycles
  • GEARRT_injection_tests_Iliev0
  • GPU_swift
  • GrackleCoolingUpdates2
  • Lambda-T-table
  • MAGMA2
  • MAGMA2_matthieu
  • MHD_FS
  • MHD_FS_TESTs
  • MHD_FS_VP_AdvectGauge
  • MHD_Orestis
  • MHD_canvas
  • MHD_canvas_RF_128
  • MHD_canvas_RF_growth_rate
  • MHD_canvas_RobertsFlow
  • MHD_canvas_SPH_errors
  • MHD_canvas_matthieu
  • MHD_canvas_nickishch
  • MHD_canvas_nickishch_Lorentz_force_test
  • MHD_canvas_nickishch_track_everything
  • MHD_canvas_sid
  • OAK/CPAW_updates
  • OAK/LoopAdvectionTest
  • OAK/adaptive_divv
  • OAK/kinetic_dedner
  • REMIX_cosmo
  • RT_dualc
  • RT_recombination_radiation
  • RT_test_mladen
  • SIDM
  • SIDM_wKDSDK
  • SNdust
  • SPHM1RT_CosmologicalStromgrenSphere
  • SPHM1RT_bincheck
  • SPHM1RT_smoothedRT
  • TangoSIDM
  • TestPropagation3D
  • Test_fixedhProb
  • activate_fewer_comms
  • active_h_max_optimization
  • adaptive_softening_Lieuwe
  • add_2p5D
  • add_black_holes_checks
  • adding_sidm_to_master
  • agn_crksph
  • agn_crksph_subtask_speedup
  • amd-optimization
  • arm_vec
  • automatic_tasks
  • better_ray_RNG
  • black_holes_accreted_angular_momenta_from_gas
  • burkert-potential
  • c11
  • c11_atomics_copy
  • cancel_all_sorts
  • cell_exchange_improvements
  • cell_types
  • cherry-pick-cd1c39e0
  • comm_tasks_are_special
  • conduction_velocities
  • cpp-fixes
  • cuda_test
  • darwin/adaptive_softening
  • darwin/gear_chemistry_fluxes
  • darwin/gear_mechanical_feedback
  • darwin/gear_preSN_feedback
  • darwin/gear_radiation
  • darwin/simulations
  • darwin/sink_formation_proba
  • darwin/sink_mpi
  • darwin/sink_mpi_physics
  • dead-time-stats
  • derijcke_cooling
  • dev_cms
  • do-not-activate-empty-star-pairs
  • domain_zoom_nometis
  • drift_flag_debug_check
  • driven_turbulence
  • driven_turbulence_forcings
  • engineering
  • eos_updates
  • evrard_disc
  • expand_fof_2022
  • explict_bkg_cdim
  • fewer_gpart_comms
  • fewer_star_comms
  • fewer_timestep_comms_no_empty_pairs
  • v0.0
  • v0.1
  • v0.1.0-pre
  • v0.2.0
  • v0.3.0
  • v0.4.0
  • v0.5.0
  • v0.6.0
  • v0.7.0
  • v0.8.0
  • v0.8.1
  • v0.8.2
  • v0.8.3
  • v0.8.4
  • v0.8.5
  • v0.9.0
  • v1.0.0
  • v2025.01
  • v2025.04
119 results

Target

Select target project
  • dc-oman1/swiftsim
  • swift/swiftsim
  • pdraper/swiftsim
  • tkchan/swiftsim
  • dc-turn5/swiftsim
5 results
Select Git revision
  • GPU_swift
  • Nifty-Clutser-Solution
  • Rsend_repart
  • Subsize
  • active_h_max
  • add-convergence-scripts
  • add_dehnen_aly_density_correction
  • add_particles_debug
  • advanced_opening_criteria
  • arm_vec
  • assume_for_gcc
  • atomic_read_writes
  • back_of_the_queue
  • c11_atomics
  • c11_atomics_copy
  • c11_standard
  • cache_time_bin
  • comm_tasks_are_special
  • cpp
  • cuda_test
  • dumper-thread
  • eagle-cooling-improvements
  • energy_logger
  • engineering
  • evrard_disc
  • ewald_correction
  • extra_EAGLE_EoS
  • feedback_after_hydro
  • gear
  • gear_feedback
  • gear_star_formation
  • generic_cache
  • genetic_partitioning2
  • gizmo
  • gizmo_mfv_entropy
  • gpart_assignment_speedup
  • gravity_testing
  • hydro_validation
  • isolated_galaxy_update
  • ivanova
  • ivanova-dirty
  • kahip
  • local_part
  • logger_index_file
  • logger_restart
  • logger_skip_fields
  • logger_write_hdf5
  • master
  • memalign-test
  • more_task_info
  • move_configure_to_m4
  • mpi-one-thread
  • mpi-packed-parts
  • mpi-send-subparts
  • mpi-send-subparts-vector
  • mpi-subparts-vector-grav
  • mpi-testsome
  • mpi-threads
  • multi_phase_bh
  • new_cpp
  • non-periodic-repart
  • non-periodic-repart-update
  • numa_alloc
  • numa_awareness
  • ontheflyimages
  • optimized_entropy_floor
  • parallel_compression
  • paranoid
  • planetary_ideal_gas
  • pyswiftsim
  • recurse_less_in_sort
  • recursive_star_ghosts
  • remove_long_long
  • reorder_rebuild
  • reverted_grav_depth_logic
  • reweight-fitted-costs
  • reweight-scaled-costs
  • sampled_stellar_evolution
  • scheduler_determinism
  • scotch
  • search-window-tests
  • signal-handler-dump
  • simba-stellar-feedback
  • skeleton
  • smarter_sends
  • snipes_data
  • sort-soa
  • spiral_potential
  • star_formation
  • stellar_disc_example
  • stf_output_dirs
  • streaming_io
  • subcell_sort
  • thread-dump-extract-waiters
  • threadpool_rmapper
  • timestep_limiter_update
  • top_level_cells
  • traphic
  • update-gravity
  • update_brute_force_checks
  • v0.0
  • v0.1
  • v0.1.0-pre
  • v0.2.0
  • v0.3.0
  • v0.4.0
  • v0.5.0
  • v0.6.0
  • v0.7.0
  • v0.8.0
  • v0.8.1
  • v0.8.2
  • v0.8.3
  • v0.8.4
114 results
Show changes
Showing
with 1294 additions and 214 deletions
#!/bin/bash #!/bin/bash
wget http://virgodb.cosma.dur.ac.uk/swift-webstorage/ICs/EAGLE_low_z/EAGLE_ICs_12.hdf5 wget https://virgodb.cosma.dur.ac.uk/swift-webstorage/ICs/EAGLE_low_z/EAGLE_ICs_12.hdf5
...@@ -7,5 +7,5 @@ then ...@@ -7,5 +7,5 @@ then
./getIC.sh ./getIC.sh
fi fi
../../swift --cosmology --hydro --self-gravity --stars --threads=16 eagle_12.yml 2>&1 | tee output.log ../../../swift --cosmology --hydro --self-gravity --stars --threads=16 eagle_12.yml 2>&1 | tee output.log
#!/bin/bash
# Run a RT test with EAGLE ICs.
#
# To use GEAR-RT, configure SWIFT with
#
# --with-stars=basic --with-hydro=gizmo-mfv --with-riemann-solver=hllc --with-rt=GEAR_1 --with-rt-riemann-solver=GLF --with-feedback=none
# [technically, any other feedback scheme should work as well.]
#
#
# To use the DEBUG RT scheme, configure SWIFT with
# --with-stars=basic --with-rt=debug --with-feedback=none
# [technically, any other feedback scheme should work as well.]
# Generate the initial conditions if they are not present.
if [ ! -e EAGLE_ICs_12.hdf5 ]
then
echo "Fetching initial conditions for the EAGLE 12Mpc example..."
./getIC.sh
fi
../../../swift \
--hydro --threads=8 --stars --self-gravity \
--feedback --radiation \
eagle_12_rt_test.yml
...@@ -14,3 +14,24 @@ running these ICs on 64 cores. ...@@ -14,3 +14,24 @@ running these ICs on 64 cores.
MD5 checksum of the ICs: MD5 checksum of the ICs:
e6a5de0e962d8ffb7589671b9613daa0 EAGLE_ICs_25.hdf5 e6a5de0e962d8ffb7589671b9613daa0 EAGLE_ICs_25.hdf5
A second example is set up to run with `./run_rt_test.sh`. It makes use
of the `eagle_25_rt_test.yml` file, and is intended to stress-test the
RT implementation rather than produce actual physically meaningful results.
o To use GEAR-RT, configure SWIFT with
--with-stars=basic --with-hydro=gizmo-mfv --with-riemann-solver=hllc --with-rt=GEAR_1 --with-rt-riemann-solver=GLF --with-feedback=none
[technically, any other feedback scheme should work as well.]
[the .yml file is set up to handle up to 3 photon groups, so
you could also be compiling with --with-rt=GEAR_3 if you want
to test more photon groups as well.]
o To use the DEBUG RT scheme, configure SWIFT with
--with-stars=basic --with-rt=debug --with-feedback=none
[technically, any other feedback scheme should work as well.]
MetaData:
run_name: EAGLE-L0025N0376-Ref
# Define the system of units to use internally. # Define the system of units to use internally.
InternalUnitSystem: InternalUnitSystem:
UnitMass_in_cgs: 1.98848e43 # 10^10 M_sun in grams UnitMass_in_cgs: 1.98841e43 # 10^10 M_sun in grams
UnitLength_in_cgs: 3.08567758e24 # Mpc in centimeters UnitLength_in_cgs: 3.08567758e24 # Mpc in centimeters
UnitVelocity_in_cgs: 1e5 # km/s in centimeters per second UnitVelocity_in_cgs: 1e5 # km/s in centimeters per second
UnitCurrent_in_cgs: 1 # Amperes UnitCurrent_in_cgs: 1 # Amperes
...@@ -19,9 +22,9 @@ Cosmology: ...@@ -19,9 +22,9 @@ Cosmology:
h: 0.6777 # Reduced Hubble constant h: 0.6777 # Reduced Hubble constant
a_begin: 0.9090909 # Initial scale-factor of the simulation a_begin: 0.9090909 # Initial scale-factor of the simulation
a_end: 1.0 # Final scale factor of the simulation a_end: 1.0 # Final scale factor of the simulation
Omega_m: 0.307 # Matter density parameter Omega_cdm: 0.2587481 # Cold Dark Matter density parameter
Omega_lambda: 0.693 # Dark-energy density parameter Omega_lambda: 0.693 # Dark-energy density parameter
Omega_b: 0.0455 # Baryon density parameter Omega_b: 0.0482519 # Baryon density parameter
Scheduler: Scheduler:
links_per_tasks: 500 links_per_tasks: 500
...@@ -39,6 +42,8 @@ Snapshots: ...@@ -39,6 +42,8 @@ Snapshots:
scale_factor_first: 0.91 # Scale-factor of the first snaphot (cosmological run) scale_factor_first: 0.91 # Scale-factor of the first snaphot (cosmological run)
time_first: 0.01 # Time of the first output (non-cosmological run) (in internal units) time_first: 0.01 # Time of the first output (non-cosmological run) (in internal units)
delta_time: 1.01 # Time difference between consecutive outputs (in internal units) delta_time: 1.01 # Time difference between consecutive outputs (in internal units)
recording_triggers_part: [1.0227e-4, 1.0227e-5] # Recording starts 100M and 10M years before a snapshot
recording_triggers_bpart: [1.0227e-4, 1.0227e-5] # Recording starts 100M and 10M years before a snapshot
# Parameters governing the conserved quantities statistics # Parameters governing the conserved quantities statistics
Statistics: Statistics:
...@@ -48,27 +53,46 @@ Statistics: ...@@ -48,27 +53,46 @@ Statistics:
# Parameters for the self-gravity scheme # Parameters for the self-gravity scheme
Gravity: Gravity:
eta: 0.025 # Constant dimensionless multiplier for time integration. eta: 0.025 # Constant dimensionless multiplier for time integration.
theta: 0.7 # Opening angle (Multipole acceptance criterion) MAC: adaptive
comoving_softening: 0.0026994 # Comoving softening length (in internal units). epsilon_fmm: 0.001
max_physical_softening: 0.0007 # Physical softening length (in internal units). theta_cr: 0.7 # Opening angle (Multipole acceptance criterion)
mesh_side_length: 64 mesh_side_length: 256
comoving_DM_softening: 0.0026994 # Comoving DM softening length (in internal units).
max_physical_DM_softening: 0.0007 # Max physical DM softening length (in internal units).
comoving_baryon_softening: 0.0026994 # Comoving DM softening length (in internal units).
max_physical_baryon_softening: 0.0007 # Max physical DM softening length (in internal units).
# Parameters for the hydrodynamics scheme # Parameters for the hydrodynamics scheme
SPH: SPH:
resolution_eta: 1.2348 # Target smoothing length in units of the mean inter-particle separation (1.2348 == 48Ngbs with the cubic spline kernel). 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. h_min_ratio: 0.1 # Minimal smoothing length in units of softening.
CFL_condition: 0.1 # Courant-Friedrich-Levy condition for time integration. h_max: 0.5 # Maximal smoothing length in co-moving internal units.
minimal_temperature: 100 # (internal units) CFL_condition: 0.2 # Courant-Friedrich-Levy condition for time integration.
minimal_temperature: 100 # (internal units)
particle_splitting: 1
particle_splitting_mass_threshold: 7e-4 # Internal units (i.e. 7e6 Msun ~ 4 times the initial gas mass)
# Parameters of the stars neighbour search
Stars:
resolution_eta: 1.1642 # Target smoothing length in units of the mean inter-particle separation
h_tolerance: 7e-3
overwrite_birth_time: 1
birth_time: 0.33333 # Pretend all the stars were born at z = 2
luminosity_filename: ./photometry
# Parameters for the Friends-Of-Friends algorithm # Parameters for the Friends-Of-Friends algorithm
FOF: FOF:
basename: fof_output # Filename for the FOF outputs. basename: fof_output # Filename for the FOF outputs.
min_group_size: 256 # The minimum no. of particles required for a group. min_group_size: 256 # The minimum no. of particles required for a group.
linking_length_ratio: 0.2 # Linking length in units of the main inter-particle separation. linking_length_ratio: 0.2 # Linking length in units of the main inter-particle separation.
seed_black_holes_enabled: 1 # Enable seeding of black holes in FoF groups
black_hole_seed_halo_mass_Msun: 1.5e10 # Minimal halo mass in which to seed a black hole (in solar masses). black_hole_seed_halo_mass_Msun: 1.5e10 # Minimal halo mass in which to seed a black hole (in solar masses).
scale_factor_first: 0.91 # Scale-factor of first FoF black hole seeding calls. scale_factor_first: 0.91 # Scale-factor of first FoF black hole seeding calls.
delta_time: 1.005 # Scale-factor ratio between consecutive FoF black hole seeding calls. delta_time: 1.005 # Scale-factor ratio between consecutive FoF black hole seeding calls.
linking_types: [0, 1, 0, 0, 0, 0, 0] # Use DM as the primary FOF linking type
attaching_types: [1, 0, 0, 0, 1, 1, 0] # Use gas, stars and black holes as FOF attachable types
# Parameters related to the initial conditions # Parameters related to the initial conditions
InitialConditions: InitialConditions:
...@@ -89,6 +113,7 @@ EAGLEChemistry: # Solar abundances ...@@ -89,6 +113,7 @@ EAGLEChemistry: # Solar abundances
init_abundance_Silicon: 6.825874e-4 init_abundance_Silicon: 6.825874e-4
init_abundance_Iron: 1.1032152e-3 init_abundance_Iron: 1.1032152e-3
# EAGLE cooling parameters
EAGLECooling: EAGLECooling:
dir_name: ./coolingtables/ dir_name: ./coolingtables/
H_reion_z: 11.5 H_reion_z: 11.5
...@@ -97,21 +122,34 @@ EAGLECooling: ...@@ -97,21 +122,34 @@ EAGLECooling:
He_reion_z_sigma: 0.5 He_reion_z_sigma: 0.5
He_reion_eV_p_H: 2.0 He_reion_eV_p_H: 2.0
# PS2020 cooling parameters
PS2020Cooling:
dir_name: ./UV_dust1_CR1_G1_shield1.hdf5
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
delta_logTEOS_subgrid_properties: 0.3
rapid_cooling_threshold: 0.333333
# EAGLE star formation parameters # EAGLE star formation parameters
EAGLEStarFormation: 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. SF_threshold: Zdep # Zdep (Schaye 2004) or Subgrid
EOS_temperature_norm_K: 8000 # Temperature om the polytropic EOS assumed for star-forming gas at the density normalisation in Kelvin. SF_model: PressureLaw # PressureLaw (Schaye et al. 2008) or SchmidtLaw
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_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_exponent: 1.4 # The exponent of the Kennicutt-Schmidt law. min_over_density: 100.0 # The over-density above which star-formation is allowed.
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_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_high_density_exponent: 2.0 # Slope of the Kennicut-Schmidt law above the high-density threshold. EOS_entropy_margin_dex: 0.3 # When using Z-based SF threshold, logarithm base 10 of the maximal entropy above the EOS at which stars can form.
EOS_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 # When using Z-based SF threshold, normalisation of the metal-dependant density threshold for star formation 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 # When using Z-based SF threshold, reference metallicity (metal mass fraction) for the metal-dependant threshold for star formation.
threshold_Z0: 0.002 # Reference metallicity (metal mass fraction) for the metal-dependant threshold for star formation. threshold_slope: -0.64 # When using Z-based SF threshold, slope of the metal-dependant star formation threshold
threshold_slope: -0.64 # Slope of the metal-dependant star formation threshold threshold_max_density_H_p_cm3: 10.0 # When using Z-based SF threshold, maximal density of the metal-dependant density threshold for star formation in Hydrogen atoms per cm^3.
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. threshold_temperature1_K: 1000 # When using subgrid-based SF threshold, subgrid temperature below which gas is star-forming.
threshold_temperature2_K: 31622 # When using subgrid-based SF threshold, subgrid temperature below which gas is star-forming if also above the density limit.
threshold_number_density_H_p_cm3: 10 # When using subgrid-based SF threshold, subgrid number density above which gas is star-forming if also below the second temperature limit.
# Parameters for the EAGLE "equation of state" # Parameters for the EAGLE "equation of state"
EAGLEEntropyFloor: EAGLEEntropyFloor:
...@@ -126,46 +164,85 @@ EAGLEEntropyFloor: ...@@ -126,46 +164,85 @@ EAGLEEntropyFloor:
# EAGLE feedback model # EAGLE feedback model
EAGLEFeedback: EAGLEFeedback:
use_SNII_feedback: 1 # Global switch for SNII thermal (stochastic) feedback. use_SNII_feedback: 1 # Global switch for SNII thermal (stochastic) feedback.
use_SNIa_feedback: 1 # Global switch for SNIa thermal (continuous) feedback. use_SNIa_feedback: 1 # Global switch for SNIa thermal (continuous) feedback.
use_AGB_enrichment: 1 # Global switch for enrichement from AGB stars. use_AGB_enrichment: 1 # Global switch for enrichement from AGB stars.
use_SNII_enrichment: 1 # Global switch for enrichement from SNII stars. use_SNII_enrichment: 1 # Global switch for enrichement from SNII stars.
use_SNIa_enrichment: 1 # Global switch for enrichement from SNIa stars. use_SNIa_enrichment: 1 # Global switch for enrichement from SNIa stars.
filename: ./yieldtables/ # Path to the directory containing the EAGLE yield tables. filename: ./yieldtables/ # Path to the directory containing the EAGLE yield tables.
IMF_min_mass_Msun: 0.1 # Minimal stellar mass considered for the Chabrier IMF in solar masses. IMF_min_mass_Msun: 0.1 # Minimal stellar mass considered for the Chabrier IMF in solar masses.
IMF_max_mass_Msun: 100.0 # Maximal stellar mass considered for the Chabrier IMF in solar masses. IMF_max_mass_Msun: 100.0 # Maximal stellar mass considered for the Chabrier IMF in solar masses.
SNII_min_mass_Msun: 6.0 # Minimal mass considered for SNII feedback (not SNII enrichment!) in solar masses. SNII_min_mass_Msun: 6.0 # Minimal mass considered for SNII stars in solar masses.
SNII_max_mass_Msun: 100.0 # Maximal mass considered for SNII feedback (not SNII enrichment!) in solar masses. SNII_max_mass_Msun: 100.0 # Maximal mass considered for SNII stars in solar masses.
SNII_wind_delay_Gyr: 0.03 # Time in Gyr between a star's birth and the SNII thermal feedback event. SNII_feedback_model: Random # Feedback modes: Random, Isotropic, MinimumDistance, MinimumDensity
SNII_delta_T_K: 3.16228e7 # Change in temperature to apply to the gas particle in a SNII thermal feedback event in Kelvin. SNII_sampled_delay: 0 # Sample the SNII lifetimes to do feedback.
SNII_energy_erg: 1.0e51 # Energy of one SNII explosion in ergs. SNII_wind_delay_Gyr: 0.03 # Time in Gyr between a star's birth and the SNII thermal feedback event when not sampling.
SNII_energy_fraction_min: 0.3 # Minimal fraction of energy applied in a SNII feedback event. SNII_delta_T_K: 3.16228e7 # Change in temperature to apply to the gas particle in a SNII thermal feedback event in Kelvin.
SNII_energy_fraction_max: 3.0 # Maximal fraction of energy applied in a SNII feedback event. SNII_energy_erg: 1.0e51 # Energy of one SNII explosion in ergs.
SNII_energy_fraction_Z_0: 0.0012663729 # Pivot point for the metallicity dependance of the SNII energy fraction (metal mass fraction). SNII_energy_fraction_function: EAGLE # Type of functional form to use for scaling the energy fraction with density and metallicity ('EAGLE', 'Separable', or 'Independent').
SNII_energy_fraction_n_0_H_p_cm3: 0.67 # Pivot point for the birth density dependance of the SNII energy fraction in cm^-3. SNII_energy_fraction_min: 0.3 # Minimal fraction of energy applied in a SNII feedback event.
SNII_energy_fraction_n_Z: 0.8686 # Power-law for the metallicity dependance of the SNII energy fraction. SNII_energy_fraction_max: 3.0 # Maximal fraction of energy applied in a SNII feedback event.
SNII_energy_fraction_n_n: 0.8686 # Power-law for the birth density dependance of the SNII energy fraction. SNII_energy_fraction_Z_0: 0.0012663729 # Pivot point for the metallicity dependance of the SNII energy fraction (metal mass fraction).
SNIa_max_mass_Msun: 8.0 # Maximal mass considered for SNIa feedback and enrichment in solar masses. SNII_energy_fraction_n_0_H_p_cm3: 1.4588 # Pivot point for the birth density dependance of the SNII energy fraction in cm^-3.
SNIa_timescale_Gyr: 2.0 # Time-scale of the exponential decay of the SNIa rates in Gyr. SNII_energy_fraction_n_Z: 0.8686 # Power-law for the metallicity dependance of the SNII energy fraction.
SNIa_efficiency_p_Msun: 0.002 # Normalisation of the SNIa rates in inverse solar masses. SNII_energy_fraction_n_n: 0.8686 # Power-law for the birth density dependance of the SNII energy fraction.
SNIa_energy_erg: 1.0e51 # Energy of one SNIa explosion in ergs. SNII_energy_fraction_use_birth_density: 1 # Are we using the density at birth to compute f_E or at feedback time?
AGB_ejecta_velocity_km_p_s: 10.0 # Velocity of the AGB ejectas in km/s. SNII_energy_fraction_use_birth_metallicity: 1 # Are we using the metallicity at birth to compuote f_E or at feedback time?
SNII_yield_factor_Hydrogen: 1.0 # (Optional) Correction factor to apply to the Hydrogen yield from the SNII channel. SNIa_DTD: PowerLaw # Functional form of the SNIa delay time distribution.
SNII_yield_factor_Helium: 1.0 # (Optional) Correction factor to apply to the Helium yield from the SNII channel. SNIa_DTD_delay_Gyr: 0.04 # Stellar age after which SNIa start in Gyr (40 Myr corresponds to stars ~ 8 Msun).
SNII_yield_factor_Carbon: 0.5 # (Optional) Correction factor to apply to the Carbon yield from the SNII channel. SNIa_DTD_power_law_norm_p_Msun: 0.0012 # Normalization of the SNIa delay time distribution (in Msun^-1).
SNII_yield_factor_Nitrogen: 1.0 # (Optional) Correction factor to apply to the Nitrogen yield from the SNII channel. SNIa_energy_erg: 1.0e51 # Energy of one SNIa explosion in ergs.
SNII_yield_factor_Oxygen: 1.0 # (Optional) Correction factor to apply to the Oxygen yield from the SNII channel. AGB_ejecta_velocity_km_p_s: 10.0 # Velocity of the AGB ejectas in km/s.
SNII_yield_factor_Neon: 1.0 # (Optional) Correction factor to apply to the Neon yield from the SNII channel. stellar_evolution_age_cut_Gyr: 0.1 # Stellar age in Gyr above which the enrichment is down-sampled.
SNII_yield_factor_Magnesium: 2.0 # (Optional) Correction factor to apply to the Magnesium yield from the SNII channel. stellar_evolution_sampling_rate: 10 # Number of time-steps in-between two enrichment events for a star above the age threshold.
SNII_yield_factor_Silicon: 1.0 # (Optional) Correction factor to apply to the Silicon yield from the SNII channel. SNII_yield_factor_Hydrogen: 1.0 # (Optional) Correction factor to apply to the Hydrogen yield from the SNII channel.
SNII_yield_factor_Iron: 0.5 # (Optional) Correction factor to apply to the Iron yield from the SNII channel. SNII_yield_factor_Helium: 1.0 # (Optional) Correction factor to apply to the Helium yield from the SNII channel.
SNII_yield_factor_Carbon: 0.5 # (Optional) Correction factor to apply to the Carbon yield from the SNII channel.
SNII_yield_factor_Nitrogen: 1.0 # (Optional) Correction factor to apply to the Nitrogen yield from the SNII channel.
SNII_yield_factor_Oxygen: 1.0 # (Optional) Correction factor to apply to the Oxygen yield from the SNII channel.
SNII_yield_factor_Neon: 1.0 # (Optional) Correction factor to apply to the Neon yield from the SNII channel.
SNII_yield_factor_Magnesium: 2.0 # (Optional) Correction factor to apply to the Magnesium yield from the SNII channel.
SNII_yield_factor_Silicon: 1.0 # (Optional) Correction factor to apply to the Silicon yield from the SNII channel.
SNII_yield_factor_Iron: 0.5 # (Optional) Correction factor to apply to the Iron yield from the SNII channel.
# EAGLE AGN model # EAGLE AGN model
EAGLEAGN: EAGLEAGN:
subgrid_seed_mass_Msun: 1.5e5 # Black hole subgrid mass at creation time in solar masses. 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. use_multi_phase_bondi: 0 # Compute Bondi rates per neighbour particle?
viscous_alpha: 1e6 # Normalisation constant of the Bondi viscuous time-scale accretion reduction term use_subgrid_bondi: 0 # Compute Bondi rates using the subgrid extrapolation of the gas properties around the BH?
radiative_efficiency: 0.1 # Fraction of the accreted mass that gets radiated. with_angmom_limiter: 1 # Are we applying the Rosas-Guevara et al. (2015) viscous time-scale reduction term?
coupling_efficiency: 0.15 # Fraction of the radiated energy that couples to the gas in feedback events. viscous_alpha: 1e6 # Normalisation constant of the viscous time-scale in the accretion reduction term
AGN_delta_T_K: 3.16228e8 # Change in temperature to apply to the gas particle in an AGN feedback event in Kelvin. with_boost_factor: 0 # Are we using the model from Booth & Schaye (2009)?
AGN_num_ngb_to_heat: 1. # Target number of gas neighbours to heat in an AGN feedback event. boost_alpha_only: 0 # If using the boost factor, are we using a constant boost only?
boost_alpha: 1. # Lowest value for the accretion effeciency for the Booth & Schaye 2009 accretion model.
boost_beta: 2. # Slope of the power law for the Booth & Schaye 2009 model, set beta to zero for constant alpha models.
boost_n_h_star_H_p_cm3: 0.1 # Normalization of the power law for the Booth & Schaye 2009 model in cgs (cm^-3).
with_fixed_T_near_EoS: 0 # Are we using a fixed temperature to compute the sound-speed of gas on the entropy floor in the Bondy-Hoyle accretion term?
fixed_T_above_EoS_dex: 0.3 # Distance above the entropy floor for which we use a fixed sound-speed
fixed_T_near_EoS_K: 8000 # Fixed temperature assumed to compute the sound-speed of gas on the entropy floor in the Bondy-Hoyle accretion term
use_nibbling: 1 # Continuously transfer small amounts of mass from all gas neighbours to a black hole [1] or stochastically swallow whole gas particles [0]?
min_gas_mass_for_nibbling_Msun: 9e5 # Minimum mass for a gas particle to be nibbled from [M_Sun]. Only used if use_nibbling is 1.
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_feedback_model: Random # Feedback modes: Random, Isotropic, MinimumDistance, MinimumDensity
AGN_use_deterministic_feedback: 0 # Deterministic (reservoir) [1] or stochastic [0] AGN feedback?
use_variable_delta_T: 0 # Switch to enable adaptive calculation of AGN dT [1], rather than using a constant value [0].
AGN_with_locally_adaptive_delta_T: 0 # Switch to enable additional dependence of AGN dT on local gas density and temperature (only used if use_variable_delta_T is 1).
AGN_delta_T_K: 3.16228e8 # Change in temperature to apply to the gas particle in an AGN feedback event [K] (used if use_variable_delta_T is 0 or AGN_use_nheat_with_fixed_dT is 1 AND to initialise the BHs).
AGN_use_nheat_with_fixed_dT: 0 # Switch to use the constant AGN dT, rather than the adaptive one, for calculating the energy reservoir threshold.
AGN_use_adaptive_energy_reservoir_threshold: 0 # Switch to calculate an adaptive AGN energy reservoir threshold.
AGN_num_ngb_to_heat: 1. # Target number of gas neighbours to heat in an AGN feedback event (only used if AGN_use_adaptive_energy_reservoir_threshold is 0).
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?
with_potential_correction: 1 # Should the BH's own contribution to the potential be removed from the neighbour's potentials when looking for repositioning targets.
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: DynamicalEscapeVelocity # Type of velocity threshold for BH mergers ('CircularVelocity', 'EscapeVelocity', 'DynamicalEscapeVelocity').
merger_max_distance_ratio: 3.0 # Maximal distance over which two BHs can merge, in units of the softening length.
use_subgrid_mass_from_ics: 0 # Use the dynamical mass as the subgrid mass since we don't have subgrid masses in the ICs.
MetaData:
run_name: EAGLE-L0025N0376-Ref-RT-TEST
# Define the system of units to use internally.
InternalUnitSystem:
UnitMass_in_cgs: 1.98841e43 # 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.9090909 # Initial scale-factor of the simulation
a_end: 1.0 # Final scale factor of the simulation
Omega_cdm: 0.2587481 # Cold Dark Matter density parameter
Omega_lambda: 0.693 # Dark-energy density parameter
Omega_b: 0.0482519 # Baryon density parameter
# Parameters governing the time integration
TimeIntegration:
max_nr_rt_subcycles: 32
time_begin: 0. # The starting time of the simulation (in internal units).
time_end: 1e-2 # The end time of the simulation (in internal units).
dt_min: 1e-12 # 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.91 # Scale-factor of the first snaphot (cosmological run)
time_first: 0.01 # Time of the first output (non-cosmological run) (in internal units)
delta_time: 1.01 # Time difference between consecutive outputs (in internal units)
Scheduler:
links_per_tasks: 500
dependency_graph_frequency: 0
# Parameters governing the conserved quantities statistics
Statistics:
scale_factor_first: 0.92 # Scale-factor of the first stat dump (cosmological run)
time_first: 0.01 # Time of the first stat dump (non-cosmological run) (in internal units)
delta_time: 1.05 # Time between statistics output
# Parameters for the self-gravity scheme
Gravity:
eta: 0.025 # Constant dimensionless multiplier for time integration.
MAC: adaptive
epsilon_fmm: 0.001
theta_cr: 0.7 # Opening angle (Multipole acceptance criterion)
mesh_side_length: 256
comoving_DM_softening: 0.0026994 # Comoving DM softening length (in internal units).
max_physical_DM_softening: 0.0007 # Max physical DM softening length (in internal units).
comoving_baryon_softening: 0.0026994 # Comoving DM softening length (in internal units).
max_physical_baryon_softening: 0.0007 # Max physical DM softening length (in internal units).
# 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 length in units of softening.
h_max: 0.5 # Maximal smoothing length in co-moving internal units.
CFL_condition: 0.1 # Courant-Friedrich-Levy condition for time integration.
minimal_temperature: 100 # (internal units)
particle_splitting: 0
particle_splitting_mass_threshold: 7e-4 # Internal units (i.e. 7e6 Msun ~ 4 times the initial gas mass)
# Parameters of the stars neighbour search
Stars:
resolution_eta: 1.1642 # Target smoothing length in units of the mean inter-particle separation
h_tolerance: 7e-3
overwrite_birth_time: 1
birth_time: 0.33333 # Pretend all the stars were born at z = 2
# Parameters related to the initial conditions
InitialConditions:
file_name: ./EAGLE_ICs_25.hdf5 # The file to read
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
GEARRT:
f_reduce_c: 1e-2 # reduce the speed of light for the RT solver by multiplying c with this factor
CFL_condition: 0.4 # CFL condition for RT, independent of hydro
f_limit_cooling_time: 0.01 # (Optional) multiply the cooling time by this factor when estimating maximal next time step. Set to 0.0 to turn computation of cooling time off.
photon_groups_Hz: [3.288e15, 5.944e15, 13.157e15] # Lower photon frequency group bin edges in Hz. Needs to have exactly N elements, where N is the configured number of bins --with-RT=GEAR_N
stellar_luminosity_model: const # Which model to use to determine the stellar luminosities.
const_stellar_luminosities_LSol: [1.764e+04, 3.631e+04, 8.037e+03 ] # (Conditional) constant star emission rates for each photon frequency group to use if use_constant_emission_rates is set, in units of Solar Luminosity.
hydrogen_mass_fraction: 0.75 # total hydrogen (H + H+) mass fraction in the metal-free portion of the gas
set_equilibrium_initial_ionization_mass_fractions: 0 # (Optional) set the initial ionization fractions depending on gas temperature assuming ionization equilibrium.
set_initial_ionization_mass_fractions: 1 # (Optional) manually overwrite initial mass fraction of each species (using the values you set below)
mass_fraction_HI: 0.75 # (Conditional) If set_initial_ionization_fractions=1, needed to set initial HI mass fractions to this value
mass_fraction_HII: 1.e-6 # (Conditional) If set_initial_ionization_fractions=1, needed to set initial HII mass fractions to this value
mass_fraction_HeI: 0.25 # (Conditional) If set_initial_ionization_fractions=1, needed to set initial HeI mass fractions to this value
mass_fraction_HeII: 1.e-6 # (Conditional) If set_initial_ionization_fractions=1, needed to set initial HeII mass fractions to this value
mass_fraction_HeIII: 1.e-6 # (Conditional) If set_initial_ionization_fractions=1, needed to set initial HeIII mass fractions to this value
stellar_spectrum_type: 1 # Which radiation spectrum to use. 0: constant from 0 until some max frequency set by stellar_spectrum_const_max_frequency_Hz. 1: blackbody spectrum.
stellar_spectrum_blackbody_temperature_K: 1.e5 # (Conditional) if stellar_spectrum_type=1, use this temperature (in K) for the blackbody spectrum.
stars_max_timestep: -1. # (Optional) restrict the maximal timestep of stars to this value (in internal units). Set to negative to turn off.
max_tchem_recursion: 10 # (Optional) if > 0, sets the maximal recursion depth when re-computing the thermochemistry if |u_new/u_old - 1| > 0.1.
#!/bin/bash #!/bin/bash
wget http://virgodb.cosma.dur.ac.uk/swift-webstorage/ICs/EAGLE_low_z/EAGLE_ICs_25.hdf5 wget https://virgodb.cosma.dur.ac.uk/swift-webstorage/ICs/EAGLE_low_z/EAGLE_ICs_25.hdf5
...@@ -7,5 +7,5 @@ then ...@@ -7,5 +7,5 @@ then
./getIC.sh ./getIC.sh
fi fi
../../swift --cosmology --hydro --self-gravity --stars --threads=16 eagle_25.yml 2>&1 | tee output.log ../../../swift --cosmology --hydro --self-gravity --stars --threads=16 eagle_25.yml 2>&1 | tee output.log
#!/bin/bash
# Run a RT test with EAGLE ICs.
#
# To use GEAR-RT, configure SWIFT with
#
# --with-stars=basic --with-hydro=gizmo-mfv --with-riemann-solver=hllc --with-rt=GEAR_1 --with-rt-riemann-solver=GLF --with-feedback=none
# [technically, any other feedback scheme should work as well.]
#
#
# To use the DEBUG RT scheme, configure SWIFT with
# --with-stars=basic --with-rt=debug --with-feedback=none
# [technically, any other feedback scheme should work as well.]
# Generate the initial conditions if they are not present.
if [ ! -e EAGLE_ICs_25.hdf5 ]
then
echo "Fetching initial conditions for the EAGLE 12Mpc example..."
./getIC.sh
fi
../../../swift \
--hydro --threads=16 --stars --self-gravity \
--feedback --radiation \
eagle_25_rt_test.yml
MetaData:
run_name: EAGLE-L0050N0752-Ref
# Define the system of units to use internally. # Define the system of units to use internally.
InternalUnitSystem: InternalUnitSystem:
UnitMass_in_cgs: 1.98848e43 # 10^10 M_sun in grams UnitMass_in_cgs: 1.98841e43 # 10^10 M_sun in grams
UnitLength_in_cgs: 3.08567758e24 # Mpc in centimeters UnitLength_in_cgs: 3.08567758e24 # Mpc in centimeters
UnitVelocity_in_cgs: 1e5 # km/s in centimeters per second UnitVelocity_in_cgs: 1e5 # km/s in centimeters per second
UnitCurrent_in_cgs: 1 # Amperes UnitCurrent_in_cgs: 1 # Amperes
...@@ -11,9 +14,9 @@ Cosmology: ...@@ -11,9 +14,9 @@ Cosmology:
h: 0.6777 # Reduced Hubble constant h: 0.6777 # Reduced Hubble constant
a_begin: 0.9090909 # Initial scale-factor of the simulation a_begin: 0.9090909 # Initial scale-factor of the simulation
a_end: 1.0 # Final scale factor of the simulation a_end: 1.0 # Final scale factor of the simulation
Omega_m: 0.307 # Matter density parameter Omega_cdm: 0.2587481 # Cold Dark Matter density parameter
Omega_lambda: 0.693 # Dark-energy density parameter Omega_lambda: 0.693 # Dark-energy density parameter
Omega_b: 0.0455 # Baryon density parameter Omega_b: 0.0482519 # Baryon density parameter
# Parameters governing the time integration # Parameters governing the time integration
TimeIntegration: TimeIntegration:
...@@ -31,6 +34,8 @@ Snapshots: ...@@ -31,6 +34,8 @@ Snapshots:
scale_factor_first: 0.91 # Scale-factor of the first snaphot (cosmological run) scale_factor_first: 0.91 # Scale-factor of the first snaphot (cosmological run)
time_first: 0.01 # Time of the first output (non-cosmological run) (in internal units) time_first: 0.01 # Time of the first output (non-cosmological run) (in internal units)
delta_time: 1.01 # Time difference between consecutive outputs (in internal units) delta_time: 1.01 # Time difference between consecutive outputs (in internal units)
recording_triggers_part: [1.0227e-4, 1.0227e-5] # Recording starts 100M and 10M years before a snapshot
recording_triggers_bpart: [1.0227e-4, 1.0227e-5] # Recording starts 100M and 10M years before a snapshot
# Parameters governing the conserved quantities statistics # Parameters governing the conserved quantities statistics
Statistics: Statistics:
...@@ -40,27 +45,45 @@ Statistics: ...@@ -40,27 +45,45 @@ Statistics:
# Parameters for the self-gravity scheme # Parameters for the self-gravity scheme
Gravity: Gravity:
eta: 0.025 # Constant dimensionless multiplier for time integration. eta: 0.025 # Constant dimensionless multiplier for time integration.
theta: 0.7 # Opening angle (Multipole acceptance criterion) MAC: adaptive
comoving_softening: 0.0026994 # Comoving softening length (in internal units). epsilon_fmm: 0.001
max_physical_softening: 0.0007 # Physical softening length (in internal units). theta_cr: 0.7 # Opening angle (Multipole acceptance criterion)
mesh_side_length: 128 mesh_side_length: 512
comoving_DM_softening: 0.0026994 # Comoving DM softening length (in internal units).
max_physical_DM_softening: 0.0007 # Max physical DM softening length (in internal units).
comoving_baryon_softening: 0.0026994 # Comoving DM softening length (in internal units).
max_physical_baryon_softening: 0.0007 # Max physical DM softening length (in internal units).
# Parameters for the hydrodynamics scheme # Parameters for the hydrodynamics scheme
SPH: SPH:
resolution_eta: 1.2348 # Target smoothing length in units of the mean inter-particle separation (1.2348 == 48Ngbs with the cubic spline kernel). 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. h_min_ratio: 0.1 # Minimal smoothing length in units of softening.
CFL_condition: 0.1 # Courant-Friedrich-Levy condition for time integration. h_max: 0.5 # Maximal smoothing length in co-moving internal units.
minimal_temperature: 100 # (internal units) CFL_condition: 0.2 # Courant-Friedrich-Levy condition for time integration.
minimal_temperature: 100 # (internal units)
particle_splitting: 1
particle_splitting_mass_threshold: 7e-4 # Internal units (i.e. 7e6 Msun ~ 4 times the initial gas mass)
# Parameters of the stars neighbour search
Stars:
resolution_eta: 1.1642 # Target smoothing length in units of the mean inter-particle separation
h_tolerance: 7e-3
overwrite_birth_time: 1
birth_time: 0.33333 # Pretend all the stars were born at z = 2
luminosity_filename: ./photometry
# Parameters for the Friends-Of-Friends algorithm # Parameters for the Friends-Of-Friends algorithm
FOF: FOF:
basename: fof_output # Filename for the FOF outputs. basename: fof_output # Filename for the FOF outputs.
min_group_size: 256 # The minimum no. of particles required for a group. min_group_size: 256 # The minimum no. of particles required for a group.
linking_length_ratio: 0.2 # Linking length in units of the main inter-particle separation. linking_length_ratio: 0.2 # Linking length in units of the main inter-particle separation.
seed_black_holes_enabled: 1 # Enable seeding of black holes in FoF groups
black_hole_seed_halo_mass_Msun: 1.5e10 # Minimal halo mass in which to seed a black hole (in solar masses). black_hole_seed_halo_mass_Msun: 1.5e10 # Minimal halo mass in which to seed a black hole (in solar masses).
scale_factor_first: 0.91 # Scale-factor of first FoF black hole seeding calls. scale_factor_first: 0.91 # Scale-factor of first FoF black hole seeding calls.
delta_time: 1.005 # Scale-factor ratio between consecutive FoF black hole seeding calls. delta_time: 1.005 # Scale-factor ratio between consecutive FoF black hole seeding calls.
linking_types: [0, 1, 0, 0, 0, 0, 0] # Use DM as the primary FOF linking type
attaching_types: [1, 0, 0, 0, 1, 1, 0] # Use gas, stars and black holes as FOF attachable types
# Parameters related to the initial conditions # Parameters related to the initial conditions
InitialConditions: InitialConditions:
...@@ -81,6 +104,7 @@ EAGLEChemistry: # Solar abundances ...@@ -81,6 +104,7 @@ EAGLEChemistry: # Solar abundances
init_abundance_Silicon: 6.825874e-4 init_abundance_Silicon: 6.825874e-4
init_abundance_Iron: 1.1032152e-3 init_abundance_Iron: 1.1032152e-3
# EAGLE cooling parameters
EAGLECooling: EAGLECooling:
dir_name: ./coolingtables/ dir_name: ./coolingtables/
H_reion_z: 11.5 H_reion_z: 11.5
...@@ -89,21 +113,34 @@ EAGLECooling: ...@@ -89,21 +113,34 @@ EAGLECooling:
He_reion_z_sigma: 0.5 He_reion_z_sigma: 0.5
He_reion_eV_p_H: 2.0 He_reion_eV_p_H: 2.0
# PS2020 cooling parameters
PS2020Cooling:
dir_name: ./UV_dust1_CR1_G1_shield1.hdf5
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
delta_logTEOS_subgrid_properties: 0.3
rapid_cooling_threshold: 0.333333
# EAGLE star formation parameters # EAGLE star formation parameters
EAGLEStarFormation: 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. SF_threshold: Zdep # Zdep (Schaye 2004) or Subgrid
EOS_temperature_norm_K: 8000 # Temperature om the polytropic EOS assumed for star-forming gas at the density normalisation in Kelvin. SF_model: PressureLaw # PressureLaw (Schaye et al. 2008) or SchmidtLaw
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_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_exponent: 1.4 # The exponent of the Kennicutt-Schmidt law. min_over_density: 100.0 # The over-density above which star-formation is allowed.
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_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_high_density_exponent: 2.0 # Slope of the Kennicut-Schmidt law above the high-density threshold. EOS_entropy_margin_dex: 0.3 # When using Z-based SF threshold, logarithm base 10 of the maximal entropy above the EOS at which stars can form.
EOS_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 # When using Z-based SF threshold, normalisation of the metal-dependant density threshold for star formation 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 # When using Z-based SF threshold, reference metallicity (metal mass fraction) for the metal-dependant threshold for star formation.
threshold_Z0: 0.002 # Reference metallicity (metal mass fraction) for the metal-dependant threshold for star formation. threshold_slope: -0.64 # When using Z-based SF threshold, slope of the metal-dependant star formation threshold
threshold_slope: -0.64 # Slope of the metal-dependant star formation threshold threshold_max_density_H_p_cm3: 10.0 # When using Z-based SF threshold, maximal density of the metal-dependant density threshold for star formation in Hydrogen atoms per cm^3.
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. threshold_temperature1_K: 1000 # When using subgrid-based SF threshold, subgrid temperature below which gas is star-forming.
threshold_temperature2_K: 31622 # When using subgrid-based SF threshold, subgrid temperature below which gas is star-forming if also above the density limit.
threshold_number_density_H_p_cm3: 10 # When using subgrid-based SF threshold, subgrid number density above which gas is star-forming if also below the second temperature limit.
# Parameters for the EAGLE "equation of state" # Parameters for the EAGLE "equation of state"
EAGLEEntropyFloor: EAGLEEntropyFloor:
...@@ -118,46 +155,85 @@ EAGLEEntropyFloor: ...@@ -118,46 +155,85 @@ EAGLEEntropyFloor:
# EAGLE feedback model # EAGLE feedback model
EAGLEFeedback: EAGLEFeedback:
use_SNII_feedback: 1 # Global switch for SNII thermal (stochastic) feedback. use_SNII_feedback: 1 # Global switch for SNII thermal (stochastic) feedback.
use_SNIa_feedback: 1 # Global switch for SNIa thermal (continuous) feedback. use_SNIa_feedback: 1 # Global switch for SNIa thermal (continuous) feedback.
use_AGB_enrichment: 1 # Global switch for enrichement from AGB stars. use_AGB_enrichment: 1 # Global switch for enrichement from AGB stars.
use_SNII_enrichment: 1 # Global switch for enrichement from SNII stars. use_SNII_enrichment: 1 # Global switch for enrichement from SNII stars.
use_SNIa_enrichment: 1 # Global switch for enrichement from SNIa stars. use_SNIa_enrichment: 1 # Global switch for enrichement from SNIa stars.
filename: ./yieldtables/ # Path to the directory containing the EAGLE yield tables. filename: ./yieldtables/ # Path to the directory containing the EAGLE yield tables.
IMF_min_mass_Msun: 0.1 # Minimal stellar mass considered for the Chabrier IMF in solar masses. IMF_min_mass_Msun: 0.1 # Minimal stellar mass considered for the Chabrier IMF in solar masses.
IMF_max_mass_Msun: 100.0 # Maximal stellar mass considered for the Chabrier IMF in solar masses. IMF_max_mass_Msun: 100.0 # Maximal stellar mass considered for the Chabrier IMF in solar masses.
SNII_min_mass_Msun: 6.0 # Minimal mass considered for SNII feedback (not SNII enrichment!) in solar masses. SNII_min_mass_Msun: 6.0 # Minimal mass considered for SNII stars in solar masses.
SNII_max_mass_Msun: 100.0 # Maximal mass considered for SNII feedback (not SNII enrichment!) in solar masses. SNII_max_mass_Msun: 100.0 # Maximal mass considered for SNII stars in solar masses.
SNII_wind_delay_Gyr: 0.03 # Time in Gyr between a star's birth and the SNII thermal feedback event. SNII_feedback_model: Random # Feedback modes: Random, Isotropic, MinimumDistance, MinimumDensity
SNII_delta_T_K: 3.16228e7 # Change in temperature to apply to the gas particle in a SNII thermal feedback event in Kelvin. SNII_sampled_delay: 0 # Sample the SNII lifetimes to do feedback.
SNII_energy_erg: 1.0e51 # Energy of one SNII explosion in ergs. SNII_wind_delay_Gyr: 0.03 # Time in Gyr between a star's birth and the SNII thermal feedback event when not sampling.
SNII_energy_fraction_min: 0.3 # Minimal fraction of energy applied in a SNII feedback event. SNII_delta_T_K: 3.16228e7 # Change in temperature to apply to the gas particle in a SNII thermal feedback event in Kelvin.
SNII_energy_fraction_max: 3.0 # Maximal fraction of energy applied in a SNII feedback event. SNII_energy_erg: 1.0e51 # Energy of one SNII explosion in ergs.
SNII_energy_fraction_Z_0: 0.0012663729 # Pivot point for the metallicity dependance of the SNII energy fraction (metal mass fraction). SNII_energy_fraction_function: EAGLE # Type of functional form to use for scaling the energy fraction with density and metallicity ('EAGLE', 'Separable', or 'Independent').
SNII_energy_fraction_n_0_H_p_cm3: 0.67 # Pivot point for the birth density dependance of the SNII energy fraction in cm^-3. SNII_energy_fraction_min: 0.3 # Minimal fraction of energy applied in a SNII feedback event.
SNII_energy_fraction_n_Z: 0.8686 # Power-law for the metallicity dependance of the SNII energy fraction. SNII_energy_fraction_max: 3.0 # Maximal fraction of energy applied in a SNII feedback event.
SNII_energy_fraction_n_n: 0.8686 # Power-law for the birth density dependance of the SNII energy fraction. SNII_energy_fraction_Z_0: 0.0012663729 # Pivot point for the metallicity dependance of the SNII energy fraction (metal mass fraction).
SNIa_max_mass_Msun: 8.0 # Maximal mass considered for SNIa feedback and enrichment in solar masses. SNII_energy_fraction_n_0_H_p_cm3: 1.4588 # Pivot point for the birth density dependance of the SNII energy fraction in cm^-3.
SNIa_timescale_Gyr: 2.0 # Time-scale of the exponential decay of the SNIa rates in Gyr. SNII_energy_fraction_n_Z: 0.8686 # Power-law for the metallicity dependance of the SNII energy fraction.
SNIa_efficiency_p_Msun: 0.002 # Normalisation of the SNIa rates in inverse solar masses. SNII_energy_fraction_n_n: 0.8686 # Power-law for the birth density dependance of the SNII energy fraction.
SNIa_energy_erg: 1.0e51 # Energy of one SNIa explosion in ergs. SNII_energy_fraction_use_birth_density: 1 # Are we using the density at birth to compute f_E or at feedback time?
AGB_ejecta_velocity_km_p_s: 10.0 # Velocity of the AGB ejectas in km/s. SNII_energy_fraction_use_birth_metallicity: 1 # Are we using the metallicity at birth to compuote f_E or at feedback time?
SNII_yield_factor_Hydrogen: 1.0 # (Optional) Correction factor to apply to the Hydrogen yield from the SNII channel. SNIa_DTD: PowerLaw # Functional form of the SNIa delay time distribution.
SNII_yield_factor_Helium: 1.0 # (Optional) Correction factor to apply to the Helium yield from the SNII channel. SNIa_DTD_delay_Gyr: 0.04 # Stellar age after which SNIa start in Gyr (40 Myr corresponds to stars ~ 8 Msun).
SNII_yield_factor_Carbon: 0.5 # (Optional) Correction factor to apply to the Carbon yield from the SNII channel. SNIa_DTD_power_law_norm_p_Msun: 0.0012 # Normalization of the SNIa delay time distribution (in Msun^-1).
SNII_yield_factor_Nitrogen: 1.0 # (Optional) Correction factor to apply to the Nitrogen yield from the SNII channel. SNIa_energy_erg: 1.0e51 # Energy of one SNIa explosion in ergs.
SNII_yield_factor_Oxygen: 1.0 # (Optional) Correction factor to apply to the Oxygen yield from the SNII channel. AGB_ejecta_velocity_km_p_s: 10.0 # Velocity of the AGB ejectas in km/s.
SNII_yield_factor_Neon: 1.0 # (Optional) Correction factor to apply to the Neon yield from the SNII channel. stellar_evolution_age_cut_Gyr: 0.1 # Stellar age in Gyr above which the enrichment is down-sampled.
SNII_yield_factor_Magnesium: 2.0 # (Optional) Correction factor to apply to the Magnesium yield from the SNII channel. stellar_evolution_sampling_rate: 10 # Number of time-steps in-between two enrichment events for a star above the age threshold.
SNII_yield_factor_Silicon: 1.0 # (Optional) Correction factor to apply to the Silicon yield from the SNII channel. SNII_yield_factor_Hydrogen: 1.0 # (Optional) Correction factor to apply to the Hydrogen yield from the SNII channel.
SNII_yield_factor_Iron: 0.5 # (Optional) Correction factor to apply to the Iron yield from the SNII channel. SNII_yield_factor_Helium: 1.0 # (Optional) Correction factor to apply to the Helium yield from the SNII channel.
SNII_yield_factor_Carbon: 0.5 # (Optional) Correction factor to apply to the Carbon yield from the SNII channel.
SNII_yield_factor_Nitrogen: 1.0 # (Optional) Correction factor to apply to the Nitrogen yield from the SNII channel.
SNII_yield_factor_Oxygen: 1.0 # (Optional) Correction factor to apply to the Oxygen yield from the SNII channel.
SNII_yield_factor_Neon: 1.0 # (Optional) Correction factor to apply to the Neon yield from the SNII channel.
SNII_yield_factor_Magnesium: 2.0 # (Optional) Correction factor to apply to the Magnesium yield from the SNII channel.
SNII_yield_factor_Silicon: 1.0 # (Optional) Correction factor to apply to the Silicon yield from the SNII channel.
SNII_yield_factor_Iron: 0.5 # (Optional) Correction factor to apply to the Iron yield from the SNII channel.
# EAGLE AGN model # EAGLE AGN model
EAGLEAGN: EAGLEAGN:
subgrid_seed_mass_Msun: 1.5e5 # Black hole subgrid mass at creation time in solar masses. 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. use_multi_phase_bondi: 0 # Compute Bondi rates per neighbour particle?
viscous_alpha: 1e6 # Normalisation constant of the Bondi viscuous time-scale accretion reduction term use_subgrid_bondi: 0 # Compute Bondi rates using the subgrid extrapolation of the gas properties around the BH?
radiative_efficiency: 0.1 # Fraction of the accreted mass that gets radiated. with_angmom_limiter: 1 # Are we applying the Rosas-Guevara et al. (2015) viscous time-scale reduction term?
coupling_efficiency: 0.15 # Fraction of the radiated energy that couples to the gas in feedback events. viscous_alpha: 1e6 # Normalisation constant of the viscous time-scale in the accretion reduction term
AGN_delta_T_K: 3.16228e8 # Change in temperature to apply to the gas particle in an AGN feedback event in Kelvin. with_boost_factor: 0 # Are we using the model from Booth & Schaye (2009)?
AGN_num_ngb_to_heat: 1. # Target number of gas neighbours to heat in an AGN feedback event. boost_alpha_only: 0 # If using the boost factor, are we using a constant boost only?
boost_alpha: 1. # Lowest value for the accretion effeciency for the Booth & Schaye 2009 accretion model.
boost_beta: 2. # Slope of the power law for the Booth & Schaye 2009 model, set beta to zero for constant alpha models.
boost_n_h_star_H_p_cm3: 0.1 # Normalization of the power law for the Booth & Schaye 2009 model in cgs (cm^-3).
with_fixed_T_near_EoS: 0 # Are we using a fixed temperature to compute the sound-speed of gas on the entropy floor in the Bondy-Hoyle accretion term?
fixed_T_above_EoS_dex: 0.3 # Distance above the entropy floor for which we use a fixed sound-speed
fixed_T_near_EoS_K: 8000 # Fixed temperature assumed to compute the sound-speed of gas on the entropy floor in the Bondy-Hoyle accretion term
use_nibbling: 1 # Continuously transfer small amounts of mass from all gas neighbours to a black hole [1] or stochastically swallow whole gas particles [0]?
min_gas_mass_for_nibbling_Msun: 9e5 # Minimum mass for a gas particle to be nibbled from [M_Sun]. Only used if use_nibbling is 1.
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_feedback_model: Random # Feedback modes: Random, Isotropic, MinimumDistance, MinimumDensity
AGN_use_deterministic_feedback: 0 # Deterministic (reservoir) [1] or stochastic [0] AGN feedback?
use_variable_delta_T: 0 # Switch to enable adaptive calculation of AGN dT [1], rather than using a constant value [0].
AGN_with_locally_adaptive_delta_T: 0 # Switch to enable additional dependence of AGN dT on local gas density and temperature (only used if use_variable_delta_T is 1).
AGN_delta_T_K: 3.16228e8 # Change in temperature to apply to the gas particle in an AGN feedback event [K] (used if use_variable_delta_T is 0 or AGN_use_nheat_with_fixed_dT is 1 AND to initialise the BHs).
AGN_use_nheat_with_fixed_dT: 0 # Switch to use the constant AGN dT, rather than the adaptive one, for calculating the energy reservoir threshold.
AGN_use_adaptive_energy_reservoir_threshold: 0 # Switch to calculate an adaptive AGN energy reservoir threshold.
AGN_num_ngb_to_heat: 1. # Target number of gas neighbours to heat in an AGN feedback event (only used if AGN_use_adaptive_energy_reservoir_threshold is 0).
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?
with_potential_correction: 1 # Should the BH's own contribution to the potential be removed from the neighbour's potentials when looking for repositioning targets.
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: DynamicalEscapeVelocity # Type of velocity threshold for BH mergers ('CircularVelocity', 'EscapeVelocity', 'DynamicalEscapeVelocity').
merger_max_distance_ratio: 3.0 # Maximal distance over which two BHs can merge, in units of the softening length.
use_subgrid_mass_from_ics: 0 # Use the dynamical mass as the subgrid mass since we don't have subgrid masses in the ICs.
#!/bin/bash #!/bin/bash
wget http://virgodb.cosma.dur.ac.uk/swift-webstorage/ICs/EAGLE_low_z/EAGLE_ICs_50.hdf5 wget https://virgodb.cosma.dur.ac.uk/swift-webstorage/ICs/EAGLE_low_z/EAGLE_ICs_50.hdf5
...@@ -7,5 +7,5 @@ then ...@@ -7,5 +7,5 @@ then
./getIC.sh ./getIC.sh
fi fi
../../swift --cosmology --hydro --self-gravity --stars --threads=16 eagle_50.yml 2>&1 | tee output.log ../../../swift --cosmology --hydro --self-gravity --stars --threads=16 eagle_50.yml 2>&1 | tee output.log
import numpy as np
import h5py as h5
from tqdm import tqdm
from numba import jit, prange
snapname = "eagle_0000/eagle_0000.hdf5"
# fofname = "fof_output_0000/fof_output_0000.0.hdf5"
# snapname = "eagle_0000.hdf5"
fofname = "fof_output_0000.hdf5"
######################################################
snap = h5.File(snapname, "r")
nogrp_grp_id = int(snap["/Parameters"].attrs.get("FOF:group_id_default"))
pos_gas = snap["/PartType0/Coordinates"][:, :]
ids_gas = snap["/PartType0/ParticleIDs"][:]
grp_gas = snap["/PartType0/FOFGroupIDs"][:]
mass_gas = snap["/PartType0/Masses"][:]
pos_DM = snap["/PartType1/Coordinates"][:, :]
ids_DM = snap["/PartType1/ParticleIDs"][:]
grp_DM = snap["/PartType1/FOFGroupIDs"][:]
mass_DM = snap["/PartType1/Masses"][:]
pos_star = snap["/PartType4/Coordinates"][:, :]
ids_star = snap["/PartType4/ParticleIDs"][:]
grp_star = snap["/PartType4/FOFGroupIDs"][:]
mass_star = snap["/PartType4/Masses"][:]
####################################################
fof = h5.File(fofname, "r")
num_files = fof["/Header/"].attrs["NumFilesPerSnapshot"][0]
num_groups = fof["/Header/"].attrs["NumGroups_Total"][0]
fof.close()
fof_grp = np.zeros(num_groups, dtype=np.int32)
fof_size = np.zeros(num_groups, dtype=np.int32)
fof_mass = np.zeros(num_groups)
if num_files == 1:
fof = h5.File(fofname, "r")
fof_grp = fof["/Groups/GroupIDs"][:]
fof_size = fof["/Groups/Sizes"][:]
fof_mass = fof["/Groups/Masses"][:]
fof.close()
else:
# Read the distributed catalog
offset = 0
for i in range(num_files):
my_filename = fofname[:-6]
my_filename = my_filename + str(i) + ".hdf5"
fof = h5.File(my_filename, "r")
my_fof_grp = fof["/Groups/GroupIDs"][:]
my_fof_size = fof["/Groups/Sizes"][:]
my_fof_mass = fof["/Groups/Masses"][:]
num_this_file = fof["/Header"].attrs["NumGroups_ThisFile"][0]
fof.close()
fof_grp[offset : offset + num_this_file] = my_fof_grp
fof_size[offset : offset + num_this_file] = my_fof_size
fof_mass[offset : offset + num_this_file] = my_fof_mass
offset += num_this_file
####################################################
boxsize = snap["/Header"].attrs.get("BoxSize")[0]
N_DM = snap["/Header"].attrs.get("NumPart_ThisFile")[1]
l = 0.2 * boxsize / float(N_DM) ** (1.0 / 3.0)
print("Checking snapshot :", snapname)
print("Checking catalogue:", fofname)
print("L:", boxsize)
print("N_DM:", N_DM)
print("Linking length:", l)
print("")
####################################################
@jit(nopython=True, parallel=True, fastmath=True)
def nearest(dx, L=boxsize):
mask1 = dx > 0.5 * L
mask2 = dx < -0.5 * L
if np.sum(mask1):
dx[mask1] = dx[mask1] - L
if np.sum(mask2):
dx[mask2] = dx[mask2] + L
return dx
####################################################
# Verify the content of the catalog
num_groups = np.size(fof_grp)
print("Catalog has", num_groups, "groups")
def check_fof_size(i):
my_grp = fof_grp[i]
my_size = fof_size[i]
mask_gas = grp_gas == my_grp
mask_DM = grp_DM == my_grp
mask_star = grp_star == my_grp
total = np.sum(mask_gas) + np.sum(mask_DM) + np.sum(mask_star)
if total != my_size:
print(
"Grp",
my_grp,
"has size=",
my_size,
"but",
total,
"particles in the snapshot",
)
exit()
for i in tqdm(range(num_groups)):
check_fof_size(i)
print("All group sizes match the particles")
####################################################
# Verify group masses
num_groups = np.size(fof_grp)
print("Catalog has", num_groups, "groups")
def check_fof_masses(i):
my_grp = fof_grp[i]
my_mass = fof_mass[i]
mask_gas = grp_gas == my_grp
mask_DM = grp_DM == my_grp
mask_star = grp_star == my_grp
total = (
np.sum(mass_gas[mask_gas])
+ np.sum(mass_DM[mask_DM])
+ np.sum(mass_star[mask_star])
)
ratio = total / my_mass
if ratio > 1.0001 or ratio < 0.9999:
print(
"Grp",
my_grp,
"has mass=",
my_mass,
"but particles in the snapshot have mass",
total,
)
exit()
for i in tqdm(range(num_groups)):
check_fof_masses(i)
print("All group masses match the particles")
####################################################
# Test the stand-alone stars
mask = grp_star == nogrp_grp_id
num_stars = np.sum(mask)
print("Found %d stars not in groups" % num_stars)
my_pos_star = pos_star[mask, :]
my_ids_star = ids_star[mask]
my_grp_star = grp_star[mask]
my_pos_DM = pos_DM[:, :]
my_ids_DM = ids_DM[:]
my_grp_DM = grp_DM[:]
# @jit(nopython=True, parallel=True, fastmath=True)
def check_stand_alone_star(i):
pos = my_pos_star[i, :]
grp = my_grp_star[i]
dx = pos[0] - my_pos_DM[:, 0]
dy = pos[1] - my_pos_DM[:, 1]
dz = pos[2] - my_pos_DM[:, 2]
dx = nearest(dx)
dy = nearest(dy)
dz = nearest(dz)
# Identify the nearest DM particle
r2 = dx ** 2 + dy ** 2 + dz ** 2
select = np.argmin(r2)
# If the nearest DM particle is in a group --> mistake
target_grp = my_grp_DM[select]
if target_grp != nogrp_grp_id and r2[select] < l * l:
print("Found a star without group whose nearest DM particle is in a group!")
print("Star: id=", my_ids_star[i], "pos=", pos, "grp=", grp)
print(
"DM: id=",
my_ids_DM[select],
"pos=",
my_pos_DM[select],
"grp=",
my_grp_DM[select],
)
print("r=", np.sqrt(r2[select]))
# exit()
for i in tqdm(range(num_stars)):
check_stand_alone_star(i)
print("All stand-alone stars OK!")
####################################################
# Test the stars in groups
mask = grp_star != nogrp_grp_id
num_stars = np.sum(mask)
print("Found %d stars in groups" % num_stars)
my_pos_star = pos_star[mask, :]
my_ids_star = ids_star[mask]
my_grp_star = grp_star[mask]
my_pos_DM = pos_DM[:, :]
my_ids_DM = ids_DM[:]
my_grp_DM = grp_DM[:]
@jit(nopython=True, parallel=True, fastmath=True)
def test_stars_in_group(i):
pos = my_pos_star[i, :]
grp = my_grp_star[i]
dx = pos[0] - my_pos_DM[:, 0]
dy = pos[1] - my_pos_DM[:, 1]
dz = pos[2] - my_pos_DM[:, 2]
dx = nearest(dx)
dy = nearest(dy)
dz = nearest(dz)
# Identify the nearest DM particle
r2 = dx ** 2 + dy ** 2 + dz ** 2
select = np.argmin(r2)
# If the nearest DM particle is not in the same group --> mistake
target_grp = my_grp_DM[select]
if target_grp != grp and r2[select] < l * l:
print(
"Found a star in a group whose nearest DM particle is in a different group!"
)
print("Star: id=", my_ids_star[i], "pos=", pos, "grp=", grp)
print(
"DM: id=", my_ids_DM[select], "pos=", my_pos_DM[select], "grp=", target_grp
)
print("r=", np.sqrt(r2[select]))
# exit()
for i in tqdm(range(num_stars)):
test_stars_in_group(i)
print("All stars in groups OK!")
####################################################
# Test the stand-alone gas
mask = grp_gas == nogrp_grp_id
num_gas = np.sum(mask)
print("Found %d gas not in groups" % num_gas)
my_pos_gas = pos_gas[mask, :]
my_ids_gas = ids_gas[mask]
my_grp_gas = grp_gas[mask]
my_pos_DM = pos_DM[:, :]
my_ids_DM = ids_DM[:]
my_grp_DM = grp_DM[:]
@jit(nopython=True, parallel=True, fastmath=True)
def test_stand_alone_gas(i):
pos = my_pos_gas[i, :]
grp = my_grp_gas[i]
dx = pos[0] - my_pos_DM[:, 0]
dy = pos[1] - my_pos_DM[:, 1]
dz = pos[2] - my_pos_DM[:, 2]
dx = nearest(dx)
dy = nearest(dy)
dz = nearest(dz)
# Identify the nearest DM particle
r2 = dx ** 2 + dy ** 2 + dz ** 2
select = np.argmin(r2)
# If the nearest DM particle is in a group --> mistake
target_grp = my_grp_DM[select]
if target_grp != nogrp_grp_id and r2[select] < l * l:
print("Found a gas without group whose nearest DM particle is in a group!")
print("Gas: id=", my_ids_gas[i], "pos=", pos, "grp=", grp)
print(
"DM: id=",
my_ids_DM[select],
"pos=",
my_pos_DM[select],
"grp=",
my_grp_DM[select],
)
print("r=", np.sqrt(r2[select]))
# exit()
for i in tqdm(range(num_gas)):
test_stand_alone_gas(i)
print("All stand-alone gas OK!")
####################################################
# Test the gas in groups
mask = grp_gas != nogrp_grp_id
num_gas = np.sum(mask)
print("Found %d gas in groups" % num_gas)
my_pos_gas = pos_gas[mask, :]
my_ids_gas = ids_gas[mask]
my_grp_gas = grp_gas[mask]
my_pos_DM = pos_DM[:, :]
my_ids_DM = ids_DM[:]
my_grp_DM = grp_DM[:]
@jit(nopython=True, parallel=True, fastmath=True)
def test_gas_in_groups(i):
pos = my_pos_gas[i, :]
grp = my_grp_gas[i]
dx = pos[0] - my_pos_DM[:, 0]
dy = pos[1] - my_pos_DM[:, 1]
dz = pos[2] - my_pos_DM[:, 2]
dx = nearest(dx)
dy = nearest(dy)
dz = nearest(dz)
# Identify the nearest DM particle
r2 = dx ** 2 + dy ** 2 + dz ** 2
select = np.argmin(r2)
# If the nearest DM particle is not in the same group --> mistake
target_grp = my_grp_DM[select]
if target_grp != grp and r2[select] < l * l:
print(
"Found a gas in a group whose nearest DM particle is in a different group!"
)
print("Gas: id=", my_ids_gas[i], "pos=", pos, "grp=", grp)
print(
"DM: id=", my_ids_DM[select], "pos=", my_pos_DM[select], "grp=", target_grp
)
print("r=", np.sqrt(r2[select]))
# exit()
for i in tqdm(range(num_gas)):
test_gas_in_groups(i)
print("All gas in groups OK!")
####################################################
# Test the stand-alone DM
mask = grp_DM == nogrp_grp_id
num_DM = np.sum(mask)
print("Found %d DM not in groups" % num_DM)
my_pos_DM = pos_DM[mask, :]
my_ids_DM = ids_DM[mask]
my_grp_DM = grp_DM[mask]
@jit(nopython=True, parallel=True, fastmath=True)
def test_stand_alone_DM(i):
pos = my_pos_DM[i, :]
grp = my_grp_DM[i]
dx = pos[0] - pos_DM[:, 0]
dy = pos[1] - pos_DM[:, 1]
dz = pos[2] - pos_DM[:, 2]
dx = nearest(dx)
dy = nearest(dy)
dz = nearest(dz)
# Identify the nearest DM particle
r2 = dx ** 2 + dy ** 2 + dz ** 2
mask = np.logical_and(r2 < l * l, r2 > 0.0)
# If the nearest DM particle is in a group --> mistake
if not np.all(grp_DM[mask] == nogrp_grp_id):
print("Found a DM without group with some DM particle within l in a group!")
print("DM: id=", my_ids_DM[i], "pos=", pos, "grp=", grp)
for j in range(np.sum(mask)):
if grp_DM[mask][j] != nogrp_grp_id:
print(
"Other: id=",
ids_DM[mask][j],
"pos=",
pos_DM[mask, :][j, :],
"grp=",
grp_DM[mask][j],
"r=",
np.sqrt(r2[mask][j]),
)
for i in tqdm(range(num_DM)):
test_stand_alone_DM(i)
print("All stand-alone DM OK!")
####################################################
# Test the DM in groups
mask = grp_DM != nogrp_grp_id
num_DM = np.sum(mask)
print("Found %d DM in groups" % num_DM)
my_pos_DM = pos_DM[mask, :]
my_ids_DM = ids_DM[mask]
my_grp_DM = grp_DM[mask]
@jit(nopython=True, parallel=True, fastmath=True)
def test_DM_in_groups(i):
pos = my_pos_DM[i, :]
grp = my_grp_DM[i]
dx = pos[0] - pos_DM[:, 0]
dy = pos[1] - pos_DM[:, 1]
dz = pos[2] - pos_DM[:, 2]
dx = nearest(dx)
dy = nearest(dy)
dz = nearest(dz)
# Identify the nearest DM particle
r2 = dx ** 2 + dy ** 2 + dz ** 2
mask = r2 < l * l
# If the nearest DM particle is not in the same group --> mistake
if not np.all(grp_DM[mask] == grp):
print(
"Found a DM in a group whose DM particles within l are in a different group!"
)
print("DM: id=", my_ids_DM[i], "pos=", pos, "grp=", grp)
for j in range(np.sum(mask)):
if grp_DM[mask][j] != grp:
print(
"Other: id=",
ids_DM[mask][j],
"pos=",
pos_DM[mask, :][j, :],
"grp=",
grp_DM[mask][j],
"r=",
np.sqrt(r2[mask][j]),
)
for i in tqdm(range(num_DM)):
test_DM_in_groups(i)
print("All DM in groups OK!")
MetaData:
run_name: EAGLE-L0006N0094-Ref
# Define the system of units to use internally. # Define the system of units to use internally.
InternalUnitSystem: InternalUnitSystem:
UnitMass_in_cgs: 1.98848e43 # 10^10 M_sun in grams UnitMass_in_cgs: 1.98841e43 # 10^10 M_sun in grams
UnitLength_in_cgs: 3.08567758e24 # Mpc in centimeters UnitLength_in_cgs: 3.08567758e24 # Mpc in centimeters
UnitVelocity_in_cgs: 1e5 # km/s in centimeters per second UnitVelocity_in_cgs: 1e5 # km/s in centimeters per second
UnitCurrent_in_cgs: 1 # Amperes UnitCurrent_in_cgs: 1 # Amperes
...@@ -19,9 +22,9 @@ Cosmology: ...@@ -19,9 +22,9 @@ Cosmology:
h: 0.6777 # Reduced Hubble constant h: 0.6777 # Reduced Hubble constant
a_begin: 0.9090909 # Initial scale-factor of the simulation a_begin: 0.9090909 # Initial scale-factor of the simulation
a_end: 1.0 # Final scale factor of the simulation a_end: 1.0 # Final scale factor of the simulation
Omega_m: 0.307 # Matter density parameter Omega_cdm: 0.2587481 # Cold Dark Matter density parameter
Omega_lambda: 0.693 # Dark-energy density parameter Omega_lambda: 0.693 # Dark-energy density parameter
Omega_b: 0.0455 # Baryon density parameter Omega_b: 0.0482519 # Baryon density parameter
Scheduler: Scheduler:
max_top_level_cells: 8 max_top_level_cells: 8
...@@ -32,7 +35,7 @@ TimeIntegration: ...@@ -32,7 +35,7 @@ TimeIntegration:
time_begin: 0. # The starting time of the simulation (in internal units). time_begin: 0. # The starting time of the simulation (in internal units).
time_end: 1e-2 # The end time of the simulation (in internal units). time_end: 1e-2 # The end time of the simulation (in internal units).
dt_min: 1e-10 # The minimal time-step size of the simulation (in internal units). dt_min: 1e-10 # The minimal time-step size of the simulation (in internal units).
dt_max: 1e-3 # The maximal 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 # Parameters governing the snapshots
Snapshots: Snapshots:
...@@ -41,6 +44,9 @@ Snapshots: ...@@ -41,6 +44,9 @@ Snapshots:
time_first: 0.01 # Time of the first output (non-cosmological run) (in internal units) time_first: 0.01 # Time of the first output (non-cosmological run) (in internal units)
delta_time: 1.01 # Time difference between consecutive outputs (in internal units) delta_time: 1.01 # Time difference between consecutive outputs (in internal units)
compression: 1 compression: 1
distributed: 1
recording_triggers_part: [1.0227e-4, 1.0227e-5] # Recording starts 100M and 10M years before a snapshot
recording_triggers_bpart: [1.0227e-4, 1.0227e-5] # Recording starts 100M and 10M years before a snapshot
# Parameters governing the conserved quantities statistics # Parameters governing the conserved quantities statistics
Statistics: Statistics:
...@@ -50,35 +56,54 @@ Statistics: ...@@ -50,35 +56,54 @@ Statistics:
# Parameters for the self-gravity scheme # Parameters for the self-gravity scheme
Gravity: Gravity:
eta: 0.025 # Constant dimensionless multiplier for time integration. eta: 0.025 # Constant dimensionless multiplier for time integration.
theta: 0.7 # Opening angle (Multipole acceptance criterion) MAC: adaptive
comoving_softening: 0.0026994 # Comoving softening length (in internal units). epsilon_fmm: 0.001
max_physical_softening: 0.0007 # Physical softening length (in internal units). theta_cr: 0.7 # Opening angle (Multipole acceptance criterion)
mesh_side_length: 16 mesh_side_length: 64
comoving_DM_softening: 0.0026994 # Comoving DM softening length (in internal units).
max_physical_DM_softening: 0.0007 # Max physical DM softening length (in internal units).
comoving_baryon_softening: 0.0026994 # Comoving DM softening length (in internal units).
max_physical_baryon_softening: 0.0007 # Max physical DM softening length (in internal units).
# Parameters for the hydrodynamics scheme # Parameters for the hydrodynamics scheme
SPH: SPH:
resolution_eta: 1.2348 # Target smoothing length in units of the mean inter-particle separation (1.2348 == 48Ngbs with the cubic spline kernel). 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. h_min_ratio: 0.1 # Minimal smoothing length in units of softening.
CFL_condition: 0.1 # Courant-Friedrich-Levy condition for time integration. h_max: 0.5 # Maximal smoothing length in co-moving internal units.
minimal_temperature: 100 # (internal units) CFL_condition: 0.2 # Courant-Friedrich-Levy condition for time integration.
minimal_temperature: 100 # (internal units)
particle_splitting: 1
particle_splitting_mass_threshold: 7e-4 # Internal units (i.e. 7e6 Msun ~ 4 times the initial gas mass)
# Parameters of the stars neighbour search
Stars:
resolution_eta: 1.1642 # Target smoothing length in units of the mean inter-particle separation
h_tolerance: 7e-3
overwrite_birth_time: 1
birth_time: 0.33333 # Pretend all the stars were born at z = 2
luminosity_filename: ./photometry
# Parameters for the Friends-Of-Friends algorithm # Parameters for the Friends-Of-Friends algorithm
FOF: FOF:
basename: fof_output # Filename for the FOF outputs. basename: fof_output # Filename for the FOF outputs.
min_group_size: 256 # The minimum no. of particles required for a group. min_group_size: 256 # The minimum no. of particles required for a group.
linking_length_ratio: 0.2 # Linking length in units of the main inter-particle separation. linking_length_ratio: 0.2 # Linking length in units of the main inter-particle separation.
seed_black_holes_enabled: 1 # Enable seeding of black holes in FoF groups
black_hole_seed_halo_mass_Msun: 1.5e10 # Minimal halo mass in which to seed a black hole (in solar masses). black_hole_seed_halo_mass_Msun: 1.5e10 # Minimal halo mass in which to seed a black hole (in solar masses).
scale_factor_first: 0.91 # Scale-factor of first FoF black hole seeding calls. scale_factor_first: 0.91 # Scale-factor of first FoF black hole seeding calls.
delta_time: 1.005 # Scale-factor ratio between consecutive FoF black hole seeding calls. delta_time: 1.005 # Scale-factor ratio between consecutive FoF black hole seeding calls.
linking_types: [0, 1, 0, 0, 0, 0, 0]
attaching_types: [1, 0, 0, 0, 1, 1, 0]
# Parameters related to the initial conditions # Parameters related to the initial conditions
InitialConditions: InitialConditions:
file_name: ./EAGLE_ICs_6.hdf5 # The file to read file_name: ./EAGLE_ICs_6.hdf5 # The file to read
periodic: 1 periodic: 1
cleanup_h_factors: 1 # Remove the h-factors inherited from Gadget 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 cleanup_velocity_factors: 1 # Remove the sqrt(a) factor in the velocities inherited from Gadget
remap_ids: 1
EAGLEChemistry: # Solar abundances EAGLEChemistry: # Solar abundances
init_abundance_metal: 0.014 init_abundance_metal: 0.014
init_abundance_Hydrogen: 0.70649785 init_abundance_Hydrogen: 0.70649785
...@@ -91,6 +116,7 @@ EAGLEChemistry: # Solar abundances ...@@ -91,6 +116,7 @@ EAGLEChemistry: # Solar abundances
init_abundance_Silicon: 6.825874e-4 init_abundance_Silicon: 6.825874e-4
init_abundance_Iron: 1.1032152e-3 init_abundance_Iron: 1.1032152e-3
# EAGLE cooling parameters
EAGLECooling: EAGLECooling:
dir_name: ./coolingtables/ dir_name: ./coolingtables/
H_reion_z: 11.5 H_reion_z: 11.5
...@@ -99,21 +125,34 @@ EAGLECooling: ...@@ -99,21 +125,34 @@ EAGLECooling:
He_reion_z_sigma: 0.5 He_reion_z_sigma: 0.5
He_reion_eV_p_H: 2.0 He_reion_eV_p_H: 2.0
# PS2020 cooling parameters
PS2020Cooling:
dir_name: ./UV_dust1_CR1_G1_shield1.hdf5
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
delta_logTEOS_subgrid_properties: 0.3
rapid_cooling_threshold: 0.333333
# EAGLE star formation parameters # EAGLE star formation parameters
EAGLEStarFormation: 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. SF_threshold: Zdep # Zdep (Schaye 2004) or Subgrid
EOS_temperature_norm_K: 8000 # Temperature om the polytropic EOS assumed for star-forming gas at the density normalisation in Kelvin. SF_model: PressureLaw # PressureLaw (Schaye et al. 2008) or SchmidtLaw
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_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_exponent: 1.4 # The exponent of the Kennicutt-Schmidt law. min_over_density: 100.0 # The over-density above which star-formation is allowed.
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_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_high_density_exponent: 2.0 # Slope of the Kennicut-Schmidt law above the high-density threshold. EOS_entropy_margin_dex: 0.3 # When using Z-based SF threshold, logarithm base 10 of the maximal entropy above the EOS at which stars can form.
EOS_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 # When using Z-based SF threshold, normalisation of the metal-dependant density threshold for star formation 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 # When using Z-based SF threshold, reference metallicity (metal mass fraction) for the metal-dependant threshold for star formation.
threshold_Z0: 0.002 # Reference metallicity (metal mass fraction) for the metal-dependant threshold for star formation. threshold_slope: -0.64 # When using Z-based SF threshold, slope of the metal-dependant star formation threshold
threshold_slope: -0.64 # Slope of the metal-dependant star formation threshold threshold_max_density_H_p_cm3: 10.0 # When using Z-based SF threshold, maximal density of the metal-dependant density threshold for star formation in Hydrogen atoms per cm^3.
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. threshold_temperature1_K: 1000 # When using subgrid-based SF threshold, subgrid temperature below which gas is star-forming.
threshold_temperature2_K: 31622 # When using subgrid-based SF threshold, subgrid temperature below which gas is star-forming if also above the density limit.
threshold_number_density_H_p_cm3: 10 # When using subgrid-based SF threshold, subgrid number density above which gas is star-forming if also below the second temperature limit.
# Parameters for the EAGLE "equation of state" # Parameters for the EAGLE "equation of state"
EAGLEEntropyFloor: EAGLEEntropyFloor:
...@@ -128,46 +167,85 @@ EAGLEEntropyFloor: ...@@ -128,46 +167,85 @@ EAGLEEntropyFloor:
# EAGLE feedback model # EAGLE feedback model
EAGLEFeedback: EAGLEFeedback:
use_SNII_feedback: 1 # Global switch for SNII thermal (stochastic) feedback. use_SNII_feedback: 1 # Global switch for SNII thermal (stochastic) feedback.
use_SNIa_feedback: 1 # Global switch for SNIa thermal (continuous) feedback. use_SNIa_feedback: 1 # Global switch for SNIa thermal (continuous) feedback.
use_AGB_enrichment: 1 # Global switch for enrichement from AGB stars. use_AGB_enrichment: 1 # Global switch for enrichement from AGB stars.
use_SNII_enrichment: 1 # Global switch for enrichement from SNII stars. use_SNII_enrichment: 1 # Global switch for enrichement from SNII stars.
use_SNIa_enrichment: 1 # Global switch for enrichement from SNIa stars. use_SNIa_enrichment: 1 # Global switch for enrichement from SNIa stars.
filename: ./yieldtables/ # Path to the directory containing the EAGLE yield tables. filename: ./yieldtables/ # Path to the directory containing the EAGLE yield tables.
IMF_min_mass_Msun: 0.1 # Minimal stellar mass considered for the Chabrier IMF in solar masses. IMF_min_mass_Msun: 0.1 # Minimal stellar mass considered for the Chabrier IMF in solar masses.
IMF_max_mass_Msun: 100.0 # Maximal stellar mass considered for the Chabrier IMF in solar masses. IMF_max_mass_Msun: 100.0 # Maximal stellar mass considered for the Chabrier IMF in solar masses.
SNII_min_mass_Msun: 6.0 # Minimal mass considered for SNII feedback (not SNII enrichment!) in solar masses. SNII_min_mass_Msun: 6.0 # Minimal mass considered for SNII stars in solar masses.
SNII_max_mass_Msun: 100.0 # Maximal mass considered for SNII feedback (not SNII enrichment!) in solar masses. SNII_max_mass_Msun: 100.0 # Maximal mass considered for SNII stars in solar masses.
SNII_wind_delay_Gyr: 0.03 # Time in Gyr between a star's birth and the SNII thermal feedback event. SNII_feedback_model: Random # Feedback modes: Random, Isotropic, MinimumDistance, MinimumDensity
SNII_delta_T_K: 3.16228e7 # Change in temperature to apply to the gas particle in a SNII thermal feedback event in Kelvin. SNII_sampled_delay: 0 # Sample the SNII lifetimes to do feedback.
SNII_energy_erg: 1.0e51 # Energy of one SNII explosion in ergs. SNII_wind_delay_Gyr: 0.03 # Time in Gyr between a star's birth and the SNII thermal feedback event when not sampling.
SNII_energy_fraction_min: 0.3 # Minimal fraction of energy applied in a SNII feedback event. SNII_delta_T_K: 3.16228e7 # Change in temperature to apply to the gas particle in a SNII thermal feedback event in Kelvin.
SNII_energy_fraction_max: 3.0 # Maximal fraction of energy applied in a SNII feedback event. SNII_energy_erg: 1.0e51 # Energy of one SNII explosion in ergs.
SNII_energy_fraction_Z_0: 0.0012663729 # Pivot point for the metallicity dependance of the SNII energy fraction (metal mass fraction). SNII_energy_fraction_function: EAGLE # Type of functional form to use for scaling the energy fraction with density and metallicity ('EAGLE', 'Separable', or 'Independent').
SNII_energy_fraction_n_0_H_p_cm3: 0.67 # Pivot point for the birth density dependance of the SNII energy fraction in cm^-3. SNII_energy_fraction_min: 0.3 # Minimal fraction of energy applied in a SNII feedback event.
SNII_energy_fraction_n_Z: 0.8686 # Power-law for the metallicity dependance of the SNII energy fraction. SNII_energy_fraction_max: 3.0 # Maximal fraction of energy applied in a SNII feedback event.
SNII_energy_fraction_n_n: 0.8686 # Power-law for the birth density dependance of the SNII energy fraction. SNII_energy_fraction_Z_0: 0.0012663729 # Pivot point for the metallicity dependance of the SNII energy fraction (metal mass fraction).
SNIa_max_mass_Msun: 8.0 # Maximal mass considered for SNIa feedback and enrichment in solar masses. SNII_energy_fraction_n_0_H_p_cm3: 1.4588 # Pivot point for the birth density dependance of the SNII energy fraction in cm^-3.
SNIa_timescale_Gyr: 2.0 # Time-scale of the exponential decay of the SNIa rates in Gyr. SNII_energy_fraction_n_Z: 0.8686 # Power-law for the metallicity dependance of the SNII energy fraction.
SNIa_efficiency_p_Msun: 0.002 # Normalisation of the SNIa rates in inverse solar masses. SNII_energy_fraction_n_n: 0.8686 # Power-law for the birth density dependance of the SNII energy fraction.
SNIa_energy_erg: 1.0e51 # Energy of one SNIa explosion in ergs. SNII_energy_fraction_use_birth_density: 1 # Are we using the density at birth to compute f_E or at feedback time?
AGB_ejecta_velocity_km_p_s: 10.0 # Velocity of the AGB ejectas in km/s. SNII_energy_fraction_use_birth_metallicity: 1 # Are we using the metallicity at birth to compuote f_E or at feedback time?
SNII_yield_factor_Hydrogen: 1.0 # (Optional) Correction factor to apply to the Hydrogen yield from the SNII channel. SNIa_DTD: PowerLaw # Functional form of the SNIa delay time distribution.
SNII_yield_factor_Helium: 1.0 # (Optional) Correction factor to apply to the Helium yield from the SNII channel. SNIa_DTD_delay_Gyr: 0.04 # Stellar age after which SNIa start in Gyr (40 Myr corresponds to stars ~ 8 Msun).
SNII_yield_factor_Carbon: 0.5 # (Optional) Correction factor to apply to the Carbon yield from the SNII channel. SNIa_DTD_power_law_norm_p_Msun: 0.0012 # Normalization of the SNIa delay time distribution (in Msun^-1).
SNII_yield_factor_Nitrogen: 1.0 # (Optional) Correction factor to apply to the Nitrogen yield from the SNII channel. SNIa_energy_erg: 1.0e51 # Energy of one SNIa explosion in ergs.
SNII_yield_factor_Oxygen: 1.0 # (Optional) Correction factor to apply to the Oxygen yield from the SNII channel. AGB_ejecta_velocity_km_p_s: 10.0 # Velocity of the AGB ejectas in km/s.
SNII_yield_factor_Neon: 1.0 # (Optional) Correction factor to apply to the Neon yield from the SNII channel. stellar_evolution_age_cut_Gyr: 0.1 # Stellar age in Gyr above which the enrichment is down-sampled.
SNII_yield_factor_Magnesium: 2.0 # (Optional) Correction factor to apply to the Magnesium yield from the SNII channel. stellar_evolution_sampling_rate: 10 # Number of time-steps in-between two enrichment events for a star above the age threshold.
SNII_yield_factor_Silicon: 1.0 # (Optional) Correction factor to apply to the Silicon yield from the SNII channel. SNII_yield_factor_Hydrogen: 1.0 # (Optional) Correction factor to apply to the Hydrogen yield from the SNII channel.
SNII_yield_factor_Iron: 0.5 # (Optional) Correction factor to apply to the Iron yield from the SNII channel. SNII_yield_factor_Helium: 1.0 # (Optional) Correction factor to apply to the Helium yield from the SNII channel.
SNII_yield_factor_Carbon: 0.5 # (Optional) Correction factor to apply to the Carbon yield from the SNII channel.
SNII_yield_factor_Nitrogen: 1.0 # (Optional) Correction factor to apply to the Nitrogen yield from the SNII channel.
SNII_yield_factor_Oxygen: 1.0 # (Optional) Correction factor to apply to the Oxygen yield from the SNII channel.
SNII_yield_factor_Neon: 1.0 # (Optional) Correction factor to apply to the Neon yield from the SNII channel.
SNII_yield_factor_Magnesium: 2.0 # (Optional) Correction factor to apply to the Magnesium yield from the SNII channel.
SNII_yield_factor_Silicon: 1.0 # (Optional) Correction factor to apply to the Silicon yield from the SNII channel.
SNII_yield_factor_Iron: 0.5 # (Optional) Correction factor to apply to the Iron yield from the SNII channel.
# EAGLE AGN model # EAGLE AGN model
EAGLEAGN: EAGLEAGN:
subgrid_seed_mass_Msun: 1.5e5 # Black hole subgrid mass at creation time in solar masses. 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. use_multi_phase_bondi: 0 # Compute Bondi rates per neighbour particle?
viscous_alpha: 1e6 # Normalisation constant of the Bondi viscuous time-scale accretion reduction term use_subgrid_bondi: 0 # Compute Bondi rates using the subgrid extrapolation of the gas properties around the BH?
radiative_efficiency: 0.1 # Fraction of the accreted mass that gets radiated. with_angmom_limiter: 1 # Are we applying the Rosas-Guevara et al. (2015) viscous time-scale reduction term?
coupling_efficiency: 0.15 # Fraction of the radiated energy that couples to the gas in feedback events. viscous_alpha: 1e6 # Normalisation constant of the viscous time-scale in the accretion reduction term
AGN_delta_T_K: 3.16228e8 # Change in temperature to apply to the gas particle in an AGN feedback event in Kelvin. with_boost_factor: 0 # Are we using the model from Booth & Schaye (2009)?
AGN_num_ngb_to_heat: 1. # Target number of gas neighbours to heat in an AGN feedback event. boost_alpha_only: 0 # If using the boost factor, are we using a constant boost only?
boost_alpha: 1. # Lowest value for the accretion effeciency for the Booth & Schaye 2009 accretion model.
boost_beta: 2. # Slope of the power law for the Booth & Schaye 2009 model, set beta to zero for constant alpha models.
boost_n_h_star_H_p_cm3: 0.1 # Normalization of the power law for the Booth & Schaye 2009 model in cgs (cm^-3).
with_fixed_T_near_EoS: 0 # Are we using a fixed temperature to compute the sound-speed of gas on the entropy floor in the Bondy-Hoyle accretion term?
fixed_T_above_EoS_dex: 0.3 # Distance above the entropy floor for which we use a fixed sound-speed
fixed_T_near_EoS_K: 8000 # Fixed temperature assumed to compute the sound-speed of gas on the entropy floor in the Bondy-Hoyle accretion term
use_nibbling: 1 # Continuously transfer small amounts of mass from all gas neighbours to a black hole [1] or stochastically swallow whole gas particles [0]?
min_gas_mass_for_nibbling_Msun: 9e5 # Minimum mass for a gas particle to be nibbled from [M_Sun]. Only used if use_nibbling is 1.
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_feedback_model: Random # Feedback modes: Random, Isotropic, MinimumDistance, MinimumDensity
AGN_use_deterministic_feedback: 0 # Deterministic (reservoir) [1] or stochastic [0] AGN feedback?
use_variable_delta_T: 0 # Switch to enable adaptive calculation of AGN dT [1], rather than using a constant value [0].
AGN_with_locally_adaptive_delta_T: 0 # Switch to enable additional dependence of AGN dT on local gas density and temperature (only used if use_variable_delta_T is 1).
AGN_delta_T_K: 3.16228e8 # Change in temperature to apply to the gas particle in an AGN feedback event [K] (used if use_variable_delta_T is 0 or AGN_use_nheat_with_fixed_dT is 1 AND to initialise the BHs).
AGN_use_nheat_with_fixed_dT: 0 # Switch to use the constant AGN dT, rather than the adaptive one, for calculating the energy reservoir threshold.
AGN_use_adaptive_energy_reservoir_threshold: 0 # Switch to calculate an adaptive AGN energy reservoir threshold.
AGN_num_ngb_to_heat: 1. # Target number of gas neighbours to heat in an AGN feedback event (only used if AGN_use_adaptive_energy_reservoir_threshold is 0).
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?
with_potential_correction: 1 # Should the BH's own contribution to the potential be removed from the neighbour's potentials when looking for repositioning targets.
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: DynamicalEscapeVelocity # Type of velocity threshold for BH mergers ('CircularVelocity', 'EscapeVelocity', 'DynamicalEscapeVelocity').
merger_max_distance_ratio: 3.0 # Maximal distance over which two BHs can merge, in units of the softening length.
use_subgrid_mass_from_ics: 0 # Use the dynamical mass as the subgrid mass since we don't have subgrid masses in the ICs.
#!/bin/bash #!/bin/bash
wget http://virgodb.cosma.dur.ac.uk/swift-webstorage/ICs/EAGLE_low_z/EAGLE_ICs_6.hdf5 wget https://virgodb.cosma.dur.ac.uk/swift-webstorage/ICs/EAGLE_low_z/EAGLE_ICs_6.hdf5
...@@ -7,5 +7,5 @@ then ...@@ -7,5 +7,5 @@ then
./getIC.sh ./getIC.sh
fi fi
../../swift --cosmology --hydro --self-gravity --stars --threads=16 eagle_6.yml 2>&1 | tee output.log ../../../swift -v 1 --hydro --threads=4 -n 16 -y 1 eagle_6.yml | tee output.log
...@@ -36,20 +36,20 @@ if [ "$RUN_DM" = "1" ]; then ...@@ -36,20 +36,20 @@ if [ "$RUN_DM" = "1" ]; then
rm $VEL_OUTPUT/vel_$TEST* rm $VEL_OUTPUT/vel_$TEST*
# Run test using SWIFT + VELOCIraptor # Run test using SWIFT + VELOCIraptor
echo "Running: mpirun -np $NUM_MPI_PROC ../swift_mpi --self-gravity --threads=8 eagle_6.yml --velociraptor --steps=5 -P StructureFinding:basename:./$OUTPUT/stf -P StructureFinding:config_file_name:./stf_input_$TEST.cfg -P Snapshots:basename:./eagle_dmonly" echo "Running: mpirun -np $NUM_MPI_PROC ../../../swift_mpi --self-gravity --threads=8 eagle_6.yml --velociraptor --steps=5 -P StructureFinding:basename:./$OUTPUT/stf -P StructureFinding:config_file_name:./stf_input_$TEST.cfg -P Snapshots:basename:./eagle_dmonly"
mpirun -np $NUM_MPI_PROC ../swift_mpi --self-gravity --threads=8 eagle_6.yml --velociraptor --steps=5 -P StructureFinding:basename:./$OUTPUT/stf -P StructureFinding:config_file_name:./stf_input_$TEST.cfg -P Snapshots:basename:./eagle_dmonly mpirun -np $NUM_MPI_PROC ../../../swift_mpi --self-gravity --threads=8 eagle_6.yml --velociraptor --steps=5 -P StructureFinding:basename:./$OUTPUT/stf -P StructureFinding:config_file_name:./stf_input_$TEST.cfg -P Snapshots:basename:./eagle_dmonly
# Run test using VELOCIraptor # Run test using VELOCIraptor
echo "Running: mpirun -np $NUM_MPI_PROC $VELOCIRAPTOR_PATH/bin/stf-gas -I 2 -i eagle_dmonly_0000 -C $VELOCIRAPTOR_PATH/stf_input_$TEST.cfg -o ./$VEL_OUTPUT/vel_$TEST" echo "Running: mpirun -np $NUM_MPI_PROC $VELOCIRAPTOR_PATH/bin/stf-gas -I 2 -i eagle_dmonly_0000 -C $VELOCIRAPTOR_PATH/stf_input_$TEST.cfg -o ./$VEL_OUTPUT/vel_$TEST"
mpirun -np $NUM_MPI_PROC $VELOCIRAPTOR_PATH/bin/stf-gas -I 2 -i eagle_dmonly_0000 -C ./stf_input_$TEST.cfg -o ./$VEL_OUTPUT/vel_$TEST mpirun -np $NUM_MPI_PROC $VELOCIRAPTOR_PATH/bin/stf-gas -I 2 -i eagle_dmonly_0000 -C ./stf_input_$TEST.cfg -o ./$VEL_OUTPUT/vel_$TEST
# Create info file for python comparison script # Create info file for python3 comparison script
echo -e $INFO_FILE_TEXT > infoFile_$TEST.txt echo -e $INFO_FILE_TEXT > infoFile_$TEST.txt
echo "vel_$TEST $VEL_OUTPUT/vel_$TEST" >> infoFile_$TEST.txt echo "vel_$TEST $VEL_OUTPUT/vel_$TEST" >> infoFile_$TEST.txt
echo "stf_$TEST $OUTPUT/stf_0000.VELOCIraptor" >> infoFile_$TEST.txt echo "stf_$TEST $OUTPUT/stf_0000.VELOCIraptor" >> infoFile_$TEST.txt
# Run comparison script on VELOCIraptor output # Run comparison script on VELOCIraptor output
if python $SCRIPT_PATH/catalogcomparisontolerancecheck.py infoFile_$TEST.txt toIfile.txt if python3 $SCRIPT_PATH/catalogcomparisontolerancecheck.py infoFile_$TEST.txt toIfile.txt
then then
echo "Catalog comparison passed: "$TEST echo "Catalog comparison passed: "$TEST
else else
...@@ -80,20 +80,20 @@ if [ "$RUN_GAS" = "1" ]; then ...@@ -80,20 +80,20 @@ if [ "$RUN_GAS" = "1" ]; then
rm $VEL_OUTPUT/vel_$TEST* rm $VEL_OUTPUT/vel_$TEST*
# Run test using SWIFT + VELOCIraptor # Run test using SWIFT + VELOCIraptor
echo "Running: mpirun -np $NUM_MPI_PROC ../swift_mpi --hydro --self-gravity --threads=8 eagle_6.yml --velociraptor --steps=5 -P StructureFinding:basename:./$OUTPUT/stf -P StructureFinding:config_file_name:./stf_input_$TEST.cfg -P Snapshots:basename:./eagle_gas" echo "Running: mpirun -np $NUM_MPI_PROC ../../../swift_mpi --hydro --self-gravity --threads=8 eagle_6.yml --velociraptor --steps=5 -P StructureFinding:basename:./$OUTPUT/stf -P StructureFinding:config_file_name:./stf_input_$TEST.cfg -P Snapshots:basename:./eagle_gas"
mpirun -np $NUM_MPI_PROC ../swift_mpi --hydro --self-gravity --threads=8 eagle_6.yml --velociraptor --steps=5 -P StructureFinding:basename:./$OUTPUT/stf -P StructureFinding:config_file_name:./stf_input_$TEST.cfg -P Snapshots:basename:./eagle_gas mpirun -np $NUM_MPI_PROC ../../../swift_mpi --hydro --self-gravity --threads=8 eagle_6.yml --velociraptor --steps=5 -P StructureFinding:basename:./$OUTPUT/stf -P StructureFinding:config_file_name:./stf_input_$TEST.cfg -P Snapshots:basename:./eagle_gas
# Run test using VELOCIraptor # Run test using VELOCIraptor
echo "Running: mpirun -np $NUM_MPI_PROC $VELOCIRAPTOR_PATH/bin/stf-gas -I 2 -i eagle_gas_0000 -C ./stf_input_$TEST.cfg -o ./$VEL_OUTPUT/vel_$TEST" echo "Running: mpirun -np $NUM_MPI_PROC $VELOCIRAPTOR_PATH/bin/stf-gas -I 2 -i eagle_gas_0000 -C ./stf_input_$TEST.cfg -o ./$VEL_OUTPUT/vel_$TEST"
mpirun -np $NUM_MPI_PROC $VELOCIRAPTOR_PATH/bin/stf-gas -I 2 -i eagle_gas_0000 -C ./stf_input_$TEST.cfg -o ./$VEL_OUTPUT/vel_$TEST mpirun -np $NUM_MPI_PROC $VELOCIRAPTOR_PATH/bin/stf-gas -I 2 -i eagle_gas_0000 -C ./stf_input_$TEST.cfg -o ./$VEL_OUTPUT/vel_$TEST
# Create info file for python comparison script # Create info file for python3 comparison script
echo -e $INFO_FILE_TEXT > infoFile_$TEST.txt echo -e $INFO_FILE_TEXT > infoFile_$TEST.txt
echo "vel_$TEST $VEL_OUTPUT/vel_$TEST" >> infoFile_$TEST.txt echo "vel_$TEST $VEL_OUTPUT/vel_$TEST" >> infoFile_$TEST.txt
echo "stf_$TEST $OUTPUT/stf_0000.VELOCIraptor" >> infoFile_$TEST.txt echo "stf_$TEST $OUTPUT/stf_0000.VELOCIraptor" >> infoFile_$TEST.txt
# Run comparison script on VELOCIraptor output # Run comparison script on VELOCIraptor output
if python $SCRIPT_PATH/catalogcomparisontolerancecheck.py infoFile_$TEST.txt toIfile.txt if python3 $SCRIPT_PATH/catalogcomparisontolerancecheck.py infoFile_$TEST.txt toIfile.txt
then then
echo "Catalog comparison passed: "$TEST echo "Catalog comparison passed: "$TEST
else else
......
Initial conditions for the AGORA simulation presented in Roca-Fabrega et al. 2021.
The initial conditions are generated by MUSIC (and thus the path to the binary
should be set in run.sh). The initial conditions are generated for AREPO and
then converted into SWIFT compatible IC with a python3 script.
We will use SWIFT to cancel the h- and a-factors from the ICs.
The IC consists in a halo evolving to a virial mass of ∼ 1e12 Msun at z = 0 with a relatively
quiescent merger history between z = 2 and 0. The cosmological parameters are taken from WMAP7/9+SNe+BAO.
The target halo contains the highest-resolution dark matter particles particles of masses = 2.8e5 Msun.
To run this example, SWIFT must be configured with the following options:
./configure --with-chemistry=GEAR_10 --with-cooling=grackle_0 --with-pressure-floor=GEAR --with-stars=GEAR --with-star-formation=GEAR --with-feedback=GEAR
\ No newline at end of file
# Define the system of units to use internally.
InternalUnitSystem:
UnitMass_in_cgs: 1.98841e43 # 10^10 M_sun in grams
UnitLength_in_cgs: 3.08567758e21 # kpc in centimeters
UnitVelocity_in_cgs: 1e5 # km/s in centimeters per second
UnitCurrent_in_cgs: 1 # Amperes
UnitTemp_in_cgs: 1 # Kelvin
Scheduler:
cell_extra_gparts: 100 # (Optional) Number of spare gparts per top-level allocated at rebuild time for on-the-fly creation.
# Parameters governing the time integration
TimeIntegration:
dt_min: 1e-16 # The minimal time-step size of the simulation (in internal units).
dt_max: 0.1 # The maximal time-step size of the simulation (in internal units).
max_dt_RMS_factor: 0.25 # (Optional) Dimensionless factor for the maximal displacement allowed based on the RMS velocities.
dt_RMS_use_gas_only: 1
# Cosmological parameters
Cosmology:
h: 0.702 # Reduced Hubble constant
a_begin: 0.00990099 # Initial scale-factor of the simulation
a_end: 1.0 # Final scale factor of the simulation
Omega_cdm: 0.2265 # Cold Dark Matter density parameter
Omega_lambda: 0.728 # Dark-energy density parameter
Omega_b: 0.0455 # Baryon density parameter
Omega_r: 0. # (Optional) Radiation density parameter
w_0: -1.0 # (Optional) Dark-energy equation-of-state parameter at z=0.
w_a: 0. # (Optional) Dark-energy equation-of-state time evolution parameter.
# Parameters governing the snapshots
Snapshots:
basename: agora_cosmo # Common part of the name of output files
time_first: 0. # Time of the first output (in internal units)
delta_time: 1e-2 # Time difference between consecutive outputs (in internal units)
compression: 4
output_list_on: 1 # (Optional) Enable the output list
output_list: output_list.txt # (Optional) File containing the output times (see documentation in "Parameter File" section)
# Parameters governing the conserved quantities statistics
Statistics:
scale_factor_first: 0.00990099
delta_time: 1.02 # Time between statistics output
# Parameters for the self-gravity scheme
Gravity:
eta: 0.025 # Constant dimensionless multiplier for time integration.
MAC: adaptive # Choice of mulitpole acceptance criterion: 'adaptive' OR 'geometric'.
epsilon_fmm: 0.001 # Tolerance parameter for the adaptive multipole acceptance criterion.
theta_cr: 0.7 # Opening angle for the purely gemoetric criterion.
comoving_DM_softening: 0.8 # Comoving softening length (in internal units).
max_physical_DM_softening: 0.08 # Physical softening length (in internal units).
comoving_baryon_softening: 0.8 # Comoving softening length (in internal units).
max_physical_baryon_softening: 0.08 # Physical softening length (in internal units).
softening_ratio_background: 0.0285714 # Fraction of the mean inter-particle separation to use as Plummer-equivalent softening for the background DM particles.
mesh_side_length: 128 # Number of cells along each axis for the periodic gravity mesh.
# 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).
CFL_condition: 0.1 # Courant-Friedrich-Levy condition for time integration.
minimal_temperature: 10. # Kelvin
h_min_ratio: 0.2 # (Optional) Minimal allowed smoothing length in units of the softening. Defaults to 0 if unspecified.
h_max: 100 # (Optional) Maximal allowed smoothing length in internal units. Defaults to FLT_MAX if unspecified.
initial_temperature: 172.48 # Given in the output of music
# Parameters related to the initial conditions
InitialConditions:
file_name: agora_swift.hdf5 # The file to read
periodic: 1 # Non-periodic BCs
cleanup_h_factors: 1 # Remove the h-factors inherited from Gadget
shift: [0, 0, 0] # Centre the box
cleanup_velocity_factors: 1 # (Optional) Clean up the scale-factors used in the definition of the velocity variable in the ICs (e.g. in Gadget files).
cleanup_smoothing_lengths: 1 # (Optional) Clean the values of the smoothing lengths that are read in to remove stupid values. Set to 1 to activate.
# Cooling with Grackle 2.0
GrackleCooling:
cloudy_table: CloudyData_UVB=HM2012_shielded.h5 # Name of the Cloudy Table (available on the grackle bitbucket repository)
with_UV_background: 1 # Enable or not the UV background
redshift: -1 # Redshift to use (-1 means time based redshift)
with_metal_cooling: 1 # Enable or not the metal cooling
provide_volumetric_heating_rates: 0 # User provide volumetric heating rates
provide_specific_heating_rates: 0 # User provide specific heating rates
self_shielding_method: 0 # Grackle (<= 3) or Gear self shielding method
self_shielding_threshold_atom_per_cm3: 0.007 # Required only with GEAR's self shielding. Density threshold of the self shielding
max_steps: 1000
convergence_limit: 1e-2
thermal_time_myr: 5
maximal_density_Hpcm3: -1 # Maximal density (in hydrogen atoms/cm^3) for cooling. Higher densities are floored to this value to ensure grackle works properly when interpolating beyond the cloudy_table maximal density. A value < 0 deactivates this parameter.
GEARStarFormation:
star_formation_efficiency: 0.01 # star formation efficiency (c_*)
maximal_temperature_K: 3e4 # Upper limit to the temperature of a star forming particle
density_threshold_Hpcm3: 1e-6 # Density threshold (in addition to the pressure floor) in Hydrogen atoms/cm3
n_stars_per_particle: 1
min_mass_frac: 0.5
GEARPressureFloor:
jeans_factor: 8.75
GEARFeedback:
supernovae_energy_erg: 1e51
supernovae_efficiency: 2.3
yields_table: POPIIsw.h5
discrete_yields: 0
yields_table_first_stars: POPIIsw.h5 # Table containing the yields of the first stars.
metallicity_max_first_stars: -1 # Maximal metallicity (in mass fraction) for a first star (-1 to deactivate).
elements: [Fe, Mg, O, C, Al, Ca, Ba, Zn, Eu] # Elements to read in the yields table. The number of element should be one less than the number of elements (N) requested during the configuration (--with-chemistry=GEAR_N).
GEARChemistry:
initial_metallicity: 1e-4
scale_initial_metallicity: 1
Restarts:
delta_hours: 10 # (Optional) decimal hours between dumps of restart files.
#!/usr/env/python3
from h5py import File
import shutil
import numpy as np
import sys
from swiftsimio.visualisation.smoothing_length_generation import (
generate_smoothing_lengths,
)
import time
from unyt import kpc
filename = "agora_arepo.hdf5"
output = "agora_swift.hdf5"
shutil.copy(filename, output)
with File(output, "a") as f:
f["Header"].attrs["Flag_Entropy_ICs"] = 0
npart = f["Header"].attrs["NumPart_ThisFile"]
mass = f["Header"].attrs["MassTable"]
box = f["Header"].attrs["BoxSize"]
T = f["Header"].attrs["suggested_gas_Tinit"]
# Create the units
f.create_group("Units")
print("Assuming defaults AREPO units")
u_l = 3.085678e21
u_m = 1.989e43
u_v = 1e5
u_t = u_l / u_v
f["Units"].attrs["Unit length in cgs (U_L)"] = u_l
f["Units"].attrs["Unit mass in cgs (U_M)"] = u_m
f["Units"].attrs["Unit time in cgs (U_t)"] = u_t
f["Units"].attrs["Unit current in cgs (U_I)"] = 1.0
f["Units"].attrs["Unit temperature in cgs (U_T)"] = 1.0
# Create the mass arrays
for i in range(len(npart)):
if npart[i] == 0:
continue
grp = f["PartType%i" % i]
if "Masses" in grp:
continue
masses = np.ones(npart[i]) * mass[i]
grp.create_dataset("Masses", data=masses, dtype="f")
# Create the smoothing lengths
pos = f["PartType0/Coordinates"][:] * kpc
h = generate_smoothing_lengths(pos, box * kpc, kernel_gamma=1.825742)
f["PartType0"].create_dataset("SmoothingLength", data=h.value, dtype="f")
# Deal with the internal energy
u = (
np.ones(h.shape) * -1
) # We set it through the parameters => fill it with garbage
f["PartType0"].create_dataset("InternalEnergy", data=u, dtype="f")