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

323 Views Asked by At

I am working on a model of hot water storage developed in Buildings library of Modelica. 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. Is it something related to the solver? I would appreciate if you could help.

1

There are 1 best solutions below

0
On BEST ANSWER

First my assumtion: With "time step" you are referring to the "Interval length" shown in the screenshot below.

Dymola Simulation Setup

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. You can check the steps taken by the solver using the "Simulation Analysis" function of Dymola.

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.StepSizeMin limits the lower bound or the step size
    • Advanced.Simulation.StepSizeStart sets the initial step size

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. But this effect can vanish depending on the dynamics.