Questions tagged [fmi]

FMI stands for Functional Mockup Interface. It is a standard for model exchange and co-simulation.

Functional Mock-up Interface (FMI) is a tool independent standard to support both model exchange and co-simulation of dynamic models using a combination of xml-files and compiled C-code (see overview in PDF or PPT format). The first version, FMI 1.0, was published in 2010. The FMI development was initiated by Daimler AG with the goal to improve the exchange of simulation models between suppliers and OEMs. As of today, development of the standard continues through the participation of 16 companies and research institutes. FMI is supported by over 50 tools and is used by automotive and non-automotive organizations throughout Europe, Asia and North America.

Additional information can be found at the FMI website.

191 questions
3
votes
1 answer

FMPy - model forward operator for Kalman filter

I want to implement a simple unscented Kalman filter in python for some Modelica models. The models are compiled to FMU and I want to use them via the FMPy library. I have played around a bit with the interface and I can't find a way to define a…
3
votes
1 answer

How to using FMPy extract the list of (continuous time) states?

In some interactive simulation work it is convenient to simulate up to a time point, change some parameters, and then continue simulation. Using FMU for simulation then you need to reload or reset the FMU, and then enter new initial values for the…
janpeter
  • 681
  • 8
  • 22
3
votes
1 answer

How to co-simulate fmu with a Python function?

With Python libraries like FMPy I am able to simulate fmus (using fmpy.simulate_fmu) for given start_time and stop_time. In such case, the function simulate_fmu completes the simulation and return the time-series results. However, I want to create…
Kaustubh
  • 391
  • 2
  • 10
3
votes
1 answer

Pause JModelica and Pass Incremental Inputs During Simulation

Hi Modelica Community, I would like to run two models in parallel in JModelica but I'm not sure how to pass variables between the models. One model is a python model and the other is an EnergyPlusToFMU model. The examples in the JModelica…
Justin Shultz
  • 199
  • 1
  • 11
3
votes
0 answers

FMU Export from Dymola of model with medium from ExternalMedia

I'm trying to export a test model of the ExternalMedia library to FMU. When converting the model to FMU I get errors, with both, Visual Studio 2010 and MinGW GCC compilers. The model simulates well in Dymola with VisualStudio, but the export as FMU…
T. Sergi
  • 203
  • 2
  • 9
3
votes
1 answer

FMU FMI simulation, no evaluation of some equations after initialization

I believe my problem is somehow related to this previous question but I was not able to fix my problem with their advices. Here is a minimal non working example. I have a simple electrical circuit with a commutating switch in it (developed in…
Danto N
  • 65
  • 7
3
votes
1 answer

Is there a .NET wrapper for FMUs?

I need to co-simulate an FMU (generated from OpenModelica) within a .NET application. Is there a .NET equivalent to JFMI or PyFMI ?
Jack Welch
  • 115
  • 6
3
votes
5 answers

Preparing FMU: Interchanging model parameters for model inputs

I would like to export a Modelica model as an FMU for Co-simulation using Dymola 2014. I plan to complete the co-simulation using pyfmi. To test this I am trying to model fluid flow through a pipe between two fluid boundaries. I would like the…
Michael Street
  • 645
  • 1
  • 7
  • 19
2
votes
1 answer

Import FMU parameters using FMPy

I'm trying to import in Python a model created in Modelica with the FMU method. The library I'm currently using is FMPy and it is working. I can introduce the corresponding inputs and I get the same results as the original model. The problem is that…
Elena
  • 85
  • 5
2
votes
0 answers

Error executing FMU model with pyFMI: "pyfmi.fmi.FMUException: Failed to get the Boolean values"

I am using the code below to simulate a model. def run_demo(with_plots=True): traj = np.array([[start_time,2.25]]) input_object = ('input_1[1]', traj) model = load_fmu('[pyfmimodel.fmu',log_level=7) opts = model.simulate_options () …
2
votes
2 answers

Add input txt in FMU for co-simulation

I have an FMU for co-simulation and I want to add as input to this model a txt file with CombiTable and then export it again as an FMU. My question is how can I achieve that since OpenModelica cannot import FMU for co-simulation.
Kosmylo
  • 436
  • 1
  • 6
  • 20
2
votes
1 answer

Modelica model and its fmu give different results for the same input

I have a simple motor model in Modelica which gives expected velocity output when run in Dymola for constant voltage. But when I export it as a co-simulation fmu (with Dymola's dassl solver) it gives different answer in other environments like fmpy…
Kaustubh
  • 391
  • 2
  • 10
2
votes
2 answers

How could I use 'fmi2GetDirectionalDerivative'?

I am trying to get the model Jacobian matrix from FMU, according to the following literature, I could use fmi2GetDirectionalDerivative to do this, but I am not sure what I need to do exactly. My question is: Could I call this function in Dymola or…
Jack
  • 1,094
  • 6
  • 16
2
votes
2 answers

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…
Jack
  • 1,094
  • 6
  • 16
2
votes
0 answers

EnergyPlus/Modelica co-simulation error "asynchronous fmiDoStep is not supported"

I have been trying to export a Modelica model from Dymola 2020 for a few weeks and continuously running into the following error message upon running co-simulation with EnergyPlus 9.2. warning Model1 (): fmiInstantiateSlave: Callback function…
cdgood
  • 61
  • 3
1
2
3
12 13