Skip to content

Commit 8bea78c

Browse files
committed
Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML into bobross_tweaks
# Conflicts: # HPXMLtoOpenStudio/measure.xml # workflow/tests/base_results/results_acca_hvac.csv # workflow/tests/base_results/results_simulations_hvac.csv
2 parents 8754507 + f48f26e commit 8bea78c

31 files changed

+1808
-744
lines changed

BuildResidentialHPXML/README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1217,7 +1217,7 @@ Assembly R-value of the walls.
12171217

12181218
**Windows: Front Window-to-Wall Ratio**
12191219

1220-
The ratio of window area to wall area for the unit's front facade. Enter 0 if specifying Front Window Area instead.
1220+
The ratio of window area to wall area for the unit's front facade. Enter 0 if specifying Front Window Area instead. If the front wall is adiabatic, the value will be ignored.
12211221

12221222
- **Name:** ``window_front_wwr``
12231223
- **Type:** ``Double``
@@ -1230,7 +1230,7 @@ The ratio of window area to wall area for the unit's front facade. Enter 0 if sp
12301230

12311231
**Windows: Back Window-to-Wall Ratio**
12321232

1233-
The ratio of window area to wall area for the unit's back facade. Enter 0 if specifying Back Window Area instead.
1233+
The ratio of window area to wall area for the unit's back facade. Enter 0 if specifying Back Window Area instead. If the back wall is adiabatic, the value will be ignored.
12341234

12351235
- **Name:** ``window_back_wwr``
12361236
- **Type:** ``Double``
@@ -1243,7 +1243,7 @@ The ratio of window area to wall area for the unit's back facade. Enter 0 if spe
12431243

12441244
**Windows: Left Window-to-Wall Ratio**
12451245

1246-
The ratio of window area to wall area for the unit's left facade (when viewed from the front). Enter 0 if specifying Left Window Area instead.
1246+
The ratio of window area to wall area for the unit's left facade (when viewed from the front). Enter 0 if specifying Left Window Area instead. If the left wall is adiabatic, the value will be ignored.
12471247

12481248
- **Name:** ``window_left_wwr``
12491249
- **Type:** ``Double``
@@ -1256,7 +1256,7 @@ The ratio of window area to wall area for the unit's left facade (when viewed fr
12561256

12571257
**Windows: Right Window-to-Wall Ratio**
12581258

1259-
The ratio of window area to wall area for the unit's right facade (when viewed from the front). Enter 0 if specifying Right Window Area instead.
1259+
The ratio of window area to wall area for the unit's right facade (when viewed from the front). Enter 0 if specifying Right Window Area instead. If the right wall is adiabatic, the value will be ignored.
12601260

12611261
- **Name:** ``window_right_wwr``
12621262
- **Type:** ``Double``
@@ -1269,7 +1269,7 @@ The ratio of window area to wall area for the unit's right facade (when viewed f
12691269

12701270
**Windows: Front Window Area**
12711271

1272-
The amount of window area on the unit's front facade. Enter 0 if specifying Front Window-to-Wall Ratio instead.
1272+
The amount of window area on the unit's front facade. Enter 0 if specifying Front Window-to-Wall Ratio instead. If the front wall is adiabatic, the value will be ignored.
12731273

12741274
- **Name:** ``window_area_front``
12751275
- **Type:** ``Double``
@@ -1282,7 +1282,7 @@ The amount of window area on the unit's front facade. Enter 0 if specifying Fron
12821282

12831283
**Windows: Back Window Area**
12841284

1285-
The amount of window area on the unit's back facade. Enter 0 if specifying Back Window-to-Wall Ratio instead.
1285+
The amount of window area on the unit's back facade. Enter 0 if specifying Back Window-to-Wall Ratio instead. If the back wall is adiabatic, the value will be ignored.
12861286

12871287
- **Name:** ``window_area_back``
12881288
- **Type:** ``Double``
@@ -1295,7 +1295,7 @@ The amount of window area on the unit's back facade. Enter 0 if specifying Back
12951295

12961296
**Windows: Left Window Area**
12971297

1298-
The amount of window area on the unit's left facade (when viewed from the front). Enter 0 if specifying Left Window-to-Wall Ratio instead.
1298+
The amount of window area on the unit's left facade (when viewed from the front). Enter 0 if specifying Left Window-to-Wall Ratio instead. If the left wall is adiabatic, the value will be ignored.
12991299

13001300
- **Name:** ``window_area_left``
13011301
- **Type:** ``Double``
@@ -1308,7 +1308,7 @@ The amount of window area on the unit's left facade (when viewed from the front)
13081308

13091309
**Windows: Right Window Area**
13101310

1311-
The amount of window area on the unit's right facade (when viewed from the front). Enter 0 if specifying Right Window-to-Wall Ratio instead.
1311+
The amount of window area on the unit's right facade (when viewed from the front). Enter 0 if specifying Right Window-to-Wall Ratio instead. If the right wall is adiabatic, the value will be ignored.
13121312

13131313
- **Name:** ``window_area_right``
13141314
- **Type:** ``Double``

BuildResidentialHPXML/measure.rb

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -786,56 +786,56 @@ def arguments(model) # rubocop:disable Lint/UnusedMethodArgument
786786
arg = OpenStudio::Measure::OSArgument::makeDoubleArgument('window_front_wwr', true)
787787
arg.setDisplayName('Windows: Front Window-to-Wall Ratio')
788788
arg.setUnits('Frac')
789-
arg.setDescription("The ratio of window area to wall area for the unit's front facade. Enter 0 if specifying Front Window Area instead.")
789+
arg.setDescription("The ratio of window area to wall area for the unit's front facade. Enter 0 if specifying Front Window Area instead. If the front wall is adiabatic, the value will be ignored.")
790790
arg.setDefaultValue(0.18)
791791
args << arg
792792

793793
arg = OpenStudio::Measure::OSArgument::makeDoubleArgument('window_back_wwr', true)
794794
arg.setDisplayName('Windows: Back Window-to-Wall Ratio')
795795
arg.setUnits('Frac')
796-
arg.setDescription("The ratio of window area to wall area for the unit's back facade. Enter 0 if specifying Back Window Area instead.")
796+
arg.setDescription("The ratio of window area to wall area for the unit's back facade. Enter 0 if specifying Back Window Area instead. If the back wall is adiabatic, the value will be ignored.")
797797
arg.setDefaultValue(0.18)
798798
args << arg
799799

800800
arg = OpenStudio::Measure::OSArgument::makeDoubleArgument('window_left_wwr', true)
801801
arg.setDisplayName('Windows: Left Window-to-Wall Ratio')
802802
arg.setUnits('Frac')
803-
arg.setDescription("The ratio of window area to wall area for the unit's left facade (when viewed from the front). Enter 0 if specifying Left Window Area instead.")
803+
arg.setDescription("The ratio of window area to wall area for the unit's left facade (when viewed from the front). Enter 0 if specifying Left Window Area instead. If the left wall is adiabatic, the value will be ignored.")
804804
arg.setDefaultValue(0.18)
805805
args << arg
806806

807807
arg = OpenStudio::Measure::OSArgument::makeDoubleArgument('window_right_wwr', true)
808808
arg.setDisplayName('Windows: Right Window-to-Wall Ratio')
809809
arg.setUnits('Frac')
810-
arg.setDescription("The ratio of window area to wall area for the unit's right facade (when viewed from the front). Enter 0 if specifying Right Window Area instead.")
810+
arg.setDescription("The ratio of window area to wall area for the unit's right facade (when viewed from the front). Enter 0 if specifying Right Window Area instead. If the right wall is adiabatic, the value will be ignored.")
811811
arg.setDefaultValue(0.18)
812812
args << arg
813813

814814
arg = OpenStudio::Measure::OSArgument::makeDoubleArgument('window_area_front', true)
815815
arg.setDisplayName('Windows: Front Window Area')
816816
arg.setUnits('ft^2')
817-
arg.setDescription("The amount of window area on the unit's front facade. Enter 0 if specifying Front Window-to-Wall Ratio instead.")
817+
arg.setDescription("The amount of window area on the unit's front facade. Enter 0 if specifying Front Window-to-Wall Ratio instead. If the front wall is adiabatic, the value will be ignored.")
818818
arg.setDefaultValue(0)
819819
args << arg
820820

821821
arg = OpenStudio::Measure::OSArgument::makeDoubleArgument('window_area_back', true)
822822
arg.setDisplayName('Windows: Back Window Area')
823823
arg.setUnits('ft^2')
824-
arg.setDescription("The amount of window area on the unit's back facade. Enter 0 if specifying Back Window-to-Wall Ratio instead.")
824+
arg.setDescription("The amount of window area on the unit's back facade. Enter 0 if specifying Back Window-to-Wall Ratio instead. If the back wall is adiabatic, the value will be ignored.")
825825
arg.setDefaultValue(0)
826826
args << arg
827827

828828
arg = OpenStudio::Measure::OSArgument::makeDoubleArgument('window_area_left', true)
829829
arg.setDisplayName('Windows: Left Window Area')
830830
arg.setUnits('ft^2')
831-
arg.setDescription("The amount of window area on the unit's left facade (when viewed from the front). Enter 0 if specifying Left Window-to-Wall Ratio instead.")
831+
arg.setDescription("The amount of window area on the unit's left facade (when viewed from the front). Enter 0 if specifying Left Window-to-Wall Ratio instead. If the left wall is adiabatic, the value will be ignored.")
832832
arg.setDefaultValue(0)
833833
args << arg
834834

835835
arg = OpenStudio::Measure::OSArgument::makeDoubleArgument('window_area_right', true)
836836
arg.setDisplayName('Windows: Right Window Area')
837837
arg.setUnits('ft^2')
838-
arg.setDescription("The amount of window area on the unit's right facade (when viewed from the front). Enter 0 if specifying Right Window-to-Wall Ratio instead.")
838+
arg.setDescription("The amount of window area on the unit's right facade (when viewed from the front). Enter 0 if specifying Right Window-to-Wall Ratio instead. If the right wall is adiabatic, the value will be ignored.")
839839
arg.setDefaultValue(0)
840840
args << arg
841841

BuildResidentialHPXML/measure.xml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
<schema_version>3.1</schema_version>
44
<name>build_residential_hpxml</name>
55
<uid>a13a8983-2b01-4930-8af2-42030b6e4233</uid>
6-
<version_id>c4dd5a2c-b6ac-467e-b914-ad2f0d59cf23</version_id>
7-
<version_modified>2024-07-17T17:04:58Z</version_modified>
6+
<version_id>8d558b94-90a7-4f68-86a0-8f80b41ddbb5</version_id>
7+
<version_modified>2024-08-06T22:34:22Z</version_modified>
88
<xml_checksum>2C38F48B</xml_checksum>
99
<class_name>BuildResidentialHPXML</class_name>
1010
<display_name>HPXML Builder</display_name>
@@ -1755,7 +1755,7 @@
17551755
<argument>
17561756
<name>window_front_wwr</name>
17571757
<display_name>Windows: Front Window-to-Wall Ratio</display_name>
1758-
<description>The ratio of window area to wall area for the unit's front facade. Enter 0 if specifying Front Window Area instead.</description>
1758+
<description>The ratio of window area to wall area for the unit's front facade. Enter 0 if specifying Front Window Area instead. If the front wall is adiabatic, the value will be ignored.</description>
17591759
<type>Double</type>
17601760
<units>Frac</units>
17611761
<required>true</required>
@@ -1765,7 +1765,7 @@
17651765
<argument>
17661766
<name>window_back_wwr</name>
17671767
<display_name>Windows: Back Window-to-Wall Ratio</display_name>
1768-
<description>The ratio of window area to wall area for the unit's back facade. Enter 0 if specifying Back Window Area instead.</description>
1768+
<description>The ratio of window area to wall area for the unit's back facade. Enter 0 if specifying Back Window Area instead. If the back wall is adiabatic, the value will be ignored.</description>
17691769
<type>Double</type>
17701770
<units>Frac</units>
17711771
<required>true</required>
@@ -1775,7 +1775,7 @@
17751775
<argument>
17761776
<name>window_left_wwr</name>
17771777
<display_name>Windows: Left Window-to-Wall Ratio</display_name>
1778-
<description>The ratio of window area to wall area for the unit's left facade (when viewed from the front). Enter 0 if specifying Left Window Area instead.</description>
1778+
<description>The ratio of window area to wall area for the unit's left facade (when viewed from the front). Enter 0 if specifying Left Window Area instead. If the left wall is adiabatic, the value will be ignored.</description>
17791779
<type>Double</type>
17801780
<units>Frac</units>
17811781
<required>true</required>
@@ -1785,7 +1785,7 @@
17851785
<argument>
17861786
<name>window_right_wwr</name>
17871787
<display_name>Windows: Right Window-to-Wall Ratio</display_name>
1788-
<description>The ratio of window area to wall area for the unit's right facade (when viewed from the front). Enter 0 if specifying Right Window Area instead.</description>
1788+
<description>The ratio of window area to wall area for the unit's right facade (when viewed from the front). Enter 0 if specifying Right Window Area instead. If the right wall is adiabatic, the value will be ignored.</description>
17891789
<type>Double</type>
17901790
<units>Frac</units>
17911791
<required>true</required>
@@ -1795,7 +1795,7 @@
17951795
<argument>
17961796
<name>window_area_front</name>
17971797
<display_name>Windows: Front Window Area</display_name>
1798-
<description>The amount of window area on the unit's front facade. Enter 0 if specifying Front Window-to-Wall Ratio instead.</description>
1798+
<description>The amount of window area on the unit's front facade. Enter 0 if specifying Front Window-to-Wall Ratio instead. If the front wall is adiabatic, the value will be ignored.</description>
17991799
<type>Double</type>
18001800
<units>ft^2</units>
18011801
<required>true</required>
@@ -1805,7 +1805,7 @@
18051805
<argument>
18061806
<name>window_area_back</name>
18071807
<display_name>Windows: Back Window Area</display_name>
1808-
<description>The amount of window area on the unit's back facade. Enter 0 if specifying Back Window-to-Wall Ratio instead.</description>
1808+
<description>The amount of window area on the unit's back facade. Enter 0 if specifying Back Window-to-Wall Ratio instead. If the back wall is adiabatic, the value will be ignored.</description>
18091809
<type>Double</type>
18101810
<units>ft^2</units>
18111811
<required>true</required>
@@ -1815,7 +1815,7 @@
18151815
<argument>
18161816
<name>window_area_left</name>
18171817
<display_name>Windows: Left Window Area</display_name>
1818-
<description>The amount of window area on the unit's left facade (when viewed from the front). Enter 0 if specifying Left Window-to-Wall Ratio instead.</description>
1818+
<description>The amount of window area on the unit's left facade (when viewed from the front). Enter 0 if specifying Left Window-to-Wall Ratio instead. If the left wall is adiabatic, the value will be ignored.</description>
18191819
<type>Double</type>
18201820
<units>ft^2</units>
18211821
<required>true</required>
@@ -1825,7 +1825,7 @@
18251825
<argument>
18261826
<name>window_area_right</name>
18271827
<display_name>Windows: Right Window Area</display_name>
1828-
<description>The amount of window area on the unit's right facade (when viewed from the front). Enter 0 if specifying Right Window-to-Wall Ratio instead.</description>
1828+
<description>The amount of window area on the unit's right facade (when viewed from the front). Enter 0 if specifying Right Window-to-Wall Ratio instead. If the right wall is adiabatic, the value will be ignored.</description>
18291829
<type>Double</type>
18301830
<units>ft^2</units>
18311831
<required>true</required>
@@ -7389,7 +7389,7 @@
73897389
<filename>README.md</filename>
73907390
<filetype>md</filetype>
73917391
<usage_type>readme</usage_type>
7392-
<checksum>BD785B9E</checksum>
7392+
<checksum>B702F428</checksum>
73937393
</file>
73947394
<file>
73957395
<filename>README.md.erb</filename>
@@ -7406,13 +7406,13 @@
74067406
<filename>measure.rb</filename>
74077407
<filetype>rb</filetype>
74087408
<usage_type>script</usage_type>
7409-
<checksum>09586CC1</checksum>
7409+
<checksum>0472491B</checksum>
74107410
</file>
74117411
<file>
74127412
<filename>geometry.rb</filename>
74137413
<filetype>rb</filetype>
74147414
<usage_type>resource</usage_type>
7415-
<checksum>3BCF34D6</checksum>
7415+
<checksum>2764D675</checksum>
74167416
</file>
74177417
<file>
74187418
<filename>test_build_residential_hpxml.rb</filename>

BuildResidentialHPXML/resources/geometry.rb

Lines changed: 0 additions & 110 deletions
Original file line numberDiff line numberDiff line change
@@ -1546,116 +1546,6 @@ def self.create_windows_and_skylights(runner:,
15461546
wall_surfaces[facade].each do |surface|
15471547
surface_window_area[surface] += surface_avail_area[surface] / facade_avail_area[facade] * target_facade_areas[facade]
15481548
end
1549-
1550-
# If window area for a surface is less than the minimum window area,
1551-
# set the window area to zero and proportionally redistribute to the
1552-
# other surfaces on that facade and unit.
1553-
1554-
# Check wall surface areas (by unit/space)
1555-
model.getBuildingUnits.each do |unit|
1556-
wall_surfaces[facade].each_with_index do |surface, surface_num|
1557-
next if surface_window_area[surface] == 0
1558-
next unless unit.spaces.include? surface.space.get # surface belongs to this unit
1559-
next unless surface_window_area[surface] < min_single_window_area
1560-
1561-
# Future surfaces are those that have not yet been compared to min_single_window_area
1562-
future_surfaces_area = 0
1563-
wall_surfaces[facade].each_with_index do |future_surface, future_surface_num|
1564-
next if future_surface_num <= surface_num
1565-
next unless unit.spaces.include? future_surface.space.get
1566-
1567-
future_surfaces_area += surface_avail_area[future_surface]
1568-
end
1569-
next if future_surfaces_area == 0
1570-
1571-
removed_window_area = surface_window_area[surface]
1572-
surface_window_area[surface] = 0
1573-
1574-
wall_surfaces[facade].each_with_index do |future_surface, future_surface_num|
1575-
next if future_surface_num <= surface_num
1576-
next unless unit.spaces.include? future_surface.space.get
1577-
1578-
surface_window_area[future_surface] += removed_window_area * surface_avail_area[future_surface] / future_surfaces_area
1579-
end
1580-
end
1581-
end
1582-
end
1583-
1584-
# Calculate facade areas for each unit
1585-
unit_facade_areas = {}
1586-
unit_wall_surfaces = {}
1587-
model.getBuildingUnits.each do |unit|
1588-
unit_facade_areas[unit] = {}
1589-
unit_wall_surfaces[unit] = {}
1590-
facades.each do |facade|
1591-
unit_facade_areas[unit][facade] = 0
1592-
unit_wall_surfaces[unit][facade] = []
1593-
wall_surfaces[facade].each do |surface|
1594-
next unless unit.spaces.include? surface.space.get
1595-
1596-
unit_facade_areas[unit][facade] += surface_window_area[surface]
1597-
unit_wall_surfaces[unit][facade] << surface
1598-
end
1599-
end
1600-
end
1601-
1602-
# if the sum of the window areas on the facade are < minimum, move to different facade
1603-
facades.each do |facade|
1604-
model.getBuildingUnits.each do |unit|
1605-
next if unit_facade_areas[unit][facade] == 0
1606-
next unless unit_facade_areas[unit][facade] < min_single_window_area
1607-
1608-
new_facade = unit_facade_areas[unit].max_by { |_k, v| v }[0] # move to facade with largest window area
1609-
next if new_facade == facade # can't move to same facade
1610-
next if unit_facade_areas[unit][new_facade] <= unit_facade_areas[unit][facade] # only move to facade with >= window area
1611-
1612-
area_moved = unit_facade_areas[unit][facade]
1613-
unit_facade_areas[unit][facade] = 0
1614-
wall_surfaces[facade].each do |surface|
1615-
next unless unit.spaces.include? surface.space.get # surface is in this unit
1616-
1617-
surface_window_area[surface] = 0
1618-
end
1619-
1620-
unit_facade_areas[unit][new_facade] += area_moved
1621-
sum_window_area = 0
1622-
wall_surfaces[new_facade].each do |surface|
1623-
next unless unit.spaces.include? surface.space.get # surface is in this unit
1624-
1625-
sum_window_area += UnitConversions.convert(surface.grossArea, 'm^2', 'ft^2')
1626-
end
1627-
1628-
wall_surfaces[new_facade].each do |surface|
1629-
next unless unit.spaces.include? surface.space.get # surface is in this unit
1630-
1631-
split_window_area = area_moved * UnitConversions.convert(surface.grossArea, 'm^2', 'ft^2') / sum_window_area
1632-
surface_window_area[surface] += split_window_area
1633-
end
1634-
1635-
runner.registerWarning("The #{facade} facade window area (#{area_moved.round(2)} ft2) is less than the minimum window area allowed (#{min_single_window_area.round(2)} ft2), and has been added to the #{new_facade} facade.")
1636-
end
1637-
end
1638-
1639-
facades.each do |facade|
1640-
model.getBuildingUnits.each do |unit|
1641-
# Because the above process is calculated based on the order of surfaces, it's possible
1642-
# that we have less area for this facade than we should. If so, redistribute proportionally
1643-
# to all surfaces that have window area.
1644-
sum_window_area = 0
1645-
wall_surfaces[facade].each do |surface|
1646-
next unless unit.spaces.include? surface.space.get
1647-
1648-
sum_window_area += surface_window_area[surface]
1649-
end
1650-
next if sum_window_area == 0
1651-
next if unit_facade_areas[unit][facade] < sum_window_area # for cases where window area was added from different facade
1652-
1653-
wall_surfaces[facade].each do |surface|
1654-
next unless unit.spaces.include? surface.space.get
1655-
1656-
surface_window_area[surface] += surface_window_area[surface] / sum_window_area * (unit_facade_areas[unit][facade] - sum_window_area)
1657-
end
1658-
end
16591549
end
16601550

16611551
tot_win_area = 0

0 commit comments

Comments
 (0)