diff --git a/measures/comstock_sensitivity_reports/measure.rb b/measures/comstock_sensitivity_reports/measure.rb index 6898ea92f..4b93cf472 100644 --- a/measures/comstock_sensitivity_reports/measure.rb +++ b/measures/comstock_sensitivity_reports/measure.rb @@ -572,7 +572,7 @@ def get_heating_coil_capacity_and_cop(runner, model, coil) temp_capacity_w = speed.referenceUnitGrossRatedHeatingCapacity # get capacity and capacity at lower temperatures - cap_curve = stage.heatingCapacityFunctionofTemperatureCurve + cap_curve = speed.heatingCapacityFunctionofTemperatureCurve if cap_curve.to_CurveCubic.is_initialized coil_cap_17F = cap_curve.evaluate(OpenStudio.convert(17.0, 'F', 'C').get) capacity_17F_w = capacity_w * coil_cap_17F if temp_capacity_w >= capacity_w diff --git a/resources/measures/upgrade_hvac_add_heat_pump_rtu/measure.rb b/resources/measures/upgrade_hvac_add_heat_pump_rtu/measure.rb index 41b7963a2..632c49192 100644 --- a/resources/measures/upgrade_hvac_add_heat_pump_rtu/measure.rb +++ b/resources/measures/upgrade_hvac_add_heat_pump_rtu/measure.rb @@ -680,19 +680,39 @@ def set_cooling_coil_stages(model, runner, stage_flows_cooling, stage_caps_cooli else # define multi speed cooling coil - new_dx_cooling_coil = OpenStudio::Model::CoilCoolingDXMultiSpeed.new(model) + #################################################################################### + # BEFORE + #################################################################################### + # new_dx_cooling_coil = OpenStudio::Model::CoilCoolingDXMultiSpeed.new(model) + # new_dx_cooling_coil.setName("#{air_loop_hvac.name} Heat Pump Cooling Coil") + # new_dx_cooling_coil.setCondenserType('AirCooled') + # new_dx_cooling_coil.setAvailabilitySchedule(always_on) # NA + # new_dx_cooling_coil.setMinimumOutdoorDryBulbTemperatureforCompressorOperation(-25) + # new_dx_cooling_coil.setApplyPartLoadFractiontoSpeedsGreaterthan1(enable_cycling_losses_above_lowest_speed) # NA + # new_dx_cooling_coil.setApplyLatentDegradationtoSpeedsGreaterthan1(false) # NA + # new_dx_cooling_coil.setFuelType('Electricity') # NA + # new_dx_cooling_coil.setMaximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperation(4.4) + # # methods from "TECHNICAL SUPPORT DOCUMENT: ENERGY EFFICIENCY PROGRAM FOR CONSUMER PRODUCTS AND COMMERCIAL AND INDUSTRIAL EQUIPMENT AIR-COOLED COMMERCIAL UNITARY AIR CONDITIONERS AND COMMERCIAL UNITARY HEAT PUMPS" + # crankcase_heater_power = ((60 * (stage_caps_cooling[rated_stage_num_cooling] * 0.0002843451 / 10)**0.67)) + # new_dx_cooling_coil.setCrankcaseHeaterCapacity(crankcase_heater_power) + # new_dx_cooling_coil.setMinimumOutdoorDryBulbTemperatureforCompressorOperation(-25) + #################################################################################### + # AFTER + #################################################################################### + new_dx_cooling_coil = OpenStudio::Model::CoilCoolingDXVariableSpeed.new(model) new_dx_cooling_coil.setName("#{air_loop_hvac.name} Heat Pump Cooling Coil") new_dx_cooling_coil.setCondenserType('AirCooled') - new_dx_cooling_coil.setAvailabilitySchedule(always_on) new_dx_cooling_coil.setMinimumOutdoorDryBulbTemperatureforCompressorOperation(-25) - new_dx_cooling_coil.setApplyPartLoadFractiontoSpeedsGreaterthan1(enable_cycling_losses_above_lowest_speed) - new_dx_cooling_coil.setApplyLatentDegradationtoSpeedsGreaterthan1(false) - new_dx_cooling_coil.setFuelType('Electricity') new_dx_cooling_coil.setMaximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperation(4.4) # methods from "TECHNICAL SUPPORT DOCUMENT: ENERGY EFFICIENCY PROGRAM FOR CONSUMER PRODUCTS AND COMMERCIAL AND INDUSTRIAL EQUIPMENT AIR-COOLED COMMERCIAL UNITARY AIR CONDITIONERS AND COMMERCIAL UNITARY HEAT PUMPS" crankcase_heater_power = ((60 * (stage_caps_cooling[rated_stage_num_cooling] * 0.0002843451 / 10)**0.67)) new_dx_cooling_coil.setCrankcaseHeaterCapacity(crankcase_heater_power) new_dx_cooling_coil.setMinimumOutdoorDryBulbTemperatureforCompressorOperation(-25) + new_dx_cooling_coil.setNominalTimeforCondensatetoBeginLeavingtheCoil(1000) + new_dx_cooling_coil.setInitialMoistureEvaporationRateDividedbySteadyStateACLatentCapacity(1.5) + new_dx_cooling_coil.setLatentCapacityTimeConstant(45) + new_dx_cooling_coil.setEnergyPartLoadFractionCurve(cool_plf_fplr1) + # new_dx_cooling_coil.autosizeEvaporativeCondenserPumpRatedPowerConsumption # NA, not used when air-cooled # loop through stages stage_caps_cooling.sort.each do |stage, cap| @@ -703,26 +723,44 @@ def set_cooling_coil_stages(model, runner, stage_flows_cooling, stage_caps_cooli applied_stage = stage_caps_cooling.reject { |_k, v| v == false }.keys.min if cap == false # add speed data for each stage - dx_coil_speed_data = OpenStudio::Model::CoilCoolingDXMultiSpeedStageData.new(model) - dx_coil_speed_data.setGrossRatedTotalCoolingCapacity(stage_caps_cooling[applied_stage]) - dx_coil_speed_data.setGrossRatedSensibleHeatRatio(stage_gross_rated_sensible_heat_ratio_cooling[applied_stage]) - dx_coil_speed_data.setRatedAirFlowRate(stage_flows_cooling[applied_stage]) - dx_coil_speed_data.setGrossRatedCoolingCOP(final_rated_cooling_cop * stage_rated_cop_frac_cooling[applied_stage]) + #################################################################################### + # BEFORE + #################################################################################### + # dx_coil_speed_data = OpenStudio::Model::CoilCoolingDXMultiSpeedStageData.new(model) + # dx_coil_speed_data.setGrossRatedTotalCoolingCapacity(stage_caps_cooling[applied_stage]) + # dx_coil_speed_data.setGrossRatedSensibleHeatRatio(stage_gross_rated_sensible_heat_ratio_cooling[applied_stage]) + # dx_coil_speed_data.setRatedAirFlowRate(stage_flows_cooling[applied_stage]) + # dx_coil_speed_data.setGrossRatedCoolingCOP(final_rated_cooling_cop * stage_rated_cop_frac_cooling[applied_stage]) + # dx_coil_speed_data.setRatedEvaporatorFanPowerPerVolumeFlowRate2017(773.3) + # dx_coil_speed_data.setTotalCoolingCapacityFunctionofTemperatureCurve(cool_cap_ft_curve_stages[applied_stage]) + # dx_coil_speed_data.setTotalCoolingCapacityFunctionofFlowFractionCurve(cool_cap_ff_curve_stages[applied_stage]) + # dx_coil_speed_data.setEnergyInputRatioFunctionofTemperatureCurve(cool_eir_ft_curve_stages[applied_stage]) + # dx_coil_speed_data.setEnergyInputRatioFunctionofFlowFractionCurve(cool_eir_ff_curve_stages[applied_stage]) + # dx_coil_speed_data.setPartLoadFractionCorrelationCurve(cool_plf_fplr1) + # dx_coil_speed_data.setEvaporativeCondenserEffectiveness(0.9) + # dx_coil_speed_data.setNominalTimeforCondensateRemovaltoBegin(1000) + # dx_coil_speed_data.setRatioofInitialMoistureEvaporationRateandSteadyStateLatentCapacity(1.5) + # dx_coil_speed_data.setLatentCapacityTimeConstant(45) + # dx_coil_speed_data.autosizeEvaporativeCondenserAirFlowRate + # dx_coil_speed_data.autosizeRatedEvaporativeCondenserPumpPowerConsumption + #################################################################################### + # AFTER + #################################################################################### + dx_coil_speed_data = OpenStudio::Model::CoilCoolingDXVariableSpeedSpeedData.new(model) + dx_coil_speed_data.setReferenceUnitGrossRatedTotalCoolingCapacity(stage_caps_cooling[applied_stage]) + dx_coil_speed_data.setReferenceUnitGrossRatedSensibleHeatRatio(stage_gross_rated_sensible_heat_ratio_cooling[applied_stage]) + dx_coil_speed_data.setReferenceUnitRatedAirFlowRate(stage_flows_cooling[applied_stage]) + dx_coil_speed_data.setReferenceUnitGrossRatedCoolingCOP(final_rated_cooling_cop * stage_rated_cop_frac_cooling[applied_stage]) dx_coil_speed_data.setRatedEvaporatorFanPowerPerVolumeFlowRate2017(773.3) dx_coil_speed_data.setTotalCoolingCapacityFunctionofTemperatureCurve(cool_cap_ft_curve_stages[applied_stage]) - dx_coil_speed_data.setTotalCoolingCapacityFunctionofFlowFractionCurve(cool_cap_ff_curve_stages[applied_stage]) + dx_coil_speed_data.setTotalCoolingCapacityFunctionofAirFlowFractionCurve(cool_cap_ff_curve_stages[applied_stage]) dx_coil_speed_data.setEnergyInputRatioFunctionofTemperatureCurve(cool_eir_ft_curve_stages[applied_stage]) - dx_coil_speed_data.setEnergyInputRatioFunctionofFlowFractionCurve(cool_eir_ff_curve_stages[applied_stage]) - dx_coil_speed_data.setPartLoadFractionCorrelationCurve(cool_plf_fplr1) - dx_coil_speed_data.setEvaporativeCondenserEffectiveness(0.9) - dx_coil_speed_data.setNominalTimeforCondensateRemovaltoBegin(1000) - dx_coil_speed_data.setRatioofInitialMoistureEvaporationRateandSteadyStateLatentCapacity(1.5) - dx_coil_speed_data.setLatentCapacityTimeConstant(45) - dx_coil_speed_data.autosizeEvaporativeCondenserAirFlowRate - dx_coil_speed_data.autosizeRatedEvaporativeCondenserPumpPowerConsumption + dx_coil_speed_data.setEnergyInputRatioFunctionofAirFlowFractionCurve(cool_eir_ff_curve_stages[applied_stage]) + # dx_coil_speed_data.setEvaporativeCondenserEffectiveness(0.9) # NA + # dx_coil_speed_data.autosizeEvaporativeCondenserAirFlowRate # NA # add speed data to multispeed coil object - new_dx_cooling_coil.addStage(dx_coil_speed_data) # unless stage_caps_heating[stage] == false + new_dx_cooling_coil.addSpeed(dx_coil_speed_data) # unless stage_caps_heating[stage] == false end end new_dx_cooling_coil @@ -776,7 +814,29 @@ def set_heating_coil_stages(model, runner, stage_flows_heating, stage_caps_heati # use multi speed DX heating coil if multiple speeds are defined else # define multi speed heating coil - new_dx_heating_coil = OpenStudio::Model::CoilHeatingDXMultiSpeed.new(model) + #################################################################################### + # BEFORE + #################################################################################### + # new_dx_heating_coil = OpenStudio::Model::CoilHeatingDXMultiSpeed.new(model) + # new_dx_heating_coil.setName("#{air_loop_hvac.name} Heat Pump heating Coil") + # new_dx_heating_coil.setMinimumOutdoorDryBulbTemperatureforCompressorOperation(OpenStudio.convert(hp_min_comp_lockout_temp_f, 'F', 'C').get) + # new_dx_heating_coil.setAvailabilitySchedule(always_on) + # new_dx_heating_coil.setApplyPartLoadFractiontoSpeedsGreaterthan1(enable_cycling_losses_above_lowest_speed) + # new_dx_heating_coil.setFuelType('Electricity') + # # methods from "TECHNICAL SUPPORT DOCUMENT: ENERGY EFFICIENCY PROGRAM FOR CONSUMER PRODUCTS AND COMMERCIAL AND INDUSTRIAL EQUIPMENT AIR-COOLED COMMERCIAL UNITARY AIR CONDITIONERS AND COMMERCIAL UNITARY HEAT PUMPS" + # crankcase_heater_power = ((60 * (stage_caps_heating[rated_stage_num_heating] * 0.0002843451 / 10)**0.67)) + # new_dx_heating_coil.setCrankcaseHeaterCapacity(crankcase_heater_power) + # new_dx_heating_coil.setMaximumOutdoorDryBulbTemperatureforCrankcaseHeaterOperation(4.4) + # new_dx_heating_coil.setDefrostEnergyInputRatioFunctionofTemperatureCurve(defrost_eir) + # new_dx_heating_coil.setMaximumOutdoorDryBulbTemperatureforDefrostOperation(4.444) + # new_dx_heating_coil.setDefrostStrategy('ReverseCycle') + # new_dx_heating_coil.setDefrostControl('OnDemand') + # new_dx_heating_coil.setDefrostTimePeriodFraction(0.058333) + # new_dx_heating_coil.setFuelType('Electricity') + #################################################################################### + # AFTER + #################################################################################### + new_dx_heating_coil = OpenStudio::Model::CoilHeatingDXVariableSpeed .new(model) new_dx_heating_coil.setName("#{air_loop_hvac.name} Heat Pump heating Coil") new_dx_heating_coil.setMinimumOutdoorDryBulbTemperatureforCompressorOperation(OpenStudio.convert( hp_min_comp_lockout_temp_f, 'F', 'C' @@ -793,7 +853,8 @@ def set_heating_coil_stages(model, runner, stage_flows_heating, stage_caps_heati new_dx_heating_coil.setDefrostStrategy('ReverseCycle') new_dx_heating_coil.setDefrostControl('OnDemand') new_dx_heating_coil.setDefrostTimePeriodFraction(0.058333) - new_dx_heating_coil.setFuelType('Electricity') + # new_dx_heating_coil.setFuelType('Electricity') # NA + new_dx_heating_coil.setEnergyPartLoadFractionCurve(heat_plf_fplr1) # loop through stages stage_caps_heating.sort.each do |stage, cap| @@ -805,20 +866,37 @@ def set_heating_coil_stages(model, runner, stage_flows_heating, stage_caps_heati applied_stage = stage_caps_heating.reject { |_k, v| v == false }.keys.min if cap == false # add speed data for each stage - dx_coil_speed_data = OpenStudio::Model::CoilHeatingDXMultiSpeedStageData.new(model) - dx_coil_speed_data.setGrossRatedHeatingCapacity(stage_caps_heating[applied_stage]) - dx_coil_speed_data.setGrossRatedHeatingCOP(final_rated_heating_cop * _stage_rated_cop_frac_heating[applied_stage]) - dx_coil_speed_data.setRatedAirFlowRate(stage_flows_heating[applied_stage]) - dx_coil_speed_data.setRatedSupplyAirFanPowerPerVolumeFlowRate2017(773.3) - dx_coil_speed_data.setHeatingCapacityFunctionofTemperatureCurve(heat_cap_ft_curve_stages[applied_stage]) + #################################################################################### + # BEFORE + #################################################################################### + # dx_coil_speed_data = OpenStudio::Model::CoilHeatingDXMultiSpeedStageData.new(model) + # dx_coil_speed_data.setGrossRatedHeatingCapacity(stage_caps_heating[applied_stage]) + # dx_coil_speed_data.setGrossRatedHeatingCOP(final_rated_heating_cop * _stage_rated_cop_frac_heating[applied_stage]) + # dx_coil_speed_data.setRatedAirFlowRate(stage_flows_heating[applied_stage]) + # dx_coil_speed_data.setRatedSupplyAirFanPowerPerVolumeFlowRate2017(773.3) + # dx_coil_speed_data.setHeatingCapacityFunctionofTemperatureCurve(heat_cap_ft_curve_stages[applied_stage]) + # # set performance curves + # dx_coil_speed_data.setHeatingCapacityFunctionofTemperatureCurve(heat_cap_ft_curve_stages[applied_stage]) + # dx_coil_speed_data.setHeatingCapacityFunctionofFlowFractionCurve(heat_cap_ff_curve_stages[applied_stage]) + # dx_coil_speed_data.setEnergyInputRatioFunctionofTemperatureCurve(heat_eir_ft_curve_stages[applied_stage]) + # dx_coil_speed_data.setEnergyInputRatioFunctionofFlowFractionCurve(heat_eir_ff_curve_stages[applied_stage]) + # dx_coil_speed_data.setPartLoadFractionCorrelationCurve(heat_plf_fplr1) + #################################################################################### + # AFTER + #################################################################################### + dx_coil_speed_data = OpenStudio::Model::CoilHeatingDXVariableSpeedSpeedData.new(model) + dx_coil_speed_data.setReferenceUnitGrossRatedHeatingCapacity(stage_caps_heating[applied_stage]) + dx_coil_speed_data.setReferenceUnitGrossRatedHeatingCOP(final_rated_heating_cop * _stage_rated_cop_frac_heating[applied_stage]) + dx_coil_speed_data.setReferenceUnitRatedAirFlowRate(stage_flows_heating[applied_stage]) + dx_coil_speed_data.setRatedSupplyFanPowerPerVolumeFlowRate2017(773.3) # set performance curves dx_coil_speed_data.setHeatingCapacityFunctionofTemperatureCurve(heat_cap_ft_curve_stages[applied_stage]) - dx_coil_speed_data.setHeatingCapacityFunctionofFlowFractionCurve(heat_cap_ff_curve_stages[applied_stage]) + dx_coil_speed_data.setTotalHeatingCapacityFunctionofAirFlowFractionCurve(heat_cap_ff_curve_stages[applied_stage]) dx_coil_speed_data.setEnergyInputRatioFunctionofTemperatureCurve(heat_eir_ft_curve_stages[applied_stage]) - dx_coil_speed_data.setEnergyInputRatioFunctionofFlowFractionCurve(heat_eir_ff_curve_stages[applied_stage]) - dx_coil_speed_data.setPartLoadFractionCorrelationCurve(heat_plf_fplr1) + dx_coil_speed_data.setEnergyInputRatioFunctionofAirFlowFractionCurve(heat_eir_ff_curve_stages[applied_stage]) + # add speed data to multispeed coil object - new_dx_heating_coil.addStage(dx_coil_speed_data) # falseunless stage_caps_cooling[stage] == false # temporary 'unless' until bug fix for (https://github.com/NREL/OpenStudio/issues/5277) + new_dx_heating_coil.addSpeed(dx_coil_speed_data) # falseunless stage_caps_cooling[stage] == false # temporary 'unless' until bug fix for (https://github.com/NREL/OpenStudio/issues/5277) end end new_dx_heating_coil @@ -2159,8 +2237,8 @@ def run(model, runner, user_arguments) upsize_factor = (dx_rated_htg_cap_applied - orig_clg_coil_gross_cap) / orig_clg_coil_gross_cap # upsize airflow accordingly - # design_heating_airflow_m_3_per_s *= (1 + upsize_factor) - # design_cooling_airflow_m_3_per_s *= (1 + upsize_factor) + design_heating_airflow_m_3_per_s *= (1 + upsize_factor) + design_cooling_airflow_m_3_per_s *= (1 + upsize_factor) if debug_verbose runner.registerInfo('sizing summary: before rated cfm/ton adjustmant') diff --git a/resources/measures/upgrade_hvac_add_heat_pump_rtu/tests/measure_test.rb b/resources/measures/upgrade_hvac_add_heat_pump_rtu/tests/measure_test.rb index b58d2e408..8f1953e80 100644 --- a/resources/measures/upgrade_hvac_add_heat_pump_rtu/tests/measure_test.rb +++ b/resources/measures/upgrade_hvac_add_heat_pump_rtu/tests/measure_test.rb @@ -342,7 +342,7 @@ def calc_cfm_per_ton_singlespdcoil_heating(model, cfm_per_ton_min, cfm_per_ton_m def calc_cfm_per_ton_multispdcoil_heating(model, cfm_per_ton_min, cfm_per_ton_max) # get relevant heating coils - coils_heating = model.getCoilHeatingDXMultiSpeedStageDatas + coils_heating = model.getCoilHeatingDXVariableSpeedSpeedDatas # check if there is at least one coil refute_equal(coils_heating.size, 0) @@ -350,10 +350,8 @@ def calc_cfm_per_ton_multispdcoil_heating(model, cfm_per_ton_min, cfm_per_ton_ma # calc cfm/ton coils_heating.each do |heating_coil| # get coil specs - if heating_coil.grossRatedHeatingCapacity.is_initialized - rated_capacity_w = heating_coil.grossRatedHeatingCapacity.get - end - rated_airflow_m_3_per_sec = heating_coil.ratedAirFlowRate.get if heating_coil.ratedAirFlowRate.is_initialized + rated_capacity_w = heating_coil.referenceUnitGrossRatedHeatingCapacity + rated_airflow_m_3_per_sec = heating_coil.referenceUnitRatedAirFlowRate # calc relevant metrics rated_capacity_ton = OpenStudio.convert(rated_capacity_w, 'W', 'ton').get @@ -368,7 +366,7 @@ def calc_cfm_per_ton_multispdcoil_heating(model, cfm_per_ton_min, cfm_per_ton_ma def calc_cfm_per_ton_multispdcoil_cooling(model, cfm_per_ton_min, cfm_per_ton_max) # get cooling coils - coils_cooling = model.getCoilCoolingDXMultiSpeedStageDatas + coils_cooling = model.getCoilCoolingDXVariableSpeedSpeedDatas # check if there is at least one coil refute_equal(coils_cooling.size, 0) @@ -376,10 +374,8 @@ def calc_cfm_per_ton_multispdcoil_cooling(model, cfm_per_ton_min, cfm_per_ton_ma # calc cfm/ton coils_cooling.each do |cooling_coil| # get coil specs - if cooling_coil.grossRatedTotalCoolingCapacity.is_initialized - rated_capacity_w = cooling_coil.grossRatedTotalCoolingCapacity.get - end - rated_airflow_m_3_per_sec = cooling_coil.ratedAirFlowRate.get if cooling_coil.ratedAirFlowRate.is_initialized + rated_capacity_w = cooling_coil.referenceUnitGrossRatedTotalCoolingCapacity + rated_airflow_m_3_per_sec = cooling_coil.referenceUnitRatedAirFlowRate # calc relevant metrics rated_capacity_ton = OpenStudio.convert(rated_capacity_w, 'W', 'ton').get @@ -547,29 +543,29 @@ def verify_hp_rtu(test_name, model, measure, argument_map, osm_path, epw_path) # ***heating*** # assert new unitary systems all have multispeed DX heating coils htg_coil = system.heatingCoil.get - assert(htg_coil.to_CoilHeatingDXMultiSpeed.is_initialized) - htg_coil = htg_coil.to_CoilHeatingDXMultiSpeed.get + assert(htg_coil.to_CoilHeatingDXVariableSpeed.is_initialized) + htg_coil = htg_coil.to_CoilHeatingDXVariableSpeed.get # assert multispeed heating coil has 4 stages - assert_equal(htg_coil.numberOfStages, 4) - htg_coil_spd4 = htg_coil.stages[3] + assert_equal(htg_coil.speeds.size, 4) + htg_coil_spd4 = htg_coil.speeds[3] # assert speed 4 flowrate matches design flow rate htg_dsn_flowrate = system.supplyAirFlowRateDuringHeatingOperation - assert_in_delta(htg_dsn_flowrate.to_f, htg_coil_spd4.ratedAirFlowRate.get, 0.000001) + assert_in_delta(htg_dsn_flowrate.to_f, htg_coil_spd4.referenceUnitRatedAirFlowRate, 0.000001) # assert flow rate reduces for lower speeds - htg_coil_spd3 = htg_coil.stages[2] - htg_coil_spd2 = htg_coil.stages[1] - htg_coil_spd1 = htg_coil.stages[0] - assert(htg_coil_spd4.ratedAirFlowRate.get > htg_coil_spd3.ratedAirFlowRate.get) - assert(htg_coil_spd3.ratedAirFlowRate.get > htg_coil_spd2.ratedAirFlowRate.get) - assert(htg_coil_spd2.ratedAirFlowRate.get > htg_coil_spd1.ratedAirFlowRate.get) + htg_coil_spd3 = htg_coil.speeds[2] + htg_coil_spd2 = htg_coil.speeds[1] + htg_coil_spd1 = htg_coil.speeds[0] + assert(htg_coil_spd4.referenceUnitRatedAirFlowRate > htg_coil_spd3.referenceUnitRatedAirFlowRate) + assert(htg_coil_spd3.referenceUnitRatedAirFlowRate > htg_coil_spd2.referenceUnitRatedAirFlowRate) + assert(htg_coil_spd2.referenceUnitRatedAirFlowRate > htg_coil_spd1.referenceUnitRatedAirFlowRate) # assert capacity reduces for lower speeds - assert(htg_coil_spd4.grossRatedHeatingCapacity.get > htg_coil_spd3.grossRatedHeatingCapacity.get) - assert(htg_coil_spd3.grossRatedHeatingCapacity.get > htg_coil_spd2.grossRatedHeatingCapacity.get) - assert(htg_coil_spd2.grossRatedHeatingCapacity.get > htg_coil_spd1.grossRatedHeatingCapacity.get) + assert(htg_coil_spd4.referenceUnitGrossRatedHeatingCapacity > htg_coil_spd3.referenceUnitGrossRatedHeatingCapacity) + assert(htg_coil_spd3.referenceUnitGrossRatedHeatingCapacity > htg_coil_spd2.referenceUnitGrossRatedHeatingCapacity) + assert(htg_coil_spd2.referenceUnitGrossRatedHeatingCapacity > htg_coil_spd1.referenceUnitGrossRatedHeatingCapacity) # assert supplemental heating coil type matches user-specified electric resistance sup_htg_coil = system.supplementalHeatingCoil.get @@ -578,29 +574,29 @@ def verify_hp_rtu(test_name, model, measure, argument_map, osm_path, epw_path) # ***cooling*** # assert new unitary systems all have multispeed DX cooling coils clg_coil = system.coolingCoil.get - assert(clg_coil.to_CoilCoolingDXMultiSpeed.is_initialized) - clg_coil = clg_coil.to_CoilCoolingDXMultiSpeed.get + assert(clg_coil.to_CoilCoolingDXVariableSpeed.is_initialized) + clg_coil = clg_coil.to_CoilCoolingDXVariableSpeed.get # assert multispeed heating coil has 4 stages - assert_equal(clg_coil.numberOfStages, 4) - clg_coil_spd4 = clg_coil.stages[3] + assert_equal(clg_coil.speeds.size, 4) + clg_coil_spd4 = clg_coil.speeds[3] # assert speed 4 flowrate matches design flow rate clg_dsn_flowrate = system.supplyAirFlowRateDuringCoolingOperation - assert_in_delta(clg_dsn_flowrate.to_f, clg_coil_spd4.ratedAirFlowRate.get, 0.000001) + assert_in_delta(clg_dsn_flowrate.to_f, clg_coil_spd4.referenceUnitRatedAirFlowRate, 0.000001) # assert flow rate reduces for lower speeds - clg_coil_spd3 = clg_coil.stages[2] - clg_coil_spd2 = clg_coil.stages[1] - clg_coil_spd1 = clg_coil.stages[0] - assert(clg_coil_spd4.ratedAirFlowRate.get > clg_coil_spd3.ratedAirFlowRate.get) - assert(clg_coil_spd3.ratedAirFlowRate.get > clg_coil_spd2.ratedAirFlowRate.get) - assert(clg_coil_spd2.ratedAirFlowRate.get > clg_coil_spd1.ratedAirFlowRate.get) + clg_coil_spd3 = clg_coil.speeds[2] + clg_coil_spd2 = clg_coil.speeds[1] + clg_coil_spd1 = clg_coil.speeds[0] + assert(clg_coil_spd4.referenceUnitRatedAirFlowRate > clg_coil_spd3.referenceUnitRatedAirFlowRate) + assert(clg_coil_spd3.referenceUnitRatedAirFlowRate > clg_coil_spd2.referenceUnitRatedAirFlowRate) + assert(clg_coil_spd2.referenceUnitRatedAirFlowRate > clg_coil_spd1.referenceUnitRatedAirFlowRate) # assert capacity reduces for lower speeds - assert(clg_coil_spd4.grossRatedTotalCoolingCapacity.get > clg_coil_spd3.grossRatedTotalCoolingCapacity.get) - assert(clg_coil_spd3.grossRatedTotalCoolingCapacity.get > clg_coil_spd2.grossRatedTotalCoolingCapacity.get) - assert(clg_coil_spd2.grossRatedTotalCoolingCapacity.get > clg_coil_spd1.grossRatedTotalCoolingCapacity.get) + assert(clg_coil_spd4.referenceUnitGrossRatedTotalCoolingCapacity > clg_coil_spd3.referenceUnitGrossRatedTotalCoolingCapacity) + assert(clg_coil_spd3.referenceUnitGrossRatedTotalCoolingCapacity > clg_coil_spd2.referenceUnitGrossRatedTotalCoolingCapacity) + assert(clg_coil_spd2.referenceUnitGrossRatedTotalCoolingCapacity > clg_coil_spd1.referenceUnitGrossRatedTotalCoolingCapacity) end result end @@ -653,44 +649,23 @@ def get_cooling_coil_capacity_and_cop(model, coil) raise "'Rated High Speed COP' not available for DX coil '#{coil.name}'." end end - elsif coil.to_CoilCoolingDXMultiSpeed.is_initialized - coil = coil.to_CoilCoolingDXMultiSpeed.get - - # capacity and cop, use cop at highest capacity - temp_capacity_w = 0.0 - coil.stages.each do |stage| - if stage.grossRatedTotalCoolingCapacity.is_initialized - temp_capacity_w = stage.grossRatedTotalCoolingCapacity.get - elsif stage.autosizedGrossRatedTotalCoolingCapacity.is_initialized - temp_capacity_w = stage.autosizedGrossRatedTotalCoolingCapacity.get - else - raise "Cooling coil capacity not available for coil stage '#{stage.name}'." - end - - # update cop if highest capacity - temp_coil_design_cop = stage.grossRatedCoolingCOP - coil_design_cop = temp_coil_design_cop if temp_capacity_w >= capacity_w - - # update if highest capacity - capacity_w = temp_capacity_w if temp_capacity_w > capacity_w - end elsif coil.to_CoilCoolingDXVariableSpeed.is_initialized coil = coil.to_CoilCoolingDXVariableSpeed.get # capacity and cop, use cop at highest capacity temp_capacity_w = 0.0 - coil.speeds.each do |speed| - temp_capacity_w = speed.referenceUnitGrossRatedTotalCoolingCapacity + coil.speeds.each do |stage| + temp_capacity_w = stage.referenceUnitGrossRatedTotalCoolingCapacity # update cop if highest capacity - temp_coil_design_cop = speed.referenceUnitGrossRatedCoolingCOP + temp_coil_design_cop = stage.referenceUnitGrossRatedCoolingCOP coil_design_cop = temp_coil_design_cop if temp_capacity_w >= capacity_w # update if highest capacity capacity_w = temp_capacity_w if temp_capacity_w > capacity_w end else - raise 'Design capacity is only available for DX cooling coil types CoilCoolingDXSingleSpeed, CoilCoolingDXTwoSpeed, CoilCoolingDXMultiSpeed, CoilCoolingDXVariableSpeed.' + raise 'Design capacity is only available for DX cooling coil types CoilCoolingDXSingleSpeed, CoilCoolingDXTwoSpeed, CoilCoolingDXVariableSpeed, CoilCoolingDXVariableSpeed.' end return capacity_w, coil_design_cop @@ -712,34 +687,15 @@ def get_heating_coil_capacity_and_cop(model, coil) # get rated cop and cop at lower temperatures coil_design_cop = coil.ratedCOP - elsif coil.to_CoilHeatingDXMultiSpeed.is_initialized - coil = coil.to_CoilHeatingDXMultiSpeed.get - temp_capacity_w = 0.0 - coil.stages.each do |stage| - if stage.grossRatedHeatingCapacity.is_initialized - temp_capacity_w = stage.grossRatedHeatingCapacity.get - elsif stage.autosizedGrossRatedHeatingCapacity.is_initialized - temp_capacity_w = stage.autosizedGrossRatedHeatingCapacity.get - else - raise "Heating coil capacity not available for coil stage '#{stage.name}'." - end - - # get cop and cop at lower temperatures - # pick cop at highest capacity - temp_coil_design_cop = stage.grossRatedHeatingCOP - coil_design_cop = temp_coil_design_cop if temp_capacity_w >= capacity_w - - # update if highest capacity - capacity_w = temp_capacity_w if temp_capacity_w > capacity_w - end elsif coil.to_CoilHeatingDXVariableSpeed.is_initialized coil = coil.to_CoilHeatingDXVariableSpeed.get - coil.speeds.each do |speed| - temp_capacity_w = speed.referenceUnitGrossRatedHeatingCapacity + temp_capacity_w = 0.0 + coil.speeds.each do |stage| + temp_capacity_w = stage.referenceUnitGrossRatedHeatingCapacity # get cop and cop at lower temperatures # pick cop at highest capacity - temp_coil_design_cop = speed.referenceUnitGrossRatedHeatingCOP + temp_coil_design_cop = stage.referenceUnitGrossRatedHeatingCOP coil_design_cop = temp_coil_design_cop if temp_capacity_w >= capacity_w # update if highest capacity @@ -864,7 +820,8 @@ def check_sizing_results_upsizing(model, sizing_summary_reference) # check airflow value_before = sizing_summary_reference['AirLoopHVAC'][name_obj]['designSupplyAirFlowRate'] value_after = airloophvac.designSupplyAirFlowRate.get - assert_in_epsilon(value_after, value_before, 0.01, "values difference not within threshold: AirLoopHVAC | #{name_obj} | designSupplyAirFlowRate") + increased_airflow = value_after - value_before > 0 + assert(true, increased_airflow, "airflow not increased with upsizing: value_after = #{value_after} | value_before = #{value_before} | designSupplyAirFlowRate") end model.getControllerOutdoorAirs.each do |ctrloa| name_obj = ctrloa.name.to_s @@ -904,7 +861,7 @@ def calc_cfm_per_ton_singlespdcoil_heating(model, cfm_per_ton_min, cfm_per_ton_m def calc_cfm_per_ton_multispdcoil_heating(model, cfm_per_ton_min, cfm_per_ton_max) # get relevant heating coils - coils_heating = model.getCoilHeatingDXMultiSpeedStageDatas + coils_heating = model.getCoilHeatingDXVariableSpeedSpeedDatas # check if there is at least one coil refute_equal(coils_heating.size, 0) @@ -912,10 +869,8 @@ def calc_cfm_per_ton_multispdcoil_heating(model, cfm_per_ton_min, cfm_per_ton_ma # calc cfm/ton coils_heating.each do |heating_coil| # get coil specs - if heating_coil.grossRatedHeatingCapacity.is_initialized - rated_capacity_w = heating_coil.grossRatedHeatingCapacity.get - end - rated_airflow_m_3_per_sec = heating_coil.ratedAirFlowRate.get if heating_coil.ratedAirFlowRate.is_initialized + rated_capacity_w = heating_coil.referenceUnitGrossRatedHeatingCapacity + rated_airflow_m_3_per_sec = heating_coil.referenceUnitRatedAirFlowRate # calc relevant metrics rated_capacity_ton = OpenStudio.convert(rated_capacity_w, 'W', 'ton').get @@ -930,7 +885,7 @@ def calc_cfm_per_ton_multispdcoil_heating(model, cfm_per_ton_min, cfm_per_ton_ma def calc_cfm_per_ton_multispdcoil_cooling(model, cfm_per_ton_min, cfm_per_ton_max) # get cooling coils - coils_cooling = model.getCoilCoolingDXMultiSpeedStageDatas + coils_cooling = model.getCoilCoolingDXVariableSpeedSpeedDatas # check if there is at least one coil refute_equal(coils_cooling.size, 0) @@ -938,10 +893,8 @@ def calc_cfm_per_ton_multispdcoil_cooling(model, cfm_per_ton_min, cfm_per_ton_ma # calc cfm/ton coils_cooling.each do |cooling_coil| # get coil specs - if cooling_coil.grossRatedTotalCoolingCapacity.is_initialized - rated_capacity_w = cooling_coil.grossRatedTotalCoolingCapacity.get - end - rated_airflow_m_3_per_sec = cooling_coil.ratedAirFlowRate.get if cooling_coil.ratedAirFlowRate.is_initialized + rated_capacity_w = cooling_coil.referenceUnitGrossRatedTotalCoolingCapacity + rated_airflow_m_3_per_sec = cooling_coil.referenceUnitRatedAirFlowRate # calc relevant metrics rated_capacity_ton = OpenStudio.convert(rated_capacity_w, 'W', 'ton').get @@ -1584,7 +1537,7 @@ def test_380_full_service_restaurant_psz_gas_coil # assert non kitchen spaces contain multispeed DX heating coils nonkitchen_htg_coils_final.each do |htg_coil| - assert(htg_coil.to_CoilHeatingDXMultiSpeed.is_initialized) + assert(htg_coil.to_CoilHeatingDXVariableSpeed.is_initialized) end # assert kitchen spaces still contain gas coils