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



2626
2627
2628
2629
2630
# File 'lib/openstudio-standards/btap/geometry.rb', line 2626

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



2578
2579
2580
# File 'lib/openstudio-standards/btap/geometry.rb', line 2578

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:

  • 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



2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
# File 'lib/openstudio-standards/btap/geometry.rb', line 2609

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.



2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
# File 'lib/openstudio-standards/btap/geometry.rb', line 2589

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



2622
2623
2624
# File 'lib/openstudio-standards/btap/geometry.rb', line 2622

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