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

How to overwrite the terminal box airflow

asked 2016-05-04 14:01:52 -0500

BControl's avatar

updated 2016-08-28 19:29:47 -0500

I found a couple of questions asked in this category, but not sure anyone has actually sucessfully overwrite the airflow using the EMS, AirTerminal:SingleDuct:Uncontrolled, or it must be using a AirTerminal:SingleDuct:Userdefined?

This EMS just doesn't work, not sure why? Any suggestions are highly appreciated.

    ZoneTA,                     !- Name
    Core_ZN,             !- Output:Variable or Output:Meter Index Key Name
    Zone Air Temperature;  !- Output:Variable or Output:Meter Name

 EnergyManagementSystem:Actuator,  ! Check EMS manual Page 34
     CoreZoneAirFlow,    !- Name
     CORE_ZN DIRECT AIR, !- Actuated Component Unique Name
     AirTerminal:SingleDuct:Uncontrolled,        !- Actuated Component Type
     Mass Flow Rate;          !- Actuated Component Control Type    

    ZoneAirFlow_Overwrite Manager,  !- Name
    BeginTimestepBeforePredictor,  !- EnergyPlus Model Calling Point
    ZoneAirFlow_Overwrite;  !- Program Name 1

    ZoneAirFlow_Overwrite,  !- Name
    IF ZoneTA>23,  !- Program Line 1
    SET CoreZoneAirFlow = 0.2,  !- Program Line 2
    ELSE,                    !- <none>
    SET CoreZoneAirFlow = NULL,  !- <none>
    ENDIF;                   !- <none>


Now it switched a Userdefined Air terminal units with reheat coil. The reheat coil is not user defined. The airflow can be override, but the reheat coil seems to have connection issues.

    Core_ZN VAV Reheat,      !- Name
    CORE_ZN ATU Sim Programs,!- Overall Model Simulation Program Calling Manager Name
    CORE_ZN ATU Init Programs,  !- Model Setup and Sizing Program Calling Manager Name
    Core_ZN Zone Equip Inlet,!- Primary Air Inlet Node Name
    Core_ZN Supply Inlet,    !- Primary Air Outlet Node Name
    ,                        !- Secondary Air Inlet Node Name
    ,                        !- Secondary Air Outlet Node Name
    1,                       !- Number of Plant Loop Connections
    Core_ZN Reheat Coil HW Inlet,  !- Plant Connection 1 Inlet Node Name
    Core_ZN Reheat Coil HW Outlet;  !- Plant Connection 1 Outlet Node Name

    Core_ZN Reheat Coil,     !- Name
    HVACOperationSchd,       !- Availability Schedule Name
    autosize,                !- U-Factor Times Area Value {W/K}
    autosize,                !- Maximum Water Flow Rate {m3/s}
    Core_ZN Reheat Coil HW Inlet,  !- Water Inlet Node Name
    Core_ZN Reheat Coil HW Outlet,  !- Water Outlet Node Name
    Core_ZN Zone Equip Inlet,   !- Air Inlet Node Name
    Core_ZN Supply Inlet,    !- Air Outlet Node Name
    UFactorTimesAreaAndDesignWaterFlowRate,  !- Performance Input Method
    autosize,                !- Rated Capacity {W}
    82.2,                    !- Rated Inlet Water Temperature {C}
    16.6,                    !- Rated Inlet Air Temperature {C}
    71.1,                    !- Rated Outlet Water Temperature {C}
    32.2,                    !- Rated Outlet Air Temperature {C}
    1.0;                     !- Rated Ratio for Air and Water Convection

    Core_ZN Reheat Coil HW Branch,  !- Name
    ,                        !- Maximum Flow Rate {m3/s}
    ,                        !- Pressure Drop Curve Name
    AirTerminal:SingleDuct:UserDefined,  !- Component 1 Object Type
    Core_ZN VAV Reheat,      !- Component 1 Name
    Core_ZN Reheat Coil HW Inlet,  !- Component 1 Inlet Node Name
    Core_ZN Reheat Coil HW Outlet,  !- Component 1 Outlet Node Name
    Active;                  !- Component 1 Branch Control Type

The EMS programs are ignored here. In this case, the coil connection parts have some errors. Please see below.

* Severe * Node Connection Error, Node="CORE_ZN ZONE EQUIP INLET", The same node appears as a non-parent Inlet node more than once. * ~~~ * Reference Object=AIRTERMINAL:SINGLEDUCT:USERDEFINED, Name=CORE_ZN VAV REHEAT * ~~~ * Reference Object=COIL:HEATING:WATER, Name=CORE_ZN REHEAT COIL * Severe * Node Connection Error, Node="CORE_ZN REHEAT COIL HW INLET", The same node appears as a non-parent Inlet node more than once. * ~~~ * Reference Object=AIRTERMINAL:SINGLEDUCT:USERDEFINED ... (more)

edit retag flag offensive close merge delete


The AirTerminal:SingleDuct:UserDefined does not have a heating coil yet does have a connection to a plant loop (below). See example file EMSUserDefined5ZoneAirCooled.

 SPACE1-1 Reheat Branch,
 0,                     !- Maximum Flow Rate {m3/s}
 ,                      !- Pressure Drop Curve Name
 AirTerminal:SingleDuct:UserDefined,  !- Component 1 Object Type
 SPACE1-1 VAV Reheat,     !- Component 1 Name
 SPACE1-1 Zone Coil Water In Node,  !- Component 1 Inlet Node Name
 SPACE1-1 Zone Coil Water Out Node,  !- Component 1 Outlet Node Name
rraustad's avatar rraustad  ( 2016-08-29 08:24:53 -0500 )edit

Thanks, rraustad. Yes, this is the example I looked at. Since AirTerminal:SingleDuct:UserDefined has hot water connections, I think I will have to build a userdefined coil model to simulate the reheat coil part, instead of using the Coil:Heating:Water, .

BControl's avatar BControl  ( 2016-08-29 11:17:09 -0500 )edit

You don't need the user defined coil, just the model to calculate air and water flow and air properties. Study these 3 programs and see how the model input and output are calculated, and then see that output is placed on actuators to move the data from the model to the simulation.

  Space1 ATU Sim Programs, !- Name
  UserDefinedComponentModel,  !- EnergyPlus Model Calling Point
  Space1ATU_ModelInput,    !- Program Name 1
  ATU_Sim_Model,           !- Program Name 2
  Space1ATU_ModelOutput;   !- Program Name 3
rraustad's avatar rraustad  ( 2016-08-29 12:07:36 -0500 )edit

Thanks, rraustad. I think currently I used the Program 1 and 3. I found the Program 2 "ATU_Sim_Model" is related to the AHU's plant and coil initialization, etc. So far, the code is working for the interior zone, I will check if there is any issue with the exterior zones.

BControl's avatar BControl  ( 2016-08-29 16:28:37 -0500 )edit

2 Answers

Sort by » oldest newest most voted

answered 2016-05-05 09:24:08 -0500

Archmage's avatar

I have files with this EMS actuator working. I used the calling point InsideHVACSystemIterationLoop, because this is the sort of the thing you want to be updating during the system subtimesteps. Check output results at the detailed frequency.

The rest of the air handler needs to be setup to be able to operate at the flow request. Would need more information to help much. A VAV fan might be needed if you are trying to run at lower flow rates. The sizing could be holding it back if you are trying to run at higher flow rates.

edit flag offensive delete link more


Hi Archmage, I am wondering if you have used AirTerminal:SingleDuct:Userdefined ones to override the airflow. I am trying to use that because my model has the reheat. But I cannot find a relevant example that talks about it. And after I replacing my VAV terminal reheat box with the Userdefined ones. The simulation crashed

** Severe  ** Plant Component AirTerminal:SingleDuct:UserDefined called "CORE_ZN VAV REHEAT" was not found on any plant loops.

* ~~~ * Component, type="AirTerminal:SingleDuct:UserDefined", name="CORE_ZN VAV REHEAT" was not found on any Branch.

BControl's avatar BControl  ( 2016-08-25 18:31:14 -0500 )edit

If the terminal unit is connected to hot water plant, then it needs to appear in a Branch input object that is part of a hot water plant loop. It sounds like Branch object is missing or sill pointing at an AirTerminal:SingleDuct:VAV:Reheat.

Archmage's avatar Archmage  ( 2016-08-26 09:11:36 -0500 )edit

Thanks, Archmage, you are correct. I fixed the branch and get the AirTerminal:SingleDuct:UserDefined connected to the hot water plant loop. However, I am not sure how the heating coil shall be connected in this situation. Originally, AirTerminal:SingleDuct:VAV:Reheat has a Coil:Heating:Water, and the Air inlet note was the damper outlet. Now, after I switched to the AirTerminal:SingleDuct:UserDefined, this damper note was not there anymore. Do you know how should I connect the Coil:Heating:Water in this case? I am not using a user defined reheat coil. Thanks a lot!

BControl's avatar BControl  ( 2016-08-28 19:10:54 -0500 )edit

Hi Archmage, I updated the post (please see above) with the coding for the AirTerminal:SingleDuct:UserDefined. (no EMS part). I encountered some coil connection errors if I keep the reheat coil. Not sure if a AirTerminal:SingleDuct:UserDefined and work together with a Coil:Heating:Water as the reheat coil.

BControl's avatar BControl  ( 2016-08-28 19:32:32 -0500 )edit

The UserDefined terminal is not able to call a Coil:Heating:Water. The EMS program code for the terminal needs to implement its own hot water coil model, ( set hot water mass flow and water temperatures at the outlet). Note that in a VAV reheat terminal the air flow rate and the hot water flow rate need to be controlled to work together, which is why the user has to model both.

Archmage's avatar Archmage  ( 2016-08-29 09:01:02 -0500 )edit

answered 2016-05-04 19:09:44 -0500

updated 2016-05-05 14:38:04 -0500

This EMS program looks correct. I suspect the program is working, however, the calling point is before the HVAC system simulates and, therefore, the TU is overwriting your flow rate. BeginTimestepBeforePredictor means on the next time step before the program predicts the zone loads.

Try changing the calling point to the next 3 choices, in that order, to see if changing the calling point helps.

The other options are:

 A2 , \field EnergyPlus Model Calling Point
   \type choice
   \key BeginNewEnvironment
   \key AfterNewEnvironmentWarmUpIsComplete
   \key BeginTimestepBeforePredictor
   \key AfterPredictorBeforeHVACManagers
   \key AfterPredictorAfterHVACManagers
   \key InsideHVACSystemIterationLoop
   \key EndOfZoneTimestepBeforeZoneReporting
   \key EndOfZoneTimestepAfterZoneReporting
   \key EndOfSystemTimestepBeforeHVACReporting
   \key EndOfSystemTimestepAfterHVACReporting
   \key EndOfZoneSizing
   \key EndOfSystemSizing
   \key AfterComponentInputReadIn
   \key UserDefinedComponentModel
   \key UnitarySystemSizing
edit flag offensive delete link more


Thanks, rraustad, I have tried the other calling point, it didn't affect the simulation result. However, maybe this is error related to the VAV system capability. I am going to take a look at the VAV system to see if there is some issue about the fan low speed control itself. e.g., if the fan is only ON/OFF control, then, it probably needs to change to a VFD control.

BControl's avatar BControl  ( 2016-05-09 11:10:30 -0500 )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



Asked: 2016-05-04 14:01:52 -0500

Seen: 514 times

Last updated: Aug 28 '16