openstudio-standards 0.1.6 → 0.1.7
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/hvac_sizing/Siz.HeatingCoolingFuels.rb +24 -8
- data/lib/openstudio-standards/hvac_sizing/Siz.ThermalZone.rb +4 -0
- data/lib/openstudio-standards/prototypes/Prototype.Model.rb +10 -0
- data/lib/openstudio-standards/standards/Standards.BoilerHotWater.rb +38 -56
- data/lib/openstudio-standards/standards/Standards.ChillerElectricEIR.rb +22 -61
- data/lib/openstudio-standards/standards/Standards.CoilCoolingDXMultiSpeed.rb +3 -7
- data/lib/openstudio-standards/standards/Standards.CoilCoolingDXSingleSpeed.rb +103 -271
- data/lib/openstudio-standards/standards/Standards.CoilCoolingDXTwoSpeed.rb +62 -187
- data/lib/openstudio-standards/standards/Standards.CoilDX.rb +150 -0
- data/lib/openstudio-standards/standards/Standards.CoilHeatingDXMultiSpeed.rb +6 -4
- data/lib/openstudio-standards/standards/Standards.CoilHeatingDXSingleSpeed.rb +139 -208
- data/lib/openstudio-standards/standards/Standards.Model.rb +37 -12
- data/lib/openstudio-standards/standards/Standards.PlantLoop.rb +3 -3
- data/lib/openstudio-standards/standards/Standards.ThermalZone.rb +110 -0
- data/lib/openstudio-standards/version.rb +1 -1
- metadata +3 -2
@@ -1,81 +1,12 @@
|
|
1
1
|
|
2
2
|
# Reopen the OpenStudio class to add methods to apply standards to this object
|
3
3
|
class OpenStudio::Model::CoilCoolingDXSingleSpeed
|
4
|
-
|
5
|
-
#
|
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'
|
7
|
-
# @return [hash] has for search criteria to be used for find object
|
8
|
-
def find_search_criteria(template)
|
9
|
-
# Define the criteria to find the chiller properties
|
10
|
-
# in the hvac standards data set.
|
11
|
-
search_criteria = {}
|
12
|
-
search_criteria['template'] = template
|
13
|
-
cooling_type = condenserType
|
14
|
-
search_criteria['cooling_type'] = cooling_type
|
15
|
-
|
16
|
-
# Determine the heating type if unitary or zone hvac
|
17
|
-
heat_pump = false
|
18
|
-
heating_type = nil
|
19
|
-
if airLoopHVAC.empty?
|
20
|
-
if containingHVACComponent.is_initialized
|
21
|
-
containing_comp = containingHVACComponent.get
|
22
|
-
if containing_comp.to_AirLoopHVACUnitaryHeatPumpAirToAir.is_initialized
|
23
|
-
heat_pump = true
|
24
|
-
heating_type = 'Electric Resistance or None'
|
25
|
-
end # TODO: Add other unitary systems
|
26
|
-
elsif containingZoneHVACComponent.is_initialized
|
27
|
-
containing_comp = containingZoneHVACComponent.get
|
28
|
-
if containing_comp.to_ZoneHVACPackagedTerminalAirConditioner.is_initialized
|
29
|
-
htg_coil = containing_comp.to_ZoneHVACPackagedTerminalAirConditioner.get.heatingCoil
|
30
|
-
if htg_coil.to_CoilHeatingElectric.is_initialized
|
31
|
-
heating_type = 'Electric Resistance or None'
|
32
|
-
elsif htg_coil.to_CoilHeatingWater.is_initialized || htg_coil.to_CoilHeatingGas.is_initialized
|
33
|
-
heating_type = 'All Other'
|
34
|
-
end
|
35
|
-
end # TODO: Add other zone hvac systems
|
36
|
-
end
|
37
|
-
end
|
38
|
-
|
39
|
-
# Determine the heating type if on an airloop
|
40
|
-
if airLoopHVAC.is_initialized
|
41
|
-
air_loop = airLoopHVAC.get
|
42
|
-
heating_type = if !air_loop.supplyComponents('OS:Coil:Heating:Electric'.to_IddObjectType).empty?
|
43
|
-
'Electric Resistance or None'
|
44
|
-
elsif !air_loop.supplyComponents('OS:Coil:Heating:Gas'.to_IddObjectType).empty?
|
45
|
-
'All Other'
|
46
|
-
elsif !air_loop.supplyComponents('OS:Coil:Heating:Water'.to_IddObjectType).empty?
|
47
|
-
'All Other'
|
48
|
-
elsif !air_loop.supplyComponents('OS:Coil:Heating:DX:SingleSpeed'.to_IddObjectType).empty?
|
49
|
-
'All Other'
|
50
|
-
elsif !air_loop.supplyComponents('OS:Coil:Heating:Gas:MultiStage'.to_IddObjectType).empty?
|
51
|
-
'All Other'
|
52
|
-
elsif !air_loop.supplyComponents('OS:Coil:Heating:Desuperheater'.to_IddObjectType).empty?
|
53
|
-
'All Other'
|
54
|
-
elsif !air_loop.supplyComponents('OS:Coil:Heating:WaterToAirHeatPump:EquationFit'.to_IddObjectType).empty?
|
55
|
-
'All Other'
|
56
|
-
else
|
57
|
-
'Electric Resistance or None'
|
58
|
-
end
|
59
|
-
end
|
60
|
-
|
61
|
-
# Add the heating type to the search criteria
|
62
|
-
unless heating_type.nil?
|
63
|
-
search_criteria['heating_type'] = heating_type
|
64
|
-
end
|
65
|
-
|
66
|
-
# TODO: Standards - add split system vs single package to model
|
67
|
-
# For now, assume single package
|
68
|
-
subcategory = 'Single Package'
|
69
|
-
search_criteria['subcategory'] = subcategory
|
70
|
-
|
71
|
-
return search_criteria
|
72
|
-
end
|
4
|
+
include CoilDX
|
73
5
|
|
74
|
-
# Finds capacity in
|
6
|
+
# Finds capacity in W
|
75
7
|
#
|
76
|
-
# @return [Double] capacity in
|
8
|
+
# @return [Double] capacity in W to be used for find object
|
77
9
|
def find_capacity
|
78
|
-
# Get the coil capacity
|
79
10
|
capacity_w = nil
|
80
11
|
if ratedTotalCoolingCapacity.is_initialized
|
81
12
|
capacity_w = ratedTotalCoolingCapacity.get
|
@@ -83,66 +14,133 @@ class OpenStudio::Model::CoilCoolingDXSingleSpeed
|
|
83
14
|
capacity_w = autosizedRatedTotalCoolingCapacity.get
|
84
15
|
else
|
85
16
|
OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CoilCoolingDXSingleSpeed', "For #{name} capacity is not available, cannot apply efficiency standard.")
|
86
|
-
return
|
17
|
+
return 0.0
|
87
18
|
end
|
88
19
|
|
89
|
-
#
|
90
|
-
|
20
|
+
# If it's a PTAC or PTHP System, we need to divide the capacity by the potential zone multiplier
|
21
|
+
# because the COP is dependent on capacity, and the capacity should be the capacity of a single zone, not all the zones
|
22
|
+
if ['PTAC', 'PTHP'].include?(subcategory)
|
23
|
+
mult = 1
|
24
|
+
comp = containingZoneHVACComponent
|
25
|
+
if comp.is_initialized
|
26
|
+
if comp.get.thermalZone.is_initialized
|
27
|
+
mult = comp.get.thermalZone.get.multiplier
|
28
|
+
if mult > 1
|
29
|
+
total_cap = capacity_w
|
30
|
+
capacity_w /= mult
|
31
|
+
OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.CoilCoolingDXSingleSpeed', "For #{name}, total capacity of #{OpenStudio.convert(total_cap, 'W', 'kBtu/hr').get.round(2)}kBTU/hr was divided by the zone multiplier of #{mult} to give #{capacity_kbtu_per_hr = OpenStudio.convert(capacity_w, 'W', 'kBtu/hr').get.round(2)}kBTU/hr.")
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
91
36
|
|
92
|
-
return
|
37
|
+
return capacity_w
|
93
38
|
end
|
94
39
|
|
95
40
|
# Finds lookup object in standards and return efficiency
|
96
41
|
#
|
97
42
|
# @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'
|
98
|
-
# @param
|
43
|
+
# @param rename [Bool] if true, object will be renamed to include capacity and efficiency level
|
99
44
|
# @return [Double] full load efficiency (COP)
|
100
|
-
def standard_minimum_cop(template,
|
101
|
-
# find ac properties
|
45
|
+
def standard_minimum_cop(template, rename=false)
|
102
46
|
search_criteria = find_search_criteria(template)
|
103
47
|
cooling_type = search_criteria['cooling_type']
|
104
48
|
heating_type = search_criteria['heating_type']
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
ac_props = model.find_object(standards['unitary_acs'], search_criteria, capacity_btu_per_hr, Date.today)
|
49
|
+
sub_category = search_criteria['subcategory']
|
50
|
+
capacity_w = find_capacity
|
51
|
+
capacity_btu_per_hr = OpenStudio.convert(capacity_w, 'W', 'Btu/hr').get
|
52
|
+
capacity_kbtu_per_hr = OpenStudio.convert(capacity_w, 'W', 'kBtu/hr').get
|
110
53
|
|
111
|
-
#
|
112
|
-
|
54
|
+
# Look up the efficiency characteristics
|
55
|
+
# Lookup efficiencies depending on whether it is a unitary AC or a heat pump
|
56
|
+
ac_props = nil
|
57
|
+
ac_props = if heat_pump?
|
58
|
+
model.find_object($os_standards['heat_pumps'], search_criteria, capacity_btu_per_hr, Date.today)
|
59
|
+
else
|
60
|
+
model.find_object($os_standards['unitary_acs'], search_criteria, capacity_btu_per_hr, Date.today)
|
61
|
+
end
|
113
62
|
|
114
63
|
# Check to make sure properties were found
|
115
64
|
if ac_props.nil?
|
116
65
|
OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CoilCoolingDXSingleSpeed', "For #{name}, cannot find efficiency info, cannot apply efficiency standard.")
|
117
|
-
|
66
|
+
successfully_set_all_properties = false
|
67
|
+
return successfully_set_all_properties
|
68
|
+
end
|
69
|
+
|
70
|
+
# Get the minimum efficiency standards
|
71
|
+
cop = nil
|
72
|
+
|
73
|
+
# If PTHP, use equations
|
74
|
+
if sub_category == 'PTHP'
|
75
|
+
pthp_eer_coeff_1 = ac_props['pthp_eer_coefficient_1']
|
76
|
+
pthp_eer_coeff_2 = ac_props['pthp_eer_coefficient_2']
|
77
|
+
# TABLE 6.8.1D
|
78
|
+
# EER = pthp_eer_coeff_1 - (pthp_eer_coeff_2 * Cap / 1000)
|
79
|
+
# Note c: Cap means the rated cooling capacity of the product in Btu/h.
|
80
|
+
# If the unit's capacity is less than 7000 Btu/h, use 7000 Btu/h in the calculation.
|
81
|
+
# If the unit's capacity is greater than 15,000 Btu/h, use 15,000 Btu/h in the calculation.
|
82
|
+
eer_calc_cap_btu_per_hr = capacity_btu_per_hr
|
83
|
+
eer_calc_cap_btu_per_hr = 7000 if capacity_btu_per_hr < 7000
|
84
|
+
eer_calc_cap_btu_per_hr = 15_000 if capacity_btu_per_hr > 15_000
|
85
|
+
pthp_eer = pthp_eer_coeff_1 - (pthp_eer_coeff_2 * eer_calc_cap_btu_per_hr / 1000.0)
|
86
|
+
cop = eer_to_cop(pthp_eer, OpenStudio.convert(capacity_btu_per_hr, 'Btu/hr', 'W').get)
|
87
|
+
new_comp_name = "#{name} #{capacity_kbtu_per_hr.round}kBtu/hr #{pthp_eer.round(1)}EER"
|
88
|
+
OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.CoilCoolingDXSingleSpeed', "For #{name}: #{cooling_type} #{heating_type} #{sub_category} Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; EER = #{pthp_eer.round(2)}")
|
89
|
+
end
|
90
|
+
|
91
|
+
# If PTAC, use equations
|
92
|
+
if sub_category == 'PTAC'
|
93
|
+
ptac_eer_coeff_1 = ac_props['ptac_eer_coefficient_1']
|
94
|
+
ptac_eer_coeff_2 = ac_props['ptac_eer_coefficient_2']
|
95
|
+
# TABLE 6.8.1D
|
96
|
+
# EER = ptac_eer_coeff_1 - (ptac_eer_coeff_2 * Cap / 1000)
|
97
|
+
# Note c: Cap means the rated cooling capacity of the product in Btu/h.
|
98
|
+
# If the unit's capacity is less than 7000 Btu/h, use 7000 Btu/h in the calculation.
|
99
|
+
# If the unit's capacity is greater than 15,000 Btu/h, use 15,000 Btu/h in the calculation.
|
100
|
+
eer_calc_cap_btu_per_hr = capacity_btu_per_hr
|
101
|
+
eer_calc_cap_btu_per_hr = 7000 if capacity_btu_per_hr < 7000
|
102
|
+
eer_calc_cap_btu_per_hr = 15_000 if capacity_btu_per_hr > 15_000
|
103
|
+
ptac_eer = ptac_eer_coeff_1 - (ptac_eer_coeff_2 * eer_calc_cap_btu_per_hr / 1000.0)
|
104
|
+
cop = eer_to_cop(ptac_eer, OpenStudio.convert(capacity_btu_per_hr, 'Btu/hr', 'W').get)
|
105
|
+
new_comp_name = "#{name} #{capacity_kbtu_per_hr.round}kBtu/hr #{ptac_eer.round(1)}EER"
|
106
|
+
OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.CoilCoolingDXSingleSpeed', "For #{name}: #{cooling_type} #{heating_type} #{sub_category} Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; EER = #{ptac_eer}")
|
118
107
|
end
|
119
108
|
|
120
109
|
# If specified as SEER
|
121
110
|
unless ac_props['minimum_seasonal_energy_efficiency_ratio'].nil?
|
122
111
|
min_seer = ac_props['minimum_seasonal_energy_efficiency_ratio']
|
123
112
|
cop = seer_to_cop_cooling_no_fan(min_seer)
|
124
|
-
|
113
|
+
new_comp_name = "#{name} #{capacity_kbtu_per_hr.round}kBtu/hr #{min_seer}SEER"
|
114
|
+
OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.CoilCoolingDXSingleSpeed', "For #{template}: #{name}: #{cooling_type} #{heating_type} #{sub_category} Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; SEER = #{min_seer}")
|
125
115
|
end
|
126
116
|
|
127
117
|
# If specified as EER
|
128
118
|
unless ac_props['minimum_energy_efficiency_ratio'].nil?
|
129
119
|
min_eer = ac_props['minimum_energy_efficiency_ratio']
|
130
120
|
cop = eer_to_cop(min_eer, OpenStudio.convert(capacity_kbtu_per_hr, 'kBtu/hr', 'W').get)
|
131
|
-
|
121
|
+
new_comp_name = "#{name} #{capacity_kbtu_per_hr.round}kBtu/hr #{min_eer}EER"
|
122
|
+
OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.CoilCoolingDXSingleSpeed', "For #{template}: #{name}: #{cooling_type} #{heating_type} #{sub_category} Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; EER = #{min_eer}")
|
132
123
|
end
|
133
124
|
|
134
125
|
# if specified as SEER (heat pump)
|
135
126
|
unless ac_props['minimum_seasonal_efficiency'].nil?
|
136
127
|
min_seer = ac_props['minimum_seasonal_efficiency']
|
137
128
|
cop = seer_to_cop_cooling_no_fan(min_seer)
|
138
|
-
|
129
|
+
new_comp_name = "#{name} #{capacity_kbtu_per_hr.round}kBtu/hr #{min_seer}SEER"
|
130
|
+
OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.CoilCoolingDXSingleSpeed', "For #{template}: #{name}: #{cooling_type} #{heating_type} #{sub_category} Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; SEER = #{min_seer}")
|
139
131
|
end
|
140
132
|
|
141
133
|
# If specified as EER (heat pump)
|
142
134
|
unless ac_props['minimum_full_load_efficiency'].nil?
|
143
135
|
min_eer = ac_props['minimum_full_load_efficiency']
|
144
136
|
cop = eer_to_cop(min_eer, OpenStudio.convert(capacity_kbtu_per_hr, 'kBtu/hr', 'W').get)
|
145
|
-
|
137
|
+
new_comp_name = "#{name} #{capacity_kbtu_per_hr.round}kBtu/hr #{min_eer}EER"
|
138
|
+
OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.CoilCoolingDXSingleSpeed', "For #{template}: #{name}: #{cooling_type} #{heating_type} #{sub_category} Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; EER = #{min_eer}")
|
139
|
+
end
|
140
|
+
|
141
|
+
# Rename
|
142
|
+
if rename
|
143
|
+
setName(new_comp_name)
|
146
144
|
end
|
147
145
|
|
148
146
|
return cop
|
@@ -156,126 +154,27 @@ class OpenStudio::Model::CoilCoolingDXSingleSpeed
|
|
156
154
|
def apply_efficiency_and_curves(template, sql_db_vars_map)
|
157
155
|
successfully_set_all_properties = true
|
158
156
|
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
# Define the criteria to find the chiller properties
|
163
|
-
# in the hvac standards data set.
|
164
|
-
search_criteria = {}
|
165
|
-
search_criteria['template'] = template
|
166
|
-
cooling_type = condenserType
|
167
|
-
search_criteria['cooling_type'] = cooling_type
|
168
|
-
|
169
|
-
# TODO: Standards - add split system vs single package to model
|
170
|
-
# For now, assume single package as default
|
171
|
-
subcategory = 'Single Package'
|
172
|
-
|
173
|
-
# Determine the heating type if unitary or zone hvac
|
174
|
-
heat_pump = false
|
175
|
-
heating_type = nil
|
176
|
-
if airLoopHVAC.empty?
|
177
|
-
if containingHVACComponent.is_initialized
|
178
|
-
containing_comp = containingHVACComponent.get
|
179
|
-
if containing_comp.to_AirLoopHVACUnitaryHeatPumpAirToAir.is_initialized
|
180
|
-
heat_pump = true
|
181
|
-
heating_type = 'Electric Resistance or None'
|
182
|
-
end # TODO: Add other unitary systems
|
183
|
-
elsif containingZoneHVACComponent.is_initialized
|
184
|
-
containing_comp = containingZoneHVACComponent.get
|
185
|
-
# PTAC
|
186
|
-
if containing_comp.to_ZoneHVACPackagedTerminalAirConditioner.is_initialized
|
187
|
-
subcategory = 'PTAC'
|
188
|
-
htg_coil = containing_comp.to_ZoneHVACPackagedTerminalAirConditioner.get.heatingCoil
|
189
|
-
if htg_coil.to_CoilHeatingElectric.is_initialized
|
190
|
-
heating_type = 'Electric Resistance or None'
|
191
|
-
elsif htg_coil.to_CoilHeatingWater.is_initialized || htg_coil.to_CoilHeatingGas.is_initialized
|
192
|
-
heating_type = 'All Other'
|
193
|
-
end
|
194
|
-
# PTHP
|
195
|
-
elsif containing_comp.to_ZoneHVACPackagedTerminalHeatPump.is_initialized
|
196
|
-
subcategory = 'PTHP'
|
197
|
-
heating_type = 'Electric Resistance or None'
|
198
|
-
heat_pump = true
|
199
|
-
end # TODO: Add other zone hvac systems
|
200
|
-
|
201
|
-
end
|
202
|
-
end
|
203
|
-
|
204
|
-
# Determine the heating type if on an airloop
|
205
|
-
if airLoopHVAC.is_initialized
|
206
|
-
air_loop = airLoopHVAC.get
|
207
|
-
heating_type = if !air_loop.supplyComponents('OS:Coil:Heating:Electric'.to_IddObjectType).empty?
|
208
|
-
'Electric Resistance or None'
|
209
|
-
elsif !air_loop.supplyComponents('OS:Coil:Heating:Gas'.to_IddObjectType).empty?
|
210
|
-
'All Other'
|
211
|
-
elsif !air_loop.supplyComponents('OS:Coil:Heating:Water'.to_IddObjectType).empty?
|
212
|
-
'All Other'
|
213
|
-
elsif !air_loop.supplyComponents('OS:Coil:Heating:DX:SingleSpeed'.to_IddObjectType).empty?
|
214
|
-
'All Other'
|
215
|
-
elsif !air_loop.supplyComponents('OS:Coil:Heating:Gas:MultiStage'.to_IddObjectType).empty?
|
216
|
-
'All Other'
|
217
|
-
elsif !air_loop.supplyComponents('OS:Coil:Heating:Desuperheater'.to_IddObjectType).empty?
|
218
|
-
'All Other'
|
219
|
-
elsif !air_loop.supplyComponents('OS:Coil:Heating:WaterToAirHeatPump:EquationFit'.to_IddObjectType).empty?
|
220
|
-
'All Other'
|
221
|
-
else
|
222
|
-
'Electric Resistance or None'
|
223
|
-
end
|
224
|
-
end
|
225
|
-
|
226
|
-
# Add the heating type to the search criteria
|
227
|
-
unless heating_type.nil?
|
228
|
-
search_criteria['heating_type'] = heating_type
|
229
|
-
end
|
230
|
-
|
231
|
-
search_criteria['subcategory'] = subcategory
|
232
|
-
|
233
|
-
# Get the coil capacity
|
234
|
-
capacity_w = nil
|
235
|
-
if ratedTotalCoolingCapacity.is_initialized
|
236
|
-
capacity_w = ratedTotalCoolingCapacity.get
|
237
|
-
elsif autosizedRatedTotalCoolingCapacity.is_initialized
|
238
|
-
capacity_w = autosizedRatedTotalCoolingCapacity.get
|
239
|
-
else
|
240
|
-
OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CoilCoolingDXSingleSpeed', "For #{name} capacity is not available, cannot apply efficiency standard.")
|
241
|
-
successfully_set_all_properties = false
|
242
|
-
return successfully_set_all_properties
|
243
|
-
end
|
244
|
-
|
245
|
-
# If it's a PTAC or PTHP System, we need to divide the capacity by the potential zone multiplier
|
246
|
-
# because the COP is dependent on capacity, and the capacity should be the capacity of a single zone, not all the zones
|
247
|
-
if ['PTAC', 'PTHP'].include?(subcategory)
|
248
|
-
mult = 1
|
249
|
-
comp = containingZoneHVACComponent
|
250
|
-
if comp.is_initialized
|
251
|
-
if comp.get.thermalZone.is_initialized
|
252
|
-
mult = comp.get.thermalZone.get.multiplier
|
253
|
-
if mult > 1
|
254
|
-
total_cap = capacity_w
|
255
|
-
capacity_w /= mult
|
256
|
-
OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.CoilCoolingDXSingleSpeed', "For #{name}, total capacity of #{OpenStudio.convert(total_cap, 'W', 'kBtu/hr').get.round(2)}kBTU/hr was divided by the zone multiplier of #{mult} to give #{capacity_kbtu_per_hr = OpenStudio.convert(capacity_w, 'W', 'kBtu/hr').get.round(2)}kBTU/hr.")
|
257
|
-
end
|
258
|
-
end
|
259
|
-
end
|
260
|
-
end
|
157
|
+
# Get the search criteria
|
158
|
+
search_criteria = find_search_criteria(template)
|
261
159
|
|
262
|
-
#
|
160
|
+
# Get the capacity
|
161
|
+
capacity_w = find_capacity
|
263
162
|
capacity_btu_per_hr = OpenStudio.convert(capacity_w, 'W', 'Btu/hr').get
|
264
163
|
capacity_kbtu_per_hr = OpenStudio.convert(capacity_w, 'W', 'kBtu/hr').get
|
265
164
|
|
266
165
|
# Lookup efficiencies depending on whether it is a unitary AC or a heat pump
|
267
166
|
ac_props = nil
|
268
|
-
ac_props = if heat_pump
|
269
|
-
model.find_object(heat_pumps, search_criteria, capacity_btu_per_hr, Date.today)
|
167
|
+
ac_props = if heat_pump?
|
168
|
+
model.find_object($os_standards['heat_pumps'], search_criteria, capacity_btu_per_hr, Date.today)
|
270
169
|
else
|
271
|
-
model.find_object(unitary_acs, search_criteria, capacity_btu_per_hr, Date.today)
|
170
|
+
model.find_object($os_standards['unitary_acs'], search_criteria, capacity_btu_per_hr, Date.today)
|
272
171
|
end
|
273
172
|
|
274
173
|
# Check to make sure properties were found
|
275
174
|
if ac_props.nil?
|
276
175
|
OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CoilCoolingDXSingleSpeed', "For #{name}, cannot find efficiency info, cannot apply efficiency standard.")
|
277
176
|
successfully_set_all_properties = false
|
278
|
-
return
|
177
|
+
return sql_db_vars_map
|
279
178
|
end
|
280
179
|
|
281
180
|
# Make the COOL-CAP-FT curve
|
@@ -323,81 +222,14 @@ class OpenStudio::Model::CoilCoolingDXSingleSpeed
|
|
323
222
|
successfully_set_all_properties = false
|
324
223
|
end
|
325
224
|
|
326
|
-
#
|
327
|
-
|
328
|
-
|
329
|
-
# If PTHP, use equations
|
330
|
-
if subcategory == 'PTHP'
|
331
|
-
pthp_eer_coeff_1 = ac_props['pthp_eer_coefficient_1']
|
332
|
-
pthp_eer_coeff_2 = ac_props['pthp_eer_coefficient_2']
|
333
|
-
# TABLE 6.8.1D
|
334
|
-
# EER = pthp_eer_coeff_1 - (pthp_eer_coeff_2 * Cap / 1000)
|
335
|
-
# Note c: Cap means the rated cooling capacity of the product in Btu/h.
|
336
|
-
# If the unit's capacity is less than 7000 Btu/h, use 7000 Btu/h in the calculation.
|
337
|
-
# If the unit's capacity is greater than 15,000 Btu/h, use 15,000 Btu/h in the calculation.
|
338
|
-
eer_calc_cap_btu_per_hr = capacity_btu_per_hr
|
339
|
-
eer_calc_cap_btu_per_hr = 7000 if capacity_btu_per_hr < 7000
|
340
|
-
eer_calc_cap_btu_per_hr = 15_000 if capacity_btu_per_hr > 15_000
|
341
|
-
pthp_eer = pthp_eer_coeff_1 - (pthp_eer_coeff_2 * eer_calc_cap_btu_per_hr / 1000.0)
|
342
|
-
cop = eer_to_cop(pthp_eer, OpenStudio.convert(capacity_btu_per_hr, 'Btu/hr', 'W').get)
|
343
|
-
new_comp_name = "#{name} #{capacity_kbtu_per_hr.round}kBtu/hr #{pthp_eer.round(1)}EER"
|
344
|
-
OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.CoilCoolingDXSingleSpeed', "For #{name}: #{cooling_type} #{heating_type} #{subcategory} Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; EER = #{pthp_eer.round(2)}")
|
345
|
-
end
|
346
|
-
|
347
|
-
# If PTAC, use equations
|
348
|
-
if subcategory == 'PTAC'
|
349
|
-
ptac_eer_coeff_1 = ac_props['ptac_eer_coefficient_1']
|
350
|
-
ptac_eer_coeff_2 = ac_props['ptac_eer_coefficient_2']
|
351
|
-
# TABLE 6.8.1D
|
352
|
-
# EER = ptac_eer_coeff_1 - (ptac_eer_coeff_2 * Cap / 1000)
|
353
|
-
# Note c: Cap means the rated cooling capacity of the product in Btu/h.
|
354
|
-
# If the unit's capacity is less than 7000 Btu/h, use 7000 Btu/h in the calculation.
|
355
|
-
# If the unit's capacity is greater than 15,000 Btu/h, use 15,000 Btu/h in the calculation.
|
356
|
-
eer_calc_cap_btu_per_hr = capacity_btu_per_hr
|
357
|
-
eer_calc_cap_btu_per_hr = 7000 if capacity_btu_per_hr < 7000
|
358
|
-
eer_calc_cap_btu_per_hr = 15_000 if capacity_btu_per_hr > 15_000
|
359
|
-
ptac_eer = ptac_eer_coeff_1 - (ptac_eer_coeff_2 * eer_calc_cap_btu_per_hr / 1000.0)
|
360
|
-
cop = eer_to_cop(ptac_eer, OpenStudio.convert(capacity_btu_per_hr, 'Btu/hr', 'W').get)
|
361
|
-
new_comp_name = "#{name} #{capacity_kbtu_per_hr.round}kBtu/hr #{ptac_eer.round(1)}EER"
|
362
|
-
OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.CoilCoolingDXSingleSpeed', "For #{name}: #{cooling_type} #{heating_type} #{subcategory} Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; EER = #{ptac_eer}")
|
363
|
-
end
|
364
|
-
|
365
|
-
# If specified as SEER
|
366
|
-
unless ac_props['minimum_seasonal_energy_efficiency_ratio'].nil?
|
367
|
-
min_seer = ac_props['minimum_seasonal_energy_efficiency_ratio']
|
368
|
-
cop = seer_to_cop_cooling_no_fan(min_seer)
|
369
|
-
new_comp_name = "#{name} #{capacity_kbtu_per_hr.round}kBtu/hr #{min_seer}SEER"
|
370
|
-
# self.setName("#{self.name} #{capacity_kbtu_per_hr.round}kBtu/hr #{min_seer}SEER")
|
371
|
-
OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.CoilCoolingDXSingleSpeed', "For #{template}: #{name}: #{cooling_type} #{heating_type} #{subcategory} Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; SEER = #{min_seer}")
|
372
|
-
end
|
373
|
-
|
374
|
-
# If specified as EER
|
375
|
-
unless ac_props['minimum_energy_efficiency_ratio'].nil?
|
376
|
-
min_eer = ac_props['minimum_energy_efficiency_ratio']
|
377
|
-
cop = eer_to_cop(min_eer, OpenStudio.convert(capacity_kbtu_per_hr, 'kBtu/hr', 'W').get)
|
378
|
-
new_comp_name = "#{name} #{capacity_kbtu_per_hr.round}kBtu/hr #{min_eer}EER"
|
379
|
-
OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.CoilCoolingDXSingleSpeed', "For #{template}: #{name}: #{cooling_type} #{heating_type} #{subcategory} Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; EER = #{min_eer}")
|
380
|
-
end
|
225
|
+
# Preserve the original name
|
226
|
+
orig_name = name.to_s
|
381
227
|
|
382
|
-
#
|
383
|
-
|
384
|
-
min_seer = ac_props['minimum_seasonal_efficiency']
|
385
|
-
cop = seer_to_cop_cooling_no_fan(min_seer)
|
386
|
-
new_comp_name = "#{name} #{capacity_kbtu_per_hr.round}kBtu/hr #{min_seer}SEER"
|
387
|
-
# self.setName("#{self.name} #{capacity_kbtu_per_hr.round}kBtu/hr #{min_seer}SEER")
|
388
|
-
OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.CoilCoolingDXSingleSpeed', "For #{template}: #{name}: #{cooling_type} #{heating_type} #{subcategory} Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; SEER = #{min_seer}")
|
389
|
-
end
|
390
|
-
|
391
|
-
# If specified as EER (heat pump)
|
392
|
-
unless ac_props['minimum_full_load_efficiency'].nil?
|
393
|
-
min_eer = ac_props['minimum_full_load_efficiency']
|
394
|
-
cop = eer_to_cop(min_eer, OpenStudio.convert(capacity_kbtu_per_hr, 'kBtu/hr', 'W').get)
|
395
|
-
new_comp_name = "#{name} #{capacity_kbtu_per_hr.round}kBtu/hr #{min_eer}EER"
|
396
|
-
OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.CoilCoolingDXSingleSpeed', "For #{template}: #{name}: #{cooling_type} #{heating_type} #{subcategory} Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; EER = #{min_eer}")
|
397
|
-
end
|
228
|
+
# Find the minimum COP and rename with efficiency rating
|
229
|
+
cop = standard_minimum_cop(template, true)
|
398
230
|
|
399
|
-
|
400
|
-
|
231
|
+
# Map the original name to the new name
|
232
|
+
sql_db_vars_map[name.to_s] = orig_name
|
401
233
|
|
402
234
|
# Set the efficiency values
|
403
235
|
unless cop.nil?
|