Importing and using FMU > Simple examples
Import of an FMU for Co-simulation
The test case RC_cs.fmu provided in the tutorial/FMU subdirectory of Simcenter Amesim contains an example of an FMU for Co-simulation. It is the same system as shown in the figure Table 2, with one input variable, the applied voltage u, and one output variable, the measured capacitor voltage y. There are two internal variables, the charge q and the current I, and two parameters, the resistance R and capacitance C. A forward Euler integrator is embedded in the FMU.
Step One
It is easier to place the FMU in the directory where the associated Simcenter Amesim import submodel is to be created (for example in C:/imported).
Procedure
Pull-down the Interfaces > FMU import assistant … command.
This opens the first step of the FMU Import Assistant – choosing the FMU to import (see figure Figure 14).
Click the … button next to the FMU field.
With the file selection browser, select the RC_cs.fmu file, and then fill the Submodel storage directory field with the path to the directory where the import submodel is to be created, e.g. C:\imported (see figure below).
Uncheck the Submodel name checkbox to let the assistant automatically choose a name for the submodel, and click the Next button to proceed to the next step.
Results
Figure 25: The first step of the import assistant
Step Two
The second step of the FMU Import Assistant deals with the import settings (see figure below).
Figure 26: The second step of the import assistant
At this step, the compiler used to build the submodel has to be chosen according to the compiler selected in Simcenter Amesim to build the model which uses the import submodel. The two compilers have to be chosen consistently.
You can safely ignore the “Preferred simulation type” radio button, since it is only relevant to mixed-type FMUs, i.e. FMUs that have both the Model Exchange and Co-simulation interfaces.
Click the Generate button to proceed to the next step of the assistant.
Step Three
This is the last step of the assistant (see figure below).
Figure 27: The last step of the import assistant
At this step, a new Simcenter Amesim library node is created in the current directory, containing an import submodel called CSIMPRC (made of a SPE description file and a C source file) which is automatically compiled using the AMEcc_RELEASE script.
The library contains an icon called RC_cs which was automatically created by the Import Tool. This is a default icon for the FMU component, having one input signal-type variable (the supplied voltage u), and one output signal-type variable (the voltage y).
A subdirectory with the same name as the FMU (here RC_cs) is also created in the current directory, containing the unpacked FMU zip file.
After clicking the Finish button, the path to the new library node is automatically added to the Category Path List of Simcenter Amesim.
Step Four
A test Simcenter Amesim model is created in Sketch mode by dropping two instances of this icon on the sketch, and providing signal sources as input to the two components, as shown in figure Figure 19.
As of this step, the documentation extracted from the FMU can be displayed in the Helpby right-clicking one of the two icons and choosing Help... (see figure Figure 20).
Step Five
In Submodel mode, the CSIMPRC_cs submodel is associated with the two icons, as shown in the figure below.
Figure 28: Submodel dialog box showing the import submodel
Step Six
In Parameter mode (see the figure below), the parameters of the two instances are displayed and their value can be changed.
Figure 29: Setting the common parameters of the two instances
In addition to the two physical parameters R and C, it can be noticed that two parameters called q and startu are available, corresponding to the start values of the original q and u variables. The Import Tool also added four parameters that are not related to the variables of the model:
enablelogging is an enumeration taking the values yes or no. If set to yes, the logging messages from the FMU are reported in the simulation log window.
fmuLocation is the path to the unpacked FMU. It is the path to the directory in which the Import Tool previously extracted the content of the FMU.
comType specifies how the co-simulation step size is determined. If set to multiple of master fixed step size, the parameter called comNbStepSize is used. It is allowed only if a fixed step size solver if selected in the Run Parameters of Simcenter Amesim. See the Co-simulation specific parameters section for the other possible value.
comNbStepSize is displayed if comType is set to multiple of master fixed step size. The actual co-simulation step size is computed by taking the product of this value with the step size of the numerical integrator.
Step Seven
Since the comType parameter is set to multiple of master fixed step size, the Fixed step integrator has to be selected in the Run Parameters dialog box, as shown in the figure below.
Figure 30: Selecting the Fixed step integrator in the Run Parameters dialog box
The result variables are available in the variable list shown in the figure below, and can be plotted (see figure Figure 24).
Figure 31: Variable list dialog box showing available result variables
Source: https://docs.sw.siemens.com/en-US/doc/254352342/PL20250521841123434.amesim_collection.Functional_Mockup_Interface/Import_of_an_FMU_for_Cosimulation · retrieved 2026-07-17