def __overallCalc(system_width, system_height, glaze_1_dir, glaze_2_dir, gap_1): glaze_1 = pywincalc.parse_optics_file(glaze_1_dir) glaze_2 = pywincalc.parse_optics_file(glaze_2_dir) system_area = system_width * system_height frame_wdith = 53e-3 # value taken from ASHRAE fundamentals for Aluminum with thermal break. For operable window glazing_width = system_width - frame_wdith * 2 glazing_height = system_height - frame_wdith * 2 frame_area = system_area - glazing_width * glazing_height edge_width = 65e-3 # value taken from ASHRAE fundamentals, Section Edge-of-glass U-factor glazing_center_area = (glazing_width - edge_width * 2) * ( glazing_height - edge_width * 2) glazing_edge_area = glazing_width * glazing_height - glazing_center_area standard_path = r"C:\Program Files (x86)\LBNL\LBNL Shared\Standards\W5_NFRC_2003.std" standard = pywincalc.load_standard(standard_path) gaps = [gap_1] solid_layers = [glaze_1, glaze_2] glazing_system_tripple_layer = pywincalc.Glazing_System( solid_layers, gaps, standard, system_width, system_height) center_u = glazing_system_tripple_layer.u().result glazing_SHGC = glazing_system_tripple_layer.shgc().result edge_u = (0.078 + 0.998 * (center_u / 5.678263) - 0.175 * (center_u / 5.678263)**2) * 5.678263 frame_u = 5.22 # ASHRAE Fundamentals overall_u = (center_u * glazing_center_area + frame_u * frame_area + edge_u * glazing_edge_area) / system_area # SHGC_frame = 0.9*frame_u/26 frame_absrptivity = 0.7 # value taken from Calculating the Solar Heat Gain of Window Frames hi = 8 + 4 * 5.67e-8 * 0.8 * ( 30 + 273.15 )**3 # These are the summer conditions used in ISO 15099, formula ffrom ASHREA fundamentals, emissivity taken from Heat and Mass textbook for anodized aluminum SHGC_frame = frame_absrptivity * 0.49 * frame_u / hi # Formula from ASHRAE Fundamental SHGC_overall = (SHGC_frame * frame_area + glazing_SHGC * (glazing_width * glazing_height) ) / system_area # formula from ASHRAE fundamentals return overall_u, SHGC_overall
import pywincalc # path to the standard file. All other files referenced by the standard file must be in the same directory standard_path = "standards/W5_NFRC_2003.std" standard = pywincalc.load_standard(standard_path) width = 1.0 # width of the glazing system in meters height = 1.0 # height of the glazing system in meters clear_3_path = "products/CLEAR_3.DAT" clear_3 = pywincalc.parse_optics_file(clear_3_path) solid_layers = [clear_3] gaps = [] # single layer does not have any gaps glazing_system_single_layer = pywincalc.Glazing_System(solid_layers, gaps, standard, width, height) u_results = glazing_system_single_layer.u() # calculate U-value according to ISO15099 print("Single Layer U-value: {u}".format(u=u_results.result)) print("Single Layer u t_sol: {t}".format(t=u_results.t_sol)) print("Single Layer u solar absorptances per layer: {a}".format(a=u_results.layer_solar_absorptances)) shgc_results = glazing_system_single_layer.shgc() # calculate SHGC according to ISO15099 print("Single Layer SHGC: {shgc}".format(shgc=shgc_results.result)) print("Single Layer SHGC t_sol: {t}".format(t=shgc_results.t_sol)) print("Single Layer SHGC solar absorptances per layer: {a}".format(a=shgc_results.layer_solar_absorptances)) thermal_ir_optical_results_single_layer = glazing_system_single_layer.all_method_values(pywincalc.Method_Type.SOLAR) print("Finished single layer tir calc") print("Single Layer Thermal IR optical transmittance front direct-direct: {r}".format(r=thermal_ir_optical_results_single_layer.direct_direct.tf))
import pywincalc import requests from igsdb_interaction import url_single_product, headers, url_single_product_datafile import results_printer # Path to the optical standard file. All other files referenced by the standard file must be in the same directory # Note: While all optical standards packaged with WINDOW should work with optical calculations care should be # taken to use NFRC standards if NFRC thermal results are desired. This is because for thermal calculations currently # only ISO 15099 is supported. While it is possible to use EN optical standards and create thermal results # those results will not be based on EN 673 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 # Define the gap between the shade and the glazing gap_1 = pywincalc.Gap(pywincalc.PredefinedGasType.AIR, .0127) # .0127 is gap thickness in meters # Since these products use at least one layer that requires a BSDF model a BSDF hemisphere must be # used. In this example a standard quarter basis is used. Other predefined basis include Small, Half, and Full # Custom BSDF basis is not yet supported in Python. Please contact us if your work requires calculations with # a custom BSDF basis. bsdf_hemisphere = pywincalc.BSDFHemisphere.create( pywincalc.BSDFBasisType.QUARTER) # Download some product data from the IGSDB. This example gets a generic single clear 3mm glazing (NFRC 102), # a venetian blind manufactured by Pella (CGDB ID 3000) and a perforated screen manufacturerd by Solar Comfort # (CGDB ID 18000) generic_clear_3mm_glass_igsdb_id = 363