Sha256: 1cf42eaee1c62bb4928ed8df69d870304a17b4aaa58651c186082f6d774b2b9c

Contents?: true

Size: 1.52 KB

Versions: 5

Compression:

Stored size: 1.52 KB

Contents

# Reopen the OpenStudio class to add methods to apply standards to this object
class OpenStudio::Model::PumpVariableSpeed

  include Pump

  # Set the pump curve coefficients based
  # on the specified control type.
  #
  # @param control_type [String] valid choices
  # are Riding Curve, VSD No Reset, VSD DP Reset
  def set_control_type(control_type)
    
    # Determine the coefficients
    coeff_a = nil
    coeff_b = nil
    coeff_c = nil
    coeff_d = nil
    case control_type
    when 'Riding Curve'
      coeff_a = 0.0
      coeff_b = 3.2485
      coeff_c = -4.7443
      coeff_d = 2.2594
    when 'VSD No Reset'
      coeff_a = 0.0
      coeff_b = 0.5726
      coeff_c = -0.301
      coeff_d = 0.7347
    when 'VSD DP Reset'
      coeff_a = 0.0
      coeff_b = 0.0205
      coeff_c = 0.4101
      coeff_d = 0.5753
    else
      OpenStudio::logFree(OpenStudio::Warn, 'openstudio.standards.PumpVariableSpeed', "Pump control type '#{control_type}' not recognized, pump coefficients will not be changed.")
      return false
    end
  
    # Set the coefficients
    self.setCoefficient1ofthePartLoadPerformanceCurve(coeff_a)
    self.setCoefficient2ofthePartLoadPerformanceCurve(coeff_b)
    self.setCoefficient3ofthePartLoadPerformanceCurve(coeff_c)
    self.setCoefficient4ofthePartLoadPerformanceCurve(coeff_d)
    self.setPumpControlType('Intermittent')
  
    # Append the control type to the pump name
    #self.setName("#{self.name} #{control_type}")
  
    return true
  
  end
  
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
openstudio-standards-0.1.4 lib/openstudio-standards/standards/Standards.PumpVariableSpeed.rb
openstudio-standards-0.1.3 lib/openstudio-standards/standards/Standards.PumpVariableSpeed.rb
openstudio-standards-0.1.2 lib/openstudio-standards/standards/Standards.PumpVariableSpeed.rb
openstudio-standards-0.1.1 lib/openstudio-standards/standards/Standards.PumpVariableSpeed.rb
openstudio-standards-0.1.0 lib/openstudio-standards/standards/Standards.PumpVariableSpeed.rb