FMU Export

Navigation:  Editor > FMI Support >

FMU Export

Previous pageReturn to chapter overviewNext page

20-sim can export two types of FMUs:

 

Standalone FMU

This FMU can be exported from a 20-sim submodel using C-code generation. It does not depend on the original 20-sim model or your 20-sim license and can be used standalone. However, this type of FMU can only be exported if the submodel is exportable as C-code.

 

To export a Standalone FMU:

1.Select a submodel
2.Select the File menu
3.Select Export
4.Select the option FMI 1.0 Co-Simulation FMU Export (standalone) or FMI 2.0 Co-Simulation FMU Export (standalone)
5.This will ask for a Folder in which your FMU will be generated

 

Limitations:

The following 20-sim language features that are not supported, (or are only partly supported) for standalone FMU export, are:

Hybrid models: Models that contain both discrete- and continuous time sections cannot be generated at once. However, it is possible to export the continuous and discrete blocks separate.
File I/O: The 20-sim “Table2D” block is supported; the “datafromfile” block is not yet supported.
External code: Calls to external code are not supported. Examples are: DLL(), DLLDynamic() and the MATLAB functions.
Variable delays: The tdelay() function is not supported due to the requirement for dynamic memory allocation.
Event functions: timeevent(), frequencyevent() statements are ignored in the generated FMU.
Fixed-step integration methods: Euler, Runge-Kutta 2 and Runge-Kutta 4 are supported.
Variable-step integration methods: Only Vode-Adams is supported.
Implicit models: Models that contain unsolved algebraic loops are not supported.

 

Tool-wrapper FMU

This FMU can be exported from a 20-sim model with a Co-simulation Interface. A tool-wrapper FMU is a communication FMU that opens the original model in the modelling tool and takes care of remotely executing the co-simulation steps inside 20-sim. It uses the 20-sim Scripting Toolbox to communicate with 20-sim to exchange inputs/outputs and parameters.

 

To export a Tool-wrapper FMU for your 20-sim model:

1.Extend the model with a co-simulation interface. See the page Co-simulation Interface for the details.
2.Select the File menu
3.Select Export
4.Select the option FMI 2.0 Co-Simulation FMU Export (Toolwrapper)