Class: OpenStudio::Model::HeaderedPumpsConstantSpeed

Inherits:
Object
  • Object
show all
Includes:
Pump
Defined in:
lib/openstudio-standards/standards/Standards.HeaderedPumpsConstantSpeed.rb,
lib/openstudio-standards/hvac_sizing/Siz.HeaderedPumpsConstantSpeed.rb

Overview

open the class to add methods to return sizing values

Instance Method Summary collapse

Methods included from Pump

#apply_prm_pressure_rise_and_motor_efficiency, #apply_standard_minimum_motor_efficiency, #brake_horsepower, #motor_horsepower, #pump_power, #rated_w_per_gpm, #standard_minimum_motor_efficiency_and_size

Instance Method Details

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



14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/openstudio-standards/hvac_sizing/Siz.HeaderedPumpsConstantSpeed.rb', line 14

def applySizingValues

  rated_flow_rate = self.autosizedTotalRatedFlowRate
  if rated_flow_rate.is_initialized
    self.setTotalRatedFlowRate(rated_flow_rate.get) 
  end

  rated_power_consumption = self.autosizedRatedPowerConsumption
  if rated_power_consumption.is_initialized
    self.setRatedPowerConsumption(rated_power_consumption.get)
  end

end

#autosizeObject

Sets all auto-sizeable fields to autosize



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

def autosize
  self.autosizeTotalRatedFlowRate
  self.autosizeRatedPowerConsumption
end

#autosizedRatedFlowRateOptionalDouble

Takes the total rated flow rate and returns per-pump values as an optional double

Returns:

  • (OptionalDouble)

    the total rated flow rate per pump



9
10
11
12
13
14
15
16
17
18
# File 'lib/openstudio-standards/standards/Standards.HeaderedPumpsConstantSpeed.rb', line 9

def autosizedRatedFlowRate
  result = OpenStudio::OptionalDouble.new
  total_rated_flow_rate = autosizedTotalRatedFlowRate
  if total_rated_flow_rate.is_initialized
    per_pump_rated_flow_rate = total_rated_flow_rate.get / numberofPumpsinBank
    result = OpenStudio::OptionalDouble.new(per_pump_rated_flow_rate)
  end

  return result
end

#autosizedRatedPowerConsumptionObject

returns the autosized rated power consumption as an optional double



43
44
45
46
47
48
49
50
51
52
53
54
# File 'lib/openstudio-standards/hvac_sizing/Siz.HeaderedPumpsConstantSpeed.rb', line 43

def autosizedRatedPowerConsumption

  # In E+ 8.5, (OS 1.10.5 onward) the column name changed
  col_name = nil
  if self.model.version < OpenStudio::VersionString.new('1.10.5')
    col_name = 'Rated Power Consumption'
  else
    col_name = 'Design Power Consumption'
  end

  return self.model.getAutosizedValue(self, col_name, 'W')
end

#autosizedTotalRatedFlowRateObject

returns the autosized rated flow rate as an optional double



29
30
31
32
33
34
35
36
37
38
39
40
# File 'lib/openstudio-standards/hvac_sizing/Siz.HeaderedPumpsConstantSpeed.rb', line 29

def autosizedTotalRatedFlowRate

  # In E+ 8.5, (OS 1.10.5 onward) the column name changed
  col_name = nil
  if self.model.version < OpenStudio::VersionString.new('1.10.5')
    col_name = 'Rated Flow Rate'
  else
    col_name = 'Design Flow Rate'
  end

  return self.model.getAutosizedValue(self, col_name, 'm3/s')
end

#ratedFlowRateOptionalDouble

Takes the total rated flow rate and returns per-pump values as an optional double

Returns:

  • (OptionalDouble)

    the total rated flow rate per pump



23
24
25
26
27
28
29
30
31
32
# File 'lib/openstudio-standards/standards/Standards.HeaderedPumpsConstantSpeed.rb', line 23

def ratedFlowRate
  result = OpenStudio::OptionalDouble.new
  total_rated_flow_rate = totalRatedFlowRate
  if total_rated_flow_rate.is_initialized
    per_pump_rated_flow_rate = total_rated_flow_rate.get / numberofPumpsinBank
    result = OpenStudio::OptionalDouble.new(per_pump_rated_flow_rate)
  end

  return result
end