Fictitious forces in non-intertial frames

class galpy.potential.NonInertialFrameForce(amp=1.0, Omega=None, Omegadot=None, x0=None, v0=None, a0=None, ro=None, vo=None)[source]

Class that implements the fictitious forces present when integrating orbits in a non-intertial frame. Coordinates in the inertial frame \(\mathbf{x}\) and in the non-inertial frame \(\mathbf{r}\) are related through rotation and linear motion as

\[\mathbf{x} = \mathbf{R}\,\left(\mathbf{r} + \mathbf{x}_0\right)\]

where \(\mathbf{R}\) is a rotation matrix and \(\mathbf{x}_0\) is the motion of the origin. The rotation matrix has angular frequencies \(\boldsymbol{\Omega}\) with time derivative \(\dot{\boldsymbol{\Omega}}\); \(\boldsymbol{\Omega}\) can be any function of time (note that the sign of \(\boldsymbol{\Omega}\) is such that \(\boldsymbol{\Omega}\) is the frequency of the rotating frame as seen from the inertial frame). The motion of the origin can also be any function of time. This leads to the fictitious force

\[\mathbf{F} = -\mathbf{a}_0 - \boldsymbol{\Omega} \times ( \boldsymbol{\Omega} \times \left[\mathbf{r} + \mathbf{x}_0\right]) - \dot{\boldsymbol{\Omega}} \times \left[\mathbf{r}+\mathbf{x}_0\right] -2\boldsymbol{\Omega}\times \left[\dot{\mathbf{r}}+\mathbf{v}_0\right]\]

where \(\mathbf{a}_0\), \(\mathbf{v}_0\), and \(\mathbf{x}_0\) are the acceleration, velocity, and position of the origin of the non-inertial frame, respectively, as a function of time. Note that if the non-inertial frame is not rotating, it is not necessary to specify \(\mathbf{v}_0\) and \(\mathbf{x}_0\). In that case, the fictitious force is simply

\[\mathbf{F} = -\mathbf{a}_0\quad (\boldsymbol{\Omega} = 0)\]

If the non-inertial frame only rotates without any motion of the origin, the fictitious force is the familiar combination of the centrifugal force and the Coriolis force (plus an additional term if \(\dot{\boldsymbol{\Omega}}\) is not constant)

\[\mathbf{F} = - \boldsymbol{\Omega} \times ( \boldsymbol{\Omega} \times \mathbf{r}) - \dot{\boldsymbol{\Omega}} \times \mathbf{r} -2\boldsymbol{\Omega}\times \dot{\mathbf{r}}\quad (\mathbf{a}_0=\mathbf{v}_0=\mathbf{x}_0=0)\]

The functions of time are passed to the C code for fast orbit integration by attempting to build fast numba versions of them. Significant speed-ups can therefore be obtained by making sure that the provided functions can be turned into nopython=True numba functions (try running numba.njit on them and then evaluate them to check).

__init__(amp=1.0, Omega=None, Omegadot=None, x0=None, v0=None, a0=None, ro=None, vo=None)[source]

Initialize a NonInertialFrameForce.

Parameters:
  • amp (float, optional) – Amplitude to be applied to the potential (default: 1).

  • Omega (float or list of floats or Quantity or list of Quantities or callable or list of callables, optional) – Angular frequency of the rotation of the non-inertial frame as seen from an inertial one; can either be a function of time or a number (when the frequency is assumed to be Omega + Omegadot x t) and in each case can be a list [Omega_x,Omega_y,Omega_z] or a single value Omega_z (when not a function, can be a Quantity; when a function, need to take input time in internal units and output the frequency in internal units; see galpy.util.conversion.time_in_Gyr and galpy.util.conversion.freq_in_XXX conversion functions).

  • Omegadot (float or list of floats or Quantity or list of Quantities or callable or list of callables, optional) – Time derivative of the angular frequency of the non-intertial frame’s rotation. Format should match Omega input ([list of] function[s] when Omega is one, number/list if Omega is a number/list; when a function, need to take input time in internal units and output the frequency derivative in internal units; see galpy.util.conversion.time_in_Gyr and galpy.util.conversion.freq_in_XXX conversion functions).

  • x0 (list of callables, optional) – Position vector x_0 (cartesian) of the center of mass of the non-intertial frame (see definition in the class documentation); list of functions [x_0x,x_0y,x_0z]; only necessary when considering both rotation and center-of-mass acceleration of the inertial frame (functions need to take input time in internal units and output the position in internal units; see galpy.util.conversion.time_in_Gyr and divided physical positions by the ro parameter in kpc).

  • v0 (list of callables, optional) – Velocity vector v_0 (cartesian) of the center of mass of the non-intertial frame (see definition in the class documentation); list of functions [v_0x,v_0y,v_0z]; only necessary when considering both rotation and center-of-mass acceleration of the inertial frame (functions need to take input time in internal units and output the velocity in internal units; see galpy.util.conversion.time_in_Gyr and divided physical positions by the vo parameter in km/s).

  • a0 (float or list of callables, optional) – Acceleration vector a_0 (cartesian) of the center of mass of the non-intertial frame (see definition in the class documentation); constant or a list of functions [a_0x,a_0y, a_0z] (functions need to take input time in internal units and output the acceleration in internal units; see galpy.util.conversion.time_in_Gyr and galpy.util.conversion.force_in_XXX conversion functions [force is actually acceleration in galpy]).

  • ro (float, optional) – Distance scale for translation into internal units (default from configuration file).

  • vo (float, optional) – Velocity scale for translation into internal units (default from configuration file).

Notes

  • 2022-03-02 - Started - Bovy (UofT)

  • 2022-03-26 - Generalized Omega to any function of time - Bovy (UofT)