lib/measures/tbd/resources/conditioned.rb
##
# Validate if model has zones with HVAC air loops
#
# @param [OpenStudio::Model::Model] model An OS model
#
# @return [Bool] Returns true if HVAC air loops
Validate if model has zones with HVAC air loops
Validate if model has zones with HVAC air loops
def airLoopsHVAC?(model)
  answer = false
  unless model && model.is_a?(OpenStudio::Model::Model)
    TBD.log(TBD::DEBUG,
      "Can't find or validate OSM (argument) for HVAC air loops - skipping")
    return answer
  end
  model.getThermalZones.each do |zone|
    next if answer
    next if zone.canBePlenum
    answer = true unless zone.airLoopHVACs.empty?
    answer = true if zone.isPlenum
  end
  answer
end
def airLoopsHVAC? ( model ) answer = false unless model && model . is_a? ( OpenStudio :: Model :: Model ) TBD . log ( TBD :: DEBUG , "Can't find or validate OSM (argument) for HVAC air loops - skipping" ) return answer end model . getThermalZones . each do | zone | next if answer next if zone . canBePlenum answer = true unless zone . airLoopHVACs . empty? answer = true if zone . isPlenum end answer end
Validate if model has zones with HVAC air loops
Validate if model has zones with HVAC air loops
Returns true if HVAC air loops
Returns true if HVAC air loops
Bool
model
model An OS model
model An OS model