wolfram-mathematicafmi

Using fmus with Mathematica


Is there a way to import and simulate fmus in Mathematica notebooks?
I have models developed in Modelica and one of the user of the models is proficient in using Mathematica notebooks but new to fmus. I was curious if Mathematica can import fmus similar to Python libraries like fmpy and pyfmi.


Solution

  • As mentioned in the comments, import of FMU is supported in System Modeler, you can get a free trial here,

    https://www.wolfram.com/system-modeler/trial/

    Once you import the FMU, as indicated here

    https://reference.wolfram.com/system-modeler/UserGuide/ModelCenterFMUExportAndImport.html

    you can simulate and access the model in Mathematica. When Mathematica and System Modeler with the same version are used in the same session they share a state and models can be modified, simulated, created, etc. in either tool. In Mathematica this is done using the system modeling functionality,

    https://reference.wolfram.com/language/tutorial/GettingStartedWithModelSimulationAndAnalysis.html#47330727

    More specifically, simulation is done fundamentally through the function SystemModelSimulate

    https://reference.wolfram.com/language/ref/SystemModelSimulate.html