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
26 changes: 13 additions & 13 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>hpxml_to_openstudio</name>
<uid>b1543b30-9465-45ff-ba04-1d1f85e763bc</uid>
<version_id>033831a5-9516-48c0-9ed2-d9f07b0e1609</version_id>
<version_modified>2026-05-21T21:45:00Z</version_modified>
<version_id>40a959a9-0600-4ced-87d0-95260a45a38b</version_id>
<version_modified>2026-06-17T16:15: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 @@ -217,7 +217,7 @@
<filename>airflow.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>FEB9F10E</checksum>
<checksum>50E3B7E9</checksum>
</file>
<file>
<filename>battery.rb</filename>
Expand Down Expand Up @@ -367,7 +367,7 @@
<filename>defaults.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>4044148D</checksum>
<checksum>A3B194F3</checksum>
</file>
<file>
<filename>electric_panel.rb</filename>
Expand All @@ -391,19 +391,19 @@
<filename>geometry.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>7F402CF9</checksum>
<checksum>4666E48F</checksum>
</file>
<file>
<filename>hotwater_appliances.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>3413BD58</checksum>
<checksum>E0198FBF</checksum>
</file>
<file>
<filename>hpxml.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>4741A9D8</checksum>
<checksum>7BB98B65</checksum>
</file>
<file>
<filename>hpxml_schema/HPXML.xsd</filename>
Expand All @@ -421,7 +421,7 @@
<filename>hpxml_schematron/EPvalidator.sch</filename>
<filetype>sch</filetype>
<usage_type>resource</usage_type>
<checksum>0D042BF0</checksum>
<checksum>54FA6347</checksum>
</file>
<file>
<filename>hpxml_schematron/iso-schematron.xsd</filename>
Expand Down Expand Up @@ -715,7 +715,7 @@
<filename>waterheater.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>C9FBD6FB</checksum>
<checksum>C428F4AB</checksum>
</file>
<file>
<filename>weather.rb</filename>
Expand Down Expand Up @@ -751,7 +751,7 @@
<filename>test_defaults.rb</filename>
<filetype>rb</filetype>
<usage_type>test</usage_type>
<checksum>396FC7B6</checksum>
<checksum>BE1661EA</checksum>
</file>
<file>
<filename>test_electric_panel.rb</filename>
Expand All @@ -763,7 +763,7 @@
<filename>test_enclosure.rb</filename>
<filetype>rb</filetype>
<usage_type>test</usage_type>
<checksum>F3EDA5AC</checksum>
<checksum>0DA5536E</checksum>
</file>
<file>
<filename>test_generator.rb</filename>
Expand Down Expand Up @@ -829,7 +829,7 @@
<filename>test_validation.rb</filename>
<filetype>rb</filetype>
<usage_type>test</usage_type>
<checksum>08D1113A</checksum>
<checksum>EA35509A</checksum>
</file>
<file>
<filename>test_vehicle.rb</filename>
Expand All @@ -841,7 +841,7 @@
<filename>test_water_heater.rb</filename>
<filetype>rb</filetype>
<usage_type>test</usage_type>
<checksum>8DBA3BD3</checksum>
<checksum>F216022C</checksum>
</file>
<file>
<filename>test_weather.rb</filename>
Expand Down
52 changes: 29 additions & 23 deletions HPXMLtoOpenStudio/resources/hotwater_appliances.rb
Original file line number Diff line number Diff line change
Expand Up @@ -615,11 +615,12 @@ def self.calc_dishwasher_energy_gpd(runner, eri_version, hpxml_bldg, dishwasher,
end

if Constants::ERIVersions.index(eri_version) >= Constants::ERIVersions.index('2019A')
if dishwasher.rated_annual_kwh.nil?
dishwasher.rated_annual_kwh = calc_dishwasher_annual_kwh_from_ef(dishwasher.energy_factor)
rated_annual_kwh = dishwasher.rated_annual_kwh
if rated_annual_kwh.nil?
rated_annual_kwh = calc_dishwasher_annual_kwh_from_ef(dishwasher.energy_factor)
end
lcy = dishwasher.label_usage * 52.0
kwh_per_cyc = ((dishwasher.label_annual_gas_cost * 0.5497 / dishwasher.label_gas_rate - dishwasher.rated_annual_kwh * dishwasher.label_electric_rate * 0.02504 / dishwasher.label_electric_rate) / (dishwasher.label_electric_rate * 0.5497 / dishwasher.label_gas_rate - 0.02504)) / lcy
kwh_per_cyc = ((dishwasher.label_annual_gas_cost * 0.5497 / dishwasher.label_gas_rate - rated_annual_kwh * dishwasher.label_electric_rate * 0.02504 / dishwasher.label_electric_rate) / (dishwasher.label_electric_rate * 0.5497 / dishwasher.label_gas_rate - 0.02504)) / lcy
if n_occ.nil? # Asset calculation
if Constants::ERIVersions.index(eri_version) >= Constants::ERIVersions.index('latest') # FIXME: Change from 'latest' when incorporated in 301 standard
# RESNET HERS Addendum 81 Eq. 4.2-36a
Expand All @@ -637,18 +638,19 @@ def self.calc_dishwasher_energy_gpd(runner, eri_version, hpxml_bldg, dishwasher,
dwcpy = scy * (12.0 / dishwasher.place_setting_capacity)
annual_kwh = kwh_per_cyc * dwcpy

gpd = (dishwasher.rated_annual_kwh - kwh_per_cyc * lcy) * 0.02504 * dwcpy / 365.0
gpd = (rated_annual_kwh - kwh_per_cyc * lcy) * 0.02504 * dwcpy / 365.0
else
if dishwasher.energy_factor.nil?
dishwasher.energy_factor = calc_dishwasher_ef_from_annual_kwh(dishwasher.rated_annual_kwh)
energy_factor = dishwasher.energy_factor
if energy_factor.nil?
energy_factor = calc_dishwasher_ef_from_annual_kwh(dishwasher.rated_annual_kwh)
end
dwcpy = (88.4 + 34.9 * nbeds) * (12.0 / dishwasher.place_setting_capacity)
annual_kwh = ((86.3 + 47.73 / dishwasher.energy_factor) / 215.0) * dwcpy
annual_kwh = ((86.3 + 47.73 / energy_factor) / 215.0) * dwcpy

if Constants::ERIVersions.index(eri_version) >= Constants::ERIVersions.index('2014A')
gpd = dwcpy * (4.6415 * (1.0 / dishwasher.energy_factor) - 1.9295) / 365.0
gpd = dwcpy * (4.6415 * (1.0 / energy_factor) - 1.9295) / 365.0
else
gpd = ((88.4 + 34.9 * nbeds) * 8.16 - (88.4 + 34.9 * nbeds) * 12.0 / dishwasher.place_setting_capacity * (4.6415 * (1.0 / dishwasher.energy_factor) - 1.9295)) / 365.0
gpd = ((88.4 + 34.9 * nbeds) * 8.16 - (88.4 + 34.9 * nbeds) * 12.0 / dishwasher.place_setting_capacity * (4.6415 * (1.0 / energy_factor) - 1.9295)) / 365.0
end
end

Expand Down Expand Up @@ -714,13 +716,15 @@ def self.calc_clothes_dryer_energy(runner, eri_version, hpxml_bldg, clothes_drye
end

if Constants::ERIVersions.index(eri_version) >= Constants::ERIVersions.index('2019A')
if clothes_dryer.combined_energy_factor.nil?
clothes_dryer.combined_energy_factor = calc_clothes_dryer_cef_from_ef(clothes_dryer.energy_factor)
combined_energy_factor = clothes_dryer.combined_energy_factor
if combined_energy_factor.nil?
combined_energy_factor = calc_clothes_dryer_cef_from_ef(clothes_dryer.energy_factor)
end
if clothes_washer.integrated_modified_energy_factor.nil?
clothes_washer.integrated_modified_energy_factor = calc_clothes_washer_imef_from_mef(clothes_washer.modified_energy_factor)
integrated_modified_energy_factor = clothes_washer.integrated_modified_energy_factor
if integrated_modified_energy_factor.nil?
integrated_modified_energy_factor = calc_clothes_washer_imef_from_mef(clothes_washer.modified_energy_factor)
end
rmc = (0.97 * (clothes_washer.capacity / clothes_washer.integrated_modified_energy_factor) - clothes_washer.rated_annual_kwh / 312.0) / ((2.0104 * clothes_washer.capacity + 1.4242) * 0.455) + 0.04
rmc = (0.97 * (clothes_washer.capacity / integrated_modified_energy_factor) - clothes_washer.rated_annual_kwh / 312.0) / ((2.0104 * clothes_washer.capacity + 1.4242) * 0.455) + 0.04
if n_occ.nil? # Asset calculation
if Constants::ERIVersions.index(eri_version) >= Constants::ERIVersions.index('latest') # FIXME: Change from 'latest' when incorporated in 301 standard
# RESNET HERS Addendum 81 Eq. 4.2-34
Expand All @@ -736,32 +740,34 @@ def self.calc_clothes_dryer_energy(runner, eri_version, hpxml_bldg, clothes_drye
scy = 123.0 + 61.0 * n_occ # Eq. 1 from http://www.fsec.ucf.edu/en/publications/pdf/fsec-pf-464-15.pdf
end
acy = scy * ((3.0 * 2.08 + 1.59) / (clothes_washer.capacity * 2.08 + 1.59))
annual_kwh = (((rmc - 0.04) * 100) / 55.5) * (8.45 / clothes_dryer.combined_energy_factor) * acy
annual_kwh = (((rmc - 0.04) * 100) / 55.5) * (8.45 / combined_energy_factor) * acy
if clothes_dryer.fuel_type == HPXML::FuelTypeElectricity
annual_therm = 0.0
else
annual_therm = annual_kwh * 3412.0 * (1.0 - 0.07) * (3.73 / 3.30) / 100000
annual_kwh = annual_kwh * 0.07 * (3.73 / 3.30)
end
else
if clothes_dryer.energy_factor.nil?
clothes_dryer.energy_factor = calc_clothes_dryer_ef_from_cef(clothes_dryer.combined_energy_factor)
energy_factor = clothes_dryer.energy_factor
if energy_factor.nil?
energy_factor = calc_clothes_dryer_ef_from_cef(clothes_dryer.combined_energy_factor)
end
if clothes_washer.modified_energy_factor.nil?
clothes_washer.modified_energy_factor = calc_clothes_washer_mef_from_imef(clothes_washer.integrated_modified_energy_factor)
modified_energy_factor = clothes_washer.modified_energy_factor
if modified_energy_factor.nil?
modified_energy_factor = calc_clothes_washer_mef_from_imef(clothes_washer.integrated_modified_energy_factor)
end
if clothes_dryer.control_type == HPXML::ClothesDryerControlTypeTimer
field_util_factor = 1.18
elsif clothes_dryer.control_type == HPXML::ClothesDryerControlTypeMoisture
field_util_factor = 1.04
end
if clothes_dryer.fuel_type == HPXML::FuelTypeElectricity
annual_kwh = 12.5 * (164.0 + 46.5 * nbeds) * (field_util_factor / clothes_dryer.energy_factor) * ((clothes_washer.capacity / clothes_washer.modified_energy_factor) - clothes_washer.rated_annual_kwh / 392.0) / (0.2184 * (clothes_washer.capacity * 4.08 + 0.24))
annual_kwh = 12.5 * (164.0 + 46.5 * nbeds) * (field_util_factor / energy_factor) * ((clothes_washer.capacity / modified_energy_factor) - clothes_washer.rated_annual_kwh / 392.0) / (0.2184 * (clothes_washer.capacity * 4.08 + 0.24))
annual_therm = 0.0
else
annual_kwh = 12.5 * (164.0 + 46.5 * nbeds) * (field_util_factor / 3.01) * ((clothes_washer.capacity / clothes_washer.modified_energy_factor) - clothes_washer.rated_annual_kwh / 392.0) / (0.2184 * (clothes_washer.capacity * 4.08 + 0.24))
annual_therm = annual_kwh * 3412.0 * (1.0 - 0.07) * (3.01 / clothes_dryer.energy_factor) / 100000
annual_kwh = annual_kwh * 0.07 * (3.01 / clothes_dryer.energy_factor)
annual_kwh = 12.5 * (164.0 + 46.5 * nbeds) * (field_util_factor / 3.01) * ((clothes_washer.capacity / modified_energy_factor) - clothes_washer.rated_annual_kwh / 392.0) / (0.2184 * (clothes_washer.capacity * 4.08 + 0.24))
annual_therm = annual_kwh * 3412.0 * (1.0 - 0.07) * (3.01 / energy_factor) / 100000
annual_kwh = annual_kwh * 0.07 * (3.01 / energy_factor)
end
end

Expand Down
Loading