openstudio-standards 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (120) hide show
  1. checksums.yaml +4 -4
  2. data/data/standards/OpenStudio_Standards.xlsx +0 -0
  3. data/data/standards/OpenStudio_Standards_boilers.json +62 -4
  4. data/data/standards/OpenStudio_Standards_chillers.json +778 -68
  5. data/data/standards/OpenStudio_Standards_construction_sets.json +52 -93
  6. data/data/standards/OpenStudio_Standards_curve_biquadratics.json +36 -36
  7. data/data/standards/OpenStudio_Standards_curve_quadratics.json +3 -3
  8. data/data/standards/OpenStudio_Standards_heat_pumps.json +840 -0
  9. data/data/standards/OpenStudio_Standards_heat_pumps_heating.json +352 -0
  10. data/data/standards/OpenStudio_Standards_heat_rejection.json +48 -0
  11. data/data/standards/OpenStudio_Standards_motors.json +270 -0
  12. data/data/standards/OpenStudio_Standards_space_types.json +10390 -2824
  13. data/data/standards/OpenStudio_Standards_unitary_acs.json +794 -18
  14. data/data/weather/USA_CO_Boulder-Broomfield-Jefferson.County.AP.724699_TMY3.ddy +538 -0
  15. data/data/weather/USA_CO_Boulder-Broomfield-Jefferson.County.AP.724699_TMY3.epw +8768 -0
  16. data/data/weather/USA_CO_Boulder-Broomfield-Jefferson.County.AP.724699_TMY3.stat +493 -0
  17. data/data/weather/USA_CO_Denver.Intl.AP.725650_TMY3.ddy +536 -0
  18. data/data/weather/USA_CO_Denver.Intl.AP.725650_TMY3.epw +8768 -0
  19. data/data/weather/USA_CO_Denver.Intl.AP.725650_TMY3.stat +554 -0
  20. data/data/weather/USA_CO_Fort.Collins.AWOS.724769_TMY3.ddy +536 -0
  21. data/data/weather/USA_CO_Fort.Collins.AWOS.724769_TMY3.epw +8768 -0
  22. data/data/weather/USA_CO_Fort.Collins.AWOS.724769_TMY3.stat +554 -0
  23. data/data/weather/envelope_info.csv +6 -0
  24. data/lib/openstudio-standards.rb +10 -11
  25. data/lib/openstudio-standards/btap/compliance.rb +251 -969
  26. data/lib/openstudio-standards/btap/envelope.rb +1 -1
  27. data/lib/openstudio-standards/btap/fileio.rb +37 -5
  28. data/lib/openstudio-standards/btap/geometry.rb +27 -17
  29. data/lib/openstudio-standards/btap/hvac.rb +80 -27
  30. data/lib/openstudio-standards/hvac_sizing/{HVACSizing.CoilHeatingDXMultiSpeed.rb → Siz.CoilHeatingDXMultiSpeed.rb} +0 -0
  31. data/lib/openstudio-standards/hvac_sizing/Siz.ControllerOutdoorAir.rb +30 -4
  32. data/lib/openstudio-standards/hvac_sizing/Siz.CoolingTowerTwoSpeed.rb +61 -5
  33. data/lib/openstudio-standards/hvac_sizing/Siz.CoolingTowerVariableSpeed.rb +37 -7
  34. data/lib/openstudio-standards/hvac_sizing/Siz.DistrictCooling.rb +27 -0
  35. data/lib/openstudio-standards/hvac_sizing/Siz.DistrictHeating.rb +27 -0
  36. data/lib/openstudio-standards/hvac_sizing/Siz.HeaderedPumpsConstantSpeed.rb +55 -0
  37. data/lib/openstudio-standards/hvac_sizing/Siz.HeaderedPumpsVariableSpeed.rb +55 -0
  38. data/lib/openstudio-standards/hvac_sizing/Siz.HeatingCoolingFuels.rb +51 -9
  39. data/lib/openstudio-standards/hvac_sizing/Siz.Model.rb +99 -17
  40. data/lib/openstudio-standards/hvac_sizing/Siz.PumpConstantSpeed.rb +1 -1
  41. data/lib/openstudio-standards/hvac_sizing/Siz.ThermalZone.rb +29 -6
  42. data/lib/openstudio-standards/hvac_sizing/Siz.WaterHeaterMixed.rb +16 -0
  43. data/lib/openstudio-standards/prototypes/Prototype.AirTerminalSingleDuctVAVReheat.rb +43 -48
  44. data/lib/openstudio-standards/prototypes/Prototype.ControllerWaterCoil.rb +5 -9
  45. data/lib/openstudio-standards/prototypes/Prototype.Fan.rb +68 -0
  46. data/lib/openstudio-standards/prototypes/Prototype.FanConstantVolume.rb +39 -43
  47. data/lib/openstudio-standards/prototypes/Prototype.FanOnOff.rb +49 -51
  48. data/lib/openstudio-standards/prototypes/Prototype.FanVariableVolume.rb +55 -61
  49. data/lib/openstudio-standards/prototypes/Prototype.FanZoneExhaust.rb +8 -10
  50. data/lib/openstudio-standards/prototypes/Prototype.HeatExchangerAirToAirSensibleAndLatent.rb +15 -20
  51. data/lib/openstudio-standards/prototypes/Prototype.Model.hvac.rb +330 -322
  52. data/lib/openstudio-standards/prototypes/Prototype.Model.rb +501 -446
  53. data/lib/openstudio-standards/prototypes/Prototype.Model.swh.rb +221 -230
  54. data/lib/openstudio-standards/prototypes/Prototype.add_objects.rb +0 -2
  55. data/lib/openstudio-standards/prototypes/Prototype.full_service_restaurant.rb +130 -137
  56. data/lib/openstudio-standards/prototypes/Prototype.high_rise_apartment.rb +374 -291
  57. data/lib/openstudio-standards/prototypes/Prototype.hospital.rb +146 -193
  58. data/lib/openstudio-standards/prototypes/Prototype.hvac_systems.rb +1315 -1113
  59. data/lib/openstudio-standards/prototypes/Prototype.large_hotel.rb +65 -88
  60. data/lib/openstudio-standards/prototypes/Prototype.large_office.rb +101 -156
  61. data/lib/openstudio-standards/prototypes/Prototype.medium_office.rb +46 -96
  62. data/lib/openstudio-standards/prototypes/Prototype.mid_rise_apartment.rb +113 -123
  63. data/lib/openstudio-standards/prototypes/Prototype.outpatient.rb +356 -345
  64. data/lib/openstudio-standards/prototypes/Prototype.primary_school.rb +48 -103
  65. data/lib/openstudio-standards/prototypes/Prototype.quick_service_restaurant.rb +115 -123
  66. data/lib/openstudio-standards/prototypes/Prototype.retail_standalone.rb +30 -39
  67. data/lib/openstudio-standards/prototypes/Prototype.retail_stripmall.rb +32 -45
  68. data/lib/openstudio-standards/prototypes/Prototype.secondary_school.rb +98 -258
  69. data/lib/openstudio-standards/prototypes/Prototype.small_hotel.rb +429 -474
  70. data/lib/openstudio-standards/prototypes/Prototype.small_office.rb +28 -36
  71. data/lib/openstudio-standards/prototypes/Prototype.strip_model.rb +7 -7
  72. data/lib/openstudio-standards/prototypes/Prototype.utilities.rb +172 -146
  73. data/lib/openstudio-standards/prototypes/Prototype.warehouse.rb +46 -53
  74. data/lib/openstudio-standards/standards/Standards.AirLoopHVAC.rb +885 -707
  75. data/lib/openstudio-standards/standards/Standards.AirTerminalSingleDuctParallelPIUReheat.rb +48 -57
  76. data/lib/openstudio-standards/standards/Standards.AirTerminalSingleDuctVAVReheat.rb +24 -31
  77. data/lib/openstudio-standards/standards/Standards.BoilerHotWater.rb +80 -93
  78. data/lib/openstudio-standards/standards/Standards.BuildingStory.rb +69 -0
  79. data/lib/openstudio-standards/standards/Standards.ChillerElectricEIR.rb +60 -72
  80. data/lib/openstudio-standards/standards/Standards.CoilCoolingDXMultiSpeed.rb +104 -108
  81. data/lib/openstudio-standards/standards/Standards.CoilCoolingDXSingleSpeed.rb +190 -198
  82. data/lib/openstudio-standards/standards/Standards.CoilCoolingDXTwoSpeed.rb +134 -146
  83. data/lib/openstudio-standards/standards/Standards.CoilHeatingDXMultiSpeed.rb +56 -60
  84. data/lib/openstudio-standards/standards/Standards.CoilHeatingDXSingleSpeed.rb +151 -161
  85. data/lib/openstudio-standards/standards/Standards.CoilHeatingGasMultiStage.rb +30 -34
  86. data/lib/openstudio-standards/standards/Standards.Construction.rb +116 -132
  87. data/lib/openstudio-standards/standards/Standards.CoolingTower.rb +138 -0
  88. data/lib/openstudio-standards/standards/Standards.CoolingTowerSingleSpeed.rb +11 -0
  89. data/lib/openstudio-standards/standards/Standards.CoolingTowerTwoSpeed.rb +11 -0
  90. data/lib/openstudio-standards/standards/Standards.CoolingTowerVariableSpeed.rb +16 -0
  91. data/lib/openstudio-standards/standards/Standards.Fan.rb +190 -236
  92. data/lib/openstudio-standards/standards/Standards.FanConstantVolume.rb +0 -2
  93. data/lib/openstudio-standards/standards/Standards.FanOnOff.rb +0 -2
  94. data/lib/openstudio-standards/standards/Standards.FanVariableVolume.rb +168 -14
  95. data/lib/openstudio-standards/standards/Standards.FanZoneExhaust.rb +0 -2
  96. data/lib/openstudio-standards/standards/Standards.HeaderedPumpsConstantSpeed.rb +33 -0
  97. data/lib/openstudio-standards/standards/Standards.HeaderedPumpsVariableSpeed.rb +83 -0
  98. data/lib/openstudio-standards/standards/Standards.HeatExchangerSensLat.rb +22 -0
  99. data/lib/openstudio-standards/standards/Standards.Model.rb +2385 -1622
  100. data/lib/openstudio-standards/standards/Standards.PlanarSurface.rb +83 -35
  101. data/lib/openstudio-standards/standards/Standards.PlantLoop.rb +805 -395
  102. data/lib/openstudio-standards/standards/Standards.Pump.rb +139 -119
  103. data/lib/openstudio-standards/standards/Standards.PumpConstantSpeed.rb +0 -2
  104. data/lib/openstudio-standards/standards/Standards.PumpVariableSpeed.rb +16 -15
  105. data/lib/openstudio-standards/standards/Standards.ScheduleCompact.rb +35 -0
  106. data/lib/openstudio-standards/standards/Standards.ScheduleConstant.rb +7 -13
  107. data/lib/openstudio-standards/standards/Standards.ScheduleRuleset.rb +144 -59
  108. data/lib/openstudio-standards/standards/Standards.Space.rb +1509 -1326
  109. data/lib/openstudio-standards/standards/Standards.SpaceType.rb +254 -262
  110. data/lib/openstudio-standards/standards/Standards.SubSurface.rb +105 -105
  111. data/lib/openstudio-standards/standards/Standards.Surface.rb +27 -31
  112. data/lib/openstudio-standards/standards/Standards.ThermalZone.rb +882 -157
  113. data/lib/openstudio-standards/standards/Standards.WaterHeaterMixed.rb +179 -69
  114. data/lib/openstudio-standards/standards/Standards.ZoneHVACComponent.rb +75 -0
  115. data/lib/openstudio-standards/utilities/logging.rb +31 -38
  116. data/lib/openstudio-standards/utilities/simulation.rb +118 -82
  117. data/lib/openstudio-standards/version.rb +1 -1
  118. data/lib/openstudio-standards/weather/Weather.Model.rb +382 -390
  119. data/lib/openstudio-standards/weather/Weather.stat_file.rb +159 -78
  120. metadata +59 -6
@@ -1,6 +1,75 @@
1
1
 
2
2
  # open the class to add methods to apply HVAC efficiency standards
3
3
  class OpenStudio::Model::BuildingStory
4
+ # Checks all spaces on this story that are part of the total
5
+ # floor area to see if they have the same multiplier.
6
+ # If they do, assume that the multipliers are being used
7
+ # as a floor multiplier.
8
+ #
9
+ # @return [Integer] return the floor multiplier for this story,
10
+ # returning 1 if no floor multiplier.
11
+ def floor_multiplier
12
+ floor_multiplier = 1
4
13
 
14
+ # Determine the multipliers for all spaces
15
+ multipliers = []
16
+ spaces.each do |space|
17
+ # Ignore spaces that aren't part of the total floor area
18
+ next unless space.partofTotalFloorArea
19
+ multipliers << space.multiplier
20
+ end
5
21
 
22
+ # If there are no spaces on this story, assume
23
+ # a multiplier of 1
24
+ if multipliers.size.zero?
25
+ return floor_multiplier
26
+ end
27
+
28
+ # Calculate the average multiplier and
29
+ # then convert to integer.
30
+ avg_multiplier = (multipliers.inject { |a, e| a + e }.to_f / multipliers.size).to_i
31
+
32
+ # If the multiplier is greater than 1, report this
33
+ if avg_multiplier > 1
34
+ floor_multiplier = avg_multiplier
35
+ OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.BuildingStory', "Story #{name} has a multiplier of #{floor_multiplier}.")
36
+ end
37
+
38
+ return floor_multiplier
39
+ end
40
+
41
+ # Gets the minimum z-value of the story.
42
+ # This is considered to be the minimum z value
43
+ # of any vertex of any surface of any space on the
44
+ # story, with the exception of plenum spaces.
45
+ #
46
+ # @return [Double] the minimum z-value, in m
47
+ def minimum_z_value
48
+ z_heights = []
49
+ spaces.each do |space|
50
+ # Skip plenum spaces
51
+ next if space.plenum?
52
+
53
+ # Get the z value of the space, which
54
+ # vertices in space surfaces are relative to.
55
+ z_origin = space.zOrigin
56
+
57
+ # loop through space surfaces to find min z value
58
+ space.surfaces.each do |surface|
59
+ surface.vertices.each do |vertex|
60
+ z_heights << vertex.z + z_origin
61
+ end
62
+ end
63
+ end
64
+
65
+ # Error if no z heights were found
66
+ z = 999.9
67
+ if z_heights.size > 0
68
+ z = z_heights.min
69
+ else
70
+ OpenStudio.logFree(OpenStudio::Error, 'openstudio.standards.Model', "For #{name} could not find the minimum_z_value, which means the story has no spaces assigned or the spaces have no surfaces.")
71
+ end
72
+
73
+ return z
74
+ end
6
75
  end
@@ -1,21 +1,19 @@
1
1
 
2
2
  # Reopen the OpenStudio class to add methods to apply standards to this object
3
3
  class OpenStudio::Model::ChillerElectricEIR
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 = self.condenserType
13
+ cooling_type = condenserType
16
14
  search_criteria['cooling_type'] = cooling_type
17
15
 
18
- # TODO Standards replace this with a mechanism to store this
16
+ # TODO: Standards replace this with a mechanism to store this
19
17
  # data in the chiller object itself.
20
18
  # For now, retrieve the condenser type from the name
21
19
  name = self.name.get
@@ -32,7 +30,7 @@ class OpenStudio::Model::ChillerElectricEIR
32
30
  compressor_type = 'Reciprocating'
33
31
  elsif name.include?('Rotary Screw')
34
32
  compressor_type = 'Rotary Screw'
35
- elsif name.include?('Scroll')
33
+ elsif name.include?('Scroll')
36
34
  compressor_type = 'Scroll'
37
35
  elsif name.include?('Centrifugal')
38
36
  compressor_type = 'Centrifugal'
@@ -46,31 +44,27 @@ class OpenStudio::Model::ChillerElectricEIR
46
44
  end
47
45
 
48
46
  return search_criteria
49
-
50
47
  end
51
48
 
52
49
  # Finds capacity in tons
53
50
  #
54
51
  # @return [Double] capacity in tons to be used for find object
55
- def find_capacity()
56
-
52
+ def find_capacity
57
53
  # Get the chiller capacity
58
54
  capacity_w = nil
59
- if self.referenceCapacity.is_initialized
60
- capacity_w = self.referenceCapacity.get
61
- elsif self.autosizedReferenceCapacity.is_initialized
62
- capacity_w = self.autosizedReferenceCapacity.get
55
+ if referenceCapacity.is_initialized
56
+ capacity_w = referenceCapacity.get
57
+ elsif autosizedReferenceCapacity.is_initialized
58
+ capacity_w = autosizedReferenceCapacity.get
63
59
  else
64
- OpenStudio::logFree(OpenStudio::Warn, "openstudio.standards.ChillerElectricEIR", "For #{self.name} capacity is not available, cannot apply efficiency standard.")
60
+ OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.ChillerElectricEIR', "For #{name} capacity is not available, cannot apply efficiency standard.")
65
61
  successfully_set_all_properties = false
66
62
  return successfully_set_all_properties
67
63
  end
68
64
 
69
- capacity_tons = OpenStudio.convert(capacity_w, "W", "ton").get
70
-
65
+ capacity_tons = OpenStudio.convert(capacity_w, 'W', 'ton').get
71
66
 
72
67
  return capacity_tons
73
-
74
68
  end
75
69
 
76
70
  # Finds lookup object in standards and return full load efficiency
@@ -78,12 +72,11 @@ class OpenStudio::Model::ChillerElectricEIR
78
72
  # @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'
79
73
  # @param standards [Hash] the OpenStudio_Standards spreadsheet in hash format
80
74
  # @return [Double] full load efficiency (COP)
81
- def standard_minimum_full_load_efficiency(template,standards)
82
-
75
+ def standard_minimum_full_load_efficiency(template, standards)
83
76
  # Get the chiller properties
84
- search_criteria = self.find_search_criteria(template)
85
- capacity_tons = self.find_capacity
86
- chlr_props = self.model.find_object(standards['chillers'], search_criteria, capacity_tons)
77
+ search_criteria = find_search_criteria(template)
78
+ capacity_tons = find_capacity
79
+ chlr_props = model.find_object(standards['chillers'], search_criteria, capacity_tons, Date.today)
87
80
 
88
81
  # lookup the efficiency value
89
82
  kw_per_ton = nil
@@ -92,11 +85,10 @@ class OpenStudio::Model::ChillerElectricEIR
92
85
  kw_per_ton = chlr_props['minimum_full_load_efficiency']
93
86
  cop = kw_per_ton_to_cop(kw_per_ton)
94
87
  else
95
- OpenStudio::logFree(OpenStudio::Warn, "openstudio.standards.ChillerElectricEIR", "For #{self.name}, cannot find minimum full load efficiency.")
88
+ OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.ChillerElectricEIR', "For #{name}, cannot find minimum full load efficiency.")
96
89
  end
97
90
 
98
91
  return cop
99
-
100
92
  end
101
93
 
102
94
  # Applies the standard efficiency ratings and typical performance curves to this object.
@@ -104,22 +96,20 @@ class OpenStudio::Model::ChillerElectricEIR
104
96
  # @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
97
  # @param standards [Hash] the OpenStudio_Standards spreadsheet in hash format
106
98
  # @return [Bool] true if successful, false if not
107
- def setStandardEfficiencyAndCurves(template, clg_tower_objs)
108
-
99
+ def apply_efficiency_and_curves(template, clg_tower_objs)
109
100
  chillers = $os_standards['chillers']
110
101
  curve_biquadratics = $os_standards['curve_biquadratics']
111
102
  curve_quadratics = $os_standards['curve_quadratics']
112
103
  curve_bicubics = $os_standards['curve_bicubics']
113
104
 
114
-
115
105
  # Define the criteria to find the chiller properties
116
106
  # in the hvac standards data set.
117
107
  search_criteria = {}
118
108
  search_criteria['template'] = template
119
- cooling_type = self.condenserType
109
+ cooling_type = condenserType
120
110
  search_criteria['cooling_type'] = cooling_type
121
111
 
122
- # TODO Standards replace this with a mechanism to store this
112
+ # TODO: Standards replace this with a mechanism to store this
123
113
  # data in the chiller object itself.
124
114
  # For now, retrieve the condenser type from the name
125
115
  name = self.name.get
@@ -136,7 +126,7 @@ class OpenStudio::Model::ChillerElectricEIR
136
126
  compressor_type = 'Reciprocating'
137
127
  elsif name.include?('Rotary Screw')
138
128
  compressor_type = 'Rotary Screw'
139
- elsif name.include?('Scroll')
129
+ elsif name.include?('Scroll')
140
130
  compressor_type = 'Scroll'
141
131
  elsif name.include?('Centrifugal')
142
132
  compressor_type = 'Centrifugal'
@@ -151,73 +141,73 @@ class OpenStudio::Model::ChillerElectricEIR
151
141
 
152
142
  # Get the chiller capacity
153
143
  capacity_w = nil
154
- if self.referenceCapacity.is_initialized
155
- capacity_w = self.referenceCapacity.get
156
- elsif self.autosizedReferenceCapacity.is_initialized
157
- capacity_w = self.autosizedReferenceCapacity.get
144
+ if referenceCapacity.is_initialized
145
+ capacity_w = referenceCapacity.get
146
+ elsif autosizedReferenceCapacity.is_initialized
147
+ capacity_w = autosizedReferenceCapacity.get
158
148
  else
159
- OpenStudio::logFree(OpenStudio::Warn, "openstudio.standards.ChillerElectricEIR", "For #{self.name} capacity is not available, cannot apply efficiency standard.")
149
+ OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.ChillerElectricEIR', "For #{self.name} capacity is not available, cannot apply efficiency standard.")
160
150
  successfully_set_all_properties = false
161
151
  return successfully_set_all_properties
162
152
  end
163
153
 
164
- #NECB 2011 requires that all chillers be modulating down to 25% of their capacity
154
+ # NECB 2011 requires that all chillers be modulating down to 25% of their capacity
165
155
  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')
156
+ setChillerFlowMode('LeavingSetpointModulated')
157
+ setMinimumPartLoadRatio(0.25)
158
+ setMinimumUnloadingRatio(0.25)
159
+ if (capacity_w / 1000.0) < 2100.0
160
+ if self.name.to_s.include? 'Primary Chiller'
171
161
  chiller_capacity = capacity_w
172
- elsif(self.name.to_s.include? 'Secondary Chiller')
162
+ elsif self.name.to_s.include? 'Secondary Chiller'
173
163
  chiller_capacity = 0.001
174
164
  end
175
165
  else
176
- chiller_capacity = capacity_w/2.0
166
+ chiller_capacity = capacity_w / 2.0
177
167
  end
178
- self.setReferenceCapacity(chiller_capacity)
179
- end # NECB 2011
168
+ setReferenceCapacity(chiller_capacity)
169
+ end # NECB 2011
180
170
 
181
171
  # Convert capacity to tons
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
172
+ capacity_tons = if template == 'NECB 2011'
173
+ OpenStudio.convert(chiller_capacity, 'W', 'ton').get
174
+ else
175
+ OpenStudio.convert(capacity_w, 'W', 'ton').get
176
+ end
187
177
 
188
178
  # Get the chiller properties
189
- chlr_props = self.model.find_object(chillers, search_criteria, capacity_tons)
190
- if !chlr_props
191
- OpenStudio::logFree(OpenStudio::Warn, "openstudio.standards.ChillerElectricEIR", "For #{self.name}, cannot find chiller properties, cannot apply standard efficiencies or curves.")
179
+ chlr_props = model.find_object(chillers, search_criteria, capacity_tons, Date.today)
180
+ unless chlr_props
181
+ OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.ChillerElectricEIR', "For #{self.name}, cannot find chiller properties, cannot apply standard efficiencies or curves.")
192
182
  successfully_set_all_properties = false
193
183
  return successfully_set_all_properties
194
184
  end
195
185
 
196
186
  # Make the CAPFT curve
197
- cool_cap_ft = self.model.add_curve(chlr_props['capft'])
187
+ cool_cap_ft = model.add_curve(chlr_props['capft'])
198
188
  if cool_cap_ft
199
- self.setCoolingCapacityFunctionOfTemperature(cool_cap_ft)
189
+ setCoolingCapacityFunctionOfTemperature(cool_cap_ft)
200
190
  else
201
- OpenStudio::logFree(OpenStudio::Warn, "openstudio.standards.ChillerElectricEIR", "For #{self.name}, cannot find cool_cap_ft curve, will not be set.")
191
+ OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.ChillerElectricEIR', "For #{self.name}, cannot find cool_cap_ft curve, will not be set.")
202
192
  successfully_set_all_properties = false
203
193
  end
204
194
 
205
195
  # Make the EIRFT curve
206
- cool_eir_ft = self.model.add_curve(chlr_props['eirft'])
196
+ cool_eir_ft = model.add_curve(chlr_props['eirft'])
207
197
  if cool_eir_ft
208
- self.setElectricInputToCoolingOutputRatioFunctionOfTemperature(cool_eir_ft)
198
+ setElectricInputToCoolingOutputRatioFunctionOfTemperature(cool_eir_ft)
209
199
  else
210
- OpenStudio::logFree(OpenStudio::Warn, "openstudio.standards.ChillerElectricEIR", "For #{self.name}, cannot find cool_eir_ft curve, will not be set.")
200
+ OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.ChillerElectricEIR', "For #{self.name}, cannot find cool_eir_ft curve, will not be set.")
211
201
  successfully_set_all_properties = false
212
202
  end
213
203
 
214
204
  # Make the EIRFPLR curve
215
205
  # which may be either a CurveBicubic or a CurveQuadratic based on chiller type
216
- cool_plf_fplr = self.model.add_curve(chlr_props['eirfplr'])
206
+ cool_plf_fplr = model.add_curve(chlr_props['eirfplr'])
217
207
  if cool_plf_fplr
218
- self.setElectricInputToCoolingOutputRatioFunctionOfPLR(cool_plf_fplr)
208
+ setElectricInputToCoolingOutputRatioFunctionOfPLR(cool_plf_fplr)
219
209
  else
220
- OpenStudio::logFree(OpenStudio::Warn, "openstudio.standards.ChillerElectricEIR", "For #{self.name}, cannot find cool_plf_fplr curve, will not be set.")
210
+ OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.ChillerElectricEIR', "For #{self.name}, cannot find cool_plf_fplr curve, will not be set.")
221
211
  successfully_set_all_properties = false
222
212
  end
223
213
 
@@ -227,32 +217,30 @@ class OpenStudio::Model::ChillerElectricEIR
227
217
  if chlr_props['minimum_full_load_efficiency']
228
218
  kw_per_ton = chlr_props['minimum_full_load_efficiency']
229
219
  cop = kw_per_ton_to_cop(kw_per_ton)
230
- self.setReferenceCOP(cop)
220
+ setReferenceCOP(cop)
231
221
  else
232
- OpenStudio::logFree(OpenStudio::Warn, "openstudio.standards.ChillerElectricEIR", "For #{self.name}, cannot find minimum full load efficiency, will not be set.")
222
+ OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.ChillerElectricEIR', "For #{self.name}, cannot find minimum full load efficiency, will not be set.")
233
223
  successfully_set_all_properties = false
234
224
  end
235
225
 
236
226
  # Set cooling tower properties for NECB 2011 now that the new COP of the chiller is set
237
227
  if template == 'NECB 2011'
238
- if(self.name.to_s.include? 'Primary Chiller')
228
+ if self.name.to_s.include? 'Primary Chiller'
239
229
  # 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)
230
+ tower_cap = capacity_w * (1.0 + 1.0 / referenceCOP)
231
+ if (tower_cap / 1000.0) < 1750
242
232
  clg_tower_objs[0].setNumberofCells(1)
243
233
  else
244
- clg_tower_objs[0].setNumberofCells((tower_cap/(1000*1750)+0.5).round)
234
+ clg_tower_objs[0].setNumberofCells((tower_cap / (1000 * 1750) + 0.5).round)
245
235
  end
246
- clg_tower_objs[0].setFanPoweratDesignAirFlowRate(0.015*tower_cap)
236
+ clg_tower_objs[0].setFanPoweratDesignAirFlowRate(0.015 * tower_cap)
247
237
  end
248
238
  end
249
239
 
250
240
  # Append the name with size and kw/ton
251
- self.setName("#{name} #{capacity_tons.round}tons #{kw_per_ton.round(1)}kW/ton")
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)")
241
+ setName("#{name} #{capacity_tons.round}tons #{kw_per_ton.round(1)}kW/ton")
242
+ 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)")
253
243
 
254
244
  return successfully_set_all_properties
255
-
256
245
  end
257
-
258
246
  end
@@ -1,16 +1,14 @@
1
1
 
2
2
  # Reopen the OpenStudio class to add methods to apply standards to this object
3
3
  class OpenStudio::Model::CoilCoolingDXMultiSpeed
4
-
5
4
  # Applies the standard efficiency ratings and typical performance curves to this object.
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
  # @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
-
8
+ # @return [Bool] true if successful, false if not
9
+ def apply_efficiency_and_curves(template, standards, sql_db_vars_map)
12
10
  successfully_set_all_properties = true
13
-
11
+
14
12
  unitary_acs = standards['unitary_acs']
15
13
  heat_pumps = standards['heat_pumps']
16
14
 
@@ -18,40 +16,40 @@ class OpenStudio::Model::CoilCoolingDXMultiSpeed
18
16
  # in the hvac standards data set.
19
17
  search_criteria = {}
20
18
  search_criteria['template'] = template
21
- cooling_type = self.condenserType
19
+ cooling_type = condenserType
22
20
  search_criteria['cooling_type'] = cooling_type
23
21
 
24
- # TODO Standards - add split system vs single package to model
22
+ # TODO: Standards - add split system vs single package to model
25
23
  # For now, assume single package as default
26
24
  subcategory = 'Single Package'
27
-
25
+
28
26
  # Determine the heating type if unitary or zone hvac
29
27
  heat_pump = false
30
28
  heating_type = nil
31
29
  containing_comp = nil
32
- if self.airLoopHVAC.empty?
33
- if self.containingHVACComponent.is_initialized
30
+ if airLoopHVAC.empty?
31
+ if containingHVACComponent.is_initialized
34
32
  containing_comp = containingHVACComponent.get
35
33
  if containing_comp.to_AirLoopHVACUnitaryHeatPumpAirToAirMultiSpeed.is_initialized
36
34
  htg_coil = containing_comp.to_AirLoopHVACUnitaryHeatPumpAirToAirMultiSpeed.get.heatingCoil
37
- if(htg_coil.to_CoilHeatingDXMultiSpeed.is_initialized)
35
+ if htg_coil.to_CoilHeatingDXMultiSpeed.is_initialized
38
36
  heat_pump = true
39
37
  heating_type = 'Electric Resistance or None'
40
- elsif(htg_coil.to_CoilHeatingGasMultiStage.is_initialized)
38
+ elsif htg_coil.to_CoilHeatingGasMultiStage.is_initialized
41
39
  heating_type = 'All Other'
42
- end
43
- end # TODO Add other unitary systems
44
- elsif self.containingZoneHVACComponent.is_initialized
40
+ end
41
+ end # TODO: Add other unitary systems
42
+ elsif containingZoneHVACComponent.is_initialized
45
43
  containing_comp = containingZoneHVACComponent.get
46
44
  if containing_comp.to_ZoneHVACPackagedTerminalAirConditioner.is_initialized
47
45
  subcategory = 'PTAC'
48
46
  htg_coil = containing_comp.to_ZoneHVACPackagedTerminalAirConditioner.get.heatingCoil
49
47
  if htg_coil.to_CoilHeatingElectric.is_initialized
50
- heating_type = 'Electric Resistance or None'
48
+ heating_type = 'Electric Resistance or None'
51
49
  elsif htg_coil.to_CoilHeatingWater.is_initialized || htg_coil.to_CoilHeatingGas.is_initialized || htg_col.to_CoilHeatingGasMultiStage
52
50
  heating_type = 'All Other'
53
- end
54
- end # TODO Add other zone hvac systems
51
+ end
52
+ end # TODO: Add other zone hvac systems
55
53
  end
56
54
  end
57
55
 
@@ -61,184 +59,184 @@ class OpenStudio::Model::CoilCoolingDXMultiSpeed
61
59
  end
62
60
 
63
61
  search_criteria['subcategory'] = subcategory
64
-
62
+
65
63
  # Get the coil capacity
66
64
  capacity_w = nil
67
- clg_stages = self.stages
65
+ clg_stages = stages
68
66
  if clg_stages.last.grossRatedTotalCoolingCapacity.is_initialized
69
67
  capacity_w = clg_stages.last.grossRatedTotalCoolingCapacity.get
70
- elsif self.autosizedSpeed4GrossRatedTotalCoolingCapacity.is_initialized
71
- capacity_w = self.autosizedSpeed4GrossRatedTotalCoolingCapacity.get
68
+ elsif autosizedSpeed4GrossRatedTotalCoolingCapacity.is_initialized
69
+ capacity_w = autosizedSpeed4GrossRatedTotalCoolingCapacity.get
72
70
  else
73
- OpenStudio::logFree(OpenStudio::Warn, 'openstudio.standards.CoilCoolingDXMultiSpeed', "For #{self.name} capacity is not available, cannot apply efficiency standard.")
71
+ OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CoilCoolingDXMultiSpeed', "For #{name} capacity is not available, cannot apply efficiency standard.")
74
72
  successfully_set_all_properties = false
75
73
  return successfully_set_all_properties
76
- end
74
+ end
77
75
 
78
76
  # Volume flow rate
79
77
  flow_rate4 = nil
80
78
  if clg_stages.last.ratedAirFlowRate.is_initialized
81
79
  flow_rate4 = clg_stages.last.ratedAirFlowRate.get
82
- elsif self.autosizedSpeed4RatedAirFlowRate.is_initialized
83
- flow_rate4 = self.autosizedSpeed4RatedAirFlowRate.get
80
+ elsif autosizedSpeed4RatedAirFlowRate.is_initialized
81
+ flow_rate4 = autosizedSpeed4RatedAirFlowRate.get
84
82
  end
85
83
 
86
84
  # Set number of stages for NECB 2011
87
- if(template == 'NECB 2011')
85
+ if template == 'NECB 2011'
88
86
  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
87
+ num_stages = (capacity_w / (66.0 * 1000.0) + 0.5).round
88
+ num_stages = [num_stages, 4].min
89
+ if num_stages == 1
90
+ stage_cap[0] = capacity_w / 2.0
91
+ stage_cap[1] = 2.0 * stage_cap[0]
92
+ stage_cap[2] = stage_cap[1] + 0.1
93
+ stage_cap[3] = stage_cap[2] + 0.1
96
94
  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]
95
+ stage_cap[0] = 66.0 * 1000.0
96
+ stage_cap[1] = 2.0 * stage_cap[0]
97
+ if num_stages == 2
98
+ stage_cap[2] = stage_cap[1] + 0.1
99
+ stage_cap[3] = stage_cap[2] + 0.1
100
+ elsif num_stages == 3
101
+ stage_cap[2] = 3.0 * stage_cap[0]
102
+ stage_cap[3] = stage_cap[2] + 0.1
103
+ elsif num_stages == 4
104
+ stage_cap[2] = 3.0 * stage_cap[0]
105
+ stage_cap[3] = 4.0 * stage_cap[0]
108
106
  end
109
107
  end
110
108
  # set capacities, flow rates, and sensible heat ratio for stages
111
- for istage in 0..3
109
+ (0..3).each do |istage|
112
110
  clg_stages[istage].setGrossRatedTotalCoolingCapacity(stage_cap[istage])
113
- clg_stages[istage].setRatedAirFlowRate(flow_rate4*stage_cap[istage]/capacity_w)
114
- end
111
+ clg_stages[istage].setRatedAirFlowRate(flow_rate4 * stage_cap[istage] / capacity_w)
112
+ end
115
113
  end
116
-
114
+
117
115
  # 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
-
116
+ capacity_btu_per_hr = OpenStudio.convert(capacity_w, 'W', 'Btu/hr').get
117
+ capacity_kbtu_per_hr = OpenStudio.convert(capacity_w, 'W', 'kBtu/hr').get
118
+
121
119
  # Lookup efficiencies depending on whether it is a unitary AC or a heat pump
122
120
  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
121
+ ac_props = if heat_pump == true
122
+ model.find_object(heat_pumps, search_criteria, capacity_btu_per_hr, Date.today)
123
+ else
124
+ model.find_object(unitary_acs, search_criteria, capacity_btu_per_hr, Date.today)
125
+ end
128
126
 
129
127
  # Check to make sure properties were found
130
128
  if ac_props.nil?
131
- OpenStudio::logFree(OpenStudio::Warn, 'openstudio.standards.CoilCoolingDXMultiSpeed', "For #{self.name}, cannot find efficiency info, cannot apply efficiency standard.")
129
+ OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CoilCoolingDXMultiSpeed', "For #{name}, cannot find efficiency info, cannot apply efficiency standard.")
132
130
  successfully_set_all_properties = false
133
131
  return successfully_set_all_properties
134
132
  end
135
133
 
136
134
  # Make the COOL-CAP-FT curve
137
- cool_cap_ft = self.model.add_curve(ac_props["cool_cap_ft"], standards)
135
+ cool_cap_ft = model.add_curve(ac_props['cool_cap_ft'], standards)
138
136
  if cool_cap_ft
139
- clg_stages.each do |istage|
140
- istage.setTotalCoolingCapacityFunctionofTemperatureCurve(cool_cap_ft)
137
+ clg_stages.each do |stage|
138
+ stage.setTotalCoolingCapacityFunctionofTemperatureCurve(cool_cap_ft)
141
139
  end
142
140
  else
143
- OpenStudio::logFree(OpenStudio::Warn, 'openstudio.standards.CoilCoolingDXMultiSpeed', "For #{self.name}, cannot find cool_cap_ft curve, will not be set.")
141
+ OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CoilCoolingDXMultiSpeed', "For #{name}, cannot find cool_cap_ft curve, will not be set.")
144
142
  successfully_set_all_properties = false
145
143
  end
146
144
 
147
145
  # Make the COOL-CAP-FFLOW curve
148
- cool_cap_fflow = self.model.add_curve(ac_props["cool_cap_fflow"], standards)
146
+ cool_cap_fflow = model.add_curve(ac_props['cool_cap_fflow'], standards)
149
147
  if cool_cap_fflow
150
- clg_stages.each do |istage|
151
- istage.setTotalCoolingCapacityFunctionofFlowFractionCurve(cool_cap_fflow)
148
+ clg_stages.each do |stage|
149
+ stage.setTotalCoolingCapacityFunctionofFlowFractionCurve(cool_cap_fflow)
152
150
  end
153
151
  else
154
- OpenStudio::logFree(OpenStudio::Warn, 'openstudio.standards.CoilCoolingDXMultiSpeed', "For #{self.name}, cannot find cool_cap_fflow curve, will not be set.")
152
+ OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CoilCoolingDXMultiSpeed', "For #{name}, cannot find cool_cap_fflow curve, will not be set.")
155
153
  successfully_set_all_properties = false
156
154
  end
157
-
155
+
158
156
  # Make the COOL-EIR-FT curve
159
- cool_eir_ft = self.model.add_curve(ac_props["cool_eir_ft"], standards)
157
+ cool_eir_ft = model.add_curve(ac_props['cool_eir_ft'], standards)
160
158
  if cool_eir_ft
161
- clg_stages.each do |istage|
162
- istage.setEnergyInputRatioFunctionofTemperatureCurve(cool_eir_ft)
159
+ clg_stages.each do |stage|
160
+ stage.setEnergyInputRatioFunctionofTemperatureCurve(cool_eir_ft)
163
161
  end
164
162
  else
165
- OpenStudio::logFree(OpenStudio::Warn, 'openstudio.standards.CoilCoolingDXMultiSpeed', "For #{self.name}, cannot find cool_eir_ft curve, will not be set.")
163
+ OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CoilCoolingDXMultiSpeed', "For #{name}, cannot find cool_eir_ft curve, will not be set.")
166
164
  successfully_set_all_properties = false
167
165
  end
168
166
 
169
167
  # Make the COOL-EIR-FFLOW curve
170
- cool_eir_fflow = self.model.add_curve(ac_props["cool_eir_fflow"], standards)
168
+ cool_eir_fflow = model.add_curve(ac_props['cool_eir_fflow'], standards)
171
169
  if cool_eir_fflow
172
- clg_stages.each do |istage|
173
- istage.setEnergyInputRatioFunctionofFlowFractionCurve(cool_eir_fflow)
170
+ clg_stages.each do |stage|
171
+ stage.setEnergyInputRatioFunctionofFlowFractionCurve(cool_eir_fflow)
174
172
  end
175
173
  else
176
- OpenStudio::logFree(OpenStudio::Warn, 'openstudio.standards.CoilCoolingDXMultiSpeed', "For #{self.name}, cannot find cool_eir_fflow curve, will not be set.")
174
+ OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CoilCoolingDXMultiSpeed', "For #{name}, cannot find cool_eir_fflow curve, will not be set.")
177
175
  successfully_set_all_properties = false
178
176
  end
179
-
177
+
180
178
  # Make the COOL-PLF-FPLR curve
181
- cool_plf_fplr = self.model.add_curve(ac_props["cool_plf_fplr"], standards)
179
+ cool_plf_fplr = model.add_curve(ac_props['cool_plf_fplr'], standards)
182
180
  if cool_plf_fplr
183
- clg_stages.each do |istage|
184
- istage.setPartLoadFractionCorrelationCurve(cool_plf_fplr)
181
+ clg_stages.each do |stage|
182
+ stage.setPartLoadFractionCorrelationCurve(cool_plf_fplr)
185
183
  end
186
184
  else
187
- OpenStudio::logFree(OpenStudio::Warn, 'openstudio.standards.CoilCoolingDXMultiSpeed', "For #{self.name}, cannot find cool_plf_fplr curve, will not be set.")
185
+ OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CoilCoolingDXMultiSpeed', "For #{name}, cannot find cool_plf_fplr curve, will not be set.")
188
186
  successfully_set_all_properties = false
189
- end
190
-
187
+ end
188
+
191
189
  # Get the minimum efficiency standards
192
190
  cop = nil
193
-
191
+
194
192
  if subcategory == 'PTAC'
195
193
  ptac_eer_coeff_1 = ac_props['ptac_eer_coefficient_1']
196
194
  ptac_eer_coeff_2 = ac_props['ptac_eer_coefficient_2']
197
195
  capacity_btu_per_hr = 7000 if capacity_btu_per_hr < 7000
198
- capacity_btu_per_hr = 15000 if capacity_btu_per_hr > 15000
196
+ capacity_btu_per_hr = 15_000 if capacity_btu_per_hr > 15_000
199
197
  ptac_eer = ptac_eer_coeff_1 + (ptac_eer_coeff_2 * capacity_btu_per_hr)
200
198
  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}")
199
+ # self.setName("#{self.name} #{capacity_kbtu_per_hr.round}kBtu/hr #{ptac_eer}EER")
200
+ new_comp_name = "#{name} #{capacity_kbtu_per_hr.round}kBtu/hr #{ptac_eer}EER"
201
+ OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.CoilCoolingDXMultiSpeed', "For #{template}: #{name}: #{cooling_type} #{heating_type} #{subcategory} Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; EER = #{ptac_eer}")
204
202
  end
205
-
203
+
206
204
  # If specified as SEER
207
205
  unless ac_props['minimum_seasonal_energy_efficiency_ratio'].nil?
208
206
  min_seer = ac_props['minimum_seasonal_energy_efficiency_ratio']
209
207
  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}")
208
+ new_comp_name = "#{name} #{capacity_kbtu_per_hr.round}kBtu/hr #{min_seer}SEER"
209
+ # self.setName("#{self.name} #{capacity_kbtu_per_hr.round}kBtu/hr #{min_seer}SEER")
210
+ OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.CoilCoolingDXMultiSpeed', "For #{template}: #{name}: #{cooling_type} #{heating_type} #{subcategory} Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; SEER = #{min_seer}")
213
211
  end
214
-
212
+
215
213
  # If specified as EER
216
214
  unless ac_props['minimum_energy_efficiency_ratio'].nil?
217
215
  min_eer = ac_props['minimum_energy_efficiency_ratio']
218
216
  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}")
217
+ new_comp_name = "#{name} #{capacity_kbtu_per_hr.round}kBtu/hr #{min_eer}EER"
218
+ OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.CoilCoolingDXMultiSpeed', "For #{template}: #{name}: #{cooling_type} #{heating_type} #{subcategory} Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; EER = #{min_eer}")
221
219
  end
222
220
 
223
221
  # if specified as SEER (heat pump)
224
222
  unless ac_props['minimum_seasonal_efficiency'].nil?
225
223
  min_seer = ac_props['minimum_seasonal_efficiency']
226
224
  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}")
225
+ new_comp_name = "#{name} #{capacity_kbtu_per_hr.round}kBtu/hr #{min_seer}SEER"
226
+ # self.setName("#{self.name} #{capacity_kbtu_per_hr.round}kBtu/hr #{min_seer}SEER")
227
+ OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.CoilCoolingDXMultiSpeed', "For #{template}: #{name}: #{cooling_type} #{heating_type} #{subcategory} Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; SEER = #{min_seer}")
230
228
  end
231
-
232
- # If specified as EER (heat pump)
229
+
230
+ # If specified as EER (heat pump)
233
231
  unless ac_props['minimum_full_load_efficiency'].nil?
234
232
  min_eer = ac_props['minimum_full_load_efficiency']
235
233
  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)
234
+ new_comp_name = "#{name} #{capacity_kbtu_per_hr.round}kBtu/hr #{min_eer}EER"
235
+ OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.CoilCoolingDXMultiSpeed', "For #{template}: #{name}: #{cooling_type} #{heating_type} #{subcategory} Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; EER = #{min_eer}")
236
+ end
237
+
238
+ sql_db_vars_map[new_comp_name] = name.to_s
239
+ setName(new_comp_name)
242
240
 
243
241
  # Set the efficiency values
244
242
 
@@ -249,7 +247,5 @@ class OpenStudio::Model::CoilCoolingDXMultiSpeed
249
247
  end
250
248
 
251
249
  return sql_db_vars_map
252
-
253
250
  end
254
-
255
251
  end