First time here? Check our help page!
2

How does one use ZoneHVACEquipmentList in an OpenStudio Measure?

I'm trying to write a measure that will set the exhaust fan flow rate for a given zone based on the supply flow rate of the zone conditioning equipment, in this case PTACs in a large hotel (delta of 5 cfm per room). My question is if using ZoneHVACEquipmentList is the best approach and if so how it would be used to in a measure.

My larger question for future measures is how does one get the zone equipment from the equipment list and then make changes to that equipment for specific zones (e.g. by space type or name).

MatthewSteen's avatar
10.1k
MatthewSteen
asked 2015-03-20 11:27:26 -0500
__AmirRoth__'s avatar
4.4k
__AmirRoth__
updated 2017-08-05 13:24:57 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

4

Here's what I've found. Rather than using ZoneHVACEquipmentList, if you call zone.equipment, you get a vector of objects of class ModelObject, which can then be 'converted' to the specific equipment object you want with something like (for a fan coil):

zones = model.getThermalZones
zones.each do |zone|
  zone_eqp = zone.equipment
  zone_eqp.each do |eqp|
    if eqp.to_ZoneHVACFourPipeFanCoil.is_initialized
      fcu = eqp.to_ZoneHVACFourPipeFanCoil.get
    end
  end
end

From there, calling fcu.coolingCoil again returns a ModelObject, which can be converted to the correct object class by again checking if the class is initialized, then using "to_[class name].get", so ccoil = coil.to_CoilCoolingWater.get. The obvious downside is you have to know what equipment types you'll have in the zones ahead of time, or include logic for all available zone equipment.

To make changes based on space type or name, you'd just include logic within zones.each do |zone| to get the associated spaces (zone.spaces) and do your check before moving on to the equipment loop.

ericringold's avatar
10.6k
ericringold
answered 2015-03-20 12:15:05 -0500, updated 2015-03-20 12:16:46 -0500
edit flag offensive 0 remove flag delete link

Comments

Thanks Eric, I used this to write a general measure to Rename Zone HVAC Equipment And Components

MatthewSteen's avatar MatthewSteen (2015-04-19 19:52:29 -0500) edit
add a comment see more comments