Group Abstract Group Abstract

Message Boards Message Boards

0
|
9.3K Views
|
3 Replies
|
1 Total Like
View groups...
Share
Share this post:

Two identical models, one with structural singularly

Posted 5 years ago

In a futile attempt to save some hand calculation time (and get in much needed practice in system modeler), I decided to modify an already existing model,

"PistenEngine" from the PlanarMechanics example list and simply replicate it one to one in Modelica parts.

planar

The original model (with added constant angular velocity)

and my new version

modelica

I intend to extent my model with other things, however I just wanted to get this working first in what I thought would be mere minutes to be now constantly hit with errors of singularity.

Building "flywheel" as experiment "temporary-experiment" started at 13:35:35 [:0:0-0:0] Error: Model is structurally singular, the following equations do not allow to solve for required variables:

Then there is a massive list of equation errors.

There is something I am fundamentally misunderstanding? If this model is singular, why does planarmechanics have no issues?

POSTED BY: Mor Bo
3 Replies

When working with the Multi-body libraries you might sometimes create a so called algebraic loop. These have to be broken using Modelica.Mechanics.MultiBody.Joints.RevolutePlanarLoopConstraint. This is a suggested solution using it: enter image description here

Here are some notes that might help in the future:

  • Note that I re-arranged the model a bit to make it easier for my-self to see how the model is actually connected. At least for me this makes it a bit easier. (As you can see I have diagonal connection lines, I can accomplish this by first making a connection, then hovering over the green corner points and clicking "-" to remove them)
  • My first step was actually to connect this: enter image description here I.e. I did not connect the entire loop. Instead I added a couple of point masses (btw, in general it is a good idea to have masses in the model to make it numerically easier to handle). That way I can see if I got the coordinates right to begin with: enter image description here Of course when I simulate it I will not have the correct behavior yet though: enter image description here
  • I then connected the last revolute, and as I realized tat it was an algebraic loop I used the RevolutePlanarLoopConstraint for this.

Hope this helps. I have attached the code.

Attachments:
POSTED BY: Jan Brugard
Posted 2 years ago

Thanks for this post! I was experiencing this very problem, but I couldn't us Planar Mechanics as my application needs a third dimension. I repeated your analysis of substituting balls and then inserting a RevolutePlanarLoopConstraint and I was able to compile. Thanks again!

POSTED BY: Glen Thomas
Posted 5 years ago
POSTED BY: Mor Bo
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard