Skip to content

Commit

Permalink
Merge pull request #706 from NREL/more_real_homes
Browse files Browse the repository at this point in the history
Add some more real home test files
  • Loading branch information
shorowit authored Jan 13, 2024
2 parents 61d9c92 + c8f45b0 commit 47871e7
Show file tree
Hide file tree
Showing 83 changed files with 7,110 additions and 253 deletions.
3 changes: 3 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
__New Features__
- **Breaking change**: Each `VentilationFan` must have one (and only one) `UsedFor...` element set to true.

__Bugfixes__
- Fixes possible 301ruleset.rb error due to floating point arithmetic.

## OpenStudio-ERI v1.7.0

__New Features__
Expand Down
2 changes: 1 addition & 1 deletion docs/source/workflow_inputs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ Each window or glass door area is entered as an ``/HPXML/Building/BuildingDetail

.. [#] FractionOperable reflects whether the windows are operable (can be opened), not how they are used by the occupants.
If a ``Window`` represents a single window, the value should be 0 or 1.
If a ``Window`` represents multiple windows (e.g., 4), the value should be between 0 and 1 (e.g., 0, 0.25, 0.5, 0.75, or 1).
If a ``Window`` represents multiple windows, the value is calculated as the total window area for any operable windows divided by the total window area.
.. [#] PerformanceClass choices are "residential" (e.g., Class R) or "architectural" (e.g., Class AW).
.. [#] AttachedToWall must reference a ``Wall`` or ``FoundationWall``.
Expand Down
10 changes: 5 additions & 5 deletions rulesets/resources/301ruleset.rb
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ def self.set_enclosure_roofs_reference(orig_bldg, new_bldg)

# Create insulated roofs for exterior thermal boundary surface.
# Area is equally distributed to each direction to be consistent with walls.
if sum_gross_area > 0
if sum_gross_area > 0.1
new_bldg.roofs.add(id: 'RoofArea',
interior_adjacent_to: HPXML::LocationConditionedSpace,
area: sum_gross_area,
Expand Down Expand Up @@ -618,7 +618,7 @@ def self.set_enclosure_walls_reference(orig_bldg, new_bldg)
# Create insulated walls for exterior thermal boundary surface.
# Area is equally distributed to each direction to be able to accommodate windows,
# which are also equally distributed.
if sum_gross_area > 0
if sum_gross_area > 0.1
new_bldg.walls.add(id: 'WallArea',
exterior_adjacent_to: HPXML::LocationOutside,
interior_adjacent_to: HPXML::LocationConditionedSpace,
Expand Down Expand Up @@ -1076,14 +1076,14 @@ def self.set_enclosure_doors_reference(orig_bldg, new_bldg)
else
azimuth = 0
end
if exterior_area > 0
if exterior_area > 0.1
new_bldg.doors.add(id: 'ExteriorDoorArea',
wall_idref: new_bldg.walls.select { |w| w.is_exterior_thermal_boundary }[0].id,
area: exterior_area,
azimuth: azimuth,
r_value: (1.0 / ufactor).round(3))
end
if interior_area > 0
if interior_area > 0.1
new_bldg.doors.add(id: 'InteriorDoorArea',
wall_idref: new_bldg.walls.select { |w| w.exterior_adjacent_to == HPXML::LocationOtherHousingUnit }[0].id,
area: interior_area,
Expand Down Expand Up @@ -1116,7 +1116,7 @@ def self.set_enclosure_doors_iad(orig_bldg, new_bldg)
else
azimuth = 0
end
if exterior_area + interior_area > 0
if exterior_area + interior_area > 0.1
new_bldg.doors.add(id: 'DoorArea',
wall_idref: new_bldg.walls.select { |w| w.is_exterior_thermal_boundary }[0].id,
area: exterior_area + interior_area,
Expand Down
18 changes: 11 additions & 7 deletions rulesets/resources/ES_ZERHruleset.rb
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ def self.set_enclosure_roofs_reference(orig_bldg, new_bldg)
pitch_to_radians = Math.atan(default_roof_pitch / 12.0)
roof_area = orig_floor.area / Math.cos(pitch_to_radians)

new_bldg.roofs.add(id: 'TargetRoof',
new_bldg.roofs.add(id: "TargetRoof#{new_bldg.roofs.size + 1}",
interior_adjacent_to: HPXML::LocationAtticVented,
area: roof_area,
azimuth: nil,
Expand All @@ -283,7 +283,7 @@ def self.set_enclosure_roofs_reference(orig_bldg, new_bldg)
pitch: default_roof_pitch,
radiant_barrier: radiant_barrier_bool,
radiant_barrier_grade: radiant_barrier_grade,
insulation_id: 'TargetRoofInsulation',
insulation_id: "TargetRoof#{new_bldg.roofs.size + 1}Insulation",
insulation_assembly_r_value: 2.3) # Assumes that the roof is uninsulated
end
end
Expand Down Expand Up @@ -485,12 +485,12 @@ def self.set_enclosure_ceilings_reference(orig_bldg, new_bldg)
pitch_to_radians = Math.atan(orig_roof.pitch / 12.0)
floor_area = orig_roof.area * Math.cos(pitch_to_radians)

new_bldg.floors.add(id: 'TargetFloor',
new_bldg.floors.add(id: "TargetFloor#{new_bldg.floors.size + 1}",
exterior_adjacent_to: HPXML::LocationAtticVented,
interior_adjacent_to: HPXML::LocationConditionedSpace,
floor_type: HPXML::FloorTypeWoodFrame,
area: floor_area,
insulation_id: 'TargetFloorInsulation',
insulation_id: "TargetFloor#{new_bldg.floors.size + 1}Insulation",
insulation_assembly_r_value: (1.0 / ceiling_ufactor).round(3))
end
end
Expand Down Expand Up @@ -588,6 +588,8 @@ def self.set_enclosure_windows_reference(orig_bldg, new_bldg)

window_area = lookup_reference_value('window_area')

wall = new_bldg.walls.find { |w| w.interior_adjacent_to == HPXML::LocationConditionedSpace && w.exterior_adjacent_to == HPXML::LocationOutside }

# Calculate the window area
if window_area == 'same as rated, with exceptions'
if @has_cond_bsmnt || [HPXML::ResidentialTypeSFA, HPXML::ResidentialTypeApartment].include?(@bldg_type)
Expand All @@ -612,7 +614,7 @@ def self.set_enclosure_windows_reference(orig_bldg, new_bldg)
azimuth: azimuth,
ufactor: win_ufactor,
shgc: win_shgc,
wall_idref: 'TargetWall',
wall_idref: wall.id,
performance_class: HPXML::WindowClassResidential,
fraction_operable: fraction_operable)
end
Expand All @@ -631,7 +633,7 @@ def self.set_enclosure_windows_reference(orig_bldg, new_bldg)
azimuth: win.azimuth,
ufactor: win_ufactor,
shgc: win_shgc,
wall_idref: 'TargetWall',
wall_idref: wall.id,
performance_class: win.performance_class.nil? ? HPXML::WindowClassResidential : win.performance_class,
fraction_operable: fraction_operable)
end
Expand All @@ -650,9 +652,11 @@ def self.set_enclosure_doors_reference(orig_bldg, new_bldg)
# The door type is assumed to be opaque
door_ufactor = lookup_reference_value('door_ufactor')

wall = new_bldg.walls.find { |w| w.interior_adjacent_to == HPXML::LocationConditionedSpace && w.exterior_adjacent_to == HPXML::LocationOutside }

orig_bldg.doors.each do |orig_door|
new_bldg.doors.add(id: orig_door.id,
wall_idref: 'TargetWall',
wall_idref: wall.id,
area: orig_door.area,
azimuth: orig_door.azimuth,
r_value: (1.0 / door_ufactor).round(3))
Expand Down
7 changes: 7 additions & 0 deletions tasks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2932,6 +2932,13 @@ def create_sample_hpxmls
hpxml_bldg.climate_and_risk_zones.weather_station_epw_filepath = 'USA_OR_Portland.Intl.AP.726980_TMY3.epw'
hpxml_bldg.state_code = 'OR'
XMLHelper.write_file(hpxml.to_doc, 'workflow/sample_files/base-bldgtype-mf-unit-location-portland-or.xml')

# Reformat real_homes HPXMLs
puts 'Reformatting real_homes HPXMLs...'
Dir['workflow/real_homes/*.xml'].each do |hpxml_path|
hpxml = HPXML.new(hpxml_path: hpxml_path)
XMLHelper.write_file(hpxml.to_doc, hpxml_path)
end
end

command_list = [:update_measures, :create_release_zips]
Expand Down
4 changes: 2 additions & 2 deletions workflow/real_homes/house001.xml
Original file line number Diff line number Diff line change
Expand Up @@ -269,14 +269,14 @@
</DuctLeakage>
</DuctLeakageMeasurement>
<Ducts>
<SystemIdentifier id="Duct1"/>
<SystemIdentifier id='Duct1'/>
<DuctType>supply</DuctType>
<DuctInsulationRValue>0.0</DuctInsulationRValue>
<DuctLocation>conditioned space</DuctLocation>
<DuctSurfaceArea>199.8</DuctSurfaceArea>
</Ducts>
<Ducts>
<SystemIdentifier id="Duct2"/>
<SystemIdentifier id='Duct2'/>
<DuctType>return</DuctType>
<DuctInsulationRValue>0.0</DuctInsulationRValue>
<DuctLocation>conditioned space</DuctLocation>
Expand Down
4 changes: 2 additions & 2 deletions workflow/real_homes/house002.xml
Original file line number Diff line number Diff line change
Expand Up @@ -498,14 +498,14 @@
</DuctLeakage>
</DuctLeakageMeasurement>
<Ducts>
<SystemIdentifier id="Duct1"/>
<SystemIdentifier id='Duct1'/>
<DuctType>supply</DuctType>
<DuctInsulationRValue>4.0</DuctInsulationRValue>
<DuctLocation>conditioned space</DuctLocation>
<DuctSurfaceArea>327.5</DuctSurfaceArea>
</Ducts>
<Ducts>
<SystemIdentifier id="Duct2"/>
<SystemIdentifier id='Duct2'/>
<DuctType>return</DuctType>
<DuctInsulationRValue>2.0</DuctInsulationRValue>
<DuctLocation>conditioned space</DuctLocation>
Expand Down
8 changes: 4 additions & 4 deletions workflow/real_homes/house003.xml
Original file line number Diff line number Diff line change
Expand Up @@ -894,28 +894,28 @@
</DuctLeakage>
</DuctLeakageMeasurement>
<Ducts>
<SystemIdentifier id="Duct1"/>
<SystemIdentifier id='Duct1'/>
<DuctType>supply</DuctType>
<DuctInsulationRValue>4.2</DuctInsulationRValue>
<DuctLocation>conditioned space</DuctLocation>
<DuctSurfaceArea>322.7</DuctSurfaceArea>
</Ducts>
<Ducts>
<SystemIdentifier id="Duct2"/>
<SystemIdentifier id='Duct2'/>
<DuctType>return</DuctType>
<DuctInsulationRValue>4.2</DuctInsulationRValue>
<DuctLocation>conditioned space</DuctLocation>
<DuctSurfaceArea>239.0</DuctSurfaceArea>
</Ducts>
<Ducts>
<SystemIdentifier id="Duct3"/>
<SystemIdentifier id='Duct3'/>
<DuctType>supply</DuctType>
<DuctInsulationRValue>4.2</DuctInsulationRValue>
<DuctLocation>basement - conditioned</DuctLocation>
<DuctSurfaceArea>215.1</DuctSurfaceArea>
</Ducts>
<Ducts>
<SystemIdentifier id="Duct4"/>
<SystemIdentifier id='Duct4'/>
<DuctType>return</DuctType>
<DuctInsulationRValue>4.2</DuctInsulationRValue>
<DuctLocation>basement - conditioned</DuctLocation>
Expand Down
8 changes: 4 additions & 4 deletions workflow/real_homes/house004.xml
Original file line number Diff line number Diff line change
Expand Up @@ -669,28 +669,28 @@
</DuctLeakage>
</DuctLeakageMeasurement>
<Ducts>
<SystemIdentifier id="Duct1"/>
<SystemIdentifier id='Duct1'/>
<DuctType>supply</DuctType>
<DuctInsulationRValue>0.0</DuctInsulationRValue>
<DuctLocation>basement - unconditioned</DuctLocation>
<DuctSurfaceArea>124.5</DuctSurfaceArea>
</Ducts>
<Ducts>
<SystemIdentifier id="Duct2"/>
<SystemIdentifier id='Duct2'/>
<DuctType>return</DuctType>
<DuctInsulationRValue>0.0</DuctInsulationRValue>
<DuctLocation>basement - unconditioned</DuctLocation>
<DuctSurfaceArea>46.1</DuctSurfaceArea>
</Ducts>
<Ducts>
<SystemIdentifier id="Duct3"/>
<SystemIdentifier id='Duct3'/>
<DuctType>supply</DuctType>
<DuctInsulationRValue>0.0</DuctInsulationRValue>
<DuctLocation>conditioned space</DuctLocation>
<DuctSurfaceArea>186.7</DuctSurfaceArea>
</Ducts>
<Ducts>
<SystemIdentifier id="Duct4"/>
<SystemIdentifier id='Duct4'/>
<DuctType>return</DuctType>
<DuctInsulationRValue>0.0</DuctInsulationRValue>
<DuctLocation>conditioned space</DuctLocation>
Expand Down
4 changes: 2 additions & 2 deletions workflow/real_homes/house005.xml
Original file line number Diff line number Diff line change
Expand Up @@ -247,14 +247,14 @@
</DuctLeakage>
</DuctLeakageMeasurement>
<Ducts>
<SystemIdentifier id="Duct1"/>
<SystemIdentifier id='Duct1'/>
<DuctType>supply</DuctType>
<DuctInsulationRValue>1.0</DuctInsulationRValue>
<DuctLocation>conditioned space</DuctLocation>
<DuctSurfaceArea>159.6</DuctSurfaceArea>
</Ducts>
<Ducts>
<SystemIdentifier id="Duct2"/>
<SystemIdentifier id='Duct2'/>
<DuctType>return</DuctType>
<DuctInsulationRValue>1.0</DuctInsulationRValue>
<DuctLocation>conditioned space</DuctLocation>
Expand Down
16 changes: 8 additions & 8 deletions workflow/real_homes/house006.xml
Original file line number Diff line number Diff line change
Expand Up @@ -537,28 +537,28 @@
</DuctLeakage>
</DuctLeakageMeasurement>
<Ducts>
<SystemIdentifier id="Duct1"/>
<SystemIdentifier id='Duct1'/>
<DuctType>supply</DuctType>
<DuctInsulationRValue>6.0</DuctInsulationRValue>
<DuctLocation>crawlspace - vented</DuctLocation>
<DuctSurfaceArea>50.5</DuctSurfaceArea>
</Ducts>
<Ducts>
<SystemIdentifier id="Duct2"/>
<SystemIdentifier id='Duct2'/>
<DuctType>return</DuctType>
<DuctInsulationRValue>6.0</DuctInsulationRValue>
<DuctLocation>crawlspace - vented</DuctLocation>
<DuctSurfaceArea>9.4</DuctSurfaceArea>
</Ducts>
<Ducts>
<SystemIdentifier id="Duct3"/>
<SystemIdentifier id='Duct3'/>
<DuctType>supply</DuctType>
<DuctInsulationRValue>8.0</DuctInsulationRValue>
<DuctLocation>attic - vented</DuctLocation>
<DuctSurfaceArea>50.5</DuctSurfaceArea>
</Ducts>
<Ducts>
<SystemIdentifier id="Duct4"/>
<SystemIdentifier id='Duct4'/>
<DuctType>return</DuctType>
<DuctInsulationRValue>6.0</DuctInsulationRValue>
<DuctLocation>attic - vented</DuctLocation>
Expand Down Expand Up @@ -591,28 +591,28 @@
</DuctLeakage>
</DuctLeakageMeasurement>
<Ducts>
<SystemIdentifier id="Duct5"/>
<SystemIdentifier id='Duct5'/>
<DuctType>supply</DuctType>
<DuctInsulationRValue>6.0</DuctInsulationRValue>
<DuctLocation>crawlspace - vented</DuctLocation>
<DuctSurfaceArea>67.4</DuctSurfaceArea>
</Ducts>
<Ducts>
<SystemIdentifier id="Duct6"/>
<SystemIdentifier id='Duct6'/>
<DuctType>return</DuctType>
<DuctInsulationRValue>6.0</DuctInsulationRValue>
<DuctLocation>crawlspace - vented</DuctLocation>
<DuctSurfaceArea>12.5</DuctSurfaceArea>
</Ducts>
<Ducts>
<SystemIdentifier id="Duct7"/>
<SystemIdentifier id='Duct7'/>
<DuctType>supply</DuctType>
<DuctInsulationRValue>8.0</DuctInsulationRValue>
<DuctLocation>attic - vented</DuctLocation>
<DuctSurfaceArea>67.4</DuctSurfaceArea>
</Ducts>
<Ducts>
<SystemIdentifier id="Duct8"/>
<SystemIdentifier id='Duct8'/>
<DuctType>return</DuctType>
<DuctInsulationRValue>6.0</DuctInsulationRValue>
<DuctLocation>attic - vented</DuctLocation>
Expand Down
4 changes: 2 additions & 2 deletions workflow/real_homes/house007.xml
Original file line number Diff line number Diff line change
Expand Up @@ -499,14 +499,14 @@
</DuctLeakage>
</DuctLeakageMeasurement>
<Ducts>
<SystemIdentifier id="Duct1"/>
<SystemIdentifier id='Duct1'/>
<DuctType>supply</DuctType>
<DuctInsulationRValue>0.0</DuctInsulationRValue>
<DuctLocation>conditioned space</DuctLocation>
<DuctSurfaceArea>312.4</DuctSurfaceArea>
</Ducts>
<Ducts>
<SystemIdentifier id="Duct2"/>
<SystemIdentifier id='Duct2'/>
<DuctType>return</DuctType>
<DuctInsulationRValue>0.0</DuctInsulationRValue>
<DuctLocation>conditioned space</DuctLocation>
Expand Down
4 changes: 2 additions & 2 deletions workflow/real_homes/house008.xml
Original file line number Diff line number Diff line change
Expand Up @@ -713,14 +713,14 @@
</DuctLeakage>
</DuctLeakageMeasurement>
<Ducts>
<SystemIdentifier id="Duct1"/>
<SystemIdentifier id='Duct1'/>
<DuctType>supply</DuctType>
<DuctInsulationRValue>0.0</DuctInsulationRValue>
<DuctLocation>basement - conditioned</DuctLocation>
<DuctSurfaceArea>821.7</DuctSurfaceArea>
</Ducts>
<Ducts>
<SystemIdentifier id="Duct2"/>
<SystemIdentifier id='Duct2'/>
<DuctType>return</DuctType>
<DuctInsulationRValue>0.0</DuctInsulationRValue>
<DuctLocation>basement - conditioned</DuctLocation>
Expand Down
4 changes: 2 additions & 2 deletions workflow/real_homes/house009.xml
Original file line number Diff line number Diff line change
Expand Up @@ -474,14 +474,14 @@
</DuctLeakage>
</DuctLeakageMeasurement>
<Ducts>
<SystemIdentifier id="Duct1"/>
<SystemIdentifier id='Duct1'/>
<DuctType>supply</DuctType>
<DuctInsulationRValue>6.0</DuctInsulationRValue>
<DuctLocation>attic - vented</DuctLocation>
<DuctSurfaceArea>460.9</DuctSurfaceArea>
</Ducts>
<Ducts>
<SystemIdentifier id="Duct2"/>
<SystemIdentifier id='Duct2'/>
<DuctType>return</DuctType>
<DuctInsulationRValue>6.0</DuctInsulationRValue>
<DuctLocation>attic - vented</DuctLocation>
Expand Down
Loading

0 comments on commit 47871e7

Please sign in to comment.