Skip to content

Commit

Permalink
Update HPXMLtoOpenStudio tests. Fix HPXML file.
Browse files Browse the repository at this point in the history
  • Loading branch information
shorowit committed May 30, 2019
1 parent 7a5ebfc commit 594d6f0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -985,7 +985,7 @@ def get_hpxml_file_foundation_walls_values(hpxml_file, foundation_walls_values)
foundation_walls_values[0][:area] = 600
foundation_walls_values << { :id => "FoundationWallInterior",
:exterior_adjacent_to => "crawlspace - unvented",
:interior_adjacent_to => "basement - conditioned",
:interior_adjacent_to => "basement - unconditioned",
:height => 8,
:area => 360,
:thickness => 8,
Expand Down
2 changes: 1 addition & 1 deletion tests/base-foundation-multiple.xml
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@
<FoundationWall>
<SystemIdentifier id='FoundationWallInterior'/>
<ExteriorAdjacentTo>crawlspace - unvented</ExteriorAdjacentTo>
<InteriorAdjacentTo>basement - conditioned</InteriorAdjacentTo>
<InteriorAdjacentTo>basement - unconditioned</InteriorAdjacentTo>
<Height>8.0</Height>
<Area>360.0</Area>
<Thickness>8.0</Thickness>
Expand Down
8 changes: 4 additions & 4 deletions tests/hpxml_translator_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ def _verify_simulation_outputs(rundir, hpxml_path, results)
end

# Enclosure Roofs
bldg_details.elements.each('Enclosure/Attics/Attic/Roofs/Roof') do |roof|
bldg_details.elements.each('Enclosure/Roofs/Roof') do |roof|
roof_id = roof.elements["SystemIdentifier"].attributes["id"].upcase

# R-value
Expand Down Expand Up @@ -391,7 +391,7 @@ def _verify_simulation_outputs(rundir, hpxml_path, results)
end

# Enclosure Foundation Slabs
bldg_details.elements.each('Enclosure/Foundations/Foundation/Slab') do |slab|
bldg_details.elements.each('Enclosure/Slabs/Slab') do |slab|
slab_id = slab.elements["SystemIdentifier"].attributes["id"].upcase

# Exposed Area
Expand All @@ -417,7 +417,7 @@ def _verify_simulation_outputs(rundir, hpxml_path, results)
end

# Enclosure Walls
bldg_details.elements.each('Enclosure/Walls/Wall[extension[ExteriorAdjacentTo="outside"]] | Enclosure/Attics/Attic/Walls/Wall[extension[ExteriorAdjacentTo="outside"]]') do |wall|
bldg_details.elements.each('Enclosure/Walls/Wall[extension[ExteriorAdjacentTo="outside"]]') do |wall|
wall_id = wall.elements["SystemIdentifier"].attributes["id"].upcase

# R-value
Expand Down Expand Up @@ -489,7 +489,7 @@ def _verify_simulation_outputs(rundir, hpxml_path, results)
assert_in_epsilon(90.0, sql_value, 0.01)
elsif XMLHelper.has_element(subsurface, "AttachedToRoof")
hpxml_value = nil
bldg_details.elements.each('Enclosure/Attics/Attic/Roofs/Roof') do |roof|
bldg_details.elements.each('Enclosure/Roofs/Roof') do |roof|
next if roof.elements["SystemIdentifier"].attributes["id"] != subsurface.elements["AttachedToRoof"].attributes["idref"]

hpxml_value = UnitConversions.convert(Math.atan(Float(XMLHelper.get_value(roof, "Pitch")) / 12.0), "rad", "deg")
Expand Down

0 comments on commit 594d6f0

Please sign in to comment.