Search code examples
modelicadymolafmi

How to export FMU with steady-state?


I try to export FMU of my model, but during the 0-30000s, the model is in the unsteady state, but I want export the FMU with steady-state, so I checked each option in the following screenshot, none of them could realize my idea.

My question is : How could I export FMU whit steady state?

 w


Solution

  • According to the first table on page 19 in the document FMI Support in Dymola, canGetAndSetFMUState feature seems to be supported by Dymola.

    Refer to chapter 2.1.8 Getting and Setting the Complete FMU State of the FMI Specification for background information, but in short this means you should be able to do the following:

    1. Export the FMU and do not worry about the steady state.
    2. In your calling tool (Simulink), integrate the FMU to the steady state you are interested in.
    3. Have the calling tool call function fmiGetFMUstate and store the complete state of the FMU.
    4. Now whenever you want to start from your steady state, have your calling tool use function fmiSetFMUstate to restore it.

    This, of course, requires that your calling tool supports the above features.