Â@ Gaurav thanx for the offer but unfortunately I cannot share the idf.
Jean, thank you so much for the suggestions. I tried them all but the problem remains. In the nested format the program looks like the following. There are no warnings or errors regarding the EMS.
EnergyManagementSystem:Program,
   Tmaster_OpeningController, !- Name
   IF Tmaster > VentSetpoint, !- Program Line 1
   IF Tmaster > Tout,      !- Program Line 2
   IF VentAvailSch == 1,   !- A4
   SET MasterOpenFactor = 1, !- A5
   ELSE ,                  !- A6
   SET MasterOpenFactor = 0, !- A7
   ENDIF,                  !- A8
   ENDIF,                  !- A9
   ENDIF;                  !- A10
It seems that EMS works (window on/off with no modulation) but it doesn't take into account the schedules that exist in the 2 of the 3 conditions (Ventilation Setpoint and Venting Availability Schedule). These two are both defined in Schedules:Compact and I only ask to read them and not to rewrite them in the EMS.
In conclusion, if someone wants to simulate a room with AirFlowNetwork and control the window opening (on/off, no modulation) according to the Tzone, Tout and a Venting Availability Schedule how can he do it ?
Does anyone have any similar model that works and can share? I checked the examples files but I didn't find any.
Any other suggestions are more than welcome.
Catherine
---In EnergyPlus_Support@xxxxxxxxxxxxxxx, <jeannieboef@...> wrote :I suggest nesting if statements, i.e. not to string all the conditional statements in one long line (xxx && yyy && zzz).Second suggestion is to use Constant instead of Temperature. If you want to modulate the openings, do it also with EMS, i.e. avoid trying to mix controllers.Thirdly, report at at least timestep intervals.Mit freundlichen GrüÃ?en- Sent from my iPhone (excuse the brevity)i. A.Jean Maraisb.i.g. bechtoldTel.  +49 30 6706662-23On 03.08.2015, at 21:15, "katdra83@... [EnergyPlus_Support]" <EnergyPlus_Support@xxxxxxxxxxxxxxx> wrote:ÂHello everyone,
I am trying to model a naturally ventilated flat of 4 zones using AirFlowNetwork in Energyplus. The problem appears when I try to override the modulation of window opening area that normally occurs when the ventilation control mode is â??temperatureâ??. I am using EMS in order to define a binary control (on/off) of window opening by using 3 conditions:
IF ( Tzone > VentilationSetpoint ) && ( Tzone > Texternal ) && ( VentilationAvailabilitySchedule ==1)
SET ZoneOpenFactor = 1
ELSE
SET ZoneOpenFactor = 0
ENDIF
VentilationSetpoint and VentilationAvailabilitySchedule are previously defined as Schedule:Compact.
There are no errors for the EMS after the run and it seems to work fine (there are no modulation of window opening area, the open factor is either 0 or 1) but:
During summer when the VentilationSetpoint is set to 26oC, there are many cases that the windows are open even though Tzone < 26oC (I am always referring to the Temperatures of the previous tilmestep). Sometimes the windows are open when the Tzone is even 24.5oC !! This behavior is not consistent throughout the summer period. There are some occasions that the windows are open at 25oC and others that are closed at the same temperature, even though the 3 conditions (mentioned before) are identical.
I have tested different ventilation setpoints (24oC, 27oC) but the problem remains. I tried both â??Constantâ?? and â??Temperatureâ?? as Ventilation control mode but the results are identical.
You can find below the EMS inputs in detail (energyplus v.8.3)
Any help will be more than appreciated !
Catherine
!-Â Â ===========Â ALL OBJECTS IN CLASS: ENERGYMANAGEMENTSYSTEM:SENSOR ===========
EnergyManagementSystem:Sensor,
   Tkids,                  !- Name
   BlockNew:KidsBedroom,   !- Output:Variable or Output:Meter Index Key Name
   Zone Air Temperature;   !- Output:Variable or Output:Meter Name
EnergyManagementSystem:Sensor,
   Tmaster,                !- Name
   BlockNew:MasterBedroom, !- Output:Variable or Output:Meter Index Key Name
   Zone Air Temperature;   !- Output:Variable or Output:Meter Name
EnergyManagementSystem:Sensor,
   Tliving,                !- Name
   BlockNew:LivingRoom,    !- Output:Variable or Output:Meter Index Key Name
   Zone Air Temperature;   !- Output:Variable or Output:Meter Name
EnergyManagementSystem:Sensor,
   Tkitchen,               !- Name
   BlockNew:Kitchen,       !- Output:Variable or Output:Meter Index Key Name
   Zone Air Temperature;   !- Output:Variable or Output:Meter Name
EnergyManagementSystem:Sensor,
   Tout,                   !- Name
   ,                       !- Output:Variable or Output:Meter Index Key Name
   Site Outdoor Air Drybulb Temperature; !- Output:Variable or Output:Meter Name
EnergyManagementSystem:Sensor,
   VentAvailSch,           !- Name
   Window pattern A,       !- Output:Variable or Output:Meter Index Key Name
   Schedule Value;         !- Output:Variable or Output:Meter Name
EnergyManagementSystem:Sensor,
   VentSetpoint,           !- Name
   NatVent setpoint sched A,!- Output:Variable or Output:Meter Index Key Name
   Schedule Value;         !- Output:Variable or Output:Meter Name
!-Â Â ===========Â ALL OBJECTS IN CLASS: ENERGYMANAGEMENTSYSTEM:ACTUATOR ===========
EnergyManagementSystem:Actuator,
   KidsOpenFactor,         !- Name
   BlockNew:KidsBedroom_Wall_3_0_0_0_0_0_Win, !- Actuated Component Unique Name
   AirFlow Network Window/Door Opening, !- Actuated Component Type
   Venting Opening Factor; !- Actuated Component Control Type
EnergyManagementSystem:Actuator,
   MasterOpenFactor,       !- Name
   BlockNew:MasterBedroom_Wall_3_0_0_0_0_0_Win, !- Actuated Component Unique Name
   AirFlow Network Window/Door Opening, !- Actuated Component Type
   Venting Opening Factor; !- Actuated Component Control Type
EnergyManagementSystem:Actuator,
   LivingOpenFactor,       !- Name
   BlockNew:LivingRoom_Wall_11_0_0_0_0_0_Win, !- Actuated Component Unique Name
   AirFlow Network Window/Door Opening, !- Actuated Component Type
   Venting Opening Factor; !- Actuated Component Control Type
EnergyManagementSystem:Actuator,
   KitchenOpenFactor,      !- Name
   BlockNew:Kitchen_Wall_5_0_0_0_0_0_Win, !- Actuated Component Unique Name
   AirFlow Network Window/Door Opening, !- Actuated Component Type
   Venting Opening Factor; !- Actuated Component Control Type
!-Â Â ===========Â ALL OBJECTS IN CLASS: ENERGYMANAGEMENTSYSTEM:PROGRAMCALLINGMANAGER ===========
EnergyManagementSystem:ProgramCallingManager,
   Tkids Controlled Open Factor, !- Name
   BeginTimestepBeforePredictor, !- EnergyPlus Model Calling Point
   Tkids_OpeningController; !- Program Name 1
EnergyManagementSystem:ProgramCallingManager,
   Tmaster Controlled Open Factor, !- Name
   BeginTimestepBeforePredictor, !- EnergyPlus Model Calling Point
   Tmaster_OpeningController; !- Program Name 1
EnergyManagementSystem:ProgramCallingManager,
   Tliving Controlled Open Factor, !- Name
   BeginTimestepBeforePredictor, !- EnergyPlus Model Calling Point
   Tliving_OpeningController; !- Program Name 1
EnergyManagementSystem:ProgramCallingManager,
   Tkitchen Controlled Open Factor, !- Name
   BeginTimestepBeforePredictor, !- EnergyPlus Model Calling Point
   Tkitchen_OpeningController; !- Program Name 1
!-Â Â ===========Â ALL OBJECTS IN CLASS: ENERGYMANAGEMENTSYSTEM:PROGRAM ===========
EnergyManagementSystem:Program,
   Tkids_OpeningController, !- Name
   IF ( Tkids > VentSetpoint ) && ( Tkids > Tout ) && ( VentAvailSch == 1 ), !- Program Line 1
   SET KidsOpenFactor = 1.0,!- Program Line 2
   ELSE,                   !- A4
   SET KidsOpenFactor = 0.0,!- A5
   ENDIF;                  !- A6
EnergyManagementSystem:Program,
   Tmaster_OpeningController, !- Name
   IF ( Tmaster > VentSetpoint ) && ( Tmaster > Tout ) && ( VentAvailSch == 1 ), !- Program Line 1
   SET MasterOpenFactor = 1.0, !- Program Line 2
   ELSE,                   !- A4
   SET MasterOpenFactor = 0.0, !- A5
   ENDIF;                  !- A6
EnergyManagementSystem:Program,
   Tliving_OpeningController, !- Name
   IF ( Tliving > VentSetpoint ) && ( Tliving > Tout ) && ( VentAvailSch == 1 ), !- Program Line 1
   SET LivingOpenFactor = 1.0, !- Program Line 2
   ELSE,                   !- A4
   SET LivingOpenFactor = 0.0, !- A5
   ENDIF;                  !- A6
EnergyManagementSystem:Program,
   Tkitchen_OpeningController, !- Name
   IF ( Tkitchen > VentSetpoint ) && ( Tkitchen > Tout ) && ( VentAvailSch == 1 ), !- Program Line 1
   SET KitchenOpenFactor = 1.0, !- Program Line 2
   ELSE,                   !- A4
   SET KitchenOpenFactor = 0.0, !- A5
   ENDIF;                  !- A6
__._,_.___