Skip to content

Commit

Permalink
Bugfix.
Browse files Browse the repository at this point in the history
  • Loading branch information
shorowit committed Oct 22, 2024
1 parent 60e80ec commit 06c45ac
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
6 changes: 3 additions & 3 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>6b202b2c-f087-4df2-80d0-db97fd438149</version_id>
<version_modified>2024-10-22T01:05:11Z</version_modified>
<version_id>aab4ee31-48b7-4f7a-bfc0-1d8edf16961d</version_id>
<version_modified>2024-10-22T03:59:34Z</version_modified>
<xml_checksum>D8922A73</xml_checksum>
<class_name>HPXMLtoOpenStudio</class_name>
<display_name>HPXML to OpenStudio Translator</display_name>
Expand Down Expand Up @@ -327,7 +327,7 @@
<filename>defaults.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>48D9F7F8</checksum>
<checksum>5B6D3CB2</checksum>
</file>
<file>
<filename>energyplus.rb</filename>
Expand Down
24 changes: 12 additions & 12 deletions HPXMLtoOpenStudio/resources/defaults.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 06c45ac

Please sign in to comment.