Overriding fan mass air flow in EMS
Related to a previous question - Double skin facade providing outside air to AHUs - I'm actively trying to implement an EMS solution.
I've setup a simple case with two labs (the rectangles if you will) and a "cavity" (the long thing):
The cavity is modeled with a separate AirLoopHVAC (which ultimately I'll set the fan curve coefficient to all zero in order to not double count fan power), 100% outside air (it's not right now...), and an adiabatic cooler which operation is limited to weather-permitting conditions matching the proposed sequence of operation from the MEP for summer pre-cooling.
Each lab AHU is modeled explicitly as an AirLoopHVAC with an outdoor air system. Both are identical and as follows:
The following pseudo-code algorithm is envisioned to be implemented using the EnergyManagementSystem:
- Sum the requested mass air flow rates for outside air of all AHU drawing from the cavity
- Pass the requested mass air flow rates to the cavity’s AirLoopHVAC
- Get the condition of the cavity’s zone node and feed this condition to outside air node of each lab AHU
I've then moved to EnergyPlus .idf and implemented the code in EMS, but I'm getting some strange results:
- I see the Cavity Fan using energy
- I see the Mass Flow Rate at the fan supply outlet node (which is also the loop's supply outlet) being changed
- BUT, All of the other nodes in the Cavity AHU loop has zero Mass Flow Rate
Additionally I'm trying to set both the Drybulb and Wetlbulb of the Lab's AHU outside air node to match the cavity zone, but the zone doesn't have wetbulb available, so I'm calculating wetbulb from db, humidity ratio and pressure, using the built-in Psychrometric function in EMS and getting absurd results.
What's wrong with this EMS code? How can I fix it?
Source:
I've uploaded my EnergyPlus model (and the initial OpenStudio model if you want to take an easier look at loops) here, but here is also my EMS code if that's easier for you:
!- =========== ALL OBJECTS IN CLASS: OUTDOORAIR:NODELIST ===========
OutdoorAir:NodeList,
Cavity East AHU Outside Air Node; !- Node or NodeList Name 1
OutdoorAir:NodeList,
RTU Lab1 Outside Air Node; !- Node or NodeList Name 1
OutdoorAir:NodeList,
RTU Lab2 Outside Air Node; !- Node or NodeList Name 1
!- =========== ALL OBJECTS IN CLASS: ENERGYMANAGEMENTSYSTEM:SENSOR ===========
EnergyManagementSystem:Sensor,
S_Cavity_Tdb, !- Name
Cavity East Zn, !- Output:Variable or Output:Meter Index Key Name
Zone Air Temperature; !- Output:Variable or Output:Meter Name
EnergyManagementSystem:Sensor,
RTU1MassFlowRate, !- Name
RTU Lab1, !- Output:Variable or Output:Meter Index Key Name
Air System Outdoor Air Mass Flow Rate; !- Output:Variable or Output:Meter Name
EnergyManagementSystem:Sensor,
RTU2MassFlowRate, !- Name
RTU Lab2, !- Output:Variable or Output:Meter Index Key Name
Air System Outdoor Air Mass Flow Rate; !- Output:Variable or Output:Meter Name
EnergyManagementSystem:Sensor,
S_Cavity_W, !- Name
Cavity East Zn, !- Output:Variable or Output:Meter Index Key Name
Zone Air Humidity Ratio; !- Output:Variable or Output ...