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) ⇒ Boolean

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

Parameters:

  • fan (OpenStudio::Model::StraightComponent)

    fan object, allowable types: FanConstantVolume, FanOnOff, FanVariableVolume, and FanZoneExhaust

  • target_fan_power (Double)

    the target fan power in watts

Returns:

  • (Boolean)

    returns true if successful, false if not



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
70
71
72
73
74
# File 'lib/openstudio-standards/standards/Standards.Fan.rb', line 43

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.maximumFlowRate.is_initialized
                            fan.maximumFlowRate.get
                          elsif fan.autosizedMaximumFlowRate.is_initialized
                            fan.autosizedMaximumFlowRate.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) ⇒ Boolean

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

Parameters:

  • fan (OpenStudio::Model::StraightComponent)

    fan object, allowable types: FanConstantVolume, FanOnOff, FanVariableVolume, and FanZoneExhaust

  • allowed_bhp (Double)

    allowable brake horsepower

Returns:

  • (Boolean)

    returns true if successful, false if not



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

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.

Parameters:

  • fan (OpenStudio::Model::StraightComponent)

    fan object, allowable types: FanConstantVolume, FanOnOff, FanVariableVolume, and FanZoneExhaust

Returns:

  • (Double)

    impeller efficiency (0.0 to 1.0)



215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
# File 'lib/openstudio-standards/standards/Standards.Fan.rb', line 215

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.

Parameters:

  • fan (OpenStudio::Model::StraightComponent)

    fan object, allowable types: FanConstantVolume, FanOnOff, FanVariableVolume, and FanZoneExhaust

Returns:

  • (Double)

    brake horsepower



127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
# File 'lib/openstudio-standards/standards/Standards.Fan.rb', line 127

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) ⇒ Boolean

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

Parameters:

  • fan (OpenStudio::Model::StraightComponent)

    fan object, allowable types: FanConstantVolume, FanOnOff, FanVariableVolume, and FanZoneExhaust

  • impeller_eff (Double)

    impeller efficiency (0.0 to 1.0)

Returns:

  • (Boolean)

    returns true if successful, false if not



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

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)
  return true
end

#fan_change_motor_efficiency(fan, motor_eff) ⇒ Boolean

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

Parameters:

  • fan (OpenStudio::Model::StraightComponent)

    fan object, allowable types: FanConstantVolume, FanOnOff, FanVariableVolume, and FanZoneExhaust

  • motor_eff (Double)

    motor efficiency (0.0 to 1.0)

Returns:

  • (Boolean)

    returns true if successful, false if not



165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
# File 'lib/openstudio-standards/standards/Standards.Fan.rb', line 165

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
  return true
end

#fan_design_air_flow(fan) ⇒ Double

Determines the design fan flow (m3/s)

Parameters:

  • fan (OpenStudio::Model::StraightComponent)

    fan object, allowable types: FanConstantVolume, FanOnOff, FanVariableVolume, and FanZoneExhaust

Returns:

  • (Double)

    design fan flow



81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# File 'lib/openstudio-standards/standards/Standards.Fan.rb', line 81

def fan_design_air_flow(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
  return dsn_air_flow_m3_per_s
end

#fan_fanpower(fan) ⇒ Double

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

Parameters:

  • fan (OpenStudio::Model::StraightComponent)

    fan object, allowable types: FanConstantVolume, FanOnOff, FanVariableVolume, and FanZoneExhaust

Returns:

  • (Double)

    fan power in watts



107
108
109
110
111
112
113
114
115
116
117
118
119
120
# File 'lib/openstudio-standards/standards/Standards.Fan.rb', line 107

def fan_fanpower(fan)
  # 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 * fan_design_air_flow(fan) / 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.

Parameters:

  • fan (OpenStudio::Model::StraightComponent)

    fan object, allowable types: FanConstantVolume, FanOnOff, FanVariableVolume, and FanZoneExhaust

Returns:

  • (Double)

    motor horsepower



148
149
150
151
152
153
154
155
156
# File 'lib/openstudio-standards/standards/Standards.Fan.rb', line 148

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

Parameters:

  • fan (OpenStudio::Model::StraightComponent)

    fan object, allowable types: FanConstantVolume, FanOnOff, FanVariableVolume, and FanZoneExhaust

Returns:

  • (Double)

    rated power consumption per flow in watters per cfm, W*min/ft^3



341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
# File 'lib/openstudio-standards/standards/Standards.Fan.rb', line 341

def fan_rated_w_per_cfm(fan)
  # Get design power (whether autosized or hard-sized)
  rated_power_w = fan_fanpower(fan)

  if fan.maximumFlowRate.is_initialized
    max_m3_per_s = fan.ratedFlowRate.get
  elsif fan.autosizedMaximumFlowRate.is_initialized
    max_m3_per_s = fan.autosizedMaximumFlowRate.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) ⇒ Boolean

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

Parameters:

  • fan (OpenStudio::Model::StraightComponent)

    fan object, allowable types: FanConstantVolume, FanOnOff, FanVariableVolume, and FanZoneExhaust

Returns:

  • (Boolean)

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



309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
# File 'lib/openstudio-standards/standards/Standards.Fan.rb', line 309

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 || zone_hvac.to_ZoneHVACPackagedTerminalHeatPump.is_initialized || zone_hvac.to_ZoneHVACTerminalUnitVariableRefrigerantFlow.is_initialized || zone_hvac.to_ZoneHVACWaterToAirHeatPump.is_initialized || 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:

  • fan (OpenStudio::Model::StraightComponent)

    fan object, allowable types: FanConstantVolume, FanOnOff, FanVariableVolume, and FanZoneExhaust

  • motor_bhp (Double)

    motor brake horsepower (hp)

Returns:

  • (Array<Double>)

    minimum motor efficiency (0.0 to 1.0), nominal horsepower



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
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
# File 'lib/openstudio-standards/standards/Standards.Fan.rb', line 244

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.0001

  # 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 > 9998.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