lib/openstudio-standards/standards/Standards.ZoneHVACComponent.rb in openstudio-standards-0.2.16 vs lib/openstudio-standards/standards/Standards.ZoneHVACComponent.rb in openstudio-standards-0.2.17.rc1
- old
+ new
@@ -84,9 +84,50 @@
OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.ZoneHVACComponent', "For #{zone_hvac_component.name}: fan efficacy set to #{fan_efficacy_new_w_per_cfm.round(2)} W/cfm.")
return true
end
+ # Get the supply fan object for a zone equipment component
+ # @author Doug Maddox, PNNL
+ # @param zone_hvac_component [object]
+ # @return [object] supply fan of zone equipment component
+ def zone_hvac_get_fan_object(zone_hvac_component)
+ zone_hvac = nil
+ # Check for any zone equipment type that has a supply fan
+ # except EnergyRecoveryVentilator, which is not a primary conditioning system
+ zone_hvac = if zone_hvac_component.to_ZoneHVACFourPipeFanCoil.is_initialized
+ zone_hvac_component.to_ZoneHVACFourPipeFanCoil.get
+ elsif zone_hvac_component.to_ZoneHVACPackagedTerminalAirConditioner.is_initialized
+ zone_hvac_component.to_ZoneHVACPackagedTerminalAirConditioner.get
+ elsif zone_hvac_component.to_ZoneHVACPackagedTerminalHeatPump.is_initialized
+ zone_hvac_component.to_ZoneHVACPackagedTerminalHeatPump.get
+ elsif zone_hvac_component.to_ZoneHVACTerminalUnitVariableRefrigerantFlow.is_initialized
+ zone_hvac_component.to_ZoneHVACTerminalUnitVariableRefrigerantFlow.get
+ elsif zone_hvac_component.to_ZoneHVACUnitHeater.is_initialized
+ zone_hvac_component.to_ZoneHVACUnitHeater.get
+ elsif zone_hvac_component.to_ZoneHVACUnitVentilator.is_initialized
+ zone_hvac_component.to_ZoneHVACUnitVentilator.get
+ elsif zone_hvac_component.to_ZoneHVACWaterToAirHeatPump.is_initialized
+ zone_hvac_component.to_ZoneHVACWaterToAirHeatPump.get
+ end
+
+ # Get the fan
+ if !zone_hvac.nil?
+ fan_obj = if zone_hvac.supplyAirFan.to_FanConstantVolume.is_initialized
+ zone_hvac.supplyAirFan.to_FanConstantVolume.get
+ elsif zone_hvac.supplyAirFan.to_FanVariableVolume.is_initialized
+ zone_hvac.supplyAirFan.to_FanVariableVolume.get
+ elsif zone_hvac.supplyAirFan.to_FanOnOff.is_initialized
+ zone_hvac.supplyAirFan.to_FanOnOff.get
+ elsif zone_hvac.supplyAirFan.to_FanSystemModel.is_initialized
+ zone_hvac.supplyAirFan.to_FanSystemModel.get
+ end
+ return fan_obj
+ else
+ return nil
+ end
+ end
+
# Default occupancy fraction threshold for determining if the spaces served by the zone hvac are occupied
#
# @return [Double] unoccupied threshold
def zone_hvac_unoccupied_threshold
return 0.15