Skip to content
This repository was archived by the owner on Mar 6, 2024. It is now read-only.

Incorrectly subtracting R-5 when using ExpandedPolystyreneSheathing element #148

Closed
nmerket opened this issue Jun 11, 2021 · 2 comments · Fixed by #160
Closed

Incorrectly subtracting R-5 when using ExpandedPolystyreneSheathing element #148

nmerket opened this issue Jun 11, 2021 · 2 comments · Fixed by #160
Assignees
Labels

Comments

@nmerket
Copy link
Member

nmerket commented Jun 11, 2021

If you have a wall like this

<Wall>
  <SystemIdentifier id="wall_right"/>
  <WallType>
    <WoodStud>
      <ExpandedPolystyreneSheathing>true</ExpandedPolystyreneSheathing>
    </WoodStud>
  </WallType>
  <Orientation>east</Orientation>
  <Siding>wood siding</Siding>
  <Insulation>
    <SystemIdentifier id="wall_right_insulation"/>
    <Layer>
      <NominalRValue>0</NominalRValue>
    </Layer>
  </Insulation>
</Wall>

This code

if tobool(xpath(hpxmlwall, 'h:WallType/h:WoodStud/h:ExpandedPolystyreneSheathing/text()')) or has_rigid_ins:
wallconstype = 'ps'
# account for the rigid foam sheathing in the construction code
wall_rvalue -= 5
rvalue = wall_round_to_nearest(wall_rvalue, (0, 3, 7, 11, 13, 15, 19, 21))

makes the R-value go negative and causes an error.

The ExpandedPolystyreneSheathing element is kind of weird and should probably be removed from HPXML because the same thing can be described better with an Insulation/Layer. There's no R-value associated with it, so it's not clear whether we're to assume one or expect one in a layer below. Right now the translator apparently expects the R-value to be present in a layer, hence the error.

We could just check if wall_rvalue goes negative and set it to zero if it does. It's kind of a kludgy fix, but avoids the error.

@nmerket nmerket added the bug label Jun 11, 2021
@nmerket
Copy link
Member Author

nmerket commented Jun 11, 2021

See also the docs for this part of the translation.

@nmerket nmerket self-assigned this Jul 2, 2021
@nmerket
Copy link
Member Author

nmerket commented Nov 18, 2021

Verify that it's being handled in #160.

@nmerket nmerket linked a pull request Dec 15, 2021 that will close this issue
4 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant