# Define the system of units to use internally. 
InternalUnitSystem:
  UnitMass_in_cgs:     1.98841586e+43   # Grams
  UnitLength_in_cgs:   3.08567758e+24   # Centimeters
  UnitVelocity_in_cgs: 100000.0   # Centimeters per second
  UnitCurrent_in_cgs:  1   # Amperes
  UnitTemp_in_cgs:     1   # Kelvin

# Parameters governing the time integration
TimeIntegration:
  time_begin: 0.    # The starting time of the simulation (in internal units).
  time_end:   1e-4  # The end time of the simulation (in internal units).
  dt_min:     1e-9  # The minimal time-step size of the simulation (in internal units).
  dt_max:     1e-4  # The maximal time-step size of the simulation (in internal units).

# Parameters governing the snapshots
Snapshots:
  basename:            feedback # Common part of the name of output files
  time_first:          0.    # Time of the first output (in internal units)
  delta_time:          1e-5  # Time difference between consecutive outputs (in internal units)
  compression:         1
 
# Parameters governing the conserved quantities statistics
Statistics:
  delta_time:          1e-6 # Time between statistics output

# 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.0

# Parameters related to the initial conditions
InitialConditions:
  file_name:                    ./feedback.hdf5          
  periodic:                     1
  cleanup_smoothing_lengths:    1


# Dimensionless pre-factor for the time-step condition
LambdaCooling:
  lambda_nH2_cgs:              1e-22 # Cooling rate divided by square Hydrogen number density (in cgs units [erg * s^-1 * cm^3])
  cooling_tstep_mult:          1.0        # Dimensionless pre-factor for the time-step condition

# Cooling with Grackle 2.0
GrackleCooling:
  cloudy_table: CloudyData_UVB=HM2012.h5 # Name of the Cloudy Table (available on the grackle bitbucket repository)
  with_UV_background: 0 # Enable or not the UV background
  redshift: 0 # 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
  max_steps: 1000
  convergence_limit: 1e-2
  thermal_time_myr: 5                          # (optional) Time (in Myr) for adiabatic cooling after a feedback event.
  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.
  
GearChemistry:
  initial_metallicity: 0.01295

EAGLEChemistry:              # Solar abundances
  init_abundance_metal:      0.014
  init_abundance_Hydrogen:   0.70649785
  init_abundance_Helium:     0.28055534
  init_abundance_Carbon:     2.0665436e-3
  init_abundance_Nitrogen:   8.3562563e-4
  init_abundance_Oxygen:     5.4926244e-3
  init_abundance_Neon:       1.4144605e-3
  init_abundance_Magnesium:  5.907064e-4
  init_abundance_Silicon:    6.825874e-4
  init_abundance_Iron:       1.1032152e-3

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

