From 06c45accbfdff9a8e61242891b4f5e90205c5a36 Mon Sep 17 00:00:00 2001 From: Scott Horowitz Date: Mon, 21 Oct 2024 22:00:48 -0600 Subject: [PATCH] Bugfix. --- HPXMLtoOpenStudio/measure.xml | 6 +++--- HPXMLtoOpenStudio/resources/defaults.rb | 24 ++++++++++++------------ 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/HPXMLtoOpenStudio/measure.xml b/HPXMLtoOpenStudio/measure.xml index 60576b1bb6..f834f1337d 100644 --- a/HPXMLtoOpenStudio/measure.xml +++ b/HPXMLtoOpenStudio/measure.xml @@ -3,8 +3,8 @@ 3.1 hpxm_lto_openstudio b1543b30-9465-45ff-ba04-1d1f85e763bc - 6b202b2c-f087-4df2-80d0-db97fd438149 - 2024-10-22T01:05:11Z + aab4ee31-48b7-4f7a-bfc0-1d8edf16961d + 2024-10-22T03:59:34Z D8922A73 HPXMLtoOpenStudio HPXML to OpenStudio Translator @@ -327,7 +327,7 @@ defaults.rb rb resource - 48D9F7F8 + 5B6D3CB2 energyplus.rb diff --git a/HPXMLtoOpenStudio/resources/defaults.rb b/HPXMLtoOpenStudio/resources/defaults.rb index f7e006d67b..df077becff 100644 --- a/HPXMLtoOpenStudio/resources/defaults.rb +++ b/HPXMLtoOpenStudio/resources/defaults.rb @@ -2881,6 +2881,14 @@ def self.apply_water_heaters(hpxml_bldg, eri_version, schedules_file) water_heating_system.performance_adjustment = get_water_heater_performance_adjustment(water_heating_system) water_heating_system.performance_adjustment_isdefaulted = true end + if water_heating_system.usage_bin.nil? && (not water_heating_system.uniform_energy_factor.nil?) # FHR & UsageBin only applies to UEF + if not water_heating_system.first_hour_rating.nil? + water_heating_system.usage_bin = get_water_heater_usage_bin(water_heating_system.first_hour_rating) + else + water_heating_system.usage_bin = HPXML::WaterHeaterUsageBinMedium + end + water_heating_system.usage_bin_isdefaulted = true + end if (water_heating_system.water_heater_type == HPXML::WaterHeaterTypeCombiStorage) if water_heating_system.tank_volume.nil? water_heating_system.tank_volume = get_water_heater_tank_volume(water_heating_system.related_hvac_system.heating_system_fuel, nbeds, nbaths) @@ -2936,19 +2944,11 @@ def self.apply_water_heaters(hpxml_bldg, eri_version, schedules_file) water_heating_system.operating_mode_isdefaulted = true end end - if water_heating_system.location.nil? - iecc_zone = hpxml_bldg.climate_and_risk_zones.climate_zone_ieccs.empty? ? nil : hpxml_bldg.climate_and_risk_zones.climate_zone_ieccs[0].zone - water_heating_system.location = get_water_heater_location(hpxml_bldg, iecc_zone) - water_heating_system.location_isdefaulted = true - end - next unless water_heating_system.usage_bin.nil? && (not water_heating_system.uniform_energy_factor.nil?) # FHR & UsageBin only applies to UEF + next unless water_heating_system.location.nil? - if not water_heating_system.first_hour_rating.nil? - water_heating_system.usage_bin = get_water_heater_usage_bin(water_heating_system.first_hour_rating) - else - water_heating_system.usage_bin = HPXML::WaterHeaterUsageBinMedium - end - water_heating_system.usage_bin_isdefaulted = true + iecc_zone = hpxml_bldg.climate_and_risk_zones.climate_zone_ieccs.empty? ? nil : hpxml_bldg.climate_and_risk_zones.climate_zone_ieccs[0].zone + water_heating_system.location = get_water_heater_location(hpxml_bldg, iecc_zone) + water_heating_system.location_isdefaulted = true end end