- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » Error using MultiBody.Joints.Prismatic
Error using MultiBody.Joints.Prismatic
Error using MultiBody.Joints.Prismatic
Hello,
I want to model a (Coulomb) friction force on the translation of BodyBox components (from the MultiBody library). I want to do this by attaching the frames of the BodyBox components to Fixed components, via two Prismatic joints (the movement is two dimensional). Consequently I want to attach a SupportFriction component to the flanges of the Prismatic joints.
However, I get the error message that the model is singular. Can anyone explain why?
As an example, please consider the following code for a simple pendulum that incorporates the above mentioned construction and results in the error when simulated in OMEdit 1.7.0 (without the Prismatic joints, Fixed and SupportFriction it runs without problems):
Code:
model pendulum
inner Modelica.Mechanics.MultiBody.World world;
Modelica.Mechanics.MultiBody.Joints.Revolute revolute1(useAxisFlange = false, n = {0,0,1});
Modelica.Mechanics.MultiBody.Parts.BodyBox element1(r_0(start = {0,0,0}, fixed = true), r = {1,0,0}, width = 0.1);
Modelica.Mechanics.MultiBody.Parts.Fixed fixed(r = {1,0,0});
Modelica.Mechanics.MultiBody.Joints.Prismatic prismaticX(useAxisFlange = false, n = {1,0,0}, stateSelect = StateSelect.always, v(fixed = true), s(fixed = true, start = 0));
Modelica.Mechanics.MultiBody.Joints.Prismatic prismaticY(useAxisFlange = true, n = {0,1,0}, stateSelect = StateSelect.always, v(fixed = true), s(fixed = true, start = 0));
Modelica.Mechanics.Translational.Components.SupportFriction frictionForce(useSupport = false);
equation
connect(world.frame_b, revolute1.frame_a);
connect(revolute1.frame_b, element1.frame_a);
connect(fixed.frame_b, prismaticX.frame_a);
connect(prismaticX.frame_b, prismaticY.frame_a);
connect(prismaticY.frame_b, element1.frame_b);
connect(prismaticY.axis, frictionForce.flange_a);
connect(prismaticY.support, frictionForce.flange_b);
end pendulum;
Kind regards,
Pieter
Re: Error using MultiBody.Joints.Prismatic
OpenModelica says:
Code:
[/home/marsj/dev/trunk/build/lib/omlibrary/Modelica 3.1/Mechanics/MultiBody/Joints.mo:331:7-331:60:writable] Error: Model is structurally singular, error found sorting equations revolute1.R_rel.T[2,3] = revolute1.e[2] * revolute1.e[3] + cos(revolute1.phi) * ((-revolute1.e[2]) * revolute1.e[3]) - (-sin(revolute1.phi)) * revolute1.e[1];
revolute1.R_rel.T[2,2] = revolute1.e[2] * revolute1.e[2] + cos(revolute1.phi) * (1.0 - revolute1.e[2] * revolute1.e[2]);
revolute1.R_rel.T[1,3] = revolute1.e[1] * revolute1.e[3] + cos(revolute1.phi) * ((-revolute1.e[1]) * revolute1.e[3]) - sin(revolute1.phi) * revolute1.e[2];
revolute1.R_rel.T[1,1] = revolute1.e[1] * revolute1.e[1] + cos(revolute1.phi) * (1.0 - revolute1.e[1] * revolute1.e[1]);
0.0 = atan2(-revolute1.R_rel.T[1,3],revolute1.R_rel.T[2,2]);
0.0 = atan2(revolute1.R_rel.T[2,3],revolute1.R_rel.T[1,1]);
for variables revolute1.phi(17), revolute1.R_rel.T[2,3](13), revolute1.R_rel.T[2,2](12), revolute1.R_rel.T[1,3](10), revolute1.R_rel.T[1,1](8),
Dymola 7.4 demo says:
Code:
The model includes the following hints:
All Forces cannot be uniquely calculated.
The reason could be that the mechanism contains
a planar loop or that joints constrain the
same motion. For planar loops, use for one
revolute joint per loop the joint
Joints.RevolutePlanarLoopConstraint instead of
Joints.Revolute.
How it came to that conclusion I have no idea.
- sjoelund.se
-
-
- 1700 Posts
- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » Error using MultiBody.Joints.Prismatic