Translational Dynamics#

Settings to propagate the translational state of a body numerically can be created through the translational() function. Using these settings to propagate dynamics us described on the page on Propagating Dynamics.

The default (processed) representation for solving the translational equations of motion is by using the Cowell propagator (using Cartesian elements as the propagated states), but other formulations can be used (see below and Processed vs. Propagated State Elements).

Inputs#

In addition to the settings described here for propagation settings of any kind, the definition of translational dynamics settings specifically requires:

  • A set of acceleration models (see Acceleration Model Setup)

  • The central bodies of the propagation

  • A type of propagator, since the translational state can have different representations (listed in TranslationalPropagatorType; default is Cowell).

  • The initial conditions for the propagation (Cartesian state, and time)

Warning

The initial state must be provided in Cartesian elements w.r.t. the central body(/bodies), regardless of the propagator type

The central bodies define the origin of the state vector that is to be propagated. For instance, when propagating a spacecraft \(s\) w.r.t. the Earth \(E\), the propagated state vector \(\mathbf{x}\) would be:

\[\mathbf{x} = \mathbf{x}_{s} - \mathbf{x}_{E}\]

where \(\mathbf{x}_{s}\) and \(\mathbf{x}_{E}\) are the states of the spacecraft and Earth, respectively, in a frame with inertial origin.

The governing equation that is solved numerically for the translational dynamics is a first-order differential equation. For the Cowell propagator, it takes the form, for \(\mathbf{x}=[\mathbf{r};\mathbf{v}]\) (decomposed into position \(\mathbf{r}\) and velocity \(\mathbf{v}\)):

\[\begin{split}\frac{d\mathbf{x}}{dt} = \begin{pmatrix} \mathbf{v} \\ \sum_{i} \mathbf{a}_{i}(\mathbf{r},\mathbf{v},t) \end{pmatrix}\end{split}\]

where the summation runs over all accelerations specified by the user. When propagating multiple bodies, the state vectors of the various bodies and their derivatives are concatenated, see Multi-body dynamics for more details.

Example#

In the example below, the body “Spacecraft” will be propagated w.r.t. body “Earth” (also termed the ‘propagation origin’), using given acceleration models, a given initial state which defines the initial Cartesian state of the center of mass of “Spacecraft” w.r.t. the center of mass of “Earth”. A Runge Kutta 4 integrator is defined with step-size of 2 seconds. The propagation will terminate once the simulation_end_epoch termination condition is reached. The state will be propagated through the Encke formulation. Finally the propagator is asked to save the total acceleration. The time and state will be printed on the terminal once every 24 hours.

Required
from tudatpy.dynamics import propagation_setup
from tudatpy.astro import element_conversion
import numpy as np
# Create physical environment
bodies = environment_setup.create_system_of_bodies( ... )

# Define central bodies
central_bodies = ["Earth"]

# Define bodies that are propagated
bodies_to_propagate = ["Spacecraft"]

# Define acceleration settings acting on spacecraft
acceleration_settings_spacecraft = dict( Sun=[propagation_setup.acceleration.point_mass_gravity()])
acceleration_settings = {"Spacecraft": acceleration_settings_spacecraft}

# Create acceleration models.
acceleration_models = propagation_setup.create_acceleration_models( 
    bodies, acceleration_settings, bodies_to_propagate, central_bodies) 

# Define initial conditions as Cartesian elements w.r.t. central body (Earth) with axes along global orientation
initial_state = [5.89960424e+06, 2.30545977e+06, 1.74910449e+06, -1.53482795e+03, -1.71707683e+03, 7.44010957e+03]

# Define numerical integrator (RK4; step size 2 seconds)
integrator_settings = propagation_setup.integrator.runge_kutta_fixed_step(
    2.0, integrator.CoefficientSets.rk_4 )

# Start of simulation
simulation_start_epoch = 9120.0 * constants.JULIAN_DAY

# Define termination settings
simulation_end_epoch = 9140.0 * constants.JULIAN_DAY
termination_settings = propagation_setup.propagator.time_termination(
    simulation_end_epoch )

# Define propagator type
propagator_type = propagation_setup.propagator.encke

# Define dependent variables
dependent_variables_to_save = [propagation_setup.dependent_variable.total_acceleration( "Spacecraft" )]

# Define translational propagator settings
translational_propagator_settings = propagation_setup.propagator.translational(
    central_bodies,
    acceleration_models,
    bodies_to_propagate,
    initial_state,
    simulation_start_epoch,
    integrator_settings,
    termination_settings,
    propagator=propagator_type,
    output_variables= dependent_variables_to_save)

# Set print frequency (to terminal) at once per day
translational_propagator_settings.print_settings.results_print_frequency_in_seconds = 86400.0