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,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::CoilCoolingDXSingleSpeed
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
-
19
16
  # Determine the heating type if unitary or zone hvac
20
17
  heat_pump = false
21
18
  heating_type = nil
22
- if self.airLoopHVAC.empty?
23
- if self.containingHVACComponent.is_initialized
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 self.containingZoneHVACComponent.is_initialized
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::CoilCoolingDXSingleSpeed
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 self.airLoopHVAC.is_initialized
44
- air_loop = self.airLoopHVAC.get
45
- if air_loop.supplyComponents('Coil:Heating:Electric'.to_IddObjectType).size > 0
46
- heating_type = 'Electric Resistance or None'
47
- elsif air_loop.supplyComponents('Coil:Heating:Gas'.to_IddObjectType).size > 0
48
- heating_type = 'All Other'
49
- elsif air_loop.supplyComponents('Coil:Heating:Water'.to_IddObjectType).size > 0
50
- heating_type = 'All Other'
51
- elsif air_loop.supplyComponents('Coil:Heating:DX:SingleSpeed'.to_IddObjectType).size > 0
52
- heating_type = 'All Other'
53
- elsif air_loop.supplyComponents('Coil:Heating:Gas:MultiStage'.to_IddObjectType).size > 0
54
- heating_type = 'All Other'
55
- elsif air_loop.supplyComponents('Coil:Heating:Desuperheater'.to_IddObjectType).size > 0
56
- heating_type = 'All Other'
57
- elsif air_loop.supplyComponents('Coil:Heating:WaterToAirHeatPump:EquationFit'.to_IddObjectType).size > 0
58
- heating_type = 'All Other'
59
- else
60
- heating_type = 'Electric Resistance or None'
61
- end
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,36 +63,33 @@ class OpenStudio::Model::CoilCoolingDXSingleSpeed
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 Btu/hr
79
75
  #
80
76
  # @return [Double] capacity in Btu/hr 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 self.ratedTotalCoolingCapacity.is_initialized
86
- capacity_w = self.ratedTotalCoolingCapacity.get
87
- elsif self.autosizedRatedTotalCoolingCapacity.is_initialized
88
- capacity_w = self.autosizedRatedTotalCoolingCapacity.get
80
+ if ratedTotalCoolingCapacity.is_initialized
81
+ capacity_w = ratedTotalCoolingCapacity.get
82
+ elsif autosizedRatedTotalCoolingCapacity.is_initialized
83
+ capacity_w = autosizedRatedTotalCoolingCapacity.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 #{name} capacity is not available, cannot apply efficiency standard.")
91
86
  return false
92
87
  end
93
88
 
94
89
  # Convert capacity to Btu/hr
95
- capacity_btu_per_hr = OpenStudio.convert(capacity_w, "W", "Btu/hr").get
90
+ capacity_btu_per_hr = OpenStudio.convert(capacity_w, 'W', 'Btu/hr').get
96
91
 
97
92
  return capacity_btu_per_hr
98
-
99
93
  end
100
94
 
101
95
  # Finds lookup object in standards and return efficiency
@@ -103,140 +97,130 @@ class OpenStudio::Model::CoilCoolingDXSingleSpeed
103
97
  # @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'
104
98
  # @param standards [Hash] the OpenStudio_Standards spreadsheet in hash format
105
99
  # @return [Double] full load efficiency (COP)
106
- def standard_minimum_cop(template,standards)
107
-
100
+ def standard_minimum_cop(template, standards)
108
101
  # find ac properties
109
- search_criteria = self.find_search_criteria(template)
110
- cooling_type = search_criteria["cooling_type"]
111
- heating_type = search_criteria["heating_type"]
112
- subcategory = search_criteria["subcategory"]
113
- capacity_btu_per_hr = self.find_capacity
114
- capacity_kbtu_per_hr = OpenStudio.convert(capacity_btu_per_hr, "Btu/hr", "kBtu/hr").get
102
+ search_criteria = find_search_criteria(template)
103
+ cooling_type = search_criteria['cooling_type']
104
+ heating_type = search_criteria['heating_type']
105
+ subcategory = search_criteria['subcategory']
106
+ capacity_btu_per_hr = find_capacity
107
+ capacity_kbtu_per_hr = OpenStudio.convert(capacity_btu_per_hr, 'Btu/hr', 'kBtu/hr').get
115
108
 
116
- ac_props = self.model.find_object(standards["unitary_acs"], search_criteria, capacity_btu_per_hr)
109
+ ac_props = model.find_object(standards['unitary_acs'], search_criteria, capacity_btu_per_hr, Date.today)
117
110
 
118
111
  # Get the minimum efficiency standards
119
112
  cop = nil
120
113
 
121
114
  # Check to make sure properties were found
122
115
  if ac_props.nil?
123
- OpenStudio::logFree(OpenStudio::Warn, 'openstudio.standards.CoilCoolingDXSingleSpeed', "For #{self.name}, cannot find efficiency info, cannot apply efficiency standard.")
116
+ OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CoilCoolingDXSingleSpeed', "For #{name}, cannot find efficiency info, cannot apply efficiency standard.")
124
117
  return cop # value of nil
125
118
  end
126
119
 
127
120
  # If specified as SEER
128
121
  unless ac_props['minimum_seasonal_energy_efficiency_ratio'].nil?
129
122
  min_seer = ac_props['minimum_seasonal_energy_efficiency_ratio']
130
- cop = seer_to_cop(min_seer)
131
- OpenStudio::logFree(OpenStudio::Info, 'openstudio.standards.CoilCoolingDXSingleSpeed', "For #{template}: #{self.name}: #{cooling_type} #{heating_type} #{subcategory} Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; SEER = #{min_seer}")
123
+ cop = seer_to_cop_cooling_no_fan(min_seer)
124
+ 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}")
132
125
  end
133
126
 
134
127
  # If specified as EER
135
128
  unless ac_props['minimum_energy_efficiency_ratio'].nil?
136
129
  min_eer = ac_props['minimum_energy_efficiency_ratio']
137
- cop = eer_to_cop(min_eer)
138
- OpenStudio::logFree(OpenStudio::Info, 'openstudio.standards.CoilCoolingDXSingleSpeed', "For #{template}: #{self.name}: #{cooling_type} #{heating_type} #{subcategory} Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; EER = #{min_eer}")
130
+ cop = eer_to_cop(min_eer, OpenStudio.convert(capacity_kbtu_per_hr, 'kBtu/hr', 'W').get)
131
+ 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}")
139
132
  end
140
133
 
141
134
  # if specified as SEER (heat pump)
142
135
  unless ac_props['minimum_seasonal_efficiency'].nil?
143
136
  min_seer = ac_props['minimum_seasonal_efficiency']
144
- cop = seer_to_cop(min_seer)
145
- OpenStudio::logFree(OpenStudio::Info, 'openstudio.standards.CoilCoolingDXSingleSpeed', "For #{template}: #{self.name}: #{cooling_type} #{heating_type} #{subcategory} Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; SEER = #{min_seer}")
137
+ cop = seer_to_cop_cooling_no_fan(min_seer)
138
+ 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}")
146
139
  end
147
140
 
148
141
  # If specified as EER (heat pump)
149
142
  unless ac_props['minimum_full_load_efficiency'].nil?
150
143
  min_eer = ac_props['minimum_full_load_efficiency']
151
- cop = eer_to_cop(min_eer)
152
- OpenStudio::logFree(OpenStudio::Info, 'openstudio.standards.CoilCoolingDXSingleSpeed', "For #{template}: #{self.name}: #{cooling_type} #{heating_type} #{subcategory} Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; EER = #{min_eer}")
144
+ cop = eer_to_cop(min_eer, OpenStudio.convert(capacity_kbtu_per_hr, 'kBtu/hr', 'W').get)
145
+ 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}")
153
146
  end
154
147
 
155
148
  return cop
156
-
157
149
  end
158
150
 
159
151
  # Applies the standard efficiency ratings and typical performance curves to this object.
160
- #
152
+ #
161
153
  # @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'
162
154
  # @param standards [Hash] the OpenStudio_Standards spreadsheet in hash format
163
- # @return [Bool] true if successful, false if not
164
- def setStandardEfficiencyAndCurves(template, sql_db_vars_map)
165
-
155
+ # @return [Bool] true if successful, false if not
156
+ def apply_efficiency_and_curves(template, sql_db_vars_map)
166
157
  successfully_set_all_properties = true
167
-
158
+
168
159
  unitary_acs = $os_standards['unitary_acs']
169
160
  heat_pumps = $os_standards['heat_pumps']
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 = self.condenserType
166
+ cooling_type = condenserType
176
167
  search_criteria['cooling_type'] = cooling_type
177
-
178
- # TODO Standards - add split system vs single package to model
168
+
169
+ # TODO: Standards - add split system vs single package to model
179
170
  # For now, assume single package as default
180
171
  subcategory = 'Single Package'
181
172
 
182
- # todo: remove this temporary hack
183
- is_pthp = false
184
-
185
173
  # Determine the heating type if unitary or zone hvac
186
174
  heat_pump = false
187
175
  heating_type = nil
188
- if self.airLoopHVAC.empty?
189
- if self.containingHVACComponent.is_initialized
190
- containing_comp = self.containingHVACComponent.get
176
+ if airLoopHVAC.empty?
177
+ if containingHVACComponent.is_initialized
178
+ containing_comp = containingHVACComponent.get
191
179
  if containing_comp.to_AirLoopHVACUnitaryHeatPumpAirToAir.is_initialized
192
180
  heat_pump = true
193
181
  heating_type = 'Electric Resistance or None'
194
- end # TODO Add other unitary systems
195
- elsif self.containingZoneHVACComponent.is_initialized
196
- containing_comp = self.containingZoneHVACComponent.get
182
+ end # TODO: Add other unitary systems
183
+ elsif containingZoneHVACComponent.is_initialized
184
+ containing_comp = containingZoneHVACComponent.get
197
185
  # PTAC
198
186
  if containing_comp.to_ZoneHVACPackagedTerminalAirConditioner.is_initialized
199
187
  subcategory = 'PTAC'
200
188
  htg_coil = containing_comp.to_ZoneHVACPackagedTerminalAirConditioner.get.heatingCoil
201
189
  if htg_coil.to_CoilHeatingElectric.is_initialized
202
- heating_type = 'Electric Resistance or None'
190
+ heating_type = 'Electric Resistance or None'
203
191
  elsif htg_coil.to_CoilHeatingWater.is_initialized || htg_coil.to_CoilHeatingGas.is_initialized
204
192
  heating_type = 'All Other'
205
193
  end
206
194
  # PTHP
207
195
  elsif containing_comp.to_ZoneHVACPackagedTerminalHeatPump.is_initialized
208
- #heat_pump = true
209
- # Todo: Change subcategory to PTHP once/if implemented
210
- subcategory = 'PTAC'
211
- # Todo: remove this temporary hack
212
- is_pthp = true
196
+ subcategory = 'PTHP'
213
197
  heating_type = 'Electric Resistance or None'
214
-
215
- end # TODO Add other zone hvac systems
198
+ heat_pump = true
199
+ end # TODO: Add other zone hvac systems
216
200
 
217
201
  end
218
202
  end
219
203
 
220
204
  # Determine the heating type if on an airloop
221
- if self.airLoopHVAC.is_initialized
222
- air_loop = self.airLoopHVAC.get
223
- if air_loop.supplyComponents('OS:Coil:Heating:Electric'.to_IddObjectType).size > 0
224
- heating_type = 'Electric Resistance or None'
225
- elsif air_loop.supplyComponents('OS:Coil:Heating:Gas'.to_IddObjectType).size > 0
226
- heating_type = 'All Other'
227
- elsif air_loop.supplyComponents('OS:Coil:Heating:Water'.to_IddObjectType).size > 0
228
- heating_type = 'All Other'
229
- elsif air_loop.supplyComponents('OS:Coil:Heating:DX:SingleSpeed'.to_IddObjectType).size > 0
230
- heating_type = 'All Other'
231
- elsif air_loop.supplyComponents('OS:Coil:Heating:Gas:MultiStage'.to_IddObjectType).size > 0
232
- heating_type = 'All Other'
233
- elsif air_loop.supplyComponents('OS:Coil:Heating:Desuperheater'.to_IddObjectType).size > 0
234
- heating_type = 'All Other'
235
- elsif air_loop.supplyComponents('OS:Coil:Heating:WaterToAirHeatPump:EquationFit'.to_IddObjectType).size > 0
236
- heating_type = 'All Other'
237
- else
238
- heating_type = 'Electric Resistance or None'
239
- end
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
240
224
  end
241
225
 
242
226
  # Add the heating type to the search criteria
@@ -245,173 +229,181 @@ class OpenStudio::Model::CoilCoolingDXSingleSpeed
245
229
  end
246
230
 
247
231
  search_criteria['subcategory'] = subcategory
248
-
232
+
249
233
  # Get the coil capacity
250
234
  capacity_w = nil
251
- if self.ratedTotalCoolingCapacity.is_initialized
252
- capacity_w = self.ratedTotalCoolingCapacity.get
253
- elsif self.autosizedRatedTotalCoolingCapacity.is_initialized
254
- capacity_w = self.autosizedRatedTotalCoolingCapacity.get
235
+ if ratedTotalCoolingCapacity.is_initialized
236
+ capacity_w = ratedTotalCoolingCapacity.get
237
+ elsif autosizedRatedTotalCoolingCapacity.is_initialized
238
+ capacity_w = autosizedRatedTotalCoolingCapacity.get
255
239
  else
256
- OpenStudio::logFree(OpenStudio::Warn, 'openstudio.standards.CoilCoolingDXSingleSpeed', "For #{self.name} capacity is not available, cannot apply efficiency standard.")
240
+ OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CoilCoolingDXSingleSpeed', "For #{name} capacity is not available, cannot apply efficiency standard.")
257
241
  successfully_set_all_properties = false
258
242
  return successfully_set_all_properties
259
- end
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
260
261
 
261
262
  # Convert capacity to Btu/hr
262
- capacity_btu_per_hr = OpenStudio.convert(capacity_w, "W", "Btu/hr").get
263
- capacity_kbtu_per_hr = OpenStudio.convert(capacity_w, "W", "kBtu/hr").get
264
-
263
+ capacity_btu_per_hr = OpenStudio.convert(capacity_w, 'W', 'Btu/hr').get
264
+ capacity_kbtu_per_hr = OpenStudio.convert(capacity_w, 'W', 'kBtu/hr').get
265
+
265
266
  # Lookup efficiencies depending on whether it is a unitary AC or a heat pump
266
267
  ac_props = nil
267
- if heat_pump == true
268
- ac_props = self.model.find_object(heat_pumps, search_criteria, capacity_btu_per_hr)
269
- else
270
- ac_props = self.model.find_object(unitary_acs, search_criteria, capacity_btu_per_hr)
271
- end
268
+ ac_props = if heat_pump == true
269
+ model.find_object(heat_pumps, search_criteria, capacity_btu_per_hr, Date.today)
270
+ else
271
+ model.find_object(unitary_acs, search_criteria, capacity_btu_per_hr, Date.today)
272
+ end
272
273
 
273
274
  # Check to make sure properties were found
274
275
  if ac_props.nil?
275
- OpenStudio::logFree(OpenStudio::Warn, 'openstudio.standards.CoilCoolingDXSingleSpeed', "For #{self.name}, cannot find efficiency info, cannot apply efficiency standard.")
276
+ OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CoilCoolingDXSingleSpeed', "For #{name}, cannot find efficiency info, cannot apply efficiency standard.")
276
277
  successfully_set_all_properties = false
277
278
  return successfully_set_all_properties
278
279
  end
279
280
 
280
281
  # Make the COOL-CAP-FT curve
281
- cool_cap_ft = self.model.add_curve(ac_props["cool_cap_ft"])
282
+ cool_cap_ft = model.add_curve(ac_props['cool_cap_ft'])
282
283
  if cool_cap_ft
283
- self.setTotalCoolingCapacityFunctionOfTemperatureCurve(cool_cap_ft)
284
+ setTotalCoolingCapacityFunctionOfTemperatureCurve(cool_cap_ft)
284
285
  else
285
- OpenStudio::logFree(OpenStudio::Warn, 'openstudio.standards.CoilCoolingDXSingleSpeed', "For #{self.name}, cannot find cool_cap_ft curve, will not be set.")
286
+ OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CoilCoolingDXSingleSpeed', "For #{name}, cannot find cool_cap_ft curve, will not be set.")
286
287
  successfully_set_all_properties = false
287
288
  end
288
289
 
289
290
  # Make the COOL-CAP-FFLOW curve
290
- cool_cap_fflow = self.model.add_curve(ac_props["cool_cap_fflow"])
291
+ cool_cap_fflow = model.add_curve(ac_props['cool_cap_fflow'])
291
292
  if cool_cap_fflow
292
- self.setTotalCoolingCapacityFunctionOfFlowFractionCurve(cool_cap_fflow)
293
+ setTotalCoolingCapacityFunctionOfFlowFractionCurve(cool_cap_fflow)
293
294
  else
294
- OpenStudio::logFree(OpenStudio::Warn, 'openstudio.standards.CoilCoolingDXSingleSpeed', "For #{self.name}, cannot find cool_cap_fflow curve, will not be set.")
295
+ OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CoilCoolingDXSingleSpeed', "For #{name}, cannot find cool_cap_fflow curve, will not be set.")
295
296
  successfully_set_all_properties = false
296
297
  end
297
-
298
+
298
299
  # Make the COOL-EIR-FT curve
299
- cool_eir_ft = self.model.add_curve(ac_props["cool_eir_ft"])
300
+ cool_eir_ft = model.add_curve(ac_props['cool_eir_ft'])
300
301
  if cool_eir_ft
301
- self.setEnergyInputRatioFunctionOfTemperatureCurve(cool_eir_ft)
302
+ setEnergyInputRatioFunctionOfTemperatureCurve(cool_eir_ft)
302
303
  else
303
- OpenStudio::logFree(OpenStudio::Warn, 'openstudio.standards.CoilCoolingDXSingleSpeed', "For #{self.name}, cannot find cool_eir_ft curve, will not be set.")
304
+ OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CoilCoolingDXSingleSpeed', "For #{name}, cannot find cool_eir_ft curve, will not be set.")
304
305
  successfully_set_all_properties = false
305
306
  end
306
307
 
307
308
  # Make the COOL-EIR-FFLOW curve
308
- cool_eir_fflow = self.model.add_curve(ac_props["cool_eir_fflow"])
309
+ cool_eir_fflow = model.add_curve(ac_props['cool_eir_fflow'])
309
310
  if cool_eir_fflow
310
- self.setEnergyInputRatioFunctionOfFlowFractionCurve(cool_eir_fflow)
311
+ setEnergyInputRatioFunctionOfFlowFractionCurve(cool_eir_fflow)
311
312
  else
312
- OpenStudio::logFree(OpenStudio::Warn, 'openstudio.standards.CoilCoolingDXSingleSpeed', "For #{self.name}, cannot find cool_eir_fflow curve, will not be set.")
313
+ OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CoilCoolingDXSingleSpeed', "For #{name}, cannot find cool_eir_fflow curve, will not be set.")
313
314
  successfully_set_all_properties = false
314
315
  end
315
-
316
+
316
317
  # Make the COOL-PLF-FPLR curve
317
- cool_plf_fplr = self.model.add_curve(ac_props["cool_plf_fplr"])
318
+ cool_plf_fplr = model.add_curve(ac_props['cool_plf_fplr'])
318
319
  if cool_plf_fplr
319
- self.setPartLoadFractionCorrelationCurve(cool_plf_fplr)
320
+ setPartLoadFractionCorrelationCurve(cool_plf_fplr)
320
321
  else
321
- OpenStudio::logFree(OpenStudio::Warn, 'openstudio.standards.CoilCoolingDXSingleSpeed', "For #{self.name}, cannot find cool_plf_fplr curve, will not be set.")
322
+ OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CoilCoolingDXSingleSpeed', "For #{name}, cannot find cool_plf_fplr curve, will not be set.")
322
323
  successfully_set_all_properties = false
323
- end
324
-
324
+ end
325
+
325
326
  # Get the minimum efficiency standards
326
327
  cop = nil
327
328
 
328
- # Todo: remove/revamp this temporary hack once/if PTHP implemented in Openstudio Standards spreadsheet
329
- if is_pthp
330
- case template
331
- when '90.1-2007'
332
- pthp_eer_coeff_1 = 12.3
333
- pthp_eer_coeff_2 = -0.000213
334
- when '90.1-2010'
335
- # As of 10/08/2012
336
- pthp_eer_coeff_1 = 14
337
- pthp_eer_coeff_2 = -0.0003
338
- end
339
-
340
-
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']
341
333
  # TABLE 6.8.1D
342
- # EER = pthp_eer_coeff_1 + pthp_eer_coeff_2 * Cap
334
+ # EER = pthp_eer_coeff_1 - (pthp_eer_coeff_2 * Cap / 1000)
343
335
  # Note c: Cap means the rated cooling capacity of the product in Btu/h.
344
- # If the units capacity is less than 7000 Btu/h, use 7000 Btu/h in the calculation.
345
- # If the units capacity is greater than 15,000 Btu/h, use 15,000 Btu/h in the calculation.
346
- capacity_btu_per_hr = 7000 if capacity_btu_per_hr < 7000
347
- capacity_btu_per_hr = 15000 if capacity_btu_per_hr > 15000
348
- pthp_eer = pthp_eer_coeff_1 + (pthp_eer_coeff_2 * capacity_btu_per_hr)
349
- cop = eer_to_cop(pthp_eer)
350
- new_comp_name = "#{self.name} #{capacity_kbtu_per_hr.round}kBtu/hr #{pthp_eer.round(1)}EER"
351
- OpenStudio::logFree(OpenStudio::Info, 'openstudio.standards.CoilCoolingDXSingleSpeed', "HACK: For #{template}: #{self.name}: #{cooling_type} #{heating_type} #{subcategory} Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr #{pthp_eer.round(2)}EER")
352
-
353
- elsif subcategory == 'PTAC'
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'
354
349
  ptac_eer_coeff_1 = ac_props['ptac_eer_coefficient_1']
355
- # This second coefficient is already negative in the json standards
356
350
  ptac_eer_coeff_2 = ac_props['ptac_eer_coefficient_2']
357
351
  # TABLE 6.8.1D
358
- # EER = ptac_eer_coeff_1 + ptac_eer_coeff_2 * Cap
352
+ # EER = ptac_eer_coeff_1 - (ptac_eer_coeff_2 * Cap / 1000)
359
353
  # Note c: Cap means the rated cooling capacity of the product in Btu/h.
360
- # If the units capacity is less than 7000 Btu/h, use 7000 Btu/h in the calculation.
361
- # If the units capacity is greater than 15,000 Btu/h, use 15,000 Btu/h in the calculation.
362
- capacity_btu_per_hr = 7000 if capacity_btu_per_hr < 7000
363
- capacity_btu_per_hr = 15000 if capacity_btu_per_hr > 15000
364
- ptac_eer = ptac_eer_coeff_1 + (ptac_eer_coeff_2 * capacity_btu_per_hr)
365
- cop = eer_to_cop(ptac_eer)
366
- new_comp_name = "#{self.name} #{capacity_kbtu_per_hr.round}kBtu/hr #{ptac_eer.round(1)}EER"
367
- OpenStudio::logFree(OpenStudio::Info, 'openstudio.standards.CoilCoolingDXSingleSpeed', "For #{template}: #{self.name}: #{cooling_type} #{heating_type} #{subcategory} Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; EER = #{ptac_eer}")
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}")
368
363
  end
369
-
364
+
370
365
  # If specified as SEER
371
366
  unless ac_props['minimum_seasonal_energy_efficiency_ratio'].nil?
372
367
  min_seer = ac_props['minimum_seasonal_energy_efficiency_ratio']
373
- cop = seer_to_cop(min_seer)
374
- new_comp_name = "#{self.name} #{capacity_kbtu_per_hr.round}kBtu/hr #{min_seer}SEER"
375
- # self.setName("#{self.name} #{capacity_kbtu_per_hr.round}kBtu/hr #{min_seer}SEER")
376
- OpenStudio::logFree(OpenStudio::Info, 'openstudio.standards.CoilCoolingDXSingleSpeed', "For #{template}: #{self.name}: #{cooling_type} #{heating_type} #{subcategory} Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; SEER = #{min_seer}")
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}")
377
372
  end
378
-
373
+
379
374
  # If specified as EER
380
375
  unless ac_props['minimum_energy_efficiency_ratio'].nil?
381
376
  min_eer = ac_props['minimum_energy_efficiency_ratio']
382
- cop = eer_to_cop(min_eer)
383
- new_comp_name = "#{self.name} #{capacity_kbtu_per_hr.round}kBtu/hr #{min_eer}EER"
384
- OpenStudio::logFree(OpenStudio::Info, 'openstudio.standards.CoilCoolingDXSingleSpeed', "For #{template}: #{self.name}: #{cooling_type} #{heating_type} #{subcategory} Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; EER = #{min_eer}")
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}")
385
380
  end
386
381
 
387
382
  # if specified as SEER (heat pump)
388
383
  unless ac_props['minimum_seasonal_efficiency'].nil?
389
384
  min_seer = ac_props['minimum_seasonal_efficiency']
390
- cop = seer_to_cop(min_seer)
391
- new_comp_name = "#{self.name} #{capacity_kbtu_per_hr.round}kBtu/hr #{min_seer}SEER"
392
- # self.setName("#{self.name} #{capacity_kbtu_per_hr.round}kBtu/hr #{min_seer}SEER")
393
- OpenStudio::logFree(OpenStudio::Info, 'openstudio.standards.CoilCoolingDXSingleSpeed', "For #{template}: #{self.name}: #{cooling_type} #{heating_type} #{subcategory} Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; SEER = #{min_seer}")
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}")
394
389
  end
395
-
396
- # If specified as EER (heat pump)
390
+
391
+ # If specified as EER (heat pump)
397
392
  unless ac_props['minimum_full_load_efficiency'].nil?
398
393
  min_eer = ac_props['minimum_full_load_efficiency']
399
- cop = eer_to_cop(min_eer)
400
- new_comp_name = "#{self.name} #{capacity_kbtu_per_hr.round}kBtu/hr #{min_eer}EER"
401
- OpenStudio::logFree(OpenStudio::Info, 'openstudio.standards.CoilCoolingDXSingleSpeed', "For #{template}: #{self.name}: #{cooling_type} #{heating_type} #{subcategory} Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; EER = #{min_eer}")
402
- end
403
-
404
-
405
- sql_db_vars_map[new_comp_name] = self.name.to_s
406
- self.setName(new_comp_name)
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
398
+
399
+ sql_db_vars_map[new_comp_name] = name.to_s
400
+ setName(new_comp_name)
407
401
 
408
402
  # Set the efficiency values
409
403
  unless cop.nil?
410
- self.setRatedCOP(OpenStudio::OptionalDouble.new(cop))
404
+ setRatedCOP(OpenStudio::OptionalDouble.new(cop))
411
405
  end
412
406
 
413
407
  return sql_db_vars_map
414
-
415
408
  end
416
-
417
409
  end