# Define the system of units to use internally.
InternalUnitSystem:
  UnitMass_in_cgs:     1.9891E43       # 10^10 solar masses 
  UnitLength_in_cgs:   3.08567758E21   # 1 kpc 
  UnitVelocity_in_cgs: 1E5   # km/s
  UnitCurrent_in_cgs:  1   # Amperes
  UnitTemp_in_cgs:     1   # Kelvin

# Parameters governing the time integration (Set dt_min and dt_max to the same value for a fixed time-step run.)
TimeIntegration:
  time_begin:        0.     # The starting time of the simulation (in internal units).
  time_end:          0.05115  # The end time of the simulation (in internal units).
  dt_min:            1e-15  # The minimal time-step size of the simulation (in internal units).
  dt_max:            0.5e-3 # The maximal time-step size of the simulation (in internal units).

Gravity:
  eta: 0.025
  MAC: geometric
  theta_cr: 0.6
  mesh_side_length: 32
  max_physical_baryon_softening: 0.2

# Parameters governing the snapshots
Snapshots:
  basename:   output      # Common part of the name of output files
  time_first: 0.          # (Optional) Time of the first output if non-cosmological time-integration (in internal units)
  delta_time: 0.00025575  # Time difference between consecutive outputs (in internal units) 0.01023 TU = 10 Myr

# Parameters governing the conserved quantities statistics
Statistics:
  delta_time:           1e-3     # Time between statistics output
  time_first:           0.       # (Optional) Time of the first stats output if non-cosmological time-integration (in internal units)

# Parameters related to the initial conditions
InitialConditions:
  file_name:               ./example_32_1.0e+04.hdf5 # The file to read
  periodic:                1        # Are we running with periodic ICs?
  
# 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.
  h_min_ratio:              0.1      # Minimal smoothing in units of softening.
  h_max:                    0.3
  minimal_temperature:      10000 # K 
  H_ionization_temperature: 1000 # K
  H_mass_fraction: 0.737


# Standard COLIBRE cooling options
COLIBRECooling:
  dir_name:                ./UV_dust1_CR1_G1_shield1.hdf5 # Location of the cooling tables
  H_reion_z:               11.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
  HIIregion_ionization_fraction:    1.0             # Ionization fraction for gas particles tagged as HII regions (between 0.5 and 1.)
  HIIregion_temperature_K:          1.e4            # Temperature of gas particles tagged as HII regions
  delta_logTEOS_subgrid_properties:     0.2    # delta log T above the EOS below which the subgrid properties use Teq assumption
  rapid_cooling_threshold:          1.0      # Switch to rapid cooling regime for dt / t_cool above this threshold.

# Solar abundances
COLIBREChemistry:
  init_abundance_metal:     0.0133714      # Inital fraction of particle mass in *all* metals 
  init_abundance_Hydrogen:  0.73738788833  # Inital fraction of particle mass in Hydrogen
  init_abundance_Helium:    0.24924186942  # Inital fraction of particle mass in Helium
  init_abundance_Carbon:    0.0023647215   # Inital fraction of particle mass in Carbon
  init_abundance_Nitrogen:  0.0006928991   # Inital fraction of particle mass in Nitrogen
  init_abundance_Oxygen:    0.00573271036  # Inital fraction of particle mass in Oxygen
  init_abundance_Neon:      0.00125649278  # Inital fraction of particle mass in Neon
  init_abundance_Magnesium: 0.00070797838  # Inital fraction of particle mass in Magnesium
  init_abundance_Silicon:   0.00066495154  # Inital fraction of particle mass in Silicon
  init_abundance_Iron:      0.00129199252  # Inital fraction of particle mass in Iron
  init_abundance_Europium:  0.0            # Inital fraction of particle mass in Europium
  metal_diffusion_constant:         0.01           # Metal diffusion constant (Smagorinsky constant)
  metal_diffusion_timestep_mult:    0.2            # Run-time parameter to control the time-step condition based on the diffusion rate.

# Feedback parameter
COLIBREFeedback:
  HIIregion_ionization_fraction:    1.0             # Ionization fraction for gas particles tagged as HII regions (between 0.5 and 1.)
  HIIregion_temperature_K:          1.e4            # Temperature of gas particles tagged as HII regions
  HIIregion_rebuild_dt_Myr:         2.0             # Time between rebuilding the HII region in Myr 
 
# 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.0  # 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

COLIBREAGN:
  use_subgrid_mass_from_ics:          0          # Use subgrid masses specified in ICs [1, default], or initialise them to particle masses [0]?
  subgrid_seed_mass_Msun:             1e5        # Black hole subgrid mass at creation time in solar masses.
  use_multi_phase_bondi:              0          # Compute Bondi rates per neighbour particle [1] or for the smoothed ambient gas around the black hole [0]?
  use_subgrid_gas_properties:         0          # Use subgrid density [1] or dynamical density [0] to calculate BH accretion rates?
  use_krumholz:                       1          # Use Krumholz et al. (2006) [1] or standard Bondi-Hoyle-Lyttleton formula [0] for black hole accretion rates? Only used if multi_phase_bondi is 0.
  with_krumholz_vorticity:            1          # Include the vorticity term in Krumholz et al. formula? Only used if use_multi_phase_bondi is 0.
  with_angmom_limiter:                0          # Are we applying the Rosas-Guevara (2015) viscous time-scale reduction term?
  with_boost_factor:                  0          # Are we using the model from Booth, Schaye (2009)?
  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_cm3:                 0.1        # Normalization of the power law for the Booth Schaye 2009 model in cgs (cm^-3).
  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.
  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:     1e1        # Minimum mass for a gas particle to be nibbled from [M_Sun]. Only used if use_nibbling is 1.
  coupling_efficiency:                0.1        # Fraction of the radiated energy that couples to the gas in feedback events.
  AGN_delta_T_K:                      3.16228e6  # Change in temperature to apply to the gas particle in an AGN feedback event in Kelvin.
  AGN_num_ngb_to_heat:                1.         # Target number of gas neighbours to heat in an AGN feedback event.
  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: 0          # Should we only reposition to particles that move slowly w.r.t. the black hole?
  set_reposition_speed:               0          # Should we reposition black holes with (at most) a prescribed speed towards the potential minimum?
  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:              2          # Type of velocity threshold for BH mergers (0: v_circ at kernel edge, 1: v_esc at actual distance, with softening, 2: v_esc at actual distance, no softening).
  merger_max_distance_ratio:          3.0        # Maximal distance over which two BHs can merge, in units of the softening length.
  AGN_use_deterministic_feedback:     1          # Deterministic (1) or stochastic (0) AGN feedback model
  AGN_feedback_model:                 Isotropic  # AGN feedback model (Isotropic or MinimumDistance)
  minimum_timestep_yr:                100.0      # Minimum time-step of black-hole particles

Scheduler:
  tasks_per_cell: 200
