Skip to content

Commit

Permalink
Merge pull request #1203 from NREL/latest-os-hpxml
Browse files Browse the repository at this point in the history
Latest OS-HPXML
  • Loading branch information
joseph-robertson authored Feb 2, 2024
2 parents d27cdc5 + 7a8a9bd commit bcf27b9
Show file tree
Hide file tree
Showing 30 changed files with 24,871 additions and 24,210 deletions.
64 changes: 36 additions & 28 deletions resources/hpxml-measures/.github/workflows/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
container:
image: docker://nrel/openstudio:3.7.0
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}

Expand All @@ -38,24 +38,24 @@ jobs:
bundle exec rake test_measures
- name: Store code coverage
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
path: coverage
name: coverage

- name: Store results
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
path: workflow/tests/results
name: results
name: results-unit-tests

- name: Build documentation
run: |
cd docs
make html SPHINXOPTS="-W --keep-going -n"
- name: Save Docs
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: documentation
path: docs/_build/html/
Expand All @@ -65,7 +65,7 @@ jobs:
container:
image: docker://nrel/openstudio:3.7.0
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}

Expand All @@ -78,17 +78,17 @@ jobs:
bundle exec rake test_workflow1
- name: Store results
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
path: workflow/tests/results
name: results
name: results-workflow1-tests

run-workflow2-tests:
runs-on: ubuntu-latest
container:
image: docker://nrel/openstudio:3.7.0
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}

Expand All @@ -101,15 +101,15 @@ jobs:
bundle exec rake test_workflow2
- name: Store results
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
path: workflow/tests/results
name: results
name: results-workflow2-tests

run-windows-tests:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- name: Install software and run test
Expand All @@ -121,37 +121,46 @@ jobs:
tar -xzf Windows.tar.gz
& .\OpenStudio-${env:OS_VERSION}+${env:OS_SHA}-Windows\bin\openstudio.exe workflow\run_simulation.rb -x workflow\sample_files\base.xml --hourly ALL --add-component-loads --add-stochastic-schedules
merge-results:
runs-on: ubuntu-latest
needs: [run-workflow1-tests, run-workflow2-tests, run-unit-tests]
steps:
- name: Merge Artifacts
uses: actions/upload-artifact/merge@v4
with:
name: results
pattern: results-*
delete-merged: true

compare-results:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
needs: [run-workflow1-tests, run-workflow2-tests, run-unit-tests]
needs: merge-results
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.base.sha }}

- name: Store base results
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
path: workflow/tests/base_results
name: base_results

- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}

- name: Download base results
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
path: |
base_results
path: base_results
name: base_results

- name: Download feature results
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
path: |
results
path: results
name: results

- name: Compare results
Expand All @@ -169,24 +178,23 @@ jobs:
python workflow/tests/compare.py -a visualize
- name: Store comparisons
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
path: workflow/tests/comparisons
name: comparisons

update-results:
runs-on: ubuntu-latest
needs: [run-workflow1-tests, run-workflow2-tests, run-unit-tests]
needs: merge-results
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}

- name: Download feature results
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
path: |
results
path: results
name: results

- name: Commit latest results
Expand Down
131 changes: 68 additions & 63 deletions resources/hpxml-measures/BuildResidentialHPXML/measure.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5224,7 +5224,7 @@ def self.set_cooling_systems(hpxml_bldg, args)
integrated_heating_system_efficiency_percent: integrated_heating_system_efficiency_percent,
integrated_heating_system_fraction_heat_load_served: integrated_heating_system_fraction_heat_load_served)

if args[:hvac_perf_data_capacity_type].is_initialized && [HPXML::HVACTypeCentralAirConditioner, HPXML::HVACTypeMiniSplitAirConditioner].include?(cooling_system_type) && compressor_type == HPXML::HVACCompressorTypeVariableSpeed
if args[:hvac_perf_data_cooling_outdoor_temperatures].is_initialized && [HPXML::HVACTypeCentralAirConditioner, HPXML::HVACTypeMiniSplitAirConditioner].include?(cooling_system_type) && compressor_type == HPXML::HVACCompressorTypeVariableSpeed
hvac_perf_data_capacity_type = args[:hvac_perf_data_capacity_type].get
hvac_perf_data_cooling_outdoor_temperatures = args[:hvac_perf_data_cooling_outdoor_temperatures].get.split(',').map(&:strip)
hvac_perf_data_cooling_min_speed_capacities = args[:hvac_perf_data_cooling_min_speed_capacities].get.split(',').map(&:strip)
Expand Down Expand Up @@ -5405,74 +5405,79 @@ def self.set_heat_pumps(hpxml_bldg, args)
primary_heating_system: primary_heating_system,
primary_cooling_system: primary_cooling_system)

if args[:hvac_perf_data_capacity_type].is_initialized && [HPXML::HVACTypeHeatPumpAirToAir, HPXML::HVACTypeHeatPumpMiniSplit].include?(heat_pump_type) && compressor_type == HPXML::HVACCompressorTypeVariableSpeed
hvac_perf_data_capacity_type = args[:hvac_perf_data_capacity_type].get
hvac_perf_data_heating_outdoor_temperatures = args[:hvac_perf_data_heating_outdoor_temperatures].get.split(',').map(&:strip)
hvac_perf_data_heating_min_speed_capacities = args[:hvac_perf_data_heating_min_speed_capacities].get.split(',').map(&:strip)
hvac_perf_data_heating_max_speed_capacities = args[:hvac_perf_data_heating_max_speed_capacities].get.split(',').map(&:strip)
hvac_perf_data_heating_min_speed_cops = args[:hvac_perf_data_heating_min_speed_cops].get.split(',').map(&:strip)
hvac_perf_data_heating_max_speed_cops = args[:hvac_perf_data_heating_max_speed_cops].get.split(',').map(&:strip)

htg_perf_data = hpxml_bldg.heat_pumps[0].heating_detailed_performance_data
heating_perf_data_data_points = hvac_perf_data_heating_outdoor_temperatures.zip(hvac_perf_data_heating_min_speed_capacities,
hvac_perf_data_heating_max_speed_capacities,
hvac_perf_data_heating_min_speed_cops,
hvac_perf_data_heating_max_speed_cops)
heating_perf_data_data_points.each do |heating_perf_data_data_point|
outdoor_temperature, min_speed_cap_or_frac, max_speed_cap_or_frac, min_speed_cop, max_speed_cop = heating_perf_data_data_point
if [HPXML::HVACTypeHeatPumpAirToAir, HPXML::HVACTypeHeatPumpMiniSplit].include?(heat_pump_type) && compressor_type == HPXML::HVACCompressorTypeVariableSpeed
if args[:hvac_perf_data_heating_outdoor_temperatures].is_initialized
hvac_perf_data_capacity_type = args[:hvac_perf_data_capacity_type].get
hvac_perf_data_heating_outdoor_temperatures = args[:hvac_perf_data_heating_outdoor_temperatures].get.split(',').map(&:strip)
hvac_perf_data_heating_min_speed_capacities = args[:hvac_perf_data_heating_min_speed_capacities].get.split(',').map(&:strip)
hvac_perf_data_heating_max_speed_capacities = args[:hvac_perf_data_heating_max_speed_capacities].get.split(',').map(&:strip)
hvac_perf_data_heating_min_speed_cops = args[:hvac_perf_data_heating_min_speed_cops].get.split(',').map(&:strip)
hvac_perf_data_heating_max_speed_cops = args[:hvac_perf_data_heating_max_speed_cops].get.split(',').map(&:strip)

htg_perf_data = hpxml_bldg.heat_pumps[0].heating_detailed_performance_data
heating_perf_data_data_points = hvac_perf_data_heating_outdoor_temperatures.zip(hvac_perf_data_heating_min_speed_capacities,
hvac_perf_data_heating_max_speed_capacities,
hvac_perf_data_heating_min_speed_cops,
hvac_perf_data_heating_max_speed_cops)
heating_perf_data_data_points.each do |heating_perf_data_data_point|
outdoor_temperature, min_speed_cap_or_frac, max_speed_cap_or_frac, min_speed_cop, max_speed_cop = heating_perf_data_data_point

if hvac_perf_data_capacity_type == 'Absolute capacities'
min_speed_capacity = Float(min_speed_cap_or_frac)
max_speed_capacity = Float(max_speed_cap_or_frac)
elsif hvac_perf_data_capacity_type == 'Normalized capacity fractions'
min_speed_capacity_fraction_of_nominal = Float(min_speed_cap_or_frac)
max_speed_capacity_fraction_of_nominal = Float(max_speed_cap_or_frac)
end

if hvac_perf_data_capacity_type == 'Absolute capacities'
min_speed_capacity = Float(min_speed_cap_or_frac)
max_speed_capacity = Float(max_speed_cap_or_frac)
elsif hvac_perf_data_capacity_type == 'Normalized capacity fractions'
min_speed_capacity_fraction_of_nominal = Float(min_speed_cap_or_frac)
max_speed_capacity_fraction_of_nominal = Float(max_speed_cap_or_frac)
htg_perf_data.add(outdoor_temperature: Float(outdoor_temperature),
capacity: min_speed_capacity,
capacity_fraction_of_nominal: min_speed_capacity_fraction_of_nominal,
capacity_description: HPXML::CapacityDescriptionMinimum,
efficiency_cop: Float(min_speed_cop))
htg_perf_data.add(outdoor_temperature: Float(outdoor_temperature),
capacity: max_speed_capacity,
capacity_fraction_of_nominal: max_speed_capacity_fraction_of_nominal,
capacity_description: HPXML::CapacityDescriptionMaximum,
efficiency_cop: Float(max_speed_cop))
end

htg_perf_data.add(outdoor_temperature: Float(outdoor_temperature),
capacity: min_speed_capacity,
capacity_fraction_of_nominal: min_speed_capacity_fraction_of_nominal,
capacity_description: HPXML::CapacityDescriptionMinimum,
efficiency_cop: Float(min_speed_cop))
htg_perf_data.add(outdoor_temperature: Float(outdoor_temperature),
capacity: max_speed_capacity,
capacity_fraction_of_nominal: max_speed_capacity_fraction_of_nominal,
capacity_description: HPXML::CapacityDescriptionMaximum,
efficiency_cop: Float(max_speed_cop))
end

hvac_perf_data_cooling_outdoor_temperatures = args[:hvac_perf_data_cooling_outdoor_temperatures].get.split(',').map(&:strip)
hvac_perf_data_cooling_min_speed_capacities = args[:hvac_perf_data_cooling_min_speed_capacities].get.split(',').map(&:strip)
hvac_perf_data_cooling_max_speed_capacities = args[:hvac_perf_data_cooling_max_speed_capacities].get.split(',').map(&:strip)
hvac_perf_data_cooling_min_speed_cops = args[:hvac_perf_data_cooling_min_speed_cops].get.split(',').map(&:strip)
hvac_perf_data_cooling_max_speed_cops = args[:hvac_perf_data_cooling_max_speed_cops].get.split(',').map(&:strip)

clg_perf_data = hpxml_bldg.heat_pumps[0].cooling_detailed_performance_data
cooling_perf_data_data_points = hvac_perf_data_cooling_outdoor_temperatures.zip(hvac_perf_data_cooling_min_speed_capacities,
hvac_perf_data_cooling_max_speed_capacities,
hvac_perf_data_cooling_min_speed_cops,
hvac_perf_data_cooling_max_speed_cops)
cooling_perf_data_data_points.each do |cooling_perf_data_data_point|
outdoor_temperature, min_speed_cap_or_frac, max_speed_cap_or_frac, min_speed_cop, max_speed_cop = cooling_perf_data_data_point
if args[:hvac_perf_data_cooling_outdoor_temperatures].is_initialized
hvac_perf_data_capacity_type = args[:hvac_perf_data_capacity_type].get
hvac_perf_data_cooling_outdoor_temperatures = args[:hvac_perf_data_cooling_outdoor_temperatures].get.split(',').map(&:strip)
hvac_perf_data_cooling_min_speed_capacities = args[:hvac_perf_data_cooling_min_speed_capacities].get.split(',').map(&:strip)
hvac_perf_data_cooling_max_speed_capacities = args[:hvac_perf_data_cooling_max_speed_capacities].get.split(',').map(&:strip)
hvac_perf_data_cooling_min_speed_cops = args[:hvac_perf_data_cooling_min_speed_cops].get.split(',').map(&:strip)
hvac_perf_data_cooling_max_speed_cops = args[:hvac_perf_data_cooling_max_speed_cops].get.split(',').map(&:strip)

clg_perf_data = hpxml_bldg.heat_pumps[0].cooling_detailed_performance_data
cooling_perf_data_data_points = hvac_perf_data_cooling_outdoor_temperatures.zip(hvac_perf_data_cooling_min_speed_capacities,
hvac_perf_data_cooling_max_speed_capacities,
hvac_perf_data_cooling_min_speed_cops,
hvac_perf_data_cooling_max_speed_cops)
cooling_perf_data_data_points.each do |cooling_perf_data_data_point|
outdoor_temperature, min_speed_cap_or_frac, max_speed_cap_or_frac, min_speed_cop, max_speed_cop = cooling_perf_data_data_point

if hvac_perf_data_capacity_type == 'Absolute capacities'
min_speed_capacity = Float(min_speed_cap_or_frac)
max_speed_capacity = Float(max_speed_cap_or_frac)
elsif hvac_perf_data_capacity_type == 'Normalized capacity fractions'
min_speed_capacity_fraction_of_nominal = Float(min_speed_cap_or_frac)
max_speed_capacity_fraction_of_nominal = Float(max_speed_cap_or_frac)
end

if hvac_perf_data_capacity_type == 'Absolute capacities'
min_speed_capacity = Float(min_speed_cap_or_frac)
max_speed_capacity = Float(max_speed_cap_or_frac)
elsif hvac_perf_data_capacity_type == 'Normalized capacity fractions'
min_speed_capacity_fraction_of_nominal = Float(min_speed_cap_or_frac)
max_speed_capacity_fraction_of_nominal = Float(max_speed_cap_or_frac)
clg_perf_data.add(outdoor_temperature: Float(outdoor_temperature),
capacity: min_speed_capacity,
capacity_fraction_of_nominal: min_speed_capacity_fraction_of_nominal,
capacity_description: HPXML::CapacityDescriptionMinimum,
efficiency_cop: Float(min_speed_cop))
clg_perf_data.add(outdoor_temperature: Float(outdoor_temperature),
capacity: max_speed_capacity,
capacity_fraction_of_nominal: max_speed_capacity_fraction_of_nominal,
capacity_description: HPXML::CapacityDescriptionMaximum,
efficiency_cop: Float(max_speed_cop))
end

clg_perf_data.add(outdoor_temperature: Float(outdoor_temperature),
capacity: min_speed_capacity,
capacity_fraction_of_nominal: min_speed_capacity_fraction_of_nominal,
capacity_description: HPXML::CapacityDescriptionMinimum,
efficiency_cop: Float(min_speed_cop))
clg_perf_data.add(outdoor_temperature: Float(outdoor_temperature),
capacity: max_speed_capacity,
capacity_fraction_of_nominal: max_speed_capacity_fraction_of_nominal,
capacity_description: HPXML::CapacityDescriptionMaximum,
efficiency_cop: Float(max_speed_cop))
end
end
end
Expand Down
6 changes: 3 additions & 3 deletions resources/hpxml-measures/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>20c13f7b-9d7f-4d4f-b258-384312c93913</version_id>
<version_modified>2024-01-25T17:44:12Z</version_modified>
<version_id>1ad6ba02-2bb2-4bbc-81d6-29cbeb4fd106</version_id>
<version_modified>2024-01-31T16:50:00Z</version_modified>
<xml_checksum>2C38F48B</xml_checksum>
<class_name>BuildResidentialHPXML</class_name>
<display_name>HPXML Builder</display_name>
Expand Down Expand Up @@ -7149,7 +7149,7 @@
<filename>measure.rb</filename>
<filetype>rb</filetype>
<usage_type>script</usage_type>
<checksum>1C5F33C0</checksum>
<checksum>1F8CBA31</checksum>
</file>
<file>
<filename>geometry.rb</filename>
Expand Down
2 changes: 2 additions & 0 deletions resources/hpxml-measures/Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,15 @@ __New Features__
- Adds detailed performance data inputs for variable-speed air source HVAC systems.
- Add soil and moisture type arguments (for determining ground conductivity and diffusivity) and optional geothermal loop arguments for ground source heat pumps.
- The "Geometry: Building Number of Units" input is now written to the HPXML `NumberofUnitsInBuilding` element.
- Adds window and skylight `GlassType` options of "low-e, high-solar-gain" and "low-e, low-solar-gain"; updates U-factor/SHGC lookup tables.
- Updated water heater installation location defaulting to match ANSI 301-2022
- Adds more error-checking for inappropriate inputs (e.g., HVAC SHR=0 or clothes washer IMEF=0).

__Bugfixes__
- Fixes error if using AllowIncreasedFixedCapacities=true w/ HP detailed performance data.
- Prevents mains water temperature from going below freezing (0 C).
- Fixes error if HPXML has emissions scenario and abbreviated run period.
- Fixes detailed schedule error-checking where schedules with MAX < 1 were incorrectly allowed.

## OpenStudio-HPXML v1.7.0

Expand Down
Loading

0 comments on commit bcf27b9

Please sign in to comment.