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

Animation of an rotativ System

Animation of an rotativ System

Hello,

I try to visualize a rotative Mass-Spring-System in a 3D Model. The first body is moving like I´d like to.
The problem is that the spring is not rotating, it´s just making a translationally movement and that causes the same movement for the connected bodycylinder.
But I would like a system which is only rotating and not moving in a translationally way.
Is there any possibility to do this with springs?


Here is my system:

model Modalanalyse_Mehrmassenschwinger_Animation4
  Modelica.Mechanics.Rotational.Sources.Torque torque1 annotation(
    Placement(visible = true, transformation(origin = {-68, 40}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Blocks.Sources.Sine sine1(freqHz = 5)  annotation(
    Placement(visible = true, transformation(origin = {-128, 40}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Mechanics.MultiBody.Joints.Revolute revolute1(n = {1, 0, 0}, phi(fixed = true), useAxisFlange = true, w(fixed = true))  annotation(
    Placement(visible = true, transformation(origin = {-52, -18}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Mechanics.MultiBody.Parts.BodyCylinder bodyCylinder1(diameter = 0.1, r = {0.5, 0, 0})  annotation(
    Placement(visible = true, transformation(origin = {-20, -18}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  inner Modelica.Mechanics.MultiBody.World world(driveTrainMechanics3D = true, g = 0)  annotation(
    Placement(visible = true, transformation(origin = {-96, -18}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Mechanics.MultiBody.Parts.BodyCylinder bodyCylinder2(diameter = 0.1, r = {0.5, 0, 0}, r_shape = {0, 0, 0}) annotation(
    Placement(visible = true, transformation(origin = {38, -18}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Mechanics.MultiBody.Forces.Spring spring1(c = 100, fixedRotationAtFrame_b = true)  annotation(
    Placement(visible = true, transformation(origin = {10, -18}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
equation
  connect(spring1.frame_b, bodyCylinder2.frame_a) annotation(
    Line(points = {{20, -18}, {28, -18}, {28, -18}, {28, -18}}, color = {95, 95, 95}));
  connect(spring1.frame_a, bodyCylinder1.frame_b) annotation(
    Line(points = {{0, -18}, {-10, -18}, {-10, -18}, {-10, -18}}, color = {95, 95, 95}));
  connect(revolute1.frame_b, bodyCylinder1.frame_a) annotation(
    Line(points = {{-42, -18}, {-30, -18}}, color = {95, 95, 95}));
  connect(torque1.flange, revolute1.axis) annotation(
    Line(points = {{-58, 40}, {-52, 40}, {-52, -8}, {-52, -8}}));
  connect(sine1.y, torque1.tau) annotation(
    Line(points = {{-117, 40}, {-80, 40}}, color = {0, 0, 127}));
  connect(revolute1.frame_a, world.frame_b) annotation(
    Line(points = {{-62, -18}, {-86, -18}}, color = {95, 95, 95}));
  annotation(
    uses(Modelica(version = "3.2.3")),
    Documentation);end Modalanalyse_Mehrmassenschwinger_Animation4;


Thanks for your help!

There are 0 guests and 0 other users also viewing this topic
You are here: