Hi Koji
You can use EMS to control a window
define the outside temperature as a sensor
Define the window opening factor as the actuator
read the EMS guide for instructions on how to do this
then you can write EMS code to control your windows
The example below is very simplistic, the EMS is very powerful and allows you to create many variations of window control, especially if you define sensors for internal air temperature and CO2 concentration
!!!!!!ensure that your window is defined to open:
AirflowNetwork:MultiZone:Component:DetailedOpening,
Class06:Class06_Wall_1_0_0_0_0_0_Win, !- Name - Win
.00014, !- Air Mass Flow Coefficient When Window or Door Is Closed (kg/s @ 1Pa per m crack)
.65, !- Air Mass Flow Exponent When Window or Door Is Closed (dimensionless)
NonPivoted, !- Type of large vertical opening (LVO)
0, !- Extra crack length for LVO type 1 with multiple openable parts (m)
2, !- Number of Opening Factor Values
0, !- Opening factor #1 (dimensionless)
.6, !- Discharge coefficient for opening factor #1 (dimensionless)
0, !- Width factor for opening factor #1 (dimensionless)
1, !- Height factor for opening factor #1 (dimensionless)
0, !- Start height factor for opening factor #1 (dimensionless)
1, !- Opening factor #2 (dimensionless)
.6, !- Discharge coefficient for Opening factor #2 (dimensionless)
0.00000001, !- Width factor for Opening factor #2 (dimensionless)
1, !- Height factor for Opening factor #2 (dimensionless)
0, !- Start height factor for Opening factor #2 (dimensionless)
0, !- Opening factor #3 (dimensionless)
0, !- Discharge coefficient for Opening factor #3 (dimensionless)
0, !- Width factor for Opening factor #3 (dimensionless)
0, !- Height factor for Opening factor #3 (dimensionless)
0, !- Start height factor for Opening factor #3 (dimensionless)
0, !- Opening factor #4 (dimensionless)
0, !- Discharge coefficient for Opening factor #4 (dimensionless)
0, !- Width factor for Opening factor #4 (dimensionless)
0, !- Height factor for Opening factor #4 (dimensionless)
0; !- Start height factor for Opening factor #4 (dimensionless)
!!!!!!sense outside air temperature:
!==============outside temp
EnergyManagementSystem:Sensor,
MyOutsideTemp, !- Name
Environment, !- Output:Variable or Output:Meter Index Key Name
Site Outdoor Air Drybulb Temperature; !- Output:Variable or Output:Meter Name
!!!!!=====define the sensor for above window
EnergyManagementSystem:Actuator,
ClassWindow, !- Name
Class06:Class06_Wall_1_0_0_0_0_0_Win, !- Actuated Component Unique Name large low window
AirFlow Network Window/Door Opening, !- Actuated Component Type
Venting Opening Factor; !- Actuated Component Control Type
!!!!======set ems control for example
EnergyManagementSystem:ProgramCallingManager,
Calculate vent openings, !- Name
BeginTimeStepBeforePredictor, !- EnergyPlus Model Calling Point
RunVentilation; !- Program Name 1
EnergyManagementSystem:Program,
RunVentilation,
If MyOutsideTemp > 20,
SET ClassWindow = 1,
Else,
SET ClassWindow = 0,
Endif;