Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

FMU Export of Python Code or Python Interface with FMI Standard for Use in EnergyPlus Co-Simulation

My research group has developed python code for a new building component that we would like to co-simulate with EnergyPlus. For reuseability and market impact we would like this connection to be as easy as possible for inexperienced users and believe packing the model using the Function Mockup Interface Standard (FMI) to be the best option.

We have explored JModelica to test other Functional Mockup Units (FMUs) but found that it does not do FMU export of Python code for model exchange or co-simulation.

I was curious if there any methods for packaging python code as an FMU? If there is not, is there another way of linking Python to the FMI standard or connecting it to a building energy software like EnergyPlus?

The alternative to this would be exporting the building energy model as an FMU and import into modelica/jmodelica or using BCVTB. Although this would work for us we worry it would make it too difficult for inexperienced individuals to use our tool.

like image 850
Justin Shultz Avatar asked Sep 27 '22 16:09

Justin Shultz


1 Answers

Just to be clear, JModelica does support export and import of both ME and CS FMUs and supports versions 1.0 and 2.0 of the FMI standard. I assume you mean that JModelica does not support export of Python code as FMU. I am not aware of any such solution. If you do not find a way of packaging the Python code into an FMU, perhaps setting up a proxy FMU that communicates with your Python code would work?

like image 98
Martin Avatar answered Oct 06 '22 00:10

Martin