-
Notifications
You must be signed in to change notification settings - Fork 176
Improve inheritance of MultiBody forces #4228
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
HansOlsson
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is ok, but I noticed one confusing issue:
The R_Rel in PartialForce is new - even though it was previously documented!
That breaks some of the stated compatibility issues, but on the other hand it is a clear bug.
To me it seems straight forward to have R_rel as a counterpart to r_rel_b. So I would prefer to retain this new variable. |
If it is a maintenance fix it would break the rule in Modelica.UsersGuide.ReleaseNotes.VersionManagement
However, one could argue that it isn't a new name as it was already documented. |
Good Idea. Yet another possibility would be to wait with merging till there is a dedicated v4.1.0 branch. |
HansOlsson
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
|
@MartinOtter , could you please provide your review for this PR? |
MartinOtter
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- This proposal is not backwards compatible: Assume PartialForce is used outside of MSL, then this will give an error, because the new Partial Force has R_rel, which an existing model of Partial Force might have in some (rare) cases.
- The new implementation is significantly less efficient: Computing a relative rotation matrix requires 27 multiplications. Furthermore two forces and torques are transformed with this matrix: In total 27+3+3 = 33 multiplications
The current implementation does not compute R_rel, but uses Frames.resolveRelative, which requires 6 multiplications. Since 2 vectors (force and torque) are transformed in the "old" PartialForce, a total of 12 multiplications is used to achieve the same result
(12 << 33). For pure force elements (torque = 0), R_rel is not needed, and therefore efficiency is reduced for these force elements.
|
@tobolar, we have a cut-off date on Feb 2, if you think you can manage this issue by then, please go ahead, otherwise I'd suggest we reschedule for 4.2.0. There is no need to delay 4.1.0, which already has a lot of improvements, the next release will be within one year. Thanks! |
|
@MartinOtter and @HansOlsson please review and finalize this PR, otherwise agree with @tobolar on shifting the milestone. |
Ok, this is reasonable.
Hmm. I didn't consider this. Just considered the users view of understanding, where having the relative Martix |
Refs #3739
This is the next PR to #4227.
I've also performed partial regression tests of multibody examples. No difference to reference resutls indicated.