Module: ASHRAEPRMCoilDX

Included in:
ASHRAE901PRM
Defined in:
lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.CoilDX.rb

Overview

A variety of DX coil methods that are the same regardless of coil type. These methods are available to: CoilCoolingDXSingleSpeed, CoilCoolingDXTwoSpeed, CoilHeatingDXSingleSpeed

CoilDX collapse

Instance Method Details

#coil_dx_find_search_criteria(coil_dx, capacity, sys_type) ⇒ Hash

Finds the search criteria

Parameters:

  • coil_dx (OpenStudio::Model::StraightComponent)

    coil cooling object

  • capacity (Double)

    capacity in btu/hr

  • sys_type (String)

    HVAC system type

Returns:

  • (Hash)

    has for search criteria to be used for find object



81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
# File 'lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.CoilDX.rb', line 81

def coil_dx_find_search_criteria(coil_dx, capacity, sys_type)
  search_criteria = {}
  search_criteria['template'] = template

  search_criteria['cooling_type'] = 'AirCooled'

  # Get the coil_dx_subcategory(coil_dx)
  subcategory = coil_dx_subcategory(coil_dx, capacity, sys_type)
  unless subcategory.nil?
    search_criteria['subcategory'] = subcategory
  end

  if coil_dx.iddObjectType.valueName.to_s != 'OS_Coil_Heating_DX_SingleSpeed'
    search_criteria['heating_type'] = 'Any'
  end

  if sys_type == 'PTAC'
    search_criteria['equipment_type'] = sys_type
  elsif sys_type == 'PTHP'
    search_criteria['equipment_type'] = sys_type
  elsif sys_type == 'PSZ_AC'
    search_criteria['equipment_type'] = 'Air Conditioners'
  elsif sys_type == 'PSZ_HP'
    search_criteria['equipment_type'] = 'Heat Pumps'
  end

  return search_criteria
end

#coil_dx_number_of_systems(coil_dx, sys_type) ⇒ Double

Finds the subcategory.

Parameters:

  • coil_dx (OpenStudio::Model::StraightComponent)

    coil cooling object

  • sys_type (String)

    HVAC system type

Returns:

  • (Double)

    the number of systems



38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# File 'lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.CoilDX.rb', line 38

def coil_dx_number_of_systems(coil_dx, sys_type)
  # default to 1
  multiplier = 1

  # get thermal zone
  thermal_zone = OpenstudioStandards::HVAC.hvac_component_get_thermal_zone(coil_dx)

  if thermal_zone.nil?
    OpenStudio.logFree(OpenStudio::Error, 'prm.log', "Unable to determine thermal zone for coil #{coil_dx.name}.")
    return multiplier
  end

  # use user data multiplier if available
  if standards_data.key?('userdata_thermal_zone')
    standards_data['userdata_thermal_zone'].each do |row|
      next unless row['name'].to_s.downcase.strip == thermal_zone.name.to_s.downcase.strip

      if row['number_of_systems'].to_s.upcase.strip != ''
        mult = row['number_of_systems'].to_s
        if mult.to_i.to_s == mult
          multiplier = mult.to_i
        else
          OpenStudio.logFree(OpenStudio::Error, 'prm.log', 'In userdata_thermalzone, number_of_systems requires integer input.')
        end
        break
      end
    end
  end

  if (sys_type == 'PTAC') || (sys_type == 'PTHP')
    # use zone multiplier
    multiplier = thermal_zone.multiplier
  end

  return multiplier
end

#coil_dx_subcategory(coil_dx, capacity, sys_type) ⇒ String

Finds the subcategory.

Parameters:

  • coil_dx (OpenStudio::Model::StraightComponent)

    coil cooling object

  • capacity (Double)

    capacity in btu/hr

  • sys_type (String)

    HVAC system type

Returns:

  • (String)

    the coil_dx_subcategory(coil_dx)



13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.CoilDX.rb', line 13

def coil_dx_subcategory(coil_dx, capacity, sys_type)
  sub_category = nil
  if coil_dx.iddObjectType.valueName.to_s.include? 'OS_Coil_Cooling_DX'
    case sys_type
    when 'PTHP'
      sub_category = nil
    when 'PTAC'
      sub_category = nil
    when 'PSZ_HP'
      if capacity < 65000
        sub_category = 'Single Package'
      end
    else
      sub_category = 'Single Package'
    end
  end

  return sub_category
end