Skip to content

Commit

Permalink
Merge pull request #1229 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 Apr 17, 2024
2 parents c0cf5de + 211b6ea commit dd48f28
Show file tree
Hide file tree
Showing 54 changed files with 73,535 additions and 71,319 deletions.
5 changes: 5 additions & 0 deletions resources/hpxml-measures/.github/workflows/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ jobs:
cd docs
make html SPHINXOPTS="-W --keep-going -n"
- name: Check documentation
run: |
echo "Checking for misaligned documentation footnotes..."
for RST_FILE in docs/source/*.rst; do NUM_REFS=$(grep -F -o "[#]_" $RST_FILE | wc -l); NUM_FOOTNOTES=$(grep -F -o ".. [#]" $RST_FILE | wc -l); if [ $NUM_REFS != $NUM_FOOTNOTES ]; then echo "ERROR: Number of footnote references doesn't match number of footnotes in $RST_FILE." && exit 1; fi done
- name: Save Docs
uses: actions/upload-artifact@v4
with:
Expand Down
3 changes: 0 additions & 3 deletions resources/hpxml-measures/BuildResidentialHPXML/measure.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3531,9 +3531,6 @@ def argument_errors(args)
error = ((args[:water_heater_type] == HPXML::WaterHeaterTypeCombiStorage) || (args[:water_heater_type] == HPXML::WaterHeaterTypeCombiTankless)) && (args[:heating_system_type] != HPXML::HVACTypeBoiler)
errors << 'Must specify a boiler when modeling an indirect water heater type.' if error

error = (args[:geometry_unit_num_bedrooms] <= 0)
errors << 'Number of bedrooms must be greater than zero.' if error

error = [HPXML::ResidentialTypeSFD].include?(args[:geometry_unit_type]) && args[:heating_system_type].include?('Shared')
errors << 'Specified a shared system for a single-family detached unit.' if error

Expand Down
8 changes: 4 additions & 4 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>2994d7d6-77b2-4962-b5d1-1667a126a05f</version_id>
<version_modified>2024-03-26T16:29:07Z</version_modified>
<version_id>5a875ec8-2d75-4240-b593-309efac2ff96</version_id>
<version_modified>2024-03-26T22:15:51Z</version_modified>
<xml_checksum>2C38F48B</xml_checksum>
<class_name>BuildResidentialHPXML</class_name>
<display_name>HPXML Builder</display_name>
Expand Down Expand Up @@ -7261,7 +7261,7 @@
<filename>measure.rb</filename>
<filetype>rb</filetype>
<usage_type>script</usage_type>
<checksum>6E4C83C9</checksum>
<checksum>36F74813</checksum>
</file>
<file>
<filename>geometry.rb</filename>
Expand All @@ -7273,7 +7273,7 @@
<filename>test_build_residential_hpxml.rb</filename>
<filetype>rb</filetype>
<usage_type>test</usage_type>
<checksum>571E6145</checksum>
<checksum>DA394361</checksum>
</file>
</files>
</measure>
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,6 @@ def test_workflows
'error-mf-conditioned-attic.xml' => ['Conditioned attic type for apartment units is not currently supported.'],
'error-dhw-indirect-without-boiler.xml' => ['Must specify a boiler when modeling an indirect water heater type.'],
'error-conditioned-attic-with-one-floor-above-grade.xml' => ['Units with a conditioned attic must have at least two above-grade floors.'],
'error-zero-number-of-bedrooms.xml' => ['Number of bedrooms must be greater than zero.'],
'error-sfd-with-shared-system.xml' => ['Specified a shared system for a single-family detached unit.'],
'error-rim-joist-height-but-no-assembly-r.xml' => ['Specified a rim joist height but no rim joist assembly R-value.'],
'error-rim-joist-assembly-r-but-no-height.xml' => ['Specified a rim joist assembly R-value but no rim joist height.'],
Expand Down Expand Up @@ -1196,8 +1195,6 @@ def _set_measure_argument_values(hpxml_file, args)
elsif ['error-conditioned-attic-with-one-floor-above-grade.xml'].include? hpxml_file
args['geometry_attic_type'] = HPXML::AtticTypeConditioned
args['ceiling_assembly_r'] = 0.0
elsif ['error-zero-number-of-bedrooms.xml'].include? hpxml_file
args['geometry_unit_num_bedrooms'] = 0
elsif ['error-sfd-with-shared-system.xml'].include? hpxml_file
args['heating_system_type'] = "Shared #{HPXML::HVACTypeBoiler} w/ Baseboard"
elsif ['error-rim-joist-height-but-no-assembly-r.xml'].include? hpxml_file
Expand Down
6 changes: 6 additions & 0 deletions resources/hpxml-measures/Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ __New Features__
- Updates to using G-Functions from the [G-Function Library for Modeling Vertical Bore Ground Heat Exchanger](https://gdr.openei.org/submissions/1325).
- Updated heating/cooling performance curves to reflect newer equipment.
- Allows optional `HeatingAutosizingFactor`, `CoolingAutosizingFactor`, `BackupHeatingAutosizingFactor` inputs to scale HVAC equipment autosizing results.
- Adds optional `Slab/extension/GapInsulationRValue` input for cases where a slab has horizontal (under slab) insulation.
- Allows radiant barriers for additional locations (attic gable walls and floor); reduced emissivity due to dust assumed for radiant barriers on attic floor.
- Adds window and skylight `GlassType` options of "low-e, high-solar-gain" and "low-e, low-solar-gain"; updates U-factor/SHGC lookup tables.
- BuildResidentialHPXML measure:
Expand All @@ -45,6 +46,7 @@ __New Features__
- Manual J design load calculations:
- Allow additional outdoor design condition inputs: `DailyTemperatureRange` and `HumidityDifference`.
- Miscellaneous improvements.
- Adds net energy and net electricity timeseries output columns even when there is no PV or generator.
- Adds more error-checking for inappropriate inputs (e.g., HVAC SHR=0 or clothes washer IMEF=0).
- Allow alternative label energy use (W) input for ceiling fans.
- Updates to run_simulation.rb script:
Expand All @@ -64,6 +66,10 @@ __Bugfixes__
- Fixes detailed schedule error-checking where schedules with MAX < 1 were incorrectly allowed.
- Fixes error if using MF space types (e.g., "other heated space") and the building has no HVAC equipment.
- Fixes `ManualJInputs/HumiditySetpoint` not being used in the design load calculation.
- Fixes possible EnergyPlus error when a `Slab` representing a crawlspace dirt floor has perimeter or under slab insulation.
- Prevents errors due to incorrect `Floor/FloorOrCeiling` input; issues a warning when detected.
- Apportion shared water heater tank losses for HPWHs and combi systems.
- Fixes buried duct effective R-values.

## OpenStudio-HPXML v1.7.0

Expand Down
18 changes: 6 additions & 12 deletions resources/hpxml-measures/HPXMLtoOpenStudio/measure.rb
Original file line number Diff line number Diff line change
Expand Up @@ -540,10 +540,8 @@ def set_defaults_and_globals()
# original file (asset calculation).
if @hpxml_bldg.building_occupancy.number_of_residents.nil?
@hpxml_bldg.building_occupancy.number_of_residents = Geometry.get_occupancy_default_num(@nbeds)
end

# If zero occupants, ensure end uses of interest are zeroed out
if (@hpxml_bldg.building_occupancy.number_of_residents == 0) && (not @apply_ashrae140_assumptions)
elsif (@hpxml_bldg.building_occupancy.number_of_residents == 0) && (not @apply_ashrae140_assumptions)
# If zero occupants, ensure end uses of interest are zeroed out
@hpxml_header.unavailable_periods.add(column_name: 'Vacancy',
begin_month: @hpxml_header.sim_begin_month,
begin_day: @hpxml_header.sim_begin_day,
Expand Down Expand Up @@ -1150,11 +1148,7 @@ def add_foundation_slab(model, weather, spaces, slab, z_origin, exposed_length,
end
slab_whole_r = 0
end
if slab_under_r + slab_whole_r > 0
slab_gap_r = 5.0 # Assume gap insulation when insulation under slab is present
else
slab_gap_r = 0
end
slab_gap_r = slab.gap_insulation_r_value

mat_carpet = nil
if (slab.carpet_fraction > 0) && (slab.carpet_r_value > 0)
Expand Down Expand Up @@ -1547,9 +1541,9 @@ def add_hot_water_and_appliances(runner, model, weather, spaces)
plantloop_map[sys_id] = Waterheater.apply_tankless(model, runner, loc_space, loc_schedule, water_heating_system, ec_adj, solar_thermal_system, @eri_version, @schedules_file, unavailable_periods, unit_multiplier, @nbeds)
elsif water_heating_system.water_heater_type == HPXML::WaterHeaterTypeHeatPump
conditioned_zone = spaces[HPXML::LocationConditionedSpace].thermalZone.get
plantloop_map[sys_id] = Waterheater.apply_heatpump(model, runner, loc_space, loc_schedule, @hpxml_bldg.elevation, water_heating_system, ec_adj, solar_thermal_system, conditioned_zone, @eri_version, @schedules_file, unavailable_periods, unit_multiplier)
plantloop_map[sys_id] = Waterheater.apply_heatpump(model, runner, loc_space, loc_schedule, @hpxml_bldg.elevation, water_heating_system, ec_adj, solar_thermal_system, conditioned_zone, @eri_version, @schedules_file, unavailable_periods, unit_multiplier, @nbeds)
elsif [HPXML::WaterHeaterTypeCombiStorage, HPXML::WaterHeaterTypeCombiTankless].include? water_heating_system.water_heater_type
plantloop_map[sys_id] = Waterheater.apply_combi(model, runner, loc_space, loc_schedule, water_heating_system, ec_adj, solar_thermal_system, @eri_version, @schedules_file, unavailable_periods, unit_multiplier)
plantloop_map[sys_id] = Waterheater.apply_combi(model, runner, loc_space, loc_schedule, water_heating_system, ec_adj, solar_thermal_system, @eri_version, @schedules_file, unavailable_periods, unit_multiplier, @nbeds)
else
fail "Unhandled water heater (#{water_heating_system.water_heater_type})."
end
Expand Down Expand Up @@ -1947,7 +1941,7 @@ def add_airflow(runner, model, weather, spaces, airloop_map)
hvac_availability_sensor.additionalProperties.setFeature('ObjectType', Constants.ObjectNameHVACAvailabilitySensor)
end

Airflow.apply(model, runner, weather, spaces, @hpxml_header, @hpxml_bldg, @cfa, @nbeds,
Airflow.apply(model, runner, weather, spaces, @hpxml_header, @hpxml_bldg, @cfa,
@ncfl_ag, duct_systems, airloop_map, @clg_ssn_sensor, @eri_version,
@frac_windows_operable, @apply_ashrae140_assumptions, @schedules_file,
@hpxml_header.unavailable_periods, hvac_availability_sensor)
Expand Down
34 changes: 17 additions & 17 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.1</schema_version>
<name>hpxm_lto_openstudio</name>
<uid>b1543b30-9465-45ff-ba04-1d1f85e763bc</uid>
<version_id>edc2d731-2133-48af-9c2b-7f5d28da47b2</version_id>
<version_modified>2024-03-29T20:10:27Z</version_modified>
<version_id>9e66c831-4f8f-4792-b4b1-4a0f23f1b1a7</version_id>
<version_modified>2024-04-12T19:22:19Z</version_modified>
<xml_checksum>D8922A73</xml_checksum>
<class_name>HPXMLtoOpenStudio</class_name>
<display_name>HPXML to OpenStudio Translator</display_name>
Expand Down Expand Up @@ -142,13 +142,13 @@
<filename>measure.rb</filename>
<filetype>rb</filetype>
<usage_type>script</usage_type>
<checksum>B55E7A03</checksum>
<checksum>50FE267E</checksum>
</file>
<file>
<filename>airflow.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>BDC264D1</checksum>
<checksum>4BEFAE6F</checksum>
</file>
<file>
<filename>battery.rb</filename>
Expand All @@ -166,7 +166,7 @@
<filename>constructions.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>138F7D36</checksum>
<checksum>1F9097D1</checksum>
</file>
<file>
<filename>data/Xing_okstate_0664D_13659_Table_A-3.csv</filename>
Expand Down Expand Up @@ -298,19 +298,19 @@
<filename>hotwater_appliances.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>37D2CD9B</checksum>
<checksum>063242D8</checksum>
</file>
<file>
<filename>hpxml.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>1B2EE9C1</checksum>
<checksum>A5C1C78D</checksum>
</file>
<file>
<filename>hpxml_defaults.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>E03E352F</checksum>
<checksum>7869B6C9</checksum>
</file>
<file>
<filename>hpxml_schema/HPXML.xsd</filename>
Expand All @@ -328,7 +328,7 @@
<filename>hpxml_schematron/EPvalidator.xml</filename>
<filetype>xml</filetype>
<usage_type>resource</usage_type>
<checksum>5A5D68ED</checksum>
<checksum>D80BDF8A</checksum>
</file>
<file>
<filename>hpxml_schematron/iso-schematron.xsd</filename>
Expand All @@ -346,7 +346,7 @@
<filename>hvac_sizing.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>94F8A8E9</checksum>
<checksum>462AE65B</checksum>
</file>
<file>
<filename>lighting.rb</filename>
Expand Down Expand Up @@ -562,7 +562,7 @@
<filename>waterheater.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>C2E63DEB</checksum>
<checksum>80D00EE1</checksum>
</file>
<file>
<filename>weather.rb</filename>
Expand All @@ -586,7 +586,7 @@
<filename>test_airflow.rb</filename>
<filetype>rb</filetype>
<usage_type>test</usage_type>
<checksum>DFBB744E</checksum>
<checksum>DDF3C1A8</checksum>
</file>
<file>
<filename>test_battery.rb</filename>
Expand All @@ -598,13 +598,13 @@
<filename>test_defaults.rb</filename>
<filetype>rb</filetype>
<usage_type>test</usage_type>
<checksum>BB7ABF28</checksum>
<checksum>39FB3311</checksum>
</file>
<file>
<filename>test_enclosure.rb</filename>
<filetype>rb</filetype>
<usage_type>test</usage_type>
<checksum>427AA4EF</checksum>
<checksum>68F1127B</checksum>
</file>
<file>
<filename>test_generator.rb</filename>
Expand All @@ -616,7 +616,7 @@
<filename>test_hotwater_appliance.rb</filename>
<filetype>rb</filetype>
<usage_type>test</usage_type>
<checksum>A872289D</checksum>
<checksum>E3A99BA1</checksum>
</file>
<file>
<filename>test_hvac.rb</filename>
Expand Down Expand Up @@ -670,13 +670,13 @@
<filename>test_validation.rb</filename>
<filetype>rb</filetype>
<usage_type>test</usage_type>
<checksum>13E62984</checksum>
<checksum>2976481F</checksum>
</file>
<file>
<filename>test_water_heater.rb</filename>
<filetype>rb</filetype>
<usage_type>test</usage_type>
<checksum>01482223</checksum>
<checksum>485EE23B</checksum>
</file>
<file>
<filename>test_weather.rb</filename>
Expand Down
15 changes: 7 additions & 8 deletions resources/hpxml-measures/HPXMLtoOpenStudio/resources/airflow.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class Airflow
# Constants
InfilPressureExponent = 0.65

def self.apply(model, runner, weather, spaces, hpxml_header, hpxml_bldg, cfa, nbeds,
def self.apply(model, runner, weather, spaces, hpxml_header, hpxml_bldg, cfa,
ncfl_ag, duct_systems, airloop_map, clg_ssn_sensor, eri_version,
frac_windows_operable, apply_ashrae140_assumptions, schedules_file,
unavailable_periods, hvac_availability_sensor)
Expand All @@ -16,7 +16,6 @@ def self.apply(model, runner, weather, spaces, hpxml_header, hpxml_bldg, cfa, nb
@year = hpxml_header.sim_calendar_year
@conditioned_space = spaces[HPXML::LocationConditionedSpace]
@conditioned_zone = @conditioned_space.thermalZone.get
@nbeds = nbeds
@ncfl_ag = ncfl_ag
@eri_version = eri_version
@apply_ashrae140_assumptions = apply_ashrae140_assumptions
Expand Down Expand Up @@ -2175,11 +2174,11 @@ def self.get_duct_effective_r_value(nominal_rvalue, side, buried_level)
# Deeply buried | 18.1 | 19.6 | 21.0

if buried_level == HPXML::DuctBuriedInsulationPartial
return 5.83 + 2.0 * nominal_rvalue
return 3.46 + 1.05 * nominal_rvalue
elsif buried_level == HPXML::DuctBuriedInsulationFull
return 9.4 + 1.9 * nominal_rvalue
return 7.14 + 1.0 * nominal_rvalue
elsif buried_level == HPXML::DuctBuriedInsulationDeep
return 16.67 + 1.45 * nominal_rvalue
return 14.94 + 0.76 * nominal_rvalue
end
elsif side == HPXML::DuctTypeReturn
# Equations derived from Table 13 in https://www.nrel.gov/docs/fy13osti/55876.pdf
Expand All @@ -2192,11 +2191,11 @@ def self.get_duct_effective_r_value(nominal_rvalue, side, buried_level)
# Deeply buried | 22.8 | 24.7 | 26.6

if buried_level == HPXML::DuctBuriedInsulationPartial
return 7.6 + 2.5 * nominal_rvalue
return 4.62 + 1.31 * nominal_rvalue
elsif buried_level == HPXML::DuctBuriedInsulationFull
return 11.83 + 2.45 * nominal_rvalue
return 8.91 + 1.29 * nominal_rvalue
elsif buried_level == HPXML::DuctBuriedInsulationDeep
return 20.9 + 1.9 * nominal_rvalue
return 18.64 + 1.0 * nominal_rvalue
end
end
end
Expand Down
Loading

0 comments on commit dd48f28

Please sign in to comment.