numerical_simulation
¶
Setup and execution of numerical simulations.
This module contains everything related to the setup of a numerical simulation, including submodules to define environment, propagation, and integration settings. It also contains objects that perform the simulation using such settings.
Functions¶
|
Function to create object that propagates the dynamics. |
- create_dynamics_simulator(bodies: tudatpy.kernel.numerical_simulation.environment.SystemOfBodies, propagator_settings: tudatpy.kernel.numerical_simulation.propagation_setup.propagator.PropagatorSettings, simulate_dynamics_on_creation: bool = True) tudat::propagators::DynamicsSimulator<double, double, 0> ¶
Function to create object that propagates the dynamics.
Function to create object that propagates the dynamics, as specified by propagator settings, and the physical environment. Depending on the specific input type (e.g. which factory function from the propagator module was used), a single-, multi- or hybrid-arc simulator is created. The environment is typically created by the
create_system_of_bodies()
function. When using default settings, calling this function will automatically propagate the dynamics.- Parameters:
bodies (
SystemOfBodies
) – Object defining the physical environment, with all properties of artificial and natural bodies.propagator_settings (
PropagatorSettings
) – Settings to be used for the numerical propagation (dynamics type, termination conditions, integrator, etc.)simulate_dynamics_on_creation (Bool, default=True) – Boolean defining whether to propagate the dynamics upon creation of the Simulator. If false, the dynamics c can be propagated at a later time by calling the
integrate_equations_of_motion
function
- Returns:
Object that propagates the dynamics, and processes the results.
- Return type:
Simulator
Classes¶
Class for consolidating single arc dynamics simulation functionality. |
|
Class for consolidating single arc variational dynamics functionality. |
|
Class for consolidating all estimation functionality. |
- class SingleArcSimulator¶
Class for consolidating single arc dynamics simulation functionality.
Class for consolidating all functionality required to perform single arc dynamics simulations.
- __init__(self: tudatpy.kernel.numerical_simulation.SingleArcSimulator, bodies: tudatpy.kernel.numerical_simulation.environment.SystemOfBodies, integrator_settings: tudatpy.kernel.numerical_simulation.propagation_setup.integrator.IntegratorSettings, propagator_settings: tudatpy.kernel.numerical_simulation.propagation_setup.propagator.PropagatorSettings, are_equations_of_motion_to_be_integrated: bool = True, clear_numerical_solutions: bool = False, set_integrated_result: bool = False, print_number_of_function_evaluations: bool = False, print_dependent_variable_data: bool = True, print_state_data: bool = True) None ¶
- property environment_updater¶
read-only
Object used in the propagation to update the environment, it uses the current time and numerically calculated state to update the translational state, rotational state, flight conditions, etc. of all bodies in the simulation to be consistent with this time and state. Typically, this class is NOT used directly by users, but can be useful in specific situations.
- Type:
EnvironmentUpdater
- property integrator_settings¶
Settings to create the numerical integrator that is to be used for the integration of the equations of motion
- Type:
- property propagation_results¶
read-only
This function retrieves all the results of the numerical propagation, stored in a single wrapper object
- property state_derivative_function¶
read-only
Function that performs a single state derivative function evaluation. This function takes the numerically propagated state, and current independent variable (time) as input, and returns the derivative of the state that is then used by the numerical integration routine. Typically, this function is NOT used directly by users.
- Type:
Callable[[float, numpy.ndarray], numpy.ndarray]
- class SingleArcVariationalSimulator¶
Class for consolidating single arc variational dynamics functionality.
Class for consolidating all functionality required to perform single arc variational dynamics simulations.
- __init__(self: tudatpy.kernel.numerical_simulation.SingleArcVariationalSimulator, bodies: tudatpy.kernel.numerical_simulation.environment.SystemOfBodies, integrator_settings: tudatpy.kernel.numerical_simulation.propagation_setup.integrator.IntegratorSettings, propagator_settings: tudatpy.kernel.numerical_simulation.propagation_setup.propagator.PropagatorSettings, estimated_parameters: tudatpy.kernel.numerical_simulation.estimation.EstimatableParameterSet, integrate_equations_concurrently: bool = True, variational_only_integrator_settings: tudatpy.kernel.numerical_simulation.propagation_setup.integrator.IntegratorSettings = None, clear_numerical_solutions: bool = False, integrate_on_creation: bool = True, set_integrated_result: bool = False, print_dependent_variable_data: bool = True) None ¶
Class constructor.
Constructor through which the user can create instances of this class. Defines environment, propagation and integrations models, as well as a number of settings related to the (estimatable) parameters, w.r.t. which the variational equations are defined.
Note
When using default settings, creating an object of this type automatically triggers the propagation
- Parameters:
bodies (
SystemOfBodies
) – Object defining the physical environment, with all properties of artificial and natural bodies.integrator_settings (
IntegratorSettings
) – Settings to create the numerical integrator that is to be used for the integration of the equations of motion.propagator_settings (
PropagatorSettings
) – Settings to create the propagator that is to be used for the propagation of the dynamics.estimated_parameters (
EstimatableParameterSet
) – Object defining a consolidated set of (estimatable) parameters (w.r.t. variational equations are defined), linked to the environment and acceleration settings of the simulation.integrate_equations_concurrently (Bool, default = True) – Boolean defining whether equations of motion and variational equations are to be propagated concurrently (if true) or sequentially (of false).
variational_only_integrator_settings (
IntegratorSettings
, default = []) – Settings to create the numerical integrator that is to be used for integration the variational equations. If none is given (default), the numerical integration settings are taken to be the same as the ones applied in the integration of the equations of motions (specified by the integrator_settings parameter).clear_numerical_solutions (Bool, default = False) – Boolean to determine whether to clear the raw numerical solution member variables and to reset the state transition interface after propagation.
integrate_on_creation (Bool, default = True) – Boolean defining whether the propagation should be performed immediately (default), or at a later time (when calling the
integrate_full_equations()
orintegrate_equations_of_motion_only()
member function).set_integrated_result (Bool, default = True) – Boolean to determine whether to automatically use the integrated results to set ephemerides for the propagated bodies.
- integrate_equations_of_motion_only(self: tudatpy.kernel.numerical_simulation.SingleArcVariationalSimulator, initial_states: numpy.ndarray[numpy.float64[m, 1]]) None ¶
Function to trigger the integration of the (regular) equations of motion.
Function to trigger the integration only of the (regular) equations of motion, resulting in a state_history. This step does not yet use variational dynamics. In order to also solve the variational equations, use the
integrate_full_equations()
member function.- Returns:
Creates / modifies the state_history property of the
SingleArcVariationalSolver
object.- Return type:
None
- integrate_full_equations(self: tudatpy.kernel.numerical_simulation.SingleArcVariationalSimulator, initial_states: numpy.ndarray[numpy.float64[m, 1]], integrate_equations_concurrently: bool = True) None ¶
Function to trigger the integration of variational and dynamical equations (equations of motion).
Function to trigger the integration of the (regular) equations of motion as well as the variational equations, solving for state_history and variational_equations_history (in its two components state_transition_matrix_history & sensitivity_matrix_history).
- Parameters:
initial_states (numpy.ndarray([m, 1])) – Initial state to be used for the parameters in the equations of motion.
integrate_equations_concurrently (Bool, default = True) – Boolean defining whether equations of motion and variational equations are to be propagated concurrently (if true) or sequentially (of false).
- Returns:
Creates / modifies the properties of the VariationalSolver object.
- Return type:
None
- property dynamics_simulator¶
read-only
Simulator object containing all functionality for solving of the (regular) equations of motion.
- Type:
- property parameter_vector¶
Consolidated set of (estimatable) parameters w.r.t. the variational dynamics in the Variational Simulator are defined.
- Type:
- property sensitivity_matrix_history¶
read-only
Sensitivity matrix history, given as epoch with propagation epochs as keys. This is (alongside the state_transition_matrix_history) the solution of the variational equations.
- Type:
- property state_history¶
read-only
State history, given as epoch with propagation epochs as keys. This is the solution of the (propagated) equations of motion, describing the states along which the variational dynamics are solved.
- Type:
- property state_transition_matrix_history¶
read-only
State transition matrix history, given as epoch with propagation epochs as keys. This is (alongside the sensitivity_matrix_history) the solution of the variational equations.
- Type:
- property variational_equations_history¶
read-only
List containing the solution of the variational equations, i.e. the state transition matrix history (first entry) and sensitivity matrix history (second vector entry).
- Type:
list[ dict[float, numpy.ndarray] ]
- class Estimator¶
Class for consolidating all estimation functionality.
Class for consolidating all functionality required to perform an estimation.
- __init__(self: tudatpy.kernel.numerical_simulation.Estimator, bodies: tudatpy.kernel.numerical_simulation.environment.SystemOfBodies, estimated_parameters: tudatpy.kernel.numerical_simulation.estimation.EstimatableParameterSet, observation_settings: list[tudatpy.kernel.numerical_simulation.estimation_setup.observation.ObservationSettings], propagator_settings: tudatpy.kernel.numerical_simulation.propagation_setup.propagator.PropagatorSettings, integrate_on_creation: bool = True) None ¶
Class constructor.
Constructor through which the user can create instances of this class. Defines environment, propagation and integrations models, as well as a number of settings related to the estimatable parameters and observation settings.
Note
When using default settings, creating an object of this type automatically triggers the propagation
- Parameters:
bodies (
SystemOfBodies
) – Object defining the physical environment, with all properties of artificial and natural bodies.estimated_parameters (
EstimatableParameterSet
) – Object defining a consolidated set of estimatable parameters, linked to the environment and acceleration settings of the simulation.observation_settings (
ObservationSettings
) – List of settings objects, each object defining the observation model settings for one combination of observable and link geometry that is to be simulated.integrator_settings (
IntegratorSettings
) – Settings to create the numerical integrator that is to be used for the integration of the equations of motionpropagator_settings (
PropagatorSettings
) – Settings to create the propagator that is to be used for the propagation of dynamicsintegrate_on_creation (Bool, default = True) – Boolean defining whether the propagation should be performed immediately (default), or at a later time (when calling the
perform_estimation()
member function.
- compute_covariance(self: tudatpy.kernel.numerical_simulation.Estimator, covariance_analysis_input: tudatpy.kernel.numerical_simulation.estimation.CovarianceAnalysisInput) tudatpy.kernel.numerical_simulation.estimation.CovarianceAnalysisOutput ¶
Function to perform a covariance analysis for the given observations and parameters
Function to perform a covariance analysis for the given observations and parameters. The observations are provided through the
covariance_analysis_input
input, as are the weights \(\mathbf{W}\) and inverse a priori covariance \((\mathbf{P}_{0})^{-1}\). Calling this function uses the environment and propagator settings provided to the constructor of this Estimator class to simulate the dynamics of any relevant bodies for the observations (and associated variational equations). The observations are then computed using the observation models created by the settings provided to the constructor of this Estimator class, as is the associated design matrix \(\mathbf{H}\). This function then produces the covariance \(\mathbf{P}\) (omitting the normalization used internally for numerical stability)\[\mathbf{P}=\left(\mathbf{H}^{T}\mathbf{W}\mathbf{H}+(\mathbf{P}_{0})^{-1}\right)^{-1}\]Note that, although the actual observations are formally not required for a covariance analysis, all additional data (e.g. observation time, type, link ends, etc.) are. And, as such, the
covariance_analysis_input
does require the full set of observations and associated information, for consistency purposes (e.g., same input asperform_estimation
function) .- Parameters:
covariance_analysis_input (
CovarianceAnalysisInput
) – Object consolidating all relevant settings for the covariance analysis This includes foremost the simulated observations, as well as a priori information about the estimatable parameters- Returns:
Object containing all outputs from the estimation process.
- Return type:
vOutput
- perform_estimation(self: tudatpy.kernel.numerical_simulation.Estimator, estimation_input: tudatpy.kernel.numerical_simulation.estimation.EstimationInput) tudatpy.kernel.numerical_simulation.estimation.EstimationOutput ¶
Function to trigger the parameter estimation.
Function to trigger the parameter estimation. Much of the process and requirements are similar to those described in the
compute_covariance()
function. This function uses an iterative least-squares estimate process to fit the data (insideestimation_input
) to the model defined by the inputs to theEstimator
constructor.s- Parameters:
estimation_input (
EstimationInput
) – Object consolidating all relevant settings for the estimation This includes foremost the simulated observations, as well as a priori information about the estimatable parameters and convergence criteria for the least squares estimation.- Returns:
Object containing all outputs from the estimation process.
- Return type:
- property observation_managers¶
read-only
Observation managers contained in the Estimator object. A single observation manager can simulate observations and calculate observation partials for all link ends involved in the given observable type.
- Type:
dict[
ObservableType
,ObservationManager
]
- property observation_simulators¶
read-only
Observation simulators contained in the Estimator object. A single observation simulator hosts the functionality for simulating a given observable over the defined link geometry.
- Type:
list[
ObservationSimulator
]
- property state_transition_interface¶
read-only
State transition and sensitivity matrix interface, setting the variational equations/dynamics in the Estimator object.
- property variational_solver¶
read-only
Variational equations solver, which is used to manage and execute the numerical integration of equations of motion and variational equations/dynamics in the Estimator object.
- Type:
SingleArcVariationalSolver