openstudio-standards 0.1.3 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. checksums.yaml +4 -4
  2. data/data/standards/OpenStudio_Standards.xlsx +0 -0
  3. data/data/standards/OpenStudio_Standards_chillers.json +5 -5
  4. data/data/standards/OpenStudio_Standards_construction_sets.json +2 -2
  5. data/data/standards/OpenStudio_Standards_curve_cubics.json +12 -0
  6. data/data/standards/OpenStudio_Standards_heat_pumps.json +2126 -72
  7. data/data/standards/OpenStudio_Standards_heat_pumps_heating.json +766 -14
  8. data/data/standards/OpenStudio_Standards_heat_rejection.json +172 -0
  9. data/data/standards/OpenStudio_Standards_prototype_inputs.json +355 -267
  10. data/data/standards/OpenStudio_Standards_schedules.json +262 -10
  11. data/data/standards/OpenStudio_Standards_space_types.json +1466 -794
  12. data/data/standards/manage_OpenStudio_Standards.rb +19 -21
  13. data/data/weather/weather_info.csv +96 -0
  14. data/lib/openstudio-standards/btap/btap.rb +1 -1
  15. data/lib/openstudio-standards/btap/compliance.rb +135 -40
  16. data/lib/openstudio-standards/btap/envelope.rb +26 -5
  17. data/lib/openstudio-standards/btap/geometry.rb +11 -1
  18. data/lib/openstudio-standards/btap/hvac.rb +489 -56
  19. data/lib/openstudio-standards/btap/simmanager.rb +1 -1
  20. data/lib/openstudio-standards/hvac_sizing/HVACSizing.CoilHeatingDXMultiSpeed.rb +120 -0
  21. data/lib/openstudio-standards/hvac_sizing/Siz.CoilCoolingDXMultiSpeed.rb +151 -7
  22. data/lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingGasMultiStage.rb +48 -7
  23. data/lib/openstudio-standards/hvac_sizing/Siz.Model.rb +14 -12
  24. data/lib/openstudio-standards/prototypes/Prototype.AirTerminalSingleDuctVAVReheat.rb +33 -7
  25. data/lib/openstudio-standards/prototypes/Prototype.Model.hvac.rb +123 -91
  26. data/lib/openstudio-standards/prototypes/Prototype.Model.rb +130 -45
  27. data/lib/openstudio-standards/prototypes/Prototype.Model.swh.rb +13 -7
  28. data/lib/openstudio-standards/prototypes/Prototype.full_service_restaurant.rb +332 -324
  29. data/lib/openstudio-standards/prototypes/Prototype.hospital.rb +401 -99
  30. data/lib/openstudio-standards/prototypes/Prototype.hvac_systems.rb +309 -222
  31. data/lib/openstudio-standards/prototypes/Prototype.large_hotel.rb +100 -80
  32. data/lib/openstudio-standards/prototypes/Prototype.large_office.rb +37 -22
  33. data/lib/openstudio-standards/prototypes/Prototype.medium_office.rb +68 -53
  34. data/lib/openstudio-standards/prototypes/Prototype.mid_rise_apartment.rb +109 -88
  35. data/lib/openstudio-standards/prototypes/Prototype.outpatient.rb +52 -4
  36. data/lib/openstudio-standards/prototypes/Prototype.primary_school.rb +230 -213
  37. data/lib/openstudio-standards/prototypes/Prototype.quick_service_restaurant.rb +225 -218
  38. data/lib/openstudio-standards/prototypes/Prototype.retail_standalone.rb +29 -17
  39. data/lib/openstudio-standards/prototypes/Prototype.retail_stripmall.rb +42 -32
  40. data/lib/openstudio-standards/prototypes/Prototype.secondary_school.rb +331 -314
  41. data/lib/openstudio-standards/prototypes/Prototype.small_hotel.rb +233 -219
  42. data/lib/openstudio-standards/prototypes/Prototype.small_office.rb +40 -32
  43. data/lib/openstudio-standards/prototypes/Prototype.warehouse.rb +19 -6
  44. data/lib/openstudio-standards/standards/Standards.AirLoopHVAC.rb +576 -555
  45. data/lib/openstudio-standards/standards/Standards.AirTerminalSingleDuctVAVReheat.rb +3 -1
  46. data/lib/openstudio-standards/standards/Standards.BoilerHotWater.rb +35 -17
  47. data/lib/openstudio-standards/standards/Standards.ChillerElectricEIR.rb +51 -23
  48. data/lib/openstudio-standards/standards/Standards.CoilCoolingDXMultiSpeed.rb +255 -0
  49. data/lib/openstudio-standards/standards/Standards.CoilHeatingDXMultiSpeed.rb +192 -0
  50. data/lib/openstudio-standards/standards/Standards.CoilHeatingGasMultiStage.rb +65 -0
  51. data/lib/openstudio-standards/standards/Standards.Fan.rb +37 -6
  52. data/lib/openstudio-standards/standards/Standards.Model.rb +28 -3
  53. data/lib/openstudio-standards/standards/Standards.SpaceType.rb +3 -1
  54. data/lib/openstudio-standards/standards/Standards.WaterHeaterMixed.rb +41 -15
  55. data/lib/openstudio-standards/version.rb +1 -1
  56. data/lib/openstudio-standards/weather/Weather.Model.rb +509 -5
  57. data/lib/openstudio-standards/weather/Weather.stat_file.rb +145 -5
  58. metadata +8 -3
  59. data/lib/openstudio-standards/btap/environment.rb +0 -718
@@ -28,7 +28,9 @@ class OpenStudio::Model::AirTerminalSingleDuctVAVReheat
28
28
  min_damper_position = 0.3
29
29
  end
30
30
  end
31
-
31
+
32
+
33
+
32
34
  # TODO remove the template conditional; doesn't make sense
33
35
  # Determine whether or not to use the high minimum guess.
34
36
  # Cutoff was determined by correlating apparent minimum guesses
@@ -110,7 +110,7 @@ class OpenStudio::Model::BoilerHotWater
110
110
 
111
111
  # Applies the standard efficiency ratings and typical performance curves to this object.
112
112
  #
113
- # @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'
113
+ # @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', 'NECB2011'
114
114
  # @param standards [Hash] the OpenStudio_Standards spreadsheet in hash format
115
115
  # @return [Bool] true if successful, false if not
116
116
  def setStandardEfficiencyAndCurves(template)
@@ -157,10 +157,38 @@ class OpenStudio::Model::BoilerHotWater
157
157
  successfully_set_all_properties = false
158
158
  return successfully_set_all_properties
159
159
  end
160
-
160
+
161
+ # for NECB, check if secondary and/or modulating boiler required
162
+ if (template == 'NECB 2011')
163
+ if (capacity_w/1000.0 >= 352.0)
164
+ if (self.name.to_s.include?("Primary Boiler"))
165
+ boiler_capacity = capacity_w
166
+ self.setBoilerFlowMode('LeavingSetpointModulated')
167
+ self.setMinimumPartLoadRatio(0.25)
168
+ elsif (self.name.to_s.include?("Secondary Boiler"))
169
+ boiler_capacity = 0.001
170
+ end
171
+ elsif ((capacity_w/1000.0) >= 176.0) && ((capacity_w/1000.0) < 352.0)
172
+ boiler_capacity = capacity_w/2
173
+ elsif ((capacity_w/1000.0) <= 176.0)
174
+ if (self.name.to_s.include?("Primary Boiler"))
175
+ boiler_capacity = capacity_w
176
+ elsif (self.name.to_s.include?("Secondary Boiler"))
177
+ boiler_capacity = 0.001
178
+ end
179
+ end
180
+ self.setNominalCapacity(boiler_capacity)
181
+ end # NECB 2011
182
+
161
183
  # Convert capacity to Btu/hr
162
- capacity_btu_per_hr = OpenStudio.convert(capacity_w, "W", "Btu/hr").get
163
- capacity_kbtu_per_hr = OpenStudio.convert(capacity_w, "W", "kBtu/hr").get
184
+ if template == 'NECB 2011'
185
+ capacity_btu_per_hr = OpenStudio.convert(boiler_capacity, "W", "Btu/hr").get
186
+ capacity_kbtu_per_hr = OpenStudio.convert(boiler_capacity, "W", "kBtu/hr").get
187
+ else
188
+ capacity_btu_per_hr = OpenStudio.convert(capacity_w, "W", "Btu/hr").get
189
+ capacity_kbtu_per_hr = OpenStudio.convert(capacity_w, "W", "kBtu/hr").get
190
+ end
191
+
164
192
 
165
193
  # Get the boiler properties
166
194
  blr_props = self.model.find_object(boilers, search_criteria, capacity_btu_per_hr)
@@ -169,7 +197,7 @@ class OpenStudio::Model::BoilerHotWater
169
197
  successfully_set_all_properties = false
170
198
  return successfully_set_all_properties
171
199
  end
172
-
200
+
173
201
  # Make the EFFFPLR curve
174
202
  eff_fplr = self.model.add_curve(blr_props['efffplr'])
175
203
  if eff_fplr
@@ -181,7 +209,7 @@ class OpenStudio::Model::BoilerHotWater
181
209
 
182
210
  # Get the minimum efficiency standards
183
211
  thermal_eff = nil
184
-
212
+
185
213
  # If specified as AFUE
186
214
  unless blr_props['minimum_annual_fuel_utilization_efficiency'].nil?
187
215
  min_afue = blr_props['minimum_annual_fuel_utilization_efficiency']
@@ -210,17 +238,7 @@ class OpenStudio::Model::BoilerHotWater
210
238
  self.setNominalThermalEfficiency(thermal_eff)
211
239
  end
212
240
 
213
- #puts "capacity_w = #{capacity_w}"
214
-
215
- # for NECB, check if modulating boiler required
216
- # TO DO: logic for 2 stage boilers when heating cap > 176 kW and < 352 kW
217
- if template == 'NECB 2011'
218
- if capacity_w >= 352000
219
- self.setBoilerFlowMode('LeavingSetpointModulated')
220
- self.setMinimumPartLoadRatio(0.25)
221
- end
222
- end # NECB 2011
223
- return successfully_set_all_properties
241
+ return successfully_set_all_properties
224
242
  end
225
243
 
226
244
  end
@@ -66,9 +66,9 @@ class OpenStudio::Model::ChillerElectricEIR
66
66
  return successfully_set_all_properties
67
67
  end
68
68
 
69
- # Convert capacity to tons
70
69
  capacity_tons = OpenStudio.convert(capacity_w, "W", "ton").get
71
70
 
71
+
72
72
  return capacity_tons
73
73
 
74
74
  end
@@ -100,24 +100,25 @@ class OpenStudio::Model::ChillerElectricEIR
100
100
  end
101
101
 
102
102
  # Applies the standard efficiency ratings and typical performance curves to this object.
103
- #
103
+ #
104
104
  # @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'
105
105
  # @param standards [Hash] the OpenStudio_Standards spreadsheet in hash format
106
106
  # @return [Bool] true if successful, false if not
107
- def setStandardEfficiencyAndCurves(template)
108
-
107
+ def setStandardEfficiencyAndCurves(template, clg_tower_objs)
108
+
109
109
  chillers = $os_standards['chillers']
110
110
  curve_biquadratics = $os_standards['curve_biquadratics']
111
111
  curve_quadratics = $os_standards['curve_quadratics']
112
112
  curve_bicubics = $os_standards['curve_bicubics']
113
-
113
+
114
+
114
115
  # Define the criteria to find the chiller properties
115
116
  # in the hvac standards data set.
116
117
  search_criteria = {}
117
118
  search_criteria['template'] = template
118
119
  cooling_type = self.condenserType
119
120
  search_criteria['cooling_type'] = cooling_type
120
-
121
+
121
122
  # TODO Standards replace this with a mechanism to store this
122
123
  # data in the chiller object itself.
123
124
  # For now, retrieve the condenser type from the name
@@ -147,7 +148,7 @@ class OpenStudio::Model::ChillerElectricEIR
147
148
  unless compressor_type.nil?
148
149
  search_criteria['compressor_type'] = compressor_type
149
150
  end
150
-
151
+
151
152
  # Get the chiller capacity
152
153
  capacity_w = nil
153
154
  if self.referenceCapacity.is_initialized
@@ -160,8 +161,29 @@ class OpenStudio::Model::ChillerElectricEIR
160
161
  return successfully_set_all_properties
161
162
  end
162
163
 
164
+ #NECB 2011 requires that all chillers be modulating down to 25% of their capacity
165
+ if template == 'NECB 2011'
166
+ self.setChillerFlowMode('LeavingSetpointModulated')
167
+ self.setMinimumPartLoadRatio(0.25)
168
+ self.setMinimumUnloadingRatio(0.25)
169
+ if((capacity_w/1000.0) < 2100.0)
170
+ if(self.name.to_s.include? 'Primary Chiller')
171
+ chiller_capacity = capacity_w
172
+ elsif(self.name.to_s.include? 'Secondary Chiller')
173
+ chiller_capacity = 0.001
174
+ end
175
+ else
176
+ chiller_capacity = capacity_w/2.0
177
+ end
178
+ self.setReferenceCapacity(chiller_capacity)
179
+ end # NECB 2011
180
+
163
181
  # Convert capacity to tons
164
- capacity_tons = OpenStudio.convert(capacity_w, "W", "ton").get
182
+ if template == 'NECB 2011'
183
+ capacity_tons = OpenStudio.convert(chiller_capacity, "W", "ton").get
184
+ else
185
+ capacity_tons = OpenStudio.convert(capacity_w, "W", "ton").get
186
+ end
165
187
 
166
188
  # Get the chiller properties
167
189
  chlr_props = self.model.find_object(chillers, search_criteria, capacity_tons)
@@ -178,17 +200,17 @@ class OpenStudio::Model::ChillerElectricEIR
178
200
  else
179
201
  OpenStudio::logFree(OpenStudio::Warn, "openstudio.standards.ChillerElectricEIR", "For #{self.name}, cannot find cool_cap_ft curve, will not be set.")
180
202
  successfully_set_all_properties = false
181
- end
182
-
203
+ end
204
+
183
205
  # Make the EIRFT curve
184
206
  cool_eir_ft = self.model.add_curve(chlr_props['eirft'])
185
207
  if cool_eir_ft
186
- self.setElectricInputToCoolingOutputRatioFunctionOfTemperature(cool_eir_ft)
208
+ self.setElectricInputToCoolingOutputRatioFunctionOfTemperature(cool_eir_ft)
187
209
  else
188
210
  OpenStudio::logFree(OpenStudio::Warn, "openstudio.standards.ChillerElectricEIR", "For #{self.name}, cannot find cool_eir_ft curve, will not be set.")
189
211
  successfully_set_all_properties = false
190
- end
191
-
212
+ end
213
+
192
214
  # Make the EIRFPLR curve
193
215
  # which may be either a CurveBicubic or a CurveQuadratic based on chiller type
194
216
  cool_plf_fplr = self.model.add_curve(chlr_props['eirfplr'])
@@ -197,7 +219,7 @@ class OpenStudio::Model::ChillerElectricEIR
197
219
  else
198
220
  OpenStudio::logFree(OpenStudio::Warn, "openstudio.standards.ChillerElectricEIR", "For #{self.name}, cannot find cool_plf_fplr curve, will not be set.")
199
221
  successfully_set_all_properties = false
200
- end
222
+ end
201
223
 
202
224
  # Set the efficiency value
203
225
  kw_per_ton = nil
@@ -211,20 +233,26 @@ class OpenStudio::Model::ChillerElectricEIR
211
233
  successfully_set_all_properties = false
212
234
  end
213
235
 
236
+ # Set cooling tower properties for NECB 2011 now that the new COP of the chiller is set
237
+ if template == 'NECB 2011'
238
+ if(self.name.to_s.include? 'Primary Chiller')
239
+ # Single speed tower model assumes 25% extra for compressor power
240
+ tower_cap = capacity_w*(1.0+1.0/self.referenceCOP)
241
+ if((tower_cap/1000.0) < 1750)
242
+ clg_tower_objs[0].setNumberofCells(1)
243
+ else
244
+ clg_tower_objs[0].setNumberofCells((tower_cap/(1000*1750)+0.5).round)
245
+ end
246
+ clg_tower_objs[0].setFanPoweratDesignAirFlowRate(0.015*tower_cap)
247
+ end
248
+ end
249
+
214
250
  # Append the name with size and kw/ton
215
251
  self.setName("#{name} #{capacity_tons.round}tons #{kw_per_ton.round(1)}kW/ton")
216
252
  OpenStudio::logFree(OpenStudio::Info, 'openstudio.model.ChillerElectricEIR', "For #{template}: #{self.name}: #{cooling_type} #{condenser_type} #{compressor_type} Capacity = #{capacity_tons.round}tons; COP = #{cop.round(1)} (#{kw_per_ton.round(1)}kW/ton)")
217
253
 
218
- #NECB 2011 requires that all chillers be modulating down to 25% of their capacity
219
-
220
- if template == 'NECB 2011'
221
- self.setChillerFlowMode('LeavingSetpointModulated')
222
- self.setMinimumPartLoadRatio(0.25)
223
- self.setMinimumUnloadingRatio(0.25)
224
- end # NECB 2011
225
-
226
254
  return successfully_set_all_properties
227
255
 
228
256
  end
229
-
257
+
230
258
  end
@@ -0,0 +1,255 @@
1
+
2
+ # Reopen the OpenStudio class to add methods to apply standards to this object
3
+ class OpenStudio::Model::CoilCoolingDXMultiSpeed
4
+
5
+ # Applies the standard efficiency ratings and typical performance curves to this object.
6
+ #
7
+ # @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
+ # @param standards [Hash] the OpenStudio_Standards spreadsheet in hash format
9
+ # @return [Bool] true if successful, false if not
10
+ def setStandardEfficiencyAndCurves(template, standards, sql_db_vars_map)
11
+
12
+ successfully_set_all_properties = true
13
+
14
+ unitary_acs = standards['unitary_acs']
15
+ heat_pumps = standards['heat_pumps']
16
+
17
+ # Define the criteria to find the chiller properties
18
+ # in the hvac standards data set.
19
+ search_criteria = {}
20
+ search_criteria['template'] = template
21
+ cooling_type = self.condenserType
22
+ search_criteria['cooling_type'] = cooling_type
23
+
24
+ # TODO Standards - add split system vs single package to model
25
+ # For now, assume single package as default
26
+ subcategory = 'Single Package'
27
+
28
+ # Determine the heating type if unitary or zone hvac
29
+ heat_pump = false
30
+ heating_type = nil
31
+ containing_comp = nil
32
+ if self.airLoopHVAC.empty?
33
+ if self.containingHVACComponent.is_initialized
34
+ containing_comp = containingHVACComponent.get
35
+ if containing_comp.to_AirLoopHVACUnitaryHeatPumpAirToAirMultiSpeed.is_initialized
36
+ htg_coil = containing_comp.to_AirLoopHVACUnitaryHeatPumpAirToAirMultiSpeed.get.heatingCoil
37
+ if(htg_coil.to_CoilHeatingDXMultiSpeed.is_initialized)
38
+ heat_pump = true
39
+ heating_type = 'Electric Resistance or None'
40
+ elsif(htg_coil.to_CoilHeatingGasMultiStage.is_initialized)
41
+ heating_type = 'All Other'
42
+ end
43
+ end # TODO Add other unitary systems
44
+ elsif self.containingZoneHVACComponent.is_initialized
45
+ containing_comp = containingZoneHVACComponent.get
46
+ if containing_comp.to_ZoneHVACPackagedTerminalAirConditioner.is_initialized
47
+ subcategory = 'PTAC'
48
+ htg_coil = containing_comp.to_ZoneHVACPackagedTerminalAirConditioner.get.heatingCoil
49
+ if htg_coil.to_CoilHeatingElectric.is_initialized
50
+ heating_type = 'Electric Resistance or None'
51
+ elsif htg_coil.to_CoilHeatingWater.is_initialized || htg_coil.to_CoilHeatingGas.is_initialized || htg_col.to_CoilHeatingGasMultiStage
52
+ heating_type = 'All Other'
53
+ end
54
+ end # TODO Add other zone hvac systems
55
+ end
56
+ end
57
+
58
+ # Add the heating type to the search criteria
59
+ unless heating_type.nil?
60
+ search_criteria['heating_type'] = heating_type
61
+ end
62
+
63
+ search_criteria['subcategory'] = subcategory
64
+
65
+ # Get the coil capacity
66
+ capacity_w = nil
67
+ clg_stages = self.stages
68
+ if clg_stages.last.grossRatedTotalCoolingCapacity.is_initialized
69
+ capacity_w = clg_stages.last.grossRatedTotalCoolingCapacity.get
70
+ elsif self.autosizedSpeed4GrossRatedTotalCoolingCapacity.is_initialized
71
+ capacity_w = self.autosizedSpeed4GrossRatedTotalCoolingCapacity.get
72
+ else
73
+ OpenStudio::logFree(OpenStudio::Warn, 'openstudio.standards.CoilCoolingDXMultiSpeed', "For #{self.name} capacity is not available, cannot apply efficiency standard.")
74
+ successfully_set_all_properties = false
75
+ return successfully_set_all_properties
76
+ end
77
+
78
+ # Volume flow rate
79
+ flow_rate4 = nil
80
+ if clg_stages.last.ratedAirFlowRate.is_initialized
81
+ flow_rate4 = clg_stages.last.ratedAirFlowRate.get
82
+ elsif self.autosizedSpeed4RatedAirFlowRate.is_initialized
83
+ flow_rate4 = self.autosizedSpeed4RatedAirFlowRate.get
84
+ end
85
+
86
+ # Set number of stages for NECB 2011
87
+ if(template == 'NECB 2011')
88
+ stage_cap = []
89
+ num_stages = (capacity_w/(66.0*1000.0)+0.5).round
90
+ num_stages = [num_stages,4].min
91
+ if(num_stages == 1)
92
+ stage_cap[0] = capacity_w/2.0
93
+ stage_cap[1] = 2.0*stage_cap[0]
94
+ stage_cap[2] = stage_cap[1]+0.1
95
+ stage_cap[3] = stage_cap[2]+0.1
96
+ else
97
+ stage_cap[0] = 66.0*1000.0
98
+ stage_cap[1] = 2.0*stage_cap[0]
99
+ if(num_stages == 2)
100
+ stage_cap[2] = stage_cap[1]+0.1
101
+ stage_cap[3] = stage_cap[2]+0.1
102
+ elsif(num_stages == 3)
103
+ stage_cap[2] = 3.0*stage_cap[0]
104
+ stage_cap[3] = stage_cap[2]+0.1
105
+ elsif(num_stages == 4)
106
+ stage_cap[2] = 3.0*stage_cap[0]
107
+ stage_cap[3] = 4.0*stage_cap[0]
108
+ end
109
+ end
110
+ # set capacities, flow rates, and sensible heat ratio for stages
111
+ for istage in 0..3
112
+ clg_stages[istage].setGrossRatedTotalCoolingCapacity(stage_cap[istage])
113
+ clg_stages[istage].setRatedAirFlowRate(flow_rate4*stage_cap[istage]/capacity_w)
114
+ end
115
+ end
116
+
117
+ # Convert capacity to Btu/hr
118
+ capacity_btu_per_hr = OpenStudio.convert(capacity_w, "W", "Btu/hr").get
119
+ capacity_kbtu_per_hr = OpenStudio.convert(capacity_w, "W", "kBtu/hr").get
120
+
121
+ # Lookup efficiencies depending on whether it is a unitary AC or a heat pump
122
+ ac_props = nil
123
+ if heat_pump == true
124
+ ac_props = self.model.find_object(heat_pumps, search_criteria, capacity_btu_per_hr)
125
+ else
126
+ ac_props = self.model.find_object(unitary_acs, search_criteria, capacity_btu_per_hr)
127
+ end
128
+
129
+ # Check to make sure properties were found
130
+ if ac_props.nil?
131
+ OpenStudio::logFree(OpenStudio::Warn, 'openstudio.standards.CoilCoolingDXMultiSpeed', "For #{self.name}, cannot find efficiency info, cannot apply efficiency standard.")
132
+ successfully_set_all_properties = false
133
+ return successfully_set_all_properties
134
+ end
135
+
136
+ # Make the COOL-CAP-FT curve
137
+ cool_cap_ft = self.model.add_curve(ac_props["cool_cap_ft"], standards)
138
+ if cool_cap_ft
139
+ clg_stages.each do |istage|
140
+ istage.setTotalCoolingCapacityFunctionofTemperatureCurve(cool_cap_ft)
141
+ end
142
+ else
143
+ OpenStudio::logFree(OpenStudio::Warn, 'openstudio.standards.CoilCoolingDXMultiSpeed', "For #{self.name}, cannot find cool_cap_ft curve, will not be set.")
144
+ successfully_set_all_properties = false
145
+ end
146
+
147
+ # Make the COOL-CAP-FFLOW curve
148
+ cool_cap_fflow = self.model.add_curve(ac_props["cool_cap_fflow"], standards)
149
+ if cool_cap_fflow
150
+ clg_stages.each do |istage|
151
+ istage.setTotalCoolingCapacityFunctionofFlowFractionCurve(cool_cap_fflow)
152
+ end
153
+ else
154
+ OpenStudio::logFree(OpenStudio::Warn, 'openstudio.standards.CoilCoolingDXMultiSpeed', "For #{self.name}, cannot find cool_cap_fflow curve, will not be set.")
155
+ successfully_set_all_properties = false
156
+ end
157
+
158
+ # Make the COOL-EIR-FT curve
159
+ cool_eir_ft = self.model.add_curve(ac_props["cool_eir_ft"], standards)
160
+ if cool_eir_ft
161
+ clg_stages.each do |istage|
162
+ istage.setEnergyInputRatioFunctionofTemperatureCurve(cool_eir_ft)
163
+ end
164
+ else
165
+ OpenStudio::logFree(OpenStudio::Warn, 'openstudio.standards.CoilCoolingDXMultiSpeed', "For #{self.name}, cannot find cool_eir_ft curve, will not be set.")
166
+ successfully_set_all_properties = false
167
+ end
168
+
169
+ # Make the COOL-EIR-FFLOW curve
170
+ cool_eir_fflow = self.model.add_curve(ac_props["cool_eir_fflow"], standards)
171
+ if cool_eir_fflow
172
+ clg_stages.each do |istage|
173
+ istage.setEnergyInputRatioFunctionofFlowFractionCurve(cool_eir_fflow)
174
+ end
175
+ else
176
+ OpenStudio::logFree(OpenStudio::Warn, 'openstudio.standards.CoilCoolingDXMultiSpeed', "For #{self.name}, cannot find cool_eir_fflow curve, will not be set.")
177
+ successfully_set_all_properties = false
178
+ end
179
+
180
+ # Make the COOL-PLF-FPLR curve
181
+ cool_plf_fplr = self.model.add_curve(ac_props["cool_plf_fplr"], standards)
182
+ if cool_plf_fplr
183
+ clg_stages.each do |istage|
184
+ istage.setPartLoadFractionCorrelationCurve(cool_plf_fplr)
185
+ end
186
+ else
187
+ OpenStudio::logFree(OpenStudio::Warn, 'openstudio.standards.CoilCoolingDXMultiSpeed', "For #{self.name}, cannot find cool_plf_fplr curve, will not be set.")
188
+ successfully_set_all_properties = false
189
+ end
190
+
191
+ # Get the minimum efficiency standards
192
+ cop = nil
193
+
194
+ if subcategory == 'PTAC'
195
+ ptac_eer_coeff_1 = ac_props['ptac_eer_coefficient_1']
196
+ ptac_eer_coeff_2 = ac_props['ptac_eer_coefficient_2']
197
+ capacity_btu_per_hr = 7000 if capacity_btu_per_hr < 7000
198
+ capacity_btu_per_hr = 15000 if capacity_btu_per_hr > 15000
199
+ ptac_eer = ptac_eer_coeff_1 + (ptac_eer_coeff_2 * capacity_btu_per_hr)
200
+ cop = eer_to_cop(ptac_eer)
201
+ #self.setName("#{self.name} #{capacity_kbtu_per_hr.round}kBtu/hr #{ptac_eer}EER")
202
+ new_comp_name = "#{self.name} #{capacity_kbtu_per_hr.round}kBtu/hr #{ptac_eer}EER"
203
+ OpenStudio::logFree(OpenStudio::Info, 'openstudio.standards.CoilCoolingDXMultiSpeed', "For #{template}: #{self.name}: #{cooling_type} #{heating_type} #{subcategory} Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; EER = #{ptac_eer}")
204
+ end
205
+
206
+ # If specified as SEER
207
+ unless ac_props['minimum_seasonal_energy_efficiency_ratio'].nil?
208
+ min_seer = ac_props['minimum_seasonal_energy_efficiency_ratio']
209
+ cop = seer_to_cop(min_seer)
210
+ new_comp_name = "#{self.name} #{capacity_kbtu_per_hr.round}kBtu/hr #{min_seer}SEER"
211
+ # self.setName("#{self.name} #{capacity_kbtu_per_hr.round}kBtu/hr #{min_seer}SEER")
212
+ OpenStudio::logFree(OpenStudio::Info, 'openstudio.standards.CoilCoolingDXMultiSpeed', "For #{template}: #{self.name}: #{cooling_type} #{heating_type} #{subcategory} Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; SEER = #{min_seer}")
213
+ end
214
+
215
+ # If specified as EER
216
+ unless ac_props['minimum_energy_efficiency_ratio'].nil?
217
+ min_eer = ac_props['minimum_energy_efficiency_ratio']
218
+ cop = eer_to_cop(min_eer)
219
+ new_comp_name = "#{self.name} #{capacity_kbtu_per_hr.round}kBtu/hr #{min_eer}EER"
220
+ OpenStudio::logFree(OpenStudio::Info, 'openstudio.standards.CoilCoolingDXMultiSpeed', "For #{template}: #{self.name}: #{cooling_type} #{heating_type} #{subcategory} Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; EER = #{min_eer}")
221
+ end
222
+
223
+ # if specified as SEER (heat pump)
224
+ unless ac_props['minimum_seasonal_efficiency'].nil?
225
+ min_seer = ac_props['minimum_seasonal_efficiency']
226
+ cop = seer_to_cop(min_seer)
227
+ new_comp_name = "#{self.name} #{capacity_kbtu_per_hr.round}kBtu/hr #{min_seer}SEER"
228
+ # self.setName("#{self.name} #{capacity_kbtu_per_hr.round}kBtu/hr #{min_seer}SEER")
229
+ OpenStudio::logFree(OpenStudio::Info, 'openstudio.standards.CoilCoolingDXMultiSpeed', "For #{template}: #{self.name}: #{cooling_type} #{heating_type} #{subcategory} Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; SEER = #{min_seer}")
230
+ end
231
+
232
+ # If specified as EER (heat pump)
233
+ unless ac_props['minimum_full_load_efficiency'].nil?
234
+ min_eer = ac_props['minimum_full_load_efficiency']
235
+ cop = eer_to_cop(min_eer)
236
+ new_comp_name = "#{self.name} #{capacity_kbtu_per_hr.round}kBtu/hr #{min_eer}EER"
237
+ OpenStudio::logFree(OpenStudio::Info, 'openstudio.standards.CoilCoolingDXMultiSpeed', "For #{template}: #{self.name}: #{cooling_type} #{heating_type} #{subcategory} Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; EER = #{min_eer}")
238
+ end
239
+
240
+ sql_db_vars_map[new_comp_name] = self.name.to_s
241
+ self.setName(new_comp_name)
242
+
243
+ # Set the efficiency values
244
+
245
+ unless cop.nil?
246
+ clg_stages.each do |istage|
247
+ istage.setGrossRatedCoolingCOP(cop)
248
+ end
249
+ end
250
+
251
+ return sql_db_vars_map
252
+
253
+ end
254
+
255
+ end