Module: Fan

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

Instance Method Summary collapse

Instance Method Details

#adjust_pressure_rise_to_meet_fan_power(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



95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
# File 'lib/openstudio-standards/standards/Standards.Fan.rb', line 95

def adjust_pressure_rise_to_meet_fan_power(target_fan_power)

  # Get design supply air flow rate (whether autosized or hard-sized)

  dsn_air_flow_m3_per_s = 0
  if self.autosizedMaximumFlowRate.is_initialized
    dsn_air_flow_m3_per_s = self.autosizedMaximumFlowRate.get
  else
    dsn_air_flow_m3_per_s = self.maximumFlowRate.get
  end  

  # Get the current fan power

  current_fan_power_w = self.fanPower

  # Get the current pressure rise (Pa)

  pressure_rise_pa = self.pressureRise
  
  # Get the total fan efficiency

  fan_total_eff = self.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

  self.setPressureRise(new_pressure_rise_pa)
  
  # Calculate the new power

  new_power_w = self.fanPower
  
  OpenStudio::logFree(OpenStudio::Info, "openstudio.standards.Fan", "For #{self.name}: pressure rise = #{new_pressure_rise_in_h2o.round(1)} in w.c., power = #{new_power_w.round} W // #{self.motorHorsepower.round(2)}HP.")
  
  return true

end

#baselineImpellerEfficiency(template) ⇒ 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)



252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
# File 'lib/openstudio-standards/standards/Standards.Fan.rb', line 252

def baselineImpellerEfficiency(template)

  # 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 self.is_small_fan
    fan_impeller_eff = 0.55
  end

  return fan_impeller_eff

end

#brakeHorsepowerDouble

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

Returns:

  • (Double)

    brake horsepower @units horsepower (hp)



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

def brakeHorsepower()

  # Get the fan motor efficiency

  existing_motor_eff = 0.7
  if self.to_FanZoneExhaust.empty?
    existing_motor_eff = self.motorEfficiency
  end

  # Get the fan power (W)

  fan_power_w = self.fanPower
  
  # Calculate the brake horsepower (bhp)

  fan_bhp = fan_power_w * existing_motor_eff / 746
  
  return fan_bhp

end

#changeImpellerEfficiency(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)



231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
# File 'lib/openstudio-standards/standards/Standards.Fan.rb', line 231

def changeImpellerEfficiency(impeller_eff)
  
  # Get the existing motor efficiency

  existing_motor_eff = 0.7
  if self.to_FanZoneExhaust.empty?
    existing_motor_eff = self.motorEfficiency
  end

  # Calculate the new total efficiency

  new_total_eff = existing_motor_eff * impeller_eff
  
  # Set the revised motor and total fan efficiencies

  self.setFanEfficiency(new_total_eff)

end

#changeMotorEfficiency(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)



204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
# File 'lib/openstudio-standards/standards/Standards.Fan.rb', line 204

def changeMotorEfficiency(motor_eff)
  
  # Calculate the existing impeller efficiency

  existing_motor_eff = 0.7
  if self.to_FanZoneExhaust.empty?
    existing_motor_eff = self.motorEfficiency
  end
  existing_total_eff = self.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 self.to_FanZoneExhaust.is_initialized
    self.setFanEfficiency(new_total_eff)
  else
    self.setFanEfficiency(new_total_eff)
    self.setMotorEfficiency(motor_eff)
  end

end

#fanPowerDouble

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)



135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
# File 'lib/openstudio-standards/standards/Standards.Fan.rb', line 135

def fanPower()
  
  # Get design supply air flow rate (whether autosized or hard-sized)

  dsn_air_flow_m3_per_s = 0
  if self.autosizedMaximumFlowRate.is_initialized
    dsn_air_flow_m3_per_s = self.autosizedMaximumFlowRate.get
  else
    dsn_air_flow_m3_per_s = self.maximumFlowRate.get
  end

  # Get the total fan efficiency,

  # which in E+ includes both motor and

  # impeller efficiency.

  fan_total_eff = self.fanEfficiency
  
  # Get the pressure rise (Pa)

  pressure_rise_pa = self.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

#is_small_fanBool

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



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

def is_small_fan()

  is_small = false

  # Exhaust fan

  if self.to_FanZoneExhaust.is_initialized
    is_small = true
  # Fan coil unit

  elsif self.containingZoneHVACComponent.is_initialized
    zone_hvac = self.containingZoneHVACComponent.get
    if zone_hvac.to_ZoneHVACFourPipeFanCoil.is_initialized
      is_small = true
    end
  # Powered VAV terminal

  elsif self.containingHVACComponent.is_initialized
    zone_hvac = self.containingHVACComponent.get
    if zone_hvac.to_AirTerminalSingleDuctParallelPIUReheat.is_initialized || zone_hvac.to_AirTerminalSingleDuctSeriesPIUReheat.is_initialized
      is_small = true
    end
  end  

  return is_small

end

#motorHorsepowerDouble

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

Returns:

  • (Double)

    horsepower



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

def motorHorsepower()

  # Get the fan power

  fan_power_w = self.fanPower
  
  # Convert to HP

  fan_hp = fan_power_w / 745.7 # 745.7 W/HP

  
  return fan_hp

end

#rated_w_per_cfmDouble

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)



346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
# File 'lib/openstudio-standards/standards/Standards.Fan.rb', line 346

def rated_w_per_cfm()

  # Get design power (whether autosized or hard-sized)

  rated_power_w = self.model.getAutosizedValueFromEquipmentSummary(self, 'Fans', 'Rated Electric Power', 'W')
  if rated_power_w.is_initialized
    rated_power_w = rated_power_w.get
  else
    rated_power_w = self.fanPower
    OpenStudio::logFree(OpenStudio::Warn, "openstudio.standards.Pump", "For #{self.name}, could not find rated fan power from Equipment Summary. Will calculate it based on current pressure rise and total fan efficiency")
  end

  if self.autosizedMaximumFlowRate.is_initialized
    max_m3_per_s = self.autosizedMaximumFlowRate.get
  elsif self.maximumFlowRate.is_initialized
    max_m3_per_s = self.ratedFlowRate.get
  else
    OpenStudio::logFree(OpenStudio::Error, "openstudio.standards.Pump", "For #{self.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_gpm = OpenStudio::convert(rated_w_per_m3s, 'W*s/m^3', 'W*min/ft^3').get

  return rated_w_per_gpm


end

#set_standard_minimum_motor_efficiency(template, allowed_bhp) ⇒ Object



71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# File 'lib/openstudio-standards/standards/Standards.Fan.rb', line 71

def set_standard_minimum_motor_efficiency(template, allowed_bhp)
  
  # Find the motor efficiency

  motor_eff, nominal_hp = standard_minimum_motor_efficiency_and_size(template, allowed_bhp)

  # Change the motor efficiency

  # but preserve the existing fan impeller

  # efficiency.

  self.changeMotorEfficiency(motor_eff)
  
  # Calculate the total motor HP

  motor_hp = self.motorHorsepower
  
  OpenStudio::logFree(OpenStudio::Info, 'openstudio.standards.Fan', "For #{self.name}: motor nameplate = #{nominal_hp}HP, motor eff = #{(motor_eff*100).round(2)}%.")
  
  return true    

end

#setStandardEfficiency(template) ⇒ Bool

Sets the fan motor efficiency based on the standard. Assumes 65% fan efficiency and 4-pole, enclosed motor.

Returns:

  • (Bool)

    true if successful, false if not



10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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 10

def setStandardEfficiency(template)
  
  # Get the max flow rate from the fan.

  maximum_flow_rate_m3_per_s = nil
  if self.maximumFlowRate.is_initialized
    maximum_flow_rate_m3_per_s = self.maximumFlowRate.get
  elsif self.autosizedMaximumFlowRate.is_initialized
    maximum_flow_rate_m3_per_s = self.autosizedMaximumFlowRate.get
  else
    OpenStudio::logFree(OpenStudio::Warn, 'openstudio.standards.Fan', "For #{self.name} max flow rate is not hard sized, cannot apply efficiency standard.")
    return false
  end
  
  # Convert max flow rate to cfm

  maximum_flow_rate_cfm = OpenStudio.convert(maximum_flow_rate_m3_per_s, 'm^3/s', 'cfm').get
  
  # Get the pressure rise from the fan

  pressure_rise_pa = self.pressureRise
  pressure_rise_in_h2o = OpenStudio.convert(pressure_rise_pa, 'Pa','inH_{2}O').get
  
  # Get the default impeller efficiency

  fan_impeller_eff = self.baselineImpellerEfficiency(template)
  
  # Calculate the Brake Horsepower

  brake_hp = (pressure_rise_in_h2o * maximum_flow_rate_cfm)/(fan_impeller_eff * 6356) 
  allowed_hp = brake_hp * 1.1 # Per PNNL document #TODO add reference

  if allowed_hp > 0.1
    allowed_hp = allowed_hp.round(2)+0.0001
  elsif allowed_hp < 0.01
    allowed_hp = 0.01
  end
  
  # Minimum motor size for efficiency lookup

  # is 1 HP unless the motor serves an exhaust fan,

  # a powered VAV terminal, or a fan coil unit.

  unless self.is_small_fan
    if allowed_hp < 1.0
      allowed_hp = 1.01
    end
  end
  
  # Find the motor efficiency

  motor_eff, nominal_hp = standard_minimum_motor_efficiency(template, allowed_hp)

  # Calculate the total fan efficiency

  total_fan_eff = fan_impeller_eff * motor_eff
  
  # Set the total fan efficiency and the motor efficiency

  if self.to_FanZoneExhaust.is_initialized
    self.setFanEfficiency(total_fan_eff)
  else
    self.setFanEfficiency(total_fan_eff)
    self.setMotorEfficiency(motor_eff)
  end
  
  OpenStudio::logFree(OpenStudio::Info, 'openstudio.standards.Fan', "For #{self.name}: allowed_hp = #{allowed_hp.round(2)}HP; motor eff = #{(motor_eff*100).round(2)}%; total fan eff = #{(total_fan_eff*100).round}% based on #{maximum_flow_rate_cfm.round} cfm.")
  
  return true
  
end

#standard_minimum_motor_efficiency_and_size(template, motor_bhp) ⇒ Double

Determines the minimum fan motor efficiency for a given motor bhp. This should be the total brake horsepower with any desired safety factor already included. This method

Parameters:

  • motor_bhp (Double)

    motor brake horsepower (hp)

Returns:

  • (Double)

    minimum motor efficiency (0.0 to 1.0), nominal HP



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
302
303
304
305
306
307
308
309
# File 'lib/openstudio-standards/standards/Standards.Fan.rb', line 277

def standard_minimum_motor_efficiency_and_size(template, motor_bhp)

  fan_motor_eff = 0.85
  nominal_hp = motor_bhp

  # Lookup the minimum motor efficiency

  motors = $os_standards["motors"]
  
  # Assuming all fan motors are 4-pole ODP

  search_criteria = {
    "template" => template,
    "number_of_poles" => 4.0,
    "type" => "Enclosed",
  }
  
  motor_properties = self.model.find_object(motors, search_criteria, motor_bhp)
  if motor_properties.nil?
    OpenStudio::logFree(OpenStudio::Error, "openstudio.standards.Fan", "For #{self.name}, could not find motor properties using search criteria: #{search_criteria}, motor_bhp = #{motor_bhp} hp.")
    return [fan_motor_eff, nominal_hp]
  end
 
  fan_motor_eff = motor_properties["nominal_full_load_efficiency"]  
  nominal_hp = motor_properties["maximum_capacity"].to_f.round(1)
  # Round to nearest whole HP for niceness

  if nominal_hp >= 2
    nominal_hp = nominal_hp.round
  end

  # TODO Add exception for small 


  return [fan_motor_eff, nominal_hp]

end