Module kidou::orbit::calc::integrate[][src]

Expand description

This module provides routines for the orbit integration

Here is a quick breakdown of what is going on (see Bajkova & Bobylev (2020, v1) for more details).

Let the initial positions and space velocities of a test particle in the heliocentric coordinate system be $ (x_0, y_0 , z_0, u_0, v_0 , w_0) $. The initial positions $ (X, Y, Z) $ and velocities $ (U, V, W) $ of the test particle in Galactic Cartesian coordinates are then given by the formulas:

$$ X \, [\text{kpc}] = R_\odot - x_0; \\ Y \, [\text{kpc}] = y_0; \\ Z \, [\text{kpc}] = z_0 + h_\odot; \\ U \, [\text{km} \, \text{s}^{-1}] = u_0 + u_\odot; \\ V \, [\text{km} \, \text{s}^{-1}] = v_0 + v_\odot + V_\odot; \\ W \, [\text{km} \, \text{s}^{-1}] = w_0 + w_\odot, $$

where $ R_\odot = 8.3 \, \text{kpc} $ and $ V_\odot = 244 \, \text{km} \, \text{s}^{-1} $ are the Galactocentric distance and the linear velocity of the Local Standard of Rest around the Galactic center, $ h_\odot = 16 \, \text{pc} $ (Bobylev & Bajkova (2016)) is the height of the Sun above the Galactic plane, $ (u_\odot, v_\odot, w_\odot) = (11.1, 12.2, 7.3) \pm (0.7, 0.5, 0.4) \, \text{km s}^{-1} $ (Schönrich et al., 2010) is the Sun’s peculiar velocity with respect to the Local Standard of Rest.

The initial positions $ (R, \psi, Z) $ and their time derivatives $ (\dot{R}, \dot{\psi}, \dot{Z}) $ are then obtained by the formulas:

$$ R \, [\text{kpc}] = \sqrt{X^2 + Y^2}; \\ \psi \, [\text{rad}] = \text{atan2}(Y, X); \\ \dot{R} \, [\text{km} \, \text{s}^{-1}] = -U \cos{\psi} + V \sin{\psi}; \\ \dot{\psi} \, [\text{rad} \, \text{s}^{-1}] = (U \sin{\psi} + V \cos{\psi}) / R \, [\text{kpc} \rightarrow \text{km}]; \\ \dot{Z} \, [\text{km} \, \text{s}^{-1}] = W. $$

From here we obtain the initial values of the canonical moments $ (p_R, p_\psi, p_Z) $:

$$ p_R \, [\text{kpc} \, \text{Myr}^{-1}] = \dot{R} \, [\text{km} \, \text{s}^{-1} \rightarrow \text{kpc} \, \text{Myr}^{-1}]; \\ p_{\psi} \, [\text{kpc}^2 \, \text{rad} \, \text{Myr}^{-1}] = R^2 \dot{\psi} \, [\text{s}^{-1} \rightarrow \text{Myr}^{-1}]; \\ p_Z \, [\text{kpc} \, \text{Myr}^{-1}] = \dot{Z} \, [\text{km} \, \text{s}^{-1} \rightarrow \text{kpc} \, \text{Myr}^{-1}]. $$

Now we’re all set to integrate the Lagrangian equations

$$ \dot{R} \, [\text{kpc} \, \text{Myr}^{-1}] = p_R; \\ \dot{\psi} \, [\text{rad} \, \text{Myr}^{-1}] = p_\psi / R^2; \\ \dot{Z} \, [\text{kpc} \, \text{Myr}^{-1}] = p_Z; \\ \dot{p_R} \, [\text{kpc} \, \text{Myr}^{-2}] = - \partial \Phi(R, Z) / \partial R \, [100 \, \text{km} \, \text{s}^{-2} \rightarrow \text{kpc} \, \text{Myr}^{-2}] + p_\psi^2 / R^3; \\ \dot{p_\psi} \, [\text{kpc}^2 \, \text{Myr}^{-2}] = 0; \\ \dot{p_Z} \, [\text{kpc} \, \text{Myr}^{-2}] = - \partial \Phi(R, Z) / \partial Z \, [100 \, \text{km} \, \text{s}^{-2} \rightarrow \text{kpc} \, \text{Myr}^{-2}]. $$

To calculate the total energy, we first obtain radial velocity

$$ \Pi \, [\text{km} \, \text{s}^{-1}] = -U \frac{X}{R} + V \frac{Y}{R} = -(-p_R \, [\text{kpc} \, \text{Myr}^{-1} \rightarrow \text{km} \, \text{s}^{-1}] \cos{\psi} + (p_\psi / R) \, [\text{kpc} \, \text{Myr}^{-1} \rightarrow \text{km} \, \text{s}^{-1}] \sin{\psi}) \cos{\psi} \\ + (p_R \, [\text{kpc} \, \text{Myr}^{-1} \rightarrow \text{km} \, \text{s}^{-1}] \sin{\psi} - (p_\psi / R) \, [\text{kpc} \, \text{Myr}^{-1} \rightarrow \text{km} \, \text{s}^{-1}] \cos{\psi}) \sin{\psi}, $$

tangential velocity

$$ \Theta \, [\text{km} \, \text{s}^{-1}] = U \frac{Y}{R} + V \frac{X}{R} = (-p_R \, [\text{kpc} \, \text{Myr}^{-1} \rightarrow \text{km} \, \text{s}^{-1}] \cos{\psi} + (p_\psi / R) \, [\text{kpc} \, \text{Myr}^{-1} \rightarrow \text{km} \, \text{s}^{-1}] \sin{\psi}) \sin{\psi} \\ + (p_R \, [\text{kpc} \, \text{Myr}^{-1} \rightarrow \text{km} \, \text{s}^{-1}] \sin{\psi} - (p_\psi / R) \, [\text{kpc} \, \text{Myr}^{-1} \rightarrow \text{km} \, \text{s}^{-1}] \cos{\psi}) \cos{\psi}, $$

and total 3D velocity $ V_\text{tot} \, [\text{km}^2 \, \text{s}^{-2}] = \sqrt{\Pi^2 + \Theta^2 + W^2} = \sqrt{\Pi^2 + \Theta^2 + (p_z \, [\text{kpc} \, \text{Myr}^{-1} \rightarrow \text{km} \, \text{s}^{-1}])^2} $.

Then we can calculate the total energy $ E \, [\text{km}^2 \, \text{s}^{-2}] = \Phi(R, Z) \, [\text{km}^2 \, \text{s}^{-2} \rightarrow \text{100} \, \text{km}^2 \, \text{s}^{-2}] + V_\text{tot}^2 / 2 $.

Modules

This module provides constants used during integration

Functions

Calculate the right-hand part of the equation for $ \dot{p_r} $ $[ \text{kpc} \, \text{Myr}^{-2} ]$

Calculate the right-hand part of the equation for $ \dot{p_z} $ $[ \text{kpc} \, \text{Myr}^{-2} ]$

Calculate the right-hand part of the equation for $ \dot{\psi} $ $[ \text{Myr}^{-1} ]$

Calculate the right-hand part of the equation for $ \dot{R} $ $[ \text{kpc} \, \text{Myr}^{-1} ]$

Calculate the right-hand part of the equation for $ \dot{z} $ $[ \text{kpc} \, \text{Myr}^{-1} ]$

Calculate the value of radial velocity $ \Pi $ $[ \text{km} \, \text{s}^{-1} ]$

Integrate the orbit using the fourth-order Runge-Kutta algorithm

Calculate the value of tangential velocity $ \Theta $ $[ \text{km} \, \text{s}^{-1} ]$

Calculate the value of total energy E $[ \text{km}^2 \, \text{s}^{-2} ]$