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

How does one use ZoneHVACEquipmentList in an OpenStudio Measure?

asked 2015-03-20 11:27:26 -0500

updated 2017-08-05 13:24:57 -0500

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).

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
4

answered 2015-03-20 12:15:05 -0500

updated 2015-03-20 12:16:46 -0500

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.

edit flag offensive delete link more

Comments

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

MatthewSteen gravatar image MatthewSteen  ( 2015-04-19 19:52:29 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

 

Question Tools

1 follower

Stats

Asked: 2015-03-20 11:27:26 -0500

Seen: 247 times

Last updated: Mar 20 '15