astrodynx.gravity.point_mass_grav

astrodynx.gravity.point_mass_grav#

astrodynx.gravity.point_mass_grav(t, x, args={'mu': 1.0})[source]#

Returns the acceleration due to a point mass.

Parameters:
  • t (DTypeLike) – The time.

  • x (ArrayLike) – (N,) The state vector, where the first 3 elements are the position vector.

  • args (PyTree[Any]) – Static arguments.

Return type:

ArrayLike

Returns:

The acceleration due to a point mass.

Notes

The acceleration due to a point mass is defined as:

\[ \boldsymbol{a} = -\frac{\mu}{r^3} \boldsymbol{r} \]
where \(\boldsymbol{a}\) is the acceleration, \(\mu\) is the gravitational parameter, and \(\boldsymbol{r}\) is the position vector.

References

Battin, 1999, pp.114.

Examples

>>> import jax.numpy as jnp
>>> import astrodynx as adx
>>> t = 0.0
>>> x = jnp.array([1.0, -1.0, 1.0, 0.0, 0.0, 0.0])
>>> args = {"mu": 1.0}
>>> adx.gravity.point_mass_grav(t, x, args)
Array([-0.1924...,  0.1924..., -0.1924...], dtype=float32)