Skip to content

Commit 02f3cf4

Browse files
committed
Update to latest HPXML schema for standby losses. Code backported from #1150.
1 parent f62df2c commit 02f3cf4

15 files changed

Lines changed: 161 additions & 76 deletions

File tree

BuildResidentialHPXML/measure.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5228,7 +5228,8 @@ def self.set_water_heating_systems(hpxml, args)
52285228
if [HPXML::WaterHeaterTypeCombiTankless, HPXML::WaterHeaterTypeCombiStorage].include? water_heater_type
52295229
if args[:water_heater_standby_loss].is_initialized
52305230
if args[:water_heater_standby_loss].get > 0
5231-
standby_loss = args[:water_heater_standby_loss].get
5231+
standby_loss_units = HPXML::UnitsDegFPerHour
5232+
standby_loss_value = args[:water_heater_standby_loss].get
52325233
end
52335234
end
52345235
end
@@ -5291,7 +5292,8 @@ def self.set_water_heating_systems(hpxml, args)
52915292
recovery_efficiency: recovery_efficiency,
52925293
uses_desuperheater: uses_desuperheater,
52935294
related_hvac_idref: related_hvac_idref,
5294-
standby_loss: standby_loss,
5295+
standby_loss_units: standby_loss_units,
5296+
standby_loss_value: standby_loss_value,
52955297
jacket_r_value: jacket_r_value,
52965298
temperature: temperature,
52975299
heating_capacity: heating_capacity,

BuildResidentialHPXML/measure.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
<schema_version>3.0</schema_version>
44
<name>build_residential_hpxml</name>
55
<uid>a13a8983-2b01-4930-8af2-42030b6e4233</uid>
6-
<version_id>1d0058f9-2963-443a-a959-78e5f088e7d2</version_id>
7-
<version_modified>20220926T172603Z</version_modified>
6+
<version_id>9a3394b8-30aa-4f07-a4c7-dfa6bbf1ba4b</version_id>
7+
<version_modified>20220929T155118Z</version_modified>
88
<xml_checksum>2C38F48B</xml_checksum>
99
<class_name>BuildResidentialHPXML</class_name>
1010
<display_name>HPXML Builder</display_name>
@@ -6413,7 +6413,7 @@
64136413
<filename>measure.rb</filename>
64146414
<filetype>rb</filetype>
64156415
<usage_type>script</usage_type>
6416-
<checksum>470336B9</checksum>
6416+
<checksum>C00BFDD4</checksum>
64176417
</file>
64186418
</files>
64196419
</measure>

Changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
__New Features__
44
- **Breaking Change**: Replaces `FrameFloors/FrameFloor` with `Floors/Floor`.
55
- **Breaking change**: Replaces `SoftwareInfo/extension/SimulationControl/DaylightSaving/Enabled` with `Building/Site/TimeZone/DSTObserved`.
6+
- **Breaking Change**: Replaces `StandbyLoss` with `StandbyLoss[Units="F/hr"]/Value` for an indirect water heater.
67
- Allows SEER2/HSPF2 efficiency types for central air conditioners and heat pumps.
78
- Allows heating/cooling seasons that don't span the entire year.
89
- Allows calculating one or more utility bill scenarios (e.g., net metering vs feed-in tariff compensation types for a simulation with PV).

HPXMLtoOpenStudio/measure.xml

Lines changed: 50 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
<schema_version>3.0</schema_version>
44
<name>hpxm_lto_openstudio</name>
55
<uid>b1543b30-9465-45ff-ba04-1d1f85e763bc</uid>
6-
<version_id>0be40881-8b15-4dd9-a51f-432b4fec76cd</version_id>
7-
<version_modified>20220927T180626Z</version_modified>
6+
<version_id>65d82b9f-532d-400b-8f27-183b6b08f5f9</version_id>
7+
<version_modified>20220929T155120Z</version_modified>
88
<xml_checksum>D8922A73</xml_checksum>
99
<class_name>HPXMLtoOpenStudio</class_name>
1010
<display_name>HPXML to OpenStudio Translator</display_name>
@@ -325,12 +325,6 @@
325325
<usage_type>resource</usage_type>
326326
<checksum>0F94C201</checksum>
327327
</file>
328-
<file>
329-
<filename>waterheater.rb</filename>
330-
<filetype>rb</filetype>
331-
<usage_type>resource</usage_type>
332-
<checksum>500A5756</checksum>
333-
</file>
334328
<file>
335329
<filename>meta_measure.rb</filename>
336330
<filetype>rb</filetype>
@@ -361,30 +355,12 @@
361355
<usage_type>resource</usage_type>
362356
<checksum>2FD98C89</checksum>
363357
</file>
364-
<file>
365-
<filename>hpxml_schema/HPXMLBaseElements.xsd</filename>
366-
<filetype>xsd</filetype>
367-
<usage_type>resource</usage_type>
368-
<checksum>17563F8C</checksum>
369-
</file>
370-
<file>
371-
<filename>hpxml_schema/HPXMLDataTypes.xsd</filename>
372-
<filetype>xsd</filetype>
373-
<usage_type>resource</usage_type>
374-
<checksum>2B0922EC</checksum>
375-
</file>
376358
<file>
377359
<filename>utility_bills.rb</filename>
378360
<filetype>rb</filetype>
379361
<usage_type>resource</usage_type>
380362
<checksum>35B866E9</checksum>
381363
</file>
382-
<file>
383-
<filename>hpxml_schematron/HPXMLvalidator.xml</filename>
384-
<filetype>xml</filetype>
385-
<usage_type>resource</usage_type>
386-
<checksum>5DD85F0D</checksum>
387-
</file>
388364
<file>
389365
<filename>misc_loads.rb</filename>
390366
<filetype>rb</filetype>
@@ -535,36 +511,12 @@
535511
<usage_type>resource</usage_type>
536512
<checksum>6F6B5865</checksum>
537513
</file>
538-
<file>
539-
<filename>test_defaults.rb</filename>
540-
<filetype>rb</filetype>
541-
<usage_type>test</usage_type>
542-
<checksum>069B537F</checksum>
543-
</file>
544-
<file>
545-
<filename>hpxml_defaults.rb</filename>
546-
<filetype>rb</filetype>
547-
<usage_type>resource</usage_type>
548-
<checksum>F954FBA8</checksum>
549-
</file>
550-
<file>
551-
<filename>hpxml_schematron/EPvalidator.xml</filename>
552-
<filetype>xml</filetype>
553-
<usage_type>resource</usage_type>
554-
<checksum>A482C431</checksum>
555-
</file>
556514
<file>
557515
<filename>test_validation.rb</filename>
558516
<filetype>rb</filetype>
559517
<usage_type>test</usage_type>
560518
<checksum>675AC983</checksum>
561519
</file>
562-
<file>
563-
<filename>hpxml.rb</filename>
564-
<filetype>rb</filetype>
565-
<usage_type>resource</usage_type>
566-
<checksum>CD5019F4</checksum>
567-
</file>
568520
<file>
569521
<filename>hvac.rb</filename>
570522
<filetype>rb</filetype>
@@ -594,5 +546,53 @@
594546
<usage_type>resource</usage_type>
595547
<checksum>42C2E302</checksum>
596548
</file>
549+
<file>
550+
<filename>waterheater.rb</filename>
551+
<filetype>rb</filetype>
552+
<usage_type>resource</usage_type>
553+
<checksum>65181200</checksum>
554+
</file>
555+
<file>
556+
<filename>hpxml_schema/HPXMLBaseElements.xsd</filename>
557+
<filetype>xsd</filetype>
558+
<usage_type>resource</usage_type>
559+
<checksum>32481882</checksum>
560+
</file>
561+
<file>
562+
<filename>hpxml_schema/HPXMLDataTypes.xsd</filename>
563+
<filetype>xsd</filetype>
564+
<usage_type>resource</usage_type>
565+
<checksum>5559DDD1</checksum>
566+
</file>
567+
<file>
568+
<filename>hpxml_schematron/HPXMLvalidator.xml</filename>
569+
<filetype>xml</filetype>
570+
<usage_type>resource</usage_type>
571+
<checksum>6FFC25E9</checksum>
572+
</file>
573+
<file>
574+
<filename>test_defaults.rb</filename>
575+
<filetype>rb</filetype>
576+
<usage_type>test</usage_type>
577+
<checksum>48381849</checksum>
578+
</file>
579+
<file>
580+
<filename>hpxml_defaults.rb</filename>
581+
<filetype>rb</filetype>
582+
<usage_type>resource</usage_type>
583+
<checksum>23576669</checksum>
584+
</file>
585+
<file>
586+
<filename>hpxml_schematron/EPvalidator.xml</filename>
587+
<filetype>xml</filetype>
588+
<usage_type>resource</usage_type>
589+
<checksum>6499B5B3</checksum>
590+
</file>
591+
<file>
592+
<filename>hpxml.rb</filename>
593+
<filetype>rb</filetype>
594+
<usage_type>resource</usage_type>
595+
<checksum>3450451E</checksum>
596+
</file>
597597
</files>
598598
</measure>

HPXMLtoOpenStudio/resources/hpxml.rb

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -301,10 +301,12 @@ class HPXML < Object
301301
UnitsACHNatural = 'ACHnatural'
302302
UnitsAFUE = 'AFUE'
303303
UnitsAh = 'Ah'
304+
UnitsBtuPerHour = 'Btu/hr'
304305
UnitsCFM = 'CFM'
305306
UnitsCFM25 = 'CFM25'
306307
UnitsCFM50 = 'CFM50'
307308
UnitsCOP = 'COP'
309+
UnitsDegFPerHour = 'F/hr'
308310
UnitsDollars = '$'
309311
UnitsDollarsPerkW = '$/kW'
310312
UnitsEER = 'EER'
@@ -316,6 +318,7 @@ class HPXML < Object
316318
UnitsKwhPerDay = 'kWh/day'
317319
UnitsKwPerTon = 'kW/ton'
318320
UnitsPercent = 'Percent'
321+
UnitsPercentPerHour = '%/hr'
319322
UnitsSEER = 'SEER'
320323
UnitsSEER2 = 'SEER2'
321324
UnitsSLA = 'SLA'
@@ -4642,8 +4645,8 @@ class WaterHeatingSystem < BaseElement
46424645
ATTRS = [:id, :year_installed, :fuel_type, :water_heater_type, :location, :performance_adjustment,
46434646
:tank_volume, :fraction_dhw_load_served, :heating_capacity, :energy_factor, :usage_bin,
46444647
:uniform_energy_factor, :first_hour_rating, :recovery_efficiency, :uses_desuperheater, :jacket_r_value,
4645-
:related_hvac_idref, :third_party_certification, :standby_loss, :temperature, :is_shared_system,
4646-
:number_of_units_served, :tank_model_type, :operating_mode]
4648+
:related_hvac_idref, :third_party_certification, :standby_loss_units, :standby_loss_value,
4649+
:temperature, :is_shared_system, :number_of_units_served, :tank_model_type, :operating_mode]
46474650
attr_accessor(*ATTRS)
46484651

46494652
def related_hvac_system
@@ -4700,7 +4703,11 @@ def to_oga(doc)
47004703
jacket = XMLHelper.add_element(water_heater_insulation, 'Jacket')
47014704
XMLHelper.add_element(jacket, 'JacketRValue', @jacket_r_value, :float)
47024705
end
4703-
XMLHelper.add_element(water_heating_system, 'StandbyLoss', @standby_loss, :float, @standby_loss_isdefaulted) unless @standby_loss.nil?
4706+
if (not @standby_loss_units.nil?) && (not @standby_loss_value.nil?)
4707+
standby_loss = XMLHelper.add_element(water_heating_system, 'StandbyLoss')
4708+
XMLHelper.add_element(standby_loss, 'Units', @standby_loss_units, :string, @standby_loss_units_isdefaulted)
4709+
XMLHelper.add_element(standby_loss, 'Value', @standby_loss_value, :float, @standby_loss_value_isdefaulted)
4710+
end
47044711
XMLHelper.add_element(water_heating_system, 'HotWaterTemperature', @temperature, :float, @temperature_isdefaulted) unless @temperature.nil?
47054712
XMLHelper.add_element(water_heating_system, 'UsesDesuperheater', @uses_desuperheater, :boolean) unless @uses_desuperheater.nil?
47064713
if not @related_hvac_idref.nil?
@@ -4735,7 +4742,8 @@ def from_oga(water_heating_system)
47354742
@usage_bin = XMLHelper.get_value(water_heating_system, 'UsageBin', :string)
47364743
@recovery_efficiency = XMLHelper.get_value(water_heating_system, 'RecoveryEfficiency', :float)
47374744
@jacket_r_value = XMLHelper.get_value(water_heating_system, 'WaterHeaterInsulation/Jacket/JacketRValue', :float)
4738-
@standby_loss = XMLHelper.get_value(water_heating_system, 'StandbyLoss', :float)
4745+
@standby_loss_units = XMLHelper.get_value(water_heating_system, 'StandbyLoss/Units', :string)
4746+
@standby_loss_value = XMLHelper.get_value(water_heating_system, 'StandbyLoss/Value', :float)
47394747
@temperature = XMLHelper.get_value(water_heating_system, 'HotWaterTemperature', :float)
47404748
@uses_desuperheater = XMLHelper.get_value(water_heating_system, 'UsesDesuperheater', :boolean)
47414749
@related_hvac_idref = HPXML::get_idref(XMLHelper.get_element(water_heating_system, 'RelatedHVACSystem'))

HPXMLtoOpenStudio/resources/hpxml_defaults.rb

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1663,14 +1663,16 @@ def self.apply_water_heaters(hpxml, nbeds, eri_version, schedules_file)
16631663
water_heating_system.performance_adjustment = Waterheater.get_default_performance_adjustment(water_heating_system)
16641664
water_heating_system.performance_adjustment_isdefaulted = true
16651665
end
1666-
if (water_heating_system.water_heater_type == HPXML::WaterHeaterTypeCombiStorage) && water_heating_system.standby_loss.nil?
1666+
if (water_heating_system.water_heater_type == HPXML::WaterHeaterTypeCombiStorage) && water_heating_system.standby_loss_value.nil?
16671667
# Use equation fit from AHRI database
16681668
# calculate independent variable SurfaceArea/vol(physically linear to standby_loss/skin_u under test condition) to fit the linear equation from AHRI database
16691669
act_vol = Waterheater.calc_storage_tank_actual_vol(water_heating_system.tank_volume, nil)
16701670
surface_area = Waterheater.calc_tank_areas(act_vol)[0]
16711671
sqft_by_gal = surface_area / act_vol # sqft/gal
1672-
water_heating_system.standby_loss = (2.9721 * sqft_by_gal - 0.4732).round(3) # linear equation assuming a constant u, F/hr
1673-
water_heating_system.standby_loss_isdefaulted = true
1672+
water_heating_system.standby_loss_value = (2.9721 * sqft_by_gal - 0.4732).round(3) # linear equation assuming a constant u, F/hr
1673+
water_heating_system.standby_loss_value_isdefaulted = true
1674+
water_heating_system.standby_loss_units = HPXML::UnitsDegFPerHour
1675+
water_heating_system.standby_loss_units_isdefaulted = true
16741676
end
16751677
if (water_heating_system.water_heater_type == HPXML::WaterHeaterTypeStorage)
16761678
if water_heating_system.heating_capacity.nil?

HPXMLtoOpenStudio/resources/hpxml_schema/HPXMLBaseElements.xsd

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1155,7 +1155,7 @@
11551155
</xs:annotation>
11561156
</xs:element>
11571157
<xs:element minOccurs="0" name="InteriorStuds" type="StudProperties"/>
1158-
<xs:element minOccurs="0" name="InteriorFinish" type="InteriorFinishInfo"> </xs:element>
1158+
<xs:element minOccurs="0" name="InteriorFinish" type="InteriorFinishInfo"/>
11591159
<xs:element maxOccurs="1" minOccurs="0" name="Insulation" type="FoundationWallInsulationInfo"/>
11601160
<xs:element minOccurs="0" ref="extension"/>
11611161
</xs:sequence>
@@ -1168,7 +1168,7 @@
11681168
</xs:element>
11691169
<xs:element minOccurs="0" name="Ceilings">
11701170
<xs:annotation>
1171-
<xs:documentation>Use Ceilings for horizontal surfaces above living space (e.g., sufaces between living space and attic).</xs:documentation>
1171+
<xs:documentation>Use Ceilings for horizontal surfaces above living space (e.g., surfaces between living space and attic).</xs:documentation>
11721172
</xs:annotation>
11731173
<xs:complexType>
11741174
<xs:sequence>
@@ -1199,13 +1199,13 @@
11991199
</xs:element>
12001200
<xs:element minOccurs="0" name="Floors">
12011201
<xs:annotation>
1202-
<xs:documentation>Use Floors for horizontal surfaces below living space (e.g., sufaces between living space and crawlspace/basement/ambient foundations).</xs:documentation>
1202+
<xs:documentation>Use Floors for horizontal surfaces below living space (e.g., surfaces between living space and crawlspace/basement/ambient foundations).</xs:documentation>
12031203
</xs:annotation>
12041204
<xs:complexType>
12051205
<xs:sequence>
12061206
<xs:element name="Floor" maxOccurs="unbounded" minOccurs="1">
12071207
<xs:annotation>
1208-
<xs:documentation>Interior partition surfaces should not be described using the Floor element.</xs:documentation>
1208+
<xs:documentation>Interior partition surfaces should not be described using the FrameFloor element.</xs:documentation>
12091209
</xs:annotation>
12101210
<xs:complexType>
12111211
<xs:sequence>
@@ -1709,6 +1709,11 @@
17091709
430, Subpart B, Appendix E.</xs:documentation>
17101710
</xs:annotation>
17111711
</xs:element>
1712+
<xs:element minOccurs="0" name="HeatPumpCOP" type="Efficiency">
1713+
<xs:annotation>
1714+
<xs:documentation>The dimensionless coefficient of performance, used to measure the efficiency of a commercial heat pump water heater.</xs:documentation>
1715+
</xs:annotation>
1716+
</xs:element>
17121717
<xs:element minOccurs="0" name="FirstHourRating" type="Volume">
17131718
<xs:annotation>
17141719
<xs:documentation>[gal per hour] An estimate of the maximum volume of hot water in gallons that a storage water heater can supply within an hour that begins
@@ -1774,9 +1779,9 @@
17741779
<xs:attribute name="dataSource" type="DataSource"/>
17751780
</xs:complexType>
17761781
</xs:element>
1777-
<xs:element minOccurs="0" name="StandbyLoss" type="HPXMLDouble">
1782+
<xs:element minOccurs="0" name="StandbyLoss" type="StandbyLossType">
17781783
<xs:annotation>
1779-
<xs:documentation>[degF/hr] The standby heat loss rate for, e.g., indirect water heaters in degrees per hour. Published in the AHRI Consumer’s Directory of Certified Efficiency Ratings.</xs:documentation>
1784+
<xs:documentation>The standby heat loss rate for, e.g., indirect or commercial water heaters. Published in the AHRI Consumer’s Directory of Certified Efficiency Ratings.</xs:documentation>
17801785
</xs:annotation>
17811786
</xs:element>
17821787
<xs:element name="MeetsACCA5QIHVACSpecification" type="HPXMLBoolean" minOccurs="0"/>
@@ -3948,6 +3953,17 @@
39483953
<xs:documentation>Ah is computed by multiplying the discharge current (Amps) by the discharge time (hours). kWh is computed by multiplying the power output (kW) by the discharge time (hours).</xs:documentation>
39493954
</xs:annotation>
39503955
</xs:element>
3956+
</xs:sequence>
3957+
<xs:attribute name="dataSource" type="DataSource"/>
3958+
</xs:complexType>
3959+
<xs:complexType name="StandbyLossType">
3960+
<xs:sequence>
3961+
<xs:element name="Units" type="StandbyLossUnits">
3962+
<xs:annotation>
3963+
<xs:documentation>For %/hr enter values as a fraction, i.e. 1.20%/hr = 0.0120 and 0.68%/hr = 0.0068.</xs:documentation>
3964+
</xs:annotation>
3965+
</xs:element>
3966+
<xs:element name="Value" type="HPXMLDouble"/>
39513967
</xs:sequence>
39523968
<xs:attribute name="dataSource" type="DataSource"/>
39533969
</xs:complexType>
@@ -5582,7 +5598,7 @@
55825598
</xs:complexType>
55835599
<xs:complexType name="FloorType">
55845600
<xs:choice>
5585-
<xs:element name="WoodStud">
5601+
<xs:element name="WoodFrame">
55865602
<xs:complexType>
55875603
<xs:sequence>
55885604
<xs:element minOccurs="0" ref="extension"/>
@@ -5591,6 +5607,9 @@
55915607
</xs:complexType>
55925608
</xs:element>
55935609
<xs:element name="StructurallyInsulatedPanel">
5610+
<xs:annotation>
5611+
<xs:documentation>Structurally Insulated Panel</xs:documentation>
5612+
</xs:annotation>
55945613
<xs:complexType>
55955614
<xs:sequence>
55965615
<xs:element minOccurs="0" ref="extension"/>

HPXMLtoOpenStudio/resources/hpxml_schema/HPXMLDataTypes.xsd

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1847,6 +1847,20 @@
18471847
</xs:extension>
18481848
</xs:simpleContent>
18491849
</xs:complexType>
1850+
<xs:simpleType name="StandbyLossUnits_simple">
1851+
<xs:restriction base="xs:string">
1852+
<xs:enumeration value="F/hr"/>
1853+
<xs:enumeration value="%/hr"/>
1854+
<xs:enumeration value="Btu/hr"/>
1855+
</xs:restriction>
1856+
</xs:simpleType>
1857+
<xs:complexType name="StandbyLossUnits">
1858+
<xs:simpleContent>
1859+
<xs:extension base="StandbyLossUnits_simple">
1860+
<xs:attribute name="dataSource" type="DataSource"/>
1861+
</xs:extension>
1862+
</xs:simpleContent>
1863+
</xs:complexType>
18501864
<xs:simpleType name="DistrictSteamType_simple">
18511865
<xs:restriction base="xs:string">
18521866
<xs:enumeration value="1-pipe"/>

HPXMLtoOpenStudio/resources/hpxml_schematron/EPvalidator.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1571,7 +1571,7 @@
15711571
<sch:assert role='ERROR' test='count(h:RelatedHVACSystem) = 1'>Expected 1 element(s) for xpath: RelatedHVACSystem</sch:assert> <!-- HeatingSystem (boiler) -->
15721572
<sch:assert role='ERROR' test='count(h:TankVolume) = 1'>Expected 1 element(s) for xpath: TankVolume</sch:assert>
15731573
<sch:assert role='ERROR' test='count(h:WaterHeaterInsulation/h:Jacket/h:JacketRValue) &lt;= 1'>Expected 0 or 1 element(s) for xpath: WaterHeaterInsulation/Jacket/JacketRValue</sch:assert>
1574-
<sch:assert role='ERROR' test='count(h:StandbyLoss) &lt;= 1'>Expected 0 or 1 element(s) for xpath: StandbyLoss</sch:assert>
1574+
<sch:assert role='ERROR' test='count(h:StandbyLoss[h:Units="F/hr"]/h:Value) &lt;= 1'>Expected 0 or 1 element(s) for xpath: StandbyLoss[Units="F/hr"]/Value</sch:assert>
15751575
</sch:rule>
15761576
</sch:pattern>
15771577

0 commit comments

Comments
 (0)