Class: OpenStudio::Model::FanConstantVolume

Inherits:
Object
  • Object
show all
Includes:
Fan, PrototypeFan
Defined in:
lib/openstudio-standards/prototypes/Prototype.FanConstantVolume.rb,
lib/openstudio-standards/standards/Standards.FanConstantVolume.rb,
lib/openstudio-standards/hvac_sizing/Siz.FanConstantVolume.rb

Overview

open the class to add methods to return sizing values

Instance Method Summary collapse

Methods included from Fan

#adjust_pressure_rise_to_meet_fan_power, #apply_standard_minimum_motor_efficiency, #baseline_impeller_efficiency, #brake_horsepower, #change_impeller_efficiency, #change_motor_efficiency, #fan_power, #motor_horsepower, #rated_w_per_cfm, #small_fan?, #standard_minimum_motor_efficiency_and_size

Methods included from PrototypeFan

#apply_prototype_fan_efficiency

Instance Method Details

#apply_prototype_fan_pressure_rise(building_type, template, climate_zone) ⇒ Object

Sets the fan pressure rise based on the Prototype buildings inputs which are governed by the flow rate coming through the fan and whether the fan lives inside a unit heater, PTAC, etc.



9
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
70
71
72
73
74
75
76
# File 'lib/openstudio-standards/prototypes/Prototype.FanConstantVolume.rb', line 9

def apply_prototype_fan_pressure_rise(building_type, template, climate_zone)
  # NECB
  if template == 'NECB 2011'
    pressure_rise_pa = 640.0
    setPressureRise(pressure_rise_pa)
    return true
  end

  return true if name.to_s.include?('UnitHeater Fan')

  # Get the max flow rate from the fan.
  maximum_flow_rate_m3_per_s = nil
  if maximumFlowRate.is_initialized
    maximum_flow_rate_m3_per_s = maximumFlowRate.get
  elsif autosizedMaximumFlowRate.is_initialized
    maximum_flow_rate_m3_per_s = autosizedMaximumFlowRate.get
  else
    OpenStudio.logFree(OpenStudio::Warn, 'openstudio.prototype.FanConstantVolume', "For #{name} max flow rate is not available, cannot apply prototype assumptions.")
    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

  # Pressure rise will be determined based on the
  # following logic.
  pressure_rise_in_h2o = 0.0

  # If the fan lives inside of a zone hvac equipment
  if containingZoneHVACComponent.is_initialized
    zone_hvac = containingZoneHVACComponent.get
    if zone_hvac.to_ZoneHVACPackagedTerminalAirConditioner.is_initialized
      pressure_rise_in_h2o = 1.33
    elsif zone_hvac.to_ZoneHVACFourPipeFanCoil.is_initialized
      pressure_rise_in_h2o = 1.33
    elsif zone_hvac.to_ZoneHVACUnitHeater.is_initialized
      pressure_rise_in_h2o = 0.2
    else # This type of fan should not exist in the prototype models
      return false
    end
  # If the fan lives on an airloop
  elsif airLoopHVAC.is_initialized
    case template
    when 'DOE Ref Pre-1980', 'DOE Ref 1980-2004', '90.1-2004'
      pressure_rise_in_h2o = if maximum_flow_rate_cfm < 7437
                               2.5
                             elsif maximum_flow_rate_cfm >= 7437 && maximum_flow_rate_cfm < 20_000
                               4.46
                             else # Over 20,000 cfm
                               4.09
                             end
    when '90.1-2007', '90.1-2010', '90.1-2013'
      pressure_rise_in_h2o = if maximum_flow_rate_cfm < 7437
                               2.5
                             else # Over 7,437 cfm
                               4.09
                             end
    end
  end

  # Set the fan pressure rise
  pressure_rise_pa = OpenStudio.convert(pressure_rise_in_h2o, 'inH_{2}O', 'Pa').get
  setPressureRise(pressure_rise_pa)

  OpenStudio.logFree(OpenStudio::Info, 'openstudio.model.FanConstantVolume', "For Prototype: #{name}: #{maximum_flow_rate_cfm.round}cfm; Pressure Rise = #{pressure_rise_in_h2o}in w.c.")

  return true
end

#applySizingValuesObject

Takes the values calculated by the EnergyPlus sizing routines and puts them into this object model in place of the autosized fields. Must have previously completed a run with sql output for this to work.



13
14
15
16
17
18
19
20
# File 'lib/openstudio-standards/hvac_sizing/Siz.FanConstantVolume.rb', line 13

def applySizingValues

  maximum_flow_rate = self.autosizedMaximumFlowRate
  if maximum_flow_rate.is_initialized
    self.setMaximumFlowRate(maximum_flow_rate.get)
  end

end

#autosizeObject

Sets all auto-sizeable fields to autosize



6
7
8
# File 'lib/openstudio-standards/hvac_sizing/Siz.FanConstantVolume.rb', line 6

def autosize
  OpenStudio::logFree(OpenStudio::Warn, "openstudio.sizing.FanConstantVolume", ".autosize not yet implemented for #{self.iddObject.type.valueDescription}.")
end

#autosizedMaximumFlowRateObject

returns the autosized maximum flow rate as an optional double



23
24
25
26
27
# File 'lib/openstudio-standards/hvac_sizing/Siz.FanConstantVolume.rb', line 23

def autosizedMaximumFlowRate

  return self.model.getAutosizedValue(self, 'Design Size Maximum Flow Rate', 'm3/s')
  
end