fiesta.arepo.ArepoVoronoiGrid#

class fiesta.arepo.ArepoVoronoiGrid(file_path, io_flags=None, verbose=False)[source]#

Class to deal with AREPO snapshosts in the form of native unstructured meshes.

Variables:
  • data (dict) – Dictionary containing all the data in the snapshot (partly redundant in lieu of other variables).

  • header (dict) – Dictionary containing all the information in the header of the snapshot (partly redundant in lieu of other variables).

  • size (Quantity) – Size of simulation box along one axis where size**3 encompasses the whole 3D simulation.

  • time (Quantity) – Time corresponding to the snapshot.

  • ntot (int) – Total number of particles.

  • ngas (int) – Number of gas particles.

  • nsink (int) – Number of sink particles.

  • gas_ids (ndarray) – 1D array of indices corresponding to gas particles.

  • sink_ids (ndarray) – 1D array of indices corresponding to sink particles.

  • pos (Quantity) – 1D array of position of all particles.

  • vel (Quantity) – 1D array of velocities of all particles.

  • mass (Quantity) – 1D array of mass of all particles.

  • chem (Quantity) – 1D array of fractional chemical abundances of all particles.

  • rho (Quantity) – 1D array of mass density of gas particles.

  • utherm (Quantity) – 1D array of thermal energy per unit mass of all particles.

Parameters:
  • file_path (str) – File path of the AREPO snapshot.

  • io_flags (dict, optional) – Dictionary of input/output flags for reading the file. If None (default), it is set to: io_flags = {'mc_tracer' : False, 'time_steps' : False, 'sgchem' : True, 'variable_metallicity': False, 'sgchem_NL99' : False}.

  • verbose (bool, optional) – If True, prints output during file reading. Default value is False.

ArepoVoronoiGrid.get_chem()

Returns chem.

ArepoVoronoiGrid.get_gas_ids()

Returns gas_ids.

ArepoVoronoiGrid.get_mass([unit])

Returns mass.

ArepoVoronoiGrid.get_ndensity([unit])

Returns the number density of gas particles.

ArepoVoronoiGrid.get_ngas()

Returns ngas.

ArepoVoronoiGrid.get_nsink()

Returns nsink.

ArepoVoronoiGrid.get_ntot()

Returns ntot.

ArepoVoronoiGrid.get_pos([unit])

Returns pos.

ArepoVoronoiGrid.get_rho([unit])

Returns rho.

ArepoVoronoiGrid.get_sink_ids()

Returns sink_ids.

ArepoVoronoiGrid.get_size([unit])

Returns size.

ArepoVoronoiGrid.get_temperature([unit])

Returns the temperature of all particles.

ArepoVoronoiGrid.get_time([unit])

Returns time.

ArepoVoronoiGrid.get_utherm([unit])

Returns utherm.

ArepoVoronoiGrid.get_vel([unit])

Returns vel.

ArepoVoronoiGrid.plot_projection([...])

Plot mass-weighted 2d histogram of the snapshot projected along an axis.

ArepoVoronoiGrid.write_file(file_path[, ...])

Write out an AREPO snapshot file.