Module: BTAP::Geometry::Zones

Defined in:
lib/openstudio-standards/btap/geometry.rb

Overview

This Module contains methods that create, modify and query Thermal zone objects.

Class Method Summary collapse

Class Method Details

.filter_core_zones(thermal_zones) ⇒ Array<OpenStudio::Model::ThermalZone] an array of zones

This method will filter an array of zones that have no external wall passed floors. Note: if you wish to avoid to create an array of spaces, simply put the space variable in [] brackets Ex: ( [space1,space2] )



602
603
604
605
606
607
608
609
610
611
612
613
# File 'lib/openstudio-standards/btap/geometry.rb', line 602

def self.filter_core_zones(thermal_zones)
  array = Array.new()
  thermal_zones.getThermalZones.sort.each do |zone|
    zone.space.each do |space|
      if not space.is_a_perimeter_space?()
        array.push(zone)
        next
      end
    end
  end
  return array
end

.filter_perimeter_zones(thermal_zones) ⇒ Array<OpenStudio::Model::ThermalZone] an array of thermal zones.

This method will filter an array of zones that have an external wall passed floors. Note: if you wish to avoid to create an array of spaces, simply put the space variable in [] brackets Ex: get_all_surfaces_from_spaces( [space1,space2] )



583
584
585
586
587
588
589
590
591
592
593
594
# File 'lib/openstudio-standards/btap/geometry.rb', line 583

def self.filter_perimeter_zones(thermal_zones)
  array = Array.new()
  thermal_zones.each do |zone|
    zone.space.each do |space|
      if space.is_a_perimeter_space?()
        array.push(zone)
        next
      end
    end
  end
  return array
end