简体   繁体   English

时间步长的变化不会影响 Dymola 中的模拟结果

[英]Variation in Time Step Size does not affect the simulation results in Dymola

I am working on a model of hot water storage developed in Buildings library of Modelica.我正在研究在 Modelica 的建筑物库中开发的热水存储 model。 Using Dymola to simulate the model by Dassl, I changed time step of simulation from 1s to 1200s, but I have not seen any change in simulation result.使用Dymola模拟Dassl的model,我将模拟的时间步长从1s改为1200s,但我没有看到模拟结果有任何变化。 Is it something related to the solver?它与求解器有关吗? I would appreciate if you could help.如果您能提供帮助,我将不胜感激。

First my assumtion: With "time step" you are referring to the "Interval length" shown in the screenshot below.首先我的假设:对于“时间步长”,您指的是下面屏幕截图中显示的“间隔长度”。

Dymola 模拟设置

If that is the case, this is totally correct behavior.如果是这样,这是完全正确的行为。 The "Output interval" is independent from the simulation itself. “输出间隔”独立于模拟本身。 Variable step solvers like DASSL choose their step-size on their own and interpolate the output from the computed points - which are likely computed at different points in time.像 DASSL 这样的可变步长求解器自行选择步长,并从计算点中插入 output - 这可能是在不同时间点计算的。 You can check the steps taken by the solver using the "Simulation Analysis" function of Dymola.您可以使用 Dymola 的“模拟分析”function 检查求解器所采取的步骤。

If you want to influence the actual steps taken by the solver you have some other possibilities:如果您想影响求解器采取的实际步骤,您还有其他一些可能性:

  1. Change the "Tolerance", also shown in the screenshot.更改“公差”,也显示在屏幕截图中。 A smaller tolerance will likely cause smaller steps and therefore better precision as well as decreased performance, and vice-versa.较小的容差可能会导致较小的步长,从而提高精度以及降低性能,反之亦然。
  2. There are a couple of variables to directly influence the step size:有几个变量会直接影响步长:
    • Advanced.Simulation.StepSizeMax limits the upper bound or the step size Advanced.Simulation.StepSizeMax限制上限或步长
    • Advanced.Simulation.StepSizeMin limits the lower bound or the step size Advanced.Simulation.StepSizeMin限制下限或步长
    • Advanced.Simulation.StepSizeStart sets the initial step size Advanced.Simulation.StepSizeStart设置初始步长

Be careful with the Advanced variables, as they can influence performance and stability.小心使用高级变量,因为它们会影响性能和稳定性。 Side note: There can be some influence from the "Interval length/Number of intervals" to the simulation result, as DASSL considers this setting when choosing its initial step-size.旁注:“间隔长度/间隔数”可能会对模拟结果产生一些影响,因为 DASSL 在选择其初始步长时会考虑此设置。 But this effect can vanish depending on the dynamics.但这种影响可能会根据动态而消失。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM