openstudio-standards 0.8.1 → 0.8.3
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.
- checksums.yaml +4 -4
- data/lib/openstudio-standards/exterior_lighting/data/entryways.csv +1 -1
- data/lib/openstudio-standards/exterior_lighting/data/parking.csv +1 -1
- data/lib/openstudio-standards/exterior_lighting/information.rb +7 -7
- data/lib/openstudio-standards/hvac/exhaust/data/typical_exhaust.csv +1 -1
- data/lib/openstudio-standards/infiltration/data/NISTInfiltrationCorrelations.csv +1 -1
- data/lib/openstudio-standards/infiltration/nist_infiltration.rb +1 -1
- data/lib/openstudio-standards/refrigeration/create_case.rb +60 -23
- data/lib/openstudio-standards/refrigeration/create_compressor.rb +2 -2
- data/lib/openstudio-standards/refrigeration/create_typical_refrigeration.rb +8 -6
- data/lib/openstudio-standards/refrigeration/create_walkin.rb +59 -24
- data/lib/openstudio-standards/refrigeration/data/refrigerated_cases.csv +31 -31
- data/lib/openstudio-standards/refrigeration/data/refrigerated_walkins.csv +76 -76
- data/lib/openstudio-standards/refrigeration/data/refrigeration_compressors.csv +1 -1
- data/lib/openstudio-standards/refrigeration/data/typical_refrigerated_cases.csv +1 -1
- data/lib/openstudio-standards/refrigeration/data/typical_refrigerated_walkins.csv +1 -1
- data/lib/openstudio-standards/refrigeration/information.rb +4 -4
- data/lib/openstudio-standards/service_water_heating/create_typical.rb +10 -10
- data/lib/openstudio-standards/service_water_heating/create_water_heater.rb +10 -0
- data/lib/openstudio-standards/service_water_heating/create_water_heating_loop.rb +16 -3
- data/lib/openstudio-standards/service_water_heating/data/convert_data.rb +9 -9
- data/lib/openstudio-standards/service_water_heating/data/typical_water_use_equipment.csv +49 -49
- data/lib/openstudio-standards/service_water_heating/data/typical_water_use_equipment.json +159 -159
- data/lib/openstudio-standards/standards/Standards.CoilCoolingDXMultiSpeed.rb +7 -18
- data/lib/openstudio-standards/standards/Standards.CoilCoolingDXSingleSpeed.rb +10 -20
- data/lib/openstudio-standards/standards/Standards.CoilCoolingDXTwoSpeed.rb +6 -15
- data/lib/openstudio-standards/standards/Standards.CoilCoolingWaterToAirHeatPumpEquationFit.rb +5 -6
- data/lib/openstudio-standards/standards/Standards.CoilDX.rb +93 -43
- data/lib/openstudio-standards/standards/Standards.CoilHeatingDXMultiSpeed.rb +5 -5
- data/lib/openstudio-standards/standards/Standards.CoilHeatingDXSingleSpeed.rb +135 -37
- data/lib/openstudio-standards/standards/Standards.CoilHeatingWaterToAirHeatPumpEquationFit.rb +2 -2
- data/lib/openstudio-standards/standards/Standards.Model.rb +9 -4
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.computer_room_acs.json +302 -140
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.heat_pumps.json +648 -326
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.heat_pumps_heating.json +371 -90
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.water_heaters.json +66 -22
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.computer_room_acs.json +302 -140
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.heat_pumps.json +1012 -296
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.heat_pumps_heating.json +443 -79
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.water_heaters.json +66 -22
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.computer_room_acs.json +302 -140
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.heat_pumps.json +672 -306
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.heat_pumps_heating.json +354 -74
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.water_heaters.json +72 -24
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.computer_room_acs.json +302 -140
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.energy_recovery.json +8 -8
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.heat_pumps.json +930 -604
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.heat_pumps_heating.json +415 -111
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.water_heaters.json +72 -24
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/data/ashrae_90_1_2016.computer_room_acs.json +602 -140
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/data/ashrae_90_1_2016.heat_pumps.json +1005 -333
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/data/ashrae_90_1_2016.heat_pumps_heating.json +642 -88
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/data/ashrae_90_1_2016.water_heaters.json +78 -26
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/data/ashrae_90_1_2019.computer_room_acs.json +722 -140
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/data/ashrae_90_1_2019.heat_pumps.json +1741 -426
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/data/ashrae_90_1_2019.heat_pumps_heating.json +1108 -111
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/data/ashrae_90_1_2019.water_heaters.json +186 -62
- data/lib/openstudio-standards/standards/ashrae_90_1/data/ashrae_90_1.schedules.json +62 -232
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.CoilCoolingDXSingleSpeed.rb +2 -3
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.CoilCoolingDXTwoSpeed.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.CoilDX.rb +7 -18
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.CoilHeatingDXSingleSpeed.rb +9 -7
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.CoilHeatingGas.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm_2019/data/ashrae_90_1_prm_2019.heat_pumps.json +154 -69
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm_2019/data/ashrae_90_1_prm_2019.heat_pumps_heating.json +72 -72
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm_2019/data/ashrae_90_1_prm_2019.water_heaters.json +382 -295
- data/lib/openstudio-standards/standards/deer/data/deer.schedules.json +62 -232
- data/lib/openstudio-standards/standards/necb/BTAPPRE1980/data/heat_pumps.json +16 -0
- data/lib/openstudio-standards/standards/necb/BTAPPRE1980/data/heat_pumps_heating.json +6 -0
- data/lib/openstudio-standards/standards/necb/NECB2011/data/heat_pumps.json +16 -0
- data/lib/openstudio-standards/standards/necb/NECB2011/data/heat_pumps_heating.json +6 -0
- data/lib/openstudio-standards/standards/necb/NECB2011/hvac_systems.rb +1 -1
- data/lib/openstudio-standards/standards/necb/NECB2011/necb_2011.rb +2 -2
- data/lib/openstudio-standards/standards/necb/NECB2015/data/heat_pumps.json +16 -0
- data/lib/openstudio-standards/standards/necb/NECB2015/data/heat_pumps_heating.json +8 -0
- data/lib/openstudio-standards/standards/necb/NECB2020/data/heat_pumps.json +20 -0
- data/lib/openstudio-standards/standards/necb/NECB2020/data/heat_pumps_heating.json +10 -0
- data/lib/openstudio-standards/utilities/simulation.rb +3 -2
- data/lib/openstudio-standards/version.rb +1 -1
- metadata +2 -2
@@ -105,31 +105,64 @@ class Standard
|
|
105
105
|
# @param rename [Boolean] if true, object will be renamed to include capacity and efficiency level
|
106
106
|
# @param necb_ref_hp [Boolean] for compatability with NECB ruleset only.
|
107
107
|
# @return [Double] full load efficiency (COP)
|
108
|
-
def coil_heating_dx_single_speed_standard_minimum_cop(coil_heating_dx_single_speed, rename = false, necb_ref_hp = false)
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
suppl_heating_type = search_criteria['heating_type']
|
108
|
+
def coil_heating_dx_single_speed_standard_minimum_cop(coil_heating_dx_single_speed, rename = false, necb_ref_hp = false, equipment_type = false)
|
109
|
+
coil_efficiency_data = standards_data['heat_pumps_heating']
|
110
|
+
|
111
|
+
# Get the capacity
|
113
112
|
capacity_w = coil_heating_dx_single_speed_find_capacity(coil_heating_dx_single_speed, necb_ref_hp)
|
114
113
|
capacity_btu_per_hr = OpenStudio.convert(capacity_w, 'W', 'Btu/hr').get
|
115
114
|
capacity_kbtu_per_hr = OpenStudio.convert(capacity_w, 'W', 'kBtu/hr').get
|
116
115
|
|
117
|
-
# Get the
|
118
|
-
|
116
|
+
# Get the search criteria
|
117
|
+
search_criteria = coil_dx_find_search_criteria(coil_heating_dx_single_speed, necb_ref_hp, equipment_type)
|
118
|
+
equipment_type = coil_efficiency_data[0].keys.include?('equipment_type') ? true : false
|
119
|
+
|
120
|
+
# Additional search criteria for new data format (from BESD)
|
121
|
+
# NECB/BTAP use the old format
|
122
|
+
# DEER CBES use the old format
|
123
|
+
# 'equipment_type' is only included in data coming from the BESD
|
124
|
+
if coil_efficiency_data[0].keys.include?('equipment_type') || ((template == 'NECB2011') || (template == 'NECB2015') || (template == 'NECB2017') || (template == 'NECB2020') || (template == 'BTAPPRE1980') ||
|
125
|
+
(template == 'BTAP1980TO2010'))
|
126
|
+
if search_criteria.keys.include?('equipment_type')
|
127
|
+
equipment_type = search_criteria['equipment_type']
|
128
|
+
if equipment_type == 'PTHP'
|
129
|
+
search_criteria['application'] = coil_dx_packaged_terminal_application(coil_heating_dx_single_speed)
|
130
|
+
end
|
131
|
+
elsif !coil_dx_heat_pump?(coil_heating_dx_single_speed) # `coil_dx_heat_pump?` returns false when a DX heating coil is wrapped into a AirloopHVAC:UnitarySystem
|
132
|
+
search_criteria['equipment_type'] = 'Heat Pumps'
|
133
|
+
end
|
134
|
+
unless (template == 'NECB2011') || (template == 'NECB2015') || (template == 'NECB2017') || (template == 'NECB2020') || (template == 'BTAPPRE1980') ||
|
135
|
+
(template == 'BTAP1980TO2010')
|
136
|
+
# Single Package/Split System is only used for units less than 65 kBtu/h
|
137
|
+
if capacity_btu_per_hr >= 65000 && equipment_type != 'PTHP'
|
138
|
+
search_criteria['rating_condition'] = '47F db/43F wb outdoor air'
|
139
|
+
search_criteria['subcategory'] = nil
|
140
|
+
else
|
141
|
+
electric_power_phase = coil_dx_electric_power_phase(coil_heating_dx_single_speed)
|
142
|
+
if !electric_power_phase.nil?
|
143
|
+
search_criteria['electric_power_phase'] = electric_power_phase
|
144
|
+
end
|
145
|
+
end
|
146
|
+
end
|
147
|
+
end
|
148
|
+
|
149
|
+
sub_category = search_criteria['subcategory']
|
150
|
+
suppl_heating_type = search_criteria['heating_type']
|
119
151
|
|
120
152
|
# find object
|
121
|
-
|
153
|
+
hp_props = model_find_object(coil_efficiency_data, search_criteria, capacity_btu_per_hr, Date.today)
|
122
154
|
|
123
155
|
# Check to make sure properties were found
|
124
|
-
if
|
125
|
-
OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CoilHeatingDXSingleSpeed', "For #{coil_heating_dx_single_speed.name}, cannot find efficiency info using #{search_criteria}, cannot apply efficiency standard.")
|
126
|
-
return
|
156
|
+
if hp_props.nil?
|
157
|
+
OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CoilHeatingDXSingleSpeed', "For #{coil_heating_dx_single_speed.name}, cannot find efficiency info using #{search_criteria} and capacity #{capacity_btu_per_hr} btu/hr, cannot apply efficiency standard.")
|
158
|
+
return false
|
127
159
|
end
|
128
160
|
|
161
|
+
cop = nil
|
129
162
|
# If PTHP, use equations
|
130
|
-
if
|
131
|
-
pthp_cop_coeff_1 =
|
132
|
-
pthp_cop_coeff_2 =
|
163
|
+
if equipment_type == 'PTHP' && !hp_props['pthp_cop_coefficient_1'].nil? && !hp_props['pthp_cop_coefficient_2'].nil?
|
164
|
+
pthp_cop_coeff_1 = hp_props['pthp_cop_coefficient_1']
|
165
|
+
pthp_cop_coeff_2 = hp_props['pthp_cop_coefficient_2']
|
133
166
|
# TABLE 6.8.1D
|
134
167
|
# COP = pthp_cop_coeff_1 - (pthp_cop_coeff_2 * Cap / 1000)
|
135
168
|
# Note c: Cap means the rated cooling capacity of the product in Btu/h.
|
@@ -155,24 +188,33 @@ class Standard
|
|
155
188
|
end
|
156
189
|
|
157
190
|
# If specified as HSPF
|
158
|
-
unless
|
159
|
-
min_hspf =
|
191
|
+
unless hp_props['minimum_heating_seasonal_performance_factor'].nil?
|
192
|
+
min_hspf = hp_props['minimum_heating_seasonal_performance_factor']
|
160
193
|
cop = hspf_to_cop_no_fan(min_hspf)
|
161
194
|
new_comp_name = "#{coil_heating_dx_single_speed.name} #{capacity_kbtu_per_hr.round} Clg kBtu/hr #{min_hspf.round(1)}HSPF"
|
162
195
|
OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.CoilHeatingDXSingleSpeed', "For #{template}: #{coil_heating_dx_single_speed.name}: #{suppl_heating_type} #{sub_category} Cooling Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; HSPF = #{min_hspf}")
|
163
196
|
end
|
164
197
|
|
198
|
+
# If specified as HSPF2
|
199
|
+
# TODO: assumed to be the same as HSPF for now
|
200
|
+
unless hp_props['minimum_heating_seasonal_performance_factor_2'].nil?
|
201
|
+
min_hspf = hp_props['minimum_heating_seasonal_performance_factor_2']
|
202
|
+
cop = hspf_to_cop_no_fan(min_hspf)
|
203
|
+
new_comp_name = "#{coil_heating_dx_single_speed.name} #{capacity_kbtu_per_hr.round} Clg kBtu/hr #{min_hspf.round(1)}HSPF2"
|
204
|
+
OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.CoilHeatingDXSingleSpeed', "For #{template}: #{coil_heating_dx_single_speed.name}: #{suppl_heating_type} #{sub_category} Cooling Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; HSPF = #{min_hspf}")
|
205
|
+
end
|
206
|
+
|
165
207
|
# If specified as COPH
|
166
|
-
unless
|
167
|
-
min_coph =
|
208
|
+
unless hp_props['minimum_coefficient_of_performance_heating'].nil?
|
209
|
+
min_coph = hp_props['minimum_coefficient_of_performance_heating']
|
168
210
|
cop = cop_heating_to_cop_heating_no_fan(min_coph, OpenStudio.convert(capacity_kbtu_per_hr, 'kBtu/hr', 'W').get)
|
169
211
|
new_comp_name = "#{coil_heating_dx_single_speed.name} #{capacity_kbtu_per_hr.round} Clg kBtu/hr #{min_coph.round(1)}COPH"
|
170
212
|
OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.CoilHeatingDXSingleSpeed', "For #{template}: #{coil_heating_dx_single_speed.name}: #{suppl_heating_type} #{sub_category} Cooling Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; COPH = #{min_coph}")
|
171
213
|
end
|
172
214
|
|
173
215
|
# If specified as EER
|
174
|
-
unless
|
175
|
-
min_eer =
|
216
|
+
unless hp_props['minimum_energy_efficiency_ratio'].nil?
|
217
|
+
min_eer = hp_props['minimum_energy_efficiency_ratio']
|
176
218
|
cop = eer_to_cop_no_fan(min_eer)
|
177
219
|
new_comp_name = "#{coil_heating_dx_single_speed.name} #{capacity_kbtu_per_hr.round} Clg kBtu/hr #{min_eer.round(1)}EER"
|
178
220
|
OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.CoilHeatingDXSingleSpeed', "For #{template}: #{coil_heating_dx_single_speed.name}: #{suppl_heating_type} #{sub_category} Cooling Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; EER = #{min_eer}")
|
@@ -193,76 +235,132 @@ class Standard
|
|
193
235
|
# @param necb_ref_hp [Boolean] for compatability with NECB ruleset only.
|
194
236
|
# @return [Hash] hash of coil objects
|
195
237
|
def coil_heating_dx_single_speed_apply_efficiency_and_curves(coil_heating_dx_single_speed, sql_db_vars_map, necb_ref_hp = false)
|
196
|
-
successfully_set_all_properties = true
|
197
|
-
|
198
238
|
# Get the search criteria
|
199
239
|
search_criteria = coil_dx_find_search_criteria(coil_heating_dx_single_speed, necb_ref_hp)
|
240
|
+
sub_category = search_criteria['subcategory']
|
241
|
+
suppl_heating_type = search_criteria['heating_type']
|
242
|
+
coil_efficiency_data = standards_data['heat_pumps_heating']
|
243
|
+
equipment_type = coil_efficiency_data[0].keys.include?('equipment_type') ? true : false
|
200
244
|
|
201
245
|
# Get the capacity
|
202
246
|
capacity_w = coil_heating_dx_single_speed_find_capacity(coil_heating_dx_single_speed, necb_ref_hp)
|
203
247
|
capacity_btu_per_hr = OpenStudio.convert(capacity_w, 'W', 'Btu/hr').get
|
204
248
|
capacity_kbtu_per_hr = OpenStudio.convert(capacity_w, 'W', 'kBtu/hr').get
|
205
249
|
|
250
|
+
# Additional search criteria
|
251
|
+
if coil_efficiency_data[0].keys.include?('equipment_type') || ((template == 'NECB2011') || (template == 'NECB2015') || (template == 'NECB2017') || (template == 'NECB2020') || (template == 'BTAPPRE1980') ||
|
252
|
+
(template == 'BTAP1980TO2010'))
|
253
|
+
if search_criteria.keys.include?('equipment_type')
|
254
|
+
equipment_type = search_criteria['equipment_type']
|
255
|
+
if ['PTHP'].include?(equipment_type) && template.include?('90.1')
|
256
|
+
search_criteria['application'] = coil_dx_packaged_terminal_application(coil_heating_dx_single_speed)
|
257
|
+
end
|
258
|
+
elsif !coil_dx_heat_pump?(coil_heating_dx_single_speed) # `coil_dx_heat_pump?` returns false when a DX heating coil is wrapped into a AirloopHVAC:UnitarySystem
|
259
|
+
search_criteria['equipment_type'] = 'Heat Pumps'
|
260
|
+
end
|
261
|
+
unless (template == 'NECB2011') || (template == 'NECB2015') || (template == 'NECB2017') || (template == 'NECB2020') || (template == 'BTAPPRE1980') ||
|
262
|
+
(template == 'BTAP1980TO2010')
|
263
|
+
# Single Package/Split System is only used for units less than 65 kBtu/h
|
264
|
+
if capacity_btu_per_hr >= 65000
|
265
|
+
search_criteria['rating_condition'] = '47F db/43F wb outdoor air'
|
266
|
+
search_criteria['subcategory'] = nil
|
267
|
+
else
|
268
|
+
electric_power_phase = coil_dx_electric_power_phase(coil_heating_dx_single_speed)
|
269
|
+
if !electric_power_phase.nil?
|
270
|
+
search_criteria['electric_power_phase'] = electric_power_phase
|
271
|
+
end
|
272
|
+
end
|
273
|
+
end
|
274
|
+
end
|
275
|
+
if coil_efficiency_data[0].keys.include?('region')
|
276
|
+
search_criteria['region'] = nil # non-nil values are currently used for residential products
|
277
|
+
end
|
278
|
+
|
206
279
|
# Lookup efficiencies
|
207
|
-
|
280
|
+
hp_props = model_find_object(standards_data['heat_pumps_heating'], search_criteria, capacity_btu_per_hr, Date.today)
|
208
281
|
|
209
282
|
# Check to make sure properties were found
|
210
|
-
if
|
211
|
-
OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CoilHeatingDXSingleSpeed', "For #{coil_heating_dx_single_speed.name}, cannot find efficiency info using #{search_criteria}, cannot apply efficiency standard.")
|
212
|
-
successfully_set_all_properties = false
|
283
|
+
if hp_props.nil?
|
284
|
+
OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CoilHeatingDXSingleSpeed', "For #{coil_heating_dx_single_speed.name}, cannot find efficiency info using #{search_criteria} and capacity #{capacity_btu_per_hr} btu/hr, cannot apply efficiency standard.")
|
213
285
|
return sql_db_vars_map
|
214
286
|
end
|
215
287
|
|
288
|
+
equipment_type_field = search_criteria['equipment_type']
|
216
289
|
# Make the HEAT-CAP-FT curve
|
217
|
-
heat_cap_ft =
|
290
|
+
heat_cap_ft = nil
|
291
|
+
if hp_props['heat_cap_ft']
|
292
|
+
heat_cap_ft = model_add_curve(coil_heating_dx_single_speed.model, hp_props['heat_cap_ft'])
|
293
|
+
else
|
294
|
+
heat_cap_ft_curve_name = coil_dx_cap_ft(coil_heating_dx_single_speed, equipment_type_field, heating = true)
|
295
|
+
heat_cap_ft = model_add_curve(coil_heating_dx_single_speed.model, heat_cap_ft_curve_name)
|
296
|
+
end
|
218
297
|
if heat_cap_ft
|
219
298
|
coil_heating_dx_single_speed.setTotalHeatingCapacityFunctionofTemperatureCurve(heat_cap_ft)
|
220
299
|
else
|
221
300
|
OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CoilHeatingDXSingleSpeed', "For #{coil_heating_dx_single_speed.name}, cannot find heat_cap_ft curve, will not be set.")
|
222
|
-
successfully_set_all_properties = false
|
223
301
|
end
|
224
302
|
|
225
303
|
# Make the HEAT-CAP-FFLOW curve
|
226
|
-
heat_cap_fflow =
|
304
|
+
heat_cap_fflow = nil
|
305
|
+
if hp_props['heat_cap_fflow']
|
306
|
+
heat_cap_fflow = model_add_curve(coil_heating_dx_single_speed.model, hp_props['heat_cap_fflow'])
|
307
|
+
else
|
308
|
+
heat_cap_fflow_curve_name = coil_dx_cap_fflow(coil_heating_dx_single_speed, equipment_type_field, heating = true)
|
309
|
+
heat_cap_fflow = model_add_curve(coil_heating_dx_single_speed.model, heat_cap_fflow_curve_name)
|
310
|
+
end
|
227
311
|
if heat_cap_fflow
|
228
312
|
coil_heating_dx_single_speed.setTotalHeatingCapacityFunctionofFlowFractionCurve(heat_cap_fflow)
|
229
313
|
else
|
230
314
|
OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CoilHeatingDXSingleSpeed', "For #{coil_heating_dx_single_speed.name}, cannot find heat_cap_fflow curve, will not be set.")
|
231
|
-
successfully_set_all_properties = false
|
232
315
|
end
|
233
316
|
|
234
317
|
# Make the HEAT-EIR-FT curve
|
235
|
-
heat_eir_ft =
|
318
|
+
heat_eir_ft = nil
|
319
|
+
if hp_props['heat_eir_ft']
|
320
|
+
heat_eir_ft = model_add_curve(coil_heating_dx_single_speed.model, hp_props['heat_eir_ft'])
|
321
|
+
else
|
322
|
+
heat_eir_ft_curve_name = coil_dx_eir_ft(coil_heating_dx_single_speed, equipment_type_field, heating = true)
|
323
|
+
heat_eir_ft = model_add_curve(coil_heating_dx_single_speed.model, heat_eir_ft_curve_name)
|
324
|
+
end
|
236
325
|
if heat_eir_ft
|
237
326
|
coil_heating_dx_single_speed.setEnergyInputRatioFunctionofTemperatureCurve(heat_eir_ft)
|
238
327
|
else
|
239
328
|
OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CoilHeatingDXSingleSpeed', "For #{coil_heating_dx_single_speed.name}, cannot find heat_eir_ft curve, will not be set.")
|
240
|
-
successfully_set_all_properties = false
|
241
329
|
end
|
242
330
|
|
243
331
|
# Make the HEAT-EIR-FFLOW curve
|
244
|
-
heat_eir_fflow =
|
332
|
+
heat_eir_fflow = nil
|
333
|
+
if hp_props['heat_eir_fflow']
|
334
|
+
heat_eir_fflow = model_add_curve(coil_heating_dx_single_speed.model, hp_props['heat_eir_fflow'])
|
335
|
+
else
|
336
|
+
heat_eir_fflow_curve_name = coil_dx_eir_fflow(coil_heating_dx_single_speed, equipment_type_field, heating = true)
|
337
|
+
heat_eir_fflow = model_add_curve(coil_heating_dx_single_speed.model, heat_eir_fflow_curve_name)
|
338
|
+
end
|
245
339
|
if heat_eir_fflow
|
246
340
|
coil_heating_dx_single_speed.setEnergyInputRatioFunctionofFlowFractionCurve(heat_eir_fflow)
|
247
341
|
else
|
248
342
|
OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CoilHeatingDXSingleSpeed', "For #{coil_heating_dx_single_speed.name}, cannot find heat_eir_fflow curve, will not be set.")
|
249
|
-
successfully_set_all_properties = false
|
250
343
|
end
|
251
344
|
|
252
345
|
# Make the HEAT-PLF-FPLR curve
|
253
|
-
heat_plf_fplr =
|
346
|
+
heat_plf_fplr = nil
|
347
|
+
if hp_props['heat_plf_fplr']
|
348
|
+
heat_plf_fplr = model_add_curve(coil_heating_dx_single_speed.model, hp_props['heat_plf_fplr'])
|
349
|
+
else
|
350
|
+
heat_plf_fplr_curve_name = coil_dx_plf_fplr(coil_heating_dx_single_speed, equipment_type_field, heating = true)
|
351
|
+
heat_plf_fplr = model_add_curve(coil_heating_dx_single_speed.model, heat_plf_fplr_curve_name)
|
352
|
+
end
|
254
353
|
if heat_plf_fplr
|
255
354
|
coil_heating_dx_single_speed.setPartLoadFractionCorrelationCurve(heat_plf_fplr)
|
256
355
|
else
|
257
356
|
OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CoilHeatingDXSingleSpeed', "For #{coil_heating_dx_single_speed.name}, cannot find heat_plf_fplr curve, will not be set.")
|
258
|
-
successfully_set_all_properties = false
|
259
357
|
end
|
260
358
|
|
261
359
|
# Preserve the original name
|
262
360
|
orig_name = coil_heating_dx_single_speed.name.to_s
|
263
361
|
|
264
362
|
# Find the minimum COP and rename with efficiency rating
|
265
|
-
cop = coil_heating_dx_single_speed_standard_minimum_cop(coil_heating_dx_single_speed, true, necb_ref_hp)
|
363
|
+
cop = coil_heating_dx_single_speed_standard_minimum_cop(coil_heating_dx_single_speed, true, necb_ref_hp, equipment_type)
|
266
364
|
|
267
365
|
# Map the original name to the new name
|
268
366
|
sql_db_vars_map[coil_heating_dx_single_speed.name.to_s] = orig_name
|
data/lib/openstudio-standards/standards/Standards.CoilHeatingWaterToAirHeatPumpEquationFit.rb
CHANGED
@@ -102,7 +102,7 @@ class Standard
|
|
102
102
|
|
103
103
|
# Check to make sure properties were found
|
104
104
|
if coil_props.nil?
|
105
|
-
OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CoilHeatingWaterToAirHeatPumpEquationFit', "For #{coil_heating_water_to_air_heat_pump.name}, cannot find efficiency info using #{search_criteria}, cannot apply efficiency standard.")
|
105
|
+
OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CoilHeatingWaterToAirHeatPumpEquationFit', "For #{coil_heating_water_to_air_heat_pump.name}, cannot find efficiency info using #{search_criteria} and capacity #{capacity_btu_per_hr} btu/hr, cannot apply efficiency standard.")
|
106
106
|
successfully_set_all_properties = false
|
107
107
|
return successfully_set_all_properties
|
108
108
|
end
|
@@ -144,7 +144,7 @@ class Standard
|
|
144
144
|
|
145
145
|
# Check to make sure properties were found
|
146
146
|
if coil_props.nil?
|
147
|
-
OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CoilHeatingWaterToAirHeatPumpEquationFit', "For #{coil_heating_water_to_air_heat_pump.name}, cannot find efficiency info using #{search_criteria}, cannot apply efficiency standard.")
|
147
|
+
OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CoilHeatingWaterToAirHeatPumpEquationFit', "For #{coil_heating_water_to_air_heat_pump.name}, cannot find efficiency info using #{search_criteria} and capacity #{capacity_btu_per_hr} btu/hr, cannot apply efficiency standard.")
|
148
148
|
successfully_set_all_properties = false
|
149
149
|
return sql_db_vars_map
|
150
150
|
end
|
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'csv'
|
2
2
|
require 'date'
|
3
|
+
require 'parallel'
|
3
4
|
|
4
5
|
class Standard
|
5
6
|
attr_accessor :space_multiplier_map, :standards_data
|
@@ -66,8 +67,9 @@ class Standard
|
|
66
67
|
# @param sizing_run_dir [String] the directory where the sizing runs will be performed
|
67
68
|
# @param run_all_orients [Boolean] indicate weather a baseline model should be created for all 4 orientations: same as user model, +90 deg, +180 deg, +270 deg
|
68
69
|
# @param debug [Boolean] If true, will report out more detailed debugging output
|
70
|
+
# @param use_parallel [Boolean] If true, when measure will run simulation for four orientations in parallel, else keep runinig one at a time.
|
69
71
|
# @return [Boolean] returns true if successful, false if not
|
70
|
-
def model_create_prm_any_baseline_building(user_model, building_type, climate_zone, hvac_building_type = 'All others', wwr_building_type = 'All others', swh_building_type = 'All others', model_deep_copy = false, create_proposed_model = false, custom = nil, sizing_run_dir = Dir.pwd, run_all_orients = false, unmet_load_hours_check = true, debug = false)
|
72
|
+
def model_create_prm_any_baseline_building(user_model, building_type, climate_zone, hvac_building_type = 'All others', wwr_building_type = 'All others', swh_building_type = 'All others', model_deep_copy = false, create_proposed_model = false, custom = nil, sizing_run_dir = Dir.pwd, run_all_orients = false, unmet_load_hours_check = true, debug = false, use_parallel=false)
|
71
73
|
# User data process
|
72
74
|
# bldg_type_hvac_zone_hash could be an empty hash if all zones in the models are unconditioned
|
73
75
|
# TODO - move this portion to the top of the function
|
@@ -155,8 +157,11 @@ class Standard
|
|
155
157
|
# Need to run proposed model sizing simulation if no sql data is available
|
156
158
|
degs_from_org = run_all_orientations(run_all_orients, user_model) ? [0, 90, 180, 270] : [0]
|
157
159
|
|
160
|
+
# loop method
|
161
|
+
each_method = use_parallel && degs_from_org.size > 1 ? ->(collection, &block) { Parallel.each(collection, in_process: 4, &block) } : ->(collection, &block) { collection.each(&block) }
|
162
|
+
|
158
163
|
# Create baseline model for each orientation
|
159
|
-
degs_from_org
|
164
|
+
each_method.call(degs_from_org) do |degs|
|
160
165
|
# New baseline model:
|
161
166
|
# Starting point is the original proposed model
|
162
167
|
# Create a deep copy of the user model if requested
|
@@ -429,7 +434,7 @@ class Standard
|
|
429
434
|
end
|
430
435
|
|
431
436
|
# Run sizing run with the HVAC equipment
|
432
|
-
if model_run_sizing_run(model, "#{sizing_run_dir}/SR1") == false
|
437
|
+
if model_run_sizing_run(model, "#{sizing_run_dir}/SR1-#{degs}") == false
|
433
438
|
return false
|
434
439
|
end
|
435
440
|
|
@@ -471,7 +476,7 @@ class Standard
|
|
471
476
|
end
|
472
477
|
|
473
478
|
# Run sizing run with the new chillers, boilers, and cooling towers to determine capacities
|
474
|
-
if model_run_sizing_run(model, "#{sizing_run_dir}/SR2") == false
|
479
|
+
if model_run_sizing_run(model, "#{sizing_run_dir}/SR2-#{degs}") == false
|
475
480
|
return false
|
476
481
|
end
|
477
482
|
|