Class: OpenStudio::Model::ChillerElectricEIR
- Inherits:
-
Object
- Object
- OpenStudio::Model::ChillerElectricEIR
- Defined in:
- lib/openstudio-standards/hvac_sizing/HVACSizing.ChillerElectricEIR.rb,
lib/openstudio-standards/standards/Standards.ChillerElectricEIR.rb
Overview
Reopen the OpenStudio class to add methods to apply standards to this object
Instance Method Summary collapse
-
#applySizingValues ⇒ Object
Takes the values calculated by the EnergyPlus sizing routines and puts them into this object model in place of the autosized fields.
-
#autosize ⇒ Object
Sets all auto-sizeable fields to autosize.
-
#autosizedReferenceCapacity ⇒ Object
returns the autosized reference capacity as an optional double.
-
#autosizedReferenceChilledWaterFlowRate ⇒ Object
returns the autosized chilled water flow rate as an optional double.
-
#autosizedReferenceCondenserFluidFlowRate ⇒ Object
returns the autosized reference condenser fluid flow rate as an optional double.
-
#find_capacity ⇒ Double
Finds capacity in tons.
-
#find_search_criteria(template) ⇒ hash
Finds the search criteria.
-
#setStandardEfficiencyAndCurves(template) ⇒ Bool
Applies the standard efficiency ratings and typical performance curves to this object.
-
#standard_minimum_full_load_efficiency(template, standards) ⇒ Double
Finds lookup object in standards and return full load efficiency.
Instance Method Details
#applySizingValues ⇒ Object
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 27 28 29 30 31 32 33 34 |
# File 'lib/openstudio-standards/hvac_sizing/HVACSizing.ChillerElectricEIR.rb', line 13 def applySizingValues reference_chilled_water_flow_rate = self.autosizedReferenceChilledWaterFlowRate if reference_chilled_water_flow_rate.is_initialized self.setReferenceChilledWaterFlowRate(reference_chilled_water_flow_rate.get) end reference_capacity = self.autosizedReferenceCapacity if reference_capacity.is_initialized self.setReferenceCapacity(reference_capacity.get) end # Only try to find the condenser water flow rate if this chiller # is a water cooled chiller connected to a condenser loop. if self.secondaryPlantLoop.is_initialized reference_condenser_fluid_flow_rate = self.autosizedReferenceCondenserFluidFlowRate if reference_condenser_fluid_flow_rate.is_initialized self.setReferenceCondenserFluidFlowRate(reference_condenser_fluid_flow_rate.get) end end end |
#autosize ⇒ Object
Sets all auto-sizeable fields to autosize
6 7 8 |
# File 'lib/openstudio-standards/hvac_sizing/HVACSizing.ChillerElectricEIR.rb', line 6 def autosize OpenStudio::logFree(OpenStudio::Warn, "openstudio.sizing.ChillerElectricEIR", ".autosize not yet implemented for #{self.iddObject.type.valueDescription}.") end |
#autosizedReferenceCapacity ⇒ Object
returns the autosized reference capacity as an optional double
44 45 46 47 48 |
# File 'lib/openstudio-standards/hvac_sizing/HVACSizing.ChillerElectricEIR.rb', line 44 def autosizedReferenceCapacity return self.model.getAutosizedValue(self, 'Design Size Reference Capacity', 'W') end |
#autosizedReferenceChilledWaterFlowRate ⇒ Object
returns the autosized chilled water flow rate as an optional double
37 38 39 40 41 |
# File 'lib/openstudio-standards/hvac_sizing/HVACSizing.ChillerElectricEIR.rb', line 37 def autosizedReferenceChilledWaterFlowRate return self.model.getAutosizedValue(self, 'Design Size Reference Chilled Water Flow Rate', 'm3/s') end |
#autosizedReferenceCondenserFluidFlowRate ⇒ Object
returns the autosized reference condenser fluid flow rate as an optional double
51 52 53 54 55 |
# File 'lib/openstudio-standards/hvac_sizing/HVACSizing.ChillerElectricEIR.rb', line 51 def autosizedReferenceCondenserFluidFlowRate return self.model.getAutosizedValue(self, 'User-Specified Reference Condenser Water Flow Rate', 'm3/s') end |
#find_capacity ⇒ Double
Finds capacity in tons
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 |
# File 'lib/openstudio-standards/standards/Standards.ChillerElectricEIR.rb', line 55 def find_capacity() # Get the chiller capacity capacity_w = nil if self.referenceCapacity.is_initialized capacity_w = self.referenceCapacity.get elsif self.autosizedReferenceCapacity.is_initialized capacity_w = self.autosizedReferenceCapacity.get else OpenStudio::logFree(OpenStudio::Warn, "openstudio.standards.ChillerElectricEIR", "For #{self.name} capacity is not available, cannot apply efficiency standard.") successfully_set_all_properties = false return successfully_set_all_properties end # Convert capacity to tons capacity_tons = OpenStudio.convert(capacity_w, "W", "ton").get return capacity_tons end |
#find_search_criteria(template) ⇒ hash
Finds the search criteria
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/openstudio-standards/standards/Standards.ChillerElectricEIR.rb', line 9 def find_search_criteria(template) # Define the criteria to find the chiller properties # in the hvac standards data set. search_criteria = {} search_criteria['template'] = template cooling_type = self.condenserType search_criteria['cooling_type'] = cooling_type # TODO Standards replace this with a mechanism to store this # data in the chiller object itself. # For now, retrieve the condenser type from the name name = self.name.get condenser_type = nil compressor_type = nil if name.include?('AirCooled') if name.include?('WithCondenser') condenser_type = 'WithCondenser' elsif name.include?('WithoutCondenser') condenser_type = 'WithoutCondenser' end elsif name.include?('WaterCooled') if name.include?('Reciprocating') compressor_type = 'Reciprocating' elsif name.include?('Rotary Screw') compressor_type = 'Rotary Screw' elsif name.include?('Scroll') compressor_type = 'Scroll' elsif name.include?('Centrifugal') compressor_type = 'Centrifugal' end end unless condenser_type.nil? search_criteria['condenser_type'] = condenser_type end unless compressor_type.nil? search_criteria['compressor_type'] = compressor_type end return search_criteria end |
#setStandardEfficiencyAndCurves(template) ⇒ Bool
Applies the standard efficiency ratings and typical performance curves to this object.
107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 |
# File 'lib/openstudio-standards/standards/Standards.ChillerElectricEIR.rb', line 107 def setStandardEfficiencyAndCurves(template) chillers = $os_standards['chillers'] curve_biquadratics = $os_standards['curve_biquadratics'] curve_quadratics = $os_standards['curve_quadratics'] curve_bicubics = $os_standards['curve_bicubics'] # Define the criteria to find the chiller properties # in the hvac standards data set. search_criteria = {} search_criteria['template'] = template cooling_type = self.condenserType search_criteria['cooling_type'] = cooling_type # TODO Standards replace this with a mechanism to store this # data in the chiller object itself. # For now, retrieve the condenser type from the name name = self.name.get condenser_type = nil compressor_type = nil if name.include?('AirCooled') if name.include?('WithCondenser') condenser_type = 'WithCondenser' elsif name.include?('WithoutCondenser') condenser_type = 'WithoutCondenser' end elsif name.include?('WaterCooled') if name.include?('Reciprocating') compressor_type = 'Reciprocating' elsif name.include?('Rotary Screw') compressor_type = 'Rotary Screw' elsif name.include?('Scroll') compressor_type = 'Scroll' elsif name.include?('Centrifugal') compressor_type = 'Centrifugal' end end unless condenser_type.nil? search_criteria['condenser_type'] = condenser_type end unless compressor_type.nil? search_criteria['compressor_type'] = compressor_type end # Get the chiller capacity capacity_w = nil if self.referenceCapacity.is_initialized capacity_w = self.referenceCapacity.get elsif self.autosizedReferenceCapacity.is_initialized capacity_w = self.autosizedReferenceCapacity.get else OpenStudio::logFree(OpenStudio::Warn, "openstudio.standards.ChillerElectricEIR", "For #{self.name} capacity is not available, cannot apply efficiency standard.") successfully_set_all_properties = false return successfully_set_all_properties end # Convert capacity to tons capacity_tons = OpenStudio.convert(capacity_w, "W", "ton").get # Get the chiller properties chlr_props = self.model.find_object(chillers, search_criteria, capacity_tons) if !chlr_props OpenStudio::logFree(OpenStudio::Warn, "openstudio.standards.ChillerElectricEIR", "For #{self.name}, cannot find chiller properties, cannot apply standard efficiencies or curves.") successfully_set_all_properties = false return successfully_set_all_properties end # Make the CAPFT curve cool_cap_ft = self.model.add_curve(chlr_props['capft']) if cool_cap_ft self.setCoolingCapacityFunctionOfTemperature(cool_cap_ft) else OpenStudio::logFree(OpenStudio::Warn, "openstudio.standards.ChillerElectricEIR", "For #{self.name}, cannot find cool_cap_ft curve, will not be set.") successfully_set_all_properties = false end # Make the EIRFT curve cool_eir_ft = self.model.add_curve(chlr_props['eirft']) if cool_eir_ft self.setElectricInputToCoolingOutputRatioFunctionOfTemperature(cool_eir_ft) else OpenStudio::logFree(OpenStudio::Warn, "openstudio.standards.ChillerElectricEIR", "For #{self.name}, cannot find cool_eir_ft curve, will not be set.") successfully_set_all_properties = false end # Make the EIRFPLR curve # which may be either a CurveBicubic or a CurveQuadratic based on chiller type cool_plf_fplr = self.model.add_curve(chlr_props['eirfplr']) if cool_plf_fplr #self.setElectricInputToCoolingOutputRatioFunctionOfPLR(cool_plf_fplr) else OpenStudio::logFree(OpenStudio::Warn, "openstudio.standards.ChillerElectricEIR", "For #{self.name}, cannot find cool_plf_fplr curve, will not be set.") successfully_set_all_properties = false end # Set the efficiency value kw_per_ton = nil cop = nil if chlr_props['minimum_full_load_efficiency'] kw_per_ton = chlr_props['minimum_full_load_efficiency'] cop = kw_per_ton_to_cop(kw_per_ton) self.setReferenceCOP(cop) else OpenStudio::logFree(OpenStudio::Warn, "openstudio.standards.ChillerElectricEIR", "For #{self.name}, cannot find minimum full load efficiency, will not be set.") successfully_set_all_properties = false end # Append the name with size and kw/ton self.setName("#{name} #{capacity_tons.round}tons #{kw_per_ton.round(1)}kW/ton") OpenStudio::logFree(OpenStudio::Info, 'openstudio.model.ChillerElectricEIR', "For #{template}: #{self.name}: #{cooling_type} #{condenser_type} #{compressor_type} Capacity = #{capacity_tons.round}tons; COP = #{cop.round(1)} (#{kw_per_ton.round(1)}kW/ton)") #NECB 2011 requires that all chillers be modulating down to 25% of their capacity if template == 'NECB 2011' self.setChillerFlowMode('LeavingSetpointModulated') self.setMinimumPartLoadRatio(0.25) self.setMinimumUnloadingRatio(0.25) end # NECB 2011 return successfully_set_all_properties end |
#standard_minimum_full_load_efficiency(template, standards) ⇒ Double
Finds lookup object in standards and return full load efficiency
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 |
# File 'lib/openstudio-standards/standards/Standards.ChillerElectricEIR.rb', line 81 def standard_minimum_full_load_efficiency(template,standards) # Get the chiller properties search_criteria = self.find_search_criteria(template) capacity_tons = self.find_capacity chlr_props = self.model.find_object(standards['chillers'], search_criteria, capacity_tons) # lookup the efficiency value kw_per_ton = nil cop = nil if chlr_props['minimum_full_load_efficiency'] kw_per_ton = chlr_props['minimum_full_load_efficiency'] cop = kw_per_ton_to_cop(kw_per_ton) else OpenStudio::logFree(OpenStudio::Warn, "openstudio.standards.ChillerElectricEIR", "For #{self.name}, cannot find minimum full load efficiency.") end return cop end |