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.
- checksums.yaml +4 -4
- data/data/standards/OpenStudio_Standards.xlsx +0 -0
- data/data/standards/OpenStudio_Standards_boilers.json +62 -4
- data/data/standards/OpenStudio_Standards_chillers.json +778 -68
- data/data/standards/OpenStudio_Standards_construction_sets.json +52 -93
- data/data/standards/OpenStudio_Standards_curve_biquadratics.json +36 -36
- data/data/standards/OpenStudio_Standards_curve_quadratics.json +3 -3
- data/data/standards/OpenStudio_Standards_heat_pumps.json +840 -0
- data/data/standards/OpenStudio_Standards_heat_pumps_heating.json +352 -0
- data/data/standards/OpenStudio_Standards_heat_rejection.json +48 -0
- data/data/standards/OpenStudio_Standards_motors.json +270 -0
- data/data/standards/OpenStudio_Standards_space_types.json +10390 -2824
- data/data/standards/OpenStudio_Standards_unitary_acs.json +794 -18
- data/data/weather/USA_CO_Boulder-Broomfield-Jefferson.County.AP.724699_TMY3.ddy +538 -0
- data/data/weather/USA_CO_Boulder-Broomfield-Jefferson.County.AP.724699_TMY3.epw +8768 -0
- data/data/weather/USA_CO_Boulder-Broomfield-Jefferson.County.AP.724699_TMY3.stat +493 -0
- data/data/weather/USA_CO_Denver.Intl.AP.725650_TMY3.ddy +536 -0
- data/data/weather/USA_CO_Denver.Intl.AP.725650_TMY3.epw +8768 -0
- data/data/weather/USA_CO_Denver.Intl.AP.725650_TMY3.stat +554 -0
- data/data/weather/USA_CO_Fort.Collins.AWOS.724769_TMY3.ddy +536 -0
- data/data/weather/USA_CO_Fort.Collins.AWOS.724769_TMY3.epw +8768 -0
- data/data/weather/USA_CO_Fort.Collins.AWOS.724769_TMY3.stat +554 -0
- data/data/weather/envelope_info.csv +6 -0
- data/lib/openstudio-standards.rb +10 -11
- data/lib/openstudio-standards/btap/compliance.rb +251 -969
- data/lib/openstudio-standards/btap/envelope.rb +1 -1
- data/lib/openstudio-standards/btap/fileio.rb +37 -5
- data/lib/openstudio-standards/btap/geometry.rb +27 -17
- data/lib/openstudio-standards/btap/hvac.rb +80 -27
- data/lib/openstudio-standards/hvac_sizing/{HVACSizing.CoilHeatingDXMultiSpeed.rb → Siz.CoilHeatingDXMultiSpeed.rb} +0 -0
- data/lib/openstudio-standards/hvac_sizing/Siz.ControllerOutdoorAir.rb +30 -4
- data/lib/openstudio-standards/hvac_sizing/Siz.CoolingTowerTwoSpeed.rb +61 -5
- data/lib/openstudio-standards/hvac_sizing/Siz.CoolingTowerVariableSpeed.rb +37 -7
- data/lib/openstudio-standards/hvac_sizing/Siz.DistrictCooling.rb +27 -0
- data/lib/openstudio-standards/hvac_sizing/Siz.DistrictHeating.rb +27 -0
- data/lib/openstudio-standards/hvac_sizing/Siz.HeaderedPumpsConstantSpeed.rb +55 -0
- data/lib/openstudio-standards/hvac_sizing/Siz.HeaderedPumpsVariableSpeed.rb +55 -0
- data/lib/openstudio-standards/hvac_sizing/Siz.HeatingCoolingFuels.rb +51 -9
- data/lib/openstudio-standards/hvac_sizing/Siz.Model.rb +99 -17
- data/lib/openstudio-standards/hvac_sizing/Siz.PumpConstantSpeed.rb +1 -1
- data/lib/openstudio-standards/hvac_sizing/Siz.ThermalZone.rb +29 -6
- data/lib/openstudio-standards/hvac_sizing/Siz.WaterHeaterMixed.rb +16 -0
- data/lib/openstudio-standards/prototypes/Prototype.AirTerminalSingleDuctVAVReheat.rb +43 -48
- data/lib/openstudio-standards/prototypes/Prototype.ControllerWaterCoil.rb +5 -9
- data/lib/openstudio-standards/prototypes/Prototype.Fan.rb +68 -0
- data/lib/openstudio-standards/prototypes/Prototype.FanConstantVolume.rb +39 -43
- data/lib/openstudio-standards/prototypes/Prototype.FanOnOff.rb +49 -51
- data/lib/openstudio-standards/prototypes/Prototype.FanVariableVolume.rb +55 -61
- data/lib/openstudio-standards/prototypes/Prototype.FanZoneExhaust.rb +8 -10
- data/lib/openstudio-standards/prototypes/Prototype.HeatExchangerAirToAirSensibleAndLatent.rb +15 -20
- data/lib/openstudio-standards/prototypes/Prototype.Model.hvac.rb +330 -322
- data/lib/openstudio-standards/prototypes/Prototype.Model.rb +501 -446
- data/lib/openstudio-standards/prototypes/Prototype.Model.swh.rb +221 -230
- data/lib/openstudio-standards/prototypes/Prototype.add_objects.rb +0 -2
- data/lib/openstudio-standards/prototypes/Prototype.full_service_restaurant.rb +130 -137
- data/lib/openstudio-standards/prototypes/Prototype.high_rise_apartment.rb +374 -291
- data/lib/openstudio-standards/prototypes/Prototype.hospital.rb +146 -193
- data/lib/openstudio-standards/prototypes/Prototype.hvac_systems.rb +1315 -1113
- data/lib/openstudio-standards/prototypes/Prototype.large_hotel.rb +65 -88
- data/lib/openstudio-standards/prototypes/Prototype.large_office.rb +101 -156
- data/lib/openstudio-standards/prototypes/Prototype.medium_office.rb +46 -96
- data/lib/openstudio-standards/prototypes/Prototype.mid_rise_apartment.rb +113 -123
- data/lib/openstudio-standards/prototypes/Prototype.outpatient.rb +356 -345
- data/lib/openstudio-standards/prototypes/Prototype.primary_school.rb +48 -103
- data/lib/openstudio-standards/prototypes/Prototype.quick_service_restaurant.rb +115 -123
- data/lib/openstudio-standards/prototypes/Prototype.retail_standalone.rb +30 -39
- data/lib/openstudio-standards/prototypes/Prototype.retail_stripmall.rb +32 -45
- data/lib/openstudio-standards/prototypes/Prototype.secondary_school.rb +98 -258
- data/lib/openstudio-standards/prototypes/Prototype.small_hotel.rb +429 -474
- data/lib/openstudio-standards/prototypes/Prototype.small_office.rb +28 -36
- data/lib/openstudio-standards/prototypes/Prototype.strip_model.rb +7 -7
- data/lib/openstudio-standards/prototypes/Prototype.utilities.rb +172 -146
- data/lib/openstudio-standards/prototypes/Prototype.warehouse.rb +46 -53
- data/lib/openstudio-standards/standards/Standards.AirLoopHVAC.rb +885 -707
- data/lib/openstudio-standards/standards/Standards.AirTerminalSingleDuctParallelPIUReheat.rb +48 -57
- data/lib/openstudio-standards/standards/Standards.AirTerminalSingleDuctVAVReheat.rb +24 -31
- data/lib/openstudio-standards/standards/Standards.BoilerHotWater.rb +80 -93
- data/lib/openstudio-standards/standards/Standards.BuildingStory.rb +69 -0
- data/lib/openstudio-standards/standards/Standards.ChillerElectricEIR.rb +60 -72
- data/lib/openstudio-standards/standards/Standards.CoilCoolingDXMultiSpeed.rb +104 -108
- data/lib/openstudio-standards/standards/Standards.CoilCoolingDXSingleSpeed.rb +190 -198
- data/lib/openstudio-standards/standards/Standards.CoilCoolingDXTwoSpeed.rb +134 -146
- data/lib/openstudio-standards/standards/Standards.CoilHeatingDXMultiSpeed.rb +56 -60
- data/lib/openstudio-standards/standards/Standards.CoilHeatingDXSingleSpeed.rb +151 -161
- data/lib/openstudio-standards/standards/Standards.CoilHeatingGasMultiStage.rb +30 -34
- data/lib/openstudio-standards/standards/Standards.Construction.rb +116 -132
- data/lib/openstudio-standards/standards/Standards.CoolingTower.rb +138 -0
- data/lib/openstudio-standards/standards/Standards.CoolingTowerSingleSpeed.rb +11 -0
- data/lib/openstudio-standards/standards/Standards.CoolingTowerTwoSpeed.rb +11 -0
- data/lib/openstudio-standards/standards/Standards.CoolingTowerVariableSpeed.rb +16 -0
- data/lib/openstudio-standards/standards/Standards.Fan.rb +190 -236
- data/lib/openstudio-standards/standards/Standards.FanConstantVolume.rb +0 -2
- data/lib/openstudio-standards/standards/Standards.FanOnOff.rb +0 -2
- data/lib/openstudio-standards/standards/Standards.FanVariableVolume.rb +168 -14
- data/lib/openstudio-standards/standards/Standards.FanZoneExhaust.rb +0 -2
- data/lib/openstudio-standards/standards/Standards.HeaderedPumpsConstantSpeed.rb +33 -0
- data/lib/openstudio-standards/standards/Standards.HeaderedPumpsVariableSpeed.rb +83 -0
- data/lib/openstudio-standards/standards/Standards.HeatExchangerSensLat.rb +22 -0
- data/lib/openstudio-standards/standards/Standards.Model.rb +2385 -1622
- data/lib/openstudio-standards/standards/Standards.PlanarSurface.rb +83 -35
- data/lib/openstudio-standards/standards/Standards.PlantLoop.rb +805 -395
- data/lib/openstudio-standards/standards/Standards.Pump.rb +139 -119
- data/lib/openstudio-standards/standards/Standards.PumpConstantSpeed.rb +0 -2
- data/lib/openstudio-standards/standards/Standards.PumpVariableSpeed.rb +16 -15
- data/lib/openstudio-standards/standards/Standards.ScheduleCompact.rb +35 -0
- data/lib/openstudio-standards/standards/Standards.ScheduleConstant.rb +7 -13
- data/lib/openstudio-standards/standards/Standards.ScheduleRuleset.rb +144 -59
- data/lib/openstudio-standards/standards/Standards.Space.rb +1509 -1326
- data/lib/openstudio-standards/standards/Standards.SpaceType.rb +254 -262
- data/lib/openstudio-standards/standards/Standards.SubSurface.rb +105 -105
- data/lib/openstudio-standards/standards/Standards.Surface.rb +27 -31
- data/lib/openstudio-standards/standards/Standards.ThermalZone.rb +882 -157
- data/lib/openstudio-standards/standards/Standards.WaterHeaterMixed.rb +179 -69
- data/lib/openstudio-standards/standards/Standards.ZoneHVACComponent.rb +75 -0
- data/lib/openstudio-standards/utilities/logging.rb +31 -38
- data/lib/openstudio-standards/utilities/simulation.rb +118 -82
- data/lib/openstudio-standards/version.rb +1 -1
- data/lib/openstudio-standards/weather/Weather.Model.rb +382 -390
- data/lib/openstudio-standards/weather/Weather.stat_file.rb +159 -78
- metadata +59 -6
@@ -1,32 +1,29 @@
|
|
1
1
|
|
2
2
|
# Reopen the OpenStudio class to add methods to apply standards to this object
|
3
3
|
class OpenStudio::Model::CoilCoolingDXTwoSpeed
|
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
|
-
cooling_type =
|
13
|
+
cooling_type = condenserType
|
16
14
|
search_criteria['cooling_type'] = cooling_type
|
17
15
|
|
18
|
-
|
19
16
|
# Determine the heating type if unitary or zone hvac
|
20
17
|
heat_pump = false
|
21
18
|
heating_type = nil
|
22
|
-
if
|
23
|
-
if
|
19
|
+
if airLoopHVAC.empty?
|
20
|
+
if containingHVACComponent.is_initialized
|
24
21
|
containing_comp = containingHVACComponent.get
|
25
22
|
if containing_comp.to_AirLoopHVACUnitaryHeatPumpAirToAir.is_initialized
|
26
23
|
heat_pump = true
|
27
24
|
heating_type = 'Electric Resistance or None'
|
28
|
-
end # TODO Add other unitary systems
|
29
|
-
elsif
|
25
|
+
end # TODO: Add other unitary systems
|
26
|
+
elsif containingZoneHVACComponent.is_initialized
|
30
27
|
containing_comp = containingZoneHVACComponent.get
|
31
28
|
if containing_comp.to_ZoneHVACPackagedTerminalAirConditioner.is_initialized
|
32
29
|
htg_coil = containing_comp.to_ZoneHVACPackagedTerminalAirConditioner.get.heatingCoil
|
@@ -35,30 +32,30 @@ class OpenStudio::Model::CoilCoolingDXTwoSpeed
|
|
35
32
|
elsif htg_coil.to_CoilHeatingWater.is_initialized || htg_coil.to_CoilHeatingGas.is_initialized
|
36
33
|
heating_type = 'All Other'
|
37
34
|
end
|
38
|
-
end # TODO Add other zone hvac systems
|
35
|
+
end # TODO: Add other zone hvac systems
|
39
36
|
end
|
40
37
|
end
|
41
38
|
|
42
39
|
# Determine the heating type if on an airloop
|
43
|
-
if
|
44
|
-
air_loop =
|
45
|
-
if air_loop.supplyComponents('Coil:Heating:Electric'.to_IddObjectType).
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
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
|
62
59
|
end
|
63
60
|
|
64
61
|
# Add the heating type to the search criteria
|
@@ -66,37 +63,34 @@ class OpenStudio::Model::CoilCoolingDXTwoSpeed
|
|
66
63
|
search_criteria['heating_type'] = heating_type
|
67
64
|
end
|
68
65
|
|
69
|
-
# TODO Standards - add split system vs single package to model
|
66
|
+
# TODO: Standards - add split system vs single package to model
|
70
67
|
# For now, assume single package
|
71
68
|
subcategory = 'Single Package'
|
72
69
|
search_criteria['subcategory'] = subcategory
|
73
70
|
|
74
71
|
return search_criteria
|
75
|
-
|
76
72
|
end
|
77
73
|
|
78
74
|
# Finds capacity in tons
|
79
75
|
#
|
80
76
|
# @return [Double] capacity in tons to be used for find object
|
81
|
-
def find_capacity
|
82
|
-
|
77
|
+
def find_capacity
|
83
78
|
# Get the coil capacity
|
84
79
|
capacity_w = nil
|
85
|
-
if
|
86
|
-
capacity_w =
|
87
|
-
elsif
|
88
|
-
capacity_w =
|
80
|
+
if ratedHighSpeedTotalCoolingCapacity.is_initialized
|
81
|
+
capacity_w = ratedHighSpeedTotalCoolingCapacity.get
|
82
|
+
elsif autosizedRatedHighSpeedTotalCoolingCapacity.is_initialized
|
83
|
+
capacity_w = autosizedRatedHighSpeedTotalCoolingCapacity.get
|
89
84
|
else
|
90
|
-
#OpenStudio::logFree(OpenStudio::Warn, 'openstudio.standards.CoilCoolingDXSingleSpeed', "For #{self.name} capacity is not available, cannot apply efficiency standard.")
|
85
|
+
# OpenStudio::logFree(OpenStudio::Warn, 'openstudio.standards.CoilCoolingDXSingleSpeed', "For #{self.name} capacity is not available, cannot apply efficiency standard.")
|
91
86
|
successfully_set_all_properties = false
|
92
87
|
return successfully_set_all_properties
|
93
88
|
end
|
94
89
|
|
95
90
|
# Convert capacity to Btu/hr
|
96
|
-
capacity_btu_per_hr = OpenStudio.convert(capacity_w,
|
91
|
+
capacity_btu_per_hr = OpenStudio.convert(capacity_w, 'W', 'Btu/hr').get
|
97
92
|
|
98
93
|
return capacity_btu_per_hr
|
99
|
-
|
100
94
|
end
|
101
95
|
|
102
96
|
# Finds lookup object in standards and return efficiency
|
@@ -104,246 +98,240 @@ class OpenStudio::Model::CoilCoolingDXTwoSpeed
|
|
104
98
|
# @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
99
|
# @param standards [Hash] the OpenStudio_Standards spreadsheet in hash format
|
106
100
|
# @return [Double] full load efficiency (COP)
|
107
|
-
def standard_minimum_cop(template,standards)
|
108
|
-
|
101
|
+
def standard_minimum_cop(template, standards)
|
109
102
|
# find ac properties
|
110
|
-
search_criteria =
|
111
|
-
cooling_type = search_criteria[
|
112
|
-
heating_type = search_criteria[
|
113
|
-
subcategory = search_criteria[
|
114
|
-
capacity_btu_per_hr =
|
115
|
-
capacity_kbtu_per_hr = OpenStudio.convert(capacity_btu_per_hr,
|
103
|
+
search_criteria = find_search_criteria(template)
|
104
|
+
cooling_type = search_criteria['cooling_type']
|
105
|
+
heating_type = search_criteria['heating_type']
|
106
|
+
subcategory = search_criteria['subcategory']
|
107
|
+
capacity_btu_per_hr = find_capacity
|
108
|
+
capacity_kbtu_per_hr = OpenStudio.convert(capacity_btu_per_hr, 'Btu/hr', 'kBtu/hr').get
|
116
109
|
|
117
|
-
ac_props =
|
110
|
+
ac_props = model.find_object(standards['unitary_acs'], search_criteria, capacity_btu_per_hr, Date.today)
|
118
111
|
|
119
112
|
# Get the minimum efficiency standards
|
120
113
|
cop = nil
|
121
114
|
|
122
115
|
# Check to make sure properties were found
|
123
116
|
if ac_props.nil?
|
124
|
-
OpenStudio
|
117
|
+
OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CoilCoolingDXTwoSpeed', "For #{name}, cannot find efficiency info, cannot apply efficiency standard.")
|
125
118
|
return cop # value of nil
|
126
119
|
end
|
127
120
|
|
128
121
|
# If specified as SEER
|
129
122
|
unless ac_props['minimum_seasonal_energy_efficiency_ratio'].nil?
|
130
123
|
min_seer = ac_props['minimum_seasonal_energy_efficiency_ratio']
|
131
|
-
cop =
|
132
|
-
OpenStudio
|
124
|
+
cop = seer_to_cop_cooling_no_fan(min_seer)
|
125
|
+
OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.CoilCoolingDXTwoSpeed', "For #{template}: #{name}: #{cooling_type} #{heating_type} #{subcategory} Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; SEER = #{min_seer}")
|
133
126
|
end
|
134
127
|
|
135
128
|
# If specified as EER
|
136
129
|
unless ac_props['minimum_energy_efficiency_ratio'].nil?
|
137
130
|
min_eer = ac_props['minimum_energy_efficiency_ratio']
|
138
|
-
cop = eer_to_cop(min_eer)
|
139
|
-
OpenStudio
|
131
|
+
cop = eer_to_cop(min_eer, OpenStudio.convert(capacity_kbtu_per_hr, 'kBtu/hr', 'W').get)
|
132
|
+
OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.CoilCoolingDXTwoSpeed', "For #{template}: #{name}: #{cooling_type} #{heating_type} #{subcategory} Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; EER = #{min_eer}")
|
140
133
|
end
|
141
134
|
|
142
135
|
# if specified as SEER (heat pump)
|
143
136
|
unless ac_props['minimum_seasonal_efficiency'].nil?
|
144
137
|
min_seer = ac_props['minimum_seasonal_efficiency']
|
145
|
-
cop =
|
146
|
-
OpenStudio
|
138
|
+
cop = seer_to_cop_cooling_no_fan(min_seer)
|
139
|
+
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}")
|
147
140
|
end
|
148
141
|
|
149
142
|
# If specified as EER (heat pump)
|
150
143
|
unless ac_props['minimum_full_load_efficiency'].nil?
|
151
144
|
min_eer = ac_props['minimum_full_load_efficiency']
|
152
|
-
cop = eer_to_cop(min_eer)
|
153
|
-
OpenStudio
|
145
|
+
cop = eer_to_cop(min_eer, OpenStudio.convert(capacity_kbtu_per_hr, 'kBtu/hr', 'W').get)
|
146
|
+
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}")
|
154
147
|
end
|
155
148
|
|
156
149
|
return cop
|
157
|
-
|
158
150
|
end
|
159
151
|
|
160
152
|
# Applies the standard efficiency ratings and typical performance curves to this object.
|
161
|
-
#
|
153
|
+
#
|
162
154
|
# @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'
|
163
155
|
# @param standards [Hash] the OpenStudio_Standards spreadsheet in hash format
|
164
156
|
# @return [Bool] true if successful, false if not
|
165
|
-
def
|
157
|
+
def apply_efficiency_and_curves(template)
|
158
|
+
successfully_set_all_properties = true
|
166
159
|
|
167
|
-
successfully_set_all_properties = true
|
168
|
-
|
169
160
|
unitary_acs = $os_standards['unitary_acs']
|
170
|
-
|
161
|
+
|
171
162
|
# Define the criteria to find the chiller properties
|
172
163
|
# in the hvac standards data set.
|
173
164
|
search_criteria = {}
|
174
165
|
search_criteria['template'] = template
|
175
|
-
cooling_type =
|
166
|
+
cooling_type = condenserType
|
176
167
|
search_criteria['cooling_type'] = cooling_type
|
177
|
-
|
178
168
|
|
179
169
|
# Determine the heating type if unitary or zone hvac
|
180
170
|
heat_pump = false
|
181
171
|
heating_type = nil
|
182
|
-
if
|
183
|
-
if
|
172
|
+
if airLoopHVAC.empty?
|
173
|
+
if containingHVACComponent.is_initialized
|
184
174
|
containing_comp = containingHVACComponent.get
|
185
175
|
if containing_comp.to_AirLoopHVACUnitaryHeatPumpAirToAir.is_initialized
|
186
176
|
heat_pump = true
|
187
177
|
heating_type = 'Electric Resistance or None'
|
188
|
-
end # TODO Add other unitary systems
|
189
|
-
elsif
|
178
|
+
end # TODO: Add other unitary systems
|
179
|
+
elsif containingZoneHVACComponent.is_initialized
|
190
180
|
containing_comp = containingZoneHVACComponent.get
|
191
181
|
if containing_comp.to_ZoneHVACPackagedTerminalAirConditioner.is_initialized
|
192
182
|
htg_coil = containing_comp.to_ZoneHVACPackagedTerminalAirConditioner.get.heatingCoil
|
193
183
|
if htg_coil.to_CoilHeatingElectric.is_initialized
|
194
|
-
heating_type = 'Electric Resistance or None'
|
184
|
+
heating_type = 'Electric Resistance or None'
|
195
185
|
elsif htg_coil.to_CoilHeatingWater.is_initialized || htg_coil.to_CoilHeatingGas.is_initialized
|
196
186
|
heating_type = 'All Other'
|
197
|
-
end
|
198
|
-
end # TODO Add other zone hvac systems
|
187
|
+
end
|
188
|
+
end # TODO: Add other zone hvac systems
|
199
189
|
end
|
200
|
-
end
|
201
|
-
|
190
|
+
end
|
191
|
+
|
202
192
|
# Determine the heating type if on an airloop
|
203
|
-
if
|
204
|
-
air_loop =
|
205
|
-
if air_loop.supplyComponents('Coil:Heating:Electric'.to_IddObjectType).
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
193
|
+
if airLoopHVAC.is_initialized
|
194
|
+
air_loop = airLoopHVAC.get
|
195
|
+
heating_type = if !air_loop.supplyComponents('OS:Coil:Heating:Electric'.to_IddObjectType).empty?
|
196
|
+
'Electric Resistance or None'
|
197
|
+
elsif !air_loop.supplyComponents('OS:Coil:Heating:Gas'.to_IddObjectType).empty?
|
198
|
+
'All Other'
|
199
|
+
elsif !air_loop.supplyComponents('OS:Coil:Heating:Water'.to_IddObjectType).empty?
|
200
|
+
'All Other'
|
201
|
+
elsif !air_loop.supplyComponents('OS:Coil:Heating:DX:SingleSpeed'.to_IddObjectType).empty?
|
202
|
+
'All Other'
|
203
|
+
elsif !air_loop.supplyComponents('OS:Coil:Heating:Gas:MultiStage'.to_IddObjectType).empty?
|
204
|
+
'All Other'
|
205
|
+
elsif !air_loop.supplyComponents('OS:Coil:Heating:Desuperheater'.to_IddObjectType).empty?
|
206
|
+
'All Other'
|
207
|
+
elsif !air_loop.supplyComponents('OS:Coil:Heating:WaterToAirHeatPump:EquationFit'.to_IddObjectType).empty?
|
208
|
+
'All Other'
|
209
|
+
else
|
210
|
+
'Electric Resistance or None'
|
211
|
+
end
|
222
212
|
end
|
223
|
-
|
213
|
+
|
224
214
|
# Add the heating type to the search criteria
|
225
215
|
unless heating_type.nil?
|
226
216
|
search_criteria['heating_type'] = heating_type
|
227
217
|
end
|
228
|
-
|
229
|
-
# TODO Standards - add split system vs single package to model
|
218
|
+
|
219
|
+
# TODO: Standards - add split system vs single package to model
|
230
220
|
# For now, assume single package
|
231
221
|
subcategory = 'Single Package'
|
232
222
|
search_criteria['subcategory'] = subcategory
|
233
223
|
|
234
224
|
# Get the coil capacity
|
235
225
|
capacity_w = nil
|
236
|
-
if
|
237
|
-
capacity_w =
|
238
|
-
elsif
|
239
|
-
capacity_w =
|
226
|
+
if ratedHighSpeedTotalCoolingCapacity.is_initialized
|
227
|
+
capacity_w = ratedHighSpeedTotalCoolingCapacity.get
|
228
|
+
elsif autosizedRatedHighSpeedTotalCoolingCapacity.is_initialized
|
229
|
+
capacity_w = autosizedRatedHighSpeedTotalCoolingCapacity.get
|
240
230
|
else
|
241
|
-
#OpenStudio::logFree(OpenStudio::Warn, 'openstudio.standards.CoilCoolingDXSingleSpeed', "For #{self.name} capacity is not available, cannot apply efficiency standard.")
|
231
|
+
# OpenStudio::logFree(OpenStudio::Warn, 'openstudio.standards.CoilCoolingDXSingleSpeed', "For #{self.name} capacity is not available, cannot apply efficiency standard.")
|
242
232
|
successfully_set_all_properties = false
|
243
233
|
return successfully_set_all_properties
|
244
|
-
end
|
245
|
-
|
234
|
+
end
|
235
|
+
|
246
236
|
# Convert capacity to Btu/hr
|
247
|
-
capacity_btu_per_hr = OpenStudio.convert(capacity_w,
|
248
|
-
capacity_kbtu_per_hr = OpenStudio.convert(capacity_w,
|
249
|
-
|
250
|
-
ac_props =
|
237
|
+
capacity_btu_per_hr = OpenStudio.convert(capacity_w, 'W', 'Btu/hr').get
|
238
|
+
capacity_kbtu_per_hr = OpenStudio.convert(capacity_w, 'W', 'kBtu/hr').get
|
239
|
+
|
240
|
+
ac_props = model.find_object(unitary_acs, search_criteria, capacity_btu_per_hr, Date.today)
|
251
241
|
|
252
242
|
# Check to make sure properties were found
|
253
243
|
if ac_props.nil?
|
254
|
-
OpenStudio
|
244
|
+
OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CoilCoolingDXTwoSpeed', "For #{name}, cannot find efficiency info, cannot apply efficiency standard.")
|
255
245
|
successfully_set_all_properties = false
|
256
246
|
return successfully_set_all_properties
|
257
247
|
end
|
258
|
-
|
248
|
+
|
259
249
|
# Make the total COOL-CAP-FT curve
|
260
|
-
tot_cool_cap_ft =
|
250
|
+
tot_cool_cap_ft = model.add_curve(ac_props['cool_cap_ft'])
|
261
251
|
if tot_cool_cap_ft
|
262
|
-
|
252
|
+
setTotalCoolingCapacityFunctionOfTemperatureCurve(tot_cool_cap_ft)
|
263
253
|
else
|
264
|
-
OpenStudio
|
254
|
+
OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CoilCoolingDXTwoSpeed', "For #{name}, cannot find cool_cap_ft curve, will not be set.")
|
265
255
|
successfully_set_all_properties = false
|
266
256
|
end
|
267
257
|
|
268
258
|
# Make the total COOL-CAP-FFLOW curve
|
269
|
-
tot_cool_cap_fflow =
|
259
|
+
tot_cool_cap_fflow = model.add_curve(ac_props['cool_cap_fflow'])
|
270
260
|
if tot_cool_cap_fflow
|
271
|
-
|
261
|
+
setTotalCoolingCapacityFunctionOfFlowFractionCurve(tot_cool_cap_fflow)
|
272
262
|
else
|
273
|
-
OpenStudio
|
263
|
+
OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CoilCoolingDXTwoSpeed', "For #{name}, cannot find cool_cap_fflow curve, will not be set.")
|
274
264
|
successfully_set_all_properties = false
|
275
265
|
end
|
276
|
-
|
266
|
+
|
277
267
|
# Make the COOL-EIR-FT curve
|
278
|
-
cool_eir_ft =
|
268
|
+
cool_eir_ft = model.add_curve(ac_props['cool_eir_ft'])
|
279
269
|
if cool_eir_ft
|
280
|
-
|
270
|
+
setEnergyInputRatioFunctionOfTemperatureCurve(cool_eir_ft)
|
281
271
|
else
|
282
|
-
OpenStudio
|
272
|
+
OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CoilCoolingDXTwoSpeed', "For #{name}, cannot find cool_eir_ft curve, will not be set.")
|
283
273
|
successfully_set_all_properties = false
|
284
274
|
end
|
285
275
|
|
286
276
|
# Make the COOL-EIR-FFLOW curve
|
287
|
-
cool_eir_fflow =
|
277
|
+
cool_eir_fflow = model.add_curve(ac_props['cool_eir_fflow'])
|
288
278
|
if cool_eir_fflow
|
289
|
-
|
279
|
+
setEnergyInputRatioFunctionOfFlowFractionCurve(cool_eir_fflow)
|
290
280
|
else
|
291
|
-
OpenStudio
|
281
|
+
OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CoilCoolingDXTwoSpeed', "For #{name}, cannot find cool_eir_fflow curve, will not be set.")
|
292
282
|
successfully_set_all_properties = false
|
293
283
|
end
|
294
|
-
|
284
|
+
|
295
285
|
# Make the COOL-PLF-FPLR curve
|
296
|
-
cool_plf_fplr =
|
286
|
+
cool_plf_fplr = model.add_curve(ac_props['cool_plf_fplr'])
|
297
287
|
if cool_plf_fplr
|
298
|
-
|
288
|
+
setPartLoadFractionCorrelationCurve(cool_plf_fplr)
|
299
289
|
else
|
300
|
-
OpenStudio
|
290
|
+
OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CoilCoolingDXTwoSpeed', "For #{name}, cannot find cool_plf_fplr curve, will not be set.")
|
301
291
|
successfully_set_all_properties = false
|
302
292
|
end
|
303
|
-
|
293
|
+
|
304
294
|
# Make the low speed COOL-CAP-FT curve
|
305
|
-
low_speed_cool_cap_ft =
|
295
|
+
low_speed_cool_cap_ft = model.add_curve(ac_props['cool_cap_ft'])
|
306
296
|
if low_speed_cool_cap_ft
|
307
|
-
|
297
|
+
setLowSpeedTotalCoolingCapacityFunctionOfTemperatureCurve(low_speed_cool_cap_ft)
|
308
298
|
else
|
309
|
-
OpenStudio
|
299
|
+
OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CoilCoolingDXTwoSpeed', "For #{name}, cannot find cool_cap_ft curve, will not be set.")
|
310
300
|
successfully_set_all_properties = false
|
311
301
|
end
|
312
302
|
|
313
303
|
# Make the low speed COOL-EIR-FT curve
|
314
|
-
low_speed_cool_eir_ft =
|
304
|
+
low_speed_cool_eir_ft = model.add_curve(ac_props['cool_eir_ft'])
|
315
305
|
if low_speed_cool_eir_ft
|
316
|
-
|
306
|
+
setLowSpeedEnergyInputRatioFunctionOfTemperatureCurve(low_speed_cool_eir_ft)
|
317
307
|
else
|
318
|
-
OpenStudio
|
308
|
+
OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CoilCoolingDXTwoSpeed', "For #{name}, cannot find cool_eir_ft curve, will not be set.")
|
319
309
|
successfully_set_all_properties = false
|
320
310
|
end
|
321
311
|
|
322
312
|
# Get the minimum efficiency standards
|
323
313
|
cop = nil
|
324
|
-
|
314
|
+
|
325
315
|
# If specified as SEER
|
326
316
|
unless ac_props['minimum_seasonal_energy_efficiency_ratio'].nil?
|
327
317
|
min_seer = ac_props['minimum_seasonal_energy_efficiency_ratio']
|
328
|
-
cop =
|
329
|
-
|
330
|
-
OpenStudio
|
318
|
+
cop = seer_to_cop_cooling_no_fan(min_seer)
|
319
|
+
setName("#{name} #{capacity_kbtu_per_hr.round}kBtu/hr #{min_seer}SEER")
|
320
|
+
OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.CoilCoolingDXTwoSpeed', "For #{template}: #{name}: #{cooling_type} #{heating_type} #{subcategory} Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; SEER = #{min_seer}")
|
331
321
|
end
|
332
|
-
|
322
|
+
|
333
323
|
# If specified as EER
|
334
324
|
unless ac_props['minimum_energy_efficiency_ratio'].nil?
|
335
325
|
min_eer = ac_props['minimum_energy_efficiency_ratio']
|
336
|
-
cop = eer_to_cop(min_eer)
|
337
|
-
|
338
|
-
OpenStudio
|
326
|
+
cop = eer_to_cop(min_eer, OpenStudio.convert(capacity_kbtu_per_hr, 'kBtu/hr', 'W').get)
|
327
|
+
setName("#{name} #{capacity_kbtu_per_hr.round}kBtu/hr #{min_eer}EER")
|
328
|
+
OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.CoilCoolingDXTwoSpeed', "For #{template}: #{name}: #{cooling_type} #{heating_type} #{subcategory} Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; EER = #{min_eer}")
|
339
329
|
end
|
340
330
|
|
341
331
|
# Set the efficiency values
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
return true
|
332
|
+
setRatedHighSpeedCOP(cop)
|
333
|
+
setRatedLowSpeedCOP(cop)
|
346
334
|
|
335
|
+
return true
|
347
336
|
end
|
348
|
-
|
349
337
|
end
|