Jack
Jack

Reputation: 1232

Performance of inline integration in Dymola compared to normal calculation mode using DASSL

I am trying to using inline integration in Dymola to do real-time simulation, I take the Modelica.Fluid.Examples.HeatingSystem as an example, but no matter which inline integration method I choose, the simulation always fails.

  1. When I choose an explicit method, Dymola is unable to start the integration.
  2. When I choose an implicit method, Dymola got stuck.
  3. The special one is the Rosenbrock method, the error shows Dymola fails to differentiate some equations.

In my understandings, inline integration means adding the discretization equations to the model equations, then Dymola could do more symbolic manipulations and get a new BLT form. I understand this method could cause more algebraic loops and make it hard for Newton Method to solve these algebraic loops.
My questions are:

  1. Compared to the normal method in Dymola, what kind of model is more suitable for the inline integration method?
  2. Inline integration is designed to increase the simulation speed, but it could hard when the nonlinear algebraic loops are hard to solve, so is there a limitation or rule of using the inline integration method?
  3. Take the Modelica.Fluid.Examples.HeatingSystem as the case, how could I adjust the model to use inline integration?
  4. I know that Dymola only supports using the inline integration method with the Euler integrator(fixed step size integration algorithms), so why does the inline integration method only support fixed step size? Is it unnecessary to use variable step size? If not limited to real-time simulation, I just want to use inline integration to increase the simulation speed, is it possible to combine the inline integration method with DASSl?

enter image description here

enter image description here enter image description here enter image description here enter image description here enter image description here enter image description here enter image description here

Upvotes: 1

Views: 292

Answers (1)

Hans Olsson
Hans Olsson

Reputation: 12507

It seems stuck for most implicit solvers because:

  • It is a reasonable sized model that you integrate with milli-second timestep for 6 000 second; that means 6 million steps (each involving systems of equations).
  • There is less feedback during inline integration (since giving that feedback takes too much time).

But implicit Euler isn't stuck - it just takes a couple of minutes to complete.

However, you can can increase the step-size for implicit Euler a lot for this model, it actually works fine with 1 s; and then completes in less than second.

Inline explicit Euler fails unless you use a lot smaller step-size (same as non-inline explicit Euler).

Note: The inline solvers in Dymola are all fixed-step-size solvers and thus setting a too short step-size will slow down the simulation and a too long step-size will cause the simulation to fail, whereas dassl, lsodar, radau, esdirk* all adjust the step-size during the integration to avoid both of those problems.

Upvotes: 2

Related Questions