Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 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>1649213e-7844-4807-9cb5-3d96d4d1ff7f</version_id>
<version_modified>2024-09-06T15:57:25Z</version_modified>
<version_id>3b678540-7b41-4cda-8eb9-a829bb0c5fe4</version_id>
<version_modified>2024-09-06T17:17:54Z</version_modified>
<xml_checksum>D8922A73</xml_checksum>
<class_name>HPXMLtoOpenStudio</class_name>
<display_name>HPXML to OpenStudio Translator</display_name>
Expand Down Expand Up @@ -363,7 +363,7 @@
<filename>hpxml_defaults.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>0F6B9DD0</checksum>
<checksum>92BB7113</checksum>
</file>
<file>
<filename>hpxml_schema/HPXML.xsd</filename>
Expand Down Expand Up @@ -621,7 +621,7 @@
<filename>waterheater.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>367FF6D6</checksum>
<checksum>20E8AE0A</checksum>
</file>
<file>
<filename>weather.rb</filename>
Expand Down Expand Up @@ -729,7 +729,7 @@
<filename>test_validation.rb</filename>
<filetype>rb</filetype>
<usage_type>test</usage_type>
<checksum>ABE770EA</checksum>
<checksum>A0D2EEB9</checksum>
</file>
<file>
<filename>test_water_heater.rb</filename>
Expand Down
6 changes: 4 additions & 2 deletions HPXMLtoOpenStudio/resources/hpxml_defaults.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2560,7 +2560,8 @@ def self.apply_hvac_location(hpxml_bldg)
end
elsif dist_type == HPXML::HVACDistributionTypeHydronic
# Assume same default logic as a water heater
hvac_system.location = Waterheater.get_default_location(hpxml_bldg, hpxml_bldg.climate_and_risk_zones.climate_zone_ieccs[0])
iecc_zone = hpxml_bldg.climate_and_risk_zones.climate_zone_ieccs.empty? ? nil : hpxml_bldg.climate_and_risk_zones.climate_zone_ieccs[0].zone
hvac_system.location = Waterheater.get_default_location(hpxml_bldg, iecc_zone)
elsif dist_type == HPXML::HVACDistributionTypeDSE
# DSE=1 implies distribution system in conditioned space
has_dse_of_one = true
Expand Down Expand Up @@ -2754,7 +2755,8 @@ def self.apply_water_heaters(hpxml_bldg, nbeds, eri_version, schedules_file)
end
end
if water_heating_system.location.nil?
water_heating_system.location = Waterheater.get_default_location(hpxml_bldg, hpxml_bldg.climate_and_risk_zones.climate_zone_ieccs[0])
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 = Waterheater.get_default_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
Expand Down
10 changes: 5 additions & 5 deletions HPXMLtoOpenStudio/resources/waterheater.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1698,13 +1698,13 @@ def self.get_default_performance_adjustment(water_heating_system)
end
end

# TODO
# Returns the default location of the water heater based on the IECC climate zone.
#
# @param hpxml_bldg [HPXML::Building] HPXML Building object representing an individual dwelling unit
# @param climate_zone_iecc [TODO] TODO
# @return [TODO] TODO
def self.get_default_location(hpxml_bldg, climate_zone_iecc)
iecc_zone = (climate_zone_iecc.nil? ? nil : climate_zone_iecc.zone)
# @param iecc_zone [string] IECC climate zone
# @return [string] Water heater location (HPXML::LocationXXX)
def self.get_default_location(hpxml_bldg, iecc_zone = nil)
# ANSI/RESNET/ICC 301-2022C
if ['1A', '1B', '1C', '2A', '2B', '2C', '3A', '3B', '3C'].include? iecc_zone
location_hierarchy = [HPXML::LocationGarage,
HPXML::LocationConditionedSpace]
Expand Down
2 changes: 1 addition & 1 deletion HPXMLtoOpenStudio/tests/test_validation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ def test_schema_schematron_error_messages
'invalid-id2' => ["Element 'SystemIdentifier': The attribute 'id' is required but missing."],
'invalid-input-parameters' => ["Element 'Transaction': [facet 'enumeration'] The value 'modify' is not an element of the set {'create', 'update'}.",
"Element 'SiteType': [facet 'enumeration'] The value 'mountain' is not an element of the set {'rural', 'suburban', 'urban'}.",
"Element 'Year': [facet 'enumeration'] The value '2020' is not an element of the set {'2021', '2018', '2015', '2012', '2009', '2006', '2003'}.",
"Element 'Year': [facet 'enumeration'] The value '2020' is not an element of the set {'2024', '2021', '2018', '2015', '2012', '2009', '2006', '2003'}.",
"Element 'Azimuth': [facet 'maxExclusive'] The value '365' must be less than '360'.",
"Element 'RadiantBarrierGrade': [facet 'maxInclusive'] The value '4' is greater than the maximum value allowed ('3').",
"Element 'EnergyFactor': [facet 'maxInclusive'] The value '5.1' is greater than the maximum value allowed ('5')."],
Expand Down
2 changes: 1 addition & 1 deletion docs/source/workflow_inputs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -929,7 +929,7 @@ Climate zone information can be optionally entered as an ``/HPXML/Building/Build
``ClimateZone`` string See [#]_ Yes IECC zone
================================= ======== ===== =========== ======== ======== ===============

.. [#] Year choices are 2003, 2006, 2009, 2012, 2015, 2018, or 2021.
.. [#] Year choices are 2003, 2006, 2009, 2012, 2015, 2018, 2021, or 2024.
.. [#] ClimateZone choices are "1A", "1B", "1C", "2A", "2B", "2C", "3A", "3B", "3C", "4A", "4B", "4C", "5A", "5B", "5C", "6A", "6B", "6C", "7", or "8".

If Climate zone information not provided, defaults according to the EPW weather file header.
Expand Down