Skip to content

Commit

Permalink
Merge pull request #1938 from NREL/hvac_sizing_bugfix
Browse files Browse the repository at this point in the history
Fixes possible hvac sizing error
  • Loading branch information
shorowit authored Feb 27, 2025
2 parents e222dcb + 042d650 commit d092056
Show file tree
Hide file tree
Showing 11 changed files with 605 additions and 11 deletions.
1 change: 1 addition & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ __Bugfixes__
- Fixes unavailable periods for two consecutive, but partial, days.
- Fixes error when specifying a glass block window without interior shading coefficients.
- Fixes battery charging/discharging not being included in peak electricity outputs.
- Fixes possible error if there's a surface w/ interior unconditioned space and exterior "other housing unit".

## OpenStudio-HPXML v1.9.1

Expand Down
6 changes: 3 additions & 3 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>d92a5185-cd4e-4a2e-bf62-4c999fa35bde</version_id>
<version_modified>2025-02-20T18:38:37Z</version_modified>
<version_id>e06192a8-b530-4374-9c83-c7ecd5c93ac4</version_id>
<version_modified>2025-02-27T15:13:32Z</version_modified>
<xml_checksum>D8922A73</xml_checksum>
<class_name>HPXMLtoOpenStudio</class_name>
<display_name>HPXML to OpenStudio Translator</display_name>
Expand Down Expand Up @@ -357,7 +357,7 @@
<filename>hpxml.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>6923DA1E</checksum>
<checksum>65CFD034</checksum>
</file>
<file>
<filename>hpxml_schema/HPXML.xsd</filename>
Expand Down
2 changes: 1 addition & 1 deletion HPXMLtoOpenStudio/resources/hpxml.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11706,7 +11706,7 @@ def self.is_adiabatic(surface)
def self.is_thermal_boundary(surface)
interior_conditioned = conditioned_locations.include? surface.interior_adjacent_to
exterior_conditioned = conditioned_locations.include? surface.exterior_adjacent_to
return (interior_conditioned != exterior_conditioned)
return (interior_conditioned && !exterior_conditioned)
end

# Returns whether the HPXML::Floor object represents a ceiling or floor
Expand Down
18 changes: 11 additions & 7 deletions tasks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -619,25 +619,29 @@ def apply_hpxml_modification_sample_files(hpxml_path, hpxml)
if ['base-bldgtype-mf-unit-adjacent-to-multifamily-buffer-space.xml',
'base-bldgtype-mf-unit-adjacent-to-non-freezing-space.xml',
'base-bldgtype-mf-unit-adjacent-to-other-heated-space.xml',
'base-bldgtype-mf-unit-adjacent-to-other-housing-unit.xml'].include? hpxml_file
if hpxml_file == 'base-bldgtype-mf-unit-adjacent-to-multifamily-buffer-space.xml'
'base-bldgtype-mf-unit-adjacent-to-other-housing-unit.xml',
'base-bldgtype-mf-unit-adjacent-to-other-housing-unit-basement.xml'].include? hpxml_file
if hpxml_file.include? 'multifamily-buffer-space'
adjacent_to = HPXML::LocationOtherMultifamilyBufferSpace
elsif hpxml_file == 'base-bldgtype-mf-unit-adjacent-to-non-freezing-space.xml'
elsif hpxml_file.include? 'non-freezing-space'
adjacent_to = HPXML::LocationOtherNonFreezingSpace
elsif hpxml_file == 'base-bldgtype-mf-unit-adjacent-to-other-heated-space.xml'
elsif hpxml_file.include? 'other-heated-space'
adjacent_to = HPXML::LocationOtherHeatedSpace
elsif hpxml_file == 'base-bldgtype-mf-unit-adjacent-to-other-housing-unit.xml'
elsif hpxml_file.include? 'other-housing-unit'
adjacent_to = HPXML::LocationOtherHousingUnit
end
wall = hpxml_bldg.walls.select { |w|
w.interior_adjacent_to == HPXML::LocationConditionedSpace &&
w.exterior_adjacent_to == HPXML::LocationOtherHousingUnit
}[0]
wall.exterior_adjacent_to = adjacent_to
hpxml_bldg.floors[0].exterior_adjacent_to = adjacent_to
hpxml_bldg.floors[1].exterior_adjacent_to = adjacent_to
if hpxml_file != 'base-bldgtype-mf-unit-adjacent-to-other-housing-unit.xml'
if hpxml_file.include? 'basement'
hpxml_bldg.rim_joists[1].exterior_adjacent_to = adjacent_to
hpxml_bldg.foundation_walls[1].exterior_adjacent_to = adjacent_to
elsif !hpxml_file.include? 'other-housing-unit'
wall.insulation_assembly_r_value = 23
hpxml_bldg.floors[0].exterior_adjacent_to = adjacent_to
hpxml_bldg.floors[0].insulation_assembly_r_value = 18.7
hpxml_bldg.floors[1].insulation_assembly_r_value = 18.7
end
Expand Down
5 changes: 5 additions & 0 deletions workflow/hpxml_inputs.json
Original file line number Diff line number Diff line change
Expand Up @@ -1160,6 +1160,11 @@
"sample_files/base-bldgtype-mf-unit-adjacent-to-other-housing-unit.xml": {
"parent_hpxml": "sample_files/base-bldgtype-mf-unit.xml"
},
"sample_files/base-bldgtype-mf-unit-adjacent-to-other-housing-unit-basement.xml": {
"parent_hpxml": "sample_files/base-bldgtype-mf-unit.xml",
"geometry_foundation_type": "UnconditionedBasement",
"floor_over_foundation_assembly_r": 18.7
},
"sample_files/base-bldgtype-mf-unit-infil-compartmentalization-test.xml": {
"parent_hpxml": "sample_files/base-bldgtype-mf-unit.xml",
"air_leakage_value": 12.16,
Expand Down
Loading

0 comments on commit d092056

Please sign in to comment.