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

Parameters:

  • thermal_zones (Array<OpenStudio::Model::ThermalZone] an array of zones)

    hermal_zones [Array<OpenStudio::Model::ThermalZone] an array of zones

Returns:

  • (Array<OpenStudio::Model::ThermalZone] an array of zones)

    Array<OpenStudio::Model::ThermalZone] an array of zones



534
535
536
537
538
539
540
541
542
543
544
545
# File 'lib/openstudio-standards/btap/geometry.rb', line 534

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

Parameters:

  • thermal_zones (Array<OpenStudio::Model::ThermalZone>)

    an array of zones

Returns:

  • (Array<OpenStudio::Model::ThermalZone] an array of thermal zones.)

    Array<OpenStudio::Model::ThermalZone] an array of thermal zones.



514
515
516
517
518
519
520
521
522
523
524
525
# File 'lib/openstudio-standards/btap/geometry.rb', line 514

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