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

Revision history [back]

If you want to be changing the properties of a construction during the simulation in EnergyPlus - the underlying engine used by OpenStudio - you need to use the Energy Management System (EMS).

This would be a pretty simple EMS program, using EnergyManagementSystem:ConstructionIndexVariable. The example 13 in the EMS Application Guide would be a very good starting point!

You need to define two constructions, "Roof-Day-R2.6" and "Roof-Night-4.6", then you define one EMS:ConstructionIndexVariable for each of these. You will need to add one EMS:Actuator for each surface where you want to change the 'Construction State' (if you have a lot of surfaces, you should leverage scripting in order to not go completely nuts).

Define an EMS:ProgramCallingManager: BeginTimestepBeforePredictor calling point would be fine for you.

Then an EMS:Program, where you would just do a simple IF based on Hour, something along the lines of:

EnergyManagementSystem:Program ,
Switch_Roof_Construction,
IF (Hour >= 8.0) && (Hour < 20.0) ,
   SET Roof_Surface1_Construct = Roof-Day-R2.6,
   SET Roof_Surface2_Construct = Roof-Day-R2.6,
ELSE,
   SET Roof_Surface1_Construct= Roof-Night-4.6,
   SET Roof_Surface2_Construct= Roof-Night-4.6,
ENDIF;

You would need to use an EnergyPlus Measure to inject (or create) the EMS code before simulation.

This might seem like a lot if you haven't touched EMS, nor EnergyPlus measures before, but it shouldn't be that hard.