Module: Fan

Included in:
Standard
Defined in:
lib/openstudio-standards/standards/Standards.Fan.rb

Overview

A variety of fan calculation methods that are the same regardless of fan type. These methods are available to FanConstantVolume, FanOnOff, FanVariableVolume, and FanZoneExhaust

Fan collapse

Instance Method Details

#fan_adjust_pressure_rise_to_meet_fan_power(fan, target_fan_power) ⇒ Bool

Adjust the fan pressure rise to hit the target fan power (W). Keep the fan impeller and motor efficiencies static.

Parameters:

  • target_fan_power (Double)

    the target fan power in W

Returns:

  • (Bool)

    true if successful, false if not


38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# File 'lib/openstudio-standards/standards/Standards.Fan.rb', line 38

def fan_adjust_pressure_rise_to_meet_fan_power(fan, target_fan_power)
  # Get design supply air flow rate (whether autosized or hard-sized)
  dsn_air_flow_m3_per_s = 0
  dsn_air_flow_m3_per_s = if fan.autosizedMaximumFlowRate.is_initialized
                            fan.autosizedMaximumFlowRate.get
                          else
                            fan.maximumFlowRate.get
                          end

  # Get the current fan power
  current_fan_power_w = fan_fanpower(fan)

  # Get the current pressure rise (Pa)
  pressure_rise_pa = fan.pressureRise

  # Get the total fan efficiency
  fan_total_eff = fan.fanEfficiency

  # Calculate the new fan pressure rise (Pa)
  new_pressure_rise_pa = target_fan_power * fan_total_eff / dsn_air_flow_m3_per_s
  new_pressure_rise_in_h2o = OpenStudio.convert(new_pressure_rise_pa, 'Pa', 'inH_{2}O').get

  # Set the new pressure rise
  fan.setPressureRise(new_pressure_rise_pa)

  # Calculate the new power
  new_power_w = fan_fanpower(fan)

  OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.Fan', "For #{fan.name}: pressure rise = #{new_pressure_rise_in_h2o.round(1)} in w.c., power = #{fan_motor_horsepower(fan).round(2)}HP.")

  return true
end

#fan_apply_standard_minimum_motor_efficiency(fan, allowed_bhp) ⇒ Object

Applies the minimum motor efficiency for this fan based on the motor's brake horsepower.


9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/openstudio-standards/standards/Standards.Fan.rb', line 9

def fan_apply_standard_minimum_motor_efficiency(fan, allowed_bhp)
  # Find the motor efficiency
  motor_eff, nominal_hp = fan_standard_minimum_motor_efficiency_and_size(fan, allowed_bhp)

  # Change the motor efficiency
  # but preserve the existing fan impeller
  # efficiency.
  fan_change_motor_efficiency(fan, motor_eff)

  # Calculate the total motor HP
  motor_hp = fan_motor_horsepower(fan)

  # Exception for small fans, including
  # zone exhaust, fan coil, and fan powered terminals.
  # In this case, 0.5 HP is used for the lookup.
  if fan_small_fan?(fan)
    OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.Fan', "For #{fan.name}: motor eff = #{(motor_eff * 100).round(2)}%; assumed to represent several less than 1 HP motors.")
  else
    OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.Fan', "For #{fan.name}: motor nameplate = #{nominal_hp}HP, motor eff = #{(motor_eff * 100).round(2)}%.")
  end

  return true
end

#fan_baseline_impeller_efficiency(fan) ⇒ Double

TODO:

Add fan type to data model and modify this method

Determines the baseline fan impeller efficiency based on the specified fan type.

Returns:

  • (Double)

    impeller efficiency (0.0 to 1.0)


192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
# File 'lib/openstudio-standards/standards/Standards.Fan.rb', line 192

def fan_baseline_impeller_efficiency(fan)
  # Assume that the fan efficiency is 65% for normal fans
  # and 55% for small fans (like exhaust fans).
  # TODO add fan type to fan data model
  # and infer impeller efficiency from that?
  # or do we always assume a certain type of
  # fan impeller for the baseline system?
  # TODO check COMNET and T24 ACM and PNNL 90.1 doc
  fan_impeller_eff = 0.65

  if fan_small_fan?(fan)
    fan_impeller_eff = 0.55
  end

  return fan_impeller_eff
end

#fan_brake_horsepower(fan) ⇒ Double

Determines the brake horsepower of the fan based on fan power and fan motor efficiency.

Returns:

  • (Double)

    brake horsepower @units horsepower (hp)


113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
# File 'lib/openstudio-standards/standards/Standards.Fan.rb', line 113

def fan_brake_horsepower(fan)
  # Get the fan motor efficiency
  existing_motor_eff = 0.7
  if fan.to_FanZoneExhaust.empty?
    existing_motor_eff = fan.motorEfficiency
  end

  # Get the fan power (W)
  fan_power_w = fan_fanpower(fan)

  # Calculate the brake horsepower (bhp)
  fan_bhp = fan_power_w * existing_motor_eff / 746

  return fan_bhp
end

#fan_change_impeller_efficiency(fan, impeller_eff) ⇒ Object

Changes the fan impeller efficiency and also the fan total efficiency at the same time, preserving the motor efficiency.

Parameters:

  • impeller_eff (Double)

    impeller efficiency (0.0 to 1.0)


173
174
175
176
177
178
179
180
181
182
183
184
185
# File 'lib/openstudio-standards/standards/Standards.Fan.rb', line 173

def fan_change_impeller_efficiency(fan, impeller_eff)
  # Get the existing motor efficiency
  existing_motor_eff = 0.7
  if fan.to_FanZoneExhaust.empty?
    existing_motor_eff = fan.motorEfficiency
  end

  # Calculate the new total efficiency
  new_total_eff = existing_motor_eff * impeller_eff

  # Set the revised motor and total fan efficiencies
  fan.setFanEfficiency(new_total_eff)
end

#fan_change_motor_efficiency(fan, motor_eff) ⇒ Object

Changes the fan motor efficiency and also the fan total efficiency at the same time, preserving the impeller efficiency.

Parameters:

  • motor_eff (Double)

    motor efficiency (0.0 to 1.0)


148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
# File 'lib/openstudio-standards/standards/Standards.Fan.rb', line 148

def fan_change_motor_efficiency(fan, motor_eff)
  # Calculate the existing impeller efficiency
  existing_motor_eff = 0.7
  if fan.to_FanZoneExhaust.empty?
    existing_motor_eff = fan.motorEfficiency
  end
  existing_total_eff = fan.fanEfficiency
  existing_impeller_eff = existing_total_eff / existing_motor_eff

  # Calculate the new total efficiency
  new_total_eff = motor_eff * existing_impeller_eff

  # Set the revised motor and total fan efficiencies
  if fan.to_FanZoneExhaust.is_initialized
    fan.setFanEfficiency(new_total_eff)
  else
    fan.setFanEfficiency(new_total_eff)
    fan.setMotorEfficiency(motor_eff)
  end
end

#fan_fanpower(fan) ⇒ Double

Determines the fan power (W) based on flow rate, pressure rise, and total fan efficiency(impeller eff * motor eff)

Returns:

  • (Double)

    fan power @units Watts (W)


76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
# File 'lib/openstudio-standards/standards/Standards.Fan.rb', line 76

def fan_fanpower(fan)
  # Get design supply air flow rate (whether autosized or hard-sized)
  dsn_air_flow_m3_per_s = if fan.to_FanZoneExhaust.empty?
                            if fan.maximumFlowRate.is_initialized
                              fan.maximumFlowRate.get
                            elsif fan.autosizedMaximumFlowRate.is_initialized
                              fan.autosizedMaximumFlowRate.get
                            else
                              OpenStudio.logFree(OpenStudio::Error, 'openstudio.standards.Fan', "The maximum flow rate for fan '#{fan.name}' was neither specified nor set to Autosize.")
                            end
                          else
                            if fan.maximumFlowRate.is_initialized
                              fan.maximumFlowRate.get
                            else
                              OpenStudio.logFree(OpenStudio::Error, 'openstudio.standards.Fan', "The maximum flow rate for exhaust fan '#{fan.name}' was not specified.")
                            end
                          end

  # Get the total fan efficiency,
  # which in E+ includes both motor and
  # impeller efficiency.
  fan_total_eff = fan.fanEfficiency

  # Get the pressure rise (Pa)
  pressure_rise_pa = fan.pressureRise

  # Calculate the fan power (W)
  fan_power_w = pressure_rise_pa * dsn_air_flow_m3_per_s / fan_total_eff

  return fan_power_w
end

#fan_motor_horsepower(fan) ⇒ Double

Determines the horsepower of the fan motor, including motor efficiency and fan impeller efficiency.

Returns:

  • (Double)

    horsepower


134
135
136
137
138
139
140
141
142
# File 'lib/openstudio-standards/standards/Standards.Fan.rb', line 134

def fan_motor_horsepower(fan)
  # Get the fan power
  fan_power_w = fan_fanpower(fan)

  # Convert to HP
  fan_hp = fan_power_w / 745.7 # 745.7 W/HP

  return fan_hp
end

#fan_rated_w_per_cfm(fan) ⇒ Double

Find the actual rated fan power per flow (W/CFM) by querying the sql file

Returns:

  • (Double)

    rated power consumption per flow @units Watts per CFM (W*min/ft^3)


324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
# File 'lib/openstudio-standards/standards/Standards.Fan.rb', line 324

def fan_rated_w_per_cfm(fan)
  # Get design power (whether autosized or hard-sized)
  rated_power_w = fan.model.getAutosizedValueFromEquipmentSummary(fan, 'Fans', 'Rated Electric Power', 'W')
  if rated_power_w.is_initialized
    rated_power_w = rated_power_w.get
  else
    rated_power_w = fan_fanpower(fan)
    OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.Fan', "For #{fan.name}, could not find rated fan power from Equipment Summary. Will calculate it based on current pressure rise and total fan efficiency")
  end

  if fan.autosizedMaximumFlowRate.is_initialized
    max_m3_per_s = fan.autosizedMaximumFlowRate.get
  elsif fan.maximumFlowRate.is_initialized
    max_m3_per_s = fan.ratedFlowRate.get
  else
    OpenStudio.logFree(OpenStudio::Error, 'openstudio.standards.Fan', "For #{fan.name}, could not find fan Maximum Flow Rate, cannot determine w per cfm correctly.")
    return false
  end

  rated_w_per_m3s = rated_power_w / max_m3_per_s

  rated_w_per_cfm = OpenStudio.convert(rated_w_per_m3s, 'W*s/m^3', 'W*min/ft^3').get

  return rated_w_per_cfm
end

#fan_small_fan?(fan) ⇒ Bool

Zone exhaust fans, fan coil unit fans, and powered VAV terminal fans all count as small fans and get different impeller efficiencies and motor efficiencies than other fans

Returns:

  • (Bool)

    returns true if it is a small fan, false if not


284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
# File 'lib/openstudio-standards/standards/Standards.Fan.rb', line 284

def fan_small_fan?(fan)
  is_small = false

  # Exhaust fan
  if fan.to_FanZoneExhaust.is_initialized
    is_small = true
  # Fan coil unit, unit heater, PTAC, PTHP, VRF terminals, WSHP, ERV
  elsif fan.containingZoneHVACComponent.is_initialized
    zone_hvac = fan.containingZoneHVACComponent.get
    if zone_hvac.to_ZoneHVACFourPipeFanCoil.is_initialized
      is_small = true
    # elsif zone_hvac.to_ZoneHVACUnitHeater.is_initialized
    #   is_small = true
    elsif zone_hvac.to_ZoneHVACPackagedTerminalAirConditioner.is_initialized
      is_small = true
    elsif zone_hvac.to_ZoneHVACPackagedTerminalHeatPump.is_initialized
      is_small = true
    elsif zone_hvac.to_ZoneHVACTerminalUnitVariableRefrigerantFlow.is_initialized
      is_small = true
    elsif zone_hvac.to_ZoneHVACWaterToAirHeatPump.is_initialized
      is_small = true
    elsif zone_hvac.to_ZoneHVACEnergyRecoveryVentilator.is_initialized
      is_small = true
    end
  # Powered VAV terminal
  elsif fan.containingHVACComponent.is_initialized
    zone_hvac = fan.containingHVACComponent.get
    if zone_hvac.to_AirTerminalSingleDuctParallelPIUReheat.is_initialized || zone_hvac.to_AirTerminalSingleDuctSeriesPIUReheat.is_initialized
      is_small = true
    end
  end

  return is_small
end

#fan_standard_minimum_motor_efficiency_and_size(fan, motor_bhp) ⇒ Array<Double>

Determines the minimum fan motor efficiency and nominal size for a given motor bhp. This should be the total brake horsepower with any desired safety factor already included. This method picks the next nominal motor catgory larger than the required brake horsepower, and the efficiency is based on that size. For example, if the bhp = 6.3, the nominal size will be 7.5HP and the efficiency for 90.1-2010 will be 91.7% from Table 10.8B. This method assumes 4-pole, 1800rpm totally-enclosed fan-cooled motors.

Parameters:

  • motor_bhp (Double)

    motor brake horsepower (hp)

Returns:

  • (Array<Double>)

    minimum motor efficiency (0.0 to 1.0), nominal horsepower


220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
# File 'lib/openstudio-standards/standards/Standards.Fan.rb', line 220

def fan_standard_minimum_motor_efficiency_and_size(fan, motor_bhp)
  fan_motor_eff = 0.85
  nominal_hp = motor_bhp

  # Don't attempt to look up motor efficiency
  # for zero-hp fans, which may occur when there is no
  # airflow required for a particular system, typically
  # heated-only spaces with high internal gains
  # and no OA requirements such as elevator shafts.
  return [fan_motor_eff, 0] if motor_bhp == 0.0

  # Lookup the minimum motor efficiency
  motors = standards_data['motors']

  # Assuming all fan motors are 4-pole ODP
  search_criteria = {
    'template' => template,
    'number_of_poles' => 4.0,
    'type' => 'Enclosed'
  }

  # Exception for small fans, including
  # zone exhaust, fan coil, and fan powered terminals.
  # In this case, use the 0.5 HP for the lookup.
  if fan_small_fan?(fan)
    nominal_hp = 0.5
  else
    motor_properties = model_find_object(motors, search_criteria, motor_bhp)
    if motor_properties.nil?
      OpenStudio.logFree(OpenStudio::Error, 'openstudio.standards.Fan', "For #{fan.name}, could not find motor properties using search criteria: #{search_criteria}, motor_bhp = #{motor_bhp} hp.")
      return [fan_motor_eff, nominal_hp]
    end

    nominal_hp = motor_properties['maximum_capacity'].to_f.round(1)
    # If the biggest fan motor size is hit, use the highest category efficiency
    if nominal_hp == 9999.0
      OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.Fan', "For #{fan.name}, there is no greater nominal HP.  Use the efficiency of the largest motor category.")
      nominal_hp = motor_bhp
    end

    # Round to nearest whole HP for niceness
    if nominal_hp >= 2
      nominal_hp = nominal_hp.round
    end
  end

  # Get the efficiency based on the nominal horsepower
  # Add 0.01 hp to avoid search errors.
  motor_properties = model_find_object(motors, search_criteria, nominal_hp + 0.01)

  if motor_properties.nil?
    OpenStudio.logFree(OpenStudio::Error, 'openstudio.standards.Fan', "For #{fan.name}, could not find nominal motor properties using search criteria: #{search_criteria}, motor_hp = #{nominal_hp} hp.")
    return [fan_motor_eff, nominal_hp]
  end
  fan_motor_eff = motor_properties['nominal_full_load_efficiency']

  return [fan_motor_eff, nominal_hp]
end