pisces.models.galaxy_clusters.spherical.SphericalGalaxyClusterModel.from_temperature_and_density#

classmethod SphericalGalaxyClusterModel.from_temperature_and_density(density_profile: BaseSphericalDensityProfile, temperature_profile: BaseSphericalTemperatureProfile, filename: str | Path, min_radius: unyt_quantity | str = unyt_quantity(1, 'kpc'), max_radius: unyt_quantity | str = unyt_quantity(1, 'Mpc'), num_points: int = 1000, overwrite: bool = False, stellar_density_profile: BaseSphericalDensityProfile = None, **kwargs)[source]#

Generate a spherical galaxy cluster model from gas density and temperature profiles.

Parameters:
  • density_profile (BaseSphericalDensityProfile) – Profile object representing the radial gas density.

  • temperature_profile (BaseSphericalTemperatureProfile) – Profile object representing the radial gas temperature.

  • filename (str or Path) – Output HDF5 file path.

  • min_radius (unyt_quantity or str, optional) – Minimum radius for sampling (default: 1 kpc).

  • max_radius (unyt_quantity or str, optional) – Maximum radius for sampling (default: 1 Mpc).

  • num_points (int, optional) – Number of radial samples (default: 1000).

  • overwrite (bool, optional) – Whether to overwrite existing file (default: False).

  • stellar_density_profile (BaseSphericalDensityProfile, optional) – Optional stellar density profile. If provided, the stellar density will be included in the model. Otherwise, the stellar density is assumed to be zero and no stellar component is included.

  • **kwargs – Additional keyword arguments for radial grid construction (e.g., spacing).

Notes

Given \(T(r)\) and \(\rho_{\mathrm{gas}}(r)\), we compute:

  1. Pressure from the ideal gas law:

\[P(r) = \rho_{\mathrm{gas}}(r) \cdot T(r) / (\mu m_p)\]
  1. Gravitational field via hydrostatic equilibrium:

\[g(r) = -\frac{1}{\rho_{\mathrm{gas}}(r)} \cdot \frac{dP}{dr}\]
  1. Total mass profile:

\[M_{\mathrm{tot}}(<r) = \frac{r^2 \cdot g(r)}{G}\]
  1. Derive \(\rho_{\mathrm{tot}}(r)\) via:

\[\rho_{\mathrm{tot}}(r) = \frac{1}{4\pi r^2} \frac{dM_{\mathrm{tot}}}{dr}\]