【问题标题】:Switching connect dynamically in Modellica.mechanics在 Modellica.mechanics 中动态切换连接
【发布时间】:2017-02-20 10:44:44
【问题描述】:

我尝试使用 Modelica 库模拟“特殊”钟摆。 钟摆在第一端有一个旋转,在另一端有一个第二个旋转。在time < t 处,第一个钟摆应围绕第一个旋转轴旋转。在time > t 处,钟摆应围绕第二个公转轴旋转。
我有两个问题:

  1. 我无法模拟具有两个旋转的钟摆,其中一个框架未使用。

  2. 我尝试使用这样的 if 子句来更改旋转轴:
    if time < 5 then connect(world.frame_b, revolute.frame_a); else connect(world.frame_b, revolute1.frame_b); end if;
    开始模拟时出现此错误:
    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;

有人知道我该如何解决这个问题吗?

modelpicture

【问题讨论】:

    标签: dynamic connect modelica dymola


    【解决方案1】:

    我认为这个问题与这里的讨论非常相关: Switch between two flanges

    总结:您不能在模拟过程中切换连接,因为这需要在模拟过程中重建方程。

    关于您的问题:老实说,我没有看到在 Modelica 中解决问题的好方法。

    【讨论】:

      猜你喜欢
      • 2016-12-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-09-16
      • 2020-08-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多