LBNL-ETA / pyWinCalc

Other
28 stars 10 forks source link

SHGC layer temperatures do not include radiation until a SHGC calculation has already been done #52

Open RebeccaPowles opened 2 weeks ago

RebeccaPowles commented 2 weeks ago

The layer temperatures for SHGC conditions give different results if they are evaluated before vs after a call to SHGC. I think the incident radiation is not included in the 'before' case - code for this example attached

SHGC layer temps (before SHGC calc): ['30.8', '30.7', '27.5', '27.4']

SHGC : 0.763

SHGC layer temps (after SHGC calc): ['35.0', '35.1', '33.3', '33.1']

image

pywincalc_shgc_issue.zip

StephenCzarnecki commented 2 weeks ago

Hi Rebecca

Sorry about that but thanks for reporting the issue. The good news is we are in the process of getting a new version of pywincalc released that appears to have this issue fixed. We haven't quite gotten it up on the the official pypi but there is a pywincalc version 3.6.9 on testpypi that should have this fixed.

I took the example you provided and slightly altered it to display 5 decimal places for the temperatures instead of 1 just to be sure and this is the output I get using pywincalc 3.6.9:

U-value : 2.883
Ufactor layer temps:
['-14.15405', '-13.81132', '5.38137', '5.72409']
SHGC layer temps (before SHGC calc):
['35.00003', '35.07226', '33.25145', '33.12237']
SHGC : 0.763
SHGC layer temps (after SHGC calc):
['35.00003', '35.07226', '33.25145', '33.12237']

If you would like you can try this version by doing

pip install -i https://test.pypi.org/simple/ pywincalc

Note: If you are installing in a venv using python3.12 or later you may need to do this instead to install:

pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple pywincalc

In short --extra-index-url bit is necessary when installing from testpypi in order to tell pip that it can get libraries from the official pypi. This is because apparently from 3.12 on when creating a new venv python does not install some required packages by default (at least setuptools) and they are not available in testpypi.

Thanks again

RebeccaPowles commented 1 week ago

Thank you! Do you know the quote "Insanity is doing the same thing over and over again and expecting different results"? This type of bug fits the definition - I definitely thought I was imagining things at one point...