Skip to content

Commit

Permalink
Set rated cfm/ton to 400. (Code will be simplified in a subsequent PR.)
Browse files Browse the repository at this point in the history
  • Loading branch information
shorowit committed Feb 22, 2025
1 parent 097d036 commit c5b4f62
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 44 deletions.
8 changes: 4 additions & 4 deletions HPXMLtoOpenStudio/measure.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<schema_version>3.1</schema_version>
<name>hpxm_lto_openstudio</name>
<uid>b1543b30-9465-45ff-ba04-1d1f85e763bc</uid>
<version_id>c95bda15-eeb0-48fc-b4d6-e446f5d5e708</version_id>
<version_modified>2025-02-21T23:45:46Z</version_modified>
<version_id>be03b9f4-60fd-454f-bce3-18f9573396fe</version_id>
<version_modified>2025-02-21T23:59:04Z</version_modified>
<xml_checksum>D8922A73</xml_checksum>
<class_name>HPXMLtoOpenStudio</class_name>
<display_name>HPXML to OpenStudio Translator</display_name>
Expand Down Expand Up @@ -387,7 +387,7 @@
<filename>hvac.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>D3B72165</checksum>
<checksum>583EBD15</checksum>
</file>
<file>
<filename>hvac_sizing.rb</filename>
Expand Down Expand Up @@ -723,7 +723,7 @@
<filename>test_hvac.rb</filename>
<filetype>rb</filetype>
<usage_type>test</usage_type>
<checksum>4A03BB93</checksum>
<checksum>DCCB51E3</checksum>
</file>
<file>
<filename>test_hvac_sizing.rb</filename>
Expand Down
44 changes: 16 additions & 28 deletions HPXMLtoOpenStudio/resources/hvac.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2120,11 +2120,11 @@ def self.get_heat_capacity_ratios_5F(heat_pump)
# @return [Array<Double>] cooling cfm/ton of rated capacity for each speed
def self.get_cool_cfm_per_ton(compressor_type)
if compressor_type == HPXML::HVACCompressorTypeSingleStage
return [394.2]
return [400.0]
elsif compressor_type == HPXML::HVACCompressorTypeTwoStage
return [411.0083, 344.1]
return [400.0] * 2
elsif compressor_type == HPXML::HVACCompressorTypeVariableSpeed
return [400.0, 400.0, 400.0]
return [400.0] * 3
else
fail 'Compressor type not supported.'
end
Expand All @@ -2137,11 +2137,11 @@ def self.get_cool_cfm_per_ton(compressor_type)
def self.get_heat_cfm_per_ton(compressor_type)
case compressor_type
when HPXML::HVACCompressorTypeSingleStage
return [384.1]
return [400.0]
when HPXML::HVACCompressorTypeTwoStage
return [391.3333, 352.2]
return [400.0] * 2
when HPXML::HVACCompressorTypeVariableSpeed
return [400.0, 400.0, 400.0]
return [400.0] * 3
else
fail 'Compressor type not supported.'
end
Expand All @@ -2151,7 +2151,7 @@ def self.get_heat_cfm_per_ton(compressor_type)
#
# @return [Array<Double>] heating cfm/ton of rated capacity for one speed
def self.get_heat_cfm_per_ton_simple()
return [350.0]
return [400.0]
end

# TODO
Expand Down Expand Up @@ -4626,21 +4626,15 @@ def self.calc_plr_coefficients(c_d)
def self.set_cool_c_d(cooling_system)
clg_ap = cooling_system.additional_properties

# Degradation coefficient for cooling
if is_room_dx_hvac_system(cooling_system)
clg_ap.cool_c_d = 0.22
else
# Per RESNET MINHERS Addendum 82
case cooling_system.compressor_type
when HPXML::HVACCompressorTypeSingleStage
if calc_seer_from_seer2(cooling_system) < 13.0
clg_ap.cool_c_d = 0.20
else
clg_ap.cool_c_d = 0.07
end
when HPXML::HVACCompressorTypeTwoStage
clg_ap.cool_c_d = 0.11
when HPXML::HVACCompressorTypeSingleStage, HPXML::HVACCompressorTypeTwoStage
clg_ap.cool_c_d = 0.08
when HPXML::HVACCompressorTypeVariableSpeed
clg_ap.cool_c_d = 0.25
clg_ap.cool_c_d = 0.40
end
end

Expand All @@ -4656,21 +4650,15 @@ def self.set_cool_c_d(cooling_system)
def self.set_heat_c_d(heating_system)
htg_ap = heating_system.additional_properties

# Degradation coefficient for heating
if (heating_system.is_a? HPXML::HeatPump) && ([HPXML::HVACTypeHeatPumpPTHP, HPXML::HVACTypeHeatPumpRoom].include? heating_system.heat_pump_type)
if is_room_dx_hvac_system(heating_system)
htg_ap.heat_c_d = 0.22
else
# Per RESNET MINHERS Addendum 82
case heating_system.compressor_type
when HPXML::HVACCompressorTypeSingleStage
if calc_hspf_from_hspf2(heating_system) < 7.0
htg_ap.heat_c_d = 0.20
else
htg_ap.heat_c_d = 0.11
end
when HPXML::HVACCompressorTypeTwoStage
htg_ap.heat_c_d = 0.11
when HPXML::HVACCompressorTypeSingleStage, HPXML::HVACCompressorTypeTwoStage
htg_ap.heat_c_d = 0.08
when HPXML::HVACCompressorTypeVariableSpeed
htg_ap.heat_c_d = 0.25
htg_ap.heat_c_d = 0.40
end
end

Expand Down
24 changes: 12 additions & 12 deletions HPXMLtoOpenStudio/tests/test_hvac.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def test_central_air_conditioner_2_speed
[4.95, 4.53].each_with_index do |cop, i|
assert_in_epsilon(cop, clg_coil.stages[i].grossRatedCoolingCOP, 0.01)
end
[5252, 7158].each_with_index do |capacity, i|
[5252, 7259].each_with_index do |capacity, i|
assert_in_epsilon(capacity, clg_coil.stages[i].grossRatedTotalCoolingCapacity.get, 0.01)
end

Expand Down Expand Up @@ -612,7 +612,7 @@ def test_air_to_air_heat_pump_2_speed
[4.95, 4.53].each_with_index do |cop, i|
assert_in_epsilon(cop, clg_coil.stages[i].grossRatedCoolingCOP, 0.01)
end
[7870, 10736].each_with_index do |clg_capacity, i|
[7870, 10888].each_with_index do |clg_capacity, i|
assert_in_epsilon(clg_capacity, clg_coil.stages[i].grossRatedTotalCoolingCapacity.get, 0.01)
end

Expand Down Expand Up @@ -1375,10 +1375,10 @@ def test_install_quality_air_to_air_heat_pump_2_speed
# Get HPXML values
heat_pump = hpxml_bldg.heat_pumps[0]
program_values = _check_install_quality_multispeed_ratio(heat_pump, model, heat_pump)
[0.87, 0.87].each_with_index do |rated_airflow_ratio, i|
[0.75, 0.75].each_with_index do |rated_airflow_ratio, i|
assert_in_epsilon(rated_airflow_ratio, program_values['FF_AF_clg'][i], 0.01)
end
[0.8, 0.8].each_with_index do |rated_airflow_ratio, i|
[0.7, 0.7].each_with_index do |rated_airflow_ratio, i|
assert_in_epsilon(rated_airflow_ratio, program_values['FF_AF_htg'][i], 0.01)
end
end
Expand All @@ -1391,10 +1391,10 @@ def test_install_quality_air_to_air_heat_pump_var_speed
# Get HPXML values
heat_pump = hpxml_bldg.heat_pumps[0]
program_values = _check_install_quality_multispeed_ratio(heat_pump, model, heat_pump)
[0.748, 0.748].each_with_index do |rated_airflow_ratio, i|
[0.75, 0.75].each_with_index do |rated_airflow_ratio, i|
assert_in_epsilon(rated_airflow_ratio, program_values['FF_AF_clg'][i], 0.01)
end
[0.702, 0.702].each_with_index do |rated_airflow_ratio, i|
[0.70, 0.70].each_with_index do |rated_airflow_ratio, i|
assert_in_epsilon(rated_airflow_ratio, program_values['FF_AF_htg'][i], 0.01)
end

Expand All @@ -1404,10 +1404,10 @@ def test_install_quality_air_to_air_heat_pump_var_speed
# Get HPXML values
heat_pump = hpxml_bldg.heat_pumps[0]
program_values = _check_install_quality_multispeed_ratio(heat_pump, model, heat_pump)
[0.748, 0.748].each_with_index do |rated_airflow_ratio, i|
[0.75, 0.75].each_with_index do |rated_airflow_ratio, i|
assert_in_epsilon(rated_airflow_ratio, program_values['FF_AF_clg'][i], 0.01)
end
[0.702, 0.702].each_with_index do |rated_airflow_ratio, i|
[0.70, 0.70].each_with_index do |rated_airflow_ratio, i|
assert_in_epsilon(rated_airflow_ratio, program_values['FF_AF_htg'][i], 0.01)
end
end
Expand Down Expand Up @@ -1458,7 +1458,7 @@ def test_install_quality_furnace_central_air_conditioner_2_speed
# Get HPXML values
cooling_system = hpxml_bldg.cooling_systems[0]
program_values = _check_install_quality_multispeed_ratio(cooling_system, model)
[0.87, 0.87].each_with_index do |rated_airflow_ratio, i|
[0.75, 0.75].each_with_index do |rated_airflow_ratio, i|
assert_in_epsilon(rated_airflow_ratio, program_values['FF_AF_clg'][i], 0.01)
end
end
Expand All @@ -1471,7 +1471,7 @@ def test_install_quality_furnace_central_air_conditioner_var_speed
# Get HPXML values
cooling_system = hpxml_bldg.cooling_systems[0]
program_values = _check_install_quality_multispeed_ratio(cooling_system, model)
[0.747, 0.748].each_with_index do |rated_airflow_ratio, i|
[0.75, 0.75].each_with_index do |rated_airflow_ratio, i|
assert_in_epsilon(rated_airflow_ratio, program_values['FF_AF_clg'][i], 0.01)
end
end
Expand Down Expand Up @@ -1554,10 +1554,10 @@ def test_install_quality_mini_split_heat_pump
# Get HPXML values
heat_pump = hpxml_bldg.heat_pumps[0]
program_values = _check_install_quality_multispeed_ratio(heat_pump, model, heat_pump)
[0.748, 0.748].each_with_index do |rated_airflow_ratio, i|
[0.75, 0.75].each_with_index do |rated_airflow_ratio, i|
assert_in_epsilon(rated_airflow_ratio, program_values['FF_AF_clg'][i], 0.01)
end
[0.702, 0.702].each_with_index do |rated_airflow_ratio, i|
[0.70, 0.70].each_with_index do |rated_airflow_ratio, i|
assert_in_epsilon(rated_airflow_ratio, program_values['FF_AF_htg'][i], 0.01)
end
end
Expand Down

0 comments on commit c5b4f62

Please sign in to comment.