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

Control window properties over 8760 hours with EMS

asked 2016-12-05 09:15:26 -0600

MartinaRomeo gravatar image

updated 2016-12-07 09:05:58 -0600

Archmage gravatar image

Hi, I would like to run simulations of the thermal (heating and cooling) in order to determine the energy required in both cases. I would like to replace the glass thermal transmittance value (U-factor WindowMaterial: SimpleGlazingSystem) of random values that have determined an excell files and reported in the cvs of energy plus the scheduleFile. you can make such a procedure chart using the energy management system ???? how could I ??

edit retag flag offensive close merge delete


Do you mean you want to change the window over time during one simulation? or do several simulations with different windows for each?

Archmage gravatar image Archmage  ( 2016-12-06 15:55:26 -0600 )edit

no no, I'll explain. I created based on some experimental values of the numerical series consist of 8670 values (equal to the number of hours in a year) representing the thermal transmittance values. Each of these series is shown in a column of a csv file that I reported on energy plus copying the address on Schedule:File. I should do so that during the simulation the program associate at the first hour of the day the first value of the series. Essentially every hour of the day I have to replace the glass U-factor (the WindowMaterial: SimpleGlazingSystem) with that of my time series.

MartinaRomeo gravatar image MartinaRomeo  ( 2016-12-06 17:03:08 -0600 )edit

I have suggested to use the Energy Management System, but I can not understand how. So the first question is: 1- you can make this substitution? 2- how? how to write the program? 3- you have to suggest another approach to solve the problem ??

MartinaRomeo gravatar image MartinaRomeo  ( 2016-12-06 17:04:45 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted

answered 2016-12-07 10:19:58 -0600

MartinaRomeo gravatar image

so I can not load the time series on the schedule and make change that ?? first af all thanks for your answer! I had read here on the forum that it was possible to load the schedule as actuators and then write a program with EMS to make the value change. I have thought of doing it this way to avoid loading 8760 values in costruction also because I want to change the u factor in WindowMaterial: SimpleGlazingSystem then as the sole costruction I have this.

EnergyManagementSystem:Actuator, U_TRADIZIONAL_ACTUATOR, !- Name U-Traditional, !- Actuated Component Unique Name Schedule:File, !- Actuated Component Type Schedule Value; !- Actuated Component Control Type

EnergyManagementSystem:ProgramCallingManager, MY U VALUE SCHEDULE , !- Name UserDefinedComponentModel, !- EnergyPlus Model Calling Point U_VALUE_PROG; !- Program Name 1

EnergyManagementSystem:Program, U_VALUE_PROG, !- Name IF (Hour == 1), !- Program Line 1 Set U-Factor = U_VALUE_ACTUATOR, !- Program Line 2 ENDIF; !- A4

EnergyManagementSystem:GlobalVariable, AVERAGE; !- Erl Variable 1 Name

it is wrong to do so? perhaps the part of the program should be written as I've proprosto but adapting it to my attutatori? thanks again for your answer

edit flag offensive delete link more


@MartinaRomeo this is for answers only. Please edit your original question or use the add a comment feature. You are however allowed to answer your own question. Thanks!

MatthewSteen gravatar image MatthewSteen  ( 2016-12-07 13:06:56 -0600 )edit

answered 2016-12-07 09:02:42 -0600

Archmage gravatar image

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.

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.

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>
edit flag offensive delete link more


... and if it is possible like this, you could use a script to automatically write that code (use 1 loop for 44 else-if-statements, 1 loop for Hour, 1 loop for DayOfYear). Additionally generate the the 8760 Window definitions by a script automatically, too. But why would the U-value change randomly over time ... is that any practical approach?

Mike06 gravatar image Mike06  ( 2016-12-08 04:01:56 -0600 )edit

Your Answer

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

Add Answer

Training Workshops

Question Tools

1 follower


Asked: 2016-12-05 09:15:26 -0600

Seen: 175 times

Last updated: Dec 07 '16