Opened 5 years ago

Last modified 3 years ago

#5867 reopened defect

Implement fixed time step implicit Euler in FMI/CS

Reported by: casella Owned by: AnHeuermann
Priority: normal Milestone: 1.16.0
Component: FMI Version:
Keywords: Cc:

Description (last modified by vitalij)

Currently, FMI/CS only provides explicit Euler. This is good for real-time co-simulation of non-stiff models, but it doesn't work if the model is stiff, because it then requires very small time steps.

It is planned to add CVODE to FMI/CS; however, this only provides variable step-size solvers with error control. These are fine from the point of view of precision, but they will tend to require many internal steps for each main step of the FMI, because the step changes of the output will trigger fast transients which are totally irrelevant for the output at the end of the step, but that the CVODE solvers will nevertheless try to simulate with great accuracy.

A simple but effective solution could be to have fixed time step implicit Euler also implemented. This will solve most stability problems, since implicit Euler is L-stable.

I would therefore recommend that this solution is also implemented for FMI/CS, in addition to CVODE.

I would also recommend to include a parameter to set the maximum number of iterations of the implicit Euler algorithm. This could allow to implement almost-real-time algorithms with a fixed number (possibly only one) iteration, which will lose some accuracy during fast and large transients, but on the other hand ensure a bounded computation time for a single step.

Change History (7)

comment:1 Changed 5 years ago by vitalij

  • Description modified (diff)

comment:2 Changed 4 years ago by AnHeuermann

  • Owner changed from lochel to AnHeuermann
  • Status changed from new to assigned

comment:3 Changed 4 years ago by AnHeuermann

  • Component changed from *unknown* to FMI
  • Milestone changed from 1.16.0 to 1.17.0

comment:4 Changed 4 years ago by casella

  • Milestone changed from 1.17.0 to 1.18.0

Retargeted to 1.18.0 because of 1.17.0 timed release.

comment:5 Changed 3 years ago by casella

  • Milestone changed from 1.18.0 to 1.16.0
  • Resolution set to fixed
  • Status changed from assigned to closed

This was actually fixed in 1.16.0, see #4273.

comment:6 Changed 3 years ago by AnHeuermann

We have one implicit method (CVODE from #4273) added to OpenModelica FMUs, but no implicit Euler method. Do we still want it for a minimal FMU that doesn't use SUNDIALS?

But then I would degrade the priority to normal or lower.

comment:7 Changed 3 years ago by casella

  • Priority changed from critical to normal
  • Resolution fixed deleted
  • Status changed from closed to reopened

You are right, I overlooked that.

Note: See TracTickets for help on using tickets.