Sha256: b8017ccadce770df0313a6707d7da72dc0aaf56947b823f1cd156039ff258238

Contents?: true

Size: 1.8 KB

Versions: 49

Compression:

Stored size: 1.8 KB

Contents

# open the class to add methods to return sizing values
class OpenStudio::Model::PumpConstantSpeed

  # Sets all auto-sizeable fields to autosize
  def autosize
    OpenStudio::logFree(OpenStudio::Warn, "openstudio.sizing.PumpConstantSpeed", ".autosize not yet implemented for #{self.iddObject.type.valueDescription}.")
  end

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

  # returns the autosized rated flow rate as an optional double
  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

  # returns the autosized rated power consumption as an optional double
  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  
  
  
end

Version data entries

49 entries across 49 versions & 1 rubygems

Version Path
openstudio-standards-0.1.13 lib/openstudio-standards/hvac_sizing/Siz.PumpConstantSpeed.rb
openstudio-standards-0.1.12 lib/openstudio-standards/hvac_sizing/Siz.PumpConstantSpeed.rb
openstudio-standards-0.1.11 lib/openstudio-standards/hvac_sizing/Siz.PumpConstantSpeed.rb
openstudio-standards-0.1.10 lib/openstudio-standards/hvac_sizing/Siz.PumpConstantSpeed.rb
openstudio-standards-0.1.9 lib/openstudio-standards/hvac_sizing/Siz.PumpConstantSpeed.rb
openstudio-standards-0.1.8 lib/openstudio-standards/hvac_sizing/Siz.PumpConstantSpeed.rb
openstudio-standards-0.1.7 lib/openstudio-standards/hvac_sizing/Siz.PumpConstantSpeed.rb
openstudio-standards-0.1.6 lib/openstudio-standards/hvac_sizing/Siz.PumpConstantSpeed.rb
openstudio-standards-0.1.5 lib/openstudio-standards/hvac_sizing/Siz.PumpConstantSpeed.rb