Message Boards Message Boards

0
|
6176 Views
|
3 Replies
|
1 Total Likes
View groups...
Share
Share this post:
GROUPS:

Strut displacement...

Posted 10 years ago

I am trying to create a simple strut, with a rotational spring hinge at midheight.
It has a pinned support, rotational spring at midheight, and a vertical pinned roller at the top. I can create a model like this when it's static, but once I try to make the vertical roller support start to move downwards (to cause the central hinge to move outwards and buckle at mid-height) I start to get errors. Ultimately I'm looking to measure the relative angle between the struts at midheight (if I could lose the mass at mid-height and use massless struts that would be better) and a reaction at the base of the strut. My attempt so far is attached below. Any suggestions, gratefully received.

Attachments:
POSTED BY: Neil
3 Replies
Posted 10 years ago

Thank you, the first model behaves pretty much as I had intended so sharing your code is really helpful.

Hopefully this will help me arrange the model in the second version to get to where I want to be as well.

Thanks. :)

POSTED BY: Neil
Posted 10 years ago

Judging from the icons in your screenshots it seems like you are using an older version of WSM (version 3.0 or possibly 3.1). Based on your screenshots I have re-implemented your models in version 4 and fixed the problems. If you let us know which version you are running, which error messages you're getting, and provide your model code we can give you more detailed help.

Model 1

In order to fix this I did the following:

  1. re-implement the model based on the parameters in your screen-shots
  2. assuming that the force you're applying is in the direction of gravity
  3. turn of animation for parts that I was not interested in (joints, and fixed)
  4. Increase the start angle for the rods in order to make it easier to see what's going on

Once I did this I could see that the error occurred once the strut reached straight position (a singular state). This happened because the constant speed was applied in the wrong direction. Changing sign for this fixed the problem. Btw, if possible constant speed (and similar inputs) should be avoided and replaced with forces or torques as this is more physically correct as well as easier on the solver. :)

This is the model:

model Model1
  inner Modelica.Mechanics.MultiBody.World world annotation(Placement(visible = true, transformation(origin = {-110, -30}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Mechanics.MultiBody.Joints.Revolute revolute1(useAxisFlange = true, animation = false) annotation(Placement(visible = true, transformation(origin = {0, -30}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Mechanics.MultiBody.Parts.Fixed fixed(r = {0, 2, 0}, animation = false) annotation(Placement(visible = true, transformation(origin = {115, -85}, extent = {{10, -10}, {-10, 10}}, rotation = 0)));
  Modelica.Mechanics.Rotational.Components.SpringDamper springDamper(c = 100, d = 1) annotation(Placement(visible = true, transformation(origin = {-5, 2.18}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Mechanics.MultiBody.Parts.FixedTranslation fixedTranslation(r = {0.1, 1, 0}) annotation(Placement(visible = true, transformation(origin = {-30, -30}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Mechanics.MultiBody.Parts.FixedTranslation fixedTranslation1(r = {-0.1, 1, 0}) annotation(Placement(visible = true, transformation(origin = {45, -30}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Mechanics.MultiBody.Joints.Revolute revolute2(useAxisFlange = false, animation = false) annotation(Placement(visible = true, transformation(origin = {-70, -30}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Mechanics.MultiBody.Parts.Body body(m = 2, animation = false) annotation(Placement(visible = true, transformation(origin = {20, -70}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
  Modelica.Mechanics.MultiBody.Joints.RevolutePlanarLoopConstraint revolute(animation = false) annotation(Placement(visible = true, transformation(origin = {71.655, -30}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Mechanics.Translational.Sources.ConstantSpeed constantSpeed(v_fixed = 0.02) annotation(Placement(visible = true, transformation(origin = {100, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Mechanics.MultiBody.Joints.Prismatic prismatic(useAxisFlange = true, n = {0, 1, 0}, animation = false) annotation(Placement(visible = true, transformation(origin = {100, -30}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
equation
  connect(prismatic.frame_b, fixed.frame_b) annotation(Line(visible = true, origin = {107.5, -52.667}, points = {{2.5, 22.667}, {5.725, 22.667}, {5.725, 9.667}, {-5.725, 9.667}, {-5.725, -32.333}, {-2.5, -32.333}}));
  connect(constantSpeed.flange, prismatic.axis) annotation(Line(visible = true, origin = {111.112, -12}, points = {{-1.112, 12}, {2.112, 12}, {2.112, -12}, {-3.112, -12}}, color = {0, 127, 0}));
  connect(revolute.frame_b, prismatic.frame_a) annotation(Line(visible = true, origin = {85.827, -30}, points = {{-4.173, 0}, {4.173, 0}}));
  connect(fixedTranslation1.frame_b, revolute.frame_a) annotation(Line(visible = true, origin = {58.327, -30}, points = {{-3.327, 0}, {3.327, 0}}));
  connect(body.frame_a, fixedTranslation1.frame_a) annotation(Line(visible = true, origin = {25, -40}, points = {{-5, -20}, {-5, 10}, {10, 10}}));
  connect(revolute1.frame_b, body.frame_a) annotation(Line(visible = true, origin = {16.667, -40}, points = {{-6.667, 10}, {3.333, 10}, {3.333, -20}}));
  connect(fixedTranslation.frame_b, revolute1.frame_a) annotation(Line(visible = true, origin = {-15, -30}, points = {{-5, 0}, {5, -0}}));
  connect(revolute2.frame_b, fixedTranslation.frame_a) annotation(Line(visible = true, origin = {-50, -30}, points = {{-10, 0}, {10, 0}}));
  connect(world.frame_b, revolute2.frame_a) annotation(Line(visible = true, origin = {-90, -30}, points = {{-10, -0}, {10, 0}}));
  connect(revolute1.axis, springDamper.flange_b) annotation(Line(visible = true, origin = {4.2, -9.838}, points = {{-4.2, -10.162}, {-4.2, -6.937}, {3.8, -6.937}, {3.8, 12.018}, {0.8, 12.018}}));
  connect(springDamper.flange_a, revolute1.support) annotation(Line(visible = true, origin = {-12.69, -9.838}, points = {{-2.31, 12.018}, {-5.535, 12.018}, {-5.535, -6.937}, {6.69, -6.937}, {6.69, -10.162}}));
  annotation(Diagram(coordinateSystem(extent = {{-148.5, -105}, {148.5, 105}}, preserveAspectRatio = true, initialScale = 0.1, grid = {5, 5})));
end Model1;

Model 2

I applied steps 1-3 and the model worked directly. My assumption is that you have stumbled into a problem with version 3 that has been fixed in version 4. Note though that in this version the strut doesn't do exactly what you want as it acts more as a pendulum than a strut, as there's nothing holding it up at the moment (which I assume is according to your modeling plan).

This is the model:

model Model2
  inner Modelica.Mechanics.MultiBody.World world(animateWorld = false) annotation(Placement(visible = true, transformation(origin = {-130, 10}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Mechanics.MultiBody.Parts.BodyCylinder bodyCylinder(r = {0.01, 1, 0}, color = {0, 128, 0}) annotation(Placement(visible = true, transformation(origin = {-55, 10}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Mechanics.MultiBody.Parts.BodyCylinder bodyCylinder1(r = {-0.01, 1, 0}, color = {255, 0, 0}) annotation(Placement(visible = true, transformation(origin = {10, 10}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Mechanics.MultiBody.Joints.Revolute revolute1(useAxisFlange = true, animation = false) annotation(Placement(visible = true, transformation(origin = {-20, 10}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Mechanics.MultiBody.Joints.Planar planar(animation = false) annotation(Placement(visible = true, transformation(origin = {50, 10}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Mechanics.MultiBody.Parts.Fixed fixed(r = {0, 2, 0}, animation = false) annotation(Placement(visible = true, transformation(origin = {90, 10}, extent = {{10, -10}, {-10, 10}}, rotation = 0)));
  Modelica.Mechanics.Rotational.Components.SpringDamper springDamper(c = 100, d = 5) annotation(Placement(visible = true, transformation(origin = {-25, 42.18}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Mechanics.MultiBody.Joints.RevolutePlanarLoopConstraint revolute(animation = false) annotation(Placement(visible = true, transformation(origin = {-90, 10}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Blocks.Sources.Ramp ramp(duration = 5) annotation(Placement(visible = true, transformation(origin = {-125, 80}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Mechanics.MultiBody.Forces.WorldForce force(animation = false) annotation(Placement(visible = true, transformation(origin = {-50, 70}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Blocks.Sources.Constant const1(k = 0) annotation(Placement(visible = true, transformation(origin = {-125, 47.968}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Blocks.Sources.Constant const(k = 0) annotation(Placement(visible = true, transformation(origin = {-126.723, 110}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
equation
  connect(const.y, force.force[1]) annotation(Line(visible = true, origin = {-76.931, 90}, points = {{-38.792, 20}, {11.931, 20}, {11.931, -20}, {14.931, -20}}, color = {0, 0, 127}));
  connect(const1.y, force.force[3]) annotation(Line(visible = true, origin = {-76.5, 58.984}, points = {{-37.5, -11.016}, {11.5, -11.016}, {11.5, 11.016}, {14.5, 11.016}}, color = {0, 0, 127}));
  connect(ramp.y, force.force[2]) annotation(Line(visible = true, origin = {-76.5, 75}, points = {{-37.5, 5}, {11.5, 5}, {11.5, -5}, {14.5, -5}}, color = {0, 0, 127}));
  connect(force.frame_b, bodyCylinder1.frame_b) annotation(Line(visible = true, origin = {6.506, 40}, points = {{-46.506, 30}, {16.506, 30}, {16.506, -30}, {13.494, -30}}));
  connect(world.frame_b, revolute.frame_a) annotation(Line(visible = true, origin = {-110, 10}, points = {{-10, 0}, {10, 0}}));
  connect(revolute.frame_b, bodyCylinder.frame_a) annotation(Line(visible = true, origin = {-72.5, 10}, points = {{-7.5, 0}, {7.5, 0}}));
  connect(revolute1.axis, springDamper.flange_b) annotation(Line(visible = true, origin = {-15.8, 30.162}, points = {{-4.2, -10.162}, {-4.2, -6.937}, {3.8, -6.937}, {3.8, 12.018}, {0.8, 12.018}}));
  connect(springDamper.flange_a, revolute1.support) annotation(Line(visible = true, origin = {-32.69, 30.162}, points = {{-2.31, 12.018}, {-5.535, 12.018}, {-5.535, -6.937}, {6.69, -6.937}, {6.69, -10.162}}));
  connect(planar.frame_b, fixed.frame_b) annotation(Line(visible = true, origin = {70, 10}, points = {{-10, -0}, {10, 0}}));
  connect(bodyCylinder1.frame_b, planar.frame_a) annotation(Line(visible = true, origin = {30, 10}, points = {{-10, -0}, {10, 0}}));
  connect(revolute1.frame_b, bodyCylinder1.frame_a) annotation(Line(visible = true, origin = {-5, 10}, points = {{-5, -0}, {5, 0}}));
  connect(bodyCylinder.frame_b, revolute1.frame_a) annotation(Line(visible = true, origin = {-37.5, 10}, points = {{-7.5, 0}, {7.5, -0}}));
  annotation(Diagram(coordinateSystem(extent = {{-148.5, -105}, {148.5, 105}}, preserveAspectRatio = true, initialScale = 0.1, grid = {5, 5})));
end Model2;
POSTED BY: Updating Name
Posted 10 years ago

A different attempt at the same sort of behaviour... equally as unsuccessful though unfortunately... Rather than applying a constant velocity I've tried to exchange this for a ramped force at the top of the upper end of the strut.
enter image description here

POSTED BY: Neil
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract