LBNL-ETA / pyWinCalc

Other
19 stars 10 forks source link

Gases - mixed types available? #3

Closed joshtate closed 1 year ago

joshtate commented 5 years ago

Right now there seem to be only 4 types of gases available: Air, Argon, Krypton, and Xenon. Is there a way to use the mixed types available in the IGDB (e.g. ID 9: Air (10%) / Argon (90%) Mix)?

StephenCzarnecki commented 5 years ago

Sorry for the delayed response. The short answer is not currently but hopefully soon.

I can't make any promises since I am just the dev working on the project and not the project manager. But after some time working on other unrelated projects I am now working on one to integrate the underlying libraries used by pyWinCalc into our WINDOW application. And I believe will require not only being able to use mixed types but also being able to create arbitrary gases as well as other functionality.

Generally once the underlying libraries have the functionality exposing them to Python is the easy bit.

The integration work is currently scheduled to be completed by the end of September. Depending on how the rest of the integration work goes I will keep an eye out for a good time and way to expose the additional gas functionality as it becomes available. If there doesn't seem to be a way to do it during the rest of the work then hopefully shortly after it is completed I can see about exposing not only the gases but the other new functionality to python as well.

I will try to keep you updated about any progress regarding gases in this issue.

Thanks again for your interest.

joshtate commented 5 years ago

Thanks for the detailed update!

I was also wondering about certain other performance values that WINDOW produces that aren't available in pyWinCalc. Specifically these:

Would these also be available in the future update that you're currently working on?

RDmitchell commented 5 years ago

We will be updating the pyWinCalc code at some rate, to include more and more functionality. But at this time, we are not committing to any specific updates, as we have lots of other projects we need to work on. But we will take into consideration your requests for future increased functionality.

Thanks

StephenCzarnecki commented 2 years ago

@joshtate Sorry for the very delayed response here. I am not sure if you are still interested at all but in case you are we have been adding many new features and think that (hopefully) things may have finally stabilized enough to promote them to the default branch (which has just been renamed to main)

The good news is many of the things you asked for are now available. Actually I think the only thing currently not available is shading coefficient. The bad news is that adding all the new features involved pretty substantial breaking interface changes. The slightly redeeming thing is that I have tried to significantly expand the documentation and examples to cover many more use cases.

As part of that I have tried to include a section on converting code that uses the v1 interface to the new v2 interface here: https://github.com/LBNL-ETA/pyWinCalc/blob/main/readme.md#Migrating-from-version-1 Hopefully it is reasonably clear. If not, or if does not mention something you need, please let us know.

For your first question about gases: mixed types of gases are now available as is the ability to define your own gases and use them in a mix with either other user-defined or predefined gases. There is a short section on gases in the readme here https://github.com/LBNL-ETA/pyWinCalc/blob/main/readme.md#Gaps But it may be more useful to see the example here https://github.com/LBNL-ETA/pyWinCalc/blob/main/examples/gases.py which shows how to create gas mixtures of predefined gases, custom gases (sulfur hexafluoride in this case), and mixtures of predefined and custom gases.

In terms of winter vs summer U-factor the GlazingSystem in pywincalc can now take custom environmental conditions as input and use them to calculate thermal results. For convenience pre-constructed NFRC U and SHGC environments are available by calling pywincalc.nfrc_u_environments() and pywincalc.nfrc_shgc_environments(). So while a GlazingSystem now defaults to the NFRC U environment you can use the NFRC SHGC environment or create any other environment you need.

There is again a section in the readme about environmental conditions here https://github.com/LBNL-ETA/pyWinCalc/blob/main/readme.md#Environmental-Conditions but there is also an example here https://github.com/LBNL-ETA/pyWinCalc/blob/main/examples/custom_environmental_conditions.py which shows how to create your own environmental conditions.

Layer temperature data is now also calculated. For this and other thermal data like layer and system effective conductivities see the Thermal section in "Available calculation methods" for the GlazingSystem documentation here: https://github.com/LBNL-ETA/pyWinCalc/blob/main/readme.md#GlazingSystem

Note that for thermal calculations like layer temperatures you need to say which "TarcogSystemType" the calculation is performed for. This governs whether solar radiation is taken into account during the calculation. U does not take solar radiation into account while SHGC does.

So to replicate the layer temperature values I believe (but am not positive) you would get the "Ufactor" values by creating a GlazingSystem with the NFRC U environmental conditions and call layer_temperatures with pywincalc.TarcogSystemType.U as the "TarcogSystemType". Then to get the "SHGC" values either replace the environment with the NFRC SHGC environmental conditions or create a new glazing system with the NFRC SHGC environment and call layer_temperatures with pywincalc.TarcogSystemType.SHGC as the "TarcogSystemType"

As I said above I have tried to update the documentation and examples but I am fairly sure I have not covered everything or explained things as clearly as possible. In general I have tried to make examples that should cover all of the available functionality between them. If there is some use case that you think may not be covered let us know.