Class: OpenStudio::Model::PumpConstantSpeed

Inherits:
Object
  • Object
show all
Defined in:
lib/openstudio-standards/hvac_sizing/Siz.PumpConstantSpeed.rb

Overview

open the class to add methods to return sizing values

Instance Method Summary collapse

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.



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

def applySizingValues

  rated_flow_rate = self.autosizedRatedFlowRate
  if rated_flow_rate.is_initialized
    self.setRatedFlowRate(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
# File 'lib/openstudio-standards/hvac_sizing/Siz.PumpConstantSpeed.rb', line 6

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

#autosizedRatedFlowRateObject

returns the autosized rated flow rate as an optional double



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

def autosizedRatedFlowRate

  # 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

#autosizedRatedPowerConsumptionObject

returns the autosized rated power consumption as an optional double



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

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