Skip to content

Specify which flavour(s) of DAE residuals are available in the FMU-DAE #15

@casella

Description

@casella

The collection of use cases that we have gathered corresponds to DAEs with different structural properties. The FMI-DAE format should be agnostic from this point of view and support as many as it is reasonably feasible. However, from a user's point of view, an FMU is only usable if it provides residuals with some structural properties that match the requirements of the solver one wants to use. So, a specific solver should be able to enquire the FMU to know if residuals corresponding to a formulation with certain properties are available, and if they are, actually get them.

This applies to FMUs that were generated with only one specific formulation in mind, as well as to FMUs that may contain multiple different formulations and can make a specific one available on demand.

For starters, here is a preliminary, incomplete and not particularly orderly list of such properties

  • DAEs for collocation-based optimal control must be index-1, contain no discrete variables, no events, and only continuous and twice-differentiable constraint equations, so that Jacobians and Hessians are available.
  • DAEs for simulation using certain solvers must be index-1, meaning that the tool generating them should take care of performing symbolic index reduction before generating the code for the residuals; however, they could contain discrete variables, discontinuous expressions and state or time events.
    • @MartinOtter mentioned that Brenan and Petzold in their book describe some cases of DAE systems that are index-1 but yet problematic for BDF solvers like DASSL. We may want to categorize them explicitly.
    • We may also want to identify semi-explicit index-1 DAEs, w.r.t. generic fully implicit DAEs
  • In some application contexts, having index-2 or index-3 DAEs is instead fine, if you have solvers that can handle this case numerically.
  • In some cases the FMU is required to provide code for consistent initialization and return initial conditions that can safely assumed to be consistent, so they can be used to initialize solvers that need this property to work correctly,
  • In other cases, the FMU just provides the raw residual equations and it's up to the solver using the FMU to compute consistent initial conditions, using suitable algorithms.
  • In some cases, the DAE residuals correspond to each and every differential and algebraic equation of the original system model, possibly after symbolic index reduction and trivial simplifications like alias elimination.
  • In some other cases, the FMU could just expose to an external DAE solver the residuals of differential equations and implicit algebraic equations, whereas variables and equations that can be solved explicitly after causalisation are computed internally in the FMU code and not be exposed to the external solver. In this case, additional functions should be made available to compute all such variables, or a selection of them which are relevant as outputs, once a step has been accepted.

We should complete this list based on all the collected use cases, and then try to come up with a systematic classification of properties that can be declared in the FMU manifest file, so a solver can enquire the FMU, make sure that it can provide residuals with certain structural properties, and eventually get them by calling the appropriate functions. Specific FMI-DAE functions may need to be defined to support some of these structural options.

This classification will also be useful to formalize what kind of requirements could be asked to an FMU-generating tool when generting the FMU-DAE code for a specific system.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions