Sha256: bfe363b357708122cde69d518bdbf546b4fb2c938b88af362f8d71079e922ff9

Contents?: true

Size: 1.99 KB

Versions: 3

Compression:

Stored size: 1.99 KB

Contents

class ASHRAE9012016 < ASHRAE901
  # @!group ThermalZone

  # Determine the thermal zone's occupancy type category.
  # Options are: residential, nonresidential, publicassembly, retail
  #
  # @return [String] the occupancy type category
  # @todo Add public assembly building types
  def thermal_zone_occupancy_type(thermal_zone)
    occ_type = if thermal_zone_residential?(thermal_zone)
                 'residential'
               else
                 'nonresidential'
               end

    # Based on the space type that
    # represents a majority of the zone.
    space_type = thermal_zone_majority_space_type(thermal_zone)
    if space_type.is_initialized
      space_type = space_type.get
      bldg_type = space_type.standardsBuildingType
      if bldg_type.is_initialized
        bldg_type = bldg_type.get
        case bldg_type
        when 'Retail', 'StripMall', 'SuperMarket'
          occ_type = 'retail'
          # when 'SomeBuildingType' # TODO add publicassembly building types
          # occ_type = 'publicassembly'
        end
      end
    end

    # OpenStudio::logFree(OpenStudio::Info, "openstudio.Standards.ThermalZone", "For #{self.name}, occupancy type = #{occ_type}.")

    return occ_type
  end

  # Determine the area and occupancy level limits for
  # demand control ventilation.
  #
  # @param thermal_zone [OpenStudio::Model::ThermalZone] the thermal zone
  # @return [Array<Double>] the minimum area, in m^2
  # and the minimum occupancy density in m^2/person.  Returns nil
  # if there is no requirement.
  def thermal_zone_demand_control_ventilation_limits(thermal_zone)
    min_area_ft2 = 500
    min_occ_per_1000_ft2 = 25

    # Convert to SI
    min_area_m2 = OpenStudio.convert(min_area_ft2, 'ft^2', 'm^2').get
    min_occ_per_ft2 = min_occ_per_1000_ft2 / 1000.0
    min_ft2_per_occ = 1.0 / min_occ_per_ft2
    min_m2_per_occ = OpenStudio.convert(min_ft2_per_occ, 'ft^2', 'm^2').get

    return [min_area_m2, min_m2_per_occ]
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
openstudio-standards-0.2.14 lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.ThermalZone.rb
openstudio-standards-0.2.13 lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.ThermalZone.rb
openstudio-standards-0.2.13.rc3 lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.ThermalZone.rb