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

.create_thermal_zone(model, spaces_array = "") ⇒ Object



2572
2573
2574
2575
2576
# File 'lib/openstudio-standards/btap/geometry.rb', line 2572

def self.create_thermal_zone(model, spaces_array = "")
  thermal_zone = OpenStudio::Model::ThermalZone.new(model)
  BTAP::Geometry::Spaces::assign_spaces_to_thermal_zone(model, spaces_array, thermal_zone)
  return thermal_zone
end

.enumerate_model(model) ⇒ Object



2524
2525
2526
# File 'lib/openstudio-standards/btap/geometry.rb', line 2524

def self.enumerate_model(model)

end

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

Returns:



2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
# File 'lib/openstudio-standards/btap/geometry.rb', line 2555

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:

Returns:



2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
# File 'lib/openstudio-standards/btap/geometry.rb', line 2535

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

.get_surfaces_from_thermal_zones(thermal_zone_array) ⇒ Object



2568
2569
2570
# File 'lib/openstudio-standards/btap/geometry.rb', line 2568

def self.get_surfaces_from_thermal_zones(thermal_zone_array)
  BTAP::Geometry::Surfaces::get_all_surfaces_from_thermal_zones(thermal_zone_array)
end