Opened 6 years ago

Last modified 6 years ago

#5083 closed defect

Issue with MultiBody models in the NF due to lack of scalar product expansion — at Initial Version

Reported by: Francesco Casella Owned by: Per Östlund
Priority: high Milestone: 2.0.0
Component: New Instantiation Version:
Keywords: Cc:

Description

Please check Modelica.Mechanics.MultiBody.Examples.Elementary.LineForceWithTwoMasses. Some analysis carried out with the transformational debugger reveals that the equation

revolute1.tau = -revolute1.frame_b.t * revolute1.e;

coming out of the NF is firsts transformed by substitution into

revolute1.constantTorque.tau_constant = 
  -{-bodyBox1.frame_a.t[1], -bodyBox1.frame_a.t[2], -bodyBox1.frame_a.t[3]} * revolute1.e

which is correct, and then solved in the torn section of a nonlinear system as

bodyBox1.frame_a.t[2] =
  (-({-bodyBox1.frame_a.t[1], -0.0, -bodyBox1.frame_a.t[3]} * revolute1.e + revolute1.constantTorque.tau_constant)) / ({-0.0, -1.0, -0.0} * revolute1.e)

which seems to me plain wrong, and causes a division by zero, as revolute1.e={0,0,1} .

The old FE instead expands the scalar product in the equation, passing it to the back-end as

  revolute1.tau = (-revolute1.frame_b.t[3]) * revolute1.e[3] - revolute1.frame_b.t[1] * revolute1.e[1] - revolute1.frame_b.t[2] * revolute1.e[2];

which allows the back-end to process the equations correctly and eventually find the correct result. This issue currently prevents a lot of MultiBody models to simulate when using the NF.

I see two problems here. The first is that the NF does not expand revolute1.e into its components and does not compute the scalar product explicitly, as the OF did. If this could be fixed, we should hopefully get most of the MultiBody models to work with the NF.

The second is that the back-end solves an equation in a way that I cannot explain and seems to me plain wrong. I'll open a separate ticket on this topic.

Change History (0)

Note: See TracTickets for help on using tickets.