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

Revision history [back]

click to hide/show revision 1
initial version

Yes it should be possible to do this with EMS, but it would be cumbersome. You may end up wanting to script the creation of the input objects rather than schedule values. There is an example called EMSThermochromicWindow.idf that should be helpful starting point, it is also discussed in the EMS application guide as Example 13. There are other posts on UnMet hours related to using EMS to manipulate constructions for dynamic performance, eg. https://unmethours.com/question/16819/errors-using-ems-on-e-to-simulate-dynamic-insulation/

For your case you would need to set up 8760 sets of the IDF input objects called Construction, EnergyManagementSystem:ConstructionIndexVariable, and WindowMaterial: SimpleGlazingSystem, that define the window for each hour (that is if they are all really unique). EMS can only swap out entire constructions over time at a surface, not modify the properties of a construction.

The EMS variable you define in each of the EnergyManagementSystem:ConstructionIndexVariable objects will need to be used in long EMS program(s). I believe the maximum length of an if-elseif logic block is 200, so you may need like 44 seperate if-elseif statements to be able to map each hour to actuate the surface's construction by setting the EMS variable. Unfortunately, the schedules can only provide you number values in EMS, but the EMS variables for a construction are variable names that cannot be a number. You could get the hour of the year (or any useful flag value) from a schedule to use in the program logic. Or there are built in EMS variables called DayOfYear and Hour to determine when during year the EMS program is running. This is how the if-elseif could start out.

EnergyManagementSystem:Program,
ZN_1_wall_south_Window_1_Control,  !- Name
IF ( ( Hour == 0 )  && ( DayOfYear == 1 ) ),    !- Program Line 1
Set Win1_Construct = Window_hour1,  !- Program Line 2
ELSEIF ( ( Hour == 1 )  && ( DayOfYear == 1 ) ),!- <none>
Set Win1_Construct = Window_hour2,  !- <none>
ELSEIF ( ( Hour == 2 )  && ( DayOfYear == 1 ) ),!- <none>
Set Win1_Construct = Window_hour3,  !- <none>
...