lbl-srg / EnergyPlusToFMU

EnergyPlus export as a Functional Mockup Unit for co-simulation
41 stars 17 forks source link

Define initial values of variables in Energy Plus #66

Open cnuevog opened 6 months ago

cnuevog commented 6 months ago

Hi everyone,

I am trying to create an FMU from Energy Plus with two variables, one input and one output (mean air temperature in two rooms). As for the creation, EnergyPlusToFMU does not return any error, but when I try to simulate it with the FMPy library, it returns an error that I think is related to the initialisation of the variables. The error is as follows: errorFMU

Parsing the FMU with the FMPy library GUI through the option Tools->Validate FMU, returns the following error:

_ModelStructure/InitialUnknowns does not contain the expected set of variables. Expected {REALTEMPPB:033FMU} but was {}.

Looking for ModelStructure in modelDescription.xml, it appears to be empty, as shown in the following image: image

Therefore, I think that there is missing information in ModelStructure related to the FMU variables, which I am probably not defining correctly in the .idf. In the .idf I have only added the ExternalInterface rows indicated in the EnergyPlusToFMU library tutorial, as shown in the following image: image

I have defined an initial value for the input, but not for the output. Do you think I am missing something? Is there any place inside ExternalInterface where I can define the initial values of the output variables?

The software versions I am using are: EnergyPlus 9.4.0 (released in 2020) EnergyPlusToFMU 3.1.0 (most recent one, released in 2021) FMPy 0.3.20 (most recent one, released in 2024) Running in Windows 64 bits

Thanks in advance!