寻找一个原则来确定在Dymola中选择间隔数的方法。

huangapple go评论66阅读模式
英文:

Looking for a principle to determine how to choose the number of intervals in Dymola

问题

有一个选项可以在Dymola模拟期间设置“间隔数”,但我不确定如何在实际模型中选择这些间隔。

所以我做了一些测试,以下是我的结论和问题:

  1. 间隔数不应该太小,因为当它太小时,模拟结果可能偏离真实值。
  2. 因此,我总是将间隔数设置为500以上,目前似乎正常工作,但我不确定是否应该增加它。
  3. 当使用更多的间隔时,模拟时间可能会变长,所以也许我可以减少它。

简而言之,我正在寻找一个原则来确定如何选择间隔数。

英文:

There is an option to set the "Number of intervals" during the simulation in Dymola, but I am not sure how to choose the intervals in a real model.
So I did some tests, Here are my conclusions and questions:

  1. The number of intervals shouldn't be too small, cause when it is too small, the simulation result could deviate from the real value.
  2. So I set the number of intervals above 500 always, it seems working fine right now, but I am not sure if I should increase it.
  3. When using a larger number of intervals, the simulation time could be longer, so maybe I could decrease it.
    In short, I am looking for a principle to determine how to choose the number of intervals.

寻找一个原则来确定在Dymola中选择间隔数的方法。

答案1

得分: 2

间隔仅适用于绘图窗口,而不适用于模拟。

如果选择了500,将使用线性插值绘制500个点。模拟的实际步长由DASSL整合器选择,以确保稳定性。容差选项可能会影响该行为。如果选择另一个求解器,甚至可以设置固定数量的迭代步骤,但我强烈建议将该决策留给求解器。

英文:

The intervals are just the ones for the plot window not for the simulation.

If you chose 500 you will get 500 points plotted with linear interpolation. The actual stepsize for simulation is chosen by the DASSL-Integerator to ensure stability. The tolerance option can influence that behaviour. If you choose another solver you can even set fixed number of iterator steps, but i would strongly recommend leaving that decision to the solvers.

huangapple
  • 本文由 发表于 2020年1月3日 21:04:36
  • 转载请务必保留本文链接:https://go.coder-hub.com/59579138.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定