Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page
Ask Your Question

Calculate Thermal load in EnergyPlus using Temperature output from FMU

asked 2020-05-21 16:06:46 -0600

sreemohan's avatar

updated 2020-06-01 12:30:19 -0600

Hello, I am trying to run a co-simulation where the FMU is an HVAC system created in Dymola and the room is modeled in EnergyPlus. The inputs and outputs of FMU and EnergyPlus model are:

FMU Inputs: Room Heat Load ;Outputs: HVAC Air Flow Rate and Room Air Temperature

Room Model Inputs: Room Air Temperature ;Output: Room Heat load.

The idea is that the HVAC system(FMU) will obtain the heat load from E+ to calculate the temperature of the room. The E+ model will obtain the temperature of the room and using the Internal load profile calculate the thermal load of the room and send it back to the FMU.

I would like to know how to use external interface to use the temperature output of the FMU to calculate the Thermal load in E+ i.e how to link these variables

We are trying to create a system similar to the one in the following paper:


edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2020-06-03 01:16:11 -0600

You should first create your FMU from a Modelica model and add the corresponding input and output interfaces.

Method 1: Importing the Modelica FMU into EnergyPlus You could then import such model in EneryPlus by defining external interface objects in the IDF (as described in the E+ external interface documentation). Those external interface objects will get the inputs of your FMU and feed them to EnergyPlus internal variables. Similarly, some EnergyPlus internal variables will be sent to your FMU outputs. The limitation is that your Modelica model will need to be exported as FMI 1.0 for co-simulation since it is the version supported by the E+ import interface for now.

Method 2: Coupling Modelica FMU with EnergyPlus FMU An alternative will be to also export your EnergyPlus model as an FMU using EnergyPlusToFMU. You could then link the Modelica FMU with the EnergyPlus FMU using a master algorithm such as PyFMI. In this situation, you could either use FMI 1.0 or FMI 2.0. This approach has the drawback that if you have to change your E+ model frequently, it will require recompiling the E+ model as an FMU every time.

edit flag offensive delete link more


Hello, Thank you for the response. We followed method 1 and created the hvac FMU. The problem we are facing are 1. We are unsure how to control the mean temperature of the room i.e we are unsure on how to link the mean temperature of the room to the output of the FMU. (The latest approach we have tried is to control the Mean temperature of the room we use the EMS object sensor and using the EMS object:Program set the Mean temperature to be equal to the output of the FMU.

sreemohan's avatar sreemohan  ( 2020-06-03 12:15:36 -0600 )edit
  1. One of the output variables of the FMU is the Airflowrate of the HVAC system designed in Dymola. For some reason the variable output remains to be zero which is the declared initial value for it in E+

  2. While running the simulation we are also seeing the following errors fmiInstantiateSlave: timeout != 0 is not supported Warming up {2} warning Model1 (): fmiInstantiateSlave: Callback function stepFinished != NULL but asynchronous fmiDoStep is not supported warning Model1 (): fmiInstantiateSlave: timeout != 0 is not supported Warming up {3}

sreemohan's avatar sreemohan  ( 2020-06-03 12:19:33 -0600 )edit

Here is the link to the FMU and IDF for your reference FMU: IDF:

sreemohan's avatar sreemohan  ( 2020-06-03 12:30:23 -0600 )edit

If I understand it right, you want to compute the room temperature in Dymola? In other words, you would like to bypass the calculation done in E+ with respect to the room temperature, right?

Thierry Nouidui's avatar Thierry Nouidui  ( 2020-06-04 00:35:27 -0600 )edit

Yes that is what we are trying to do

sreemohan's avatar sreemohan  ( 2020-06-04 08:24:58 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2020-05-21 16:06:46 -0600

Seen: 206 times

Last updated: Jun 03 '20