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.


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


187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
# File 'lib/openstudio-standards/standards/Standards.Fan.rb', line 187

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.


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

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.


168
169
170
171
172
173
174
175
176
177
178
179
180
# File 'lib/openstudio-standards/standards/Standards.Fan.rb', line 168

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.


143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
# File 'lib/openstudio-standards/standards/Standards.Fan.rb', line 143

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)


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
# 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 = 0
  dsn_air_flow_m3_per_s = if fan.to_FanZoneExhaust.empty?
                            if fan.maximumFlowRate.is_initialized
                              fan.maximumFlowRate.get
                            else
                              fan.autosizedMaximumFlowRate.get
                            end
                          else
                            fan.maximumFlowRate.get
                          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.


129
130
131
132
133
134
135
136
137
# File 'lib/openstudio-standards/standards/Standards.Fan.rb', line 129

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


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

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


278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
# File 'lib/openstudio-standards/standards/Standards.Fan.rb', line 278

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

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


215
216
217
218
219
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
# File 'lib/openstudio-standards/standards/Standards.Fan.rb', line 215

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