Tuesday, December 5, 2023

💥💥💥 Examples of FEA software that can create FMU files

 FEA programs that can create FMU files are software packages that implement the finite element method for solving partial differential equations and can export their models as functional mockup units (FMUs) for co-simulation or model exchange. FMUs are standardized files that contain a description of the model, its variables, and its equations, as well as one or more platform-dependent shared libraries that implement the model behavior³. FMUs can be used to simulate complex systems that involve multiple components and subsystems⁴.

Some examples of FEA programs that can create FMU files are:

- Simulink Compiler™ FMU Builder for Simulink Support Package: This is a tool that allows you to export Simulink models to FMUs that support co-simulation in FMI version 2.0 and 3.0¹. Simulink is a graphical programming environment for modeling, simulating, and analyzing multidomain systems.

- pythonfmu: This is a lightweight framework that enables the packaging of Python3.x code as co-simulation FMUs³. Python is a popular and versatile programming language that can be used for scientific computing, data analysis, machine learning, and more.

- GOMA: This is an open-source, parallel, and scalable multiphysics software package for modeling and simulation of real-life physical processes, with a basis in computational fluid dynamics for problems with evolving geometry. It can export FMUs for FMI 2.0².

- OpenModelica: This is an open-source, standards-compliant, Modelica-based modeling and simulation environment. It can export FMUs for FMI 1.0 and 2.0. Modelica is a declarative, object-oriented language for modeling complex physical systems.

- Dymola: This is a commercial modeling and simulation tool based on the Modelica language. It can export FMUs for FMI 1.0, 2.0, and 3.0.

- ANSYS Twin Builder: This is a platform for building, validating, and deploying digital twins. It can import and export FMUs for FMI 2.0 and 3.0. A digital twin is a virtual representation of a physical system that can be used for testing, optimization, and prediction.

If you want to learn more about FEA programs that can create FMU files, you can check out this list of finite element software packages² or this article that explains what is a FMU⁴. I hope this helps you to understand more about FEA programs that can create FMU files. 😊.

Source: 

(1) .FMU File Extension - How do I open it? - WhatExt. https://whatext.com/fmu.

(2) Functional Mockup Unit (FMU) Explained - Collimator. https://www.collimator.ai/reference-guides/what-is-a-fmu.

(3) 4. Creating an FMU — FMU Export of EnergyPlus User Guide. https://simulationresearch.lbl.gov/fmu/EnergyPlus/export/userGuide/build.html.

(4) List of finite element software packages - Wikipedia. https://en.wikipedia.org/wiki/List_of_finite_element_software_packages.

How do I use FMUs for simulation?

To use FMUs for simulation, you need to have a simulation tool that supports the Functional Mockup Interface (FMI) standard, which defines how FMUs can be imported and exported across different simulation environments. Some examples of simulation tools that support FMI are Simulink, OpenModelica, Dymola, and ANSYS Twin Builder¹.

Depending on the type of FMU you have, you can use different methods to simulate it. There are two types of FMUs: Model Exchange (ME) and Co-Simulation (CS). In an ME FMU, the model is solved inside the FMU, with the simulation tool acting only as the solver. In a CS FMU, the model is solved by the simulation tool and the FMU, which communicate with each other through a shared data structure².

To simulate an ME FMU, you need to connect the FMU to a numerical solver that can set the FMU state, ask for the state derivatives, determine an appropriate step size, and decide how to compute the state at the next time step³. To simulate a CS FMU, you need to specify the communication step size between the simulation tool and the FMU, which determines how often they exchange data⁴.

For example, if you want to simulate an ME FMU using Simulink, you can use the FMU Import block to load the FMU file into your model. The block automatically selects the ME mode and connects the FMU to the Simulink solver. You can then run the simulation and observe the results¹.

If you want to simulate a CS FMU using PyFMI, you can use the load_fmu function to load the FMU file into a Python script. The function automatically selects the CS mode and creates an FMUModelCS object. You can then use the simulate method to run the simulation and return the results⁴.

Source:

(1) Include Functional Mockup Unit (FMU) in model - Simulink - MathWorks. https://www.mathworks.com/help/simulink/ref_extras/fmu.html.

(2) Functional Mockup Unit (FMU) Explained - Collimator. https://www.collimator.ai/reference-guides/what-is-a-fmu.

(3) FMI, FMU, and Bonsai - Bonsai | Microsoft Learn. https://learn.microsoft.com/en-us/bonsai/concepts/fmu/.

(4) Tutorial — PyFMI 2.5 documentation - Modelica. https://jmodelica.org/pyfmi/tutorial.html.

What is the difference between co-simulation and model exchange?

Co-simulation and model exchange are two types of protocols for using functional mockup units (FMUs) in simulation. FMUs are standardized files that contain a description of a model, its variables, and its equations, as well as one or more platform-dependent shared libraries that implement the model behavior¹.

The main difference between co-simulation and model exchange is that in co-simulation, the FMU is shipped with its own solver, while in model exchange, the FMU is simulated using the importing tool's solver². This means that in co-simulation, the FMU and the importing tool communicate with each other through a shared data structure at discrete time steps, while in model exchange, the importing tool sets the FMU state, asks for the state derivatives, and decides how to compute the state at the next time step³.

Co-simulation is suitable for models that require specialized solvers or have complex dynamics that are difficult to integrate with other models. Co-simulation also allows for parallel execution of multiple FMUs on different processors or machines. However, co-simulation requires the user to specify the communication step size between the FMU and the importing tool, which can affect the accuracy and performance of the simulation⁴.

Model exchange is suitable for models that do not require specialized solvers or have simple dynamics that are easy to integrate with other models. Model exchange also allows for better control and flexibility over the simulation process, as the importing tool can choose the most appropriate solver and step size for the FMU. However, model exchange requires the importing tool to support the Functional Mockup Interface (FMI) standard and be able to handle the FMU equations⁵.

Source: 

(1) FMI basics Co-simulation vs. Model Exchange - Claytex. https://www.claytex.com/tech-blog/fmi-basics-co-simulation-vs-model-exchange/.

(2) FMI Standard: Co-Simulation vs. Model Exchange FMUs. https://modelon.com/blog/fmi-functional-mock-up-unit-types/.

(3) Functional Mock-up Interface - Wolfram. https://reference.wolfram.com/system-modeler/UserGuide/ModelCenterFunctionalMockupInterface.html.

(4) Co-simulation - Open Simulation Platform. https://opensimulationplatform.com/co-simulation/.

(5) Introduction to FMI - Claytex. https://www.claytex.com/blog/introduction-to-fmi/.

No comments:

Post a Comment