Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use more defaults in pyWinCalc #33

Open
RDmitchell opened this issue Nov 22, 2022 · 0 comments
Open

Use more defaults in pyWinCalc #33

RDmitchell opened this issue Nov 22, 2022 · 0 comments
Assignees
Labels
Priority 1 Priority 1

Comments

@RDmitchell
Copy link
Contributor

From Christian
Mon, Nov 21, 2:00 PM


99% of the users that will use pyWinCalc will want to have the standard NFRC conditions, and will want to calculate glazing system u_values at 1m. This is all the default condition when they download WINDOW.

I don't want everybody to have to defined this, it should default to it, unless otherwise specified
optical_standard_path = "standards/W5_NFRC_2003.std"
optical_standard = pywincalc.load_standard(optical_standard_path)

glazing_system_width = 1.0 # width of the glazing system in meters
glazing_system_height = 1.0 # height of the glazing system in meters

This call:
glazing_system_u_environment = pywincalc.GlazingSystem(optical_standard=optical_standard,
solid_layers=[generic_clear_6mm_glass, generic_clear_3mm_glass],
gap_layers=[gap_1],
width_meters=glazing_system_width,
height_meters=glazing_system_height,
environment=pywincalc.nfrc_u_environments())

Should be this:
glazing_system_u_environment = pywincalc.GlazingSystem(solid_layers=[generic_clear_6mm_glass, generic_clear_3mm_glass],
gap_layers=[gap_1])

And it would be even more user friendly if you could do this:
glazing_system_u_environment = pywincalc.GlazingSystem(solid_layers=["products/CLEAR_6.DAT", 363],
gap_layers=["AIR",0.127])
you look at the solid_layers and if it is a string you see if the file exists and you test if it is a JSON or Optics data file, if you get a number, you download that from the IGSDB. For the gap you have to figure out the gas and make the gap.
if it is a mixture it could be [["AIR",0.1,"ARGON",0.9],0.127]

This way we don't even need this statement anymore:
gap_1 = pywincalc.Gap(pywincalc.PredefinedGasType.AIR, .0127) # .0127 is gap thickness in meters

We can make this a lot more user friendly by doing a bit of work behind the scenes. We want to be friendly to our users and make it as easy for them as possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority 1 Priority 1
Projects
None yet
Development

No branches or pull requests

2 participants