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
  • Index
  • » Users
  • » anspachm
  • » Profile

Posts

Posts

Jun-27-19 12:57:41
Mass-Spring 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!

Can someone pls help me and explain the given examples?

How ist it possible to get the result plots of the FFT´s?
In the example" Modelica.Math.FastFourierTransform.Examples.RealFFT1" is the resulting plot shown in the dokumentation but if I open the resulting mat file there are just two different values and I can´t plot the same results.
Also if I try to use the"RealFFTBlock" and try to see the harmonics by the example "Modelica.Blocks.Examples.Rectifier6pulseFFT", there are only 0 values in my resulting mat file.

Can anyone explain me what I´m doing wrong?

Hello,
I am an OpenModelica beginner and have a question about natural frequencies.
Is it possible to show the frequencies or to measure them directly on a spring mass model?
I have already tried the FFT, but without success.

Kind Regards
Marcel

  • Index
  • » Users
  • » anspachm
  • » Profile
You are here: