openstudio-standards 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (120) hide show
  1. checksums.yaml +4 -4
  2. data/data/standards/OpenStudio_Standards.xlsx +0 -0
  3. data/data/standards/OpenStudio_Standards_boilers.json +62 -4
  4. data/data/standards/OpenStudio_Standards_chillers.json +778 -68
  5. data/data/standards/OpenStudio_Standards_construction_sets.json +52 -93
  6. data/data/standards/OpenStudio_Standards_curve_biquadratics.json +36 -36
  7. data/data/standards/OpenStudio_Standards_curve_quadratics.json +3 -3
  8. data/data/standards/OpenStudio_Standards_heat_pumps.json +840 -0
  9. data/data/standards/OpenStudio_Standards_heat_pumps_heating.json +352 -0
  10. data/data/standards/OpenStudio_Standards_heat_rejection.json +48 -0
  11. data/data/standards/OpenStudio_Standards_motors.json +270 -0
  12. data/data/standards/OpenStudio_Standards_space_types.json +10390 -2824
  13. data/data/standards/OpenStudio_Standards_unitary_acs.json +794 -18
  14. data/data/weather/USA_CO_Boulder-Broomfield-Jefferson.County.AP.724699_TMY3.ddy +538 -0
  15. data/data/weather/USA_CO_Boulder-Broomfield-Jefferson.County.AP.724699_TMY3.epw +8768 -0
  16. data/data/weather/USA_CO_Boulder-Broomfield-Jefferson.County.AP.724699_TMY3.stat +493 -0
  17. data/data/weather/USA_CO_Denver.Intl.AP.725650_TMY3.ddy +536 -0
  18. data/data/weather/USA_CO_Denver.Intl.AP.725650_TMY3.epw +8768 -0
  19. data/data/weather/USA_CO_Denver.Intl.AP.725650_TMY3.stat +554 -0
  20. data/data/weather/USA_CO_Fort.Collins.AWOS.724769_TMY3.ddy +536 -0
  21. data/data/weather/USA_CO_Fort.Collins.AWOS.724769_TMY3.epw +8768 -0
  22. data/data/weather/USA_CO_Fort.Collins.AWOS.724769_TMY3.stat +554 -0
  23. data/data/weather/envelope_info.csv +6 -0
  24. data/lib/openstudio-standards.rb +10 -11
  25. data/lib/openstudio-standards/btap/compliance.rb +251 -969
  26. data/lib/openstudio-standards/btap/envelope.rb +1 -1
  27. data/lib/openstudio-standards/btap/fileio.rb +37 -5
  28. data/lib/openstudio-standards/btap/geometry.rb +27 -17
  29. data/lib/openstudio-standards/btap/hvac.rb +80 -27
  30. data/lib/openstudio-standards/hvac_sizing/{HVACSizing.CoilHeatingDXMultiSpeed.rb → Siz.CoilHeatingDXMultiSpeed.rb} +0 -0
  31. data/lib/openstudio-standards/hvac_sizing/Siz.ControllerOutdoorAir.rb +30 -4
  32. data/lib/openstudio-standards/hvac_sizing/Siz.CoolingTowerTwoSpeed.rb +61 -5
  33. data/lib/openstudio-standards/hvac_sizing/Siz.CoolingTowerVariableSpeed.rb +37 -7
  34. data/lib/openstudio-standards/hvac_sizing/Siz.DistrictCooling.rb +27 -0
  35. data/lib/openstudio-standards/hvac_sizing/Siz.DistrictHeating.rb +27 -0
  36. data/lib/openstudio-standards/hvac_sizing/Siz.HeaderedPumpsConstantSpeed.rb +55 -0
  37. data/lib/openstudio-standards/hvac_sizing/Siz.HeaderedPumpsVariableSpeed.rb +55 -0
  38. data/lib/openstudio-standards/hvac_sizing/Siz.HeatingCoolingFuels.rb +51 -9
  39. data/lib/openstudio-standards/hvac_sizing/Siz.Model.rb +99 -17
  40. data/lib/openstudio-standards/hvac_sizing/Siz.PumpConstantSpeed.rb +1 -1
  41. data/lib/openstudio-standards/hvac_sizing/Siz.ThermalZone.rb +29 -6
  42. data/lib/openstudio-standards/hvac_sizing/Siz.WaterHeaterMixed.rb +16 -0
  43. data/lib/openstudio-standards/prototypes/Prototype.AirTerminalSingleDuctVAVReheat.rb +43 -48
  44. data/lib/openstudio-standards/prototypes/Prototype.ControllerWaterCoil.rb +5 -9
  45. data/lib/openstudio-standards/prototypes/Prototype.Fan.rb +68 -0
  46. data/lib/openstudio-standards/prototypes/Prototype.FanConstantVolume.rb +39 -43
  47. data/lib/openstudio-standards/prototypes/Prototype.FanOnOff.rb +49 -51
  48. data/lib/openstudio-standards/prototypes/Prototype.FanVariableVolume.rb +55 -61
  49. data/lib/openstudio-standards/prototypes/Prototype.FanZoneExhaust.rb +8 -10
  50. data/lib/openstudio-standards/prototypes/Prototype.HeatExchangerAirToAirSensibleAndLatent.rb +15 -20
  51. data/lib/openstudio-standards/prototypes/Prototype.Model.hvac.rb +330 -322
  52. data/lib/openstudio-standards/prototypes/Prototype.Model.rb +501 -446
  53. data/lib/openstudio-standards/prototypes/Prototype.Model.swh.rb +221 -230
  54. data/lib/openstudio-standards/prototypes/Prototype.add_objects.rb +0 -2
  55. data/lib/openstudio-standards/prototypes/Prototype.full_service_restaurant.rb +130 -137
  56. data/lib/openstudio-standards/prototypes/Prototype.high_rise_apartment.rb +374 -291
  57. data/lib/openstudio-standards/prototypes/Prototype.hospital.rb +146 -193
  58. data/lib/openstudio-standards/prototypes/Prototype.hvac_systems.rb +1315 -1113
  59. data/lib/openstudio-standards/prototypes/Prototype.large_hotel.rb +65 -88
  60. data/lib/openstudio-standards/prototypes/Prototype.large_office.rb +101 -156
  61. data/lib/openstudio-standards/prototypes/Prototype.medium_office.rb +46 -96
  62. data/lib/openstudio-standards/prototypes/Prototype.mid_rise_apartment.rb +113 -123
  63. data/lib/openstudio-standards/prototypes/Prototype.outpatient.rb +356 -345
  64. data/lib/openstudio-standards/prototypes/Prototype.primary_school.rb +48 -103
  65. data/lib/openstudio-standards/prototypes/Prototype.quick_service_restaurant.rb +115 -123
  66. data/lib/openstudio-standards/prototypes/Prototype.retail_standalone.rb +30 -39
  67. data/lib/openstudio-standards/prototypes/Prototype.retail_stripmall.rb +32 -45
  68. data/lib/openstudio-standards/prototypes/Prototype.secondary_school.rb +98 -258
  69. data/lib/openstudio-standards/prototypes/Prototype.small_hotel.rb +429 -474
  70. data/lib/openstudio-standards/prototypes/Prototype.small_office.rb +28 -36
  71. data/lib/openstudio-standards/prototypes/Prototype.strip_model.rb +7 -7
  72. data/lib/openstudio-standards/prototypes/Prototype.utilities.rb +172 -146
  73. data/lib/openstudio-standards/prototypes/Prototype.warehouse.rb +46 -53
  74. data/lib/openstudio-standards/standards/Standards.AirLoopHVAC.rb +885 -707
  75. data/lib/openstudio-standards/standards/Standards.AirTerminalSingleDuctParallelPIUReheat.rb +48 -57
  76. data/lib/openstudio-standards/standards/Standards.AirTerminalSingleDuctVAVReheat.rb +24 -31
  77. data/lib/openstudio-standards/standards/Standards.BoilerHotWater.rb +80 -93
  78. data/lib/openstudio-standards/standards/Standards.BuildingStory.rb +69 -0
  79. data/lib/openstudio-standards/standards/Standards.ChillerElectricEIR.rb +60 -72
  80. data/lib/openstudio-standards/standards/Standards.CoilCoolingDXMultiSpeed.rb +104 -108
  81. data/lib/openstudio-standards/standards/Standards.CoilCoolingDXSingleSpeed.rb +190 -198
  82. data/lib/openstudio-standards/standards/Standards.CoilCoolingDXTwoSpeed.rb +134 -146
  83. data/lib/openstudio-standards/standards/Standards.CoilHeatingDXMultiSpeed.rb +56 -60
  84. data/lib/openstudio-standards/standards/Standards.CoilHeatingDXSingleSpeed.rb +151 -161
  85. data/lib/openstudio-standards/standards/Standards.CoilHeatingGasMultiStage.rb +30 -34
  86. data/lib/openstudio-standards/standards/Standards.Construction.rb +116 -132
  87. data/lib/openstudio-standards/standards/Standards.CoolingTower.rb +138 -0
  88. data/lib/openstudio-standards/standards/Standards.CoolingTowerSingleSpeed.rb +11 -0
  89. data/lib/openstudio-standards/standards/Standards.CoolingTowerTwoSpeed.rb +11 -0
  90. data/lib/openstudio-standards/standards/Standards.CoolingTowerVariableSpeed.rb +16 -0
  91. data/lib/openstudio-standards/standards/Standards.Fan.rb +190 -236
  92. data/lib/openstudio-standards/standards/Standards.FanConstantVolume.rb +0 -2
  93. data/lib/openstudio-standards/standards/Standards.FanOnOff.rb +0 -2
  94. data/lib/openstudio-standards/standards/Standards.FanVariableVolume.rb +168 -14
  95. data/lib/openstudio-standards/standards/Standards.FanZoneExhaust.rb +0 -2
  96. data/lib/openstudio-standards/standards/Standards.HeaderedPumpsConstantSpeed.rb +33 -0
  97. data/lib/openstudio-standards/standards/Standards.HeaderedPumpsVariableSpeed.rb +83 -0
  98. data/lib/openstudio-standards/standards/Standards.HeatExchangerSensLat.rb +22 -0
  99. data/lib/openstudio-standards/standards/Standards.Model.rb +2385 -1622
  100. data/lib/openstudio-standards/standards/Standards.PlanarSurface.rb +83 -35
  101. data/lib/openstudio-standards/standards/Standards.PlantLoop.rb +805 -395
  102. data/lib/openstudio-standards/standards/Standards.Pump.rb +139 -119
  103. data/lib/openstudio-standards/standards/Standards.PumpConstantSpeed.rb +0 -2
  104. data/lib/openstudio-standards/standards/Standards.PumpVariableSpeed.rb +16 -15
  105. data/lib/openstudio-standards/standards/Standards.ScheduleCompact.rb +35 -0
  106. data/lib/openstudio-standards/standards/Standards.ScheduleConstant.rb +7 -13
  107. data/lib/openstudio-standards/standards/Standards.ScheduleRuleset.rb +144 -59
  108. data/lib/openstudio-standards/standards/Standards.Space.rb +1509 -1326
  109. data/lib/openstudio-standards/standards/Standards.SpaceType.rb +254 -262
  110. data/lib/openstudio-standards/standards/Standards.SubSurface.rb +105 -105
  111. data/lib/openstudio-standards/standards/Standards.Surface.rb +27 -31
  112. data/lib/openstudio-standards/standards/Standards.ThermalZone.rb +882 -157
  113. data/lib/openstudio-standards/standards/Standards.WaterHeaterMixed.rb +179 -69
  114. data/lib/openstudio-standards/standards/Standards.ZoneHVACComponent.rb +75 -0
  115. data/lib/openstudio-standards/utilities/logging.rb +31 -38
  116. data/lib/openstudio-standards/utilities/simulation.rb +118 -82
  117. data/lib/openstudio-standards/version.rb +1 -1
  118. data/lib/openstudio-standards/weather/Weather.Model.rb +382 -390
  119. data/lib/openstudio-standards/weather/Weather.stat_file.rb +159 -78
  120. metadata +59 -6
@@ -1,11 +1,9 @@
1
1
 
2
2
  # open the class to add methods to return sizing values
3
3
  class OpenStudio::Model::CoilHeatingDXMultiSpeed
4
-
5
- def setStandardEfficiencyAndCurves(template, standards, sql_db_vars_map)
6
-
4
+ def apply_efficiency_and_curves(template, standards, sql_db_vars_map)
7
5
  successfully_set_all_properties = true
8
-
6
+
9
7
  heat_pumps = standards['heat_pumps_heating']
10
8
 
11
9
  # Define the criteria to find the unitary properties
@@ -16,30 +14,30 @@ class OpenStudio::Model::CoilHeatingDXMultiSpeed
16
14
  # Determine supplemental heating type if unitary
17
15
  heat_pump = false
18
16
  suppl_heating_type = nil
19
- if self.airLoopHVAC.empty?
20
- if self.containingHVACComponent.is_initialized
17
+ if airLoopHVAC.empty?
18
+ if containingHVACComponent.is_initialized
21
19
  containing_comp = containingHVACComponent.get
22
20
  if containing_comp.to_AirLoopHVACUnitaryHeatPumpAirToAirMultiSpeed.is_initialized
23
21
  heat_pump = true
24
22
  htg_coil = containing_comp.to_AirLoopHVACUnitaryHeatPumpAirToAirMultiSpeed.get.supplementalHeatingCoil
25
- if htg_coil.to_CoilHeatingElectric.is_initialized
26
- suppl_heating_type = 'Electric Resistance or None'
27
- else
28
- suppl_heating_type = 'All Other'
29
- end
30
- end # TODO Add other unitary systems
23
+ suppl_heating_type = if htg_coil.to_CoilHeatingElectric.is_initialized
24
+ 'Electric Resistance or None'
25
+ else
26
+ 'All Other'
27
+ end
28
+ end # TODO: Add other unitary systems
31
29
  end
32
30
  end
33
31
 
34
- # TODO Standards - add split system vs single package to model
32
+ # TODO: Standards - add split system vs single package to model
35
33
  # For now, assume single package
36
34
  subcategory = 'Single Package'
37
35
  search_criteria['subcategory'] = subcategory
38
36
 
39
37
  # Get the coil capacity
40
38
  clg_capacity = nil
41
- if(heat_pump == true)
42
- containing_comp = self.containingHVACComponent.get
39
+ if heat_pump == true
40
+ containing_comp = containingHVACComponent.get
43
41
  heat_pump_comp = containing_comp.to_AirLoopHVACUnitaryHeatPumpAirToAirMultiSpeed.get
44
42
  ccoil = heat_pump_comp.coolingCoil
45
43
  dxcoil = ccoil.to_CoilCoolingDXMultiSpeed.get
@@ -55,129 +53,129 @@ class OpenStudio::Model::CoilHeatingDXMultiSpeed
55
53
  elsif dxcoil.autosizedSpeed4GrossRatedTotalCoolingCapacity.is_initialized
56
54
  clg_capacity = dxcoil.autosizedSpeed4GrossRatedTotalCoolingCapacity.get
57
55
  else
58
- OpenStudio::logFree(OpenStudio::Warn, 'openstudio.standards.CoilHeatingDXMultiSpeed', "For #{self.name} capacity is not available, cannot apply efficiency standard.")
56
+ OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CoilHeatingDXMultiSpeed', "For #{name} capacity is not available, cannot apply efficiency standard.")
59
57
  successfully_set_all_properties = false
60
- return successfully_set_all_properties
58
+ return successfully_set_all_properties
61
59
  end
62
60
  dxcoil.setName(dxcoil_name)
63
61
  end
64
62
 
65
63
  # Convert capacity to Btu/hr
66
- capacity_btu_per_hr = OpenStudio.convert(clg_capacity, "W", "Btu/hr").get
67
- capacity_kbtu_per_hr = OpenStudio.convert(clg_capacity, "W", "kBtu/hr").get
64
+ capacity_btu_per_hr = OpenStudio.convert(clg_capacity, 'W', 'Btu/hr').get
65
+ capacity_kbtu_per_hr = OpenStudio.convert(clg_capacity, 'W', 'kBtu/hr').get
68
66
 
69
67
  # Lookup efficiencies depending on whether it is a unitary AC or a heat pump
70
- hp_props = self.model.find_object(heat_pumps, search_criteria, capacity_btu_per_hr)
68
+ hp_props = model.find_object(heat_pumps, search_criteria, capacity_btu_per_hr, Date.today)
71
69
 
72
70
  # Check to make sure properties were found
73
71
  if hp_props.nil?
74
- OpenStudio::logFree(OpenStudio::Warn, 'openstudio.standards.CoilHeatingDXMultipeed', "For #{self.name}, cannot find efficiency info, cannot apply efficiency standard.")
72
+ OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CoilHeatingDXMultipeed', "For #{name}, cannot find efficiency info, cannot apply efficiency standard.")
75
73
  successfully_set_all_properties = false
76
74
  return successfully_set_all_properties
77
75
  end
78
76
 
79
77
  # Make the HEAT-CAP-FT curve
80
- htg_stages = self.stages
81
- heat_cap_ft = self.model.add_curve(hp_props["heat_cap_ft"], standards)
78
+ htg_stages = stages
79
+ heat_cap_ft = model.add_curve(hp_props['heat_cap_ft'], standards)
82
80
  if heat_cap_ft
83
- htg_stages.each do |istage|
81
+ htg_stages.each do |istage|
84
82
  istage.setHeatingCapacityFunctionofTemperatureCurve(heat_cap_ft)
85
83
  end
86
84
  else
87
- OpenStudio::logFree(OpenStudio::Warn, 'openstudio.standards.CoilHeatingDXMultiSpeed', "For #{self.name}, cannot find heat_cap_ft curve, will not be set.")
85
+ OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CoilHeatingDXMultiSpeed', "For #{name}, cannot find heat_cap_ft curve, will not be set.")
88
86
  successfully_set_all_properties = false
89
87
  end
90
88
 
91
89
  # Make the HEAT-CAP-FFLOW curve
92
- heat_cap_fflow = self.model.add_curve(hp_props["heat_cap_fflow"], standards)
90
+ heat_cap_fflow = model.add_curve(hp_props['heat_cap_fflow'], standards)
93
91
  if heat_cap_fflow
94
92
  htg_stages.each do |istage|
95
- istage.setHeatingCapacityFunctionofFlowFractionCurve(heat_cap_fflow)
93
+ istage.setHeatingCapacityFunctionofFlowFractionCurve(heat_cap_fflow)
96
94
  end
97
95
  else
98
- OpenStudio::logFree(OpenStudio::Warn, 'openstudio.standards.CoilHeatingDXMultiSpeed', "For #{self.name}, cannot find heat_cap_fflow curve, will not be set.")
96
+ OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CoilHeatingDXMultiSpeed', "For #{name}, cannot find heat_cap_fflow curve, will not be set.")
99
97
  successfully_set_all_properties = false
100
98
  end
101
-
99
+
102
100
  # Make the HEAT-EIR-FT curve
103
- heat_eir_ft = self.model.add_curve(hp_props["heat_eir_ft"], standards)
101
+ heat_eir_ft = model.add_curve(hp_props['heat_eir_ft'], standards)
104
102
  if heat_eir_ft
105
103
  htg_stages.each do |istage|
106
104
  istage.setEnergyInputRatioFunctionofTemperatureCurve(heat_eir_ft)
107
105
  end
108
106
  else
109
- OpenStudio::logFree(OpenStudio::Warn, 'openstudio.standards.CoilHeatingDXMultiSpeed', "For #{self.name}, cannot find heat_eir_ft curve, will not be set.")
107
+ OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CoilHeatingDXMultiSpeed', "For #{name}, cannot find heat_eir_ft curve, will not be set.")
110
108
  successfully_set_all_properties = false
111
109
  end
112
110
 
113
111
  # Make the HEAT-EIR-FFLOW curve
114
- heat_eir_fflow = self.model.add_curve(hp_props["heat_eir_fflow"], standards)
112
+ heat_eir_fflow = model.add_curve(hp_props['heat_eir_fflow'], standards)
115
113
  if heat_eir_fflow
116
114
  htg_stages.each do |istage|
117
115
  istage.setEnergyInputRatioFunctionofFlowFractionCurve(heat_eir_fflow)
118
116
  end
119
117
  else
120
- OpenStudio::logFree(OpenStudio::Warn, 'openstudio.standards.CoilHeatingDXMultiSpeed', "For #{self.name}, cannot find heat_eir_fflow curve, will not be set.")
118
+ OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CoilHeatingDXMultiSpeed', "For #{name}, cannot find heat_eir_fflow curve, will not be set.")
121
119
  successfully_set_all_properties = false
122
120
  end
123
-
121
+
124
122
  # Make the HEAT-PLF-FPLR curve
125
- heat_plf_fplr = self.model.add_curve(hp_props["heat_plf_fplr"], standards)
123
+ heat_plf_fplr = model.add_curve(hp_props['heat_plf_fplr'], standards)
126
124
  if heat_plf_fplr
127
125
  htg_stages.each do |istage|
128
126
  istage.setPartLoadFractionCorrelationCurve(heat_plf_fplr)
129
127
  end
130
128
  else
131
- OpenStudio::logFree(OpenStudio::Warn, 'openstudio.standards.CoilHeatingDXMultiSpeed', "For #{self.name}, cannot find heat_plf_fplr curve, will not be set.")
129
+ OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CoilHeatingDXMultiSpeed', "For #{name}, cannot find heat_plf_fplr curve, will not be set.")
132
130
  successfully_set_all_properties = false
133
- end
134
-
131
+ end
132
+
135
133
  # For NECB the heat pump needs only one stage
136
134
  htg_capacity = nil
137
- flow_rate4 = nil
138
- if(template == 'NECB 2011')
139
- htg_stages = self.stages
135
+ flow_rate4 = nil
136
+ if template == 'NECB 2011'
137
+ htg_stages = stages
140
138
  if htg_stages.last.grossRatedHeatingCapacity.is_initialized
141
139
  htg_capacity = htg_stages.last.grossRatedHeatingCapacity.get
142
- elsif self.autosizedSpeed4GrossRatedHeatingCapacity.is_initialized
143
- htg_capacity = self.autosizedSpeed4GrossRatedHeatingCapacity.get
140
+ elsif autosizedSpeed4GrossRatedHeatingCapacity.is_initialized
141
+ htg_capacity = autosizedSpeed4GrossRatedHeatingCapacity.get
144
142
  else
145
- OpenStudio::logFree(OpenStudio::Warn, 'openstudio.standards.CoilHeatingDXMultiSpeed', "For #{self.name} capacity is not available, cannot apply efficiency standard.")
143
+ OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CoilHeatingDXMultiSpeed', "For #{name} capacity is not available, cannot apply efficiency standard.")
146
144
  successfully_set_all_properties = false
147
145
  return successfully_set_all_properties
148
- end
146
+ end
149
147
  if htg_stages.last.ratedAirFlowRate.is_initialized
150
148
  flow_rate4 = htg_stages.last.ratedAirFlowRate.get
151
- elsif self.autosizedSpeed4RatedAirFlowRate.is_initialized
152
- flow_rate4 = self.autosizedSpeed4RatedAirFlowRate.get
149
+ elsif autosizedSpeed4RatedAirFlowRate.is_initialized
150
+ flow_rate4 = autosizedSpeed4RatedAirFlowRate.get
153
151
  else
154
- OpenStudio::logFree(OpenStudio::Warn, 'openstudio.standards.CoilHeatingDXMultiSpeed', "For #{self.name} capacity is not available, cannot apply efficiency standard.")
152
+ OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CoilHeatingDXMultiSpeed', "For #{name} capacity is not available, cannot apply efficiency standard.")
155
153
  successfully_set_all_properties = false
156
154
  return successfully_set_all_properties
157
- end
155
+ end
158
156
  end
159
-
157
+
160
158
  # Convert capacity to Btu/hr
161
- capacity_btu_per_hr = OpenStudio.convert(htg_capacity, "W", "Btu/hr").get
162
- capacity_kbtu_per_hr = OpenStudio.convert(htg_capacity, "W", "kBtu/hr").get
159
+ capacity_btu_per_hr = OpenStudio.convert(htg_capacity, 'W', 'Btu/hr').get
160
+ capacity_kbtu_per_hr = OpenStudio.convert(htg_capacity, 'W', 'kBtu/hr').get
163
161
 
164
162
  # Get the minimum efficiency standards
165
163
  cop = nil
166
-
164
+
167
165
  # If specified as SEER
168
166
  unless hp_props['minimum_seasonal_energy_efficiency_ratio'].nil?
169
167
  min_seer = hp_props['minimum_seasonal_energy_efficiency_ratio']
170
168
  cop = seer_to_cop(min_seer)
171
- self.setName("#{self.name} #{capacity_kbtu_per_hr.round}kBtu/hr #{min_seer}SEER")
172
- OpenStudio::logFree(OpenStudio::Info, 'openstudio.standards.CoilHeatingDXMultiSpeed', "For #{template}: #{self.name}: #{suppl_heating_type} #{subcategory} Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; SEER = #{min_seer}")
169
+ setName("#{name} #{capacity_kbtu_per_hr.round}kBtu/hr #{min_seer}SEER")
170
+ OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.CoilHeatingDXMultiSpeed', "For #{template}: #{name}: #{suppl_heating_type} #{subcategory} Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; SEER = #{min_seer}")
173
171
  end
174
-
172
+
175
173
  # If specified as EER
176
174
  unless hp_props['minimum_energy_efficiency_ratio'].nil?
177
175
  min_eer = hp_props['minimum_energy_efficiency_ratio']
178
176
  cop = eer_to_cop(min_eer)
179
- self.setName("#{self.name} #{capacity_kbtu_per_hr.round}kBtu/hr #{min_eer}EER")
180
- OpenStudio::logFree(OpenStudio::Info, 'openstudio.standards.CoilHeatingDXMultiSpeed', "For #{template}: #{self.name}: #{suppl_heating_type} #{subcategory} Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; EER = #{min_eer}")
177
+ setName("#{name} #{capacity_kbtu_per_hr.round}kBtu/hr #{min_eer}EER")
178
+ OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.CoilHeatingDXMultiSpeed', "For #{template}: #{name}: #{suppl_heating_type} #{subcategory} Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; EER = #{min_eer}")
181
179
  end
182
180
 
183
181
  # Set the efficiency values
@@ -186,7 +184,5 @@ class OpenStudio::Model::CoilHeatingDXMultiSpeed
186
184
  istage.setGrossRatedHeatingCOP(cop)
187
185
  end
188
186
  end
189
-
190
187
  end
191
-
192
188
  end
@@ -1,48 +1,43 @@
1
1
 
2
2
  # open the class to add methods to return sizing values
3
3
  class OpenStudio::Model::CoilHeatingDXSingleSpeed
4
-
5
4
  # Finds the search criteria
6
5
  #
7
6
  # @param template [String] valid choices: 'DOE Ref Pre-1980', 'DOE Ref 1980-2004', '90.1-2004', '90.1-2007', '90.1-2010', '90.1-2013'
8
7
  # @return [hash] has for search criteria to be used for find object
9
8
  def find_search_criteria(template)
10
-
11
9
  # Define the criteria to find the chiller properties
12
10
  # in the hvac standards data set.
13
11
  search_criteria = {}
14
12
  search_criteria['template'] = template
15
13
 
16
- # TODO Standards - add split system vs single package to model
14
+ # TODO: Standards - add split system vs single package to model
17
15
  # For now, assume single package
18
16
  subcategory = 'Single Package'
19
17
  search_criteria['subcategory'] = subcategory
20
18
 
21
19
  return search_criteria
22
-
23
20
  end
24
21
 
25
22
  # Finds capacity in Btu/hr
26
23
  #
27
24
  # @return [Double] capacity in Btu/hr to be used for find object
28
- def find_capacity()
29
-
25
+ def find_capacity
30
26
  # Get the coil capacity
31
27
  capacity_w = nil
32
- if self.ratedTotalHeatingCapacity.is_initialized
33
- capacity_w = self.ratedTotalHeatingCapacity.get
34
- elsif self.autosizedRatedTotalHeatingCapacity.is_initialized
35
- capacity_w = self.autosizedRatedTotalHeatingCapacity.get
28
+ if ratedTotalHeatingCapacity.is_initialized
29
+ capacity_w = ratedTotalHeatingCapacity.get
30
+ elsif autosizedRatedTotalHeatingCapacity.is_initialized
31
+ capacity_w = autosizedRatedTotalHeatingCapacity.get
36
32
  else
37
- OpenStudio::logFree(OpenStudio::Warn, 'openstudio.standards.CoilHeatingDXSingleSpeed', "For #{self.name} capacity is not available, cannot apply efficiency standard.")
33
+ OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CoilHeatingDXSingleSpeed', "For #{name} capacity is not available, cannot apply efficiency standard.")
38
34
  return false
39
35
  end
40
36
 
41
37
  # Convert capacity to Btu/hr
42
- capacity_btu_per_hr = OpenStudio.convert(capacity_w, "W", "Btu/hr").get
38
+ capacity_btu_per_hr = OpenStudio.convert(capacity_w, 'W', 'Btu/hr').get
43
39
 
44
40
  return capacity_btu_per_hr
45
-
46
41
  end
47
42
 
48
43
  # Finds lookup object in standards and return efficiency
@@ -50,18 +45,17 @@ class OpenStudio::Model::CoilHeatingDXSingleSpeed
50
45
  # @param template [String] valid choices: 'DOE Ref Pre-1980', 'DOE Ref 1980-2004', '90.1-2004', '90.1-2007', '90.1-2010', '90.1-2013'
51
46
  # @param standards [Hash] the OpenStudio_Standards spreadsheet in hash format
52
47
  # @return [Double] full load efficiency (COP)
53
- def standard_minimum_cop(template,standards)
54
-
48
+ def standard_minimum_cop(template, standards)
55
49
  # find ac properties
56
- search_criteria = self.find_search_criteria(template)
57
- subcategory = search_criteria["subcategory"]
58
- capacity_btu_per_hr = self.find_capacity
59
- capacity_kbtu_per_hr = OpenStudio.convert(capacity_btu_per_hr, "Btu/hr", "kBtu/hr").get
50
+ search_criteria = find_search_criteria(template)
51
+ subcategory = search_criteria['subcategory']
52
+ capacity_btu_per_hr = find_capacity
53
+ capacity_kbtu_per_hr = OpenStudio.convert(capacity_btu_per_hr, 'Btu/hr', 'kBtu/hr').get
60
54
 
61
55
  # Determine supplemental heating type if unitary
62
56
  heat_pump = false
63
- if self.airLoopHVAC.empty?
64
- if self.containingHVACComponent.is_initialized
57
+ if airLoopHVAC.empty?
58
+ if containingHVACComponent.is_initialized
65
59
  containing_comp = containingHVACComponent.get
66
60
  if containing_comp.to_AirLoopHVACUnitaryHeatPumpAirToAir.is_initialized
67
61
  heat_pump = true
@@ -70,118 +64,124 @@ class OpenStudio::Model::CoilHeatingDXSingleSpeed
70
64
  end
71
65
 
72
66
  # find object
73
- ac_props = nil
74
- if heat_pump == true
75
- ac_props = self.model.find_object(standards['heat_pumps_heating'], search_criteria, capacity_btu_per_hr)
76
- else
77
- ac_props = self.model.find_object(standards['heat_pumps'], search_criteria, capacity_btu_per_hr)
78
- end
67
+ ac_props = model.find_object(standards['heat_pumps_heating'], search_criteria, capacity_btu_per_hr, Date.today)
79
68
 
80
69
  # Get the minimum efficiency standards
81
70
  cop = nil
82
71
 
83
72
  # Check to make sure properties were found
84
73
  if ac_props.nil?
85
- OpenStudio::logFree(OpenStudio::Warn, 'openstudio.standards.CoilHeatingDXSingleSpeed', "For #{self.name}, cannot find efficiency info, cannot apply efficiency standard.")
74
+ OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CoilHeatingDXSingleSpeed', "For #{name}, cannot find efficiency info, cannot apply efficiency standard.")
86
75
  return cop # value of nil
87
76
  end
88
77
 
89
- # If specified as SEER
90
- unless ac_props['minimum_seasonal_energy_efficiency_ratio'].nil?
91
- min_seer = ac_props['minimum_seasonal_energy_efficiency_ratio']
92
- cop = seer_to_cop(min_seer)
93
- OpenStudio::logFree(OpenStudio::Info, 'openstudio.standards.CoilHeatingDXSingleSpeed', "For #{template}: #{self.name}: #{suppl_heating_type} #{subcategory} Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; SEER = #{min_seer}")
78
+ # If specified as HSPF
79
+ unless ac_props['minimum_heating_seasonal_performance_factor'].nil?
80
+ min_hspf = ac_props['minimum_heating_seasonal_performance_factor']
81
+ cop = hspf_to_cop_heating_no_fan(min_hspf)
82
+ OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.CoilHeatingDXSingleSpeed', "For #{template}: #{name}: #{suppl_heating_type} #{subcategory} Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; HSPF = #{min_hspf}")
83
+ end
84
+
85
+ # If specified as COPH
86
+ unless ac_props['minimum_coefficient_of_performance_heating'].nil?
87
+ min_coph = ac_props['minimum_coefficient_of_performance_heating']
88
+ cop = cop_heating_to_cop_heating_no_fan(min_coph, OpenStudio.convert(capacity_kbtu_per_hr, 'kBtu/hr', 'W').get)
89
+ OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.CoilHeatingDXSingleSpeed', "For #{template}: #{name}: #{suppl_heating_type} #{subcategory} Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; COPH = #{min_coph}")
94
90
  end
95
91
 
96
92
  # If specified as EER
97
93
  unless ac_props['minimum_energy_efficiency_ratio'].nil?
98
94
  min_eer = ac_props['minimum_energy_efficiency_ratio']
99
- cop = eer_to_cop(min_eer)
100
- OpenStudio::logFree(OpenStudio::Info, 'openstudio.standards.CoilHeatingDXSingleSpeed', "For #{template}: #{self.name}: #{suppl_heating_type} #{subcategory} Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; EER = #{min_eer}")
95
+ cop = eer_to_cop(min_eer, OpenStudio.convert(capacity_kbtu_per_hr, 'kBtu/hr', 'W').get)
96
+ OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.CoilHeatingDXSingleSpeed', "For #{template}: #{name}: #{suppl_heating_type} #{subcategory} Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; EER = #{min_eer}")
101
97
  end
102
98
 
103
99
  return cop
104
-
105
100
  end
106
101
 
107
- def setStandardEfficiencyAndCurves(template, sql_db_vars_map)
108
-
102
+ def apply_efficiency_and_curves(template, sql_db_vars_map)
109
103
  successfully_set_all_properties = true
110
-
104
+
111
105
  unitary_hps = $os_standards['heat_pumps']
112
106
  heat_pumps = $os_standards['heat_pumps_heating']
113
-
107
+
114
108
  # Define the criteria to find the unitary properties
115
109
  # in the hvac standards data set.
116
110
  search_criteria = {}
117
111
  search_criteria['template'] = template
118
112
 
119
- # TODO Standards - add split system vs single package to model
113
+ # TODO: Standards - add split system vs single package to model
120
114
  # For now, assume single package
121
115
  subcategory = 'Single Package'
122
- search_criteria['subcategory'] = subcategory
116
+
117
+ # Assume they are all aircooled for now
118
+ search_criteria['cooling_type'] = 'AirCooled'
123
119
 
124
120
  # Determine supplemental heating type if unitary
125
- heat_pump = false
121
+ unitary = false
126
122
  suppl_heating_type = nil
127
- if self.airLoopHVAC.empty?
128
- if self.containingHVACComponent.is_initialized
123
+ if airLoopHVAC.empty?
124
+ if containingHVACComponent.is_initialized
129
125
  containing_comp = containingHVACComponent.get
130
126
  if containing_comp.to_AirLoopHVACUnitaryHeatPumpAirToAir.is_initialized
131
- heat_pump = true
127
+ unitary = true
132
128
  htg_coil = containing_comp.to_AirLoopHVACUnitaryHeatPumpAirToAir.get.supplementalHeatingCoil
133
- if htg_coil.to_CoilHeatingElectric.is_initialized
134
- suppl_heating_type = 'Electric Resistance or None'
135
- else
136
- suppl_heating_type = 'All Other'
137
- end
138
- end # TODO Add other unitary systems
139
- elsif self.containingZoneHVACComponent.is_initialized
140
- containing_comp = self.containingZoneHVACComponent.get
129
+ suppl_heating_type = if htg_coil.to_CoilHeatingElectric.is_initialized
130
+ 'Electric Resistance or None'
131
+ else
132
+ 'All Other'
133
+ end
134
+ end # TODO: Add other unitary systems
135
+ elsif containingZoneHVACComponent.is_initialized
136
+ containing_comp = containingZoneHVACComponent.get
141
137
  # PTHP
142
138
  if containing_comp.to_ZoneHVACPackagedTerminalHeatPump.is_initialized
143
139
  pthp = containing_comp.to_ZoneHVACPackagedTerminalHeatPump.get
144
- #heat_pump = true?
145
- # Todo: Should we implement a subcategory for PTHP like there is one for PTAC?
146
- # Because for PTHP the COP has two coefficients two (eg 90.1-2007: COP = 3.2 - 0.000026*Cap)
147
140
  subcategory = 'PTHP'
148
141
  htg_coil = containing_comp.to_ZoneHVACPackagedTerminalHeatPump.get.supplementalHeatingCoil
149
- if htg_coil.to_CoilHeatingElectric.is_initialized
150
- suppl_heating_type = 'Electric Resistance or None'
151
- else
152
- suppl_heating_type = 'All Other'
153
- end
142
+ suppl_heating_type = if htg_coil.to_CoilHeatingElectric.is_initialized
143
+ 'Electric Resistance or None'
144
+ else
145
+ 'All Other'
146
+ end
154
147
  end
155
148
  end
156
149
  end
157
150
 
151
+ # Add the subcategory to the search criteria
152
+ search_criteria['subcategory'] = subcategory
153
+
158
154
  # Determine the supplemental heating type if on an airloop
159
- if self.airLoopHVAC.is_initialized
160
- air_loop = self.airLoopHVAC.get
161
- if air_loop.supplyComponents('Coil:Heating:Electric'.to_IddObjectType).size > 0
162
- suppl_heating_type = 'Electric Resistance or None'
163
- elsif air_loop.supplyComponents('Coil:Heating:Gas'.to_IddObjectType).size > 0
164
- suppl_heating_type = 'All Other'
165
- elsif air_loop.supplyComponents('Coil:Heating:Water'.to_IddObjectType).size > 0
166
- suppl_heating_type = 'All Other'
167
- elsif air_loop.supplyComponents('Coil:Heating:DX:SingleSpeed'.to_IddObjectType).size > 0
168
- suppl_heating_type = 'All Other'
169
- elsif air_loop.supplyComponents('Coil:Heating:Gas:MultiStage'.to_IddObjectType).size > 0
170
- suppl_heating_type = 'All Other'
171
- elsif air_loop.supplyComponents('Coil:Heating:Desuperheater'.to_IddObjectType).size > 0
172
- suppl_heating_type = 'All Other'
173
- elsif air_loop.supplyComponents('Coil:Heating:WaterToAirHeatPump:EquationFit'.to_IddObjectType).size > 0
174
- suppl_heating_type = 'All Other'
175
- else
176
- suppl_heating_type = 'Electric Resistance or None'
177
- end
155
+ if airLoopHVAC.is_initialized
156
+ air_loop = airLoopHVAC.get
157
+ suppl_heating_type = if !air_loop.supplyComponents('OS:Coil:Heating:Electric'.to_IddObjectType).empty?
158
+ 'Electric Resistance or None'
159
+ elsif !air_loop.supplyComponents('OS:Coil:Heating:Gas'.to_IddObjectType).empty?
160
+ 'All Other'
161
+ elsif !air_loop.supplyComponents('OS:Coil:Heating:Water'.to_IddObjectType).empty?
162
+ 'All Other'
163
+ elsif !air_loop.supplyComponents('OS:Coil:Heating:DX:SingleSpeed'.to_IddObjectType).empty?
164
+ 'All Other'
165
+ elsif !air_loop.supplyComponents('OS:Coil:Heating:Gas:MultiStage'.to_IddObjectType).empty?
166
+ 'All Other'
167
+ elsif !air_loop.supplyComponents('OS:Coil:Heating:Desuperheater'.to_IddObjectType).empty?
168
+ 'All Other'
169
+ elsif !air_loop.supplyComponents('OS:Coil:Heating:WaterToAirHeatPump:EquationFit'.to_IddObjectType).empty?
170
+ 'All Other'
171
+ else
172
+ 'Electric Resistance or None'
173
+ end
178
174
  end
179
175
 
176
+ # Add the heating type to the search criteria
177
+ unless suppl_heating_type.nil?
178
+ search_criteria['heating_type'] = suppl_heating_type
179
+ end
180
180
 
181
181
  # Get the coil capacity
182
182
  capacity_w = nil
183
- if(heat_pump == true)
184
- containing_comp = self.containingHVACComponent.get
183
+ if unitary
184
+ containing_comp = containingHVACComponent.get
185
185
  heat_pump_comp = containing_comp.to_AirLoopHVACUnitaryHeatPumpAirToAir.get
186
186
  ccoil = heat_pump_comp.coolingCoil
187
187
  dxcoil = ccoil.to_CoilCoolingDXSingleSpeed.get
@@ -196,141 +196,131 @@ class OpenStudio::Model::CoilHeatingDXSingleSpeed
196
196
  elsif dxcoil.autosizedRatedTotalCoolingCapacity.is_initialized
197
197
  capacity_w = dxcoil.autosizedRatedTotalCoolingCapacity.get
198
198
  else
199
- OpenStudio::logFree(OpenStudio::Warn, 'openstudio.standards.CoilHeatingDXSingleSpeed', "For #{self.name} capacity is not available, cannot apply efficiency standard.")
199
+ OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CoilHeatingDXSingleSpeed', "For #{name} capacity is not available, cannot apply efficiency standard.")
200
200
  successfully_set_all_properties = false
201
- return successfully_set_all_properties
201
+ return successfully_set_all_properties
202
202
  end
203
203
  dxcoil.setName(dxcoil_name)
204
204
  else
205
- if self.ratedTotalHeatingCapacity.is_initialized
206
- capacity_w = self.ratedTotalHeatingCapacity.get
207
- elsif self.autosizedRatedTotalHeatingCapacity.is_initialized
208
- capacity_w = self.autosizedRatedTotalHeatingCapacity.get
205
+ if ratedTotalHeatingCapacity.is_initialized
206
+ capacity_w = ratedTotalHeatingCapacity.get
207
+ elsif autosizedRatedTotalHeatingCapacity.is_initialized
208
+ capacity_w = autosizedRatedTotalHeatingCapacity.get
209
209
  else
210
- OpenStudio::logFree(OpenStudio::Warn, 'openstudio.standards.CoilHeatingDXSingleSpeed', "For #{self.name} capacity is not available, cannot apply efficiency standard.")
210
+ OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CoilHeatingDXSingleSpeed', "For #{name} capacity is not available, cannot apply efficiency standard.")
211
211
  successfully_set_all_properties = false
212
212
  return successfully_set_all_properties
213
- end
213
+ end
214
214
  end
215
215
 
216
216
  # Convert capacity to Btu/hr
217
- capacity_btu_per_hr = OpenStudio.convert(capacity_w, "W", "Btu/hr").get
218
- capacity_kbtu_per_hr = OpenStudio.convert(capacity_w, "W", "kBtu/hr").get
217
+ capacity_btu_per_hr = OpenStudio.convert(capacity_w, 'W', 'Btu/hr').get
218
+ capacity_kbtu_per_hr = OpenStudio.convert(capacity_w, 'W', 'kBtu/hr').get
219
219
 
220
- # Lookup efficiencies depending on whether it is a unitary AC or a heat pump
220
+ # Lookup efficiencies depending on whether it is a unitary HP or a heat pump
221
221
  ac_props = nil
222
- if heat_pump == true
223
- ac_props = self.model.find_object(heat_pumps, search_criteria, capacity_btu_per_hr)
224
- else
225
- ac_props = self.model.find_object(unitary_hps, search_criteria, capacity_btu_per_hr)
226
- end
227
-
228
- # TODO: REMOVE THIS, TEMPORARY HACK ONLY
229
- if subcategory == 'PTHP'
230
- case template
231
- when '90.1-2007'
232
- pthp_cop_coeff_1 = 3.2
233
- pthp_cop_coeff_2 = -0.000026
234
- when '90.1-2010'
235
- # As of 10/08/2012
236
- pthp_cop_coeff_1 = 3.7
237
- pthp_cop_coeff_2 = -0.000052
238
- end
239
-
240
- # TABLE 6.8.1D
241
- # COP = pthp_cop_coeff_1 + pthp_cop_coeff_2 * Cap
242
- # Note c: Cap means the rated cooling capacity of the product in Btu/h.
243
- # If the unit’s capacity is less than 7000 Btu/h, use 7000 Btu/h in the calculation.
244
- # If the unit’s capacity is greater than 15,000 Btu/h, use 15,000 Btu/h in the calculation.
245
- capacity_btu_per_hr = 7000 if capacity_btu_per_hr < 7000
246
- capacity_btu_per_hr = 15000 if capacity_btu_per_hr > 15000
247
- pthp_cop = pthp_cop_coeff_1 + (pthp_cop_coeff_2 * capacity_btu_per_hr)
248
- new_comp_name = "#{self.name} #{capacity_kbtu_per_hr.round}kBtu/hr #{pthp_cop.round(1)}COP"
249
- self.setName(new_comp_name)
250
- self.setRatedCOP(pthp_cop)
251
- OpenStudio::logFree(OpenStudio::Info, 'openstudio.standards.CoilHeatingDXSingleSpeed', "HACK: For #{template}: #{self.name}: #{subcategory} Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr #{pthp_cop.round(2)}COP")
252
- end
253
- # TODO: END OF REMOVE THIS TEMPORARY HACK ONLY
222
+ ac_props = if unitary == true
223
+ model.find_object(unitary_hps, search_criteria, capacity_btu_per_hr, Date.today)
224
+ else
225
+ model.find_object(heat_pumps, search_criteria, capacity_btu_per_hr, Date.today)
226
+ end
254
227
 
255
228
  # Check to make sure properties were found
256
229
  if ac_props.nil?
257
- OpenStudio::logFree(OpenStudio::Warn, 'openstudio.standards.CoilHeatingDXSingleSpeed', "For #{self.name}, cannot find efficiency info, cannot apply efficiency standard.")
230
+ OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CoilHeatingDXSingleSpeed', "For #{name}, cannot find efficiency info, cannot apply efficiency standard.")
258
231
  successfully_set_all_properties = false
259
232
  return successfully_set_all_properties
260
233
  end
261
234
 
262
235
  # Make the HEAT-CAP-FT curve
263
- heat_cap_ft = self.model.add_curve(ac_props["heat_cap_ft"])
236
+ heat_cap_ft = model.add_curve(ac_props['heat_cap_ft'])
264
237
  if heat_cap_ft
265
- self.setTotalHeatingCapacityFunctionofTemperatureCurve(heat_cap_ft)
238
+ setTotalHeatingCapacityFunctionofTemperatureCurve(heat_cap_ft)
266
239
  else
267
- OpenStudio::logFree(OpenStudio::Warn, 'openstudio.standards.CoilHeatingDXSingleSpeed', "For #{self.name}, cannot find heat_cap_ft curve, will not be set.")
240
+ OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CoilHeatingDXSingleSpeed', "For #{name}, cannot find heat_cap_ft curve, will not be set.")
268
241
  successfully_set_all_properties = false
269
242
  end
270
243
 
271
244
  # Make the HEAT-CAP-FFLOW curve
272
- heat_cap_fflow = self.model.add_curve(ac_props["heat_cap_fflow"])
245
+ heat_cap_fflow = model.add_curve(ac_props['heat_cap_fflow'])
273
246
  if heat_cap_fflow
274
- self.setTotalHeatingCapacityFunctionofFlowFractionCurve(heat_cap_fflow)
247
+ setTotalHeatingCapacityFunctionofFlowFractionCurve(heat_cap_fflow)
275
248
  else
276
- OpenStudio::logFree(OpenStudio::Warn, 'openstudio.standards.CoilHeatingDXSingleSpeed', "For #{self.name}, cannot find heat_cap_fflow curve, will not be set.")
249
+ OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CoilHeatingDXSingleSpeed', "For #{name}, cannot find heat_cap_fflow curve, will not be set.")
277
250
  successfully_set_all_properties = false
278
251
  end
279
-
252
+
280
253
  # Make the HEAT-EIR-FT curve
281
- heat_eir_ft = self.model.add_curve(ac_props["heat_eir_ft"])
254
+ heat_eir_ft = model.add_curve(ac_props['heat_eir_ft'])
282
255
  if heat_eir_ft
283
- self.setEnergyInputRatioFunctionofTemperatureCurve(heat_eir_ft)
256
+ setEnergyInputRatioFunctionofTemperatureCurve(heat_eir_ft)
284
257
  else
285
- OpenStudio::logFree(OpenStudio::Warn, 'openstudio.standards.CoilHeatingDXSingleSpeed', "For #{self.name}, cannot find heat_eir_ft curve, will not be set.")
258
+ OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CoilHeatingDXSingleSpeed', "For #{name}, cannot find heat_eir_ft curve, will not be set.")
286
259
  successfully_set_all_properties = false
287
260
  end
288
261
 
289
262
  # Make the HEAT-EIR-FFLOW curve
290
- heat_eir_fflow = self.model.add_curve(ac_props["heat_eir_fflow"])
263
+ heat_eir_fflow = model.add_curve(ac_props['heat_eir_fflow'])
291
264
  if heat_eir_fflow
292
- self.setEnergyInputRatioFunctionofFlowFractionCurve(heat_eir_fflow)
265
+ setEnergyInputRatioFunctionofFlowFractionCurve(heat_eir_fflow)
293
266
  else
294
- OpenStudio::logFree(OpenStudio::Warn, 'openstudio.standards.CoilHeatingDXSingleSpeed', "For #{self.name}, cannot find heat_eir_fflow curve, will not be set.")
267
+ OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CoilHeatingDXSingleSpeed', "For #{name}, cannot find heat_eir_fflow curve, will not be set.")
295
268
  successfully_set_all_properties = false
296
269
  end
297
-
270
+
298
271
  # Make the HEAT-PLF-FPLR curve
299
- heat_plf_fplr = self.model.add_curve(ac_props["heat_plf_fplr"])
272
+ heat_plf_fplr = model.add_curve(ac_props['heat_plf_fplr'])
300
273
  if heat_plf_fplr
301
- self.setPartLoadFractionCorrelationCurve(heat_plf_fplr)
274
+ setPartLoadFractionCorrelationCurve(heat_plf_fplr)
302
275
  else
303
- OpenStudio::logFree(OpenStudio::Warn, 'openstudio.standards.CoilHeatingDXSingleSpeed', "For #{self.name}, cannot find heat_plf_fplr curve, will not be set.")
276
+ OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CoilHeatingDXSingleSpeed', "For #{name}, cannot find heat_plf_fplr curve, will not be set.")
304
277
  successfully_set_all_properties = false
305
- end
306
-
278
+ end
279
+
307
280
  # Get the minimum efficiency standards
308
281
  cop = nil
309
-
310
- # If specified as SEER
311
- unless ac_props['minimum_seasonal_energy_efficiency_ratio'].nil?
312
- min_seer = ac_props['minimum_seasonal_energy_efficiency_ratio']
313
- cop = seer_to_cop(min_seer)
314
- self.setName("#{self.name} #{capacity_kbtu_per_hr.round}kBtu/hr #{min_seer}SEER")
315
- OpenStudio::logFree(OpenStudio::Info, 'openstudio.standards.CoilHeatingDXSingleSpeed', "For #{template}: #{self.name}: #{suppl_heating_type} #{subcategory} Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; SEER = #{min_seer}")
282
+
283
+ # If PTHP, use equations
284
+ if subcategory == 'PTHP'
285
+ pthp_cop_coeff_1 = ac_props['pthp_cop_coefficient_1']
286
+ pthp_cop_coeff_2 = ac_props['pthp_cop_coefficient_2']
287
+ # TABLE 6.8.1D
288
+ # COP = pthp_cop_coeff_1 - (pthp_cop_coeff_2 * Cap / 1000)
289
+ # Note c: Cap means the rated cooling capacity of the product in Btu/h.
290
+ # If the unit's capacity is less than 7000 Btu/h, use 7000 Btu/h in the calculation.
291
+ # If the unit's capacity is greater than 15,000 Btu/h, use 15,000 Btu/h in the calculation.
292
+ capacity_btu_per_hr = 7000 if capacity_btu_per_hr < 7000
293
+ capacity_btu_per_hr = 15_000 if capacity_btu_per_hr > 15_000
294
+ cop = pthp_cop_coeff_1 - (pthp_cop_coeff_2 * capacity_btu_per_hr / 1000.0)
295
+ OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.CoilHeatingDXSingleSpeed', "For #{name}: #{subcategory} Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; COPH = #{cop.round(2)}")
296
+ end
297
+
298
+ # If specified as HSPF
299
+ unless ac_props['minimum_heating_seasonal_performance_factor'].nil?
300
+ min_hspf = ac_props['minimum_heating_seasonal_performance_factor']
301
+ cop = hspf_to_cop_heating_no_fan(min_hspf)
302
+ OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.CoilHeatingDXSingleSpeed', "For #{template}: #{name}: #{suppl_heating_type} #{subcategory} Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; HSPF = #{min_hspf}")
316
303
  end
317
-
304
+
305
+ # If specified as COPH
306
+ unless ac_props['minimum_coefficient_of_performance_heating'].nil?
307
+ min_coph = ac_props['minimum_coefficient_of_performance_heating']
308
+ cop = cop_heating_to_cop_heating_no_fan(min_coph, OpenStudio.convert(capacity_kbtu_per_hr, 'kBtu/hr', 'W').get)
309
+ OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.CoilHeatingDXSingleSpeed', "For #{template}: #{name}: #{suppl_heating_type} #{subcategory} Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; COPH = #{min_coph}")
310
+ end
311
+
318
312
  # If specified as EER
319
313
  unless ac_props['minimum_energy_efficiency_ratio'].nil?
320
314
  min_eer = ac_props['minimum_energy_efficiency_ratio']
321
- cop = eer_to_cop(min_eer)
322
- self.setName("#{self.name} #{capacity_kbtu_per_hr.round}kBtu/hr #{min_eer}EER")
323
- OpenStudio::logFree(OpenStudio::Info, 'openstudio.standards.CoilHeatingDXSingleSpeed', "For #{template}: #{self.name}: #{suppl_heating_type} #{subcategory} Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; EER = #{min_eer}")
315
+ cop = eer_to_cop(min_eer, OpenStudio.convert(capacity_kbtu_per_hr, 'kBtu/hr', 'W').get)
316
+ OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.CoilHeatingDXSingleSpeed', "For #{template}: #{name}: #{suppl_heating_type} #{subcategory} Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; EER = #{min_eer}")
324
317
  end
325
318
 
326
-
327
319
  # Set the efficiency values
328
320
  unless cop.nil?
329
- self.setRatedCOP(cop)
321
+ setRatedCOP(cop)
330
322
  end
331
323
 
332
324
  return sql_db_vars_map
333
-
334
325
  end
335
-
336
326
  end