Polyhedral Gravity¶
Polyhedral gravity model using the Tsoulis (2012) line-integral method.
Computes gravitational potential, acceleration, and gravity gradient tensor for irregularly-shaped bodies represented as triangulated surface meshes. This is the standard approach for modelling the gravitational field of asteroids and small bodies using shape models such as those from the DAMIT database.
The algorithm follows the formulation in:
D. Tsoulis, "Analytical computation of the full gravity tensor of a
homogeneous arbitrarily shaped polyhedral source using line integrals,"
*Geophysics*, vol. 77, no. 2, pp. F1-F11, 2012.
with singularity-handling refinements from:
D. Tsoulis and K. Petrovic, "On the singularities of the gravity field
of a homogeneous polyhedral body," *Geophysics*, vol. 66, no. 2,
pp. 535-539, 2001.
All functions use JAX primitives and are compatible with jax.jit,
jax.vmap, and jax.grad.
accel_polyhedral_gravity(r_point, r_body, R_body_to_inertial, vertices, faces, density)
¶
Gravitational acceleration from a polyhedral body in an inertial frame.
Transforms the computation point into the body-fixed frame, evaluates the polyhedral gravity acceleration there, and rotates the result back to the inertial frame.
This function is designed to integrate with
:func:~astrojax.datasets.damit_spin_to_rotation and
:func:~astrojax.datasets.scale_shape_vertices.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
r_point
|
ArrayLike
|
Position of the computation point in the inertial
frame [m], shape |
required |
r_body
|
ArrayLike
|
Position of the body centre in the inertial
frame [m], shape |
required |
R_body_to_inertial
|
ArrayLike
|
Rotation matrix from body-fixed to inertial
frame, shape |
required |
vertices
|
ArrayLike
|
Mesh vertex coordinates in the body frame [m],
shape |
required |
faces
|
ArrayLike
|
Triangle face indices (0-indexed), shape |
required |
density
|
ArrayLike
|
Bulk density [kg/m^3], scalar. |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Gravitational acceleration in the inertial frame [m/s^2], |
Array
|
shape |
Examples:
import jax.numpy as jnp
from astrojax.orbit_dynamics import accel_polyhedral_gravity
# Body at origin, identity rotation (body = inertial)
vertices = jnp.array([
[-1, -1, -1], [ 1, -1, -1], [ 1, 1, -1], [-1, 1, -1],
[-1, -1, 1], [ 1, -1, 1], [ 1, 1, 1], [-1, 1, 1],
], dtype=jnp.float64)
faces = jnp.array([
[1,3,2],[0,3,1],[0,1,5],[0,5,4],[0,7,3],[0,4,7],
[1,2,6],[1,6,5],[2,3,6],[3,7,6],[4,5,6],[4,6,7],
])
r_point = jnp.array([5.0, 5.0, 5.0])
r_body = jnp.zeros(3)
R = jnp.eye(3)
a = accel_polyhedral_gravity(r_point, r_body, R, vertices, faces, 1.0)
polyhedral_gravity(r_body_frame, vertices, faces, density)
¶
Gravitational potential, acceleration, and tensor from a polyhedral body.
Evaluates the full gravity field of a homogeneous polyhedron at a single computation point using the Tsoulis (2012) line-integral method. All quantities are computed in the body-fixed frame.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
r_body_frame
|
ArrayLike
|
Computation point in body frame [m], shape |
required |
vertices
|
ArrayLike
|
Mesh vertex coordinates [m], shape |
required |
faces
|
ArrayLike
|
Triangle face indices (0-indexed), shape |
required |
density
|
ArrayLike
|
Bulk density of the body [kg/m^3], scalar. |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Tuple of: |
Array
|
|
Array
|
|
tuple[Array, Array, Array]
|
|
Examples:
import jax.numpy as jnp
from astrojax.orbit_dynamics import polyhedral_gravity
# Unit cube: 8 vertices, 12 triangular faces
vertices = jnp.array([
[-1, -1, -1], [ 1, -1, -1], [ 1, 1, -1], [-1, 1, -1],
[-1, -1, 1], [ 1, -1, 1], [ 1, 1, 1], [-1, 1, 1],
], dtype=jnp.float64)
faces = jnp.array([
[1,3,2],[0,3,1],[0,1,5],[0,5,4],[0,7,3],[0,4,7],
[1,2,6],[1,6,5],[2,3,6],[3,7,6],[4,5,6],[4,6,7],
])
r = jnp.array([5.0, 5.0, 5.0])
potential, accel, tensor = polyhedral_gravity(r, vertices, faces, 1.0)