# 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]

NAME:

__init__

PURPOSE:

initialize a homogeneous sphere potential

INPUT:

amp= amplitude to be applied to the potential (default: 1); can be a Quantity with units of mass density or Gxmass density

R= size of the sphere (can be Quantity)

normalize= 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=, vo= distance and velocity scales for translation into internal units (default from configuration file)

OUTPUT:

(none)

HISTORY:

2019-12-20 - Written - Bovy (UofT)