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
@@ -2,7 +2,6 @@
2
2
  # A variety of pump calculation methods that are the same regardless of pump type.
3
3
  # These methods are available to PumpConstantSpeed, PumpVariableSpeed
4
4
  module Pump
5
-
6
5
  # Set the pressure rise that cooresponds to the
7
6
  # target power per flow number, given the standard
8
7
  # pump efficiency and the default EnergyPlus pump impeller efficiency
@@ -11,8 +10,7 @@ module Pump
11
10
  # @param target_w_per_gpm [Double] the target power per flow, in W/gpm
12
11
  # @return [Bool] return true if successful, false if not
13
12
  # @author jmarrec
14
- def set_performance_rating_method_pressure_rise_and_motor_efficiency(target_w_per_gpm, template)
15
-
13
+ def apply_prm_pressure_rise_and_motor_efficiency(target_w_per_gpm, template)
16
14
  # Eplus assumes an impeller efficiency of 0.78 to determine the total efficiency
17
15
  # http://bigladdersoftware.com/epx/docs/8-4/engineering-reference/component-sizing.html#pump-sizing
18
16
  # Rated_Power_Use = Rated_Volume_Flow_Rate * Rated_Pump_Head / Total_Efficiency
@@ -20,227 +18,249 @@ module Pump
20
18
  # Total_Efficiency = Motor_Efficiency * Impeler_Efficiency
21
19
  impeller_efficiency = 0.78
22
20
 
23
- # Get the brake horsepower
24
- brake_hp = self.brakeHorsepower
21
+ # Get flow rate (whether autosized or hard-sized)
22
+ flow_m3_per_s = 0
23
+ flow_m3_per_s = if autosizedRatedFlowRate.is_initialized
24
+ autosizedRatedFlowRate.get
25
+ else
26
+ ratedFlowRate.get
27
+ end
28
+ flow_gpm = OpenStudio.convert(flow_m3_per_s, 'm^3/s', 'gal/min').get
29
+
30
+ # Calculate the target total pump motor power consumption
31
+ target_motor_power_cons_w = target_w_per_gpm * flow_gpm
32
+ target_motor_power_cons_hp = target_motor_power_cons_w / 745.7 # 745.7 W/HP
25
33
 
26
- # Find the motor efficiency
27
- motor_efficiency, nominal_hp = self.standard_minimum_motor_efficiency_and_size(template, brake_hp)
34
+ # Find the motor efficiency using total power consumption
35
+ # Note that this hp is ~5-10% high because it is being looked
36
+ # up based on the motor consumption, which is always actually higher
37
+ # than the brake horsepower. This will bound the possible motor efficiency
38
+ # values. If a motor is just above a nominal size, and the next size
39
+ # down has a lower efficiency value, later motor efficiency setting
40
+ # methods can mess up the W/gpm. All this nonsense avoids that.
41
+ mot_eff_hi_end, nom_hp_hi_end = standard_minimum_motor_efficiency_and_size(template, target_motor_power_cons_hp)
42
+
43
+ # Calculate the actual brake horsepower using this efficiency
44
+ target_motor_bhp = target_motor_power_cons_hp * mot_eff_hi_end
45
+
46
+ # Find the motor efficiency using actual bhp
47
+ mot_eff_lo_end, nom_hp_lo_end = standard_minimum_motor_efficiency_and_size(template, target_motor_bhp)
48
+
49
+ # If the efficiency drops you down into a lower band with
50
+ # a lower efficiency value, use that for the motor efficiency.
51
+ motor_efficiency = [mot_eff_lo_end, mot_eff_hi_end].min
52
+ nominal_hp = [nom_hp_lo_end, nom_hp_hi_end].min
53
+
54
+ # Calculate the brake horsepower that was assumed
55
+ target_brake_power_hp = target_motor_power_cons_hp * motor_efficiency
28
56
 
29
57
  # Change the motor efficiency
30
- self.setMotorEfficiency(motor_efficiency)
58
+ setMotorEfficiency(motor_efficiency)
31
59
 
32
60
  total_efficiency = impeller_efficiency * motor_efficiency
33
61
 
34
- desired_power_per_m3_s = OpenStudio::convert(target_w_per_gpm,'W*min/gal', 'W*s/m^3').get
62
+ desired_power_per_m3_s = OpenStudio.convert(target_w_per_gpm, 'W*min/gal', 'W*s/m^3').get
35
63
 
36
64
  pressure_rise_pa = desired_power_per_m3_s * total_efficiency
37
- pressure_rise_ft_h2O = OpenStudio::convert(pressure_rise_pa,'Pa','ftH_{2}O').get
65
+ pressure_rise_ft_h2o = OpenStudio.convert(pressure_rise_pa, 'Pa', 'ftH_{2}O').get
38
66
 
39
67
  # Change pressure rise
40
- self.setRatedPumpHead(pressure_rise_pa)
68
+ setRatedPumpHead(pressure_rise_pa)
41
69
 
42
70
  # Report
43
- OpenStudio::logFree(OpenStudio::Info, 'openstudio.standards.Pump', "For #{self.name}: brake hp = #{brake_hp.round(2)}HP; motor nameplate = #{nominal_hp}HP, motor eff = #{(motor_efficiency*100).round(2)}%; #{target_w_per_gpm.round} W/gpm translates to a pressure rise of #{pressure_rise_pa.round(0)} Pa // #{pressure_rise_ft_h2O.round(2)} ftH2O.")
44
-
71
+ OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.Pump', "For #{name}: motor nameplate = #{nominal_hp}HP, motor eff = #{(motor_efficiency * 100).round(2)}%; #{target_w_per_gpm.round} W/gpm translates to a pressure rise of #{pressure_rise_ft_h2o.round(2)} ftH2O.")
72
+
45
73
  # Calculate the W/gpm for verification
46
- calculated_w = self.pumpPower
47
-
48
- # Get flow rate (whether autosized or hard-sized)
49
- flow_m3_per_s = 0
50
- if self.autosizedRatedFlowRate.is_initialized
51
- flow_m3_per_s = self.autosizedRatedFlowRate.get
52
- else
53
- flow_m3_per_s = self.ratedFlowRate.get
54
- end
55
- flow_gpm = OpenStudio.convert(flow_m3_per_s, 'm^3/s', 'gal/min').get
56
- calculated_w_per_gpm = calculated_w/flow_gpm
57
-
58
- OpenStudio::logFree(OpenStudio::Info, 'openstudio.standards.Pump', "For #{self.name}: calculated W/gpm = #{calculated_w_per_gpm.round(1)}.")
74
+ calculated_w = pump_power
59
75
 
60
- return true
76
+ calculated_w_per_gpm = calculated_w / flow_gpm
61
77
 
78
+ OpenStudio.logFree(OpenStudio::Debug, 'openstudio.standards.Pump', "For #{name}: calculated W/gpm = #{calculated_w_per_gpm.round(1)}.")
79
+
80
+ return true
62
81
  end
63
-
64
- def set_standard_minimum_motor_efficiency(template)
65
-
82
+
83
+ def apply_standard_minimum_motor_efficiency(template)
66
84
  # Get the horsepower
67
- hp = self.horsepower
68
-
85
+ bhp = brake_horsepower
86
+
69
87
  # Find the motor efficiency
70
- motor_eff, nominal_hp = standard_minimum_motor_efficiency_and_size(template, hp)
88
+ motor_eff, nominal_hp = standard_minimum_motor_efficiency_and_size(template, bhp)
71
89
 
72
90
  # Change the motor efficiency
73
- self.setMotorEfficiency(motor_eff)
74
-
75
- OpenStudio::logFree(OpenStudio::Info, 'openstudio.standards.Pump', "For #{self.name}: motor nameplate = #{nominal_hp}HP, motor eff = #{(motor_eff*100).round(2)}%.")
76
-
77
- return true
78
-
91
+ setMotorEfficiency(motor_eff)
92
+
93
+ OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.Pump', "For #{name}: brake hp = #{bhp.round(2)}HP, motor nameplate = #{nominal_hp.round(2)}HP, motor eff = #{(motor_eff * 100).round(2)}%.")
94
+
95
+ return true
79
96
  end
80
97
 
81
- # Determines the minimum pump motor efficiency
98
+ # Determines the minimum pump motor efficiency and nominal size
82
99
  # for a given motor bhp. This should be the total brake horsepower with
83
- # any desired safety factor already included.
100
+ # any desired safety factor already included. This method picks
101
+ # the next nominal motor catgory larger than the required brake
102
+ # horsepower, and the efficiency is based on that size. For example,
103
+ # if the bhp = 6.3, the nominal size will be 7.5HP and the efficiency
104
+ # for 90.1-2010 will be 91.7% from Table 10.8B. This method assumes
105
+ # 4-pole, 1800rpm totally-enclosed fan-cooled motors.
84
106
  #
85
107
  # @param motor_bhp [Double] motor brake horsepower (hp)
86
- # @return [Double] minimum motor efficiency (0.0 to 1.0)
108
+ # @return [Array<Double>] minimum motor efficiency (0.0 to 1.0), nominal horsepower
87
109
  def standard_minimum_motor_efficiency_and_size(template, motor_bhp)
88
-
89
110
  motor_eff = 0.85
90
111
  nominal_hp = motor_bhp
91
-
112
+
92
113
  # Don't attempt to look up motor efficiency
93
114
  # for zero-hp pumps (required for circulation-pump-free
94
115
  # service water heating systems).
95
116
  return [1.0, 0] if motor_bhp == 0.0
96
-
117
+
97
118
  # Lookup the minimum motor efficiency
98
- motors = $os_standards["motors"]
99
-
119
+ motors = $os_standards['motors']
120
+
100
121
  # Assuming all pump motors are 4-pole ODP
101
122
  search_criteria = {
102
- "template" => template,
103
- "number_of_poles" => 4.0,
104
- "type" => "Enclosed",
123
+ 'template' => template,
124
+ 'number_of_poles' => 4.0,
125
+ 'type' => 'Enclosed'
105
126
  }
106
-
107
- motor_properties = self.model.find_object(motors, search_criteria, motor_bhp)
127
+
128
+ motor_properties = model.find_object(motors, search_criteria, motor_bhp)
108
129
  if motor_properties.nil?
109
- OpenStudio::logFree(OpenStudio::Error, "openstudio.standards.Pump", "For #{self.name}, could not find motor properties using search criteria: #{search_criteria}, motor_bhp = #{motor_bhp} hp.")
130
+ OpenStudio.logFree(OpenStudio::Error, 'openstudio.standards.Pump', "For #{name}, could not find motor properties using search criteria: #{search_criteria}, motor_bhp = #{motor_bhp} hp.")
110
131
  return [motor_eff, nominal_hp]
111
132
  end
112
-
113
- motor_eff = motor_properties["nominal_full_load_efficiency"]
114
- nominal_hp = motor_properties["maximum_capacity"].to_f.round(1)
133
+
134
+ motor_eff = motor_properties['nominal_full_load_efficiency']
135
+ nominal_hp = motor_properties['maximum_capacity'].to_f.round(1)
115
136
  # Round to nearest whole HP for niceness
116
137
  if nominal_hp >= 2
117
138
  nominal_hp = nominal_hp.round
118
139
  end
119
-
140
+
141
+ # Get the efficiency based on the nominal horsepower
142
+ # Add 0.01 hp to avoid search errors.
143
+ motor_properties = model.find_object(motors, search_criteria, nominal_hp + 0.01)
144
+ if motor_properties.nil?
145
+ OpenStudio.logFree(OpenStudio::Error, 'openstudio.standards.Fan', "For #{name}, could not find nominal motor properties using search criteria: #{search_criteria}, motor_hp = #{nominal_hp} hp.")
146
+ return [motor_eff, nominal_hp]
147
+ end
148
+ motor_eff = motor_properties['nominal_full_load_efficiency']
149
+
120
150
  return [motor_eff, nominal_hp]
121
-
122
- end
123
-
124
- # Determines the pump power (W) based on
151
+ end
152
+
153
+ # Determines the pump power (W) based on
125
154
  # flow rate, pressure rise, and total pump efficiency(impeller eff * motor eff).
126
155
  # Uses the E+ default assumption of 0.78 impeller efficiency.
127
- #
156
+ #
128
157
  # @return [Double] pump power
129
158
  # @units Watts (W)
130
- def pumpPower()
131
-
159
+ def pump_power
132
160
  # Get flow rate (whether autosized or hard-sized)
133
161
  flow_m3_per_s = 0
134
- if self.autosizedRatedFlowRate.is_initialized
135
- flow_m3_per_s = self.autosizedRatedFlowRate.get
136
- else
137
- flow_m3_per_s = self.ratedFlowRate.get
138
- end
139
-
162
+ flow_m3_per_s = if autosizedRatedFlowRate.is_initialized
163
+ autosizedRatedFlowRate.get
164
+ else
165
+ ratedFlowRate.get
166
+ end
167
+
140
168
  # E+ default impeller efficiency
141
- #http://bigladdersoftware.com/epx/docs/8-4/engineering-reference/component-sizing.html#pump-sizing
169
+ # http://bigladdersoftware.com/epx/docs/8-4/engineering-reference/component-sizing.html#pump-sizing
142
170
  impeller_eff = 0.78
143
171
 
144
172
  # Get the motor efficiency
145
- motor_eff = self.motorEfficiency
146
-
173
+ motor_eff = motorEfficiency
174
+
147
175
  # Calculate the total efficiency
148
176
  # which includes both motor and
149
177
  # impeller efficiency.
150
178
  pump_total_eff = impeller_eff * motor_eff
151
-
179
+
152
180
  # Get the pressure rise (Pa)
153
- pressure_rise_pa = self.ratedPumpHead
154
-
181
+ pressure_rise_pa = ratedPumpHead
182
+
155
183
  # Calculate the pump power (W)
156
184
  pump_power_w = pressure_rise_pa * flow_m3_per_s / pump_total_eff
157
-
185
+
158
186
  return pump_power_w
159
-
160
187
  end
161
188
 
162
189
  # Determines the brake horsepower of the pump
163
190
  # based on flow rate, pressure rise, and impeller efficiency.
164
- #
191
+ #
165
192
  # @return [Double] brake horsepower
166
- # @units horsepower (hp)
167
- def brakeHorsepower()
168
-
193
+ # @units horsepower (hp)
194
+ def brake_horsepower
169
195
  # Get flow rate (whether autosized or hard-sized)
170
196
  flow_m3_per_s = 0
171
- if self.autosizedRatedFlowRate.is_initialized
172
- flow_m3_per_s = self.autosizedRatedFlowRate.get
173
- else
174
- flow_m3_per_s = self.ratedFlowRate.get
175
- end
176
-
197
+ flow_m3_per_s = if autosizedRatedFlowRate.is_initialized
198
+ autosizedRatedFlowRate.get
199
+ else
200
+ ratedFlowRate.get
201
+ end
202
+
177
203
  # E+ default impeller efficiency
178
- #http://bigladdersoftware.com/epx/docs/8-4/engineering-reference/component-sizing.html#pump-sizing
204
+ # http://bigladdersoftware.com/epx/docs/8-4/engineering-reference/component-sizing.html#pump-sizing
179
205
  impeller_eff = 0.78
180
-
206
+
181
207
  # Get the pressure rise (Pa)
182
- pressure_rise_pa = self.ratedPumpHead
183
-
208
+ pressure_rise_pa = ratedPumpHead
209
+
184
210
  # Calculate the pump power (W)
185
211
  pump_power_w = pressure_rise_pa * flow_m3_per_s / impeller_eff
186
-
212
+
187
213
  # Convert to HP
188
214
  pump_power_hp = pump_power_w / 745.7 # 745.7 W/HP
189
-
215
+
190
216
  return pump_power_hp
217
+ end
191
218
 
192
- end
193
-
194
219
  # Determines the horsepower of the pump
195
220
  # motor, including motor efficiency and
196
221
  # pump impeller efficiency.
197
- #
222
+ #
198
223
  # @return [Double] horsepower
199
- def motorHorsepower()
200
-
224
+ def motor_horsepower
201
225
  # Get the pump power
202
- pump_power_w = self.pumpPower
203
-
226
+ pump_power_w = pump_power
227
+
204
228
  # Convert to HP
205
229
  pump_hp = pump_power_w / 745.7 # 745.7 W/HP
206
-
230
+
207
231
  return pump_hp
232
+ end
208
233
 
209
- end
210
-
211
234
  # Determines the rated watts per GPM of the pump
212
235
  #
213
236
  # @return [Double] rated power consumption per flow
214
237
  # @units Watts per GPM (W*min/gal)
215
- def rated_w_per_gpm()
216
-
238
+ def rated_w_per_gpm
217
239
  # Get design power (whether autosized or hard-sized)
218
240
  rated_power_w = 0
219
- if self.autosizedRatedPowerConsumption.is_initialized
220
- rated_power_w = self.autosizedRatedPowerConsumption.get
221
- elsif self.ratedPowerConsumption.is_initialized
222
- rated_power_w = self.ratedPowerConsumption.get
241
+ if autosizedRatedPowerConsumption.is_initialized
242
+ rated_power_w = autosizedRatedPowerConsumption.get
243
+ elsif ratedPowerConsumption.is_initialized
244
+ rated_power_w = ratedPowerConsumption.get
223
245
  else
224
- OpenStudio::logFree(OpenStudio::Error, "openstudio.standards.Pump", "For #{self.name}, could not find rated pump power consumption, cannot determine w per gpm correctly.")
246
+ OpenStudio.logFree(OpenStudio::Error, 'openstudio.standards.Pump', "For #{name}, could not find rated pump power consumption, cannot determine w per gpm correctly.")
225
247
  return 0.0
226
248
  end
227
249
 
228
250
  rated_m3_per_s = 0
229
- if self.autosizedRatedFlowRate.is_initialized
230
- rated_m3_per_s = self.autosizedRatedFlowRate.get
231
- elsif self.ratedFlowRate.is_initialized
232
- rated_m3_per_s = self.ratedFlowRate.get
251
+ if autosizedRatedFlowRate.is_initialized
252
+ rated_m3_per_s = autosizedRatedFlowRate.get
253
+ elsif ratedFlowRate.is_initialized
254
+ rated_m3_per_s = ratedFlowRate.get
233
255
  else
234
- OpenStudio::logFree(OpenStudio::Error, "openstudio.standards.Pump", "For #{self.name}, could not find rated pump Flow Rate, cannot determine w per gpm correctly.")
256
+ OpenStudio.logFree(OpenStudio::Error, 'openstudio.standards.Pump', "For #{name}, could not find rated pump Flow Rate, cannot determine w per gpm correctly.")
235
257
  return 0.0
236
258
  end
237
259
 
238
260
  rated_w_per_m3s = rated_power_w / rated_m3_per_s
239
261
 
240
- rated_w_per_gpm = OpenStudio::convert(rated_w_per_m3s, 'W*s/m^3', 'W*min/gal').get
262
+ rated_w_per_gpm = OpenStudio.convert(rated_w_per_m3s, 'W*s/m^3', 'W*min/gal').get
241
263
 
242
264
  return rated_w_per_gpm
243
-
244
265
  end
245
-
246
266
  end
@@ -1,7 +1,5 @@
1
1
 
2
2
  # Reopen the OpenStudio class to add methods to apply standards to this object
3
3
  class OpenStudio::Model::PumpConstantSpeed
4
-
5
4
  include Pump
6
-
7
5
  end
@@ -1,7 +1,6 @@
1
1
 
2
2
  # Reopen the OpenStudio class to add methods to apply standards to this object
3
3
  class OpenStudio::Model::PumpVariableSpeed
4
-
5
4
  include Pump
6
5
 
7
6
  # Set the pump curve coefficients based
@@ -10,18 +9,22 @@ class OpenStudio::Model::PumpVariableSpeed
10
9
  # @param control_type [String] valid choices
11
10
  # are Riding Curve, VSD No Reset, VSD DP Reset
12
11
  def set_control_type(control_type)
13
-
14
12
  # Determine the coefficients
15
13
  coeff_a = nil
16
14
  coeff_b = nil
17
15
  coeff_c = nil
18
16
  coeff_d = nil
19
17
  case control_type
18
+ when 'Constant Flow'
19
+ coeff_a = 0.0
20
+ coeff_b = 1.0
21
+ coeff_c = 0.0
22
+ coeff_d = 0.0
20
23
  when 'Riding Curve'
21
24
  coeff_a = 0.0
22
25
  coeff_b = 3.2485
23
26
  coeff_c = -4.7443
24
- coeff_d = 2.2594
27
+ coeff_d = 2.5294
25
28
  when 'VSD No Reset'
26
29
  coeff_a = 0.0
27
30
  coeff_b = 0.5726
@@ -33,22 +36,20 @@ class OpenStudio::Model::PumpVariableSpeed
33
36
  coeff_c = 0.4101
34
37
  coeff_d = 0.5753
35
38
  else
36
- OpenStudio::logFree(OpenStudio::Warn, 'openstudio.standards.PumpVariableSpeed', "Pump control type '#{control_type}' not recognized, pump coefficients will not be changed.")
39
+ OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.PumpVariableSpeed', "Pump control type '#{control_type}' not recognized, pump coefficients will not be changed.")
37
40
  return false
38
41
  end
39
-
42
+
40
43
  # Set the coefficients
41
- self.setCoefficient1ofthePartLoadPerformanceCurve(coeff_a)
42
- self.setCoefficient2ofthePartLoadPerformanceCurve(coeff_b)
43
- self.setCoefficient3ofthePartLoadPerformanceCurve(coeff_c)
44
- self.setCoefficient4ofthePartLoadPerformanceCurve(coeff_d)
45
- self.setPumpControlType('Intermittent')
46
-
44
+ setCoefficient1ofthePartLoadPerformanceCurve(coeff_a)
45
+ setCoefficient2ofthePartLoadPerformanceCurve(coeff_b)
46
+ setCoefficient3ofthePartLoadPerformanceCurve(coeff_c)
47
+ setCoefficient4ofthePartLoadPerformanceCurve(coeff_d)
48
+ setPumpControlType('Intermittent')
49
+
47
50
  # Append the control type to the pump name
48
- #self.setName("#{self.name} #{control_type}")
49
-
51
+ # self.setName("#{self.name} #{control_type}")
52
+
50
53
  return true
51
-
52
54
  end
53
-
54
55
  end