Skip to content

Commit 2de51a2

Browse files
authored
Merge pull request #1857 from NREL/hpwh_capacities
HPWH capacity inputs
2 parents 301ae67 + 67301d7 commit 2de51a2

22 files changed

+766
-77
lines changed

BuildResidentialHPXML/README.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3795,7 +3795,7 @@ Ratio of energy delivered to water heater to the energy content of the fuel cons
37953795

37963796
**Water Heater: Heating Capacity**
37973797

3798-
Heating capacity. Only applies to storage water heater. If not provided, the OS-HPXML default (see <a href='https://openstudio-hpxml.readthedocs.io/en/v1.8.1/workflow_inputs.html#conventional-storage'>Conventional Storage</a>) is used.
3798+
Heating capacity. Only applies to storage water heater and heat pump water heater (compressor). If not provided, the OS-HPXML default (see <a href='https://openstudio-hpxml.readthedocs.io/en/v1.8.1/workflow_inputs.html#conventional-storage'>Conventional Storage</a>, <a href='https://openstudio-hpxml.readthedocs.io/en/v1.8.1/workflow_inputs.html#heat-pump'>Heat Pump</a>) is used.
37993799

38003800
- **Name:** ``water_heater_heating_capacity``
38013801
- **Type:** ``Double``
@@ -3806,6 +3806,19 @@ Heating capacity. Only applies to storage water heater. If not provided, the OS-
38063806

38073807
<br/>
38083808

3809+
**Water Heater: Backup Heating Capacity**
3810+
3811+
Backup heating capacity for a heat pump water heater. If not provided, the OS-HPXML default (see <a href='https://openstudio-hpxml.readthedocs.io/en/v1.8.1/workflow_inputs.html#heat-pump'>Heat Pump</a>) is used.
3812+
3813+
- **Name:** ``water_heater_backup_heating_capacity``
3814+
- **Type:** ``Double``
3815+
3816+
- **Units:** ``Btu/hr``
3817+
3818+
- **Required:** ``false``
3819+
3820+
<br/>
3821+
38093822
**Water Heater: Standby Loss**
38103823

38113824
The standby loss of water heater. Only applies to space-heating boilers. If not provided, the OS-HPXML default (see <a href='https://openstudio-hpxml.readthedocs.io/en/v1.8.1/workflow_inputs.html#combi-boiler-w-storage'>Combi Boiler w/ Storage</a>) is used.

BuildResidentialHPXML/measure.rb

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2273,7 +2273,13 @@ def arguments(model) # rubocop:disable Lint/UnusedMethodArgument
22732273

22742274
arg = OpenStudio::Measure::OSArgument::makeDoubleArgument('water_heater_heating_capacity', false)
22752275
arg.setDisplayName('Water Heater: Heating Capacity')
2276-
arg.setDescription("Heating capacity. Only applies to #{HPXML::WaterHeaterTypeStorage}. If not provided, the OS-HPXML default (see <a href='#{docs_base_url}#conventional-storage'>Conventional Storage</a>) is used.")
2276+
arg.setDescription("Heating capacity. Only applies to #{HPXML::WaterHeaterTypeStorage} and #{HPXML::WaterHeaterTypeHeatPump} (compressor). If not provided, the OS-HPXML default (see <a href='#{docs_base_url}#conventional-storage'>Conventional Storage</a>, <a href='#{docs_base_url}#heat-pump'>Heat Pump</a>) is used.")
2277+
arg.setUnits('Btu/hr')
2278+
args << arg
2279+
2280+
arg = OpenStudio::Measure::OSArgument::makeDoubleArgument('water_heater_backup_heating_capacity', false)
2281+
arg.setDisplayName('Water Heater: Backup Heating Capacity')
2282+
arg.setDescription("Backup heating capacity for a #{HPXML::WaterHeaterTypeHeatPump}. If not provided, the OS-HPXML default (see <a href='#{docs_base_url}#heat-pump'>Heat Pump</a>) is used.")
22772283
arg.setUnits('Btu/hr')
22782284
args << arg
22792285

@@ -6609,6 +6615,8 @@ def self.set_water_heating_systems(hpxml_bldg, args)
66096615
heating_capacity = args[:water_heater_heating_capacity]
66106616
tank_model_type = args[:water_heater_tank_model_type]
66116617
elsif [HPXML::WaterHeaterTypeHeatPump].include? water_heater_type
6618+
heating_capacity = args[:water_heater_heating_capacity]
6619+
backup_heating_capacity = args[:water_heater_backup_heating_capacity]
66126620
operating_mode = args[:water_heater_operating_mode]
66136621
end
66146622

@@ -6629,6 +6637,7 @@ def self.set_water_heating_systems(hpxml_bldg, args)
66296637
jacket_r_value: jacket_r_value,
66306638
temperature: args[:water_heater_setpoint_temperature],
66316639
heating_capacity: heating_capacity,
6640+
backup_heating_capacity: backup_heating_capacity,
66326641
is_shared_system: is_shared_system,
66336642
number_of_bedrooms_served: number_of_bedrooms_served,
66346643
tank_model_type: tank_model_type,

BuildResidentialHPXML/measure.xml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
<schema_version>3.1</schema_version>
44
<name>build_residential_hpxml</name>
55
<uid>a13a8983-2b01-4930-8af2-42030b6e4233</uid>
6-
<version_id>2f4fbbe3-a36f-4d03-a5f5-87c150890550</version_id>
7-
<version_modified>2024-10-13T19:48:25Z</version_modified>
6+
<version_id>8dfdc271-772e-46a3-a611-71ca703a96c2</version_id>
7+
<version_modified>2024-10-14T23:23:50Z</version_modified>
88
<xml_checksum>2C38F48B</xml_checksum>
99
<class_name>BuildResidentialHPXML</class_name>
1010
<display_name>HPXML Builder</display_name>
@@ -4696,7 +4696,16 @@
46964696
<argument>
46974697
<name>water_heater_heating_capacity</name>
46984698
<display_name>Water Heater: Heating Capacity</display_name>
4699-
<description>Heating capacity. Only applies to storage water heater. If not provided, the OS-HPXML default (see &lt;a href='https://openstudio-hpxml.readthedocs.io/en/v1.8.1/workflow_inputs.html#conventional-storage'&gt;Conventional Storage&lt;/a&gt;) is used.</description>
4699+
<description>Heating capacity. Only applies to storage water heater and heat pump water heater (compressor). If not provided, the OS-HPXML default (see &lt;a href='https://openstudio-hpxml.readthedocs.io/en/v1.8.1/workflow_inputs.html#conventional-storage'&gt;Conventional Storage&lt;/a&gt;, &lt;a href='https://openstudio-hpxml.readthedocs.io/en/v1.8.1/workflow_inputs.html#heat-pump'&gt;Heat Pump&lt;/a&gt;) is used.</description>
4700+
<type>Double</type>
4701+
<units>Btu/hr</units>
4702+
<required>false</required>
4703+
<model_dependent>false</model_dependent>
4704+
</argument>
4705+
<argument>
4706+
<name>water_heater_backup_heating_capacity</name>
4707+
<display_name>Water Heater: Backup Heating Capacity</display_name>
4708+
<description>Backup heating capacity for a heat pump water heater. If not provided, the OS-HPXML default (see &lt;a href='https://openstudio-hpxml.readthedocs.io/en/v1.8.1/workflow_inputs.html#heat-pump'&gt;Heat Pump&lt;/a&gt;) is used.</description>
47004709
<type>Double</type>
47014710
<units>Btu/hr</units>
47024711
<required>false</required>
@@ -7518,7 +7527,7 @@
75187527
<filename>README.md</filename>
75197528
<filetype>md</filetype>
75207529
<usage_type>readme</usage_type>
7521-
<checksum>9F5858F9</checksum>
7530+
<checksum>25110074</checksum>
75227531
</file>
75237532
<file>
75247533
<filename>README.md.erb</filename>
@@ -7535,7 +7544,7 @@
75357544
<filename>measure.rb</filename>
75367545
<filetype>rb</filetype>
75377546
<usage_type>script</usage_type>
7538-
<checksum>C1F50EA1</checksum>
7547+
<checksum>F2C64E58</checksum>
75397548
</file>
75407549
<file>
75417550
<filename>constants.rb</filename>

Changelog.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
__New Features__
44
- Updates to HPXML v4.0 final release.
55
- Allows `Site/Address/ZipCode` to be provided instead of `ClimateandRiskZones/WeatherStation/extension/EPWFilePath`, in which case the closest TMY3 weather station will be automatically selected.
6-
- Adds inputs for modeling skylight curbs and/or shafts.
6+
- Allows optional inputs for modeling skylight curbs and/or shafts.
77
- Allows modeling exterior horizontal insulation for a slab-on-grade foundation (or basement/crawlspace floor).
88
- Allows alternative infiltration input `AirInfiltrationMeasurement/LeakinessDescription`, in which the infiltration level is estimated using age of home, climate zone, foundation type, etc.
99
- Window shading enhancements:
@@ -15,6 +15,7 @@ __New Features__
1515
- Updates hot water usage based on FSEC study.
1616
- Updates misc/tv plug load usage based on RECS 2020 data.
1717
- Updates relationship between number of bedrooms and number of occupants to use RECS 2020 instead of RECS 2015.
18+
- Allows optional `HeatingCapacity` and `BackupHeatingCapacity` inputs for heat pump water heaters (HPWHs).
1819
- Central Fan Integrated Supply (CFIS) mechanical ventilation enhancements:
1920
- CFIS systems with no strategy to meet remainder of ventilation target (`CFISControls/AdditionalRuntimeOperatingMode="none"`).
2021
- HVAC Manual J design load and sizing calculations:

HPXMLtoOpenStudio/measure.xml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
<schema_version>3.1</schema_version>
44
<name>hpxm_lto_openstudio</name>
55
<uid>b1543b30-9465-45ff-ba04-1d1f85e763bc</uid>
6-
<version_id>b5f6daaa-2d62-4c04-8442-5dd880a2a3eb</version_id>
7-
<version_modified>2024-10-14T15:59:52Z</version_modified>
6+
<version_id>5c60d469-73ac-415f-b37f-8b8401c8d5f3</version_id>
7+
<version_modified>2024-10-16T17:32:33Z</version_modified>
88
<xml_checksum>D8922A73</xml_checksum>
99
<class_name>HPXMLtoOpenStudio</class_name>
1010
<display_name>HPXML to OpenStudio Translator</display_name>
@@ -327,7 +327,7 @@
327327
<filename>defaults.rb</filename>
328328
<filetype>rb</filetype>
329329
<usage_type>resource</usage_type>
330-
<checksum>DF462CB6</checksum>
330+
<checksum>1B4820ED</checksum>
331331
</file>
332332
<file>
333333
<filename>energyplus.rb</filename>
@@ -357,7 +357,7 @@
357357
<filename>hpxml.rb</filename>
358358
<filetype>rb</filetype>
359359
<usage_type>resource</usage_type>
360-
<checksum>D8F0176E</checksum>
360+
<checksum>F866C769</checksum>
361361
</file>
362362
<file>
363363
<filename>hpxml_schema/HPXML.xsd</filename>
@@ -375,7 +375,7 @@
375375
<filename>hpxml_schematron/EPvalidator.xml</filename>
376376
<filetype>xml</filetype>
377377
<usage_type>resource</usage_type>
378-
<checksum>5238EC23</checksum>
378+
<checksum>BD9733AC</checksum>
379379
</file>
380380
<file>
381381
<filename>hpxml_schematron/iso-schematron.xsd</filename>
@@ -603,7 +603,7 @@
603603
<filename>unit_conversions.rb</filename>
604604
<filetype>rb</filetype>
605605
<usage_type>resource</usage_type>
606-
<checksum>1AB34E95</checksum>
606+
<checksum>8BAAF04E</checksum>
607607
</file>
608608
<file>
609609
<filename>util.rb</filename>
@@ -627,7 +627,7 @@
627627
<filename>waterheater.rb</filename>
628628
<filetype>rb</filetype>
629629
<usage_type>resource</usage_type>
630-
<checksum>EA8D60B3</checksum>
630+
<checksum>6F8A18EC</checksum>
631631
</file>
632632
<file>
633633
<filename>weather.rb</filename>
@@ -663,7 +663,7 @@
663663
<filename>test_defaults.rb</filename>
664664
<filetype>rb</filetype>
665665
<usage_type>test</usage_type>
666-
<checksum>05F155DA</checksum>
666+
<checksum>9DD97EAF</checksum>
667667
</file>
668668
<file>
669669
<filename>test_enclosure.rb</filename>
@@ -735,13 +735,13 @@
735735
<filename>test_validation.rb</filename>
736736
<filetype>rb</filetype>
737737
<usage_type>test</usage_type>
738-
<checksum>2E4AE571</checksum>
738+
<checksum>7CB39E62</checksum>
739739
</file>
740740
<file>
741741
<filename>test_water_heater.rb</filename>
742742
<filetype>rb</filetype>
743743
<usage_type>test</usage_type>
744-
<checksum>3F35600F</checksum>
744+
<checksum>A293B678</checksum>
745745
</file>
746746
<file>
747747
<filename>test_weather.rb</filename>

HPXMLtoOpenStudio/resources/defaults.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2912,6 +2912,15 @@ def self.apply_water_heaters(hpxml_bldg, eri_version, schedules_file)
29122912
end
29132913
end
29142914
if (water_heating_system.water_heater_type == HPXML::WaterHeaterTypeHeatPump)
2915+
Waterheater.set_heat_pump_cop(water_heating_system)
2916+
if water_heating_system.heating_capacity.nil?
2917+
water_heating_system.heating_capacity = (UnitConversions.convert(0.5, 'kW', 'Btu/hr') * water_heating_system.additional_properties.cop).round
2918+
water_heating_system.heating_capacity_isdefaulted = true
2919+
end
2920+
if water_heating_system.backup_heating_capacity.nil?
2921+
water_heating_system.backup_heating_capacity = UnitConversions.convert(4.5, 'kW', 'Btu/hr').round
2922+
water_heating_system.backup_heating_capacity_isdefaulted = true
2923+
end
29152924
if water_heating_system.tank_volume.nil?
29162925
water_heating_system.tank_volume = get_water_heater_tank_volume(water_heating_system.fuel_type, nbeds, nbaths)
29172926
water_heating_system.tank_volume_isdefaulted = true

HPXMLtoOpenStudio/resources/hpxml.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8374,6 +8374,7 @@ class WaterHeatingSystem < BaseElement
83748374
:tank_volume, # [Double] TankVolume (gal)
83758375
:fraction_dhw_load_served, # [Double] FractionDHWLoadServed (frac)
83768376
:heating_capacity, # [Double] HeatingCapacity (Btu/hr)
8377+
:backup_heating_capacity, # [Double] BackupHeatingCapacity (Btu/hr)
83778378
:energy_factor, # [Double] EnergyFactor (frac)
83788379
:uniform_energy_factor, # [Double] UniformEnergyFactor (frac)
83798380
:operating_mode, # [String] HPWHOperatingMode (HPXML::WaterHeaterOperatingModeXXX)
@@ -8457,6 +8458,7 @@ def to_doc(building)
84578458
XMLHelper.add_element(water_heating_system, 'TankVolume', @tank_volume, :float, @tank_volume_isdefaulted) unless @tank_volume.nil?
84588459
XMLHelper.add_element(water_heating_system, 'FractionDHWLoadServed', @fraction_dhw_load_served, :float) unless @fraction_dhw_load_served.nil?
84598460
XMLHelper.add_element(water_heating_system, 'HeatingCapacity', @heating_capacity, :float, @heating_capacity_isdefaulted) unless @heating_capacity.nil?
8461+
XMLHelper.add_element(water_heating_system, 'BackupHeatingCapacity', @backup_heating_capacity, :float, @backup_heating_capacity_isdefaulted) unless @backup_heating_capacity.nil?
84608462
XMLHelper.add_element(water_heating_system, 'EnergyFactor', @energy_factor, :float, @energy_factor_isdefaulted) unless @energy_factor.nil?
84618463
XMLHelper.add_element(water_heating_system, 'UniformEnergyFactor', @uniform_energy_factor, :float) unless @uniform_energy_factor.nil?
84628464
XMLHelper.add_element(water_heating_system, 'HPWHOperatingMode', @operating_mode, :string, @operating_mode_isdefaulted) unless @operating_mode.nil?
@@ -8504,6 +8506,7 @@ def from_doc(water_heating_system)
85048506
@tank_volume = XMLHelper.get_value(water_heating_system, 'TankVolume', :float)
85058507
@fraction_dhw_load_served = XMLHelper.get_value(water_heating_system, 'FractionDHWLoadServed', :float)
85068508
@heating_capacity = XMLHelper.get_value(water_heating_system, 'HeatingCapacity', :float)
8509+
@backup_heating_capacity = XMLHelper.get_value(water_heating_system, 'BackupHeatingCapacity', :float)
85078510
@energy_factor = XMLHelper.get_value(water_heating_system, 'EnergyFactor', :float)
85088511
@uniform_energy_factor = XMLHelper.get_value(water_heating_system, 'UniformEnergyFactor', :float)
85098512
@operating_mode = XMLHelper.get_value(water_heating_system, 'HPWHOperatingMode', :string)

HPXMLtoOpenStudio/resources/hpxml_schematron/EPvalidator.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2155,6 +2155,7 @@
21552155
<sch:assert role='ERROR' test='count(h:TankVolume) &lt;= 1'>Expected 0 or 1 element(s) for xpath: TankVolume</sch:assert>
21562156
<sch:assert role='ERROR' test='count(h:FractionDHWLoadServed) = 1'>Expected 1 element(s) for xpath: FractionDHWLoadServed</sch:assert>
21572157
<sch:assert role='ERROR' test='count(h:HeatingCapacity) &lt;= 1'>Expected 0 or 1 element(s) for xpath: HeatingCapacity</sch:assert>
2158+
<sch:assert role='ERROR' test='number(h:HeatingCapacity) &gt; 0 or not(h:HeatingCapacity)'>Expected HeatingCapacity to be greater than 0.</sch:assert>
21582159
<sch:assert role='ERROR' test='count(h:UniformEnergyFactor) + count(h:EnergyFactor) = 1'>Expected 1 element(s) for xpath: UniformEnergyFactor | EnergyFactor</sch:assert>
21592160
<sch:assert role='ERROR' test='number(h:UniformEnergyFactor) &lt; 1 or not(h:UniformEnergyFactor)'>Expected UniformEnergyFactor to be less than 1</sch:assert>
21602161
<sch:assert role='ERROR' test='number(h:EnergyFactor) &lt; 1 or not(h:EnergyFactor)'>Expected EnergyFactor to be less than 1</sch:assert>
@@ -2206,6 +2207,9 @@
22062207
<sch:assert role='ERROR' test='count(h:IsSharedSystem) &lt;= 1'>Expected 0 or 1 element(s) for xpath: IsSharedSystem</sch:assert> <!-- See [WaterHeatingSystem=Shared] -->
22072208
<sch:assert role='ERROR' test='count(h:TankVolume) &lt;= 1'>Expected 0 or 1 element(s) for xpath: TankVolume</sch:assert>
22082209
<sch:assert role='ERROR' test='count(h:FractionDHWLoadServed) = 1'>Expected 1 element(s) for xpath: FractionDHWLoadServed</sch:assert>
2210+
<sch:assert role='ERROR' test='count(h:HeatingCapacity) &lt;= 1'>Expected 0 or 1 element(s) for xpath: HeatingCapacity</sch:assert>
2211+
<sch:assert role='ERROR' test='number(h:HeatingCapacity) &gt; 0 or not(h:HeatingCapacity)'>Expected HeatingCapacity to be greater than 0.</sch:assert>
2212+
<sch:assert role='ERROR' test='count(h:BackupHeatingCapacity) &lt;= 1'>Expected 0 or 1 element(s) for xpath: BackupHeatingCapacity</sch:assert>
22092213
<sch:assert role='ERROR' test='count(h:UniformEnergyFactor) + count(h:EnergyFactor) = 1'>Expected 1 element(s) for xpath: UniformEnergyFactor | EnergyFactor</sch:assert>
22102214
<sch:assert role='ERROR' test='number(h:UniformEnergyFactor) &gt; 1 or not(h:UniformEnergyFactor)'>Expected UniformEnergyFactor to be greater than 1</sch:assert>
22112215
<sch:assert role='ERROR' test='number(h:EnergyFactor) &gt; 1 or not(h:EnergyFactor)'>Expected EnergyFactor to be greater than 1</sch:assert>

HPXMLtoOpenStudio/resources/unit_conversions.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ module UnitConversions
4747
['ton', 'kbtu/hr'] => 12.0,
4848
['ton', 'w'] => 3516.85284207,
4949
['w', 'btu/hr'] => 3.412141633127942,
50+
['kw', 'btu/hr'] => 3412.141633127942,
5051
['kbtu/hr', 'kw'] => 0.2930710701722222,
5152

5253
# Power Flux

0 commit comments

Comments
 (0)