Potential (galpy.potential)¶
3D potentials¶
General instance routines¶
Use as Potential-instance.method(...)
- __add__
- __mul__
- __call__
- dens
- dvcircdR
- epifreq
- flattening
- LcE
- lindbladR
- mass
- nemo_accname
- nemo_accpars
- omegac
- phitorque
- phizderiv
- phi2deriv
- plot
- plotDensity
- plotEscapecurve
- plotRotcurve
- plotSurfaceDensity
- R2deriv
- r2deriv
- rE
- Rzderiv
- Rforce
- rforce
- rhalf
- rl
- Rphideriv
- rtide
- surfdens
- tdyn
- toPlanar
- toVertical
- ttensor
- turn_physical_off
- turn_physical_on
- vcirc
- verticalfreq
- vesc
- vterm
- z2deriv
- zforce
- zvc
- zvc_range
In addition to these, the NFWPotential also has methods to calculate virial quantities
General 3D potential routines¶
Use as method(...)
- dvcircdR
- epifreq
- evaluateDensities
- evaluatephitorques
- evaluatePotentials
- evaluatephizderivs
- evaluatephi2derivs
- evaluateRphiderivs
- evaluateR2derivs
- evaluater2derivs
- evaluateRzderivs
- evaluateRforces
- evaluaterforces
- evaluateSurfaceDensities
- evaluatez2derivs
- evaluatezforces
- flatten
- flattening
- LcE
- lindbladR
- mass
- nemo_accname
- nemo_accpars
- omegac
- plotDensities
- plotEscapecurve
- plotPotentials
- plotRotcurve
- plotSurfaceDensities
- rE
- rhalf
- rl
- rtide
- tdyn
- to_amuse
- ttensor
- turn_physical_off
- turn_physical_on
- vcirc
- verticalfreq
- vesc
- vterm
- zvc
- zvc_range
In addition to these, the following methods are available to compute expansion coefficients for the SCFPotential class for a given density
Specific potentials¶
All of the following potentials can also be modified by the specific WrapperPotentials listed below.
Spherical potentials¶
Spherical potentials in galpy can be implemented in two ways: a)
directly by inheriting from Potential and implementing the usual
methods (_evaluate, _Rforce, etc.) or b) by inheriting from
the general SphericalPotential class and
implementing the functions _revaluate(self,r,t=0.),
_rforce(self,r,t=0.), _r2deriv(self,r,t=0.), and
_rdens(self,r,t=0.) that evaluate the potential, radial force,
(minus the) radial force derivative, and density as a function of the
(here natural) spherical radius. For adding a C implementation when
using method b), follow similar steps in C (use
interpSphericalPotential as an example to follow). For historical
reasons, most spherical potentials in galpy are directly
implemented (option a above), but for new spherical potentials it is
typically easier to follow option b).
Additional spherical potentials can be obtained by setting the axis ratios equal for the triaxial potentials listed in the section on ellipsoidal triaxial potentials below.
- Arbitrary spherical density potential
- Burkert potential
- Double power-law density spherical potential
- Spherical Cored Dehnen potential
- Spherical Dehnen potential
- Einasto potential
- Hernquist potential
- Homogeneous sphere potential
- Interpolated spherical potential
- Isochrone potential
- Jaffe potential
- Kepler potential
- King potential
- NFW potential
- Plummer potential
- Power-law density spherical potential
- Power-law density spherical potential with an exponential cut-off
- Pseudo-isothermal potential
- Spherical Shell Potential
Axisymmetric potentials¶
Additional axisymmetric potentials can be obtained by setting the x/y axis ratio equal to 1 for the triaxial potentials listed in the section on ellipsoidal triaxial potentials below.
- Arbitrary razor-thin, axisymmetric potential
- Double exponential disk potential
- Flattened Power-law potential
- Interpolated axisymmetric potential
- Interpolated SnapshotRZ potential
- Kuzmin disk potential
- Kuzmin-Kutuzov Staeckel potential
- Logarithmic halo potential
- Miyamoto-Nagai potential
- Three Miyamoto-Nagai disk approximation to an exponential disk
- Razor-thin exponential disk potential
- Ring potential
- Axisymmetrized N-body snapshot potential
Ellipsoidal triaxial potentials¶
galpy has very general support for implementing triaxial (or the
oblate and prolate special cases) of ellipsoidal potentials through
the general EllipsoidalPotential class. These
potentials have densities that are uniform on ellipsoids, thus only
functions of \(m^2 = x^2 + \frac{y^2}{b^2}+\frac{z^2}{c^2}\). New
potentials of this type can be implemented by inheriting from this
class and implementing the _mdens(self,m), _psi(self,m), and
_mdens_deriv functions for the density, its integral with respect
to \(m^2\), and its derivative with respect to m,
respectively. For adding a C implementation, follow similar steps (use
PerfectEllipsoidPotential as an example to follow).
Note that the Ferrers potential listed below is a potential of this
type, but it is currently not implemented using the
EllipsoidalPotential class. Further note that these potentials can
all be rotated in 3D using the zvec and pa keywords; however,
more general support for the same behavior is available through the
RotateAndTiltWrapperPotential discussed below and the internal
zvec/pa keywords will likely be deprecated in a future
version.
Spiral, bar, other triaxial, and miscellaneous potentials¶
All galpy potentials can also be made to rotate using the SolidBodyRotationWrapperPotential listed in the section on wrapper potentials below.
General Poisson solvers for disks and halos¶
Dissipative forces¶
Fictitious forces in non-inertial frames¶
Helper classes¶
2D potentials¶
General instance routines¶
Use as Potential-instance.method(...)
General axisymmetric potential instance routines¶
Use as Potential-instance.method(...)
General 2D potential routines¶
Use as method(...)
Specific potentials¶
All of the 3D potentials above can be used as two-dimensional potentials in the mid-plane.
In addition, a two-dimensional bar potential, two spiral potentials, the Henon & Heiles (1964) potential, and some static non-axisymmetric perturbations are included
1D potentials¶
General instance routines¶
Use as Potential-instance.method(...)
General 1D potential routines¶
Use as method(...)
Specific potentials¶
One-dimensional potentials can also be derived from 3D axisymmetric potentials as the vertical potential at a certain Galactocentric radius
Potential wrappers¶
Gravitational potentials in galpy can also be modified using wrappers, for example, to change their amplitude as a function of time. These wrappers can be applied to any galpy potential (although whether they can be used in C depends on whether the wrapper and all of the potentials that it wraps are implemented in C). Multiple wrappers can be applied to the same potential.
Specific wrappers¶
- Adiabatic contraction wrapper potential
- Any time-dependent amplitude wrapper potential
- Corotating rotation wrapper potential
- Cylindrically-separable wrapper potential
- Dehnen-like smoothing wrapper potential
- Gaussian-modulated amplitude wrapper potential
- Kuzmin-like wrapper potential
- Oblate Staeckel wrapper potential
- Solid-body rotation wrapper potential
- Rotate-and-tilt wrapper potential