# Define the system of units to use internally. 
InternalUnitSystem:
  UnitMass_in_cgs:     1.98848e43    # 10^10 M_sun
  UnitLength_in_cgs:   3.08567758e24 # 1 Mpc
  UnitVelocity_in_cgs: 1e5   	     # 1 km/s
  UnitCurrent_in_cgs:  1   	     # Amperes
  UnitTemp_in_cgs:     1   	     # Kelvin

# Cosmological parameters
Cosmology:
  h:              0.6777        # Reduced Hubble constant
  a_begin:        0.0099        # Initial scale-factor of the simulation (z = 100.0)
  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:
  dt_min:     1e-7
  dt_max:     5e-3

# Parameters governing the snapshots
Snapshots:
  basename:	       cooling_box
  delta_time:          1.04
  scale_factor_first:  0.00991
  compression:         4
  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
Statistics:
  scale_factor_first:  0.00991
  delta_time:          1.1

# 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:   100      # K
  
# Parameters related to the initial conditions
InitialConditions:
  file_name:  ./constantBox.hdf5     # The file to read
  periodic:   1

# Parameters for the EAGLE chemistry
EAGLEChemistry: 	     # Primordial abundances
  init_abundance_metal:      0.
  init_abundance_Hydrogen:   0.752
  init_abundance_Helium:     0.248
  init_abundance_Carbon:     0.
  init_abundance_Nitrogen:   0.
  init_abundance_Oxygen:     0.
  init_abundance_Neon:       0.
  init_abundance_Magnesium:  0.
  init_abundance_Silicon:    0.
  init_abundance_Iron:       0.

# Parameters for the EAGLE cooling
EAGLECooling:
  dir_name:                ./coolingtables/
  H_reion_z:               11.5 
  H_reion_eV_p_H:          2.0
  He_reion_z_centre:       3.5
  He_reion_z_sigma:        0.5
  He_reion_eV_p_H:         2.0
  
# Parameters for the EAGLE "equation of state"
EAGLEEntropyFloor:
  Jeans_density_threshold_H_p_cm3: 0.1       # Physical density above which the EAGLE Jeans limiter entropy floor kicks in expressed in Hydrogen atoms per cm^3.
  Jeans_over_density_threshold:    10.       # Overdensity above which the EAGLE Jeans limiter entropy floor can kick in.
  Jeans_temperature_norm_K:        8000      # Temperature of the EAGLE Jeans limiter entropy floor at the density threshold expressed in Kelvin.
  Jeans_gamma_effective:           1.3333333 # Slope the of the EAGLE Jeans limiter entropy floor
  Cool_density_threshold_H_p_cm3: 1e-5       # Physical density above which the EAGLE Cool limiter entropy floor kicks in expressed in Hydrogen atoms per cm^3.
  Cool_over_density_threshold:    10.        # Overdensity above which the EAGLE Cool limiter entropy floor can kick in.
  Cool_temperature_norm_K:        8000       # Temperature of the EAGLE Cool limiter entropy floor at the density threshold expressed in Kelvin.
  Cool_gamma_effective:           1.         # Slope the of the EAGLE Cool limiter entropy floor

# Parameters for the COLIBRE chemistry
COLIBREChemistry: 	     # Primordial abundances
  init_abundance_metal:      0.
  init_abundance_Hydrogen:   0.756
  init_abundance_Helium:     0.244
  init_abundance_Carbon:     0.
  init_abundance_Nitrogen:   0.
  init_abundance_Oxygen:     0.
  init_abundance_Neon:       0.
  init_abundance_Magnesium:  0.
  init_abundance_Silicon:    0.
  init_abundance_Iron:       0.
  init_abundance_Europium:   0.
  init_abundance_Strontium: 0.0    # Inital fraction of particle mass in Strontium
  init_abundance_Barium:    0.0    # Inital fraction of particle mass in Barium
  metal_diffusion_constant:         0.   # No diffusion
  metal_diffusion_timestep_mult:    1e10 # No time-step constraint

# Standard COLIBRE cooling options
COLIBRECooling:
  dir_name:                UV_dust1_CR1_G1_shield1.hdf5
  H_reion_z:               7.5              # Redshift of Hydrogen re-ionization
  H_reion_eV_p_H:          2.0
  He_reion_z_centre:       3.5               # Redshift of the centre of the Helium re-ionization Gaussian
  He_reion_z_sigma:        0.5               # Spread in redshift of the  Helium re-ionization Gaussian
  He_reion_eV_p_H:         2.0               # Energy inject by Helium re-ionization in electron-volt per Hydrogen atom
  delta_logTEOS_subgrid_properties: 0.2
  rapid_cooling_threshold:          0.333333    

CHIMESCooling:
  data_path: ./chimes-data/
  EqmAbundanceTable: colibre_HHe
  PhotoIonTable_UVB: SP20_cross_sections
  PhotoIonTable_ISRF: cross_sections_B87.hdf5
  UV_field: COLIBRE
  Shielding_model: COLIBRE
  UVB_z_dependence:     COLIBRE
  shielding_length_factor: 0.5
  init_abundance_mode: read
  colibre_metal_depletion: 0
  turbulent_velocity_dispersion_km_p_s: 6.0
  colibre_use_turbulent_jeans_length: 1
  relativeTolerance: 1e-3
  absoluteTolerance: 1e-10
  explicitTolerance: 0.1
  scale_metal_tolerances: 1
  Tmol_K: 1.0e5
  ChemistryEqmMode: 0
  ThermEvolOn: 1
  chimes_debug: 0
  max_dust_boost_factor: 10.0
  dust_boost_nH_min_cgs: 0.1
  dust_boost_nH_max_cgs: 100.0
  delta_logTEOS_subgrid_properties: 0.3
  use_colibre_subgrid_EOS: 1
  set_FB_particles_to_eqm: 1
  use_hybrid_cooling: 1
  rapid_cooling_threshold: 0.333333
  colibre_table_path: ./cooling_tables/
  colibre_table_filebase: cooling_rates
  UVB_cutoff_z: 127.0
  S_over_Si_in_solar: 1.0
  Ca_over_Si_in_solar: 1.0
  IncludeCarbon: 0
  IncludeNitrogen: 0
  IncludeOxygen: 0
  IncludeNeon: 0
  IncludeMagnesium: 0
  IncludeSilicon: 0
  IncludeSulphur: 0
  IncludeCalcium: 0
  IncludeIron: 0
  NREF_XH_const: 0.75
  NREF_mu_const: 1.24
  NREF_column_density_min_cgs: 3.086e+15
  NREF_column_density_max_cgs: 1e+24
  NREF_trans_temperature_min_K: 10000
  NREF_trans_temperature_max_K: 100000
  NREF_trans_steepness_k: 2
  NREF_column_length_max_kpc: 50
  CR_rate_at_transition_cgs: 2e-16
  CR_transition_column_density_cgs: 1e+21
  CR_powerlaw_slope_1: 1.4
  CR_powerlaw_slope_2: 0
  CR_cutoff_over_density: 100
  CR_cutoff_phys_density_cgs: 0.01
  CR_cutoff_width_dex: 1
  CR_cutoff_steepness_k: 2
  ISRF_norm_at_transition: 19
  ISRF_transition_column_density_cgs: 1e+22
  ISRF_powerlaw_slope_1: 1.4
  ISRF_powerlaw_slope_2: 0
  ISRF_cutoff_over_density: 100
  ISRF_cutoff_phys_density_cgs: 0.01
  ISRF_cutoff_width_dex: 1
  ISRF_cutoff_steepness_k: 2
  LSHmax_lowz_kpc: 50
  LSHmax_highz_kpc: 10
  LSHmax_transition_redshift: 7
  LSHmax_transition_width_dz: 0.2
  LSHmax_transition_steepness_k: 100

COLIBREFeedback:
  HIIregion_ionization_fraction: 1.0
  HIIregion_temperature_K:       1.e4

# Parameters for the COLIBRE "equation of state"
COLIBREEntropyFloor:
  Jeans_density_norm_H_p_cm3: 0.1        # Physical density above which the COLIBRE Jeans limiter entropy floor kicks in expressed in Hydrogen atoms per cm^3.
  Jeans_temperature_norm_K:   10.        # Temperature of the COLIBRE Jeans limiter entropy floor at the density normalisation expressed in Kelvin.
  Jeans_gamma_effective:      1.3333333  # Slope the of the COLIBRE Jeans limiter entropy floor
  Cool_density_norm_H_p_cm3:  1e-5       # Physical density above which the COLIBRE Cool limiter entropy floor kicks in expressed in Hydrogen atoms per cm^3.
  Cool_temperature_norm_K:    -1.        # Temperature of the COLIBRE Cool limiter entropy floor at the density normalisation expressed in Kelvin.
  Cool_gamma_effective:       1.         # Slope the of the COLIBRE Cool limiter entropy floor


# Quick Lyman-alpha cooling (EAGLE with fixed primoridal Z)
QLACooling:
  dir_name:                ./coolingtables/ # Location of the cooling tables
  H_reion_z:               11.5              # Redshift of Hydrogen re-ionization (Planck 2018)
  H_reion_eV_p_H:          2.0
  He_reion_z_centre:       3.5               # Redshift of the centre of the Helium re-ionization Gaussian
  He_reion_z_sigma:        0.5               # Spread in redshift of the  Helium re-ionization Gaussian
  He_reion_eV_p_H:         2.0               # Energy inject by Helium re-ionization in electron-volt per Hydrogen atom
  rapid_cooling_threshold: 0.333333          # Switch to rapid cooling regime for dt / t_cool above this threshold.
  
# Quick Lyman-alpha star formation parameters
QLAStarFormation:
  over_density:              1000      # The over-density above which gas particles turn into stars.
  
# Parameters for the Quick Lyman-alpha floor
QLAEntropyFloor:
  density_threshold_H_p_cm3: 0.1       # Physical density above which the entropy floor kicks in expressed in Hydrogen atoms per cm^3.
  over_density_threshold:    10.       # Overdensity above which the entropy floor can kick in.
  temperature_norm_K:        8000      # Temperature of the entropy floor at the density threshold expressed in Kelvin.

