Module: CoilDX
- Included in:
- Standard
- Defined in:
- lib/openstudio-standards/standards/Standards.CoilDX.rb
Overview
A variety of DX coil methods that are the same regardless of coil type. These methods are available to: CoilCoolingDXSingleSpeed, CoilCoolingDXTwoSpeed, CoilCoolingDXMultiSpeed
CoilDX collapse
-
#coil_dx_find_search_criteria(coil_dx, necb_ref_hp = false) ⇒ Hash
Finds the search criteria.
-
#coil_dx_heat_pump?(coil_dx) ⇒ Boolean
Determine if it is a heat pump.
-
#coil_dx_heating_type(coil_dx, necb_ref_hp = false) ⇒ String
Determine the heating type.
-
#coil_dx_subcategory(coil_dx) ⇒ String
Finds the subcategory.
Instance Method Details
#coil_dx_find_search_criteria(coil_dx, necb_ref_hp = false) ⇒ Hash
Finds the search criteria
172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 |
# File 'lib/openstudio-standards/standards/Standards.CoilDX.rb', line 172 def coil_dx_find_search_criteria(coil_dx, necb_ref_hp = false) search_criteria = {} search_criteria['template'] = template search_criteria['cooling_type'] = case coil_dx.iddObjectType.valueName.to_s when 'OS_Coil_Cooling_DX_SingleSpeed', 'OS_Coil_Cooling_DX_TwoSpeed', 'OS_Coil_Cooling_DX_VariableSpeed', 'OS_Coil_Cooling_DX_MultiSpeed', 'OS_AirConditioner_VariableRefrigerantFlow' coil_dx.condenserType else 'AirCooled' end # Get the coil_dx_subcategory(coil_dx) search_criteria['subcategory'] = coil_dx_subcategory(coil_dx) # Add the heating type to the search criteria htg_type = coil_dx_heating_type(coil_dx, necb_ref_hp) unless htg_type.nil? search_criteria['heating_type'] = htg_type end # The heating side of unitary heat pumps don't have a heating type as part of the search if coil_dx.to_CoilHeatingDXSingleSpeed.is_initialized && coil_dx_heat_pump?(coil_dx) && coil_dx.airLoopHVAC.empty? && coil_dx.containingHVACComponent.is_initialized containing_comp = coil_dx.containingHVACComponent.get if containing_comp.to_AirLoopHVACUnitaryHeatPumpAirToAir.is_initialized search_criteria['heating_type'] = nil end # @todo Add other unitary systems end return search_criteria end |
#coil_dx_heat_pump?(coil_dx) ⇒ Boolean
Determine if it is a heat pump
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 74 75 76 77 |
# File 'lib/openstudio-standards/standards/Standards.CoilDX.rb', line 49 def coil_dx_heat_pump?(coil_dx) heat_pump = false if coil_dx.airLoopHVAC.empty? if coil_dx.containingHVACComponent.is_initialized containing_comp = coil_dx.containingHVACComponent.get if containing_comp.to_AirLoopHVACUnitaryHeatPumpAirToAir.is_initialized heat_pump = true elsif containing_comp.to_AirLoopHVACUnitaryHeatPumpAirToAirMultiSpeed.is_initialized htg_coil = containing_comp.to_AirLoopHVACUnitaryHeatPumpAirToAirMultiSpeed.get.heatingCoil if htg_coil.to_CoilHeatingDXMultiSpeed.is_initialized then heat_pump = true end end elsif coil_dx.containingZoneHVACComponent.is_initialized containing_comp = coil_dx.containingZoneHVACComponent.get # PTHP if containing_comp.to_ZoneHVACPackagedTerminalHeatPump.is_initialized heat_pump = true end # @todo Add other zone hvac systems end else if !coil_dx.airLoopHVAC.get.supplyComponents('OS:Coil:Heating:DX:SingleSpeed'.to_IddObjectType).empty? || !coil_dx.airLoopHVAC.get.supplyComponents('OS:Coil:Heating:DX:VariableSpeed'.to_IddObjectType).empty? heat_pump = true end end return heat_pump end |
#coil_dx_heating_type(coil_dx, necb_ref_hp = false) ⇒ String
Determine the heating type. Possible choices are: Electric Resistance or None, All Other
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 |
# File 'lib/openstudio-standards/standards/Standards.CoilDX.rb', line 86 def coil_dx_heating_type(coil_dx, necb_ref_hp = false) htg_type = nil # If Unitary or Zone HVAC if coil_dx.airLoopHVAC.empty? if coil_dx.containingHVACComponent.is_initialized containing_comp = coil_dx.containingHVACComponent.get if containing_comp.to_AirLoopHVACUnitaryHeatPumpAirToAir.is_initialized htg_type = 'Electric Resistance or None' elsif containing_comp.to_AirLoopHVACUnitarySystem.is_initialized htg_coil = containing_comp.to_AirLoopHVACUnitarySystem.get.heatingCoil if containing_comp.name.to_s.include? 'Minisplit' htg_type = 'All Other' elsif htg_coil.is_initialized htg_coil = htg_coil.get if htg_coil.to_CoilHeatingElectric.is_initialized || htg_coil.to_CoilHeatingDXMultiSpeed.is_initialized htg_type = 'Electric Resistance or None' elsif htg_coil.to_CoilHeatingGas.is_initialized || htg_coil.to_CoilHeatingGasMultiStage.is_initialized htg_type = 'All Other' end else htg_type = 'Electric Resistance or None' end elsif containing_comp.to_AirLoopHVACUnitaryHeatPumpAirToAirMultiSpeed.is_initialized htg_coil = containing_comp.to_AirLoopHVACUnitaryHeatPumpAirToAirMultiSpeed.get.heatingCoil supp_htg_coil = containing_comp.to_AirLoopHVACUnitaryHeatPumpAirToAirMultiSpeed.get.supplementalHeatingCoil if htg_coil.to_CoilHeatingDXMultiSpeed.is_initialized || supp_htg_coil.to_CoilHeatingElectric.is_initialized htg_type = 'Electric Resistance or None' elsif htg_coil.to_CoilHeatingGasMultiStage.is_initialized || htg_coil.to_CoilHeatingGas.is_initialized htg_type = 'All Other' end end # @todo Add other unitary systems elsif coil_dx.containingZoneHVACComponent.is_initialized containing_comp = coil_dx.containingZoneHVACComponent.get # PTAC if containing_comp.to_ZoneHVACPackagedTerminalAirConditioner.is_initialized htg_coil = containing_comp.to_ZoneHVACPackagedTerminalAirConditioner.get.heatingCoil if htg_coil.to_CoilHeatingElectric.is_initialized htg_type = 'Electric Resistance or None' elsif htg_coil.to_CoilHeatingWater.is_initialized || htg_coil.to_CoilHeatingGas.is_initialized htg_type = 'All Other' end # PTHP elsif containing_comp.to_ZoneHVACPackagedTerminalHeatPump.is_initialized htg_type = 'Electric Resistance or None' end # @todo Add other zone hvac systems end end # If on an AirLoop if coil_dx.airLoopHVAC.is_initialized air_loop = coil_dx.airLoopHVAC.get htg_type = if !air_loop.supplyComponents('OS:Coil:Heating:Gas'.to_IddObjectType).empty? 'All Other' elsif !air_loop.supplyComponents('OS:Coil:Heating:Water'.to_IddObjectType).empty? 'All Other' elsif !air_loop.supplyComponents('OS:Coil:Heating:DX:SingleSpeed'.to_IddObjectType).empty? 'All Other' elsif !air_loop.supplyComponents('OS:Coil:Heating:DX:MultiSpeed'.to_IddObjectType).empty? 'All Other' elsif !air_loop.supplyComponents('OS:Coil:Heating:DX:VariableSpeed'.to_IddObjectType).empty? 'All Other' elsif !air_loop.supplyComponents('OS:Coil:Heating:Gas:MultiStage'.to_IddObjectType).empty? 'All Other' elsif !air_loop.supplyComponents('OS:Coil:Heating:Desuperheater'.to_IddObjectType).empty? 'All Other' elsif !air_loop.supplyComponents('OS:Coil:Heating:WaterToAirHeatPump:EquationFit'.to_IddObjectType).empty? 'All Other' elsif !air_loop.supplyComponents('OS:Coil:Heating:Electric'.to_IddObjectType).empty? 'Electric Resistance or None' else 'Electric Resistance or None' end end return htg_type end |
#coil_dx_subcategory(coil_dx) ⇒ String
TODO:
Add add split system vs single package to model object
Finds the subcategory. Possible choices are: Single Package, Split System, PTAC, or PTHP
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/openstudio-standards/standards/Standards.CoilDX.rb', line 14 def coil_dx_subcategory(coil_dx) sub_category = 'Single Package' # Fallback to the name, mainly for library export if coil_dx.name.get.to_s.include?('Single Package') sub_category = 'Single Package' elsif coil_dx.name.get.to_s.include?('Split System') || coil_dx.name.get.to_s.include?('Central Air Source HP') sub_category = 'Split System' elsif coil_dx.name.get.to_s.include?('Minisplit HP') sub_category = 'Minisplit System' elsif coil_dx.name.get.to_s.include?('CRAC') sub_category = 'CRAC' end if coil_dx.airLoopHVAC.empty? && coil_dx.containingZoneHVACComponent.is_initialized containing_comp = coil_dx.containingZoneHVACComponent.get # PTAC if containing_comp.to_ZoneHVACPackagedTerminalAirConditioner.is_initialized sub_category = 'PTAC' # PTHP elsif containing_comp.to_ZoneHVACPackagedTerminalHeatPump.is_initialized sub_category = 'PTHP' end # @todo Add other zone hvac systems end return sub_category end |