Skip to content

Commit

Permalink
Merge pull request #987 from NREL/latest-os-hpxml
Browse files Browse the repository at this point in the history
Latest OS-HPXML
  • Loading branch information
joseph-robertson committed Sep 16, 2022
2 parents e2d16cd + eca98eb commit 7a31b85
Show file tree
Hide file tree
Showing 45 changed files with 32,829 additions and 31,490 deletions.
1 change: 0 additions & 1 deletion resources/hpxml-measures/.github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,4 @@ PR Reviewer: Verify each has been completed.
- [ ] Documentation has been updated
- [ ] Changelog has been updated
- [ ] `openstudio tasks.rb update_measures` has been run
- [ ] Checked the code coverage report on CI
- [ ] No unexpected changes to simulation results of sample files
10 changes: 9 additions & 1 deletion resources/hpxml-measures/BuildResidentialHPXML/measure.rb
Original file line number Diff line number Diff line change
Expand Up @@ -753,6 +753,12 @@ def arguments(model) # rubocop:disable Lint/UnusedMethodArgument
arg.setDescription('Fraction of windows that are operable. If not provided, the OS-HPXML default is used.')
args << arg

arg = OpenStudio::Measure::OSArgument::makeIntegerArgument('window_natvent_availability', false)
arg.setDisplayName('Windows: Natural Ventilation Availability')
arg.setUnits('Days/week')
arg.setDescription('For operable windows, the number of days/week that windows can be opened by occupants for natural ventilation. If not provided, the OS-HPXML default is used.')
args << arg

arg = OpenStudio::Measure::OSArgument::makeDoubleArgument('window_ufactor', true)
arg.setDisplayName('Windows: U-Factor')
arg.setUnits('Btu/hr-ft^2-R')
Expand Down Expand Up @@ -3433,14 +3439,16 @@ def self.set_header(hpxml, args)
if args[:occupancy_calculation_type].is_initialized
hpxml.header.occupancy_calculation_type = args[:occupancy_calculation_type].get
end
if args[:window_natvent_availability].is_initialized
hpxml.header.natvent_days_per_week = args[:window_natvent_availability].get
end
if args[:schedules_filepaths].is_initialized
hpxml.header.schedules_filepaths = args[:schedules_filepaths].get.split(',').map(&:strip)
end

if args[:software_info_program_used].is_initialized
hpxml.header.software_program_used = args[:software_info_program_used].get
end

if args[:software_info_program_version].is_initialized
hpxml.header.software_program_version = args[:software_info_program_version].get
end
Expand Down
15 changes: 12 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.0</schema_version>
<name>build_residential_hpxml</name>
<uid>a13a8983-2b01-4930-8af2-42030b6e4233</uid>
<version_id>2d89701c-63e9-4b72-a2e5-4cdec46684b8</version_id>
<version_modified>20220817T220040Z</version_modified>
<version_id>adadab12-4481-4c1f-bb0f-980c6dbdf441</version_id>
<version_modified>20220818T192810Z</version_modified>
<xml_checksum>2C38F48B</xml_checksum>
<class_name>BuildResidentialHPXML</class_name>
<display_name>HPXML Builder</display_name>
Expand Down Expand Up @@ -1613,6 +1613,15 @@
<required>false</required>
<model_dependent>false</model_dependent>
</argument>
<argument>
<name>window_natvent_availability</name>
<display_name>Windows: Natural Ventilation Availability</display_name>
<description>For operable windows, the number of days/week that windows can be opened by occupants for natural ventilation. If not provided, the OS-HPXML default is used.</description>
<type>Integer</type>
<units>Days/week</units>
<required>false</required>
<model_dependent>false</model_dependent>
</argument>
<argument>
<name>window_ufactor</name>
<display_name>Windows: U-Factor</display_name>
Expand Down Expand Up @@ -6395,7 +6404,7 @@
<filename>measure.rb</filename>
<filetype>rb</filetype>
<usage_type>script</usage_type>
<checksum>EEFE5325</checksum>
<checksum>788EEDBC</checksum>
</file>
</files>
</measure>
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def arguments(model) # rubocop:disable Lint/UnusedMethodArgument

arg = OpenStudio::Measure::OSArgument.makeStringArgument('output_csv_path', true)
arg.setDisplayName('Schedules: Output CSV Path')
arg.setDescription('Absolute/relative path of the CSV file containing occupancy schedules.')
arg.setDescription('Absolute/relative path of the CSV file containing occupancy schedules. Relative paths are relative to the HPXML output path.')
args << arg

arg = OpenStudio::Measure::OSArgument.makeStringArgument('hpxml_output_path', true)
Expand Down Expand Up @@ -150,7 +150,7 @@ def create_schedules(runner, hpxml, epw_file, args)

output_csv_path = args[:output_csv_path]
unless (Pathname.new output_csv_path).absolute?
output_csv_path = File.expand_path(output_csv_path)
output_csv_path = File.expand_path(File.join(File.dirname(args[:hpxml_output_path]), output_csv_path))
end

success = schedule_generator.export(schedules_path: output_csv_path)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<schema_version>3.0</schema_version>
<name>build_residential_schedule_file</name>
<uid>f770b2db-1a9f-4e99-99a7-7f3161a594b1</uid>
<version_id>cd048173-723d-43b0-97a7-967fe01d0930</version_id>
<version_modified>20220818T155856Z</version_modified>
<version_id>76e2188f-cdb8-4abb-b89a-450c51ef51d9</version_id>
<version_modified>20220818T232732Z</version_modified>
<xml_checksum>03F02484</xml_checksum>
<class_name>BuildResidentialScheduleFile</class_name>
<display_name>Schedule File Builder</display_name>
Expand Down Expand Up @@ -58,7 +58,7 @@
<argument>
<name>output_csv_path</name>
<display_name>Schedules: Output CSV Path</display_name>
<description>Absolute/relative path of the CSV file containing occupancy schedules.</description>
<description>Absolute/relative path of the CSV file containing occupancy schedules. Relative paths are relative to the HPXML output path.</description>
<type>String</type>
<required>true</required>
<model_dependent>false</model_dependent>
Expand Down Expand Up @@ -911,7 +911,7 @@
<filename>measure.rb</filename>
<filetype>rb</filetype>
<usage_type>script</usage_type>
<checksum>BBD2D2ED</checksum>
<checksum>AAE8B0D8</checksum>
</file>
</files>
</measure>
4 changes: 4 additions & 0 deletions resources/hpxml-measures/Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@

__New Features__
- **Breaking Change**: Replaces `FrameFloors/FrameFloor` with `Floors/Floor`.
- **Breaking change**: Replaces `SoftwareInfo/extension/SimulationControl/DaylightSaving/Enabled` with `Building/Site/TimeZone/DSTObserved`.
- Allows SEER2/HSPF2 efficiency types for central air conditioners and heat pumps.
- Allows heating/cooling seasons that don't span the entire year.
- Allows calculating one or more utility bill scenarios (e.g., net metering vs feed-in tariff compensation types for a simulation with PV).
- Allows setting the EnergyPlus temperature capacitance multiplier.
- Allows setting the natural ventilation availability (days/week that operable windows can be opened); default changed from 7 to 3 (M/W/F).
- Allows specifying duct surface area multipliers.
- EnergyPlus modeling changes:
- Switches Kiva foundation model timestep from 'Hourly' to 'Timestep'; small increase in runtime for sub-hourly simulations.
- Annual/timeseries outputs:
Expand All @@ -30,6 +33,7 @@ __Bugfixes__
- Fixes zero energy use for a ventilation fan w/ non-zero fan power and zero airflow rate.
- Fixes excessive heat transfer when foundation wall interior insulation does not start from the top of the wall.
- Fixes how relative paths are treated when using an OpenStudio Workflow.
- Fixes possible simulation error if a slab has an ExposedPerimeter near zero.
- BuildResidentialHPXML measure:
- Fixes aspect ratio convention for single-family attached and multifamily dwelling units.

Expand Down
8 changes: 5 additions & 3 deletions resources/hpxml-measures/HPXMLtoOpenStudio/measure.rb
Original file line number Diff line number Diff line change
Expand Up @@ -909,6 +909,8 @@ def self.add_foundation_wall(runner, model, spaces, foundation_wall, slab_frac,
length *= total_slab_exp_perim / total_fnd_wall_length
end

return if length < 0.1 # Avoid Kiva error if exposed wall length is too small

if gross_area > net_area
# Create a "notch" in the wall to account for the subsurfaces. This ensures that
# we preserve the appropriate wall height, length, and area for Kiva.
Expand Down Expand Up @@ -1778,7 +1780,7 @@ def self.create_ducts(model, hvac_distribution, spaces)
next if ducts.duct_type.nil?

# Calculate total duct area in unconditioned spaces
total_unconditioned_duct_area[ducts.duct_type] += ducts.duct_surface_area
total_unconditioned_duct_area[ducts.duct_type] += ducts.duct_surface_area * ducts.duct_surface_area_multiplier
end

# Create duct objects
Expand All @@ -1790,7 +1792,7 @@ def self.create_ducts(model, hvac_distribution, spaces)
duct_loc_space, duct_loc_schedule = get_space_or_schedule_from_location(ducts.duct_location, model, spaces)

# Apportion leakage to individual ducts by surface area
duct_leakage_value = leakage_to_outside[ducts.duct_type][0] * ducts.duct_surface_area / total_unconditioned_duct_area[ducts.duct_type]
duct_leakage_value = leakage_to_outside[ducts.duct_type][0] * ducts.duct_surface_area * ducts.duct_surface_area_multiplier / total_unconditioned_duct_area[ducts.duct_type]
duct_leakage_units = leakage_to_outside[ducts.duct_type][1]

duct_leakage_frac = nil
Expand All @@ -1804,7 +1806,7 @@ def self.create_ducts(model, hvac_distribution, spaces)
fail "#{ducts.duct_type.capitalize} ducts exist but leakage was not specified for distribution system '#{hvac_distribution.id}'."
end

air_ducts << Duct.new(ducts.duct_type, duct_loc_space, duct_loc_schedule, duct_leakage_frac, duct_leakage_cfm25, duct_leakage_cfm50, ducts.duct_surface_area, ducts.duct_insulation_r_value)
air_ducts << Duct.new(ducts.duct_type, duct_loc_space, duct_loc_schedule, duct_leakage_frac, duct_leakage_cfm25, duct_leakage_cfm50, ducts.duct_surface_area * ducts.duct_surface_area_multiplier, ducts.duct_insulation_r_value)
end

# If all ducts are in conditioned space, model leakage as going to outside
Expand Down
132 changes: 66 additions & 66 deletions resources/hpxml-measures/HPXMLtoOpenStudio/measure.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<schema_version>3.0</schema_version>
<name>hpxm_lto_openstudio</name>
<uid>b1543b30-9465-45ff-ba04-1d1f85e763bc</uid>
<version_id>6a384607-b3af-4d2e-933f-bbed8b9bb2d2</version_id>
<version_modified>20220817T220042Z</version_modified>
<version_id>22a4382c-e1f6-4fe6-aa03-b7e47e4194e1</version_id>
<version_modified>20220912T230453Z</version_modified>
<xml_checksum>D8922A73</xml_checksum>
<class_name>HPXMLtoOpenStudio</class_name>
<display_name>HPXML to OpenStudio Translator</display_name>
Expand Down Expand Up @@ -337,24 +337,12 @@
<usage_type>resource</usage_type>
<checksum>500A5756</checksum>
</file>
<file>
<filename>output.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>907D7CB3</checksum>
</file>
<file>
<filename>hotwater_appliances.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>9764D005</checksum>
</file>
<file>
<filename>airflow.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>D3BAA7D7</checksum>
</file>
<file>
<filename>meta_measure.rb</filename>
<filetype>rb</filetype>
Expand Down Expand Up @@ -403,24 +391,12 @@
<usage_type>resource</usage_type>
<checksum>35B866E9</checksum>
</file>
<file>
<filename>hvac_sizing.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>32D4AF3A</checksum>
</file>
<file>
<filename>hpxml_schematron/HPXMLvalidator.xml</filename>
<filetype>xml</filetype>
<usage_type>resource</usage_type>
<checksum>5DD85F0D</checksum>
</file>
<file>
<filename>weather.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>E810B63B</checksum>
</file>
<file>
<filename>misc_loads.rb</filename>
<filetype>rb</filetype>
Expand All @@ -433,12 +409,6 @@
<usage_type>resource</usage_type>
<checksum>FC171B98</checksum>
</file>
<file>
<filename>test_validation.rb</filename>
<filetype>rb</filetype>
<usage_type>test</usage_type>
<checksum>66A25AE7</checksum>
</file>
<file>
<filename>hvac.rb</filename>
<filetype>rb</filetype>
Expand Down Expand Up @@ -470,28 +440,10 @@
<checksum>DF9CC863</checksum>
</file>
<file>
<filename>test_defaults.rb</filename>
<filename>test_validation.rb</filename>
<filetype>rb</filetype>
<usage_type>test</usage_type>
<checksum>CB072084</checksum>
</file>
<file>
<filename>hpxml_schematron/EPvalidator.xml</filename>
<filetype>xml</filetype>
<usage_type>resource</usage_type>
<checksum>36140A9A</checksum>
</file>
<file>
<filename>hpxml_defaults.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>7A680CCE</checksum>
</file>
<file>
<filename>hpxml.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>F682456A</checksum>
<checksum>2302726B</checksum>
</file>
<file>
<filename>test_pv.rb</filename>
Expand Down Expand Up @@ -559,17 +511,6 @@
<usage_type>test</usage_type>
<checksum>DFD1B298</checksum>
</file>
<file>
<version>
<software_program>OpenStudio</software_program>
<identifier>3.3.0</identifier>
<min_compatible>3.3.0</min_compatible>
</version>
<filename>measure.rb</filename>
<filetype>rb</filetype>
<usage_type>script</usage_type>
<checksum>293C90D1</checksum>
</file>
<file>
<filename>test_weather.rb</filename>
<filetype>rb</filetype>
Expand All @@ -582,17 +523,76 @@
<usage_type>test</usage_type>
<checksum>B13FEA8C</checksum>
</file>
<file>
<filename>test_enclosure.rb</filename>
<filetype>rb</filetype>
<usage_type>test</usage_type>
<checksum>085C4908</checksum>
</file>
<file>
<filename>output.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>0D0399FA</checksum>
</file>
<file>
<filename>hvac_sizing.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>4D0D827D</checksum>
</file>
<file>
<filename>hpxml_schematron/EPvalidator.xml</filename>
<filetype>xml</filetype>
<usage_type>resource</usage_type>
<checksum>B6BC6A9D</checksum>
</file>
<file>
<filename>hpxml.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>D6374C8B</checksum>
</file>
<file>
<filename>test_airflow.rb</filename>
<filetype>rb</filetype>
<usage_type>test</usage_type>
<checksum>625E3634</checksum>
<checksum>15015829</checksum>
</file>
<file>
<filename>test_enclosure.rb</filename>
<filename>test_defaults.rb</filename>
<filetype>rb</filetype>
<usage_type>test</usage_type>
<checksum>085C4908</checksum>
<checksum>C6A2AF80</checksum>
</file>
<file>
<filename>weather.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>84489603</checksum>
</file>
<file>
<filename>airflow.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>A2B7F8E1</checksum>
</file>
<file>
<filename>hpxml_defaults.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>5694E794</checksum>
</file>
<file>
<version>
<software_program>OpenStudio</software_program>
<identifier>3.3.0</identifier>
<min_compatible>3.3.0</min_compatible>
</version>
<filename>measure.rb</filename>
<filetype>rb</filetype>
<usage_type>script</usage_type>
<checksum>4F98F3F7</checksum>
</file>
</files>
</measure>

0 comments on commit 7a31b85

Please sign in to comment.