AmesimKnowledge

Creating and exporting FMU

Getting started: exporting a simple model with no input or output

Building a simple example with no input and output

Open the driveline model located in the tutorial subdirectory of the Simcenter Amesim root directory. It is a very simple model of an automotive driveline (see figure below):

Figure 32: Sketch of tutorial model

We start this tutorial by exporting this model as an FMU for co-simulation with no input or output variables. The goal is to exemplify the creation process of a simple standalone FMU for co-simulation.

Open the Interfaces > Create interface block menu command (see figure below).

Figure 33: Creating an interface icon

In the Interface Icon Creation dialog box, select Functional Mock-up Interface (FMI) as type of interface in the list box, and leave the number of inputs and number of outputs fields to 0. In the three text areas in the middle of the dialog box, enter the label “Functional Mock-up Interface for Co-simulation block”, as shown in the figure below.

Figure 34: The Interface Icon Creation dialog box

After clicking the OK button, a new block icon labeled as above can be dropped onto the sketch, as shown in the figure below.

Figure 35: Sketch of the tutorial model with the FMI for Co-simulation interface block

Enter Simulation mode: this triggers the model compilation. The model is now ready to be exported. Pull down the Interfaces > FMU export assistant to start the assistant:

Figure 36: Starting the FMU export assistant

During the first step of the FMU Export Assistant, you must enter the export settings (see figure below ):

  • In the drop down list, choose Co-simulation 1.0 as the FMU type and version;

  • Click the High radio button related to visibility level. This means that all parameters and variables of every submodel and supercomponent of the model are exposed by the FMU to the importing environment;

  • Leave the Embed tables checkbox selected the Provide directional derivatives when applicable checkbox not selected and the FMU for real-time and checkbox not selected:

  • Type in or select the path (using the browse button labeled “…” on the right) of the desired directory where the FMU is created. Figure 37: First step of the FMU Export Assistant

Results

Click the Next button to proceed to next step. The second step deals with platform, architecture and compiler selection. Choose any combination of architectures (32-bit or 64-bit) and compilers according to the compilers available on the computer (see figure below ), and click the Generate button. Note that by selecting the appropriate options you can create an FMU which can be imported and executed on both 32-bit and 64-bit architectures.

Figure 38: Second step of the FMU Export Assistant

The last step of the assistant does not require any choices (see figure below), it reports messages about FMU generation and the compilation of the binary files for the selected architectures.

Figure 39: Third step of the FMU Export Assistant

After clicking the Close button, the FMU is available in the output directory. It has the same name as the model, here driveline.fmu.   Since the interface block has no input and output variables, the FMU has also no input and output variables. Thus it can be simulated directly using for example the FMU Compliance Checker1 tool. The easiest way to use it is to copy its executable into the directory where the FMU is located. Replace platform with win32, win64 or linux64 in the command-line below:

fmuCheck.platform -h 0.1 -s 10 -l 5 -f -e driveline.log -o driveline.csv driveline.fmu.

The resulting data file driveline.csv contains the time samples for all variables of the original model. For example, the data corresponding to the wsig@rotaryspeedsensor variable can be extracted with Microsoft Excel and plotted (see figure below ).

Figure 40: Excel plot of simulation results of the wsig@rotaryspeedsensor variable, representing the vehicle speed in kilometers per hour

1

available at

Source: https://docs.sw.siemens.com/en-US/doc/254352342/PL20250521841123434.amesim_collection.Functional_Mockup_Interface/Tutorial_example_2 · retrieved 2026-07-17