Homogeneous sphere potential¶
- class galpy.potential.HomogeneousSpherePotential(amp=1.0, R=1.1, normalize=False, ro=None, vo=None)[source]¶
Class that implements the homogeneous sphere potential for \(\rho(r) = \rho_0 = \mathrm{constant}\) for all \(r < R\) and zero otherwise. The potential is given by
\[\begin{split}\Phi(r) = \mathrm{amp}\times\left\{\begin{array}{lr} (r^2-3R^2), & \text{for } r < R\\ -\frac{2R^3}{r} & \text{for } r \geq R \end{array}\right.\end{split}\]We have that \(\rho_0 = 3\,\mathrm{amp}/[2\pi G]\).
- __init__(amp=1.0, R=1.1, normalize=False, ro=None, vo=None)[source]¶
Initialize a homogeneous sphere potential.
- Parameters:
amp (float or Quantity, optional) – Amplitude to be applied to the potential. Can be a Quantity with units of mass density or Gxmass density.
R (float or Quantity, optional) – Size of the sphere.
normalize (bool or float, optional) – If True, normalize such that vc(1.,0.)=1., or, if given as a number, such that the force is this fraction of the force necessary to make vc(1.,0.)=1.
ro (float or Quantity, optional) – Distance scale for translation into internal units (default from configuration file).
vo (float or Quantity, optional) – Velocity scale for translation into internal units (default from configuration file).
Notes
2019-12-20 - Written - Bovy (UofT)