Skip to content

Commit

Permalink
Minor corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
DominicDirkx committed Sep 3, 2024
1 parent d79bf8c commit 246c3c8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 0 additions & 2 deletions estimation/estimation_with_mpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,13 @@
"""

## Import statements
"""
# Tudat imports for propagation and estimation
from tudatpy.interface import spice
from tudatpy import numerical_simulation
from tudatpy.numerical_simulation import environment_setup
from tudatpy.numerical_simulation import propagation_setup
from tudatpy.numerical_simulation import estimation, estimation_setup
from tudatpy.numerical_simulation.estimation_setup import observation
"""

# import MPC interface
from tudatpy.data.mpc import BatchMPC
Expand Down
4 changes: 2 additions & 2 deletions propagation/coupled_translational_rotational_dynamics.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1058,7 +1058,7 @@
"## Getting rid of the normal modes\n",
"As we just saw, Phobos does not rotate the way we would expect it to, due to the presence of excited normal modes. The fact that the normal mode is excited is a result of the initial rotational state, which is not consistent with rotational dynamics in which the normal modes are damped. We solve this problem by determining an initial state where these normal modes **are** damped, following the method used by (Rambaux et al. 2010). Specifically, we introduce a _virtual torque_ (\"virtual\" is a scientific word for \"made up\") that we know has a strong damping effect, and we propagate the dynamics forward in time. At one point, we will reach a state in which the normal modes have been eliminated from the dynamics (or 'damped'). Now, we remove this damping torque and we propagate the dynamics backward in time from this point onwards, until we reach our original initial time. This new rotational state that we have found, and will call the _damped initial state_ would ideally not excite the normal modes of Phobos when propagated forward again using our 'normal' (e.g. without the virtual torque) dynamical model.\n",
"\n",
"In practice, the normal mode will be excited much less than initially, but some excitation still remains. This is further resolved by repeating the above procedure many times, with increasing 'damping times'. In Tudat, this approach is automated by the `get_zero_proper_mode_rotational_state` function [TODO: add API docs], where additional details of the algorithm are described. In short, a _damping time_ :math:`\\tau_{d}` is selected, which is a measure of how quick the virtual torque will eliminate the normal modes, and it is used to compute the torque. The propagation is performed forwards in time with the virtual torque enabled, for :math:`10 \\tau_{d}`, and backwards to the original time without it. The new initial state is used in another iteration with a new and larger damping time. The implementation of the virtual torque in this algorithm is very specific to bodies in spin-orbit resonance, which will (averaged over long time periods) rotate uniformly around their body-fixed :math:`z` axis, with a period equal to the orbital period. The damping torque will act to prevent the excitation of the normal modes while preserving that uniform rotation. The function thus requires as inputs: (1) the `bodies` object, (2) the `propagator_settings` object, (3) the mean rotational rate of the body around its Z axis, and (4) a list of dissipation times or damping times in order to compute the virtual torques for the different iteration. The above is implemented as follows:"
"In practice, the normal mode will be excited much less than initially, but some excitation still remains. This is further resolved by repeating the above procedure many times, with increasing 'damping times'. In Tudat, this approach is automated by the `get_damped_proper_mode_initial_rotational_state` function [TODO: add API docs], where additional details of the algorithm are described. In short, a _damping time_ :math:`\\tau_{d}` is selected, which is a measure of how quick the virtual torque will eliminate the normal modes, and it is used to compute the torque. The propagation is performed forwards in time with the virtual torque enabled, for :math:`10 \\tau_{d}`, and backwards to the original time without it. The new initial state is used in another iteration with a new and larger damping time. The implementation of the virtual torque in this algorithm is very specific to bodies in spin-orbit resonance, which will (averaged over long time periods) rotate uniformly around their body-fixed :math:`z` axis, with a period equal to the orbital period. The damping torque will act to prevent the excitation of the normal modes while preserving that uniform rotation. The function thus requires as inputs: (1) the `bodies` object, (2) the `propagator_settings` object, (3) the mean rotational rate of the body around its Z axis, and (4) a list of dissipation times or damping times in order to compute the virtual torques for the different iteration. The above is implemented as follows:"
]
},
{
Expand Down Expand Up @@ -1094,7 +1094,7 @@
"phobos_mean_rotational_rate = 0.000228035245 # In rad/s\n",
"# As dissipation times, we will start with 4h and keep duplicating the damping time in each iteration. In the final iteration, a damping time of 4096h means a propagation time of 40960h, which is a bit over 4.5 years.\n",
"dissipation_times = list(np.array([4.0, 8.0, 16.0, 32.0, 64.0, 128.0, 256.0, 512.0, 1024.0, 2048.0, 4096.0])*3600.0) # In seconds. Here, we\n",
"damping_results = numerical_simulation.propagation.get_zero_proper_mode_rotational_state(bodies,\n",
"damping_results = numerical_simulation.propagation.get_damped_proper_mode_initial_rotational_state(bodies,\n",
" combined_propagator_settings,\n",
" phobos_mean_rotational_rate,\n",
" dissipation_times)\n",
Expand Down
2 changes: 1 addition & 1 deletion propagation/coupled_translational_rotational_dynamics.py
Original file line number Diff line number Diff line change
Expand Up @@ -817,7 +817,7 @@ def get_longitudinal_normal_mode_from_inertia_tensor(inertia_tensor: np.ndarray,
phobos_mean_rotational_rate = 0.000228035245 # In rad/s
# As dissipation times, we will start with 4h and keep duplicating the damping time in each iteration. In the final iteration, a damping time of 4096h means a propagation time of 40960h, which is a bit over 4.5 years.
dissipation_times = list(np.array([4.0, 8.0, 16.0, 32.0, 64.0, 128.0, 256.0, 512.0, 1024.0, 2048.0, 4096.0])*3600.0) # In seconds. Here, we
damping_results = numerical_simulation.propagation.get_zero_proper_mode_rotational_state(bodies,
damping_results = numerical_simulation.propagation.get_damped_proper_mode_initial_rotational_state(bodies,
combined_propagator_settings,
phobos_mean_rotational_rate,
dissipation_times)
Expand Down

0 comments on commit 246c3c8

Please sign in to comment.