Simulation Parameters

You can access the parameters of the simulation any dataset is drawn from with opencosmo.Dataset.simulation. All datasets regardless of simulation will have the parameters in opencosmo.parameters.SimulationParameters. Hydrodynamic simulations will additionally contain the parameters in opencosmo.parameters.SubgridParameters

class opencosmo.parameters.SimulationParameters(*, box_size, z_ini, z_end, n_gravity, n_steps, pm_grid, offset_gravity_ini, cosmology_parameters)
Parameters:
  • box_size (float)

  • z_ini (float)

  • z_end (float)

  • n_gravity (int | None)

  • n_steps (int)

  • pm_grid (int)

  • offset_gravity_ini (float | None)

  • cosmology_parameters (CosmologyParameters)

field box_size: float [Required]

Size of the simulation box (Mpc/h)

Constraints:
  • ge = 0

field z_ini: float [Required]

Initial redshift of the simulation

Constraints:
  • ge = 0.01

field z_end: float [Required]

Final redshift of the simulation

Constraints:
  • ge = 0.0

field n_gravity: int | None [Required]

Number of gravity-only particles (per dimension). In hydrodynamic simulations, this parameter will be replaced with “n_dm”

Constraints:
  • ge = 2

field n_steps: int [Required]

Number of time steps

Constraints:
  • ge = 1

field pm_grid: int [Required]

Number of grid points (per dimension)

Constraints:
  • ge = 2

field offset_gravity_ini: float | None [Required]

Lagrangian offset for gravity-only particles

property step_zs: list[float]

Get the redshift of the steps in this simulation. Outputs such that redshift[step_number] returns the redshift for that step. Keep in mind that steps go from high z -> low z.

class opencosmo.parameters.HydroSimulationParameters(*, box_size, z_ini, z_end, n_gravity, n_steps, pm_grid, offset_gravity_ini, cosmology_parameters, n_bar, n_dm, offset_bar_ini, offset_dm_ini, subgrid_parameters)
Parameters:
  • box_size (Annotated[float, Ge(ge=0)])

  • z_ini (Annotated[float, Ge(ge=0.01)])

  • z_end (Annotated[float, Ge(ge=0)])

  • n_gravity (Annotated[int | None, Ge(ge=2)])

  • n_steps (Annotated[int, Ge(ge=1)])

  • pm_grid (Annotated[int, Ge(ge=2)])

  • offset_gravity_ini (float | None)

  • cosmology_parameters (CosmologyParameters)

  • n_bar (int)

  • n_dm (Annotated[int, Ge(ge=2)])

  • offset_bar_ini (float)

  • offset_dm_ini (float)

  • subgrid_parameters (SubgridParameters)

field n_gas: int [Required] (alias 'n_bar')

Number of gas particles (per dimension)

field n_dm: int [Required]

Number of dark matter particles (per dimension)

Constraints:
  • ge = 2

field offset_gas_ini: float [Required] (alias 'offset_bar_ini')

Lagrangian offset for gas particles

field offset_dm_ini: float [Required]

Lagrangian offset for dark matter particles

field subgrid_parameters: SubgridParameters [Required]

Parameters for subgrid hydrodynamic physics

class opencosmo.parameters.SubgridParameters(*, subgrid_agn_kinetic_eps, subgrid_agn_kinetic_jet_vel, subgrid_agn_nperh, subgrid_agn_seed_mass, subgrid_wind_egy_w, subgrid_wind_kappa_w)
Parameters:
  • subgrid_agn_kinetic_eps (float)

  • subgrid_agn_kinetic_jet_vel (float)

  • subgrid_agn_nperh (float)

  • subgrid_agn_seed_mass (float)

  • subgrid_wind_egy_w (float)

  • subgrid_wind_kappa_w (float)

field agn_kinetic_eps: float [Required] (alias 'subgrid_agn_kinetic_eps')

AGN feedback efficiency

field agn_kinetic_jet_vel: float [Required] (alias 'subgrid_agn_kinetic_jet_vel')

AGN feedback velocity

field agn_nperh: float [Required] (alias 'subgrid_agn_nperh')

AGN sphere of influence

field agn_seed_mass: float [Required] (alias 'subgrid_agn_seed_mass')

AGN seed mass (Msun / h)

field wind_egy_w: float [Required] (alias 'subgrid_wind_egy_w')

Wind mass loading factor

field wind_kappa_w: float [Required] (alias 'subgrid_wind_kappa_w')

Wind velocity