Class: OpenStudio::Model::CoilCoolingDXSingleSpeed
- Inherits:
-
Object
- Object
- OpenStudio::Model::CoilCoolingDXSingleSpeed
- Includes:
- CoilDX
- Defined in:
- lib/openstudio-standards/standards/Standards.CoilCoolingDXSingleSpeed.rb,
lib/openstudio-standards/hvac_sizing/Siz.CoilCoolingDXSingleSpeed.rb
Overview
open the class to add methods to return sizing values
Instance Method Summary collapse
-
#apply_efficiency_and_curves(template, sql_db_vars_map) ⇒ Bool
Applies the standard efficiency ratings and typical performance curves to this object.
-
#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.
-
#autosizedRatedAirFlowRate ⇒ Object
returns the autosized rated air flow rate as an optional double.
-
#autosizedRatedSensibleHeatRatio ⇒ Object
returns the autosized rated sensible heat ratio as an optional double.
-
#autosizedRatedTotalCoolingCapacity ⇒ Object
returns the autosized rated total cooling capacity as an optional double.
-
#find_capacity ⇒ Double
Finds capacity in W.
-
#standard_minimum_cop(template, rename = false) ⇒ Double
Finds lookup object in standards and return efficiency.
Methods included from CoilDX
#find_search_criteria, #heat_pump?, #heating_type, #subcategory
Instance Method Details
#apply_efficiency_and_curves(template, sql_db_vars_map) ⇒ Bool
Applies the standard efficiency ratings and typical performance curves to this object.
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 229 230 231 232 233 234 235 236 237 238 239 240 |
# File 'lib/openstudio-standards/standards/Standards.CoilCoolingDXSingleSpeed.rb', line 154 def apply_efficiency_and_curves(template, sql_db_vars_map) successfully_set_all_properties = true # Get the search criteria search_criteria = find_search_criteria(template) # Get the capacity capacity_w = find_capacity capacity_btu_per_hr = OpenStudio.convert(capacity_w, 'W', 'Btu/hr').get capacity_kbtu_per_hr = OpenStudio.convert(capacity_w, 'W', 'kBtu/hr').get # Lookup efficiencies depending on whether it is a unitary AC or a heat pump ac_props = nil ac_props = if heat_pump? model.find_object($os_standards['heat_pumps'], search_criteria, capacity_btu_per_hr, Date.today) else model.find_object($os_standards['unitary_acs'], search_criteria, capacity_btu_per_hr, Date.today) end # Check to make sure properties were found if ac_props.nil? OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CoilCoolingDXSingleSpeed', "For #{name}, cannot find efficiency info, cannot apply efficiency standard.") successfully_set_all_properties = false return sql_db_vars_map end # Make the COOL-CAP-FT curve cool_cap_ft = model.add_curve(ac_props['cool_cap_ft']) if cool_cap_ft setTotalCoolingCapacityFunctionOfTemperatureCurve(cool_cap_ft) else OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CoilCoolingDXSingleSpeed', "For #{name}, cannot find cool_cap_ft curve, will not be set.") successfully_set_all_properties = false end # Make the COOL-CAP-FFLOW curve cool_cap_fflow = model.add_curve(ac_props['cool_cap_fflow']) if cool_cap_fflow setTotalCoolingCapacityFunctionOfFlowFractionCurve(cool_cap_fflow) else OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CoilCoolingDXSingleSpeed', "For #{name}, cannot find cool_cap_fflow curve, will not be set.") successfully_set_all_properties = false end # Make the COOL-EIR-FT curve cool_eir_ft = model.add_curve(ac_props['cool_eir_ft']) if cool_eir_ft setEnergyInputRatioFunctionOfTemperatureCurve(cool_eir_ft) else OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CoilCoolingDXSingleSpeed', "For #{name}, cannot find cool_eir_ft curve, will not be set.") successfully_set_all_properties = false end # Make the COOL-EIR-FFLOW curve cool_eir_fflow = model.add_curve(ac_props['cool_eir_fflow']) if cool_eir_fflow setEnergyInputRatioFunctionOfFlowFractionCurve(cool_eir_fflow) else OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CoilCoolingDXSingleSpeed', "For #{name}, cannot find cool_eir_fflow curve, will not be set.") successfully_set_all_properties = false end # Make the COOL-PLF-FPLR curve cool_plf_fplr = model.add_curve(ac_props['cool_plf_fplr']) if cool_plf_fplr setPartLoadFractionCorrelationCurve(cool_plf_fplr) else OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CoilCoolingDXSingleSpeed', "For #{name}, cannot find cool_plf_fplr curve, will not be set.") successfully_set_all_properties = false end # Preserve the original name orig_name = name.to_s # Find the minimum COP and rename with efficiency rating cop = standard_minimum_cop(template, true) # Map the original name to the new name sql_db_vars_map[name.to_s] = orig_name # Set the efficiency values unless cop.nil? setRatedCOP(OpenStudio::OptionalDouble.new(cop)) end return sql_db_vars_map end |
#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.
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/openstudio-standards/hvac_sizing/Siz.CoilCoolingDXSingleSpeed.rb', line 15 def applySizingValues rated_air_flow_rate = self.autosizedRatedAirFlowRate if rated_air_flow_rate.is_initialized self.setRatedAirFlowRate(rated_air_flow_rate.get) end rated_total_cooling_capacity = self.autosizedRatedTotalCoolingCapacity if rated_total_cooling_capacity.is_initialized self.setRatedTotalCoolingCapacity(rated_total_cooling_capacity.get) end rated_sensible_heat_ratio = self.autosizedRatedSensibleHeatRatio if rated_sensible_heat_ratio.is_initialized self.setRatedSensibleHeatRatio(rated_sensible_heat_ratio.get) end end |
#autosize ⇒ Object
Sets all auto-sizeable fields to autosize
6 7 8 9 10 |
# File 'lib/openstudio-standards/hvac_sizing/Siz.CoilCoolingDXSingleSpeed.rb', line 6 def autosize self.autosizeRatedTotalCoolingCapacity self.autosizeRatedSensibleHeatRatio self.autosizeRatedAirFlowRate end |
#autosizedRatedAirFlowRate ⇒ Object
returns the autosized rated air flow rate as an optional double
35 36 37 38 39 |
# File 'lib/openstudio-standards/hvac_sizing/Siz.CoilCoolingDXSingleSpeed.rb', line 35 def autosizedRatedAirFlowRate return self.model.getAutosizedValue(self, 'Design Size Rated Air Flow Rate', 'm3/s') end |
#autosizedRatedSensibleHeatRatio ⇒ Object
returns the autosized rated sensible heat ratio as an optional double
49 50 51 52 53 |
# File 'lib/openstudio-standards/hvac_sizing/Siz.CoilCoolingDXSingleSpeed.rb', line 49 def autosizedRatedSensibleHeatRatio return self.model.getAutosizedValue(self, 'Design Size Rated Sensible Heat Ratio', '') end |
#autosizedRatedTotalCoolingCapacity ⇒ Object
returns the autosized rated total cooling capacity as an optional double
42 43 44 45 46 |
# File 'lib/openstudio-standards/hvac_sizing/Siz.CoilCoolingDXSingleSpeed.rb', line 42 def autosizedRatedTotalCoolingCapacity return self.model.getAutosizedValue(self, 'Design Size Gross Rated Total Cooling Capacity', 'W') end |
#find_capacity ⇒ Double
Finds capacity in W
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 |
# File 'lib/openstudio-standards/standards/Standards.CoilCoolingDXSingleSpeed.rb', line 9 def find_capacity capacity_w = nil if ratedTotalCoolingCapacity.is_initialized capacity_w = ratedTotalCoolingCapacity.get elsif autosizedRatedTotalCoolingCapacity.is_initialized capacity_w = autosizedRatedTotalCoolingCapacity.get else OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CoilCoolingDXSingleSpeed', "For #{name} capacity is not available, cannot apply efficiency standard.") return 0.0 end # If it's a PTAC or PTHP System, we need to divide the capacity by the potential zone multiplier # because the COP is dependent on capacity, and the capacity should be the capacity of a single zone, not all the zones if ['PTAC', 'PTHP'].include?(subcategory) mult = 1 comp = containingZoneHVACComponent if comp.is_initialized if comp.get.thermalZone.is_initialized mult = comp.get.thermalZone.get.multiplier if mult > 1 total_cap = capacity_w capacity_w /= mult OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.CoilCoolingDXSingleSpeed', "For #{name}, total capacity of #{OpenStudio.convert(total_cap, 'W', 'kBtu/hr').get.round(2)}kBTU/hr was divided by the zone multiplier of #{mult} to give #{capacity_kbtu_per_hr = OpenStudio.convert(capacity_w, 'W', 'kBtu/hr').get.round(2)}kBTU/hr.") end end end end return capacity_w end |
#standard_minimum_cop(template, rename = false) ⇒ Double
Finds lookup object in standards and return efficiency
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 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 |
# File 'lib/openstudio-standards/standards/Standards.CoilCoolingDXSingleSpeed.rb', line 45 def standard_minimum_cop(template, rename=false) search_criteria = find_search_criteria(template) cooling_type = search_criteria['cooling_type'] heating_type = search_criteria['heating_type'] sub_category = search_criteria['subcategory'] capacity_w = find_capacity capacity_btu_per_hr = OpenStudio.convert(capacity_w, 'W', 'Btu/hr').get capacity_kbtu_per_hr = OpenStudio.convert(capacity_w, 'W', 'kBtu/hr').get # Look up the efficiency characteristics # Lookup efficiencies depending on whether it is a unitary AC or a heat pump ac_props = nil ac_props = if heat_pump? model.find_object($os_standards['heat_pumps'], search_criteria, capacity_btu_per_hr, Date.today) else model.find_object($os_standards['unitary_acs'], search_criteria, capacity_btu_per_hr, Date.today) end # Check to make sure properties were found if ac_props.nil? OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.CoilCoolingDXSingleSpeed', "For #{name}, cannot find efficiency info, cannot apply efficiency standard.") successfully_set_all_properties = false return successfully_set_all_properties end # Get the minimum efficiency standards cop = nil # If PTHP, use equations if sub_category == 'PTHP' pthp_eer_coeff_1 = ac_props['pthp_eer_coefficient_1'] pthp_eer_coeff_2 = ac_props['pthp_eer_coefficient_2'] # TABLE 6.8.1D # EER = pthp_eer_coeff_1 - (pthp_eer_coeff_2 * Cap / 1000) # Note c: Cap means the rated cooling capacity of the product in Btu/h. # If the unit's capacity is less than 7000 Btu/h, use 7000 Btu/h in the calculation. # If the unit's capacity is greater than 15,000 Btu/h, use 15,000 Btu/h in the calculation. eer_calc_cap_btu_per_hr = capacity_btu_per_hr eer_calc_cap_btu_per_hr = 7000 if capacity_btu_per_hr < 7000 eer_calc_cap_btu_per_hr = 15_000 if capacity_btu_per_hr > 15_000 pthp_eer = pthp_eer_coeff_1 - (pthp_eer_coeff_2 * eer_calc_cap_btu_per_hr / 1000.0) cop = eer_to_cop(pthp_eer, OpenStudio.convert(capacity_btu_per_hr, 'Btu/hr', 'W').get) new_comp_name = "#{name} #{capacity_kbtu_per_hr.round}kBtu/hr #{pthp_eer.round(1)}EER" OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.CoilCoolingDXSingleSpeed', "For #{name}: #{cooling_type} #{heating_type} #{sub_category} Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; EER = #{pthp_eer.round(1)}") end # If PTAC, use equations if sub_category == 'PTAC' ptac_eer_coeff_1 = ac_props['ptac_eer_coefficient_1'] ptac_eer_coeff_2 = ac_props['ptac_eer_coefficient_2'] # TABLE 6.8.1D # EER = ptac_eer_coeff_1 - (ptac_eer_coeff_2 * Cap / 1000) # Note c: Cap means the rated cooling capacity of the product in Btu/h. # If the unit's capacity is less than 7000 Btu/h, use 7000 Btu/h in the calculation. # If the unit's capacity is greater than 15,000 Btu/h, use 15,000 Btu/h in the calculation. eer_calc_cap_btu_per_hr = capacity_btu_per_hr eer_calc_cap_btu_per_hr = 7000 if capacity_btu_per_hr < 7000 eer_calc_cap_btu_per_hr = 15_000 if capacity_btu_per_hr > 15_000 ptac_eer = ptac_eer_coeff_1 - (ptac_eer_coeff_2 * eer_calc_cap_btu_per_hr / 1000.0) cop = eer_to_cop(ptac_eer, OpenStudio.convert(capacity_btu_per_hr, 'Btu/hr', 'W').get) new_comp_name = "#{name} #{capacity_kbtu_per_hr.round}kBtu/hr #{ptac_eer.round(1)}EER" OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.CoilCoolingDXSingleSpeed', "For #{name}: #{cooling_type} #{heating_type} #{sub_category} Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; EER = #{ptac_eer.round(1)}") end # If specified as SEER unless ac_props['minimum_seasonal_energy_efficiency_ratio'].nil? min_seer = ac_props['minimum_seasonal_energy_efficiency_ratio'] cop = seer_to_cop_cooling_no_fan(min_seer) new_comp_name = "#{name} #{capacity_kbtu_per_hr.round}kBtu/hr #{min_seer}SEER" OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.CoilCoolingDXSingleSpeed', "For #{template}: #{name}: #{cooling_type} #{heating_type} #{sub_category} Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; SEER = #{min_seer}") end # If specified as EER unless ac_props['minimum_energy_efficiency_ratio'].nil? min_eer = ac_props['minimum_energy_efficiency_ratio'] cop = eer_to_cop(min_eer, OpenStudio.convert(capacity_kbtu_per_hr, 'kBtu/hr', 'W').get) new_comp_name = "#{name} #{capacity_kbtu_per_hr.round}kBtu/hr #{min_eer}EER" OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.CoilCoolingDXSingleSpeed', "For #{template}: #{name}: #{cooling_type} #{heating_type} #{sub_category} Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; EER = #{min_eer}") end # if specified as SEER (heat pump) unless ac_props['minimum_seasonal_efficiency'].nil? min_seer = ac_props['minimum_seasonal_efficiency'] cop = seer_to_cop_cooling_no_fan(min_seer) new_comp_name = "#{name} #{capacity_kbtu_per_hr.round}kBtu/hr #{min_seer}SEER" OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.CoilCoolingDXSingleSpeed', "For #{template}: #{name}: #{cooling_type} #{heating_type} #{sub_category} Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; SEER = #{min_seer}") end # If specified as EER (heat pump) unless ac_props['minimum_full_load_efficiency'].nil? min_eer = ac_props['minimum_full_load_efficiency'] cop = eer_to_cop(min_eer, OpenStudio.convert(capacity_kbtu_per_hr, 'kBtu/hr', 'W').get) new_comp_name = "#{name} #{capacity_kbtu_per_hr.round}kBtu/hr #{min_eer}EER" OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.CoilCoolingDXSingleSpeed', "For #{template}: #{name}: #{cooling_type} #{heating_type} #{sub_category} Capacity = #{capacity_kbtu_per_hr.round}kBtu/hr; EER = #{min_eer}") end # Rename if rename setName(new_comp_name) end return cop end |