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

Variables in EnergyPlus-FMI and Modelica

asked 2017-11-01 12:30:31 -0600

Charalampos Angelopoulos's avatar

Hi,

I am using EnergyPlus to create the FMI and imported to Modelica. For my model, I am "exporting" the room temperature (Troom) and external temperature(Texternal) from EnergyPlus to Modelica. However, although i have set in EnergyPlus both variables to be in an hourly interval, in Modelica i can see them in the communication timestep (900sec). Do you know if it is possible to export the variables from EnergyPlus to Modelica in an hourly interval? Also, is it possible to store those two variables (Troom, Texternal) as a matrix in Modelica?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
2

answered 2017-11-02 06:39:08 -0600

Charalampos Angelopoulos's avatar

thank you for the answer. Maybe i didn't explain myself very well. What i want to do is to use the real signals from Troom find the daily average of it and then use it as input to a controller. However, I am not sure how to find the daily average values from the Troom signal. I hope now it's more clear.

edit flag offensive delete link more

Comments

If you use the latest version of the master branch of the Buildings library, you can use Buildings.Controls.OBC.CDL.Continuous.MovingMean. Alternatively, you can copy its code from https://github.com/lbl-srg/modelica-b... to your project files.

If you need the average from midnight to midnight, you could integrate Troom, sample it at midnight, and delay it by 1 day to compute the average over the past day.

Michael Wetter's avatar Michael Wetter  ( 2017-11-02 10:17:47 -0600 )edit

Thank you,

i downloaded the latest version and i used the "Moving Mean" block and it seems to work perfectly fine for my case. Thank you again for the help.

Charalampos Angelopoulos's avatar Charalampos Angelopoulos  ( 2017-11-02 10:57:43 -0600 )edit
2

answered 2017-11-01 18:55:48 -0600

If you set the communication step to 1 hour, then you get hourly values. Please see the external interface documentation.

I don't know what you mean by storing (Troom, Texternal) as a matrix in Modelica. These are real signals, which you can assemble into an array with Modelica.Blocks.Routing.Multiplex2. Modelica tools write their results as time series, so this is a matrix form with time in the first column and the results in the other columns. If you want to store old values in the Modelica model, such as for use in a controller, you can program a block that does this, or use Modelica.Blocks.Discrete.UnitDelay to delay the signal value by some sample period.

edit flag offensive delete link more

Your Answer

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

Add Answer

Training Workshops

Careers

Question Tools

2 followers

Stats

Asked: 2017-11-01 12:30:31 -0600

Seen: 381 times

Last updated: Nov 02 '17