pisces.physics.virialization.eddington#

Eddington formula module for isotropic spherical systems.

This module implements numerical routines for computing and sampling from the isotropic distribution function \(f(\mathcal{E})\) in spherically symmetric, non-rotating systems using the Eddington inversion formula.

The Eddington formula [1] allows one to derive the distribution function from a known density profile \(\rho(r)\) and gravitational potential \(\Phi(r)\), assuming isotropy in velocity space. The central result is:

\[f(\mathcal{E}) = \frac{1}{\sqrt{8}\pi^2} \frac{d}{d\mathcal{E}} \int_0^{\mathcal{E}} \frac{1}{\sqrt{\mathcal{E}-\Psi}} \frac{d\rho}{d\Psi} \, d\Psi,\]

where:

  • \(f(\mathcal{E})\) is the phase-space distribution function,

  • \(\mathcal{E}\) is the relative energy,

  • \(\Psi(r) = -[\Phi(r) - \Phi_0]\) is the relative potential.

This formulation assumes ergodicity (i.e., that the distribution depends only on energy), which is valid in collisionless equilibrium systems where the phase-space distribution is a function of energy alone.

Available features#

  • Compute relative potential \(\Psi(r)\) from the gravitational potential.

  • Compute relative energy \(\mathcal{E}\) from total energy values.

  • Evaluate the isotropic distribution function \(f(\mathcal{E})\) numerically.

  • Sample 3D Cartesian velocities for particles drawn from \(f(\mathcal{E})\) using rejection sampling accelerated with Cython.

All units are handled using unyt, and the inputs must be appropriately shaped and ordered (e.g., increasing radius/potential). The numerical integration uses spline interpolation for stability and smoothness.

References

Functions

compute_eddington_distribution(density, ...)

Compute the isotropic Eddington distribution function from a given species density and gravitational potential.

compute_relative_energy(energy[, boundary_value])

Compute the relative energy \(\mathcal{E}\) from the total energy.

compute_relative_potential(...[, boundary_value])

Compute the relative potential from a 1D gravitational potential profile.

sample_eddington_velocities(...)

Sample 3D Cartesian velocities for particles based on an isotropic Eddington distribution function.