2

[E+, BCVTB] How to input dynamic data (for time t+1) into E+ that depends on the output variable (at time t)

I am new to the field. so please feel free to correct me if I'm wrong.

Say I have to simulate a model that has the requirement of getting dynamic inputs (after some pre-processing) My typical flow is:

At time t: After the output variables are generated, write them onto a file.

Retrieve data from the file, and based on this, generate parameters dynamically for the next timestep. Now write this onto a file

At time t+1: The newly generated parameters is used as input to E+ for the next time step.

... and so on.

Is this above design feasible in EnergyPlus? If yes, a detailed explanation will be hugely appreciated.


Note: The crux of the query is whether control can be transferred from E+ to external programs (say for each minute of simulation) to fetch the inputs for the next timestep (which also happens to depend on the previous timestep's output)

cs_bot's avatar
247
cs_bot
asked 2017-09-18 05:26:03 -0500
__AmirRoth__'s avatar
4.4k
__AmirRoth__
updated 2017-09-22 11:07:38 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

3

You could implement such a processing if you use the ExternalInterface and then do the control either in a Functional Mockup Unit, or in the BCVTB.

Michael Wetter's avatar
1.7k
Michael Wetter
answered 2017-09-22 10:24:59 -0500
edit flag offensive 0 remove flag delete link

Comments

Can you please elaborate on the 'how' part? I am using timestep t's output of EnergyPlus, feeding it to another program (written in c++, say), and getting the output of that program to be fed as (t+1)th time input to E+. (with files preferably as the intermediate)

cs_bot's avatar cs_bot (2017-09-29 01:37:22 -0500) edit

See http://simulationresearch.lbl.gov/fmu... and the examples in http://simulationresearch.lbl.gov/fmu... Once you have E+ exported as an FMU, you can import it as an input/output block in a variety of free programmable environments that support FMI 1.0 for co-simulation, such as the BCVTB, Dymola, OpenModelica, PyFMI, Simulink etc.

Michael Wetter's avatar Michael Wetter (2017-10-03 22:51:42 -0500) edit

E+ exported AS an FMU or FOR it? Also, which object variable should I be tweaking to attain this? Schedule, EMS variable or EMS actuator?

cs_bot's avatar cs_bot (2017-10-17 01:59:15 -0500) edit

Dear Michael, Is it fair to say that another alternative is to use SystemCommand (under Actors -> Simulator, (authored by you)) in BCVTB to call C programs to further call other C/C++ functions if necessary (for a very C-specific implementation along with E+ and BCVTB)?

cs_bot's avatar cs_bot (2017-10-24 02:01:10 -0500) edit
add a comment see more comments