Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

planar 4 bar mechanism

planar 4 bar mechanism

Hi,

I'm trying to simulate the planar 4 bar mechanism in OpenModelica using Modelica Multibody librairie.
I know that Openmodelica now support the Modelica  Multibody librairie.
But when i try to simulate the model, i have no messages and no results.
Is the problem come from Openmodelica , Modelica language or the model itself?
I tried the model in simulationX using a student version but it doesn’t work!!!

Thanks for the answer

here is the model:

model fbar
  Modelica.Mechanics.MultiBody.Joints.Revolute revolute1(n = {1,0,0}) annotation(Placement(visible = true, transformation(origin = {-12.0482,26.0241}, extent = {{-12,-12},{12,12}}, rotation = 0)));
  inner Modelica.Mechanics.MultiBody.World world annotation(Placement(visible = true, transformation(origin = {-54.9398,26.506}, extent = {{-12,-12},{12,12}}, rotation = 0)));
  Modelica.Mechanics.MultiBody.Parts.BodyShape bodyshape1(r = {0,0,1}, r_CM = {0,0,0.5}, m = 1) annotation(Placement(visible = true, transformation(origin = {30.8434,26.0241}, extent = {{-12,-12},{12,12}}, rotation = 0)));
  Modelica.Mechanics.MultiBody.Joints.Revolute revolute2(n = {1,0,0}) annotation(Placement(visible = true, transformation(origin = {64.5783,25.5422}, extent = {{-12,-12},{12,12}}, rotation = 0)));
  Modelica.Mechanics.MultiBody.Joints.Revolute revolute3(n = {1,0,0}) annotation(Placement(visible = true, transformation(origin = {55.9036,-41.9277}, extent = {{-12,-12},{12,12}}, rotation = 0)));
  Modelica.Mechanics.MultiBody.Parts.BodyShape bodyshape2(r = {0,0,1}, r_CM = {0,0,0.5}, m = 1) annotation(Placement(visible = true, transformation(origin = {20.7229,-41.9277}, extent = {{-12,-12},{12,12}}, rotation = 0)));
  Modelica.Mechanics.MultiBody.Parts.BodyShape bodyshape3(r = {0,0,1}, r_CM = {0,0,0.5}, m = 1) annotation(Placement(visible = true, transformation(origin = {84.3373,-12.5301}, extent = {{-12,12},{12,-12}}, rotation = -90)));
  Modelica.Mechanics.MultiBody.Parts.FixedTranslation fixedtranslation1(r = {0,0,1}) annotation(Placement(visible = true, transformation(origin = {-42.4096,-15.9036}, extent = {{-12,12},{12,-12}}, rotation = -90)));
equation
  connect(fixedtranslation1.frame_b,bodyshape2.frame_a) annotation(Line(points = {{-42.4096,-27.9036},{-41.9277,-27.9036},{-41.9277,-41.9277},{8.7229,-41.9277}}));
  connect(fixedtranslation1.frame_a,world.frame_b) annotation(Line(points = {{-42.4096,-3.90361},{-42.8916,-3.90361},{-42.8916,26.506},{-42.9398,26.506}}));
  connect(revolute3.frame_a,bodyshape2.frame_b) annotation(Line(points = {{43.9036,-41.9277},{32.7711,-41.9277},{32.7711,-41.9277},{32.7229,-41.9277}}));
  connect(revolute3.frame_b,bodyshape3.frame_b) annotation(Line(points = {{67.9036,-41.9277},{83.3735,-41.9277},{83.3735,-23.1325},{84.3373,-23.1325},{84.3373,-24.5301}}));
  connect(bodyshape3.frame_a,revolute2.frame_b) annotation(Line(points = {{84.3373,-0.53012},{84.8193,-0.53012},{84.8193,25.5422},{76.5783,25.5422}}));
  connect(revolute2.frame_a,bodyshape1.frame_b) annotation(Line(points = {{52.5783,25.5422},{42.8916,25.5422},{42.8916,26.0241},{42.8434,26.0241}}));
  connect(bodyshape1.frame_a,revolute1.frame_b) annotation(Line(points = {{18.8434,26.0241},{0,26.0241},{0,26.0241},{-0.0481928,26.0241}}));
  connect(world.frame_b,revolute1.frame_a) annotation(Line(points = {{-42.9398,26.506},{-23.1325,26.506},{-23.1325,26.0241},{-24.0482,26.0241}}));
  annotation(uses(Modelica(version = "3.2")), Diagram(graphics));
end fbar;

Edited by: Houssem - Sep-24-12 18:38:17

Re: planar 4 bar mechanism

Hi,

It seems our back-end goes infinite on this model.
I reported a bug about this here:
https://trac.openmodelica.org/OpenModelica/ticket/1948

Cheers,
Adrian Pop/

Re: planar 4 bar mechanism

Hi,

you have to replace one of the revolutes with a RevolutePlanarLoopConstraint. Without that your model is structuraly singulare because is is overconstrained.

Cheers

Jens

Re: planar 4 bar mechanism

Now OMC reports an error message in case of singulare systems. (r14028)

There are 0 guests and 0 other users also viewing this topic