Sha256: 69ca801d4d1a6411eba71fd3c75a5464757519412ce80c9dadc8c9411985d5c8

Contents?: true

Size: 1.96 KB

Versions: 38

Compression:

Stored size: 1.96 KB

Contents

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

  # Sets all auto-sizeable fields to autosize
  def autosize
    OpenStudio::logFree(OpenStudio::Warn, "openstudio.sizing.CoilHeatingWater", ".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

    maximum_water_flow_rate = self.autosizedMaximumWaterFlowRate
    if maximum_water_flow_rate.is_initialized
      self.setMaximumWaterFlowRate(maximum_water_flow_rate.get) 
    end
    
    u_factor_times_area_value = self.autosizedUFactorTimesAreaValue
    if u_factor_times_area_value.is_initialized
      self.setUFactorTimesAreaValue(u_factor_times_area_value.get)
    end
    
    rated_capacity = self.autosizedRatedCapacity
    if rated_capacity.is_initialized
      self.setRatedCapacity(rated_capacity.get) 
    end
        
  end

  # returns the autosized maximum water flow rate as an optional double
  def autosizedMaximumWaterFlowRate

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

  # returns the autosized u-factor times area value as an optional double
  def autosizedUFactorTimesAreaValue

    return self.model.getAutosizedValue(self, 'Design Size U-Factor Times Area Value', 'W/K')
    
  end  
  
 # returns the autosized rated capacity as an optional double
  def autosizedRatedCapacity

    # In E+ 8.8, (OS 2.2.2 onward) the field name changed
    if self.model.version < OpenStudio::VersionString.new('2.2.2')
      field = 'Design Size Design Coil Load'
    else
      field = 'Design Size Rated Capacity'
    end

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

Version data entries

38 entries across 38 versions & 1 rubygems

Version Path
openstudio-standards-0.3.0 lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingWater.rb
openstudio-standards-0.2.17.rc2 lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingWater.rb
openstudio-standards-0.2.17.rc1 lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingWater.rb
openstudio-standards-0.2.16 lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingWater.rb
openstudio-standards-0.2.16.rc2 lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingWater.rb
openstudio-standards-0.2.16.rc1 lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingWater.rb
openstudio-standards-0.2.15 lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingWater.rb
openstudio-standards-0.2.15.pre.rc2 lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingWater.rb
openstudio-standards-0.2.15.pre.rc1 lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingWater.rb
openstudio-standards-0.2.14 lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingWater.rb
openstudio-standards-0.2.13 lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingWater.rb
openstudio-standards-0.2.13.rc3 lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingWater.rb
openstudio-standards-0.2.12 lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingWater.rb
openstudio-standards-0.2.12.rc7 lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingWater.rb
openstudio-standards-0.2.12.rc6 lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingWater.rb
openstudio-standards-0.2.12.rc5 lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingWater.rb
openstudio-standards-0.2.12.rc4 lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingWater.rb
openstudio-standards-0.2.12.rc2 lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingWater.rb
openstudio-standards-0.2.12.rc1 lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingWater.rb
openstudio-standards-0.2.11 lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingWater.rb