dimension_y, perforation_type)

# combine the shade_material and the geometry together into a Product_Composistion_Data
composition_data = pywincalc.ProductComposistionData(shade_material, geometry)

# create a layer from the product composition data.  No other information is required to create a layer in this case
perforated_shade_layer = pywincalc.ComposedProductData(composition_data)

# Create a glazing system using the NFRC U environment in order to get NFRC U results
# U and SHGC can be caculated for any given environment but in order to get results
# The NFRC U and SHGC environments are provided as already constructed environments and Glazing_System
# defaults to using the NFRC U environments
glazing_system_u_environment = pywincalc.GlazingSystem(
    optical_standard=optical_standard,
    solid_layers=[perforated_shade_layer, generic_clear_3mm_glass],
    gap_layers=[gap_1],
    width_meters=glazing_system_width,
    height_meters=glazing_system_height,
    environment=pywincalc.nfrc_u_environments(),
    bsdf_hemisphere=bsdf_hemisphere)

glazing_system_shgc_environment = pywincalc.GlazingSystem(
    optical_standard=optical_standard,
    solid_layers=[perforated_shade_layer, generic_clear_3mm_glass],
    gap_layers=[gap_1],
    width_meters=glazing_system_width,
    height_meters=glazing_system_height,
    environment=pywincalc.nfrc_shgc_environments(),
    bsdf_hemisphere=bsdf_hemisphere)

results_name = "Results for a double-layer system with a custom exterior perforated screen made from a material downloaded from the IGSDB"
print("*" * len(results_name))
    headers=headers)

generic_clear_3mm_glass = pywincalc.parse_json(
    generic_clear_3mm_glass_igsdb_response.content)
slim_white_pella_venetian_blind = pywincalc.parse_json(
    slim_white_pella_venetian_blind_igsdb_response.content)

# Create a glazing system using the NFRC U environment in order to get NFRC U results
# U and SHGC can be caculated for any given environment but in order to get results
# The NFRC U and SHGC environments are provided as already constructed environments and Glazing_System
# defaults to using the NFRC U environments

glazing_system_u_environment = pywincalc.GlazingSystem(
    optical_standard=optical_standard,
    solid_layers=[slim_white_pella_venetian_blind, generic_clear_3mm_glass],
    gap_layers=[gap_1],
    width_meters=glazing_system_width,
    height_meters=glazing_system_height,
    environment=pywincalc.nfrc_u_environments(),
    bsdf_hemisphere=bsdf_hemisphere)

glazing_system_shgc_environment = pywincalc.GlazingSystem(
    optical_standard=optical_standard,
    solid_layers=[slim_white_pella_venetian_blind, generic_clear_3mm_glass],
    gap_layers=[gap_1],
    width_meters=glazing_system_width,
    height_meters=glazing_system_height,
    environment=pywincalc.nfrc_shgc_environments(),
    bsdf_hemisphere=bsdf_hemisphere)

results_name = "Results for a double-layer system with exterior Venetian blind downloaded from the IGSDB"
print("*" * len(results_name))
Esempio n. 3
0
import pywincalc

optical_standard_path = "standards/W5_NFRC_2003.std"
optical_standard = pywincalc.load_standard(optical_standard_path)

clear_3_path = "products/CLEAR_3.DAT"
clear_3 = pywincalc.parse_optics_file(clear_3_path)

solid_layers = [clear_3]

glazing_system = pywincalc.GlazingSystem( optical_standard, solid_layers)
print("Single Layer U-value: {u}".format(u=glazing_system.u()))
Esempio n. 4
0
# by the Optics program.  Since igsdb.lbl.gov requires registration some optics files are provided for example
# purposes
clear_3_path = "products/CLEAR_3.DAT"
clear_3 = pywincalc.parse_optics_file(clear_3_path)

bsdf_path = "products/2011-SA1.XML"
bsdf_shade = pywincalc.parse_bsdf_xml_file(bsdf_path)

# Create a glazing system using the NFRC U environment in order to get NFRC U results
# U and SHGC can be caculated for any given environment but in order to get results
# The NFRC U and SHGC environments are provided as already constructed environments and Glazing_System
# defaults to using the NFRC U environments
glazing_system_u_environment = pywincalc.GlazingSystem(
    optical_standard=optical_standard,
    solid_layers=[clear_3, bsdf_shade],
    gap_layers=[gap_1],
    width_meters=glazing_system_width,
    height_meters=glazing_system_height,
    environment=pywincalc.nfrc_u_environments(),
    bsdf_hemisphere=bsdf_hemisphere)

glazing_system_shgc_environment = pywincalc.GlazingSystem(
    optical_standard=optical_standard,
    solid_layers=[clear_3, bsdf_shade],
    gap_layers=[gap_1],
    width_meters=glazing_system_width,
    height_meters=glazing_system_height,
    environment=pywincalc.nfrc_shgc_environments(),
    bsdf_hemisphere=bsdf_hemisphere)

results_name = "Results for a double-layer system with interior BSDF shade"
print("*" * len(results_name))
Esempio n. 5
0
# To create a mixture of predefined gases first create the components with the gas type and portion of the mixture
# The following creates a gas that is 70% Krypton and 30% Xenon and 2cm thick
gap_2_component_1 = pywincalc.PredefinedGasMixtureComponent(pywincalc.PredefinedGasType.KRYPTON, .7)
gap_2_component_2 = pywincalc.PredefinedGasMixtureComponent(pywincalc.PredefinedGasType.XENON, .3)
gap_2 = pywincalc.Gap([gap_2_component_1, gap_2_component_2], .02)  # .02 is gap thickness in meters

# Put all gaps into a list ordered from outside to inside
# Note:  This is only specifying gaps between solid layers
# Gases on the interior and exterior of the glazing system are more fixed and only subject to
# change based on the properties in the environmental conditions
gaps = [gap_1, gap_2]

# Create a glazing system using the NFRC U environment in order to get NFRC U results
# U and SHGC can be caculated for any given environment but in order to get results
# The NFRC U and SHGC environments are provided as already constructed environments and Glazing_System
# defaults to using the NFRC U environments
glazing_system_u_environment = pywincalc.GlazingSystem(optical_standard, solid_layers, gaps, width, height)
# If SHGC results for the NFRC SHGC environment are needed create a glazing system with that environment
glazing_system_shgc_environment = pywincalc.GlazingSystem(optical_standard=optical_standard,
                                                                       solid_layers=solid_layers,
                                                                       gap_layers=gaps,
                                                                       width_meters=width,
                                                                       height_meters=height,
                                                                       environment=pywincalc.nfrc_shgc_environments())

results_name = "Results for a triple-clear system"
print("*" * len(results_name))
print(results_name)
print("*" * len(results_name))
results_printer.print_results(glazing_system_u_environment, glazing_system_shgc_environment)
Esempio n. 6
0
inside_environment = pywincalc.Environment(
    air_temperature=inside_air_temperature,
    pressure=inside_air_pressure,
    convection_coefficient=inside_convection_coefficient,
    coefficient_model=inside_coefficient_model,
    radiation_temperature=inside_radiation_temperature,
    emissivity=inside_emissivity,
    air_speed=inside_air_speed,
    air_direction=inside_air_direction,
    direct_solar_radiation=inside_direct_solar_radiation)

outside_environment = pywincalc.Environment(
    air_temperature=outside_air_temperature,
    pressure=outside_air_pressure,
    convection_coefficient=outside_convection_coefficient,
    coefficient_model=outside_coefficient_model,
    radiation_temperature=outside_radiation_temperature,
    emissivity=outside_emissivity,
    air_speed=outside_air_speed,
    air_direction=outside_air_direction,
    direct_solar_radiation=outside_direct_solar_radiation)

environmental_conditions = pywincalc.Environments(outside_environment,
                                                  inside_environment)
glazing_system = pywincalc.GlazingSystem(optical_standard,
                                         solid_layers,
                                         environment=environmental_conditions)
print(
    "U-value for a single-clear system with custom environmental conditions: {u}"
    .format(u=glazing_system.u()))
Esempio n. 7
0
generic_clear_3mm_glass_igsdb_response = requests.get(url_single_product.format(id=generic_clear_3mm_glass_igsdb_id),
                                                      headers=headers)
generic_clear_6mm_glass_igsdb_response = requests.get(url_single_product.format(id=generic_clear_6mm_glass_igsdb_id),
                                                      headers=headers)

generic_clear_3mm_glass = pywincalc.parse_json(generic_clear_3mm_glass_igsdb_response.content)
generic_clear_6mm_glass = pywincalc.parse_json(generic_clear_6mm_glass_igsdb_response.content)

# Create a glazing system using the NFRC U environment in order to get NFRC U results
# U and SHGC can be caculated for any given environment.  In order to get NFRC U and SHGC results the systems must
# use the standard NFRC U and SHGC environments
# The NFRC U and SHGC environments are provided as already constructed environments.
# Glazing_System defaults to using the NFRC U environment
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())

glazing_system_shgc_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_shgc_environments())

results_name = "Results for a double-layer system of clear glass downloaded from the IGSDB"
print("*" * len(results_name))
print(results_name)
print("*" * len(results_name))
results_printer.print_results(glazing_system_u_environment, glazing_system_shgc_environment)
glass_opening_left = 0
glass_opening_right = 0

glass_thermal = pywincalc.ProductDataThermal(glass_conductivity, glass_material_thickness, flipped, glass_opening_top,
                                             glass_opening_bottom, glass_opening_left, glass_opening_right)

# Create a glass layer from both the optical and thermal data
glass_layer = pywincalc.ProductDataOpticalAndThermal(glass_n_band_optical_data, glass_thermal)

# Create a glazing system using the NFRC U environment in order to get NFRC U results
# U and SHGC can be caculated for any given environment but in order to get results
# The NFRC U and SHGC environments are provided as already constructed environments and Glazing_System
# defaults to using the NFRC U environments
glazing_system_u_environment = pywincalc.GlazingSystem(optical_standard=optical_standard,
                                                       solid_layers=[glass_layer],
                                                       width_meters=glazing_system_width,
                                                       height_meters=glazing_system_height,
                                                       environment=pywincalc.nfrc_u_environments())

# In order to get NFRC SHGC results the NFRC SHGC environment should be used when creating the glazing system
glazing_system_shgc_environment = pywincalc.GlazingSystem(optical_standard=optical_standard,
                                                          solid_layers=[glass_layer],
                                                          width_meters=glazing_system_width,
                                                          height_meters=glazing_system_height,
                                                          environment=pywincalc.nfrc_shgc_environments())

results_name = "Results for a single-layer system with a single glazing layer made from user-defined spectral data."
print("*" * len(results_name))
print(results_name)
print("*" * len(results_name))
results_printer.print_results(glazing_system_u_environment, glazing_system_shgc_environment)
Esempio n. 9
0
                      .02)  # .02 is gap thickness in meters

# Put all gaps into a list ordered from outside to inside
# Note:  This is only specifying gaps between solid layers
# Gases on the interior and exterior of the glazing system are more fixed and only subject to
# change based on the properties in the environmental conditions
gaps = [gap_1, gap_2]

width = 1.0  # width of the glazing system in meters
height = 1.0  # height of the glazing system in meters
tilt = 90  # glazing system tilt in degrees

glazing_system = pywincalc.GlazingSystem(
    optical_standard=optical_standard,
    solid_layers=solid_layers,
    gap_layers=gaps,
    width_meters=width,
    height_meters=height,
    tilt_degrees=tilt,
    environment=pywincalc.nfrc_u_environments())
# Deflection calcs currently need to be specifically enabled
glazing_system.enable_deflection(True)

# Set initial temperature and pressure.  Values just chosen for example purposes
glazing_system.set_deflection_properties(temperature_initial=273,
                                         pressure_initial=1013200)

# Density can be calculated using either U or SHGC TARCOG system types.  Just using SHGC for this
# example for simplicity.
deflection_results = glazing_system.calc_deflection_properties(
    pywincalc.TarcogSystemType.SHGC)
print("Initial results")