Acceleration Model Setup#
Acceleration models can be created through the factory function
create_acceleration_models()
.
How to select accelerations#
In Tudat, an acceleration acting on a body is defined by:
the body undergoing acceleration;
the body exerting the acceleration;
the type and settings of the acceleration.
These settings are defined via factory functions for each acceleration in the simulation.
See also
A comprehensive list of all available acceleration models in Tudat and the manner in which to define them is given in Available Acceleration Models.
For a single body, the user-specified settings are organized in nested dictionaries dict[str,dict[str,list[AccelerationSettings]]]
,
with the first str
denoting the body undergoing acceleration, the second str
denoting the body exerting the acceleration, and the
list of AccelerationSettings
objects is created using the functions in the
acceleration module.
This nested dictionary will be supplied to the
create_acceleration_models()
function to create the
acceleration models. This is illustrated in the example below.
Example#
In this example, the following accelerations are exerted on the vehicle:
by the Earth:
spherical harmonic gravitational acceleration (degree and order 5)
aerodynamic acceleration
by the Sun:
point-mass gravity
by the Moon:
point-mass gravity
The variable accelerations_settings_vehicle
denotes the list of bodies exerting accelerations and the types of
accelerations, while the variable acceleration_settings
associates this list with the body undergoing the
acceleration.
The
function create_acceleration_models()
creates the list of
models that compute the accelerations during the propagation.
Required
from tudatpy.numerical_simulation import propagation_setup
# Define bodies that are propagated
bodies_to_propagate = ["Vehicle"]
# Define central bodies
central_bodies = ["Earth"]
# Define accelerations acting on Vehicle
accelerations_settings_vehicle = dict(
Sun=
[
propagation_setup.acceleration.point_mass_gravity()
],
Moon=
[
propagation_setup.acceleration.point_mass_gravity()
],
Earth=
[
propagation_setup.acceleration.spherical_harmonic_gravity(5, 5),
propagation_setup.acceleration.aerodynamic()
])
# Create global accelerations settings dictionary
acceleration_settings = {"Vehicle": accelerations_settings_vehicle}
# Create acceleration models
acceleration_models = propagation_setup.create_acceleration_models(
bodies, acceleration_settings, bodies_to_propagate, central_bodies)
When propagating multiple bodies, the same list of settings may be re-used for multiple bodies. Below,
an example is given for the definition of acceleration_settings
for multiple bodies (Vehicle1
and
Vehicle2
) which are undergoing identical accelerations:
Required
from tudatpy.numerical_simulation import propagation_setup
# Define bodies that are propagated
bodies_to_propagate = ["Vehicle1", "Vehicle2"]
# Define central bodies
central_bodies = ["Earth", "Earth"]
# Define accelerations acting on both vehicles
accelerations_settings_vehicle = dict(
Sun=
[
propagation_setup.acceleration.point_mass_gravity()
],
Moon=
[
propagation_setup.acceleration.point_mass_gravity()
],
Earth=
[
propagation_setup.acceleration.spherical_harmonic_gravity(5, 5),
propagation_setup.acceleration.aerodynamic()
])
# Create global accelerations settings dictionary
acceleration_settings = {"Vehicle1": accelerations_settings_vehicle,
"Vehicle2": accelerations_settings_vehicle}
# Create acceleration models
acceleration_models = propagation_setup.create_acceleration_models(
bodies, acceleration_settings, bodies_to_propagate, central_bodies)
Alternatively, separate acceleration settings may be defined for separate bodies and then combined into an
acceleration_settings
variable. Below, an example for such a case is given when propagating the Earth and Moon:
Required
from tudatpy.numerical_simulation import propagation_setup
# Define bodies that are propagated
bodies_to_propagate = ["Moon", "Earth"]
# Define central bodies
central_bodies = ["Sun", "Sun"]
# Define accelerations acting on Vehicle
accelerations_settings_moon = dict(
Sun=
[
propagation_setup.acceleration.point_mass_gravity()
],
Earth=
[
propagation_setup.acceleration.point_mass_gravity()
]
)
accelerations_settings_earth = dict(
Sun=
[
propagation_setup.acceleration.point_mass_gravity()
],
Moon=
[
propagation_setup.acceleration.point_mass_gravity()
]
)
# Create global accelerations settings dictionary.
acceleration_settings = {"Moon": accelerations_settings_moon,
"Earth": accelerations_settings_earth}
# Create acceleration models
acceleration_models = propagation_setup.create_acceleration_models(
bodies, acceleration_settings, bodies_to_propagate, central_bodies)