2

I tried to simulate a "special" pendulum with the Modelica library. The pendulum got one revolute at the first end and a secound revolute on the other end. At time < t the first pendulum should rotate around the axis of the first revolute. At time > t the pendulum should rotate around the axis of the secound revolute.
I have two problems:

  1. I cannot simulate a pendulum with two revolutes where one frame ist unused.

  2. I tried to change the rotating revolute by using an if-clause like this:
    if time < 5 then connect(world.frame_b, revolute.frame_a); else connect(world.frame_b, revolute1.frame_b); end if;
    Starting the simulation I get this error:
    Failed to expand block containing connect: if (time < 5) then connect(world.frame_b, revolute.frame_a); else connect(world.frame_b, revolute1.frame_b); end if;

Has Someone an Idea how i can solve this problems?

modelpicture

1 Answers1

0

I think the problem is pretty much related to the discussion found here: Switch between two flanges

Summary: You can not switch connects during simulation as this would require to rebuild the equations during simulation.

Regarding your problem: To be honest I don't see a sound way to solve the issue in Modelica.

Markus A.
  • 6,300
  • 10
  • 26