thrust
#
This module provides the functionality for creating thrust magnitude and direction settings.
Functions#
Function to create a list of functions that compute and return independent variables for the thrust. 

Create thrust direction settings from the state guidance. 

Create thrust direction settings from the existing body orientation. 

Create custom thrust orientation settings, expressed as a rotation matrix. 

Create custom thrust direction settings, expressed as a vector in the inertial frame. 


Create thrust magnitude settings from a constant thrust magnitude and Isp. 
Create thrust magnitude settings from a custom thrust magnitude function. 
 get_propulsion_input_variables(body_with_guidance: tudatpy.kernel.numerical_simulation.environment.Body = None, independent_variables: List[tudat::propulsion::ThrustIndependentVariables] = [], guidance_input_functions: List[Callable[[], float]] = []) List[Callable[[], float]] #
Function to create a list of functions that compute and return independent variables for the thrust.
Function to create a list of functions that compute and return independent variables for thrust and/or specific impulse. This parameterization is used to create a specific thrust magnitude type (see thrust magnitude from dependent variables). This function retrieves all input functions from the environment and a list of userdefined functions.
 Parameters
body_with_guidance (Body) – Body object whose thrust guidance should be defined.
independent_variables (list[ThrustIndependentVariables]) – Set of dependent variables that should be used to compute the thrust.
guidance_input_functions (list[callable[[], float], default=[]) – Set of functions to compute the thrust, each associated to a specific dependent variable.
 thrust_direction_from_state_guidance(central_body: str, is_colinear_with_velocity: bool, direction_is_opposite_to_vector: bool) tudatpy.kernel.numerical_simulation.propagation_setup.thrust.ThrustDirectionSettings #
Create thrust direction settings from the state guidance.
Factory function that creates thrust direction settings from the state guidance. In various simplified cases, the thrust direction can be assumed to be in line with either the position or velocity of the body of interest with respect to some other body.
 Parameters
central_body (Body) – Central body with respect to which the position and velocity of the body undergoing the thrust acceleration are computed.
is_colinear_with_velocity (bool) – Whether the thrust direction is colinear with the velocity (true) or the position vector with respect to some other body (false).
direction_is_opposite_to_vector (bool) – Whether the thrust is pointing towards the thrusting body (true) or the central body (false).
 Returns
Thrust direction from state guidance settings object.
 Return type
Examples
In this example, we define a thrust orientation that is colinear with the velocity vector of the vehicle, with the thrust pointing towards the vehicle.
# Define thrust direction settings from state guidance thrust.thrust_direction_from_state_guidance( central_body, is_colinear_with_velocity=True, direction_is_opposite_to_vector=True )
 thrust_from_existing_body_orientation() tudatpy.kernel.numerical_simulation.propagation_setup.thrust.ThrustDirectionSettings #
Create thrust direction settings from the existing body orientation.
Factory function that creates thrust direction settings from the existing body orientation. In some cases, the vehicle’s orientation may be predetermined, either due to aerodynamic guidance or to the concurrent propagation of the rotational equations of motion. In such a case, the thrust direction is computed from the bodyfixed thrust direction (defined in ThrustMagnitudeSettings) and the existing vehicle orientation.
Examples
In this example, we define the thrust orientation from the orientation of the vehicle that was already defined before.
# Define thrust orientation settings based on the orientation of the body at hand thrust.thrust_from_existing_body_orientation()
 custom_thrust_orientation(thrust_orientation_function: Callable[[float], numpy.ndarray[numpy.float64[3, 3]]]) tudatpy.kernel.numerical_simulation.propagation_setup.thrust.ThrustDirectionSettings #
Create custom thrust orientation settings, expressed as a rotation matrix.
Factory function that creates custom thrust orientation settings, expressed through a rotation matrix. As an alternative expression for generalized thrust direction guidance, the thrust orientation can be defined as an arbitrary function of time. As with the custom thrust direction, this allows a broad range of options to be defined, at the expense of increased complexity (somehow the thrust orientation needs to be manually defined). The thrust orientation is provided through a rotation matrix representing the rotation from bodyfixed thrust direction to the inertial thrust direction.
 Parameters
thrust_orientation_function (callable[[float], numpy.ndarray]) – Function of time returning the matrix representing the rotation between the thrust direction in the bodyfixed frame to the inertial frame.
 Returns
Custom thrust orientation settings object.
 Return type
Examples
In this example, we define a thrust orientation in the inertial frame using a custom function, taking the time as input. In this case, the custom thrust direction function is made so that the thrust vector oscillates in the yz inertial plane.
# Define thrust orientation settings based on a function of time thrust.custom_thrust_orientation(thrust_orientation_function)
 custom_thrust_direction(thrust_direction_function: Callable[[float], numpy.ndarray[numpy.float64[3, 1]]]) tudatpy.kernel.numerical_simulation.propagation_setup.thrust.ThrustDirectionSettings #
Create custom thrust direction settings, expressed as a vector in the inertial frame.
Factory function that creates custom thrust direction settings, expressed as a unit vector in the inertial frame. For a generalized thrust direction guidance, the thrust can be defined as an arbitrary function of time. This allows a broad range of options to be defined, at the expense of increased complexity (somehow the thrust direction needs to be manually defined).
 Parameters
thrust_direction_function (callable[[float], numpy.ndarray]) – Function of time returning the thrust direction in the inertial frame.
 Returns
Custom thrust direction settings object.
 Return type
Examples
In this example, we define a thrust direction in the inertial frame using a custom function, taking the time as input. In this case, the custom thrust direction function is made so that the thrust vector oscillates in the yz inertial plane.
# Define a function for the thrust orientation as a function of time def thrust_direction_function(time): thrust_direction = np.array([0, np.sin(time*np.pi/1000), np.cos(time*np.pi/1000)]) return thrust_direction/np.linalg.norm(thrust_direction) # Define thrust direction settings based on a function of time thrust.custom_thrust_direction(thrust_direction_function)
 constant_thrust_magnitude(thrust_magnitude: float, specific_impulse: float, body_fixed_thrust_direction: numpy.ndarray[numpy.float64[3, 1]] = array([1., 0., 0.])) tudatpy.kernel.numerical_simulation.propagation_setup.thrust.ThrustMagnitudeSettings #
Create thrust magnitude settings from a constant thrust magnitude and Isp.
Factory function that creates constant thrust magnitude settings. The specific impulse to use for the thrust is also supplied when applying a mass rate model in the propagation of the vehicle dynamics, relating the thrust to the mass decrease of the vehicle.
 Parameters
thrust_magnitude (float) – Value of the constant thrust magnitude.
specific_impulse (float) – Value of the constant specific impulse, used to link the thrust model to the mass propagation.
body_fixed_thrust_direction (numpy.ndarray, default=numpy.ndarray([])) – Constant bodyfixed thrust direction (positive xdirection by default). Note that this should be a unitvector representing the direction opposite to the nozzle direction.
 Returns
Constant thrust magnitude settings object.
 Return type
Examples
In this example, we define constant thrust magnitude of 1.5 kN, with a constant deviation from the bodyfixed xaxis of 0.1 rad, and a specific impulse of 315 s.
# Define constant thrust magnitude settings of 1.5kN, an Isp of 315s, and a deviation from the bodyfixed xaxis of 0.1 rad. thrust.constant_thrust_magnitude( thrust_magnitude=1.5e3, specific_impulse=315, body_fixed_thrust_direction=[np.cos(0.1), np.sin(0.1), 0] )
 custom_thrust_magnitude(thrust_magnitude_function: Callable[[float], float], specific_impulse_function: Callable[[float], float], is_engine_on_function: Callable[[float], bool] = <builtin method of PyCapsule object at 0x7f89504351e0>, body_fixed_thrust_direction: Callable[[], numpy.ndarray[numpy.float64[3, 1]]] = <builtin method of PyCapsule object at 0x7f8950435060>, custom_thrust_reset_function: Callable[[float], None] = None) tudatpy.kernel.numerical_simulation.propagation_setup.thrust.ThrustMagnitudeSettings #
Create thrust magnitude settings from a custom thrust magnitude function.
Factory function that creates thrust magnitude from a custom thrust magnitude function. This model defines a thrust force and specific impulse that can vary with time. The specific impulse is also provided to apply a mass rate model in the propagation the vehicle dynamics, relating the thrust to the mass decrease of the vehicle. Note that, if you wish to use a constant value for any or all of the first three arguments, lambda expression can be used. Presently, the definition of the thrust direction in the bodyfixed frame is also defined through these derived classes. In essence, the ThrustMagnitudeSettings defines all local (to the vehicle systems) settings for the thrust, while ThrustDirectionGuidanceSettings defines how the full vehicle must orient itself in space for the required thrust direction to be achieved. At present, there is no direct option for thrustvector control (i.e. modifying the thrust direction in the bodyfixed frame).
 Parameters
thrust_magnitude_function (callable[[float], float]) – Function of time returning the value of the thrust magnitude.
specific_impulse_function (callable[[float], float]) – Function of time returning the value of the specific impulse, useful to link the mass propagation to the thrust model.
is_engine_on_function (callable[[float], bool], default=lambda t: true) – Function of time returning a boolean, denoting whether the thrust should be engaged at all (e.g. thrust is 0 N if it returns false). It is useful to link the mass propagation to the thrust model.
body_fixed_thrust_direction (callable[[], numpy.ndarray], default=lambda t: numpy.ndarray([])) – Constant bodyfixed thrust direction (positive xdirection by default). Note that this function should be a unitvector representing the direction opposite to the nozzle direction. This setting can be used to incorporate thrustvector control (TVC) into the thrust.
custom_thrust_reset_function (callable[[float], ], default=lambda t: None) – Function of time that updates any relevant aspects of the environment/system models, called before retrieving the thrust magnitude, specific impulse, and bodyfixed thrust direction.
 Returns
From function thrust magnitude settings object.
 Return type
Examples
In this example, we define a thrust magnitude based on a set of custom functions. The magnitude itself starts from 500N, and linearly increases with time. The specific impulse is constant, at 350s. Note that we use a lambda function to achieve this neatly. Finally, the engine is setup to work for 50s, and be turned off afterwards.
# Define the thrust magnitude function: thrust increases linearly with time def thrust_magnitude_function(time): return 500 + time/2 # Define a lambda specific impulse function: constant at 350s specific_impulse_function = lambda time: 350 # Define the "engine on" function: engine is off after 50s def is_engine_on_function(time): return time < 50 # Define the custom thrust magnitude settings based on the predefined functions thrust.custom_thrust_magnitude(thrust_magnitude_function, specific_impulse_function, is_engine_on_function)
Enumerations#
Enumeration of available thrust frame types. 

Enumeration of available thrust magnitude types. 

Enumeration of available thrust direction types. 
 class ThrustFrames#
Enumeration of available thrust frame types.
Enumeration of thrust frame types supported by tudat. The inertial frame has axes along the global orientation (as defined in the
SystemOfBodies
object. The TNW is determined w.r.t. a central body as described in the functiontnw_to_inertial_rotation_matrix()
(with the Naxis pointing away from the central body).Members:
unspecified_thrust_frame_type
inertial_thrust_frame_type
tnw_thrust_frame_type
 property name#
 class ThrustMagnitudeTypes#
Enumeration of available thrust magnitude types.
Members:
constant_thrust_magnitude
from_engine_properties_thrust_magnitude
thrust_magnitude_from_time_function
thrust_magnitude_from_dependent_variables
bang_bang_thrust_magnitude_from_mee_costates
 property name#
 class ThrustDirectionGuidanceTypes#
Enumeration of available thrust direction types.
Members:
colinear_with_state_segment_thrust_direction_type
thrust_direction_from_existing_body_orientation_type
custom_thrust_direction_type
custom_thrust_orientation_type
mee_costate_based_thrust_direction_type
 property name#
Classes#
Functional base class to define settings for the thrust direction. 

ThrustDirectionSettingsderived class to define settings for the thrust direction from the current state. 

ThrustDirectionSettingsderived class to define settings for a custom thrust direction. 

ThrustDirectionSettingsderived class to define settings for a custom thrust orientation. 

Functional base class to define settings for the thrust magnitude. 

ThrustMagnitudeSettingsderived class to define settings for constant thrust magnitude. 

ThrustMagnitudeSettingsderived class to define settings for constant thrust magnitude. 
 class ThrustDirectionSettings#
Functional base class to define settings for the thrust direction.
 thrust_direction_type#
Thrust direction type object.
 Type
ThrustDirectionType
 class ThrustDirectionFromStateGuidanceSettings#
ThrustDirectionSettingsderived class to define settings for the thrust direction from the current state.
Derived class to provide settings for the thrust direction. The thrust direction is assumed to be in line with either the position or velocity of the body of interest with respect to some other body.
 is_colinear_with_velocity#
Whether the thrust direction is colinear with the velocity (true) or the position vector with respect to some other body (false).
 Type
 class CustomThrustDirectionSettings#
ThrustDirectionSettingsderived class to define settings for a custom thrust direction.
Derived class to provide settings for the thrust direction. The thrust direction is provided through a unit vector in the inertial frame.
 thrust_direction_function#
Function of time returning the thrust direction in the inertial frame.
 Type
callable[[float], numpy.ndarray]
 class CustomThrustOrientationSettings#
ThrustDirectionSettingsderived class to define settings for a custom thrust orientation.
Derived class to provide settings for the thrust direction. The thrust orientation is provided through a function of time returning a unit quaternion in the inertial frame, representing the rotation from bodyfixed thrust direction to the inertial thrust direction.
 thrust_orientation_function#
Function of time returning the rotation between the thrust direction in the bodyfixed frame to the inertial frame.
 Type
callable[[float], numpy.ndarray]
 class ThrustMagnitudeSettings#
Functional base class to define settings for the thrust magnitude.
 thrust_magnitude_type#
Thrust magnitude type object.
 Type
ThrustMagnitudeType
 class ConstantThrustMagnitudeSettings#
ThrustMagnitudeSettingsderived class to define settings for constant thrust magnitude.
Derived class to provide settings for the thrust magnitude. This class should be used to define a constant thrust magnitude.
 specific_impulse#
Thrust direction vector expressed in the bodyfixed reference frame.
 Type
 class FromFunctionThrustMagnitudeSettings#
ThrustMagnitudeSettingsderived class to define settings for constant thrust magnitude.
Derived class to provide settings for the thrust magnitude. This class should be used to define a thrust magnitude through a custom function.