Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

Differences between model with components and model with equations

Differences between model with components and model with equations

Dear Colleagues,

I have set up two OpenModelica models to simulate the attitude dynamics of a spacecraft with one single gimbal Variable Speed Control Moment Gyroscope (VSCMG). One model uses equations that closely follow those described by Schaub and Junkins (Schaub, H., and Junkins, J. L. Analytical Mechanics of Space Systems: AIAA, 2018, pp. 211-220.). The second model uses components from the multibody library  to simulate the same dynamics.

I have noticed an interesting difference between simulation results generated with two models that I cannot explain on my own. Hence, I am posting the results here to ask the community for hints and advice.

The setup of the simulations is as follows: 1) input torques for the gimbal and reaction wheel are null; 2) the initial angular velocity (deg/s) of the spacecraft is (0,0,180) with respect to an inertial reference frame; 3) there is no gravitational acceleration. I have used the DASSL integrator with a tolerance of 1e-6 and the default settings in OMEdit. I have also spent a reasonable amount of time making sure that I cleared bugs and that the models have the same inertial properties, etc, etc.

This is what I have observed.

If  the Center of Mass (CoM) of the VSCMG is placed at the CoM of the spacecraft then the rotational Kinetic Energy (KE)  for both models if constant, within some 1e-8J after 100s. I have been pleasantly  surprised to notice that the rotational KE of the model with components is rock steady constant while the one of the model with equations is somewhat noisy.

If  the CoM of the VSCMG is offset from the CoM of the spacecraft then the rotational Kinetic Energy (KE) of the model with components is oscillating a little, third decimal place in the example I am posting.

From what I can tell energy is conserved. Assuming that I got rid of all the bugs the only explanation is that in the model with components the rotational KE is converted back and forth between components. However, I have not been able to determine if my intuition is correct, where this conversion might take place, and how to avoid it. I am curious if anyone has experienced anything similar. Is there a simple initial equation setting that I am missing or something subtle in setting up the multibody components?

For some reason I can only load PDF attachments. Please see below.
VSCMG-CoM-offset-from-spacecraft-CoM.pdf
VSCMG-CoM-at-spacecraft-CoM.pdf


Thank you. Mit gruessen.



Bogdan

Edited by: bogey - Aug-06-20 05:11:56
There are 0 guests and 0 other users also viewing this topic
You are here: