OpenModelica trivial mechanical system structurally singular

649 Views Asked by At

While trying to model a more complex mechanical system in OM, I got the following error:

Internal error IndexReduction.pantelidesIndexReduction failed! System is structurally singular and cannot be handled because the number of unassigned equations is larger than the number of states.

So I reduced the system to a more or less trivial one, but still got the same error. trivial statically determinate system

The intention of this trivial example is to basically model the fixation of a bridge on both sides, where you have one rotational joint and one sliding/rotational joint, thereby making this multibody system determinate in the planar case (rotational joints are around z). To account for the system being overdetermined out-of-plane, I'd replace the prismatic joint by a cylindrical one, but that doesn't seem to make a difference.

Replacing the right revolute-joint + prismatic joint by a spring works, but that's obviously a different case and doesn't make me understand the error of the described model.

Any ideas?

The model code is like this:

model structsingtst01
  inner Modelica.Mechanics.MultiBody.World world annotation(
    Placement(visible = true, transformation(origin = {-76, 66}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Mechanics.MultiBody.Joints.Revolute revolute(phi(displayUnit = "rad"), stateSelect = StateSelect.avoid)  annotation(
    Placement(visible = true, transformation(origin = {-44, 36}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Mechanics.MultiBody.Parts.Fixed fixed(r = {-1, 0, 0})  annotation(
    Placement(visible = true, transformation(origin = {-76, 36}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Mechanics.MultiBody.Parts.Fixed fixed1(r = {1.2, 0, 0})  annotation(
    Placement(visible = true, transformation(origin = {116, 36}, extent = {{10, -10}, {-10, 10}}, rotation = 0)));
  Modelica.Mechanics.MultiBody.Parts.BodyBox bodyBox(enforceStates = true, r = {1, -1, 0})  annotation(
    Placement(visible = true, transformation(origin = {-14, 36}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Mechanics.MultiBody.Parts.BodyBox bodyBox1(enforceStates = true, r = {1, 1, 0}) annotation(
    Placement(visible = true, transformation(origin = {26, 36}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Mechanics.MultiBody.Joints.Revolute revolute1 annotation(
    Placement(visible = true, transformation(origin = {56, 36}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Mechanics.MultiBody.Joints.Prismatic prismatic(n = {1, 0, 0}, s(fixed = true, start = 0.2), useAxisFlange = false)  annotation(
    Placement(visible = true, transformation(origin = {86, 36}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
equation
  connect(fixed.frame_b, revolute.frame_a) annotation(
    Line(points = {{-66, 36}, {-54, 36}, {-54, 36}, {-54, 36}}));
  connect(revolute.frame_b, bodyBox.frame_a) annotation(
    Line(points = {{-34, 36}, {-24, 36}, {-24, 36}, {-24, 36}}, color = {95, 95, 95}));
  connect(bodyBox.frame_b, bodyBox1.frame_a) annotation(
    Line(points = {{-4, 36}, {16, 36}}, color = {95, 95, 95}));
  connect(revolute1.frame_a, bodyBox1.frame_b) annotation(
    Line(points = {{46, 36}, {36, 36}}, color = {95, 95, 95}));
  connect(revolute1.frame_b, prismatic.frame_a) annotation(
    Line(points = {{66, 36}, {76, 36}}, color = {95, 95, 95}));
  connect(prismatic.frame_b, fixed1.frame_b) annotation(
    Line(points = {{96, 36}, {106, 36}}, color = {95, 95, 95}));
  annotation(
    uses(Modelica(version = "3.2.3")),
    Diagram(coordinateSystem(extent = {{-200, 0}, {200, 0}})),
    Icon(coordinateSystem(extent = {{-200, 0}, {200, 0}})),
    version = "");
end structsingtst01;
1

There are 1 best solutions below

0
On

Actually this is similar to the "planar loop" example mentioned in the documentation for Modelica.Mechanics.MultiBody.Joints.RevolutePlanarLoopConstraint, so indeed replacing one of the Modelica.Mechanics.MultiBody.Joints.Revolute by a RevolutePlanarLoopConstraint made the model work.