pisces.physics.virialization.eddington.compute_relative_potential#

pisces.physics.virialization.eddington.compute_relative_potential(gravitational_potential: unyt_array, boundary_value: unyt_quantity = unyt_quantity(0, 'km**2/s**2')) unyt_array[source]#

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

The relative potential is defined as:

\[\Psi(r) = -\left[\Phi(r) - \Phi_0\right],\]

where \(\Phi(r)\) is the gravitational potential and \(\Phi_0\) is the potential at the chosen boundary (often at infinity).

Parameters:
  • gravitational_potential (unyt_array) – The 1D gravitational potential profile \(\Phi(r)\), with units of velocity squared.

  • boundary_value (unyt_quantity, optional) – The potential at the boundary, \(\Phi_0\). This is typically set to zero, but may be chosen differently depending on the problem. Default is 0.

Returns:

The relative potential \(\Psi(r)\), with the same shape and units as the input.

Return type:

unyt_array