vcdisk.vcdisk_offplane¶
- vcdisk.vcdisk_offplane(rad, zs, rho_rz)¶
Circular velocity off the mid plane of a thick disk.
This uses Eq. (27)-(28) of [Cuddeford93] to compute the gravitational potential, and the circular velocity, at any position \((R,z)\) of thick disk of arbitrary density.
- Parameters
rad (list or numpy.ndarray) – array of radii in \(\rm kpc\).
zs (list or numpy.ndarray) – array of height above the plane in \(\rm kpc\).
rho_rz (list or numpy.ndarray) – array of surface densities in \(\rm M_\odot / kpc^2\). Its shape must be
rho_rz.shape == (len(zs), len(rad)). If the array is sampled from a functionrho(R,z), then this can be obtained withrho_rz = rho(rad, z[:, None]).
- Returns
array of \(V_{\rm disk}\) velocities in \(\rm km/s\).
- Return type
See also
Warning
This function is not as accurate as
vcdisk.vcdisk()on the disk plane and it is currently under development.Notes¶
This routine solves the integral in Eq. (27) of [Cuddeford93] to evaluate the gravitational potential of a thick disk galaxy
\[\Phi(R,z) = -\frac{2G}{\sqrt{R}} \int_{-\infty}^\infty {\rm d}l \int_0^\infty {\rm d}u\,\sqrt{u}\rho(u,l)\,Q_{-1/2}(x),\]where \(Q_\lambda\) is the Legendre function and
\[x = \frac{R^2+u^2+(z-l)^2}{2Ru}.\]From Eq. (560.01) in [ByrdFriedman71] we know that \(Q_{-1/2}(x) = y\,\mathcal{K}(y)\), where \(\mathcal{K}\) is the complete elliptic integral of the first kind and
\[y^2 = \frac{2}{1+x} = \frac{4Ru}{R^2+u^2+2Ru+(z-l)^2}.\]Thus we can write the potential as
\[\Phi(R,z) = -\frac{2G}{\sqrt{R}} \int_{-\infty}^\infty {\rm d}l \int_0^\infty {\rm d}u\,\sqrt{u}\rho(u,l)\,y\,\mathcal{K}(y).\]vcdisk.vcdisk_offplane()solves this integral to get a 2D array for the gravitational potential in \((R,z)\) and then computes the circular velocity of the disk as\[V_{\rm disk}(R,z) = \sqrt{R\left.\frac{\partial\Phi(R,z)}{\partial R}\right|_{z}}.\]The double integral is computed with Simpson’s method implemented in
scipy.integrate.simpson().References¶
- ByrdFriedman71
Byrd & Friedman, 1971, Springer-Verlag, Berlin. Handbook of Elliptic Integrals for Engineers and Scientists, 2nd Edition. http://dx.doi.org/10.1007/978-3-642-65138-0
- Cuddeford93(1,2)
Cuddeford, 1993, MNRAS, 262, 1076. On the potentials of galactic discs. https://doi.org/10.1093/mnras/262.4.1076
Example¶
>>> import numpy as np >>> from vcdisk import vcdisk_offplane >>> md, rd, z0 = 1e10, 1.0, 0.3 # mass, rd, z0 >>> rad = np.linspace(0.1, 40.0, 20) # radii samples >>> zs = np.linspace(0.0, 3.0, 20) # height samples >>> rho = lambda R,z: md / (4*np.pi*rd**2*z0) * np.exp(-R/rd) * np.exp(-z/z0) # density in (R,z) >>> rho_rz = rho(rad, zs[:,None]) >>> vcdisk_offplane(rad, zs, rho_rz) array([[ 69.9369551 , 280.68843945, ..., 31.73661284, 31.67214993], ... [ 4.19006384, 36.38315685, ..., 31.6072344 , 31.55062705]])