Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HPWH capacity inputs #1857

Merged
merged 9 commits into from
Oct 16, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
15 changes: 14 additions & 1 deletion BuildResidentialHPXML/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3795,7 +3795,7 @@ Ratio of energy delivered to water heater to the energy content of the fuel cons

**Water Heater: Heating Capacity**

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.
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.

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

<br/>

**Water Heater: Backup Heating Capacity**

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.

- **Name:** ``water_heater_backup_heating_capacity``
- **Type:** ``Double``

- **Units:** ``Btu/hr``

- **Required:** ``false``

<br/>

**Water Heater: Standby Loss**

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.
Expand Down
11 changes: 10 additions & 1 deletion BuildResidentialHPXML/measure.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2273,7 +2273,13 @@ def arguments(model) # rubocop:disable Lint/UnusedMethodArgument

arg = OpenStudio::Measure::OSArgument::makeDoubleArgument('water_heater_heating_capacity', false)
arg.setDisplayName('Water Heater: Heating Capacity')
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.")
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.")
arg.setUnits('Btu/hr')
args << arg

arg = OpenStudio::Measure::OSArgument::makeDoubleArgument('water_heater_backup_heating_capacity', false)
arg.setDisplayName('Water Heater: Backup Heating Capacity')
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.")
arg.setUnits('Btu/hr')
args << arg

Expand Down Expand Up @@ -6609,6 +6615,8 @@ def self.set_water_heating_systems(hpxml_bldg, args)
heating_capacity = args[:water_heater_heating_capacity]
tank_model_type = args[:water_heater_tank_model_type]
elsif [HPXML::WaterHeaterTypeHeatPump].include? water_heater_type
heating_capacity = args[:water_heater_heating_capacity]
backup_heating_capacity = args[:water_heater_backup_heating_capacity]
operating_mode = args[:water_heater_operating_mode]
end

Expand All @@ -6629,6 +6637,7 @@ def self.set_water_heating_systems(hpxml_bldg, args)
jacket_r_value: jacket_r_value,
temperature: args[:water_heater_setpoint_temperature],
heating_capacity: heating_capacity,
backup_heating_capacity: backup_heating_capacity,
is_shared_system: is_shared_system,
number_of_bedrooms_served: number_of_bedrooms_served,
tank_model_type: tank_model_type,
Expand Down
19 changes: 14 additions & 5 deletions BuildResidentialHPXML/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>build_residential_hpxml</name>
<uid>a13a8983-2b01-4930-8af2-42030b6e4233</uid>
<version_id>2f4fbbe3-a36f-4d03-a5f5-87c150890550</version_id>
<version_modified>2024-10-13T19:48:25Z</version_modified>
<version_id>8dfdc271-772e-46a3-a611-71ca703a96c2</version_id>
<version_modified>2024-10-14T23:23:50Z</version_modified>
<xml_checksum>2C38F48B</xml_checksum>
<class_name>BuildResidentialHPXML</class_name>
<display_name>HPXML Builder</display_name>
Expand Down Expand Up @@ -4696,7 +4696,16 @@
<argument>
<name>water_heater_heating_capacity</name>
<display_name>Water Heater: Heating Capacity</display_name>
<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>
<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>
<type>Double</type>
<units>Btu/hr</units>
<required>false</required>
<model_dependent>false</model_dependent>
</argument>
<argument>
<name>water_heater_backup_heating_capacity</name>
<display_name>Water Heater: Backup Heating Capacity</display_name>
<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>
<type>Double</type>
<units>Btu/hr</units>
<required>false</required>
Expand Down Expand Up @@ -7518,7 +7527,7 @@
<filename>README.md</filename>
<filetype>md</filetype>
<usage_type>readme</usage_type>
<checksum>9F5858F9</checksum>
<checksum>25110074</checksum>
</file>
<file>
<filename>README.md.erb</filename>
Expand All @@ -7535,7 +7544,7 @@
<filename>measure.rb</filename>
<filetype>rb</filetype>
<usage_type>script</usage_type>
<checksum>C1F50EA1</checksum>
<checksum>F2C64E58</checksum>
</file>
<file>
<filename>constants.rb</filename>
Expand Down
3 changes: 2 additions & 1 deletion Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
__New Features__
- Updates to HPXML v4.0 final release.
- 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.
- Adds inputs for modeling skylight curbs and/or shafts.
- Allows optional inputs for modeling skylight curbs and/or shafts.
- Allows modeling exterior horizontal insulation for a slab-on-grade foundation (or basement/crawlspace floor).
- Allows alternative infiltration input `AirInfiltrationMeasurement/LeakinessDescription`, in which the infiltration level is estimated using age of home, climate zone, foundation type, etc.
- Window shading enhancements:
Expand All @@ -15,6 +15,7 @@ __New Features__
- Updates hot water usage based on FSEC study.
- Updates misc/tv plug load usage based on RECS 2020 data.
- Updates relationship between number of bedrooms and number of occupants to use RECS 2020 instead of RECS 2015.
- Allows optional `HeatingCapacity` and `BackupHeatingCapacity` inputs for heat pump water heaters (HPWHs).
- Central Fan Integrated Supply (CFIS) mechanical ventilation enhancements:
- CFIS systems with no strategy to meet remainder of ventilation target (`CFISControls/AdditionalRuntimeOperatingMode="none"`).
- HVAC Manual J design load and sizing calculations:
Expand Down
18 changes: 9 additions & 9 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>b5f6daaa-2d62-4c04-8442-5dd880a2a3eb</version_id>
<version_modified>2024-10-14T15:59:52Z</version_modified>
<version_id>52b3be7e-cd43-4986-b8af-2ccac939303f</version_id>
<version_modified>2024-10-14T23:36:58Z</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>DF462CB6</checksum>
<checksum>DCE490C3</checksum>
</file>
<file>
<filename>energyplus.rb</filename>
Expand Down Expand Up @@ -357,7 +357,7 @@
<filename>hpxml.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>D8F0176E</checksum>
<checksum>F866C769</checksum>
</file>
<file>
<filename>hpxml_schema/HPXML.xsd</filename>
Expand All @@ -375,7 +375,7 @@
<filename>hpxml_schematron/EPvalidator.xml</filename>
<filetype>xml</filetype>
<usage_type>resource</usage_type>
<checksum>5238EC23</checksum>
<checksum>5AA8A4A1</checksum>
</file>
<file>
<filename>hpxml_schematron/iso-schematron.xsd</filename>
Expand Down Expand Up @@ -603,7 +603,7 @@
<filename>unit_conversions.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>1AB34E95</checksum>
<checksum>8BAAF04E</checksum>
</file>
<file>
<filename>util.rb</filename>
Expand All @@ -627,7 +627,7 @@
<filename>waterheater.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>EA8D60B3</checksum>
<checksum>6F8A18EC</checksum>
</file>
<file>
<filename>weather.rb</filename>
Expand Down Expand Up @@ -663,7 +663,7 @@
<filename>test_defaults.rb</filename>
<filetype>rb</filetype>
<usage_type>test</usage_type>
<checksum>05F155DA</checksum>
<checksum>9DD97EAF</checksum>
</file>
<file>
<filename>test_enclosure.rb</filename>
Expand Down Expand Up @@ -741,7 +741,7 @@
<filename>test_water_heater.rb</filename>
<filetype>rb</filetype>
<usage_type>test</usage_type>
<checksum>3F35600F</checksum>
<checksum>A293B678</checksum>
</file>
<file>
<filename>test_weather.rb</filename>
Expand Down
9 changes: 9 additions & 0 deletions HPXMLtoOpenStudio/resources/defaults.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2912,6 +2912,15 @@ def self.apply_water_heaters(hpxml_bldg, eri_version, schedules_file)
end
end
if (water_heating_system.water_heater_type == HPXML::WaterHeaterTypeHeatPump)
Waterheater.set_heat_pump_cop(water_heating_system)
if water_heating_system.heating_capacity.nil?
water_heating_system.heating_capacity = (UnitConversions.convert(0.5, 'kW', 'Btu/hr') * water_heating_system.additional_properties.cop).round
water_heating_system.heating_capacity_isdefaulted = true
end
if water_heating_system.backup_heating_capacity.nil?
water_heating_system.backup_heating_capacity = UnitConversions.convert(4.5, 'kW', 'Btu/hr')
water_heating_system.backup_heating_capacity_isdefaulted = true
end
if water_heating_system.tank_volume.nil?
water_heating_system.tank_volume = get_water_heater_tank_volume(water_heating_system.fuel_type, nbeds, nbaths)
water_heating_system.tank_volume_isdefaulted = true
Expand Down
3 changes: 3 additions & 0 deletions HPXMLtoOpenStudio/resources/hpxml.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8374,6 +8374,7 @@ class WaterHeatingSystem < BaseElement
:tank_volume, # [Double] TankVolume (gal)
:fraction_dhw_load_served, # [Double] FractionDHWLoadServed (frac)
:heating_capacity, # [Double] HeatingCapacity (Btu/hr)
:backup_heating_capacity, # [Double] BackupHeatingCapacity (Btu/hr)
:energy_factor, # [Double] EnergyFactor (frac)
:uniform_energy_factor, # [Double] UniformEnergyFactor (frac)
:operating_mode, # [String] HPWHOperatingMode (HPXML::WaterHeaterOperatingModeXXX)
Expand Down Expand Up @@ -8457,6 +8458,7 @@ def to_doc(building)
XMLHelper.add_element(water_heating_system, 'TankVolume', @tank_volume, :float, @tank_volume_isdefaulted) unless @tank_volume.nil?
XMLHelper.add_element(water_heating_system, 'FractionDHWLoadServed', @fraction_dhw_load_served, :float) unless @fraction_dhw_load_served.nil?
XMLHelper.add_element(water_heating_system, 'HeatingCapacity', @heating_capacity, :float, @heating_capacity_isdefaulted) unless @heating_capacity.nil?
XMLHelper.add_element(water_heating_system, 'BackupHeatingCapacity', @backup_heating_capacity, :float, @backup_heating_capacity_isdefaulted) unless @backup_heating_capacity.nil?
XMLHelper.add_element(water_heating_system, 'EnergyFactor', @energy_factor, :float, @energy_factor_isdefaulted) unless @energy_factor.nil?
XMLHelper.add_element(water_heating_system, 'UniformEnergyFactor', @uniform_energy_factor, :float) unless @uniform_energy_factor.nil?
XMLHelper.add_element(water_heating_system, 'HPWHOperatingMode', @operating_mode, :string, @operating_mode_isdefaulted) unless @operating_mode.nil?
Expand Down Expand Up @@ -8504,6 +8506,7 @@ def from_doc(water_heating_system)
@tank_volume = XMLHelper.get_value(water_heating_system, 'TankVolume', :float)
@fraction_dhw_load_served = XMLHelper.get_value(water_heating_system, 'FractionDHWLoadServed', :float)
@heating_capacity = XMLHelper.get_value(water_heating_system, 'HeatingCapacity', :float)
@backup_heating_capacity = XMLHelper.get_value(water_heating_system, 'BackupHeatingCapacity', :float)
@energy_factor = XMLHelper.get_value(water_heating_system, 'EnergyFactor', :float)
@uniform_energy_factor = XMLHelper.get_value(water_heating_system, 'UniformEnergyFactor', :float)
@operating_mode = XMLHelper.get_value(water_heating_system, 'HPWHOperatingMode', :string)
Expand Down
2 changes: 2 additions & 0 deletions HPXMLtoOpenStudio/resources/hpxml_schematron/EPvalidator.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2206,6 +2206,8 @@
<sch:assert role='ERROR' test='count(h:IsSharedSystem) &lt;= 1'>Expected 0 or 1 element(s) for xpath: IsSharedSystem</sch:assert> <!-- See [WaterHeatingSystem=Shared] -->
<sch:assert role='ERROR' test='count(h:TankVolume) &lt;= 1'>Expected 0 or 1 element(s) for xpath: TankVolume</sch:assert>
<sch:assert role='ERROR' test='count(h:FractionDHWLoadServed) = 1'>Expected 1 element(s) for xpath: FractionDHWLoadServed</sch:assert>
<sch:assert role='ERROR' test='count(h:HeatingCapacity) &lt;= 1'>Expected 0 or 1 element(s) for xpath: HeatingCapacity</sch:assert>
<sch:assert role='ERROR' test='count(h:BackupHeatingCapacity) &lt;= 1'>Expected 0 or 1 element(s) for xpath: BackupHeatingCapacity</sch:assert>
<sch:assert role='ERROR' test='count(h:UniformEnergyFactor) + count(h:EnergyFactor) = 1'>Expected 1 element(s) for xpath: UniformEnergyFactor | EnergyFactor</sch:assert>
<sch:assert role='ERROR' test='number(h:UniformEnergyFactor) &gt; 1 or not(h:UniformEnergyFactor)'>Expected UniformEnergyFactor to be greater than 1</sch:assert>
<sch:assert role='ERROR' test='number(h:EnergyFactor) &gt; 1 or not(h:EnergyFactor)'>Expected EnergyFactor to be greater than 1</sch:assert>
Expand Down
1 change: 1 addition & 0 deletions HPXMLtoOpenStudio/resources/unit_conversions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ module UnitConversions
['ton', 'kbtu/hr'] => 12.0,
['ton', 'w'] => 3516.85284207,
['w', 'btu/hr'] => 3.412141633127942,
['kw', 'btu/hr'] => 3412.141633127942,
['kbtu/hr', 'kw'] => 0.2930710701722222,

# Power Flux
Expand Down
Loading
Loading