model.ClusterModel.set_magnetic_field_from_density#

ClusterModel.set_magnetic_field_from_density(B0, eta=0.6666666666666666, gaussian=True)[source]#

Set a magnetic field radial profile assuming it is proportional to some power of the density, usually 2/3. The field can be set in Gaussian or Lorentz-Heaviside (dimensionless) units.

Parameters:
  • B0 (float) – The central magnetic field strength in units of gauss.

  • eta (float, optional) – The power of the density which the field is proportional to. Default: 2/3.

  • gaussian (boolean, optional) – Set the field in Gaussian units such that p_B = B^2/(8*pi), otherwise p_B = B^2/2. Default: True