Skip to content

Connection graph equations of redundant overconstrained connect-equations #3370

@henrikt-ma

Description

@henrikt-ma

As an extreme case of a redundant connect-equation in an overconstrained connect set, consider this simple model:

model SelfConnectedFrame
  inner Modelica.Mechanics.MultiBody.World world;
  Modelica.Mechanics.MultiBody.Parts.Body body(m = 1, r_CM = {0, 0, 0});
equation
  connect(body.frame_a, body.frame_a); /* Redundant connect-equation. */
end SelfConnectedFrame;

As the connection graph just has a single node, the spanning tree is empty, so according to item (2) in the second item list of https://specification.modelica.org/master/connectors-and-connections.html#generation-of-connection-graph-equations, it results in the equation:

0 = Modelica.Mechanics.MultiBody.Frames.Orientation.equalityConstraint(body.frame_a.R, body.frame_a.R)

I'd just like to verify that it is really the intention of the specification that redundant connect-equations should result in an equalityConstraint-equation (making the model above not globally balanced)?

Note that the problem isn't limited to connect-equation self-loops, but seems to affect redundant connect-equations more generally. For example, repeating a connect-equation would have similar effect.

Here's another variant of a redundant connect-equation:

model OverConnectedFrames
  inner Modelica.Mechanics.MultiBody.World world;
  Modelica.Mechanics.MultiBody.Parts.Body body1(m = 1, r_CM = {0, 0, 0});
  Modelica.Mechanics.MultiBody.Parts.Body body2(m = 1, r_CM = {0, 0, 0});
  Modelica.Mechanics.MultiBody.Parts.Body body3(m = 1, r_CM = {0, 0, 0});
equation
  connect(body1.frame_a, body2.frame_a);
  connect(body2.frame_a, body3.frame_a);
  connect(body3.frame_a, body1.frame_a);
end OverConnectedFrames;

Also this time, it seems surprising that what matters for the balancing of variables and equations is not the connection set, but the structure of the connect-equations forming the set. Am I missing something?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions