MetaData:
  run_name: AGORA cosmo

InternalUnitSystem:
  UnitMass_in_cgs: 1.988409870698051e+43       # 1e10 solar masses
  UnitLength_in_cgs: 3.0856775814913673e+21    # 1 kpc
  UnitVelocity_in_cgs: 1e5                     # km/s
  UnitCurrent_in_cgs: 1                        # Amperes
  UnitTemp_in_cgs: 1                           # Kelvin

Restarts:
  enable: 1
  delta_hours: 6                         # Dump a restart each X hours
  max_run_time: 71.0                     # Three days minus 30 minutes
  onexit: 1                              # Dump a restart on exit

Scheduler:
  cell_split_size: 200
  max_top_level_cells: 64

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

# 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_lambda:   0.728        # Dark-energy density parameter
  Omega_cdm:      0.2265       # Cold Dark Matter 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.

TimeIntegration:
  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:            agora_cosmo     # Common part of the name of output files
  scale_factor_first: 0.00990099       # (Optional) Time of the first output if non-cosmological time-integration (in internal units)
  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)
  compression:         9

Statistics:
  delta_time: 1.001                    # Time between statistics output
  time_first: 0.00990099               # (Optional) Time of the first stats output if non-cosmological time-integration (in internal units)

# Parameters for the self-gravity scheme
Gravity:
  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.
  eta: 0.025                                # Constant dimensionless multiplier for time integration.
  mesh_side_length: 256
  comoving_DM_softening: 0.8                # Comoving softening length (in internal units).
  max_physical_DM_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.
  comoving_baryon_softening:     0.8        # Comoving softening length (in internal units).
  max_physical_baryon_softening: 0.08       # Physical 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).
  CFL_condition:         0.1      # Courant-Friedrich-Levy condition for time integration.
  minimal_temperature:   10.      # Kelvin
  h_min_ratio:           0.129099 # (Optional) Minimal allowed smoothing length in units of the softening. Defaults to 0 if unspecified.
  h_max:                 200      # (Optional) Maximal allowed smoothing length in internal units. Defaults to FLT_MAX if unspecified.
  initial_temperature: 172.48     # Given in the output of music

# Cooling with Grackle 3.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_mode: agora        # default or agora
  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:   1.0    # 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_Ia_energy_erg: 1e51                           # Energy released by a single supernova.
  supernovae_efficiency: 4.5                               # Supernovae energy efficiency, used for both SNIa and SNII. The energy released effectively is E_sn = supernovae_efficiency*E_sn
  yields_table: POPIIsw.h5                                 # Table containing the yields of the first stars.
  discrete_yields: 1                                       # Should we use discrete yields or the IMF integrated one?
  imf_transition_metallicity: 0                            # Maximal metallicity ([Fe/H]) for a first star (0 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
