diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index 1e63440..19355c1 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -1,13 +1,8 @@ name: Build wheels -on: - # Triggers the workflow on push or pull request events but only for the main branch - push: - branches: [ main ] - pull_request: - branches: [ main ] +on: [push, pull_request] -# Cannot use cibuildwheels because the current images used by cibuildwheels do not support C++17. +# Cannot use cibuildwheels because the current images used by cibuildwheels do not support C++17. jobs: build_wheels_windows: @@ -17,7 +12,7 @@ jobs: matrix: os: [windows-2019] arch: [x86, x64] - python-version: [3.7, 3.8, 3.9, "3.10"] + python-version: [3.7, 3.8, 3.9, "3.10", "3.11"] steps: - name: Checkout repository @@ -48,8 +43,10 @@ jobs: # Trying to use cibuildwheels to build mac wheels fails because the version of XCode is not high enough. # There is documentation here https://github.com/pypa/cibuildwheel/blob/main/docs/cpp_standards.md on how to # set it but I could not get it to work while using the standard images provided by github actions does work. - os: [macos-10.15] - python-version: [3.7, 3.8, 3.9, "3.10"] + os: [macos-latest] + python-version: [3.7, 3.8, 3.9, "3.10", "3.11"] + env: + SYSTEM_VERSION_COMPAT: 0 steps: - name: Checkout repository diff --git a/CMakeLists-WinCalc.txt.in b/CMakeLists-WinCalc.txt.in index 89f7f73..7fbbff3 100644 --- a/CMakeLists-WinCalc.txt.in +++ b/CMakeLists-WinCalc.txt.in @@ -4,7 +4,7 @@ include(ExternalProject) ExternalProject_Add(wincalc GIT_REPOSITORY https://github.com/LBNL-ETA/WinCalc.git - GIT_TAG "v2.2.4" + GIT_TAG "develop" UPDATE_COMMAND "" PATCH_COMMAND "" diff --git a/CMakeLists-pybind11.txt.in b/CMakeLists-pybind11.txt.in index fc713ae..c32ebf4 100644 --- a/CMakeLists-pybind11.txt.in +++ b/CMakeLists-pybind11.txt.in @@ -4,7 +4,7 @@ include(ExternalProject) ExternalProject_Add(pybind11 GIT_REPOSITORY https://github.com/pybind/pybind11.git - GIT_TAG "v2.9.0" + GIT_TAG "v2.10.3" UPDATE_COMMAND "" PATCH_COMMAND "" diff --git a/CMakeLists.txt b/CMakeLists.txt index c50b676..d4a9fab 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,8 +1,8 @@ -cmake_minimum_required(VERSION 3.8) +cmake_minimum_required(VERSION 3.12) set( CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE ON ) -set( target_name pywincalc ) +set( target_name wincalcbindings ) project( ${target_name} ) set(JSON_BuildTests OFF CACHE BOOL "") @@ -11,7 +11,7 @@ set(BUILD_WinCalc_tests OFF CACHE BOOL "") include(CMakeLists-WinCalc.txt) include(CMakeLists-pybind11.txt) -pybind11_add_module(${target_name} src/pywincalc.cpp) +pybind11_add_module(${target_name} src/wincalcbindings.cpp) target_compile_features(${target_name} PUBLIC cxx_std_17) target_link_libraries( ${target_name} PRIVATE wincalc) @@ -22,4 +22,4 @@ target_include_directories(${target_name} $ PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src -) \ No newline at end of file +) diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..964c298 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,6 @@ +include pywincalc/standards/*.dsp +include pywincalc/standards/*.loc +include pywincalc/standards/*.scc +include pywincalc/standards/*.ssp +include pywincalc/standards/*.std +include pywincalc/standards/*.wvl diff --git a/examples/bsdf_integrator.py b/examples/bsdf_integrator.py new file mode 100644 index 0000000..c545665 --- /dev/null +++ b/examples/bsdf_integrator.py @@ -0,0 +1,18 @@ +import pywincalc + +bsdf_hemisphere = pywincalc.BSDFHemisphere.create(pywincalc.BSDFBasisType.FULL) + +bsdf_path = "products/2011-SA1.XML" +bsdf_shade = pywincalc.parse_bsdf_xml_file(bsdf_path) + +front_transmittance_matrix = pywincalc.SquareMatrix(bsdf_shade.measurements.solar.transmittance_front.data) +front_reflectance_matrix = pywincalc.SquareMatrix(bsdf_shade.measurements.solar.reflectance_front.data) + +integrator = pywincalc.BSDFIntegrator(bsdf_hemisphere.get_directions(pywincalc.BSDFDirection.Incoming)) +integrator.set_matrices(front_transmittance_matrix, front_reflectance_matrix, pywincalc.Side.Front) + +front_hemispheric_transmittances = integrator.direct_hemispheric(pywincalc.Side.Front, pywincalc.PropertySimple.T) +front_hemispheric_reflectances = integrator.direct_hemispheric(pywincalc.Side.Front, pywincalc.PropertySimple.R) + +print("Front hemipsheric transmittances for each incoming angle: {v}".format(v=front_hemispheric_transmittances)) +print("Front hemipsheric reflectances for each incoming angle: {v}".format(v=front_hemispheric_reflectances)) diff --git a/examples/bsdf_shade_igsdb_product.py b/examples/bsdf_shade_igsdb_product.py new file mode 100644 index 0000000..4cf3f5a --- /dev/null +++ b/examples/bsdf_shade_igsdb_product.py @@ -0,0 +1,24 @@ +import pywincalc +import requests +from igsdb_interaction import url_single_product, headers, url_single_product_datafile + +bsdf_hemisphere = pywincalc.BSDFHemisphere.create(pywincalc.BSDFBasisType.FULL) + +bsdf_igsdb_id = 14710 + +bsdf_igsdb_response = requests.get(url_single_product_datafile.format(id=bsdf_igsdb_id), headers=headers) + +# The BSDF data is currently stored as XML on igsdb.lbl.gov. As a result it needs to be +# parsed using the xml string parser instead of the json parser +bsdf_shade = pywincalc.parse_bsdf_xml_string(bsdf_igsdb_response.content) + +# Create a glazing system. This only shows an example of getting one result from a glazing system +# created using default environmental conditions. +# +# For more possible results see optical_results_NFRC.py +# +# For more on environmental conditions see environmental_conditions_user_defined.py +glazing_system = pywincalc.GlazingSystem(solid_layers=[bsdf_shade], bsdf_hemisphere=bsdf_hemisphere) + +u_value = glazing_system.u() +print("U-value for a BSDF shade downloaded from igsdb.lbl.glv: {v}".format(v=u_value)) diff --git a/examples/bsdf_shade_local_file.py b/examples/bsdf_shade_local_file.py new file mode 100644 index 0000000..967df17 --- /dev/null +++ b/examples/bsdf_shade_local_file.py @@ -0,0 +1,17 @@ +import pywincalc + +bsdf_hemisphere = pywincalc.BSDFHemisphere.create(pywincalc.BSDFBasisType.FULL) + +bsdf_path = "products/2011-SA1.XML" +bsdf_shade = pywincalc.parse_bsdf_xml_file(bsdf_path) + +# Create a glazing system. This only shows an example of getting one result from a glazing system +# created using default environmental conditions. +# +# For more possible results see optical_results_NFRC.py +# +# For more on environmental conditions see environmental_conditions_user_defined.py +glazing_system = pywincalc.GlazingSystem(solid_layers=[bsdf_shade], bsdf_hemisphere=bsdf_hemisphere) + +u_value = glazing_system.u() +print("U-value for a BSDF shade created from a local file: {v}".format(v=u_value)) diff --git a/examples/deflection.py b/examples/deflection.py index 9e0308b..179f1aa 100644 --- a/examples/deflection.py +++ b/examples/deflection.py @@ -1,13 +1,5 @@ import pywincalc -# 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) - # Load solid layer measured values. Solid layer information can come from either igsdb.lbl.gov or files generate # by the Optics program. Since igsdb.lbl.gov requires registration some optics files are provided for example # purposes @@ -22,18 +14,10 @@ # that was just loaded and the middle is the same glass as the single clear example above solid_layers = [clear_6, clear_3, clear_6] -# Solid layers must be separated by gap layers -# Currently there are four pre-defined gases available: Air, Argon, Krypton, and Xenon -# Vacuum gaps are not yet supported -# To create a gap with 100% of a predefined gas create a Gap_Data object with the gas type -# and thickness in meters -gap_1 = pywincalc.Gap(pywincalc.PredefinedGasType.AIR, .0127) # .0127 is gap thickness in meters - -# 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 +# Solid layers must be separated by gap layers. This example uses two air gaps +# See gaps_and_gases.py in examples for more on creating gases +gap_1 = pywincalc.Layers.gap(thickness=.0127) +gap_2 = pywincalc.Layers.gap(thickness=.02) # Put all gaps into a list ordered from outside to inside # Note: This is only specifying gaps between solid layers @@ -45,14 +29,14 @@ 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()) +glazing_system = pywincalc.GlazingSystem(solid_layers=solid_layers, gap_layers=gaps, + width_meters=width, height_meters=height, tilt_degrees=tilt) + # 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) +glazing_system.set_deflection_properties(temperature_initial=273, pressure_initial=101320) # Density can be calculated using either U or SHGC TARCOG system types. Just using SHGC for this # example for simplicity. @@ -64,13 +48,13 @@ print("\tU: {val}".format(val=glazing_system.u())) print("\tSHGC: {val}".format(val=glazing_system.shgc())) print("\tLayer temperatures (U): {val}".format(val=glazing_system.layer_temperatures(pywincalc.TarcogSystemType.U))) -print("\tLayer temperatures (SHGC): {val}".format(val=glazing_system.layer_temperatures(pywincalc.TarcogSystemType.SHGC))) +print( + "\tLayer temperatures (SHGC): {val}".format(val=glazing_system.layer_temperatures(pywincalc.TarcogSystemType.SHGC))) visible_results = glazing_system.optical_method_results("PHOTOPIC") print("\tVT: {val}".format(val=visible_results.system_results.front.transmittance.direct_hemispherical)) - # Change initial temperature and pressure. Values just chosen for example purposes -glazing_system.set_deflection_properties(temperature_initial=290, pressure_initial=1014500) +glazing_system.set_deflection_properties(temperature_initial=290, pressure_initial=101450) print("") print("Changed initial temperature and pressure") print("\tdeflection max: {val}".format(val=deflection_results.deflection_max)) @@ -79,7 +63,8 @@ print("\tU: {val}".format(val=glazing_system.u())) print("\tSHGC: {val}".format(val=glazing_system.shgc())) print("\tLayer temperatures (U): {val}".format(val=glazing_system.layer_temperatures(pywincalc.TarcogSystemType.U))) -print("\tLayer temperatures (SHGC): {val}".format(val=glazing_system.layer_temperatures(pywincalc.TarcogSystemType.SHGC))) +print( + "\tLayer temperatures (SHGC): {val}".format(val=glazing_system.layer_temperatures(pywincalc.TarcogSystemType.SHGC))) visible_results = glazing_system.optical_method_results("PHOTOPIC") print("\tVT: {val}".format(val=visible_results.system_results.front.transmittance.direct_hemispherical)) # Change tilt @@ -94,7 +79,8 @@ print("\tU: {val}".format(val=glazing_system.u())) print("\tSHGC: {val}".format(val=glazing_system.shgc())) print("\tLayer temperatures (U): {val}".format(val=glazing_system.layer_temperatures(pywincalc.TarcogSystemType.U))) -print("\tLayer temperatures (SHGC): {val}".format(val=glazing_system.layer_temperatures(pywincalc.TarcogSystemType.SHGC))) +print( + "\tLayer temperatures (SHGC): {val}".format(val=glazing_system.layer_temperatures(pywincalc.TarcogSystemType.SHGC))) visible_results = glazing_system.optical_method_results("PHOTOPIC") print("\tVT: {val}".format(val=visible_results.system_results.front.transmittance.direct_hemispherical)) @@ -111,7 +97,8 @@ print("\tU: {val}".format(val=glazing_system.u())) print("\tSHGC: {val}".format(val=glazing_system.shgc())) print("\tLayer temperatures (U): {val}".format(val=glazing_system.layer_temperatures(pywincalc.TarcogSystemType.U))) -print("\tLayer temperatures (SHGC): {val}".format(val=glazing_system.layer_temperatures(pywincalc.TarcogSystemType.SHGC))) +print( + "\tLayer temperatures (SHGC): {val}".format(val=glazing_system.layer_temperatures(pywincalc.TarcogSystemType.SHGC))) visible_results = glazing_system.optical_method_results("PHOTOPIC") print("\tVT: {val}".format(val=visible_results.system_results.front.transmittance.direct_hemispherical)) @@ -160,17 +147,7 @@ custom_env = pywincalc.Environments(outside=custom_outside_env, inside=custom_inside_env) -# changing environmental conditions currently requires creating a new glazing system -# note: this resets any changes made such as if deflection is enabled or applied load is set. -# if this is a problem or you think it would be better to be able to change environmental conditions -# like tilt and load let us know. - -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=custom_env) - -glazing_system.enable_deflection(True) -glazing_system.set_deflection_properties(temperature_initial=273, pressure_initial=1013200) +glazing_system.environments(custom_env) deflection_results = glazing_system.calc_deflection_properties(pywincalc.TarcogSystemType.SHGC) print("") @@ -181,7 +158,8 @@ print("\tU: {val}".format(val=glazing_system.u())) print("\tSHGC: {val}".format(val=glazing_system.shgc())) print("\tLayer temperatures (U): {val}".format(val=glazing_system.layer_temperatures(pywincalc.TarcogSystemType.U))) -print("\tLayer temperatures (SHGC): {val}".format(val=glazing_system.layer_temperatures(pywincalc.TarcogSystemType.SHGC))) +print( + "\tLayer temperatures (SHGC): {val}".format(val=glazing_system.layer_temperatures(pywincalc.TarcogSystemType.SHGC))) visible_results = glazing_system.optical_method_results("PHOTOPIC") print("\tVT: {val}".format(val=visible_results.system_results.front.transmittance.direct_hemispherical)) @@ -194,12 +172,9 @@ custom_env_2.outside.pressure += 500 custom_env_2.inside.pressure -= 200 -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=custom_env_2) +glazing_system.environments(custom_env_2) -glazing_system.enable_deflection(True) -glazing_system.set_deflection_properties(temperature_initial=273, pressure_initial=1013200) +glazing_system.set_deflection_properties(temperature_initial=273, pressure_initial=101320) deflection_results = glazing_system.calc_deflection_properties(pywincalc.TarcogSystemType.SHGC) print("") @@ -210,7 +185,8 @@ print("\tU: {val}".format(val=glazing_system.u())) print("\tSHGC: {val}".format(val=glazing_system.shgc())) print("\tLayer temperatures (U): {val}".format(val=glazing_system.layer_temperatures(pywincalc.TarcogSystemType.U))) -print("\tLayer temperatures (SHGC): {val}".format(val=glazing_system.layer_temperatures(pywincalc.TarcogSystemType.SHGC))) +print( + "\tLayer temperatures (SHGC): {val}".format(val=glazing_system.layer_temperatures(pywincalc.TarcogSystemType.SHGC))) visible_results = glazing_system.optical_method_results("PHOTOPIC") print("\tVT: {val}".format(val=visible_results.system_results.front.transmittance.direct_hemispherical)) @@ -224,22 +200,22 @@ solid_layers = [clear_6, clear_3, clear_6] -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=custom_env_2) +glazing_system = pywincalc.GlazingSystem(solid_layers=solid_layers, gap_layers=gaps, width_meters=width, + height_meters=height, tilt_degrees=tilt, environment=custom_env_2) glazing_system.enable_deflection(True) -glazing_system.set_deflection_properties(temperature_initial=273, pressure_initial=1013200) +glazing_system.set_deflection_properties(temperature_initial=273, pressure_initial=101320) deflection_results = glazing_system.calc_deflection_properties(pywincalc.TarcogSystemType.SHGC) print("") -print("Set density and youngs modulus") +print("Set density and Young's modulus") print("\tdeflection max: {val}".format(val=deflection_results.deflection_max)) print("\tdeflection mean: {val}".format(val=deflection_results.deflection_mean)) print("\tpanes load: {val}".format(val=deflection_results.panes_load)) print("\tU: {val}".format(val=glazing_system.u())) print("\tSHGC: {val}".format(val=glazing_system.shgc())) print("\tLayer temperatures (U): {val}".format(val=glazing_system.layer_temperatures(pywincalc.TarcogSystemType.U))) -print("\tLayer temperatures (SHGC): {val}".format(val=glazing_system.layer_temperatures(pywincalc.TarcogSystemType.SHGC))) +print( + "\tLayer temperatures (SHGC): {val}".format(val=glazing_system.layer_temperatures(pywincalc.TarcogSystemType.SHGC))) visible_results = glazing_system.optical_method_results("PHOTOPIC") -print("\tVT: {val}".format(val=visible_results.system_results.front.transmittance.direct_hemispherical)) \ No newline at end of file +print("\tVT: {val}".format(val=visible_results.system_results.front.transmittance.direct_hemispherical)) diff --git a/examples/custom_environmental_conditions.py b/examples/environmental_conditions_user_defined.py similarity index 87% rename from examples/custom_environmental_conditions.py rename to examples/environmental_conditions_user_defined.py index 6e38bd6..4425c55 100644 --- a/examples/custom_environmental_conditions.py +++ b/examples/environmental_conditions_user_defined.py @@ -1,8 +1,5 @@ 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) @@ -45,5 +42,7 @@ 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())) +glazing_system = pywincalc.GlazingSystem(solid_layers=solid_layers, environment=environmental_conditions) + +u_value = glazing_system.u() +print("U-value for a glazing system with user-defined environmental conditions: {v}".format(v=u_value)) \ No newline at end of file diff --git a/examples/gaps_and_gases.py b/examples/gaps_and_gases.py new file mode 100644 index 0000000..4e5c7af --- /dev/null +++ b/examples/gaps_and_gases.py @@ -0,0 +1,90 @@ +import pywincalc + +# This contains examples of all currently supported methods of creating gases and gaps. + +# The default way to create a gap. Creates a gap containing air with a given thickness +# at a default pressure of 101325 +gap_1 = pywincalc.Layers.gap(thickness=.0127) # .0127 is gap thickness in meters + +# Currently there are four pre-defined gases available: Air, Argon, Krypton, and Xenon +# A gas object is created from a list of pairs where the first item is the percentage +# and the second item is either one of the predefined gas types or a user-defined GasData object + +# Here a gas consisting of 100% Argon is created +gas_2 = pywincalc.create_gas([[1.0, pywincalc.PredefinedGasType.ARGON]]) +# Create a gap from this gas by passing it to the gap function. +# In this case the gap is given a different pressure as well +gap_2 = pywincalc.Layers.gap(thickness=.0127, gas=gas_2, pressure=101300) + +# Gaps may also contain a mixture of gases. +# Here is a gas that is 70% Krypton and 30% Xenon +gas_3 = pywincalc.create_gas([[0.7, pywincalc.PredefinedGasType.KRYPTON], [0.3, pywincalc.PredefinedGasType.XENON]]) +# Create a gap from this gas the same as above. Here the pressure is omitted so it uses the default 101325 +gap_3 = pywincalc.Layers.gap(thickness=.0127, gas=gas_3) + +# Custom gases can be created from properties. The following creates sulfur hexafluoride as distributed with WINDOW 7 +sulfur_hexafluoride_conductivity_a = 0.013 +sulfur_hexafluoride_conductivity_b = 0 +sulfur_hexafluoride_conductivity_c = 0 +sulfur_hexafluoride_conductivity_coefficients = pywincalc.GasCoefficients(sulfur_hexafluoride_conductivity_a, + sulfur_hexafluoride_conductivity_b, + sulfur_hexafluoride_conductivity_c) +sulfur_hexafluoride_viscosity_a = 7.214E-7 +sulfur_hexafluoride_viscosity_b = 4.928E-8 +sulfur_hexafluoride_viscosity_c = 0 +sulfur_hexafluoride_viscosity_coefficients = pywincalc.GasCoefficients(sulfur_hexafluoride_viscosity_a, + sulfur_hexafluoride_viscosity_b, + sulfur_hexafluoride_viscosity_c) +sulfur_hexafluoride_Cp_a = 418.6 +sulfur_hexafluoride_Cp_b = 0 +sulfur_hexafluoride_Cp_c = 0 +sulfur_hexafluoride_Cp_coefficients = pywincalc.GasCoefficients(sulfur_hexafluoride_Cp_a, + sulfur_hexafluoride_Cp_b, + sulfur_hexafluoride_Cp_c) +sulfur_hexafluoride_molecular_weight = 146.1 +sulfur_hexafluoride_specific_heat_ratio = 1 + +sulfur_hexafluoride = pywincalc.GasData("sulfur_hexafluoride", + molecular_weight=sulfur_hexafluoride_molecular_weight, + specific_heat_ratio=sulfur_hexafluoride_specific_heat_ratio, + Cp=sulfur_hexafluoride_Cp_coefficients, + thermal_conductivity=sulfur_hexafluoride_conductivity_coefficients, + viscosity=sulfur_hexafluoride_viscosity_coefficients) + +# Once a custom gas is created it can either be used by itself +gas_4 = pywincalc.create_gas([[1.0, sulfur_hexafluoride]]) +gap_4 = pywincalc.Layers.gap(thickness=.003, gas=gas_4) # 3mm thick gap filled with sulfur hexafluoride + +# Or it can be mixed with either other predefined or custom gases +# The following creates a gas that is 80% sulfur hexafluoride, 15% Argon, and 5% Air +gas_5 = pywincalc.create_gas( + [[0.8, sulfur_hexafluoride], + [0.15, pywincalc.PredefinedGasType.ARGON], + [0.05, pywincalc.PredefinedGasType.AIR]]) +# And uses it it a 2.5mm thick gap at pressure = 101500 +gap_5 = pywincalc.Layers.gap(thickness=.0025, gas=gas_5, pressure=101500) + +# Vacuum gaps are supported by setting a low pressure in the gap and +# (optionally) adding support pillars. Currently only circular pillars +# are supported. + +# This creates a gap with the default gas (Air) and a pressure of 0.1333 Pa +gap_6 = pywincalc.Layers.gap(thickness=.001, pressure=0.1333) +# Add circular pillars to the gap +gap_6 = pywincalc.Layers.add_circular_pillar(gap_6, conductivity=999, spacing=0.03, radius=0.0002) + +gaps = [gap_1, gap_2, gap_3, gap_4, gap_5, gap_6] + +clear_3_path = "products/CLEAR_3.DAT" +clear_3 = pywincalc.parse_optics_file(clear_3_path) +solid_layers = [clear_3] * 7 + +# Create a glazing system. This only shows an example of getting one result from a glazing system +# created using default environmental conditions. +# +# For more possible results see optical_results_NFRC.py +# +# For more on environmental conditions see environmental_conditions_user_defined.py +glazing_system = pywincalc.GlazingSystem(solid_layers=solid_layers, gap_layers=gaps) +u_value = glazing_system.u() +print("U-value for six-layer system of various gases: {v}".format(v=u_value)) diff --git a/examples/gases.py b/examples/gases.py deleted file mode 100644 index f16549a..0000000 --- a/examples/gases.py +++ /dev/null @@ -1,83 +0,0 @@ -import pywincalc -import results_printer - -# Currently there are four pre-defined gases available: Air, Argon, Krypton, and Xenon -# Vacuum gaps are not yet supported -# To create a gap with 100% of a predefined gas create a Gap_Data object with the gas type -# and thickness in meters -gap_1 = pywincalc.Gap(pywincalc.PredefinedGasType.AIR, .0127) # .0127 is gap thickness in meters - -# Gaps may also contain a mixture of gases. # 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 - -# Custom gases can be created from properties. The following creates sulfur hexafluoride as distributed with WINDOW 7 -sulfur_hexafluoride_conductivity_a = 0.0130000002682209 -sulfur_hexafluoride_conductivity_b = 0 -sulfur_hexafluoride_conductivity_c = 0 -sulfur_hexafluoride_conductivity_coefficients = pywincalc.GasCoefficients(sulfur_hexafluoride_conductivity_a, - sulfur_hexafluoride_conductivity_b, - sulfur_hexafluoride_conductivity_c) -sulfur_hexafluoride_viscosity_a = 7.21399999292771E-7 -sulfur_hexafluoride_viscosity_b = 4.92800005247318E-8 -sulfur_hexafluoride_viscosity_c = 0 -sulfur_hexafluoride_viscosity_coefficients = pywincalc.GasCoefficients(sulfur_hexafluoride_viscosity_a, - sulfur_hexafluoride_viscosity_b, - sulfur_hexafluoride_viscosity_c) -sulfur_hexafluoride_Cp_a = 418.600006103516 -sulfur_hexafluoride_Cp_b = 0 -sulfur_hexafluoride_Cp_c = 0 -sulfur_hexafluoride_Cp_coefficients = pywincalc.GasCoefficients(sulfur_hexafluoride_Cp_a, - sulfur_hexafluoride_Cp_b, - sulfur_hexafluoride_Cp_c) -sulfur_hexafluoride_molecular_weight = 146.100006103516 -sulfur_hexafluoride_specific_heat_ratio = 1 - -sulfur_hexafluoride = pywincalc.CustomGasData("sulfur_hexafluoride", - molecular_weight=sulfur_hexafluoride_molecular_weight, - specific_heat_ratio=sulfur_hexafluoride_specific_heat_ratio, - Cp=sulfur_hexafluoride_Cp_coefficients, - thermal_conductivity=sulfur_hexafluoride_conductivity_coefficients, - viscosity=sulfur_hexafluoride_viscosity_coefficients) - -# Once a custom gas is created it can either be used by itself to create a layer -gap_3 = pywincalc.Gap(sulfur_hexafluoride, .003) # 3mm thick gap filled with sulfur hexafluoride - -# Or it can be mixed with either other predefined or custom gases -# The following creates a gas that is 80% sulfur hexafluoride, 15% Argonm and 5% Air -gap_4_component_1 = pywincalc.CustomGasMixtureComponent(sulfur_hexafluoride, 0.8) -gap_4_component_2 = pywincalc.PredefinedGasMixtureComponent(pywincalc.PredefinedGasType.ARGON, .15) -gap_4_component_3 = pywincalc.PredefinedGasMixtureComponent(pywincalc.PredefinedGasType.AIR, .05) -gap_4 = pywincalc.Gap([gap_4_component_1, gap_4_component_2, gap_4_component_3], .025) # 2.5mm thick gap - -gaps = [gap_1, gap_2, gap_3, gap_4] - -# Next load the other things required to create a glazing system. Since this example is just for how to create gaps -# it will use the included generic clear 3 glass and NFRC optical standards to make a five layer system. Five -# solid layer to accomidate the 4 gases created above -optical_standard_path = "standards/W5_NFRC_2003.std" -optical_standard = pywincalc.load_standard(optical_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] * 5 -glazing_system_u_environment = pywincalc.GlazingSystem(optical_standard, solid_layers, gaps, width, height) - -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 5-layer system with varying gases" -print("*" * len(results_name)) -print(results_name) -print("*" * len(results_name)) -results_printer.print_results(glazing_system_u_environment, glazing_system_shgc_environment) diff --git a/examples/glass_double_layer_igsdb_product.py b/examples/glass_double_layer_igsdb_product.py new file mode 100644 index 0000000..24c84e4 --- /dev/null +++ b/examples/glass_double_layer_igsdb_product.py @@ -0,0 +1,32 @@ +import pywincalc +import requests +from igsdb_interaction import url_single_product, headers + +# Define the gap between the shade and the glazing. In this case use a default air gap +# that is 12.7mm thick. For more on creating gases and gaps see the gaps_and_gases.py example +gap_1 = pywincalc.Layers.gap(thickness=.0127) + +# Download some product data from the IGSDB. This example gets a generic single clear 3mm glazing (NFRC 102), +# and a generic single clear 6mm glazing (NFRC 103) +generic_clear_3mm_glass_igsdb_id = 363 +generic_clear_6mm_glass_igsdb_id = 362 + +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. This only shows an example of getting one result from a glazing system +# created using default environmental conditions. +# +# For more possible results see optical_results_NFRC.py +# +# For more on environmental conditions see environmental_conditions_user_defined.py +glazing_system = pywincalc.GlazingSystem(solid_layers=[generic_clear_6mm_glass, generic_clear_3mm_glass], + gap_layers=[gap_1]) + +u_value = glazing_system.u() +print("U-value for a double-layer system with glass downloaded from igsdb.lbl.glv: {v}".format(v=u_value)) diff --git a/examples/glass_local_file.py b/examples/glass_local_file.py new file mode 100644 index 0000000..728a7eb --- /dev/null +++ b/examples/glass_local_file.py @@ -0,0 +1,20 @@ +import pywincalc + +# Load solid layer measured values. Solid layer information can come from either igsdb.lbl.gov or files generate +# 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) + +solid_layers = [clear_3] + +# Create a glazing system. This only shows an example of getting one result from a glazing system +# created using default environmental conditions. +# +# For more possible results see optical_results_NFRC.py +# +# For more on environmental conditions see environmental_conditions_user_defined.py +glazing_system = pywincalc.GlazingSystem(solid_layers=solid_layers) + +u_value = glazing_system.u() +print("U-value for a single-layer system with generic clear glass: {v}".format(v=u_value)) diff --git a/examples/glass_triple_layer_local_file.py b/examples/glass_triple_layer_local_file.py new file mode 100644 index 0000000..947b7b9 --- /dev/null +++ b/examples/glass_triple_layer_local_file.py @@ -0,0 +1,36 @@ +import pywincalc + +# Load solid layer measured values. Solid layer information can come from either igsdb.lbl.gov or files generate +# 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) + +clear_6_path = "products/CLEAR_6.DAT" +clear_6 = pywincalc.parse_optics_file(clear_6_path) + +# Create a list of solid layers in order from outside to inside +# This is a triple glazing where the outside and inside are the glass +# that was just loaded and the middle is the same glass as the single clear example above +solid_layers = [clear_6, clear_3, clear_6] + +# Define the gap between the layers. In this case use a default air gap +# that is 12.7mm thick. For more on creating gases and gaps see the gaps_and_gases.py example +gap = pywincalc.Layers.gap(thickness=.0127) + +# 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, gap] + +# Create a glazing system. This only shows an example of getting one result from a glazing system +# created using default environmental conditions. +# +# For more possible results see optical_results_NFRC.py +# +# For more on environmental conditions see environmental_conditions_user_defined.py +glazing_system = pywincalc.GlazingSystem(solid_layers=solid_layers, gap_layers=gaps) + +u_value = glazing_system.u() +print("U-value for a triple-layer system with generic clear glass: {v}".format(v=u_value)) diff --git a/examples/custom_glazing_single_layer.py b/examples/glass_user_defined_nband_data.py similarity index 91% rename from examples/custom_glazing_single_layer.py rename to examples/glass_user_defined_nband_data.py index cd21cd7..66e46ec 100644 --- a/examples/custom_glazing_single_layer.py +++ b/examples/glass_user_defined_nband_data.py @@ -1,6 +1,6 @@ import pywincalc -import results_printer +# This example shows how to create a glass layer from user-defined thermal and n-band optical data def convert_wavelength_data(raw_wavelength_data): # Whatever format your raw wavelength data is it will need to be converted to a list of pywincalc.WavelengthData @@ -249,21 +249,9 @@ def raw_glazing_wavelength_data(): {"wavelength_microns": 2.500, "transmittance_front": 0.8220, "transmittance_back": 0.8220, "reflectance_front": 0.0680, "reflectance_back": 0.0680}] - -# 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 - # Create optical data for the glass layer -# Make sure to select the approriate material type for the layer. +# Make sure to select the appropriate material type for the layer. # Current supported options are: # APPLIED_FILM, COATED, ELECTROCHROMIC, FILM, INTERLAYER, LAMINATE, MONOLITHIC, THERMOCHROMIC glass_material_type = pywincalc.MaterialType.MONOLITHIC @@ -317,21 +305,7 @@ def raw_glazing_wavelength_data(): # 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()) +glazing_system = pywincalc.GlazingSystem(solid_layers=[glass_layer]) -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) +u_value = glazing_system.u() +print("U-value for a single layer made from a user-defined glass layer: {v}".format(v=u_value)) \ No newline at end of file diff --git a/examples/igsdb_custom_perforated.py b/examples/igsdb_custom_perforated.py deleted file mode 100644 index 843a6d3..0000000 --- a/examples/igsdb_custom_perforated.py +++ /dev/null @@ -1,83 +0,0 @@ -import pywincalc -import requests -from igsdb_interaction import url_single_product, headers -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 - -# A woven shade requires a BSDF hemisphere. Create one based on a standard quarter basis for this test -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), -# and a material to use as part of the woven shade. -generic_clear_3mm_glass_igsdb_id = 363 - -# This is the same material used in the venetian example but could be any material in the igsdb -shade_material_igsdb_id = 14477 - -generic_clear_3mm_glass_igsdb_response = requests.get(url_single_product.format(id=generic_clear_3mm_glass_igsdb_id), - headers=headers) -shade_material_igsdb_response = requests.get( - url_single_product.format(id=shade_material_igsdb_id), headers=headers) - -generic_clear_3mm_glass = pywincalc.parse_json(generic_clear_3mm_glass_igsdb_response.content) - -shade_material = pywincalc.parse_json(shade_material_igsdb_response.content) - -# Perforated screens need Perforated_Geometry. -# Make a rectangular perforation here. Other options include circular and square -# Note: While using a string for perforation type is not ideal it is used here because this -# example is mostly using data from the IGSDB for the material and only adding a custom geometry -# For an example where the data is completely custom generated see custom_perforated.py -perforation_type = "rectangular" -spacing_x = 0.01 # 10mm horizontal spacing -spacing_y = 0.02 # 20mm vertical spacing -dimension_x = 0.002 # 2mm perforation in the horizontal direction -dimension_y = 0.003 # 3mm perforation in the vertical direction -geometry = pywincalc.PerforatedGeometry(spacing_x, spacing_y, dimension_x, 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)) -print(results_name) -print("*" * len(results_name)) -results_printer.print_results(glazing_system_u_environment, glazing_system_shgc_environment) diff --git a/examples/igsdb_custom_venetian.py b/examples/igsdb_custom_venetian.py deleted file mode 100644 index eade43f..0000000 --- a/examples/igsdb_custom_venetian.py +++ /dev/null @@ -1,89 +0,0 @@ -import pywincalc -import requests -from igsdb_interaction import url_single_product, headers -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 - -# A woven shade requires a BSDF hemisphere. Create one based on a standard quarter basis for this test -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), -# and a material to use as part of the woven shade. -generic_clear_3mm_glass_igsdb_id = 363 - -# This is the same material used in the venetian in the igsdb_exterior_shade_on_cleara_glass.py example -# but could be any material in the igsdb -shade_material_igsdb_id = 14477 - -generic_clear_3mm_glass_igsdb_response = requests.get(url_single_product.format(id=generic_clear_3mm_glass_igsdb_id), - headers=headers) -shade_material_igsdb_response = requests.get( - url_single_product.format(id=shade_material_igsdb_id), headers=headers) - -generic_clear_3mm_glass = pywincalc.parse_json(generic_clear_3mm_glass_igsdb_response.content) - -shade_material = pywincalc.parse_json(shade_material_igsdb_response.content) - -# Ventian blinds need a Venetian_Geometry. -slat_width = .020 # width of 20 mm -slat_spacing = .050 # spacing of 50 mm -slat_curvature = .025 # curvature of 25 mm -slat_tilt = 15 # 15 degree tilt -number_segments = 5 # The default is 5. Do not change unless there is a reason to. -geometry = pywincalc.VenetianGeometry(slat_width=slat_width, slat_spacing=slat_spacing, slat_curvature=slat_curvature, - slat_tilt=slat_tilt, number_segments=number_segments) - -# combine the shade_material and the geometry together into a ProductComposistionData -composition_data = pywincalc.ProductComposistionData(shade_material, geometry) -venetian_layer = pywincalc.ComposedProductData(composition_data) - -# At this point the layer is only using measured value and any modeling parameters. -# To change modeling parameters from their default the measured data must first be converted to -# a solid layer. -venetian_solid_layer = pywincalc.convert_to_solid_layer(venetian_layer) - -# Currently the only modeling parameter for venetian layers is the distribution method. -# That defaults to directional diffuse but can be changed to uniform-diffuse on a per-layer basis -venetian_solid_layer.optical_data.distribution_method = pywincalc.DistributionMethodType.UNIFORM_DIFFUSE - -# 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=[venetian_solid_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=[venetian_solid_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 Venetian blind made from a material 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) diff --git a/examples/igsdb_custom_vertical_venetian.py b/examples/igsdb_custom_vertical_venetian.py deleted file mode 100644 index 1cbc99d..0000000 --- a/examples/igsdb_custom_vertical_venetian.py +++ /dev/null @@ -1,92 +0,0 @@ -import pywincalc -import requests -from igsdb_interaction import url_single_product, headers -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 - -# A woven shade requires a BSDF hemisphere. Create one based on a standard quarter basis for this test -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), -# and a material to use as part of the woven shade. -generic_clear_3mm_glass_igsdb_id = 363 - -# This is the same material used in the venetian in the igsdb_exterior_shade_on_cleara_glass.py example -# but could be any material in the igsdb -shade_material_igsdb_id = 14477 - -generic_clear_3mm_glass_igsdb_response = requests.get(url_single_product.format(id=generic_clear_3mm_glass_igsdb_id), - headers=headers) -shade_material_igsdb_response = requests.get( - url_single_product.format(id=shade_material_igsdb_id), headers=headers) - -generic_clear_3mm_glass = pywincalc.parse_json(generic_clear_3mm_glass_igsdb_response.content) - -shade_material = pywincalc.parse_json(shade_material_igsdb_response.content) - -# Ventian blinds need a Venetian_Geometry. -slat_width = .020 # width of 20 mm -slat_spacing = .050 # spacing of 50 mm -slat_curvature = .025 # curvature of 25 mm -slat_tilt = 15 # 15 degree tilt -number_segments = 5 # The default is 5. Do not change unless there is a reason to. -geometry = pywincalc.VenetianGeometry(slat_width=slat_width, slat_spacing=slat_spacing, slat_curvature=slat_curvature, - slat_tilt=slat_tilt, number_segments=number_segments) - -# combine the shade_material and the geometry together into a ProductComposistionData -composition_data = pywincalc.ProductComposistionData(shade_material, geometry) -venetian_layer = pywincalc.ComposedProductData(composition_data) - -# At this point the layer is only using measured value and any modeling parameters. -# To change modeling parameters from their default the measured data must first be converted to -# a solid layer. -venetian_solid_layer = pywincalc.convert_to_solid_layer(venetian_layer) - -# Currently the only modeling parameter for venetian layers is the distribution method. -# That defaults to directional diffuse but can be changed to uniform-diffuse on a per-layer basis -venetian_solid_layer.optical_data.distribution_method = pywincalc.DistributionMethodType.UNIFORM_DIFFUSE - -# Set the is_horizontal property to false to model this as a vertical venetian -venetian_solid_layer.optical_data.is_horizontal = False - -# 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=[venetian_solid_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=[venetian_solid_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 vertical louver made from a material 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) diff --git a/examples/igsdb_custom_woven.py b/examples/igsdb_custom_woven.py deleted file mode 100644 index b4d83f6..0000000 --- a/examples/igsdb_custom_woven.py +++ /dev/null @@ -1,74 +0,0 @@ -import pywincalc -import requests -from igsdb_interaction import url_single_product, headers -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 - -# A woven shade requires a BSDF hemisphere. Create one based on a standard quarter basis for this test -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), -# and a material to use as part of the woven shade. -generic_clear_3mm_glass_igsdb_id = 363 - -# This is the same material used in the venetian example but could be any material in the igsdb -shade_material_igsdb_id = 14477 - -generic_clear_3mm_glass_igsdb_response = requests.get(url_single_product.format(id=generic_clear_3mm_glass_igsdb_id), - headers=headers) -shade_material_igsdb_response = requests.get( - url_single_product.format(id=shade_material_igsdb_id), headers=headers) - -generic_clear_3mm_glass = pywincalc.parse_json(generic_clear_3mm_glass_igsdb_response.content) - -shade_material = pywincalc.parse_json(shade_material_igsdb_response.content) - -# Woven shades need Woven_Geometry. -thread_diameter = 0.002 # 2mm diameter -thread_spacing = 0.003 # 3mm spacing -shade_thickness = 0.002 # 2mm shade thickness -geometry = pywincalc.WovenGeometry(thread_diameter, thread_spacing, shade_thickness) - -# combine the shade_material and the geometry together into a Product_Composistion_Data -composition_data = pywincalc.ProductComposistionData(shade_material, geometry) - -woven_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=[woven_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=[woven_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 woven shade made from a material 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) diff --git a/examples/igsdb_double_clear_glass.py b/examples/igsdb_double_clear_glass.py deleted file mode 100644 index 1f805c6..0000000 --- a/examples/igsdb_double_clear_glass.py +++ /dev/null @@ -1,57 +0,0 @@ -import pywincalc -import requests -from igsdb_interaction import url_single_product, headers -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 - -# Download some product data from the IGSDB. This example gets a generic single clear 3mm glazing (NFRC 102), -# and a generic single clear 6mm glazing (NFRC 103) -generic_clear_3mm_glass_igsdb_id = 363 -generic_clear_6mm_glass_igsdb_id = 362 - -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) diff --git a/examples/igsdb_exterior_perforated_shade_on_clear_glass.py b/examples/igsdb_exterior_perforated_shade_on_clear_glass.py deleted file mode 100644 index ed038bb..0000000 --- a/examples/igsdb_exterior_perforated_shade_on_clear_glass.py +++ /dev/null @@ -1,67 +0,0 @@ -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 -slim_white_pella_venetian_blind_igsdb_id = 14684 -thermeshade_perforated_screen_igsdb_id = 14990 - -generic_clear_3mm_glass_igsdb_response = requests.get(url_single_product.format(id=generic_clear_3mm_glass_igsdb_id), - headers=headers) -thermeshade_perforated_screen_igsdb_response = requests.get( - url_single_product.format(id=thermeshade_perforated_screen_igsdb_id), headers=headers) - -generic_clear_3mm_glass = pywincalc.parse_json(generic_clear_3mm_glass_igsdb_response.content) -thermeshade_perforated_screen = pywincalc.parse_json( - thermeshade_perforated_screen_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=[thermeshade_perforated_screen, - 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=[thermeshade_perforated_screen, - 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 perforated screen 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) diff --git a/examples/igsdb_exterior_venetian_shade_on_clear_glass.py b/examples/igsdb_exterior_venetian_shade_on_clear_glass.py deleted file mode 100644 index 4d1ef31..0000000 --- a/examples/igsdb_exterior_venetian_shade_on_clear_glass.py +++ /dev/null @@ -1,65 +0,0 @@ -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 -slim_white_pella_venetian_blind_igsdb_id = 14684 - -generic_clear_3mm_glass_igsdb_response = requests.get(url_single_product.format(id=generic_clear_3mm_glass_igsdb_id), - headers=headers) -slim_white_pella_venetian_blind_igsdb_response = requests.get( - url_single_product.format(id=slim_white_pella_venetian_blind_igsdb_id), 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)) -print(results_name) -print("*" * len(results_name)) -results_printer.print_results(glazing_system_u_environment, glazing_system_shgc_environment) diff --git a/examples/igsdb_interior_bsdf.py b/examples/igsdb_interior_bsdf.py deleted file mode 100644 index f757993..0000000 --- a/examples/igsdb_interior_bsdf.py +++ /dev/null @@ -1,61 +0,0 @@ -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 - -bsdf_hemisphere = pywincalc.BSDFHemisphere.create(pywincalc.BSDFBasisType.FULL) - -generic_clear_3mm_glass_igsdb_id = 363 -bsdf_igsdb_id = 14710 - -generic_clear_3mm_glass_igsdb_response = requests.get(url_single_product.format(id=generic_clear_3mm_glass_igsdb_id), - headers=headers) - -bsdf_igsdb_response = requests.get( - url_single_product_datafile.format(id=bsdf_igsdb_id), headers=headers) - -clear_3 = pywincalc.parse_json(generic_clear_3mm_glass_igsdb_response.content) - -# The BSDF data is currently stored as XML on igsdb.lbl.gov. As a result it needs to be -# parsed using the xml string parser instead of the json parser -bsdf_shade = pywincalc.parse_bsdf_xml_string(bsdf_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=[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 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) diff --git a/examples/interior_bsdf.py b/examples/interior_bsdf.py deleted file mode 100644 index a2bb815..0000000 --- a/examples/interior_bsdf.py +++ /dev/null @@ -1,54 +0,0 @@ -import pywincalc -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 - -# -bsdf_hemisphere = pywincalc.BSDFHemisphere.create(pywincalc.BSDFBasisType.FULL) - -# Load solid layer measured values. Solid layer information can come from either igsdb.lbl.gov or files generate -# 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)) -print(results_name) -print("*" * len(results_name)) -results_printer.print_results(glazing_system_u_environment, glazing_system_shgc_environment) diff --git a/examples/minimum_example.py b/examples/minimum_example.py index 37ce0b3..d626fc6 100644 --- a/examples/minimum_example.py +++ b/examples/minimum_example.py @@ -1,12 +1,9 @@ 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) +glazing_system = pywincalc.GlazingSystem(solid_layers=solid_layers) print("Single Layer U-value: {u}".format(u=glazing_system.u())) diff --git a/examples/optical_results_EN_410.py b/examples/optical_results_EN_410.py new file mode 100644 index 0000000..11af53e --- /dev/null +++ b/examples/optical_results_EN_410.py @@ -0,0 +1,500 @@ +import pywincalc + +# A copy of a EN 410 standards file is included in the pywincalc.standards_path directory +# named prEN_410.std. Load it using pywincalc.load_standard +optical_standard = pywincalc.load_standard(pywincalc.standard_path / "prEN_410.std") + +# Load solid layer measured values. Solid layer information can come from either igsdb.lbl.gov or files generate +# 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) + +solid_layers = [clear_3] + +# Using a small basis here to make printing out the matrix results managable +# Small should probably not be used for actual simulation +bsdf_hemisphere = pywincalc.BSDFHemisphere.create(pywincalc.BSDFBasisType.SMALL) + +# Create a glazing system using the optical standard loaded above (EN 410) instead of the +# default NFRC +glazing_system = pywincalc.GlazingSystem(optical_standard=optical_standard, solid_layers=solid_layers, + bsdf_hemisphere=bsdf_hemisphere) + +# In general there are two types of results: optical and thermal. Here optical and thermal +# refer to the calculation methods and not the wavelengths. +# +# All calculations default to calculating results from radiation at a normal angle of incidence but +# support off-normal calculations by allowing users to pass theta and phi values. +# +# So any result can be calculated for any incidence angle this way. +# e.g. to calculate SHGC results at incidence angle theta = 15 and phi = 25 call +# glazing_system.shgc(theta=15, phi=25) +# +# ------------------------------------Optical Results-------------------------------------------- + +# -------------------------All methods except Thermal IR and Colors------------------------------ +# +# Methods are defined by name in the standards file. To calculate results for +# all methods except Thermal IR and Colors (see below) pass the method name to the +# GlazingSystem.optical_method_results function. +# +# The below enumerates the results available from the W5_NFRC_2003.std file. +# Since the standards files are free to name the methods as they like if you are using +# some other standard some knowledge about what the various methods represent may be required. +# ------------------------------------------Solar------------------------------------------------ +solar_results = glazing_system.optical_method_results("SOLAR") + +print("System solar front transmittance direct-direct: {v}".format( + v=solar_results.system_results.front.transmittance.direct_direct)) +print("System solar front transmittance direct-diffuse: {v}".format( + v=solar_results.system_results.front.transmittance.direct_diffuse)) +print("System solar front transmittance direct-hemispherical: {v}".format( + v=solar_results.system_results.front.transmittance.direct_hemispherical)) +print("System solar front transmittance diffuse-diffuse: {v}".format( + v=solar_results.system_results.front.transmittance.diffuse_diffuse)) +print( + "System solar front transmittance matrix (only available for systems calculated with a BSDF hemisphere): {v}".format( + v=solar_results.system_results.front.transmittance.matrix)) + +print("System solar front reflectance direct-direct: {v}".format( + v=solar_results.system_results.front.reflectance.direct_direct)) +print("System solar front reflectance direct-diffuse: {v}".format( + v=solar_results.system_results.front.reflectance.direct_diffuse)) +print("System solar front reflectance direct-hemispherical: {v}".format( + v=solar_results.system_results.front.reflectance.direct_hemispherical)) +print("System solar front reflectance diffuse-diffuse: {v}".format( + v=solar_results.system_results.front.reflectance.diffuse_diffuse)) +print( + "System solar front reflectance matrix (only available for systems calculated with a BSDF hemisphere): {v}".format( + v=solar_results.system_results.front.reflectance.matrix)) + +print("System solar back transmittance direct-direct: {v}".format( + v=solar_results.system_results.back.transmittance.direct_direct)) +print("System solar back transmittance direct-diffuse: {v}".format( + v=solar_results.system_results.back.transmittance.direct_diffuse)) +print("System solar back transmittance direct-hemispherical: {v}".format( + v=solar_results.system_results.back.transmittance.direct_hemispherical)) +print("System solar back transmittance diffuse-diffuse: {v}".format( + v=solar_results.system_results.back.transmittance.diffuse_diffuse)) +print( + "System solar back transmittance matrix (only available for systems calculated with a BSDF hemisphere): {v}".format( + v=solar_results.system_results.back.transmittance.matrix)) + +print("System solar back reflectance direct-direct: {v}".format( + v=solar_results.system_results.back.reflectance.direct_direct)) +print("System solar back reflectance direct-diffuse: {v}".format( + v=solar_results.system_results.back.reflectance.direct_diffuse)) +print("System solar back reflectance direct-hemispherical: {v}".format( + v=solar_results.system_results.back.reflectance.direct_hemispherical)) +print("System solar back reflectance diffuse-diffuse: {v}".format( + v=solar_results.system_results.back.reflectance.diffuse_diffuse)) +print("System solar back reflectance matrix (only available for systems calculated with a BSDF hemisphere): {v}".format( + v=solar_results.system_results.back.reflectance.matrix)) + +for i in range(len(solid_layers)): + print("Layer {idx} solar front total direct absorptance: {v}".format(idx=i + 1, + v=solar_results.layer_results[ + i].front.absorptance.total_direct)) + print("Layer {idx} solar front total diffuse absorptance: {v}".format(idx=i + 1, + v=solar_results.layer_results[ + i].front.absorptance.total_diffuse)) + print("Layer {idx} solar front heat direct absorptance: {v}".format(idx=i + 1, + v=solar_results.layer_results[ + i].front.absorptance.heat_direct)) + print("Layer {idx} solar front heat diffuse absorptance: {v}".format(idx=i + 1, + v=solar_results.layer_results[ + i].front.absorptance.heat_diffuse)) + print("Layer {idx} solar front electricity direct absorptance: {v}".format(idx=i + 1, + v=solar_results.layer_results[ + i].front.absorptance.electricity_direct)) + print("Layer {idx} solar front electricity diffuse absorptance: {v}".format(idx=i + 1, + v=solar_results.layer_results[ + i].front.absorptance.electricity_diffuse)) + print( + "Layer {idx} solar back total direct absorptance: {v}".format(idx=i + 1, + v=solar_results.layer_results[ + i].back.absorptance.total_direct)) + print("Layer {idx} solar back total diffuse absorptance: {v}".format(idx=i + 1, + v=solar_results.layer_results[ + i].back.absorptance.total_diffuse)) + print("Layer {idx} solar back heat direct absorptance: {v}".format(idx=i + 1, + v=solar_results.layer_results[ + i].back.absorptance.heat_direct)) + print("Layer {idx} solar back heat diffuse absorptance: {v}".format(idx=i + 1, + v=solar_results.layer_results[ + i].back.absorptance.heat_diffuse)) + print("Layer {idx} solar back electricity direct absorptance: {v}".format(idx=i + 1, + v=solar_results.layer_results[ + i].back.absorptance.electricity_direct)) + print("Layer {idx} solar back electricity diffuse absorptance: {v}".format(idx=i + 1, + v=solar_results.layer_results[ + i].back.absorptance.electricity_diffuse)) + + print( + "Layer {idx} solar back total angular absorptance (only available for systems calculated with a BSDF hemisphere): {v}".format( + idx=i + 1, v=solar_results.layer_results[ + i].back.absorptance.angular_total)) + + print( + "Layer {idx} solar back heat angular absorptance (only available for systems calculated with a BSDF hemisphere): {v}".format( + idx=i + 1, v=solar_results.layer_results[ + i].back.absorptance.angular_heat)) + + print( + "Layer {idx} solar back electricity angular absorptance (only available for systems calculated with a BSDF hemisphere): {v}".format( + idx=i + 1, v=solar_results.layer_results[ + i].back.absorptance.angular_electricity)) + +# ---------------------------------Photopic (aka Visible)----------------------- +photopic_results = glazing_system.optical_method_results("PHOTOPIC") + +print("System photopic front transmittance direct-direct: {v}".format( + v=photopic_results.system_results.front.transmittance.direct_direct)) +print("System photopic front transmittance direct-diffuse: {v}".format( + v=photopic_results.system_results.front.transmittance.direct_diffuse)) +print("System photopic front transmittance direct-hemispherical: {v}".format( + v=photopic_results.system_results.front.transmittance.direct_hemispherical)) +print("System photopic front transmittance diffuse-diffuse: {v}".format( + v=photopic_results.system_results.front.transmittance.diffuse_diffuse)) +print( + "System photopic front transmittance matrix (only available for systems calculated with a BSDF hemisphere): {v}".format( + v=photopic_results.system_results.front.transmittance.matrix)) + +print("System photopic front reflectance direct-direct: {v}".format( + v=photopic_results.system_results.front.reflectance.direct_direct)) +print("System photopic front reflectance direct-diffuse: {v}".format( + v=photopic_results.system_results.front.reflectance.direct_diffuse)) +print("System photopic front reflectance direct-hemispherical: {v}".format( + v=photopic_results.system_results.front.reflectance.direct_hemispherical)) +print("System photopic front reflectance diffuse-diffuse: {v}".format( + v=photopic_results.system_results.front.reflectance.diffuse_diffuse)) +print( + "System photopic front reflectance matrix (only available for systems calculated with a BSDF hemisphere): {v}".format( + v=photopic_results.system_results.front.reflectance.matrix)) + +print("System photopic back transmittance direct-direct: {v}".format( + v=photopic_results.system_results.back.transmittance.direct_direct)) +print("System photopic back transmittance direct-diffuse: {v}".format( + v=photopic_results.system_results.back.transmittance.direct_diffuse)) +print("System photopic back transmittance direct-hemispherical: {v}".format( + v=photopic_results.system_results.back.transmittance.direct_hemispherical)) +print("System photopic back transmittance diffuse-diffuse: {v}".format( + v=photopic_results.system_results.back.transmittance.diffuse_diffuse)) +print( + "System photopic back transmittance matrix (only available for systems calculated with a BSDF hemisphere): {v}".format( + v=photopic_results.system_results.back.transmittance.matrix)) + +print("System photopic back reflectance direct-direct: {v}".format( + v=photopic_results.system_results.back.reflectance.direct_direct)) +print("System photopic back reflectance direct-diffuse: {v}".format( + v=photopic_results.system_results.back.reflectance.direct_diffuse)) +print("System photopic back reflectance direct-hemispherical: {v}".format( + v=photopic_results.system_results.back.reflectance.direct_hemispherical)) +print("System photopic back reflectance diffuse-diffuse: {v}".format( + v=photopic_results.system_results.back.reflectance.diffuse_diffuse)) +print( + "System photopic back reflectance matrix (only available for systems calculated with a BSDF hemisphere): {v}".format( + v=photopic_results.system_results.back.reflectance.matrix)) + +for i in range(len(solid_layers)): + print("Layer {idx} photopic front total direct absorptance: {v}".format(idx=i + 1, + v=photopic_results.layer_results[ + i].front.absorptance.total_direct)) + print("Layer {idx} photopic front total diffuse absorptance: {v}".format(idx=i + 1, + v=photopic_results.layer_results[ + i].front.absorptance.total_diffuse)) + print("Layer {idx} photopic front heat direct absorptance: {v}".format(idx=i + 1, + v=photopic_results.layer_results[ + i].front.absorptance.heat_direct)) + print("Layer {idx} photopic front heat diffuse absorptance: {v}".format(idx=i + 1, + v=photopic_results.layer_results[ + i].front.absorptance.heat_diffuse)) + print("Layer {idx} photopic front electricity direct absorptance: {v}".format(idx=i + 1, + v=photopic_results.layer_results[ + i].front.absorptance.electricity_direct)) + print("Layer {idx} photopic front electricity diffuse absorptance: {v}".format(idx=i + 1, + v=photopic_results.layer_results[ + i].front.absorptance.electricity_diffuse)) + print( + "Layer {idx} photopic back total direct absorptance: {v}".format(idx=i + 1, + v=photopic_results.layer_results[ + i].back.absorptance.total_direct)) + print("Layer {idx} photopic back total diffuse absorptance: {v}".format(idx=i + 1, + v=photopic_results.layer_results[ + i].back.absorptance.total_diffuse)) + print("Layer {idx} photopic back heat direct absorptance: {v}".format(idx=i + 1, + v=photopic_results.layer_results[ + i].back.absorptance.heat_direct)) + print("Layer {idx} photopic back heat diffuse absorptance: {v}".format(idx=i + 1, + v=photopic_results.layer_results[ + i].back.absorptance.heat_diffuse)) + print("Layer {idx} photopic back electricity direct absorptance: {v}".format(idx=i + 1, + v=photopic_results.layer_results[ + i].back.absorptance.electricity_direct)) + print("Layer {idx} photopic back electricity diffuse absorptance: {v}".format(idx=i + 1, + v=photopic_results.layer_results[ + i].back.absorptance.electricity_diffuse)) + + print( + "Layer {idx} photopic back total angular absorptance (only available for systems calculated with a BSDF hemisphere): {v}".format( + idx=i + 1, v=photopic_results.layer_results[ + i].back.absorptance.angular_total)) + + print( + "Layer {idx} photopic back heat angular absorptance (only available for systems calculated with a BSDF hemisphere): {v}".format( + idx=i + 1, v=photopic_results.layer_results[ + i].back.absorptance.angular_heat)) + + print( + "Layer {idx} photopic back electricity angular absorptance (only available for systems calculated with a BSDF hemisphere): {v}".format( + idx=i + 1, + v=solar_results.layer_results[ + i].back.absorptance.angular_electricity)) + +# -------------------------------TUV------------------------- +# Unlike the other methods the layers in the glazing system do not contain +# measured values for that cover the range defined by the TUV method in the standards file +# pywincalc will throw an exception in such circumstances + +try: + spf_results = glazing_system.optical_method_results("TUV") +except Exception as e: + print("Error trying to calculate results for TUV method: {e}".format(e=e)) + +# ------------------------------------Color------------------------------------ +# Color results have a different calculation method and so require a different call to calculate +# Also color results do not have results for each layer. Only system results exist for color +# +# By default the color calculation uses methods called COLOR_TRISTIMX, COLOR_TRISTIMY, and COLOR_TRISTIMZ +# prEN_410.std does not have methods with those names but does have CRI_X, CRI_Y, and CRI_Z +# The color() function allows specification of other methods names so the below is an example +# of using the CRI_X, CRI_Y, and CRI_Z EN 410 optical methods in the color calculations. +# +# NOTE: This is just an example of how to use other optical methods in color calculations. +# Whether this is appropriate or not is left to the user. +color_results = glazing_system.color(tristimulus_x_method="CRI_X", + tristimulus_y_method="CRI_Y", + tristimulus_z_method="CRI_Z") +# Front transmittance direct-direct +print("Color front transmittance direct-direct RGB: ({r}, {g}, {b})".format( + r=color_results.system_results.front.transmittance.direct_direct.rgb.R, + g=color_results.system_results.front.transmittance.direct_direct.rgb.G, + b=color_results.system_results.front.transmittance.direct_direct.rgb.B)) +print("Color front transmittance direct-direct Lab: ({l}, {a}, {b})".format( + l=color_results.system_results.front.transmittance.direct_direct.lab.L, + a=color_results.system_results.front.transmittance.direct_direct.lab.a, + b=color_results.system_results.front.transmittance.direct_direct.lab.b)) +print("Color front transmittance direct-direct Trichromatic: ({x}, {y}, {z})".format( + x=color_results.system_results.front.transmittance.direct_direct.trichromatic.X, + y=color_results.system_results.front.transmittance.direct_direct.trichromatic.Y, + z=color_results.system_results.front.transmittance.direct_direct.trichromatic.Z)) + +# Front transmittance direct-diffuse. +print("Color front transmittance direct-diffuse RGB: ({r}, {g}, {b})".format( + r=color_results.system_results.front.transmittance.direct_diffuse.rgb.R, + g=color_results.system_results.front.transmittance.direct_diffuse.rgb.G, + b=color_results.system_results.front.transmittance.direct_diffuse.rgb.B)) +print("Color front transmittance direct-diffuse Lab: ({l}, {a}, {b})".format( + l=color_results.system_results.front.transmittance.direct_diffuse.lab.L, + a=color_results.system_results.front.transmittance.direct_diffuse.lab.a, + b=color_results.system_results.front.transmittance.direct_diffuse.lab.b)) +print("Color front transmittance direct-diffuse Trichromatic: ({x}, {y}, {z})".format( + x=color_results.system_results.front.transmittance.direct_diffuse.trichromatic.X, + y=color_results.system_results.front.transmittance.direct_diffuse.trichromatic.Y, + z=color_results.system_results.front.transmittance.direct_diffuse.trichromatic.Z)) + +# Front transmittance direct-hemispherical. +print("Color front transmittance direct-hemispherical RGB: ({r}, {g}, {b})".format( + r=color_results.system_results.front.transmittance.direct_hemispherical.rgb.R, + g=color_results.system_results.front.transmittance.direct_hemispherical.rgb.G, + b=color_results.system_results.front.transmittance.direct_hemispherical.rgb.B)) +print("Color front transmittance direct-hemispherical Lab: ({l}, {a}, {b})".format( + l=color_results.system_results.front.transmittance.direct_hemispherical.lab.L, + a=color_results.system_results.front.transmittance.direct_hemispherical.lab.a, + b=color_results.system_results.front.transmittance.direct_hemispherical.lab.b)) +print("Color front transmittance direct-hemispherical Trichromatic: ({x}, {y}, {z})".format( + x=color_results.system_results.front.transmittance.direct_hemispherical.trichromatic.X, + y=color_results.system_results.front.transmittance.direct_hemispherical.trichromatic.Y, + z=color_results.system_results.front.transmittance.direct_hemispherical.trichromatic.Z)) + +# Front transmittance diffuse-diffuse +print("Color front transmittance diffuse-diffuse RGB: ({r}, {g}, {b})".format( + r=color_results.system_results.front.transmittance.diffuse_diffuse.rgb.R, + g=color_results.system_results.front.transmittance.diffuse_diffuse.rgb.G, + b=color_results.system_results.front.transmittance.diffuse_diffuse.rgb.B)) +print("Color front transmittance diffuse-diffuse Lab: ({l}, {a}, {b})".format( + l=color_results.system_results.front.transmittance.diffuse_diffuse.lab.L, + a=color_results.system_results.front.transmittance.diffuse_diffuse.lab.a, + b=color_results.system_results.front.transmittance.diffuse_diffuse.lab.b)) +print("Color front transmittance diffuse-diffuse Trichromatic: ({x}, {y}, {z})".format( + x=color_results.system_results.front.transmittance.diffuse_diffuse.trichromatic.X, + y=color_results.system_results.front.transmittance.diffuse_diffuse.trichromatic.Y, + z=color_results.system_results.front.transmittance.diffuse_diffuse.trichromatic.Z)) + +# Front reflectance direct-direct +print("Color front reflectance direct-direct RGB: ({r}, {g}, {b})".format( + r=color_results.system_results.front.reflectance.direct_direct.rgb.R, + g=color_results.system_results.front.reflectance.direct_direct.rgb.G, + b=color_results.system_results.front.reflectance.direct_direct.rgb.B)) +print("Color front reflectance direct-direct Lab: ({l}, {a}, {b})".format( + l=color_results.system_results.front.reflectance.direct_direct.lab.L, + a=color_results.system_results.front.reflectance.direct_direct.lab.a, + b=color_results.system_results.front.reflectance.direct_direct.lab.b)) +print("Color front reflectance direct-direct Trichromatic: ({x}, {y}, {z})".format( + x=color_results.system_results.front.reflectance.direct_direct.trichromatic.X, + y=color_results.system_results.front.reflectance.direct_direct.trichromatic.Y, + z=color_results.system_results.front.reflectance.direct_direct.trichromatic.Z)) + +# Front reflectance direct-diffuse. +print("Color front reflectance direct-diffuse RGB: ({r}, {g}, {b})".format( + r=color_results.system_results.front.reflectance.direct_diffuse.rgb.R, + g=color_results.system_results.front.reflectance.direct_diffuse.rgb.G, + b=color_results.system_results.front.reflectance.direct_diffuse.rgb.B)) +print("Color front reflectance direct-diffuse Lab: ({l}, {a}, {b})".format( + l=color_results.system_results.front.reflectance.direct_diffuse.lab.L, + a=color_results.system_results.front.reflectance.direct_diffuse.lab.a, + b=color_results.system_results.front.reflectance.direct_diffuse.lab.b)) +print("Color front reflectance direct-diffuse Trichromatic: ({x}, {y}, {z})".format( + x=color_results.system_results.front.reflectance.direct_diffuse.trichromatic.X, + y=color_results.system_results.front.reflectance.direct_diffuse.trichromatic.Y, + z=color_results.system_results.front.reflectance.direct_diffuse.trichromatic.Z)) + +# Front reflectance direct-hemispherical. +print("Color front reflectance direct-hemispherical RGB: ({r}, {g}, {b})".format( + r=color_results.system_results.front.reflectance.direct_hemispherical.rgb.R, + g=color_results.system_results.front.reflectance.direct_hemispherical.rgb.G, + b=color_results.system_results.front.reflectance.direct_hemispherical.rgb.B)) +print("Color front reflectance direct-hemispherical Lab: ({l}, {a}, {b})".format( + l=color_results.system_results.front.reflectance.direct_hemispherical.lab.L, + a=color_results.system_results.front.reflectance.direct_hemispherical.lab.a, + b=color_results.system_results.front.reflectance.direct_hemispherical.lab.b)) +print("Color front reflectance direct-hemispherical Trichromatic: ({x}, {y}, {z})".format( + x=color_results.system_results.front.reflectance.direct_hemispherical.trichromatic.X, + y=color_results.system_results.front.reflectance.direct_hemispherical.trichromatic.Y, + z=color_results.system_results.front.reflectance.direct_hemispherical.trichromatic.Z)) + +# Front reflectance diffuse-diffuse +print("Color front reflectance diffuse-diffuse RGB: ({r}, {g}, {b})".format( + r=color_results.system_results.front.reflectance.diffuse_diffuse.rgb.R, + g=color_results.system_results.front.reflectance.diffuse_diffuse.rgb.G, + b=color_results.system_results.front.reflectance.diffuse_diffuse.rgb.B)) +print("Color front reflectance diffuse-diffuse Lab: ({l}, {a}, {b})".format( + l=color_results.system_results.front.reflectance.diffuse_diffuse.lab.L, + a=color_results.system_results.front.reflectance.diffuse_diffuse.lab.a, + b=color_results.system_results.front.reflectance.diffuse_diffuse.lab.b)) +print("Color front reflectance diffuse-diffuse Trichromatic: ({x}, {y}, {z})".format( + x=color_results.system_results.front.reflectance.diffuse_diffuse.trichromatic.X, + y=color_results.system_results.front.reflectance.diffuse_diffuse.trichromatic.Y, + z=color_results.system_results.front.reflectance.diffuse_diffuse.trichromatic.Z)) + +print("Color back transmittance direct-direct RGB: ({r}, {g}, {b})".format( + r=color_results.system_results.back.transmittance.direct_direct.rgb.R, + g=color_results.system_results.back.transmittance.direct_direct.rgb.G, + b=color_results.system_results.back.transmittance.direct_direct.rgb.B)) +print("Color back transmittance direct-direct Lab: ({l}, {a}, {b})".format( + l=color_results.system_results.back.transmittance.direct_direct.lab.L, + a=color_results.system_results.back.transmittance.direct_direct.lab.a, + b=color_results.system_results.back.transmittance.direct_direct.lab.b)) +print("Color back transmittance direct-direct Trichromatic: ({x}, {y}, {z})".format( + x=color_results.system_results.back.transmittance.direct_direct.trichromatic.X, + y=color_results.system_results.back.transmittance.direct_direct.trichromatic.Y, + z=color_results.system_results.back.transmittance.direct_direct.trichromatic.Z)) + +# back transmittance direct-diffuse. +print("Color back transmittance direct-diffuse RGB: ({r}, {g}, {b})".format( + r=color_results.system_results.back.transmittance.direct_diffuse.rgb.R, + g=color_results.system_results.back.transmittance.direct_diffuse.rgb.G, + b=color_results.system_results.back.transmittance.direct_diffuse.rgb.B)) +print("Color back transmittance direct-diffuse Lab: ({l}, {a}, {b})".format( + l=color_results.system_results.back.transmittance.direct_diffuse.lab.L, + a=color_results.system_results.back.transmittance.direct_diffuse.lab.a, + b=color_results.system_results.back.transmittance.direct_diffuse.lab.b)) +print("Color back transmittance direct-diffuse Trichromatic: ({x}, {y}, {z})".format( + x=color_results.system_results.back.transmittance.direct_diffuse.trichromatic.X, + y=color_results.system_results.back.transmittance.direct_diffuse.trichromatic.Y, + z=color_results.system_results.back.transmittance.direct_diffuse.trichromatic.Z)) + +# back transmittance direct-hemispherical. +print("Color back transmittance direct-hemispherical RGB: ({r}, {g}, {b})".format( + r=color_results.system_results.back.transmittance.direct_hemispherical.rgb.R, + g=color_results.system_results.back.transmittance.direct_hemispherical.rgb.G, + b=color_results.system_results.back.transmittance.direct_hemispherical.rgb.B)) +print("Color back transmittance direct-hemispherical Lab: ({l}, {a}, {b})".format( + l=color_results.system_results.back.transmittance.direct_hemispherical.lab.L, + a=color_results.system_results.back.transmittance.direct_hemispherical.lab.a, + b=color_results.system_results.back.transmittance.direct_hemispherical.lab.b)) +print("Color back transmittance direct-hemispherical Trichromatic: ({x}, {y}, {z})".format( + x=color_results.system_results.back.transmittance.direct_hemispherical.trichromatic.X, + y=color_results.system_results.back.transmittance.direct_hemispherical.trichromatic.Y, + z=color_results.system_results.back.transmittance.direct_hemispherical.trichromatic.Z)) + +# back transmittance diffuse-diffuse +print("Color back transmittance diffuse-diffuse RGB: ({r}, {g}, {b})".format( + r=color_results.system_results.back.transmittance.diffuse_diffuse.rgb.R, + g=color_results.system_results.back.transmittance.diffuse_diffuse.rgb.G, + b=color_results.system_results.back.transmittance.diffuse_diffuse.rgb.B)) +print("Color back transmittance diffuse-diffuse Lab: ({l}, {a}, {b})".format( + l=color_results.system_results.back.transmittance.diffuse_diffuse.lab.L, + a=color_results.system_results.back.transmittance.diffuse_diffuse.lab.a, + b=color_results.system_results.back.transmittance.diffuse_diffuse.lab.b)) +print("Color back transmittance diffuse-diffuse Trichromatic: ({x}, {y}, {z})".format( + x=color_results.system_results.back.transmittance.diffuse_diffuse.trichromatic.X, + y=color_results.system_results.back.transmittance.diffuse_diffuse.trichromatic.Y, + z=color_results.system_results.back.transmittance.diffuse_diffuse.trichromatic.Z)) + +# back reflectance direct-direct +print("Color back reflectance direct-direct RGB: ({r}, {g}, {b})".format( + r=color_results.system_results.back.reflectance.direct_direct.rgb.R, + g=color_results.system_results.back.reflectance.direct_direct.rgb.G, + b=color_results.system_results.back.reflectance.direct_direct.rgb.B)) +print("Color back reflectance direct-direct Lab: ({l}, {a}, {b})".format( + l=color_results.system_results.back.reflectance.direct_direct.lab.L, + a=color_results.system_results.back.reflectance.direct_direct.lab.a, + b=color_results.system_results.back.reflectance.direct_direct.lab.b)) +print("Color back reflectance direct-direct Trichromatic: ({x}, {y}, {z})".format( + x=color_results.system_results.back.reflectance.direct_direct.trichromatic.X, + y=color_results.system_results.back.reflectance.direct_direct.trichromatic.Y, + z=color_results.system_results.back.reflectance.direct_direct.trichromatic.Z)) + +# back reflectance direct-diffuse. +print("Color back reflectance direct-diffuse RGB: ({r}, {g}, {b})".format( + r=color_results.system_results.back.reflectance.direct_diffuse.rgb.R, + g=color_results.system_results.back.reflectance.direct_diffuse.rgb.G, + b=color_results.system_results.back.reflectance.direct_diffuse.rgb.B)) +print("Color back reflectance direct-diffuse Lab: ({l}, {a}, {b})".format( + l=color_results.system_results.back.reflectance.direct_diffuse.lab.L, + a=color_results.system_results.back.reflectance.direct_diffuse.lab.a, + b=color_results.system_results.back.reflectance.direct_diffuse.lab.b)) +print("Color back reflectance direct-diffuse Trichromatic: ({x}, {y}, {z})".format( + x=color_results.system_results.back.reflectance.direct_diffuse.trichromatic.X, + y=color_results.system_results.back.reflectance.direct_diffuse.trichromatic.Y, + z=color_results.system_results.back.reflectance.direct_diffuse.trichromatic.Z)) + +# back reflectance direct-hemispherical. +print("Color back reflectance direct-hemispherical RGB: ({r}, {g}, {b})".format( + r=color_results.system_results.back.reflectance.direct_hemispherical.rgb.R, + g=color_results.system_results.back.reflectance.direct_hemispherical.rgb.G, + b=color_results.system_results.back.reflectance.direct_hemispherical.rgb.B)) +print("Color back reflectance direct-hemispherical Lab: ({l}, {a}, {b})".format( + l=color_results.system_results.back.reflectance.direct_hemispherical.lab.L, + a=color_results.system_results.back.reflectance.direct_hemispherical.lab.a, + b=color_results.system_results.back.reflectance.direct_hemispherical.lab.b)) +print("Color back reflectance direct-hemispherical Trichromatic: ({x}, {y}, {z})".format( + x=color_results.system_results.back.reflectance.direct_hemispherical.trichromatic.X, + y=color_results.system_results.back.reflectance.direct_hemispherical.trichromatic.Y, + z=color_results.system_results.back.reflectance.direct_hemispherical.trichromatic.Z)) + +# back reflectance diffuse-diffuse +print("Color back reflectance diffuse-diffuse RGB: ({r}, {g}, {b})".format( + r=color_results.system_results.back.reflectance.diffuse_diffuse.rgb.R, + g=color_results.system_results.back.reflectance.diffuse_diffuse.rgb.G, + b=color_results.system_results.back.reflectance.diffuse_diffuse.rgb.B)) +print("Color back reflectance diffuse-diffuse Lab: ({l}, {a}, {b})".format( + l=color_results.system_results.back.reflectance.diffuse_diffuse.lab.L, + a=color_results.system_results.back.reflectance.diffuse_diffuse.lab.a, + b=color_results.system_results.back.reflectance.diffuse_diffuse.lab.b)) +print("Color back reflectance diffuse-diffuse Trichromatic: ({x}, {y}, {z})".format( + x=color_results.system_results.back.reflectance.diffuse_diffuse.trichromatic.X, + y=color_results.system_results.back.reflectance.diffuse_diffuse.trichromatic.Y, + z=color_results.system_results.back.reflectance.diffuse_diffuse.trichromatic.Z)) diff --git a/examples/optical_results_NFRC.py b/examples/optical_results_NFRC.py new file mode 100644 index 0000000..ac3cbfd --- /dev/null +++ b/examples/optical_results_NFRC.py @@ -0,0 +1,803 @@ +import pywincalc + +# Load solid layer measured values. Solid layer information can come from either igsdb.lbl.gov or files generate +# 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) + +solid_layers = [clear_3] + +# Using a small basis here to make printing out the matrix results managable +# Small should probably not be used for actual simulation +bsdf_hemisphere = pywincalc.BSDFHemisphere.create(pywincalc.BSDFBasisType.SMALL) + +# Create a glazing system. By default a glazing system created this way uses the NFRC optical standard. +# To use a different optical standard see optical_results_EN_410.py for an example of using a different standard +glazing_system = pywincalc.GlazingSystem(solid_layers=solid_layers, bsdf_hemisphere=bsdf_hemisphere) + +# In general there are two types of results: optical and thermal. Here optical and thermal +# refer to the calculation methods and not the wavelengths. +# +# All calculations default to calculating results from radiation at a normal angle of incidence but +# support off-normal calculations by allowing users to pass theta and phi values. +# +# So any result can be calculated for any incidence angle this way. +# e.g. to calculate SHGC results at incidence angle theta = 15 and phi = 25 call +# glazing_system.shgc(theta=15, phi=25) +# +# ------------------------------------Optical Results-------------------------------------------- + +# -------------------------All methods except Thermal IR and Colors------------------------------ +# +# Methods are defined by name in the standards file. To calculate results for +# all methods except Thermal IR and Colors (see below) pass the method name to the +# GlazingSystem.optical_method_results function. +# +# The below enumerates the results available from the W5_NFRC_2003.std file. +# Since the standards files are free to name the methods as they like if you are using +# some other standard some knowledge about what the various methods represent may be required. +# ------------------------------------------Solar------------------------------------------------ +solar_results = glazing_system.optical_method_results("SOLAR") + +print("System solar front transmittance direct-direct: {v}".format( + v=solar_results.system_results.front.transmittance.direct_direct)) +print("System solar front transmittance direct-diffuse: {v}".format( + v=solar_results.system_results.front.transmittance.direct_diffuse)) +print("System solar front transmittance direct-hemispherical: {v}".format( + v=solar_results.system_results.front.transmittance.direct_hemispherical)) +print("System solar front transmittance diffuse-diffuse: {v}".format( + v=solar_results.system_results.front.transmittance.diffuse_diffuse)) +print( + "System solar front transmittance matrix (only available for systems calculated with a BSDF hemisphere): {v}".format( + v=solar_results.system_results.front.transmittance.matrix)) + +print("System solar front reflectance direct-direct: {v}".format( + v=solar_results.system_results.front.reflectance.direct_direct)) +print("System solar front reflectance direct-diffuse: {v}".format( + v=solar_results.system_results.front.reflectance.direct_diffuse)) +print("System solar front reflectance direct-hemispherical: {v}".format( + v=solar_results.system_results.front.reflectance.direct_hemispherical)) +print("System solar front reflectance diffuse-diffuse: {v}".format( + v=solar_results.system_results.front.reflectance.diffuse_diffuse)) +print( + "System solar front reflectance matrix (only available for systems calculated with a BSDF hemisphere): {v}".format( + v=solar_results.system_results.front.reflectance.matrix)) + +print("System solar back transmittance direct-direct: {v}".format( + v=solar_results.system_results.back.transmittance.direct_direct)) +print("System solar back transmittance direct-diffuse: {v}".format( + v=solar_results.system_results.back.transmittance.direct_diffuse)) +print("System solar back transmittance direct-hemispherical: {v}".format( + v=solar_results.system_results.back.transmittance.direct_hemispherical)) +print("System solar back transmittance diffuse-diffuse: {v}".format( + v=solar_results.system_results.back.transmittance.diffuse_diffuse)) +print( + "System solar back transmittance matrix (only available for systems calculated with a BSDF hemisphere): {v}".format( + v=solar_results.system_results.back.transmittance.matrix)) + +print("System solar back reflectance direct-direct: {v}".format( + v=solar_results.system_results.back.reflectance.direct_direct)) +print("System solar back reflectance direct-diffuse: {v}".format( + v=solar_results.system_results.back.reflectance.direct_diffuse)) +print("System solar back reflectance direct-hemispherical: {v}".format( + v=solar_results.system_results.back.reflectance.direct_hemispherical)) +print("System solar back reflectance diffuse-diffuse: {v}".format( + v=solar_results.system_results.back.reflectance.diffuse_diffuse)) +print("System solar back reflectance matrix (only available for systems calculated with a BSDF hemisphere): {v}".format( + v=solar_results.system_results.back.reflectance.matrix)) + +for i in range(len(solid_layers)): + print("Layer {idx} solar front total direct absorptance: {v}".format(idx=i + 1, + v=solar_results.layer_results[ + i].front.absorptance.total_direct)) + print("Layer {idx} solar front total diffuse absorptance: {v}".format(idx=i + 1, + v=solar_results.layer_results[ + i].front.absorptance.total_diffuse)) + print("Layer {idx} solar front heat direct absorptance: {v}".format(idx=i + 1, + v=solar_results.layer_results[ + i].front.absorptance.heat_direct)) + print("Layer {idx} solar front heat diffuse absorptance: {v}".format(idx=i + 1, + v=solar_results.layer_results[ + i].front.absorptance.heat_diffuse)) + print("Layer {idx} solar front electricity direct absorptance: {v}".format(idx=i + 1, + v=solar_results.layer_results[ + i].front.absorptance.electricity_direct)) + print("Layer {idx} solar front electricity diffuse absorptance: {v}".format(idx=i + 1, + v=solar_results.layer_results[ + i].front.absorptance.electricity_diffuse)) + print( + "Layer {idx} solar back total direct absorptance: {v}".format(idx=i + 1, + v=solar_results.layer_results[ + i].back.absorptance.total_direct)) + print("Layer {idx} solar back total diffuse absorptance: {v}".format(idx=i + 1, + v=solar_results.layer_results[ + i].back.absorptance.total_diffuse)) + print("Layer {idx} solar back heat direct absorptance: {v}".format(idx=i + 1, + v=solar_results.layer_results[ + i].back.absorptance.heat_direct)) + print("Layer {idx} solar back heat diffuse absorptance: {v}".format(idx=i + 1, + v=solar_results.layer_results[ + i].back.absorptance.heat_diffuse)) + print("Layer {idx} solar back electricity direct absorptance: {v}".format(idx=i + 1, + v=solar_results.layer_results[ + i].back.absorptance.electricity_direct)) + print("Layer {idx} solar back electricity diffuse absorptance: {v}".format(idx=i + 1, + v=solar_results.layer_results[ + i].back.absorptance.electricity_diffuse)) + + print( + "Layer {idx} solar back total angular absorptance (only available for systems calculated with a BSDF hemisphere): {v}".format( + idx=i + 1, v=solar_results.layer_results[ + i].back.absorptance.angular_total)) + + print( + "Layer {idx} solar back heat angular absorptance (only available for systems calculated with a BSDF hemisphere): {v}".format( + idx=i + 1, v=solar_results.layer_results[ + i].back.absorptance.angular_heat)) + + print( + "Layer {idx} solar back electricity angular absorptance (only available for systems calculated with a BSDF hemisphere): {v}".format( + idx=i + 1, v=solar_results.layer_results[ + i].back.absorptance.angular_electricity)) + +# ---------------------------------Photopic (aka Visible)----------------------- +photopic_results = glazing_system.optical_method_results("PHOTOPIC") + +print("System photopic front transmittance direct-direct: {v}".format( + v=photopic_results.system_results.front.transmittance.direct_direct)) +print("System photopic front transmittance direct-diffuse: {v}".format( + v=photopic_results.system_results.front.transmittance.direct_diffuse)) +print("System photopic front transmittance direct-hemispherical: {v}".format( + v=photopic_results.system_results.front.transmittance.direct_hemispherical)) +print("System photopic front transmittance diffuse-diffuse: {v}".format( + v=photopic_results.system_results.front.transmittance.diffuse_diffuse)) +print( + "System photopic front transmittance matrix (only available for systems calculated with a BSDF hemisphere): {v}".format( + v=photopic_results.system_results.front.transmittance.matrix)) + +print("System photopic front reflectance direct-direct: {v}".format( + v=photopic_results.system_results.front.reflectance.direct_direct)) +print("System photopic front reflectance direct-diffuse: {v}".format( + v=photopic_results.system_results.front.reflectance.direct_diffuse)) +print("System photopic front reflectance direct-hemispherical: {v}".format( + v=photopic_results.system_results.front.reflectance.direct_hemispherical)) +print("System photopic front reflectance diffuse-diffuse: {v}".format( + v=photopic_results.system_results.front.reflectance.diffuse_diffuse)) +print( + "System photopic front reflectance matrix (only available for systems calculated with a BSDF hemisphere): {v}".format( + v=photopic_results.system_results.front.reflectance.matrix)) + +print("System photopic back transmittance direct-direct: {v}".format( + v=photopic_results.system_results.back.transmittance.direct_direct)) +print("System photopic back transmittance direct-diffuse: {v}".format( + v=photopic_results.system_results.back.transmittance.direct_diffuse)) +print("System photopic back transmittance direct-hemispherical: {v}".format( + v=photopic_results.system_results.back.transmittance.direct_hemispherical)) +print("System photopic back transmittance diffuse-diffuse: {v}".format( + v=photopic_results.system_results.back.transmittance.diffuse_diffuse)) +print( + "System photopic back transmittance matrix (only available for systems calculated with a BSDF hemisphere): {v}".format( + v=photopic_results.system_results.back.transmittance.matrix)) + +print("System photopic back reflectance direct-direct: {v}".format( + v=photopic_results.system_results.back.reflectance.direct_direct)) +print("System photopic back reflectance direct-diffuse: {v}".format( + v=photopic_results.system_results.back.reflectance.direct_diffuse)) +print("System photopic back reflectance direct-hemispherical: {v}".format( + v=photopic_results.system_results.back.reflectance.direct_hemispherical)) +print("System photopic back reflectance diffuse-diffuse: {v}".format( + v=photopic_results.system_results.back.reflectance.diffuse_diffuse)) +print( + "System photopic back reflectance matrix (only available for systems calculated with a BSDF hemisphere): {v}".format( + v=photopic_results.system_results.back.reflectance.matrix)) + +for i in range(len(solid_layers)): + print("Layer {idx} photopic front total direct absorptance: {v}".format(idx=i + 1, + v=photopic_results.layer_results[ + i].front.absorptance.total_direct)) + print("Layer {idx} photopic front total diffuse absorptance: {v}".format(idx=i + 1, + v=photopic_results.layer_results[ + i].front.absorptance.total_diffuse)) + print("Layer {idx} photopic front heat direct absorptance: {v}".format(idx=i + 1, + v=photopic_results.layer_results[ + i].front.absorptance.heat_direct)) + print("Layer {idx} photopic front heat diffuse absorptance: {v}".format(idx=i + 1, + v=photopic_results.layer_results[ + i].front.absorptance.heat_diffuse)) + print("Layer {idx} photopic front electricity direct absorptance: {v}".format(idx=i + 1, + v=photopic_results.layer_results[ + i].front.absorptance.electricity_direct)) + print("Layer {idx} photopic front electricity diffuse absorptance: {v}".format(idx=i + 1, + v=photopic_results.layer_results[ + i].front.absorptance.electricity_diffuse)) + print( + "Layer {idx} photopic back total direct absorptance: {v}".format(idx=i + 1, + v=photopic_results.layer_results[ + i].back.absorptance.total_direct)) + print("Layer {idx} photopic back total diffuse absorptance: {v}".format(idx=i + 1, + v=photopic_results.layer_results[ + i].back.absorptance.total_diffuse)) + print("Layer {idx} photopic back heat direct absorptance: {v}".format(idx=i + 1, + v=photopic_results.layer_results[ + i].back.absorptance.heat_direct)) + print("Layer {idx} photopic back heat diffuse absorptance: {v}".format(idx=i + 1, + v=photopic_results.layer_results[ + i].back.absorptance.heat_diffuse)) + print("Layer {idx} photopic back electricity direct absorptance: {v}".format(idx=i + 1, + v=photopic_results.layer_results[ + i].back.absorptance.electricity_direct)) + print("Layer {idx} photopic back electricity diffuse absorptance: {v}".format(idx=i + 1, + v=photopic_results.layer_results[ + i].back.absorptance.electricity_diffuse)) + + print( + "Layer {idx} photopic back total angular absorptance (only available for systems calculated with a BSDF hemisphere): {v}".format( + idx=i + 1, v=photopic_results.layer_results[ + i].back.absorptance.angular_total)) + + print( + "Layer {idx} photopic back heat angular absorptance (only available for systems calculated with a BSDF hemisphere): {v}".format( + idx=i + 1, v=photopic_results.layer_results[ + i].back.absorptance.angular_heat)) + + print( + "Layer {idx} photopic back electricity angular absorptance (only available for systems calculated with a BSDF hemisphere): {v}".format( + idx=i + 1, + v=solar_results.layer_results[ + i].back.absorptance.angular_electricity)) + +# -------------------------------SPF------------------------- +# Unlike the other methods the layers in the glazing system do not contain +# measured values for that cover the range defined by the SPF method in the standards file +# pywincalc will throw an exception in such circumstances + +try: + spf_results = glazing_system.optical_method_results("SPF") +except Exception as e: + print("Error trying to calculate results for SPF method: {e}".format(e=e)) + +# ---------------------------------TUV----------------------- +tuv_results = glazing_system.optical_method_results("TUV") + +print("System TUV front transmittance direct-direct: {v}".format( + v=tuv_results.system_results.front.transmittance.direct_direct)) +print("System TUV front transmittance direct-diffuse: {v}".format( + v=tuv_results.system_results.front.transmittance.direct_diffuse)) +print("System TUV front transmittance direct-hemispherical: {v}".format( + v=tuv_results.system_results.front.transmittance.direct_hemispherical)) +print("System TUV front transmittance diffuse-diffuse: {v}".format( + v=tuv_results.system_results.front.transmittance.diffuse_diffuse)) +print( + "System TUV front transmittance matrix (only available for systems calculated with a BSDF hemisphere): {v}".format( + v=tuv_results.system_results.front.transmittance.matrix)) + +print("System TUV front reflectance direct-direct: {v}".format( + v=tuv_results.system_results.front.reflectance.direct_direct)) +print("System TUV front reflectance direct-diffuse: {v}".format( + v=tuv_results.system_results.front.reflectance.direct_diffuse)) +print("System TUV front reflectance direct-hemispherical: {v}".format( + v=tuv_results.system_results.front.reflectance.direct_hemispherical)) +print("System TUV front reflectance diffuse-diffuse: {v}".format( + v=tuv_results.system_results.front.reflectance.diffuse_diffuse)) +print( + "System TUV front reflectance matrix (only available for systems calculated with a BSDF hemisphere): {v}".format( + v=tuv_results.system_results.front.reflectance.matrix)) + +print("System TUV back transmittance direct-direct: {v}".format( + v=tuv_results.system_results.back.transmittance.direct_direct)) +print("System TUV back transmittance direct-diffuse: {v}".format( + v=tuv_results.system_results.back.transmittance.direct_diffuse)) +print("System TUV back transmittance direct-hemispherical: {v}".format( + v=tuv_results.system_results.back.transmittance.direct_hemispherical)) +print("System TUV back transmittance diffuse-diffuse: {v}".format( + v=tuv_results.system_results.back.transmittance.diffuse_diffuse)) +print( + "System TUV back transmittance matrix (only available for systems calculated with a BSDF hemisphere): {v}".format( + v=tuv_results.system_results.back.transmittance.matrix)) + +print("System TUV back reflectance direct-direct: {v}".format( + v=tuv_results.system_results.back.reflectance.direct_direct)) +print("System TUV back reflectance direct-diffuse: {v}".format( + v=tuv_results.system_results.back.reflectance.direct_diffuse)) +print("System TUV back reflectance direct-hemispherical: {v}".format( + v=tuv_results.system_results.back.reflectance.direct_hemispherical)) +print("System TUV back reflectance diffuse-diffuse: {v}".format( + v=tuv_results.system_results.back.reflectance.diffuse_diffuse)) +print("System TUV back reflectance matrix (only available for systems calculated with a BSDF hemisphere): {v}".format( + v=tuv_results.system_results.back.reflectance.matrix)) + +for i in range(len(solid_layers)): + print("Layer {idx} TUV front total direct absorptance: {v}".format(idx=i + 1, + v=tuv_results.layer_results[ + i].front.absorptance.total_direct)) + print("Layer {idx} TUV front total diffuse absorptance: {v}".format(idx=i + 1, + v=tuv_results.layer_results[ + i].front.absorptance.total_diffuse)) + print("Layer {idx} TUV front heat direct absorptance: {v}".format(idx=i + 1, + v=tuv_results.layer_results[ + i].front.absorptance.heat_direct)) + print("Layer {idx} TUV front heat diffuse absorptance: {v}".format(idx=i + 1, + v=tuv_results.layer_results[ + i].front.absorptance.heat_diffuse)) + print("Layer {idx} TUV front electricity direct absorptance: {v}".format(idx=i + 1, + v=tuv_results.layer_results[ + i].front.absorptance.electricity_direct)) + print("Layer {idx} TUV front electricity diffuse absorptance: {v}".format(idx=i + 1, + v=tuv_results.layer_results[ + i].front.absorptance.electricity_diffuse)) + print( + "Layer {idx} TUV back total direct absorptance: {v}".format(idx=i + 1, + v=tuv_results.layer_results[ + i].back.absorptance.total_direct)) + print("Layer {idx} TUV back total diffuse absorptance: {v}".format(idx=i + 1, + v=tuv_results.layer_results[ + i].back.absorptance.total_diffuse)) + print("Layer {idx} TUV back heat direct absorptance: {v}".format(idx=i + 1, + v=tuv_results.layer_results[ + i].back.absorptance.heat_direct)) + print("Layer {idx} TUV back heat diffuse absorptance: {v}".format(idx=i + 1, + v=tuv_results.layer_results[ + i].back.absorptance.heat_diffuse)) + print("Layer {idx} TUV back electricity direct absorptance: {v}".format(idx=i + 1, + v=tuv_results.layer_results[ + i].back.absorptance.electricity_direct)) + print("Layer {idx} TUV back electricity diffuse absorptance: {v}".format(idx=i + 1, + v=tuv_results.layer_results[ + i].back.absorptance.electricity_diffuse)) + + print( + "Layer {idx} TUV back total angular absorptance (only available for systems calculated with a BSDF hemisphere): {v}".format( + idx=i + 1, v=tuv_results.layer_results[ + i].back.absorptance.angular_total)) + + print( + "Layer {idx} TUV back heat angular absorptance (only available for systems calculated with a BSDF hemisphere): {v}".format( + idx=i + 1, v=tuv_results.layer_results[ + i].back.absorptance.angular_heat)) + + print( + "Layer {idx} TUV back electricity angular absorptance (only available for systems calculated with a BSDF hemisphere): {v}".format( + idx=i + 1, + v=tuv_results.layer_results[ + i].back.absorptance.angular_electricity)) + +# ---------------------------------TDW----------------------- +tdw_results = glazing_system.optical_method_results("TDW") + +print("System TDW front transmittance direct-direct: {v}".format( + v=tdw_results.system_results.front.transmittance.direct_direct)) +print("System TDW front transmittance direct-diffuse: {v}".format( + v=tdw_results.system_results.front.transmittance.direct_diffuse)) +print("System TDW front transmittance direct-hemispherical: {v}".format( + v=tdw_results.system_results.front.transmittance.direct_hemispherical)) +print("System TDW front transmittance diffuse-diffuse: {v}".format( + v=tdw_results.system_results.front.transmittance.diffuse_diffuse)) +print( + "System TDW front transmittance matrix (only available for systems calculated with a BSDF hemisphere): {v}".format( + v=tdw_results.system_results.front.transmittance.matrix)) + +print("System TDW front reflectance direct-direct: {v}".format( + v=tdw_results.system_results.front.reflectance.direct_direct)) +print("System TDW front reflectance direct-diffuse: {v}".format( + v=tdw_results.system_results.front.reflectance.direct_diffuse)) +print("System TDW front reflectance direct-hemispherical: {v}".format( + v=tdw_results.system_results.front.reflectance.direct_hemispherical)) +print("System TDW front reflectance diffuse-diffuse: {v}".format( + v=tdw_results.system_results.front.reflectance.diffuse_diffuse)) +print( + "System TDW front reflectance matrix (only available for systems calculated with a BSDF hemisphere): {v}".format( + v=tdw_results.system_results.front.reflectance.matrix)) + +print("System TDW back transmittance direct-direct: {v}".format( + v=tdw_results.system_results.back.transmittance.direct_direct)) +print("System TDW back transmittance direct-diffuse: {v}".format( + v=tdw_results.system_results.back.transmittance.direct_diffuse)) +print("System TDW back transmittance direct-hemispherical: {v}".format( + v=tdw_results.system_results.back.transmittance.direct_hemispherical)) +print("System TDW back transmittance diffuse-diffuse: {v}".format( + v=tdw_results.system_results.back.transmittance.diffuse_diffuse)) +print( + "System TDW back transmittance matrix (only available for systems calculated with a BSDF hemisphere): {v}".format( + v=tdw_results.system_results.back.transmittance.matrix)) + +print("System TDW back reflectance direct-direct: {v}".format( + v=tdw_results.system_results.back.reflectance.direct_direct)) +print("System TDW back reflectance direct-diffuse: {v}".format( + v=tdw_results.system_results.back.reflectance.direct_diffuse)) +print("System TDW back reflectance direct-hemispherical: {v}".format( + v=tdw_results.system_results.back.reflectance.direct_hemispherical)) +print("System TDW back reflectance diffuse-diffuse: {v}".format( + v=tdw_results.system_results.back.reflectance.diffuse_diffuse)) +print("System TDW back reflectance matrix (only available for systems calculated with a BSDF hemisphere): {v}".format( + v=tdw_results.system_results.back.reflectance.matrix)) + +for i in range(len(solid_layers)): + print("Layer {idx} TDW front total direct absorptance: {v}".format(idx=i + 1, + v=tdw_results.layer_results[ + i].front.absorptance.total_direct)) + print("Layer {idx} TDW front total diffuse absorptance: {v}".format(idx=i + 1, + v=tdw_results.layer_results[ + i].front.absorptance.total_diffuse)) + print("Layer {idx} TDW front heat direct absorptance: {v}".format(idx=i + 1, + v=tdw_results.layer_results[ + i].front.absorptance.heat_direct)) + print("Layer {idx} TDW front heat diffuse absorptance: {v}".format(idx=i + 1, + v=tdw_results.layer_results[ + i].front.absorptance.heat_diffuse)) + print("Layer {idx} TDW front electricity direct absorptance: {v}".format(idx=i + 1, + v=tdw_results.layer_results[ + i].front.absorptance.electricity_direct)) + print("Layer {idx} TDW front electricity diffuse absorptance: {v}".format(idx=i + 1, + v=tdw_results.layer_results[ + i].front.absorptance.electricity_diffuse)) + print( + "Layer {idx} TDW back total direct absorptance: {v}".format(idx=i + 1, + v=tdw_results.layer_results[ + i].back.absorptance.total_direct)) + print("Layer {idx} TDW back total diffuse absorptance: {v}".format(idx=i + 1, + v=tdw_results.layer_results[ + i].back.absorptance.total_diffuse)) + print("Layer {idx} TDW back heat direct absorptance: {v}".format(idx=i + 1, + v=tdw_results.layer_results[ + i].back.absorptance.heat_direct)) + print("Layer {idx} TDW back heat diffuse absorptance: {v}".format(idx=i + 1, + v=tdw_results.layer_results[ + i].back.absorptance.heat_diffuse)) + print("Layer {idx} TDW back electricity direct absorptance: {v}".format(idx=i + 1, + v=tdw_results.layer_results[ + i].back.absorptance.electricity_direct)) + print("Layer {idx} TDW back electricity diffuse absorptance: {v}".format(idx=i + 1, + v=tdw_results.layer_results[ + i].back.absorptance.electricity_diffuse)) + + print( + "Layer {idx} TDW back total angular absorptance (only available for systems calculated with a BSDF hemisphere): {v}".format( + idx=i + 1, v=tdw_results.layer_results[ + i].back.absorptance.angular_total)) + + print( + "Layer {idx} TDW back heat angular absorptance (only available for systems calculated with a BSDF hemisphere): {v}".format( + idx=i + 1, v=tdw_results.layer_results[ + i].back.absorptance.angular_heat)) + + print( + "Layer {idx} TDW back electricity angular absorptance (only available for systems calculated with a BSDF hemisphere): {v}".format( + idx=i + 1, + v=tdw_results.layer_results[ + i].back.absorptance.angular_electricity)) + +# ---------------------------------TKR----------------------- +tkr_results = glazing_system.optical_method_results("TKR") + +print("System TKR front transmittance direct-direct: {v}".format( + v=tkr_results.system_results.front.transmittance.direct_direct)) +print("System TKR front transmittance direct-diffuse: {v}".format( + v=tkr_results.system_results.front.transmittance.direct_diffuse)) +print("System TKR front transmittance direct-hemispherical: {v}".format( + v=tkr_results.system_results.front.transmittance.direct_hemispherical)) +print("System TKR front transmittance diffuse-diffuse: {v}".format( + v=tkr_results.system_results.front.transmittance.diffuse_diffuse)) +print( + "System TKR front transmittance matrix (only available for systems calculated with a BSDF hemisphere): {v}".format( + v=tkr_results.system_results.front.transmittance.matrix)) + +print("System TKR front reflectance direct-direct: {v}".format( + v=tkr_results.system_results.front.reflectance.direct_direct)) +print("System TKR front reflectance direct-diffuse: {v}".format( + v=tkr_results.system_results.front.reflectance.direct_diffuse)) +print("System TKR front reflectance direct-hemispherical: {v}".format( + v=tkr_results.system_results.front.reflectance.direct_hemispherical)) +print("System TKR front reflectance diffuse-diffuse: {v}".format( + v=tkr_results.system_results.front.reflectance.diffuse_diffuse)) +print( + "System TKR front reflectance matrix (only available for systems calculated with a BSDF hemisphere): {v}".format( + v=tkr_results.system_results.front.reflectance.matrix)) + +print("System TKR back transmittance direct-direct: {v}".format( + v=tkr_results.system_results.back.transmittance.direct_direct)) +print("System TKR back transmittance direct-diffuse: {v}".format( + v=tkr_results.system_results.back.transmittance.direct_diffuse)) +print("System TKR back transmittance direct-hemispherical: {v}".format( + v=tkr_results.system_results.back.transmittance.direct_hemispherical)) +print("System TKR back transmittance diffuse-diffuse: {v}".format( + v=tkr_results.system_results.back.transmittance.diffuse_diffuse)) +print( + "System TKR back transmittance matrix (only available for systems calculated with a BSDF hemisphere): {v}".format( + v=tkr_results.system_results.back.transmittance.matrix)) + +print("System TKR back reflectance direct-direct: {v}".format( + v=tkr_results.system_results.back.reflectance.direct_direct)) +print("System TKR back reflectance direct-diffuse: {v}".format( + v=tkr_results.system_results.back.reflectance.direct_diffuse)) +print("System TKR back reflectance direct-hemispherical: {v}".format( + v=tkr_results.system_results.back.reflectance.direct_hemispherical)) +print("System TKR back reflectance diffuse-diffuse: {v}".format( + v=tkr_results.system_results.back.reflectance.diffuse_diffuse)) +print("System TKR back reflectance matrix (only available for systems calculated with a BSDF hemisphere): {v}".format( + v=tkr_results.system_results.back.reflectance.matrix)) + +for i in range(len(solid_layers)): + print("Layer {idx} TKR front total direct absorptance: {v}".format(idx=i + 1, + v=tkr_results.layer_results[ + i].front.absorptance.total_direct)) + print("Layer {idx} TKR front total diffuse absorptance: {v}".format(idx=i + 1, + v=tkr_results.layer_results[ + i].front.absorptance.total_diffuse)) + print("Layer {idx} TKR front heat direct absorptance: {v}".format(idx=i + 1, + v=tkr_results.layer_results[ + i].front.absorptance.heat_direct)) + print("Layer {idx} TKR front heat diffuse absorptance: {v}".format(idx=i + 1, + v=tkr_results.layer_results[ + i].front.absorptance.heat_diffuse)) + print("Layer {idx} TKR front electricity direct absorptance: {v}".format(idx=i + 1, + v=tkr_results.layer_results[ + i].front.absorptance.electricity_direct)) + print("Layer {idx} TKR front electricity diffuse absorptance: {v}".format(idx=i + 1, + v=tkr_results.layer_results[ + i].front.absorptance.electricity_diffuse)) + print( + "Layer {idx} TKR back total direct absorptance: {v}".format(idx=i + 1, + v=tkr_results.layer_results[ + i].back.absorptance.total_direct)) + print("Layer {idx} TKR back total diffuse absorptance: {v}".format(idx=i + 1, + v=tkr_results.layer_results[ + i].back.absorptance.total_diffuse)) + print("Layer {idx} TKR back heat direct absorptance: {v}".format(idx=i + 1, + v=tkr_results.layer_results[ + i].back.absorptance.heat_direct)) + print("Layer {idx} TKR back heat diffuse absorptance: {v}".format(idx=i + 1, + v=tkr_results.layer_results[ + i].back.absorptance.heat_diffuse)) + print("Layer {idx} TKR back electricity direct absorptance: {v}".format(idx=i + 1, + v=tkr_results.layer_results[ + i].back.absorptance.electricity_direct)) + print("Layer {idx} TKR back electricity diffuse absorptance: {v}".format(idx=i + 1, + v=tkr_results.layer_results[ + i].back.absorptance.electricity_diffuse)) + + print( + "Layer {idx} TKR back total angular absorptance (only available for systems calculated with a BSDF hemisphere): {v}".format( + idx=i + 1, v=tkr_results.layer_results[ + i].back.absorptance.angular_total)) + + print( + "Layer {idx} TKR back heat angular absorptance (only available for systems calculated with a BSDF hemisphere): {v}".format( + idx=i + 1, v=tkr_results.layer_results[ + i].back.absorptance.angular_heat)) + + print( + "Layer {idx} TRK back electricity angular absorptance (only available for systems calculated with a BSDF hemisphere): {v}".format( + idx=i + 1, + v=tkr_results.layer_results[ + i].back.absorptance.angular_electricity)) + +# ------------------------------------Color------------------------------------ +# Color results have a different calculation method and so require a different call to calculate +# Also color results do not have results for each layer. Only system results exist for color +color_results = glazing_system.color() +# Front transmittance direct-direct +print("Color front transmittance direct-direct RGB: ({r}, {g}, {b})".format( + r=color_results.system_results.front.transmittance.direct_direct.rgb.R, + g=color_results.system_results.front.transmittance.direct_direct.rgb.G, + b=color_results.system_results.front.transmittance.direct_direct.rgb.B)) +print("Color front transmittance direct-direct Lab: ({l}, {a}, {b})".format( + l=color_results.system_results.front.transmittance.direct_direct.lab.L, + a=color_results.system_results.front.transmittance.direct_direct.lab.a, + b=color_results.system_results.front.transmittance.direct_direct.lab.b)) +print("Color front transmittance direct-direct Trichromatic: ({x}, {y}, {z})".format( + x=color_results.system_results.front.transmittance.direct_direct.trichromatic.X, + y=color_results.system_results.front.transmittance.direct_direct.trichromatic.Y, + z=color_results.system_results.front.transmittance.direct_direct.trichromatic.Z)) + +# Front transmittance direct-diffuse. +print("Color front transmittance direct-diffuse RGB: ({r}, {g}, {b})".format( + r=color_results.system_results.front.transmittance.direct_diffuse.rgb.R, + g=color_results.system_results.front.transmittance.direct_diffuse.rgb.G, + b=color_results.system_results.front.transmittance.direct_diffuse.rgb.B)) +print("Color front transmittance direct-diffuse Lab: ({l}, {a}, {b})".format( + l=color_results.system_results.front.transmittance.direct_diffuse.lab.L, + a=color_results.system_results.front.transmittance.direct_diffuse.lab.a, + b=color_results.system_results.front.transmittance.direct_diffuse.lab.b)) +print("Color front transmittance direct-diffuse Trichromatic: ({x}, {y}, {z})".format( + x=color_results.system_results.front.transmittance.direct_diffuse.trichromatic.X, + y=color_results.system_results.front.transmittance.direct_diffuse.trichromatic.Y, + z=color_results.system_results.front.transmittance.direct_diffuse.trichromatic.Z)) + +# Front transmittance direct-hemispherical. +print("Color front transmittance direct-hemispherical RGB: ({r}, {g}, {b})".format( + r=color_results.system_results.front.transmittance.direct_hemispherical.rgb.R, + g=color_results.system_results.front.transmittance.direct_hemispherical.rgb.G, + b=color_results.system_results.front.transmittance.direct_hemispherical.rgb.B)) +print("Color front transmittance direct-hemispherical Lab: ({l}, {a}, {b})".format( + l=color_results.system_results.front.transmittance.direct_hemispherical.lab.L, + a=color_results.system_results.front.transmittance.direct_hemispherical.lab.a, + b=color_results.system_results.front.transmittance.direct_hemispherical.lab.b)) +print("Color front transmittance direct-hemispherical Trichromatic: ({x}, {y}, {z})".format( + x=color_results.system_results.front.transmittance.direct_hemispherical.trichromatic.X, + y=color_results.system_results.front.transmittance.direct_hemispherical.trichromatic.Y, + z=color_results.system_results.front.transmittance.direct_hemispherical.trichromatic.Z)) + +# Front transmittance diffuse-diffuse +print("Color front transmittance diffuse-diffuse RGB: ({r}, {g}, {b})".format( + r=color_results.system_results.front.transmittance.diffuse_diffuse.rgb.R, + g=color_results.system_results.front.transmittance.diffuse_diffuse.rgb.G, + b=color_results.system_results.front.transmittance.diffuse_diffuse.rgb.B)) +print("Color front transmittance diffuse-diffuse Lab: ({l}, {a}, {b})".format( + l=color_results.system_results.front.transmittance.diffuse_diffuse.lab.L, + a=color_results.system_results.front.transmittance.diffuse_diffuse.lab.a, + b=color_results.system_results.front.transmittance.diffuse_diffuse.lab.b)) +print("Color front transmittance diffuse-diffuse Trichromatic: ({x}, {y}, {z})".format( + x=color_results.system_results.front.transmittance.diffuse_diffuse.trichromatic.X, + y=color_results.system_results.front.transmittance.diffuse_diffuse.trichromatic.Y, + z=color_results.system_results.front.transmittance.diffuse_diffuse.trichromatic.Z)) + +# Front reflectance direct-direct +print("Color front reflectance direct-direct RGB: ({r}, {g}, {b})".format( + r=color_results.system_results.front.reflectance.direct_direct.rgb.R, + g=color_results.system_results.front.reflectance.direct_direct.rgb.G, + b=color_results.system_results.front.reflectance.direct_direct.rgb.B)) +print("Color front reflectance direct-direct Lab: ({l}, {a}, {b})".format( + l=color_results.system_results.front.reflectance.direct_direct.lab.L, + a=color_results.system_results.front.reflectance.direct_direct.lab.a, + b=color_results.system_results.front.reflectance.direct_direct.lab.b)) +print("Color front reflectance direct-direct Trichromatic: ({x}, {y}, {z})".format( + x=color_results.system_results.front.reflectance.direct_direct.trichromatic.X, + y=color_results.system_results.front.reflectance.direct_direct.trichromatic.Y, + z=color_results.system_results.front.reflectance.direct_direct.trichromatic.Z)) + +# Front reflectance direct-diffuse. +print("Color front reflectance direct-diffuse RGB: ({r}, {g}, {b})".format( + r=color_results.system_results.front.reflectance.direct_diffuse.rgb.R, + g=color_results.system_results.front.reflectance.direct_diffuse.rgb.G, + b=color_results.system_results.front.reflectance.direct_diffuse.rgb.B)) +print("Color front reflectance direct-diffuse Lab: ({l}, {a}, {b})".format( + l=color_results.system_results.front.reflectance.direct_diffuse.lab.L, + a=color_results.system_results.front.reflectance.direct_diffuse.lab.a, + b=color_results.system_results.front.reflectance.direct_diffuse.lab.b)) +print("Color front reflectance direct-diffuse Trichromatic: ({x}, {y}, {z})".format( + x=color_results.system_results.front.reflectance.direct_diffuse.trichromatic.X, + y=color_results.system_results.front.reflectance.direct_diffuse.trichromatic.Y, + z=color_results.system_results.front.reflectance.direct_diffuse.trichromatic.Z)) + +# Front reflectance direct-hemispherical. +print("Color front reflectance direct-hemispherical RGB: ({r}, {g}, {b})".format( + r=color_results.system_results.front.reflectance.direct_hemispherical.rgb.R, + g=color_results.system_results.front.reflectance.direct_hemispherical.rgb.G, + b=color_results.system_results.front.reflectance.direct_hemispherical.rgb.B)) +print("Color front reflectance direct-hemispherical Lab: ({l}, {a}, {b})".format( + l=color_results.system_results.front.reflectance.direct_hemispherical.lab.L, + a=color_results.system_results.front.reflectance.direct_hemispherical.lab.a, + b=color_results.system_results.front.reflectance.direct_hemispherical.lab.b)) +print("Color front reflectance direct-hemispherical Trichromatic: ({x}, {y}, {z})".format( + x=color_results.system_results.front.reflectance.direct_hemispherical.trichromatic.X, + y=color_results.system_results.front.reflectance.direct_hemispherical.trichromatic.Y, + z=color_results.system_results.front.reflectance.direct_hemispherical.trichromatic.Z)) + +# Front reflectance diffuse-diffuse +print("Color front reflectance diffuse-diffuse RGB: ({r}, {g}, {b})".format( + r=color_results.system_results.front.reflectance.diffuse_diffuse.rgb.R, + g=color_results.system_results.front.reflectance.diffuse_diffuse.rgb.G, + b=color_results.system_results.front.reflectance.diffuse_diffuse.rgb.B)) +print("Color front reflectance diffuse-diffuse Lab: ({l}, {a}, {b})".format( + l=color_results.system_results.front.reflectance.diffuse_diffuse.lab.L, + a=color_results.system_results.front.reflectance.diffuse_diffuse.lab.a, + b=color_results.system_results.front.reflectance.diffuse_diffuse.lab.b)) +print("Color front reflectance diffuse-diffuse Trichromatic: ({x}, {y}, {z})".format( + x=color_results.system_results.front.reflectance.diffuse_diffuse.trichromatic.X, + y=color_results.system_results.front.reflectance.diffuse_diffuse.trichromatic.Y, + z=color_results.system_results.front.reflectance.diffuse_diffuse.trichromatic.Z)) + +print("Color back transmittance direct-direct RGB: ({r}, {g}, {b})".format( + r=color_results.system_results.back.transmittance.direct_direct.rgb.R, + g=color_results.system_results.back.transmittance.direct_direct.rgb.G, + b=color_results.system_results.back.transmittance.direct_direct.rgb.B)) +print("Color back transmittance direct-direct Lab: ({l}, {a}, {b})".format( + l=color_results.system_results.back.transmittance.direct_direct.lab.L, + a=color_results.system_results.back.transmittance.direct_direct.lab.a, + b=color_results.system_results.back.transmittance.direct_direct.lab.b)) +print("Color back transmittance direct-direct Trichromatic: ({x}, {y}, {z})".format( + x=color_results.system_results.back.transmittance.direct_direct.trichromatic.X, + y=color_results.system_results.back.transmittance.direct_direct.trichromatic.Y, + z=color_results.system_results.back.transmittance.direct_direct.trichromatic.Z)) + +# back transmittance direct-diffuse. +print("Color back transmittance direct-diffuse RGB: ({r}, {g}, {b})".format( + r=color_results.system_results.back.transmittance.direct_diffuse.rgb.R, + g=color_results.system_results.back.transmittance.direct_diffuse.rgb.G, + b=color_results.system_results.back.transmittance.direct_diffuse.rgb.B)) +print("Color back transmittance direct-diffuse Lab: ({l}, {a}, {b})".format( + l=color_results.system_results.back.transmittance.direct_diffuse.lab.L, + a=color_results.system_results.back.transmittance.direct_diffuse.lab.a, + b=color_results.system_results.back.transmittance.direct_diffuse.lab.b)) +print("Color back transmittance direct-diffuse Trichromatic: ({x}, {y}, {z})".format( + x=color_results.system_results.back.transmittance.direct_diffuse.trichromatic.X, + y=color_results.system_results.back.transmittance.direct_diffuse.trichromatic.Y, + z=color_results.system_results.back.transmittance.direct_diffuse.trichromatic.Z)) + +# back transmittance direct-hemispherical. +print("Color back transmittance direct-hemispherical RGB: ({r}, {g}, {b})".format( + r=color_results.system_results.back.transmittance.direct_hemispherical.rgb.R, + g=color_results.system_results.back.transmittance.direct_hemispherical.rgb.G, + b=color_results.system_results.back.transmittance.direct_hemispherical.rgb.B)) +print("Color back transmittance direct-hemispherical Lab: ({l}, {a}, {b})".format( + l=color_results.system_results.back.transmittance.direct_hemispherical.lab.L, + a=color_results.system_results.back.transmittance.direct_hemispherical.lab.a, + b=color_results.system_results.back.transmittance.direct_hemispherical.lab.b)) +print("Color back transmittance direct-hemispherical Trichromatic: ({x}, {y}, {z})".format( + x=color_results.system_results.back.transmittance.direct_hemispherical.trichromatic.X, + y=color_results.system_results.back.transmittance.direct_hemispherical.trichromatic.Y, + z=color_results.system_results.back.transmittance.direct_hemispherical.trichromatic.Z)) + +# back transmittance diffuse-diffuse +print("Color back transmittance diffuse-diffuse RGB: ({r}, {g}, {b})".format( + r=color_results.system_results.back.transmittance.diffuse_diffuse.rgb.R, + g=color_results.system_results.back.transmittance.diffuse_diffuse.rgb.G, + b=color_results.system_results.back.transmittance.diffuse_diffuse.rgb.B)) +print("Color back transmittance diffuse-diffuse Lab: ({l}, {a}, {b})".format( + l=color_results.system_results.back.transmittance.diffuse_diffuse.lab.L, + a=color_results.system_results.back.transmittance.diffuse_diffuse.lab.a, + b=color_results.system_results.back.transmittance.diffuse_diffuse.lab.b)) +print("Color back transmittance diffuse-diffuse Trichromatic: ({x}, {y}, {z})".format( + x=color_results.system_results.back.transmittance.diffuse_diffuse.trichromatic.X, + y=color_results.system_results.back.transmittance.diffuse_diffuse.trichromatic.Y, + z=color_results.system_results.back.transmittance.diffuse_diffuse.trichromatic.Z)) + +# back reflectance direct-direct +print("Color back reflectance direct-direct RGB: ({r}, {g}, {b})".format( + r=color_results.system_results.back.reflectance.direct_direct.rgb.R, + g=color_results.system_results.back.reflectance.direct_direct.rgb.G, + b=color_results.system_results.back.reflectance.direct_direct.rgb.B)) +print("Color back reflectance direct-direct Lab: ({l}, {a}, {b})".format( + l=color_results.system_results.back.reflectance.direct_direct.lab.L, + a=color_results.system_results.back.reflectance.direct_direct.lab.a, + b=color_results.system_results.back.reflectance.direct_direct.lab.b)) +print("Color back reflectance direct-direct Trichromatic: ({x}, {y}, {z})".format( + x=color_results.system_results.back.reflectance.direct_direct.trichromatic.X, + y=color_results.system_results.back.reflectance.direct_direct.trichromatic.Y, + z=color_results.system_results.back.reflectance.direct_direct.trichromatic.Z)) + +# back reflectance direct-diffuse. +print("Color back reflectance direct-diffuse RGB: ({r}, {g}, {b})".format( + r=color_results.system_results.back.reflectance.direct_diffuse.rgb.R, + g=color_results.system_results.back.reflectance.direct_diffuse.rgb.G, + b=color_results.system_results.back.reflectance.direct_diffuse.rgb.B)) +print("Color back reflectance direct-diffuse Lab: ({l}, {a}, {b})".format( + l=color_results.system_results.back.reflectance.direct_diffuse.lab.L, + a=color_results.system_results.back.reflectance.direct_diffuse.lab.a, + b=color_results.system_results.back.reflectance.direct_diffuse.lab.b)) +print("Color back reflectance direct-diffuse Trichromatic: ({x}, {y}, {z})".format( + x=color_results.system_results.back.reflectance.direct_diffuse.trichromatic.X, + y=color_results.system_results.back.reflectance.direct_diffuse.trichromatic.Y, + z=color_results.system_results.back.reflectance.direct_diffuse.trichromatic.Z)) + +# back reflectance direct-hemispherical. +print("Color back reflectance direct-hemispherical RGB: ({r}, {g}, {b})".format( + r=color_results.system_results.back.reflectance.direct_hemispherical.rgb.R, + g=color_results.system_results.back.reflectance.direct_hemispherical.rgb.G, + b=color_results.system_results.back.reflectance.direct_hemispherical.rgb.B)) +print("Color back reflectance direct-hemispherical Lab: ({l}, {a}, {b})".format( + l=color_results.system_results.back.reflectance.direct_hemispherical.lab.L, + a=color_results.system_results.back.reflectance.direct_hemispherical.lab.a, + b=color_results.system_results.back.reflectance.direct_hemispherical.lab.b)) +print("Color back reflectance direct-hemispherical Trichromatic: ({x}, {y}, {z})".format( + x=color_results.system_results.back.reflectance.direct_hemispherical.trichromatic.X, + y=color_results.system_results.back.reflectance.direct_hemispherical.trichromatic.Y, + z=color_results.system_results.back.reflectance.direct_hemispherical.trichromatic.Z)) + +# back reflectance diffuse-diffuse +print("Color back reflectance diffuse-diffuse RGB: ({r}, {g}, {b})".format( + r=color_results.system_results.back.reflectance.diffuse_diffuse.rgb.R, + g=color_results.system_results.back.reflectance.diffuse_diffuse.rgb.G, + b=color_results.system_results.back.reflectance.diffuse_diffuse.rgb.B)) +print("Color back reflectance diffuse-diffuse Lab: ({l}, {a}, {b})".format( + l=color_results.system_results.back.reflectance.diffuse_diffuse.lab.L, + a=color_results.system_results.back.reflectance.diffuse_diffuse.lab.a, + b=color_results.system_results.back.reflectance.diffuse_diffuse.lab.b)) +print("Color back reflectance diffuse-diffuse Trichromatic: ({x}, {y}, {z})".format( + x=color_results.system_results.back.reflectance.diffuse_diffuse.trichromatic.X, + y=color_results.system_results.back.reflectance.diffuse_diffuse.trichromatic.Y, + z=color_results.system_results.back.reflectance.diffuse_diffuse.trichromatic.Z)) + +# Thermal IR: Thermal IR results are not available for a system. They are only available for a solid layer +# See thermal_ir.py diff --git a/examples/perforated_screen_igsdb_product.py b/examples/perforated_screen_igsdb_product.py new file mode 100644 index 0000000..7bade27 --- /dev/null +++ b/examples/perforated_screen_igsdb_product.py @@ -0,0 +1,30 @@ +import pywincalc +import requests +from igsdb_interaction import url_single_product, headers + +# 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 a perforated screen from igsdb.lbl.gov +thermeshade_perforated_screen_igsdb_id = 14990 + +thermeshade_perforated_screen_igsdb_response = requests.get( + url_single_product.format(id=thermeshade_perforated_screen_igsdb_id), headers=headers) + +thermeshade_perforated_screen = pywincalc.parse_json( + thermeshade_perforated_screen_igsdb_response.content) + +# Create a glazing system. This only shows an example of getting one result from a glazing system +# created using default environmental conditions. +# +# For more possible results see optical_results_NFRC.py +# +# For more on environmental conditions see environmental_conditions_user_defined.py +glazing_system = pywincalc.GlazingSystem(solid_layers=[thermeshade_perforated_screen], + bsdf_hemisphere=bsdf_hemisphere) + +u_value = glazing_system.u() +print("U-value for a perforated screen downloaded from igsdb.lbl.glv: {v}".format(v=u_value)) diff --git a/examples/custom_perforated.py b/examples/perforated_screen_user_defined_geometry_and_user_defined_nband_material.py similarity index 72% rename from examples/custom_perforated.py rename to examples/perforated_screen_user_defined_geometry_and_user_defined_nband_material.py index 3d5df6f..3f17e36 100644 --- a/examples/custom_perforated.py +++ b/examples/perforated_screen_user_defined_geometry_and_user_defined_nband_material.py @@ -1,7 +1,9 @@ import pywincalc -import results_printer +# This shows an example of how to create a perforated screen from user-defined n-band shade +# material data and user-defined perforated geometry. + def convert_wavelength_data(raw_wavelength_data): # Whatever format your raw wavelength data is it will need to be converted to a list of pywincalc.Wavelength_Data # For this example it is assumed that the raw measured values for each wavelength is a dict with keys @@ -24,231 +26,6 @@ def convert_wavelength_data(raw_wavelength_data): return pywincalc_wavelength_measured_data -def raw_glazing_wavelength_data(): - return [{"wavelength_microns": 0.300, "transmittance_front": 0.0020, "transmittance_back": 0.0020, - "reflectance_front": 0.0470, "reflectance_back": 0.0480}, - {"wavelength_microns": 0.305, "transmittance_front": 0.0030, "transmittance_back": 0.0030, - "reflectance_front": 0.0470, "reflectance_back": 0.0480}, - {"wavelength_microns": 0.310, "transmittance_front": 0.0090, "transmittance_back": 0.0090, - "reflectance_front": 0.0470, "reflectance_back": 0.0480}, - {"wavelength_microns": 0.315, "transmittance_front": 0.0350, "transmittance_back": 0.0350, - "reflectance_front": 0.0470, "reflectance_back": 0.0480}, - {"wavelength_microns": 0.320, "transmittance_front": 0.1000, "transmittance_back": 0.1000, - "reflectance_front": 0.0470, "reflectance_back": 0.0480}, - {"wavelength_microns": 0.325, "transmittance_front": 0.2180, "transmittance_back": 0.2180, - "reflectance_front": 0.0490, "reflectance_back": 0.0500}, - {"wavelength_microns": 0.330, "transmittance_front": 0.3560, "transmittance_back": 0.3560, - "reflectance_front": 0.0530, "reflectance_back": 0.0540}, - {"wavelength_microns": 0.335, "transmittance_front": 0.4980, "transmittance_back": 0.4980, - "reflectance_front": 0.0600, "reflectance_back": 0.0610}, - {"wavelength_microns": 0.340, "transmittance_front": 0.6160, "transmittance_back": 0.6160, - "reflectance_front": 0.0670, "reflectance_back": 0.0670}, - {"wavelength_microns": 0.345, "transmittance_front": 0.7090, "transmittance_back": 0.7090, - "reflectance_front": 0.0730, "reflectance_back": 0.0740}, - {"wavelength_microns": 0.350, "transmittance_front": 0.7740, "transmittance_back": 0.7740, - "reflectance_front": 0.0780, "reflectance_back": 0.0790}, - {"wavelength_microns": 0.355, "transmittance_front": 0.8180, "transmittance_back": 0.8180, - "reflectance_front": 0.0820, "reflectance_back": 0.0820}, - {"wavelength_microns": 0.360, "transmittance_front": 0.8470, "transmittance_back": 0.8470, - "reflectance_front": 0.0840, "reflectance_back": 0.0840}, - {"wavelength_microns": 0.365, "transmittance_front": 0.8630, "transmittance_back": 0.8630, - "reflectance_front": 0.0850, "reflectance_back": 0.0850}, - {"wavelength_microns": 0.370, "transmittance_front": 0.8690, "transmittance_back": 0.8690, - "reflectance_front": 0.0850, "reflectance_back": 0.0860}, - {"wavelength_microns": 0.375, "transmittance_front": 0.8610, "transmittance_back": 0.8610, - "reflectance_front": 0.0850, "reflectance_back": 0.0850}, - {"wavelength_microns": 0.380, "transmittance_front": 0.8560, "transmittance_back": 0.8560, - "reflectance_front": 0.0840, "reflectance_back": 0.0840}, - {"wavelength_microns": 0.385, "transmittance_front": 0.8660, "transmittance_back": 0.8660, - "reflectance_front": 0.0850, "reflectance_back": 0.0850}, - {"wavelength_microns": 0.390, "transmittance_front": 0.8810, "transmittance_back": 0.8810, - "reflectance_front": 0.0860, "reflectance_back": 0.0860}, - {"wavelength_microns": 0.395, "transmittance_front": 0.8890, "transmittance_back": 0.8890, - "reflectance_front": 0.0860, "reflectance_back": 0.0860}, - {"wavelength_microns": 0.400, "transmittance_front": 0.8930, "transmittance_back": 0.8930, - "reflectance_front": 0.0860, "reflectance_back": 0.0860}, - {"wavelength_microns": 0.410, "transmittance_front": 0.8930, "transmittance_back": 0.8930, - "reflectance_front": 0.0860, "reflectance_back": 0.0860}, - {"wavelength_microns": 0.420, "transmittance_front": 0.8920, "transmittance_back": 0.8920, - "reflectance_front": 0.0860, "reflectance_back": 0.0860}, - {"wavelength_microns": 0.430, "transmittance_front": 0.8920, "transmittance_back": 0.8920, - "reflectance_front": 0.0850, "reflectance_back": 0.0850}, - {"wavelength_microns": 0.440, "transmittance_front": 0.8920, "transmittance_back": 0.8920, - "reflectance_front": 0.0850, "reflectance_back": 0.0850}, - {"wavelength_microns": 0.450, "transmittance_front": 0.8960, "transmittance_back": 0.8960, - "reflectance_front": 0.0850, "reflectance_back": 0.0850}, - {"wavelength_microns": 0.460, "transmittance_front": 0.9000, "transmittance_back": 0.9000, - "reflectance_front": 0.0850, "reflectance_back": 0.0850}, - {"wavelength_microns": 0.470, "transmittance_front": 0.9020, "transmittance_back": 0.9020, - "reflectance_front": 0.0840, "reflectance_back": 0.0840}, - {"wavelength_microns": 0.480, "transmittance_front": 0.9030, "transmittance_back": 0.9030, - "reflectance_front": 0.0840, "reflectance_back": 0.0840}, - {"wavelength_microns": 0.490, "transmittance_front": 0.9040, "transmittance_back": 0.9040, - "reflectance_front": 0.0850, "reflectance_back": 0.0850}, - {"wavelength_microns": 0.500, "transmittance_front": 0.9050, "transmittance_back": 0.9050, - "reflectance_front": 0.0840, "reflectance_back": 0.0840}, - {"wavelength_microns": 0.510, "transmittance_front": 0.9050, "transmittance_back": 0.9050, - "reflectance_front": 0.0840, "reflectance_back": 0.0840}, - {"wavelength_microns": 0.520, "transmittance_front": 0.9050, "transmittance_back": 0.9050, - "reflectance_front": 0.0840, "reflectance_back": 0.0840}, - {"wavelength_microns": 0.530, "transmittance_front": 0.9040, "transmittance_back": 0.9040, - "reflectance_front": 0.0840, "reflectance_back": 0.0840}, - {"wavelength_microns": 0.540, "transmittance_front": 0.9040, "transmittance_back": 0.9040, - "reflectance_front": 0.0830, "reflectance_back": 0.0830}, - {"wavelength_microns": 0.550, "transmittance_front": 0.9030, "transmittance_back": 0.9030, - "reflectance_front": 0.0830, "reflectance_back": 0.0830}, - {"wavelength_microns": 0.560, "transmittance_front": 0.9020, "transmittance_back": 0.9020, - "reflectance_front": 0.0830, "reflectance_back": 0.0830}, - {"wavelength_microns": 0.570, "transmittance_front": 0.9000, "transmittance_back": 0.9000, - "reflectance_front": 0.0820, "reflectance_back": 0.0820}, - {"wavelength_microns": 0.580, "transmittance_front": 0.8980, "transmittance_back": 0.8980, - "reflectance_front": 0.0820, "reflectance_back": 0.0820}, - {"wavelength_microns": 0.590, "transmittance_front": 0.8960, "transmittance_back": 0.8960, - "reflectance_front": 0.0810, "reflectance_back": 0.0810}, - {"wavelength_microns": 0.600, "transmittance_front": 0.8930, "transmittance_back": 0.8930, - "reflectance_front": 0.0810, "reflectance_back": 0.0810}, - {"wavelength_microns": 0.610, "transmittance_front": 0.8900, "transmittance_back": 0.8900, - "reflectance_front": 0.0810, "reflectance_back": 0.0810}, - {"wavelength_microns": 0.620, "transmittance_front": 0.8860, "transmittance_back": 0.8860, - "reflectance_front": 0.0800, "reflectance_back": 0.0800}, - {"wavelength_microns": 0.630, "transmittance_front": 0.8830, "transmittance_back": 0.8830, - "reflectance_front": 0.0800, "reflectance_back": 0.0800}, - {"wavelength_microns": 0.640, "transmittance_front": 0.8790, "transmittance_back": 0.8790, - "reflectance_front": 0.0790, "reflectance_back": 0.0790}, - {"wavelength_microns": 0.650, "transmittance_front": 0.8750, "transmittance_back": 0.8750, - "reflectance_front": 0.0790, "reflectance_back": 0.0790}, - {"wavelength_microns": 0.660, "transmittance_front": 0.8720, "transmittance_back": 0.8720, - "reflectance_front": 0.0790, "reflectance_back": 0.0790}, - {"wavelength_microns": 0.670, "transmittance_front": 0.8680, "transmittance_back": 0.8680, - "reflectance_front": 0.0780, "reflectance_back": 0.0780}, - {"wavelength_microns": 0.680, "transmittance_front": 0.8630, "transmittance_back": 0.8630, - "reflectance_front": 0.0780, "reflectance_back": 0.0780}, - {"wavelength_microns": 0.690, "transmittance_front": 0.8590, "transmittance_back": 0.8590, - "reflectance_front": 0.0770, "reflectance_back": 0.0770}, - {"wavelength_microns": 0.700, "transmittance_front": 0.8540, "transmittance_back": 0.8540, - "reflectance_front": 0.0760, "reflectance_back": 0.0770}, - {"wavelength_microns": 0.710, "transmittance_front": 0.8500, "transmittance_back": 0.8500, - "reflectance_front": 0.0760, "reflectance_back": 0.0760}, - {"wavelength_microns": 0.720, "transmittance_front": 0.8450, "transmittance_back": 0.8450, - "reflectance_front": 0.0750, "reflectance_back": 0.0760}, - {"wavelength_microns": 0.730, "transmittance_front": 0.8400, "transmittance_back": 0.8400, - "reflectance_front": 0.0750, "reflectance_back": 0.0750}, - {"wavelength_microns": 0.740, "transmittance_front": 0.8350, "transmittance_back": 0.8350, - "reflectance_front": 0.0750, "reflectance_back": 0.0750}, - {"wavelength_microns": 0.750, "transmittance_front": 0.8310, "transmittance_back": 0.8310, - "reflectance_front": 0.0740, "reflectance_back": 0.0740}, - {"wavelength_microns": 0.760, "transmittance_front": 0.8260, "transmittance_back": 0.8260, - "reflectance_front": 0.0740, "reflectance_back": 0.0740}, - {"wavelength_microns": 0.770, "transmittance_front": 0.8210, "transmittance_back": 0.8210, - "reflectance_front": 0.0740, "reflectance_back": 0.0740}, - {"wavelength_microns": 0.780, "transmittance_front": 0.8160, "transmittance_back": 0.8160, - "reflectance_front": 0.0730, "reflectance_back": 0.0730}, - {"wavelength_microns": 0.790, "transmittance_front": 0.8120, "transmittance_back": 0.8120, - "reflectance_front": 0.0730, "reflectance_back": 0.0730}, - {"wavelength_microns": 0.800, "transmittance_front": 0.8080, "transmittance_back": 0.8080, - "reflectance_front": 0.0720, "reflectance_back": 0.0720}, - {"wavelength_microns": 0.810, "transmittance_front": 0.8030, "transmittance_back": 0.8030, - "reflectance_front": 0.0720, "reflectance_back": 0.0720}, - {"wavelength_microns": 0.820, "transmittance_front": 0.8000, "transmittance_back": 0.8000, - "reflectance_front": 0.0720, "reflectance_back": 0.0720}, - {"wavelength_microns": 0.830, "transmittance_front": 0.7960, "transmittance_back": 0.7960, - "reflectance_front": 0.0710, "reflectance_back": 0.0710}, - {"wavelength_microns": 0.840, "transmittance_front": 0.7930, "transmittance_back": 0.7930, - "reflectance_front": 0.0700, "reflectance_back": 0.0710}, - {"wavelength_microns": 0.850, "transmittance_front": 0.7880, "transmittance_back": 0.7880, - "reflectance_front": 0.0700, "reflectance_back": 0.0710}, - {"wavelength_microns": 0.860, "transmittance_front": 0.7860, "transmittance_back": 0.7860, - "reflectance_front": 0.0700, "reflectance_back": 0.0700}, - {"wavelength_microns": 0.870, "transmittance_front": 0.7820, "transmittance_back": 0.7820, - "reflectance_front": 0.0740, "reflectance_back": 0.0740}, - {"wavelength_microns": 0.880, "transmittance_front": 0.7800, "transmittance_back": 0.7800, - "reflectance_front": 0.0720, "reflectance_back": 0.0720}, - {"wavelength_microns": 0.890, "transmittance_front": 0.7770, "transmittance_back": 0.7770, - "reflectance_front": 0.0730, "reflectance_back": 0.0740}, - {"wavelength_microns": 0.900, "transmittance_front": 0.7760, "transmittance_back": 0.7760, - "reflectance_front": 0.0720, "reflectance_back": 0.0720}, - {"wavelength_microns": 0.910, "transmittance_front": 0.7730, "transmittance_back": 0.7730, - "reflectance_front": 0.0720, "reflectance_back": 0.0720}, - {"wavelength_microns": 0.920, "transmittance_front": 0.7710, "transmittance_back": 0.7710, - "reflectance_front": 0.0710, "reflectance_back": 0.0710}, - {"wavelength_microns": 0.930, "transmittance_front": 0.7700, "transmittance_back": 0.7700, - "reflectance_front": 0.0700, "reflectance_back": 0.0700}, - {"wavelength_microns": 0.940, "transmittance_front": 0.7680, "transmittance_back": 0.7680, - "reflectance_front": 0.0690, "reflectance_back": 0.0690}, - {"wavelength_microns": 0.950, "transmittance_front": 0.7660, "transmittance_back": 0.7660, - "reflectance_front": 0.0680, "reflectance_back": 0.0680}, - {"wavelength_microns": 0.960, "transmittance_front": 0.7660, "transmittance_back": 0.7660, - "reflectance_front": 0.0670, "reflectance_back": 0.0680}, - {"wavelength_microns": 0.970, "transmittance_front": 0.7640, "transmittance_back": 0.7640, - "reflectance_front": 0.0680, "reflectance_back": 0.0680}, - {"wavelength_microns": 0.980, "transmittance_front": 0.7630, "transmittance_back": 0.7630, - "reflectance_front": 0.0680, "reflectance_back": 0.0680}, - {"wavelength_microns": 0.990, "transmittance_front": 0.7620, "transmittance_back": 0.7620, - "reflectance_front": 0.0670, "reflectance_back": 0.0670}, - {"wavelength_microns": 1.000, "transmittance_front": 0.7620, "transmittance_back": 0.7620, - "reflectance_front": 0.0660, "reflectance_back": 0.0670}, - {"wavelength_microns": 1.050, "transmittance_front": 0.7600, "transmittance_back": 0.7600, - "reflectance_front": 0.0660, "reflectance_back": 0.0660}, - {"wavelength_microns": 1.100, "transmittance_front": 0.7590, "transmittance_back": 0.7590, - "reflectance_front": 0.0660, "reflectance_back": 0.0660}, - {"wavelength_microns": 1.150, "transmittance_front": 0.7610, "transmittance_back": 0.7610, - "reflectance_front": 0.0660, "reflectance_back": 0.0660}, - {"wavelength_microns": 1.200, "transmittance_front": 0.7650, "transmittance_back": 0.7650, - "reflectance_front": 0.0660, "reflectance_back": 0.0660}, - {"wavelength_microns": 1.250, "transmittance_front": 0.7700, "transmittance_back": 0.7700, - "reflectance_front": 0.0650, "reflectance_back": 0.0650}, - {"wavelength_microns": 1.300, "transmittance_front": 0.7770, "transmittance_back": 0.7770, - "reflectance_front": 0.0670, "reflectance_back": 0.0670}, - {"wavelength_microns": 1.350, "transmittance_front": 0.7860, "transmittance_back": 0.7860, - "reflectance_front": 0.0660, "reflectance_back": 0.0670}, - {"wavelength_microns": 1.400, "transmittance_front": 0.7950, "transmittance_back": 0.7950, - "reflectance_front": 0.0670, "reflectance_back": 0.0680}, - {"wavelength_microns": 1.450, "transmittance_front": 0.8080, "transmittance_back": 0.8080, - "reflectance_front": 0.0670, "reflectance_back": 0.0670}, - {"wavelength_microns": 1.500, "transmittance_front": 0.8190, "transmittance_back": 0.8190, - "reflectance_front": 0.0690, "reflectance_back": 0.0690}, - {"wavelength_microns": 1.550, "transmittance_front": 0.8290, "transmittance_back": 0.8290, - "reflectance_front": 0.0690, "reflectance_back": 0.0690}, - {"wavelength_microns": 1.600, "transmittance_front": 0.8360, "transmittance_back": 0.8360, - "reflectance_front": 0.0700, "reflectance_back": 0.0700}, - {"wavelength_microns": 1.650, "transmittance_front": 0.8400, "transmittance_back": 0.8400, - "reflectance_front": 0.0700, "reflectance_back": 0.0700}, - {"wavelength_microns": 1.700, "transmittance_front": 0.8420, "transmittance_back": 0.8420, - "reflectance_front": 0.0690, "reflectance_back": 0.0700}, - {"wavelength_microns": 1.750, "transmittance_front": 0.8420, "transmittance_back": 0.8420, - "reflectance_front": 0.0690, "reflectance_back": 0.0700}, - {"wavelength_microns": 1.800, "transmittance_front": 0.8410, "transmittance_back": 0.8410, - "reflectance_front": 0.0700, "reflectance_back": 0.0700}, - {"wavelength_microns": 1.850, "transmittance_front": 0.8400, "transmittance_back": 0.8400, - "reflectance_front": 0.0690, "reflectance_back": 0.0690}, - {"wavelength_microns": 1.900, "transmittance_front": 0.8390, "transmittance_back": 0.8390, - "reflectance_front": 0.0680, "reflectance_back": 0.0680}, - {"wavelength_microns": 1.950, "transmittance_front": 0.8390, "transmittance_back": 0.8390, - "reflectance_front": 0.0710, "reflectance_back": 0.0710}, - {"wavelength_microns": 2.000, "transmittance_front": 0.8390, "transmittance_back": 0.8390, - "reflectance_front": 0.0690, "reflectance_back": 0.0690}, - {"wavelength_microns": 2.050, "transmittance_front": 0.8400, "transmittance_back": 0.8400, - "reflectance_front": 0.0680, "reflectance_back": 0.0680}, - {"wavelength_microns": 2.100, "transmittance_front": 0.8410, "transmittance_back": 0.8410, - "reflectance_front": 0.0680, "reflectance_back": 0.0680}, - {"wavelength_microns": 2.150, "transmittance_front": 0.8390, "transmittance_back": 0.8390, - "reflectance_front": 0.0690, "reflectance_back": 0.0690}, - {"wavelength_microns": 2.200, "transmittance_front": 0.8300, "transmittance_back": 0.8300, - "reflectance_front": 0.0700, "reflectance_back": 0.0700}, - {"wavelength_microns": 2.250, "transmittance_front": 0.8300, "transmittance_back": 0.8300, - "reflectance_front": 0.0700, "reflectance_back": 0.0700}, - {"wavelength_microns": 2.300, "transmittance_front": 0.8320, "transmittance_back": 0.8320, - "reflectance_front": 0.0690, "reflectance_back": 0.0690}, - {"wavelength_microns": 2.350, "transmittance_front": 0.8320, "transmittance_back": 0.8320, - "reflectance_front": 0.0690, "reflectance_back": 0.0700}, - {"wavelength_microns": 2.400, "transmittance_front": 0.8320, "transmittance_back": 0.8320, - "reflectance_front": 0.0700, "reflectance_back": 0.0700}, - {"wavelength_microns": 2.450, "transmittance_front": 0.8260, "transmittance_back": 0.8260, - "reflectance_front": 0.0690, "reflectance_back": 0.0690}, - {"wavelength_microns": 2.500, "transmittance_front": 0.8220, "transmittance_back": 0.8220, - "reflectance_front": 0.0680, "reflectance_back": 0.0680}] - - def raw_shade_material_wavelength_data(): # For this example assume the following list of measurements are generated somewhere other than the igsdb # Your particular measurements may have a different format but should contain the same data @@ -1140,74 +917,10 @@ def raw_shade_material_wavelength_data(): "reflectance_back": 0.48}] -# 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 - -# A woven shade requires a BSDF hemisphere. Create one based on a standard quarter basis for this test -bsdf_hemisphere = pywincalc.BSDFHemisphere.create(pywincalc.BSDFBasisType.QUARTER) - -# Create optical data for the glass layer - -glass_material_type = pywincalc.MaterialType.MONOLITHIC -glass_material_thickness = .003048 # 3.048mm thick -glass_wavelength_measurements = convert_wavelength_data(raw_glazing_wavelength_data()) -# Since the measurements do not extend to the IR range emissivity and IR transmittances should be provided -glass_emissivity_front = .84 -glass_emissivity_back = .84 -glass_ir_transmittance_front = 0 -glass_ir_transmittance_back = 0 -glass_coated_side = pywincalc.CoatedSide.NEITHER -glass_permeability_factor = 0 -flipped = False - -glass_n_band_optical_data = pywincalc.ProductDataOpticalNBand(material_type=glass_material_type, - thickness_meters=glass_material_thickness, - wavelength_data=glass_wavelength_measurements, - coated_side=glass_coated_side, - ir_transmittance_front=glass_ir_transmittance_front, - ir_transmittance_back=glass_ir_transmittance_back, - emissivity_front=glass_emissivity_front, - emissivity_back=glass_emissivity_back, - permeability_factor=glass_permeability_factor, - flipped=flipped) - -# Next create the thermal data for the glass layer -glass_conductivity = 1 -# Since thermal openings in this case are all zero they can be omitted. They are included he for example purposes. -glass_opening_top = 0 -glass_opening_bottom = 0 -glass_opening_left = 0 -glass_opening_right = 0 -glass_opening_front = 0 - -glass_thermal = pywincalc.ProductDataThermal(conductivity=glass_conductivity, - thickness_meters=glass_material_thickness, - flipped=flipped, - opening_top=glass_opening_top, - opening_bottom=glass_opening_bottom, - opening_left=glass_opening_left, - opening_right=glass_opening_right, - opening_front=glass_opening_front) - -# Create a glass layer from both the optical and thermal data -glass_layer = pywincalc.ProductDataOpticalAndThermal(glass_n_band_optical_data, glass_thermal) - -# Next start on the shade layer. Create n-band optical product data for the shade material +# Create n-band optical product data for the shade material # n-band is created because per-wavelength measurements are available -# single and dual band products are not yet supported shade_material_type = pywincalc.MaterialType.MONOLITHIC -shade_material_thickness = .001 # 1 mm thick +shade_material_thickness = 0.001 # 1 mm thick shade_material_wavelength_measurements = convert_wavelength_data(raw_shade_material_wavelength_data()) # Since the measurements do not extend to the IR range emissivity and IR transmittances should be provided # These numbers are just for example @@ -1219,32 +932,26 @@ def raw_shade_material_wavelength_data(): flipped = False -shade_material_n_band_optical_data = pywincalc.ProductDataOpticalNBand(material_type=shade_material_type, - thickness_meters=shade_material_thickness, - wavelength_data=shade_material_wavelength_measurements, - ir_transmittance_front=shade_ir_transmittance_front, - ir_transmittance_back=shade_ir_transmittance_back, - emissivity_front=shade_emissivity_front, - emissivity_back=shade_emissivity_back, - permeability_factor=shade_permeability_factor, - flipped=flipped) +shade_material_optical_data = pywincalc.ProductDataOpticalNBand(material_type=shade_material_type, + thickness_meters=shade_material_thickness, + wavelength_data=shade_material_wavelength_measurements, + ir_transmittance_front=shade_ir_transmittance_front, + ir_transmittance_back=shade_ir_transmittance_back, + emissivity_front=shade_emissivity_front, + emissivity_back=shade_emissivity_back, + permeability_factor=shade_permeability_factor, + flipped=flipped) -# Create a pywincalc.Product_Data_Optical_Perforated_Screen out of the material n-band data and desired geometry -perforation_type = pywincalc.ProductDataOpticalPerforatedScreen.Type.RECTANGULAR +# Create perforated geometry +perforation_type = pywincalc.PerforatedGeometry.Type.RECTANGULAR spacing_x = .02 # 20mm horizontal spacing spacing_y = .03 # 30mm vertical spacing dimension_x = .001 # 1mm perforation in the horizontal direction -dimension_y = .003 # 3mm perforation in the horizontal direction +dimension_y = .003 # 3mm perforation in the vertical direction -perforated_screen_optical = pywincalc.ProductDataOpticalPerforatedScreen( - material_product_data_optical=shade_material_n_band_optical_data, - spacing_x=spacing_x, - spacing_y=spacing_y, - dimension_x=dimension_x, - dimension_y=dimension_y, - perforation_type=perforation_type) +geometry = pywincalc.PerforatedGeometry(spacing_x, spacing_y, dimension_x, dimension_y, perforation_type) -# Create a pywincalc.Product_Data_Thermal out of the information that only applies to thermal calculations +# Create a pywincalc.ProductDataThermal out of the information that only applies to thermal calculations # These numbers are only for example purposes. shade_conductivity = 160 shade_opening_top = .01 @@ -1252,41 +959,33 @@ def raw_shade_material_wavelength_data(): shade_opening_left = .02 shade_opening_right = .02 -perforated_screen_thermal = pywincalc.ProductDataThermal(conductivity=shade_conductivity, - thickness_meters=shade_material_thickness, - flipped=flipped, - opening_top=shade_opening_top, - opening_bottom=shade_opening_bottom, - opening_left=shade_opening_left, - opening_right=shade_opening_right) +shade_material_thermal = pywincalc.ProductDataThermal(conductivity=shade_conductivity, + thickness_meters=shade_material_thickness, + flipped=flipped, + opening_top=shade_opening_top, + opening_bottom=shade_opening_bottom, + opening_left=shade_opening_left, + opening_right=shade_opening_right) -# Combine optical and thermal parts into one pywincalc.Product_Data_Optical_Thermal -perforated_layer = pywincalc.ProductDataOpticalAndThermal(perforated_screen_optical, - perforated_screen_thermal) +# Create a perforated screen from the geometry and optical and thermal data +perforated_layer = pywincalc.create_perforated_screen(geometry=geometry, + material_data_optical=shade_material_optical_data, + material_data_thermal=shade_material_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=[perforated_layer, glass_layer], - gap_layers=[gap_1], - width_meters=glazing_system_width, - height_meters=glazing_system_height, - environment=pywincalc.nfrc_u_environments(), - bsdf_hemisphere=bsdf_hemisphere) +# A perforated screen requires a BSDF hemisphere. Create one based on a standard quarter basis for this example +bsdf_hemisphere = pywincalc.BSDFHemisphere.create(pywincalc.BSDFBasisType.QUARTER) -# 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=[perforated_layer, glass_layer], - gap_layers=[gap_1], - width_meters=glazing_system_width, - height_meters=glazing_system_height, - environment=pywincalc.nfrc_shgc_environments(), - bsdf_hemisphere=bsdf_hemisphere) +# Create a glazing system. This only shows an example of getting one result from a glazing system +# created using default NFRC standard and environmental conditions. +# +# For more possible results see: +# - optical_results_NFRC.py for all optical results available in the default NFRC optical standard +# - thermal_results_ISO_15099.py for all thermal results available. +# - deflection.py for additional results when deflection calculations are enabled +# +# For more on environmental conditions see environmental_conditions_user_defined.py +glazing_system = pywincalc.GlazingSystem(solid_layers=[perforated_layer], + bsdf_hemisphere=bsdf_hemisphere) -results_name = "Results for a double-layer system with a custom exterior perforated screen 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) +u_value = glazing_system.u() +print("U-value for a perforated screen made from user-defined material and geometry: {v}".format(v=u_value)) diff --git a/examples/perforated_screen_user_defined_geometry_igsdb_material.py b/examples/perforated_screen_user_defined_geometry_igsdb_material.py new file mode 100644 index 0000000..fe978cf --- /dev/null +++ b/examples/perforated_screen_user_defined_geometry_igsdb_material.py @@ -0,0 +1,56 @@ +import pywincalc +import requests +from igsdb_interaction import url_single_product, headers + +# This shows an example of how to create a perforated screen using shade material data download from +# igsdb.lbl.gov and user-defined perforated geometry. + +# This is the same material used in the venetian example but could be any material in the igsdb +shade_material_igsdb_id = 14477 + +shade_material_igsdb_response = requests.get( + url_single_product.format(id=shade_material_igsdb_id), headers=headers) + +shade_material = pywincalc.parse_json(shade_material_igsdb_response.content) + +# Perforated screens need Perforated_Geometry. +# Make a rectangular perforation here. Other options include circular and square +# For an example where the data is completely custom generated see perforated_screen_user_defined_geometry_and_user_defined_nband_material.py +# Create perforated geometry +perforation_type = pywincalc.PerforatedGeometry.Type.RECTANGULAR +spacing_x = .02 # 20mm horizontal spacing +spacing_y = .03 # 30mm vertical spacing +dimension_x = .001 # 1mm perforation in the horizontal direction +dimension_y = .003 # 3mm perforation in the vertical direction +geometry = pywincalc.PerforatedGeometry(spacing_x, spacing_y, dimension_x, dimension_y, perforation_type) + +# Create a perforated layer from the geometry and matrial data +perforated_layer = pywincalc.create_perforated_screen(geometry=geometry, material=shade_material) + +# If there are any side gaps in the shade those can be set in the thermal part of the solid layer +# These are gaps in addition to any perforations. If the shade is flush with the sides of the +# glazing system disregarding any perforations this step can be omitted. +# These values are for example purposes only. +perforated_layer.thermal_data.opening_top = .01 # 10mm top gap +perforated_layer.thermal_data.opening_bottom = .01 # 10mm bottom gap +perforated_layer.thermal_data.opening_left = .02 # 20mm left gap +perforated_layer.thermal_data.opening_right = .02 # 20mm right gap + +# A perforated shade requires a BSDF hemisphere. Create one based on a standard quarter basis for this example +bsdf_hemisphere = pywincalc.BSDFHemisphere.create(pywincalc.BSDFBasisType.QUARTER) + +# Create a glazing system. This only shows an example of getting one result from a glazing system +# created using default NFRC standard and environmental conditions. +# +# For more possible results see: +# - optical_results_NFRC.py for all optical results available in the default NFRC optical standard +# - thermal_results_ISO_15099.py for all thermal results available. +# - deflection.py for additional results when deflection calculations are enabled +# +# For more on environmental conditions see environmental_conditions_user_defined.py +glazing_system = pywincalc.GlazingSystem(solid_layers=[perforated_layer], bsdf_hemisphere=bsdf_hemisphere) + +u_value = glazing_system.u() +print( + "U-value for a perforated screen made from user-defined geometry and a material downloaded from igsdb.lbl.glv: {v}".format( + v=u_value)) diff --git a/examples/products/venetian_blind_CGDB_22034.json b/examples/products/venetian_blind_CGDB_22034.json new file mode 100644 index 0000000..2383b0c --- /dev/null +++ b/examples/products/venetian_blind_CGDB_22034.json @@ -0,0 +1 @@ +{"product_id":15067,"name":"Espresso Venetian Blind, 7/8\" IG, Tilt Only, 45 (ODL)","product_name":"Espresso Venetian Blind, 7/8\" IG, Tilt Only, (ODL)","nfrc_id":null,"igdb_database_version":null,"cgdb_shading_layer_id":22034,"cgdb_database_version":"11.0","acceptance":"#","appearance":null,"manufacturer_name":"ODL","data_file_name":null,"data_file_available":false,"short_description":null,"type":"shading","subtype":"venetian","deconstructable":false,"coating_name":null,"coated_side":null,"measured_data":{"is_specular":false,"thickness":null,"tir_front":null,"tir_back":null,"emissivity_front":null,"emissivity_back":null,"conductivity":null,"permeability_factor":0.976202},"integrated_results_summary":[{"calculation_standard_name":"NFRC","tfsol":null,"tbsol":null,"rfsol":null,"rbsol":null,"tfvis":null,"tbvis":null,"rfvis":null,"rbvis":null,"tdw":null,"tuv":null,"tspf":null,"tkr":null,"tciex":null,"tciey":null,"tciez":null,"tf_r":null,"tf_g":null,"tf_b":null,"rfciex":null,"rfciey":null,"rfciez":null,"rf_r":null,"rf_g":null,"rf_b":null,"rbciex":null,"rbciey":null,"rbciez":null,"rb_r":null,"rb_g":null,"rb_b":null}],"spectral_data":null,"igdb_checksum":null,"cgdb_shade_material_id":null,"cgdb_checksum":null,"composition":[{"child_product":{"product_id":14481,"name":"ODL Espresso Blind","product_name":"Painted Aluminum Blind - Espresso","nfrc_id":null,"igdb_database_version":null,"cgdb_shading_layer_id":null,"cgdb_database_version":"19.0","acceptance":"#","appearance":null,"manufacturer_name":"ODL","data_file_name":"ODLEspressoBlind.txt","data_file_available":false,"short_description":null,"type":"material","subtype":"monolithic","deconstructable":false,"coating_name":null,"coated_side":null,"measured_data":{"is_specular":true,"thickness":0.15,"tir_front":0.0,"tir_back":null,"emissivity_front":0.82,"emissivity_back":0.82,"conductivity":160.0,"permeability_factor":null},"integrated_results_summary":[{"calculation_standard_name":"NFRC","tfsol":0.0,"tbsol":null,"rfsol":0.0795171111822128,"rbsol":null,"tfvis":0.0,"tbvis":null,"rfvis":0.08170807,"rbvis":0.08170807,"tdw":0.0,"tuv":0.0,"tspf":10000.0,"tkr":null,"tciex":0.0,"tciey":0.0,"tciez":0.0,"tf_r":null,"tf_g":null,"tf_b":null,"rfciex":7.867209,"rfciey":8.097377,"rfciez":7.623662,"rf_r":null,"rf_g":null,"rf_b":null,"rbciex":null,"rbciey":null,"rbciez":null,"rb_r":null,"rb_g":null,"rb_b":null}],"spectral_data":{"spectral_data":[{"T":0.0,"Rb":0.0788000002503395,"Rf":0.0788000002503395,"wavelength":0.300000011920929},{"T":0.0,"Rb":0.0775000005960464,"Rf":0.0775000005960464,"wavelength":0.305000007152557},{"T":0.0,"Rb":0.0753000006079674,"Rf":0.0753000006079674,"wavelength":0.310000002384186},{"T":0.0,"Rb":0.0732000023126602,"Rf":0.0732000023126602,"wavelength":0.314999997615814},{"T":0.0,"Rb":0.0715999975800514,"Rf":0.0715999975800514,"wavelength":0.319999992847443},{"T":0.0,"Rb":0.0697999969124794,"Rf":0.0697999969124794,"wavelength":0.324999988079071},{"T":0.0,"Rb":0.0680999979376793,"Rf":0.0680999979376793,"wavelength":0.330000013113022},{"T":0.0,"Rb":0.0665000006556511,"Rf":0.0665000006556511,"wavelength":0.33500000834465},{"T":0.0,"Rb":0.0653000026941299,"Rf":0.0653000026941299,"wavelength":0.340000003576279},{"T":0.0,"Rb":0.064800001680851,"Rf":0.064800001680851,"wavelength":0.344999998807907},{"T":0.0,"Rb":0.064300000667572,"Rf":0.064300000667572,"wavelength":0.349999994039536},{"T":0.0,"Rb":0.0640000030398369,"Rf":0.0640000030398369,"wavelength":0.354999989271164},{"T":0.0,"Rb":0.063900001347065,"Rf":0.063900001347065,"wavelength":0.360000014305115},{"T":0.0,"Rb":0.0637999996542931,"Rf":0.0637999996542931,"wavelength":0.365000009536743},{"T":0.0,"Rb":0.0644000023603439,"Rf":0.0644000023603439,"wavelength":0.370000004768372},{"T":0.0,"Rb":0.065200001001358,"Rf":0.065200001001358,"wavelength":0.375},{"T":0.0,"Rb":0.065700002014637,"Rf":0.065700002014637,"wavelength":0.379999995231628},{"T":0.0,"Rb":0.0666999965906143,"Rf":0.0666999965906143,"wavelength":0.384999990463257},{"T":0.0,"Rb":0.0676999986171722,"Rf":0.0676999986171722,"wavelength":0.389999985694885},{"T":0.0,"Rb":0.0687000006437302,"Rf":0.0687000006437302,"wavelength":0.395000010728836},{"T":0.0,"Rb":0.0692000016570091,"Rf":0.0692000016570091,"wavelength":0.400000005960464},{"T":0.0,"Rb":0.0690999999642372,"Rf":0.0690999999642372,"wavelength":0.405000001192093},{"T":0.0,"Rb":0.0690999999642372,"Rf":0.0690999999642372,"wavelength":0.409999996423721},{"T":0.0,"Rb":0.0689999982714653,"Rf":0.0689999982714653,"wavelength":0.41499999165535},{"T":0.0,"Rb":0.0689999982714653,"Rf":0.0689999982714653,"wavelength":0.419999986886978},{"T":0.0,"Rb":0.0690999999642372,"Rf":0.0690999999642372,"wavelength":0.425000011920929},{"T":0.0,"Rb":0.0697000026702881,"Rf":0.0697000026702881,"wavelength":0.430000007152557},{"T":0.0,"Rb":0.0703999996185303,"Rf":0.0703999996185303,"wavelength":0.435000002384186},{"T":0.0,"Rb":0.0710999965667725,"Rf":0.0710999965667725,"wavelength":0.439999997615814},{"T":0.0,"Rb":0.0718000009655952,"Rf":0.0718000009655952,"wavelength":0.444999992847443},{"T":0.0,"Rb":0.0719999969005585,"Rf":0.0719999969005585,"wavelength":0.449999988079071},{"T":0.0,"Rb":0.0716999992728233,"Rf":0.0716999992728233,"wavelength":0.455000013113022},{"T":0.0,"Rb":0.0714000016450882,"Rf":0.0714000016450882,"wavelength":0.46000000834465},{"T":0.0,"Rb":0.0712999999523163,"Rf":0.0712999999523163,"wavelength":0.465000003576279},{"T":0.0,"Rb":0.0710000023245811,"Rf":0.0710000023245811,"wavelength":0.469999998807907},{"T":0.0,"Rb":0.0709000006318092,"Rf":0.0709000006318092,"wavelength":0.474999994039536},{"T":0.0,"Rb":0.0709000006318092,"Rf":0.0709000006318092,"wavelength":0.479999989271164},{"T":0.0,"Rb":0.0710000023245811,"Rf":0.0710000023245811,"wavelength":0.485000014305115},{"T":0.0,"Rb":0.0712999999523163,"Rf":0.0712999999523163,"wavelength":0.490000009536743},{"T":0.0,"Rb":0.0716999992728233,"Rf":0.0716999992728233,"wavelength":0.495000004768372},{"T":0.0,"Rb":0.0724000036716461,"Rf":0.0724000036716461,"wavelength":0.5},{"T":0.0,"Rb":0.0731000006198883,"Rf":0.0731000006198883,"wavelength":0.504999995231628},{"T":0.0,"Rb":0.0738999992609024,"Rf":0.0738999992609024,"wavelength":0.509999990463257},{"T":0.0,"Rb":0.0750999972224236,"Rf":0.0750999972224236,"wavelength":0.514999985694885},{"T":0.0,"Rb":0.0759999975562096,"Rf":0.0759999975562096,"wavelength":0.519999980926514},{"T":0.0,"Rb":0.0769999995827675,"Rf":0.0769999995827675,"wavelength":0.524999976158142},{"T":0.0,"Rb":0.0781000033020973,"Rf":0.0781000033020973,"wavelength":0.529999971389771},{"T":0.0,"Rb":0.0790000036358833,"Rf":0.0790000036358833,"wavelength":0.535000026226044},{"T":0.0,"Rb":0.0798000022768974,"Rf":0.0798000022768974,"wavelength":0.540000021457672},{"T":0.0,"Rb":0.0804999992251396,"Rf":0.0804999992251396,"wavelength":0.545000016689301},{"T":0.0,"Rb":0.0812000036239624,"Rf":0.0812000036239624,"wavelength":0.550000011920929},{"T":0.0,"Rb":0.0820000022649765,"Rf":0.0820000022649765,"wavelength":0.555000007152557},{"T":0.0,"Rb":0.0828000009059906,"Rf":0.0828000009059906,"wavelength":0.560000002384186},{"T":0.0,"Rb":0.0838000029325485,"Rf":0.0838000029325485,"wavelength":0.564999997615814},{"T":0.0,"Rb":0.0846000015735626,"Rf":0.0846000015735626,"wavelength":0.569999992847443},{"T":0.0,"Rb":0.0856999978423119,"Rf":0.0856999978423119,"wavelength":0.574999988079071},{"T":0.0,"Rb":0.0866999998688698,"Rf":0.0866999998688698,"wavelength":0.579999983310699},{"T":0.0,"Rb":0.0874999985098839,"Rf":0.0874999985098839,"wavelength":0.584999978542328},{"T":0.0,"Rb":0.0878999978303909,"Rf":0.0878999978303909,"wavelength":0.589999973773956},{"T":0.0,"Rb":0.0885000005364418,"Rf":0.0885000005364418,"wavelength":0.595000028610229},{"T":0.0,"Rb":0.088699996471405,"Rf":0.088699996471405,"wavelength":0.600000023841858},{"T":0.0,"Rb":0.088699996471405,"Rf":0.088699996471405,"wavelength":0.605000019073486},{"T":0.0,"Rb":0.0885000005364418,"Rf":0.0885000005364418,"wavelength":0.610000014305115},{"T":0.0,"Rb":0.0883999988436699,"Rf":0.0883999988436699,"wavelength":0.615000009536743},{"T":0.0,"Rb":0.0882000029087067,"Rf":0.0882000029087067,"wavelength":0.620000004768372},{"T":0.0,"Rb":0.0878999978303909,"Rf":0.0878999978303909,"wavelength":0.625},{"T":0.0,"Rb":0.0876000002026558,"Rf":0.0876000002026558,"wavelength":0.629999995231628},{"T":0.0,"Rb":0.087399996817112,"Rf":0.087399996817112,"wavelength":0.634999990463257},{"T":0.0,"Rb":0.0869999974966049,"Rf":0.0869999974966049,"wavelength":0.639999985694885},{"T":0.0,"Rb":0.0868000015616417,"Rf":0.0868000015616417,"wavelength":0.644999980926514},{"T":0.0,"Rb":0.0865999981760979,"Rf":0.0865999981760979,"wavelength":0.649999976158142},{"T":0.0,"Rb":0.0864000022411346,"Rf":0.0864000022411346,"wavelength":0.654999971389771},{"T":0.0,"Rb":0.0860999971628189,"Rf":0.0860999971628189,"wavelength":0.660000026226044},{"T":0.0,"Rb":0.0860000029206276,"Rf":0.0860000029206276,"wavelength":0.665000021457672},{"T":0.0,"Rb":0.0857999995350838,"Rf":0.0857999995350838,"wavelength":0.670000016689301},{"T":0.0,"Rb":0.0855000019073486,"Rf":0.0855000019073486,"wavelength":0.675000011920929},{"T":0.0,"Rb":0.0851999968290329,"Rf":0.0851999968290329,"wavelength":0.680000007152557},{"T":0.0,"Rb":0.0852999985218048,"Rf":0.0852999985218048,"wavelength":0.685000002384186},{"T":0.0,"Rb":0.0851000025868416,"Rf":0.0851000025868416,"wavelength":0.689999997615814},{"T":0.0,"Rb":0.0851000025868416,"Rf":0.0851000025868416,"wavelength":0.694999992847443},{"T":0.0,"Rb":0.0847000032663345,"Rf":0.0847000032663345,"wavelength":0.699999988079071},{"T":0.0,"Rb":0.0844999998807907,"Rf":0.0844999998807907,"wavelength":0.704999983310699},{"T":0.0,"Rb":0.0843999981880188,"Rf":0.0843999981880188,"wavelength":0.709999978542328},{"T":0.0,"Rb":0.0842000022530556,"Rf":0.0842000022530556,"wavelength":0.714999973773956},{"T":0.0,"Rb":0.0842999964952469,"Rf":0.0842999964952469,"wavelength":0.720000028610229},{"T":0.0,"Rb":0.0838999971747398,"Rf":0.0838999971747398,"wavelength":0.725000023841858},{"T":0.0,"Rb":0.0838999971747398,"Rf":0.0838999971747398,"wavelength":0.730000019073486},{"T":0.0,"Rb":0.0837000012397766,"Rf":0.0837000012397766,"wavelength":0.735000014305115},{"T":0.0,"Rb":0.0834999978542328,"Rf":0.0834999978542328,"wavelength":0.740000009536743},{"T":0.0,"Rb":0.0833000019192696,"Rf":0.0833000019192696,"wavelength":0.745000004768372},{"T":0.0,"Rb":0.0829999968409538,"Rf":0.0829999968409538,"wavelength":0.75},{"T":0.0,"Rb":0.0826999992132187,"Rf":0.0826999992132187,"wavelength":0.754999995231628},{"T":0.0,"Rb":0.0825999975204468,"Rf":0.0825999975204468,"wavelength":0.759999990463257},{"T":0.0,"Rb":0.0824000015854836,"Rf":0.0824000015854836,"wavelength":0.764999985694885},{"T":0.0,"Rb":0.0820000022649765,"Rf":0.0820000022649765,"wavelength":0.769999980926514},{"T":0.0,"Rb":0.0820000022649765,"Rf":0.0820000022649765,"wavelength":0.774999976158142},{"T":0.0,"Rb":0.0816999971866608,"Rf":0.0816999971866608,"wavelength":0.779999971389771},{"T":0.0,"Rb":0.0813999995589256,"Rf":0.0813999995589256,"wavelength":0.785000026226044},{"T":0.0,"Rb":0.0812999978661537,"Rf":0.0812999978661537,"wavelength":0.790000021457672},{"T":0.0,"Rb":0.0811000019311905,"Rf":0.0811000019311905,"wavelength":0.795000016689301},{"T":0.0,"Rb":0.0810000002384186,"Rf":0.0810000002384186,"wavelength":0.800000011920929},{"T":0.0,"Rb":0.0806000009179115,"Rf":0.0806000009179115,"wavelength":0.805000007152557},{"T":0.0,"Rb":0.0803999975323677,"Rf":0.0803999975323677,"wavelength":0.810000002384186},{"T":0.0,"Rb":0.0803000032901764,"Rf":0.0803000032901764,"wavelength":0.814999997615814},{"T":0.0,"Rb":0.0798999965190887,"Rf":0.0798999965190887,"wavelength":0.819999992847443},{"T":0.0,"Rb":0.0797000005841255,"Rf":0.0797000005841255,"wavelength":0.824999988079071},{"T":0.0,"Rb":0.0794999971985817,"Rf":0.0794999971985817,"wavelength":0.829999983310699},{"T":0.0,"Rb":0.0794000029563904,"Rf":0.0794000029563904,"wavelength":0.834999978542328},{"T":0.0,"Rb":0.0790999978780746,"Rf":0.0790999978780746,"wavelength":0.839999973773956},{"T":0.0,"Rb":0.0790000036358833,"Rf":0.0790000036358833,"wavelength":0.845000028610229},{"T":0.0,"Rb":0.0788000002503395,"Rf":0.0788000002503395,"wavelength":0.850000023841858},{"T":0.0,"Rb":0.0788000002503395,"Rf":0.0788000002503395,"wavelength":0.855000019073486},{"T":0.0,"Rb":0.0888999998569489,"Rf":0.0888999998569489,"wavelength":0.860000014305115},{"T":0.0,"Rb":0.0819000005722046,"Rf":0.0819000005722046,"wavelength":0.865000009536743},{"T":0.0,"Rb":0.0821999981999397,"Rf":0.0821999981999397,"wavelength":0.870000004768372},{"T":0.0,"Rb":0.0786999985575676,"Rf":0.0786999985575676,"wavelength":0.875},{"T":0.0,"Rb":0.0821999981999397,"Rf":0.0821999981999397,"wavelength":0.879999995231628},{"T":0.0,"Rb":0.0812000036239624,"Rf":0.0812000036239624,"wavelength":0.884999990463257},{"T":0.0,"Rb":0.0788000002503395,"Rf":0.0788000002503395,"wavelength":0.889999985694885},{"T":0.0,"Rb":0.0768999978899956,"Rf":0.0768999978899956,"wavelength":0.894999980926514},{"T":0.0,"Rb":0.0806000009179115,"Rf":0.0806000009179115,"wavelength":0.899999976158142},{"T":0.0,"Rb":0.0798999965190887,"Rf":0.0798999965190887,"wavelength":0.904999971389771},{"T":0.0,"Rb":0.0785000026226044,"Rf":0.0785000026226044,"wavelength":0.910000026226044},{"T":0.0,"Rb":0.0777999982237816,"Rf":0.0777999982237816,"wavelength":0.915000021457672},{"T":0.0,"Rb":0.0803999975323677,"Rf":0.0803999975323677,"wavelength":0.920000016689301},{"T":0.0,"Rb":0.0781000033020973,"Rf":0.0781000033020973,"wavelength":0.925000011920929},{"T":0.0,"Rb":0.0793000012636185,"Rf":0.0793000012636185,"wavelength":0.930000007152557},{"T":0.0,"Rb":0.0775000005960464,"Rf":0.0775000005960464,"wavelength":0.935000002384186},{"T":0.0,"Rb":0.0775000005960464,"Rf":0.0775000005960464,"wavelength":0.939999997615814},{"T":0.0,"Rb":0.0798999965190887,"Rf":0.0798999965190887,"wavelength":0.944999992847443},{"T":0.0,"Rb":0.0758000016212463,"Rf":0.0758000016212463,"wavelength":0.949999988079071},{"T":0.0,"Rb":0.0789000019431114,"Rf":0.0789000019431114,"wavelength":0.954999983310699},{"T":0.0,"Rb":0.0758000016212463,"Rf":0.0758000016212463,"wavelength":0.959999978542328},{"T":0.0,"Rb":0.0778999999165535,"Rf":0.0778999999165535,"wavelength":0.964999973773956},{"T":0.0,"Rb":0.0781999975442886,"Rf":0.0781999975442886,"wavelength":0.970000028610229},{"T":0.0,"Rb":0.0771000012755394,"Rf":0.0771000012755394,"wavelength":0.975000023841858},{"T":0.0,"Rb":0.0771000012755394,"Rf":0.0771000012755394,"wavelength":0.980000019073486},{"T":0.0,"Rb":0.0798999965190887,"Rf":0.0798999965190887,"wavelength":0.985000014305115},{"T":0.0,"Rb":0.0763000026345253,"Rf":0.0763000026345253,"wavelength":0.990000009536743},{"T":0.0,"Rb":0.0778999999165535,"Rf":0.0778999999165535,"wavelength":0.995000004768372},{"T":0.0,"Rb":0.0754000023007393,"Rf":0.0754000023007393,"wavelength":1.0},{"T":0.0,"Rb":0.0777999982237816,"Rf":0.0777999982237816,"wavelength":1.00499999523163},{"T":0.0,"Rb":0.0755999982357025,"Rf":0.0755999982357025,"wavelength":1.00999999046326},{"T":0.0,"Rb":0.0762000009417534,"Rf":0.0762000009417534,"wavelength":1.01499998569489},{"T":0.0,"Rb":0.0764999985694885,"Rf":0.0764999985694885,"wavelength":1.01999998092651},{"T":0.0,"Rb":0.0767000019550323,"Rf":0.0767000019550323,"wavelength":1.02499997615814},{"T":0.0,"Rb":0.0756999999284744,"Rf":0.0756999999284744,"wavelength":1.02999997138977},{"T":0.0,"Rb":0.0758000016212463,"Rf":0.0758000016212463,"wavelength":1.0349999666214},{"T":0.0,"Rb":0.0777999982237816,"Rf":0.0777999982237816,"wavelength":1.03999996185303},{"T":0.0,"Rb":0.0768000036478043,"Rf":0.0768000036478043,"wavelength":1.04499995708466},{"T":0.0,"Rb":0.0777999982237816,"Rf":0.0777999982237816,"wavelength":1.04999995231628},{"T":0.0,"Rb":0.0754999965429306,"Rf":0.0754999965429306,"wavelength":1.05499994754791},{"T":0.0,"Rb":0.0762000009417534,"Rf":0.0762000009417534,"wavelength":1.05999994277954},{"T":0.0,"Rb":0.0776999965310097,"Rf":0.0776999965310097,"wavelength":1.06500005722046},{"T":0.0,"Rb":0.0755999982357025,"Rf":0.0755999982357025,"wavelength":1.07000005245209},{"T":0.0,"Rb":0.0754000023007393,"Rf":0.0754000023007393,"wavelength":1.07500004768372},{"T":0.0,"Rb":0.0750000029802322,"Rf":0.0750000029802322,"wavelength":1.08000004291534},{"T":0.0,"Rb":0.0763000026345253,"Rf":0.0763000026345253,"wavelength":1.08500003814697},{"T":0.0,"Rb":0.0754000023007393,"Rf":0.0754000023007393,"wavelength":1.0900000333786},{"T":0.0,"Rb":0.0754000023007393,"Rf":0.0754000023007393,"wavelength":1.09500002861023},{"T":0.0,"Rb":0.0740000009536743,"Rf":0.0740000009536743,"wavelength":1.10000002384186},{"T":0.0,"Rb":0.0750000029802322,"Rf":0.0750000029802322,"wavelength":1.10500001907349},{"T":0.0,"Rb":0.0754999965429306,"Rf":0.0754999965429306,"wavelength":1.11000001430511},{"T":0.0,"Rb":0.0753000006079674,"Rf":0.0753000006079674,"wavelength":1.11500000953674},{"T":0.0,"Rb":0.0746000036597252,"Rf":0.0746000036597252,"wavelength":1.12000000476837},{"T":0.0,"Rb":0.0751999989151955,"Rf":0.0751999989151955,"wavelength":1.125},{"T":0.0,"Rb":0.0754999965429306,"Rf":0.0754999965429306,"wavelength":1.12999999523163},{"T":0.0,"Rb":0.0750999972224236,"Rf":0.0750999972224236,"wavelength":1.13499999046326},{"T":0.0,"Rb":0.0750000029802322,"Rf":0.0750000029802322,"wavelength":1.13999998569489},{"T":0.0,"Rb":0.0741999968886375,"Rf":0.0741999968886375,"wavelength":1.14499998092651},{"T":0.0,"Rb":0.0750000029802322,"Rf":0.0750000029802322,"wavelength":1.14999997615814},{"T":0.0,"Rb":0.0747999995946884,"Rf":0.0747999995946884,"wavelength":1.15499997138977},{"T":0.0,"Rb":0.0741999968886375,"Rf":0.0741999968886375,"wavelength":1.1599999666214},{"T":0.0,"Rb":0.0744000002741814,"Rf":0.0744000002741814,"wavelength":1.16499996185303},{"T":0.0,"Rb":0.0747999995946884,"Rf":0.0747999995946884,"wavelength":1.16999995708466},{"T":0.0,"Rb":0.0746000036597252,"Rf":0.0746000036597252,"wavelength":1.17499995231628},{"T":0.0,"Rb":0.0737999975681305,"Rf":0.0737999975681305,"wavelength":1.17999994754791},{"T":0.0,"Rb":0.0747999995946884,"Rf":0.0747999995946884,"wavelength":1.18499994277954},{"T":0.0,"Rb":0.0745000019669533,"Rf":0.0745000019669533,"wavelength":1.19000005722046},{"T":0.0,"Rb":0.0741999968886375,"Rf":0.0741999968886375,"wavelength":1.19500005245209},{"T":0.0,"Rb":0.0751999989151955,"Rf":0.0751999989151955,"wavelength":1.20000004768372},{"T":0.0,"Rb":0.0751999989151955,"Rf":0.0751999989151955,"wavelength":1.20500004291534},{"T":0.0,"Rb":0.0732999965548515,"Rf":0.0732999965548515,"wavelength":1.21000003814697},{"T":0.0,"Rb":0.0741000026464462,"Rf":0.0741000026464462,"wavelength":1.2150000333786},{"T":0.0,"Rb":0.0736000016331673,"Rf":0.0736000016331673,"wavelength":1.22000002861023},{"T":0.0,"Rb":0.0734999999403954,"Rf":0.0734999999403954,"wavelength":1.22500002384186},{"T":0.0,"Rb":0.0734999999403954,"Rf":0.0734999999403954,"wavelength":1.23000001907349},{"T":0.0,"Rb":0.0732999965548515,"Rf":0.0732999965548515,"wavelength":1.23500001430511},{"T":0.0,"Rb":0.0747999995946884,"Rf":0.0747999995946884,"wavelength":1.24000000953674},{"T":0.0,"Rb":0.0734999999403954,"Rf":0.0734999999403954,"wavelength":1.24500000476837},{"T":0.0,"Rb":0.0745000019669533,"Rf":0.0745000019669533,"wavelength":1.25},{"T":0.0,"Rb":0.0733999982476234,"Rf":0.0733999982476234,"wavelength":1.25499999523163},{"T":0.0,"Rb":0.0741000026464462,"Rf":0.0741000026464462,"wavelength":1.25999999046326},{"T":0.0,"Rb":0.0733999982476234,"Rf":0.0733999982476234,"wavelength":1.26499998569489},{"T":0.0,"Rb":0.0731000006198883,"Rf":0.0731000006198883,"wavelength":1.26999998092651},{"T":0.0,"Rb":0.0741999968886375,"Rf":0.0741999968886375,"wavelength":1.27499997615814},{"T":0.0,"Rb":0.0728999972343445,"Rf":0.0728999972343445,"wavelength":1.27999997138977},{"T":0.0,"Rb":0.0732999965548515,"Rf":0.0732999965548515,"wavelength":1.2849999666214},{"T":0.0,"Rb":0.0729999989271164,"Rf":0.0729999989271164,"wavelength":1.28999996185303},{"T":0.0,"Rb":0.0728000029921532,"Rf":0.0728000029921532,"wavelength":1.29499995708466},{"T":0.0,"Rb":0.0745000019669533,"Rf":0.0745000019669533,"wavelength":1.29999995231628},{"T":0.0,"Rb":0.0740000009536743,"Rf":0.0740000009536743,"wavelength":1.30499994754791},{"T":0.0,"Rb":0.0728999972343445,"Rf":0.0728999972343445,"wavelength":1.30999994277954},{"T":0.0,"Rb":0.0731000006198883,"Rf":0.0731000006198883,"wavelength":1.31500005722046},{"T":0.0,"Rb":0.0732000023126602,"Rf":0.0732000023126602,"wavelength":1.32000005245209},{"T":0.0,"Rb":0.0727000012993813,"Rf":0.0727000012993813,"wavelength":1.32500004768372},{"T":0.0,"Rb":0.0719999969005585,"Rf":0.0719999969005585,"wavelength":1.33000004291534},{"T":0.0,"Rb":0.0723000019788742,"Rf":0.0723000019788742,"wavelength":1.33500003814697},{"T":0.0,"Rb":0.0729999989271164,"Rf":0.0729999989271164,"wavelength":1.3400000333786},{"T":0.0,"Rb":0.0727000012993813,"Rf":0.0727000012993813,"wavelength":1.34500002861023},{"T":0.0,"Rb":0.0719999969005585,"Rf":0.0719999969005585,"wavelength":1.35000002384186},{"T":0.0,"Rb":0.0724000036716461,"Rf":0.0724000036716461,"wavelength":1.35500001907349},{"T":0.0,"Rb":0.0728000029921532,"Rf":0.0728000029921532,"wavelength":1.36000001430511},{"T":0.0,"Rb":0.0732000023126602,"Rf":0.0732000023126602,"wavelength":1.36500000953674},{"T":0.0,"Rb":0.0718000009655952,"Rf":0.0718000009655952,"wavelength":1.37000000476837},{"T":0.0,"Rb":0.0732999965548515,"Rf":0.0732999965548515,"wavelength":1.375},{"T":0.0,"Rb":0.0734999999403954,"Rf":0.0734999999403954,"wavelength":1.37999999523163},{"T":0.0,"Rb":0.0719999969005585,"Rf":0.0719999969005585,"wavelength":1.38499999046326},{"T":0.0,"Rb":0.0723000019788742,"Rf":0.0723000019788742,"wavelength":1.38999998569489},{"T":0.0,"Rb":0.0719000026583672,"Rf":0.0719000026583672,"wavelength":1.39499998092651},{"T":0.0,"Rb":0.0737000033259392,"Rf":0.0737000033259392,"wavelength":1.39999997615814},{"T":0.0,"Rb":0.0740000009536743,"Rf":0.0740000009536743,"wavelength":1.40499997138977},{"T":0.0,"Rb":0.0724999979138374,"Rf":0.0724999979138374,"wavelength":1.4099999666214},{"T":0.0,"Rb":0.0728999972343445,"Rf":0.0728999972343445,"wavelength":1.41499996185303},{"T":0.0,"Rb":0.0737000033259392,"Rf":0.0737000033259392,"wavelength":1.41999995708466},{"T":0.0,"Rb":0.0729999989271164,"Rf":0.0729999989271164,"wavelength":1.42499995231628},{"T":0.0,"Rb":0.0729999989271164,"Rf":0.0729999989271164,"wavelength":1.42999994754791},{"T":0.0,"Rb":0.0728000029921532,"Rf":0.0728000029921532,"wavelength":1.43499994277954},{"T":0.0,"Rb":0.0729999989271164,"Rf":0.0729999989271164,"wavelength":1.44000005722046},{"T":0.0,"Rb":0.0733999982476234,"Rf":0.0733999982476234,"wavelength":1.44500005245209},{"T":0.0,"Rb":0.0731000006198883,"Rf":0.0731000006198883,"wavelength":1.45000004768372},{"T":0.0,"Rb":0.0728999972343445,"Rf":0.0728999972343445,"wavelength":1.45500004291534},{"T":0.0,"Rb":0.0723000019788742,"Rf":0.0723000019788742,"wavelength":1.46000003814697},{"T":0.0,"Rb":0.0709000006318092,"Rf":0.0709000006318092,"wavelength":1.4650000333786},{"T":0.0,"Rb":0.0719000026583672,"Rf":0.0719000026583672,"wavelength":1.47000002861023},{"T":0.0,"Rb":0.0728000029921532,"Rf":0.0728000029921532,"wavelength":1.47500002384186},{"T":0.0,"Rb":0.0731000006198883,"Rf":0.0731000006198883,"wavelength":1.48000001907349},{"T":0.0,"Rb":0.0737000033259392,"Rf":0.0737000033259392,"wavelength":1.48500001430511},{"T":0.0,"Rb":0.0723000019788742,"Rf":0.0723000019788742,"wavelength":1.49000000953674},{"T":0.0,"Rb":0.0728000029921532,"Rf":0.0728000029921532,"wavelength":1.49500000476837},{"T":0.0,"Rb":0.0722000002861023,"Rf":0.0722000002861023,"wavelength":1.5},{"T":0.0,"Rb":0.0720999985933304,"Rf":0.0720999985933304,"wavelength":1.50499999523163},{"T":0.0,"Rb":0.0732000023126602,"Rf":0.0732000023126602,"wavelength":1.50999999046326},{"T":0.0,"Rb":0.0727000012993813,"Rf":0.0727000012993813,"wavelength":1.51499998569489},{"T":0.0,"Rb":0.0728000029921532,"Rf":0.0728000029921532,"wavelength":1.51999998092651},{"T":0.0,"Rb":0.0715999975800514,"Rf":0.0715999975800514,"wavelength":1.52499997615814},{"T":0.0,"Rb":0.0740000009536743,"Rf":0.0740000009536743,"wavelength":1.52999997138977},{"T":0.0,"Rb":0.0733999982476234,"Rf":0.0733999982476234,"wavelength":1.5349999666214},{"T":0.0,"Rb":0.0722000002861023,"Rf":0.0722000002861023,"wavelength":1.53999996185303},{"T":0.0,"Rb":0.0731000006198883,"Rf":0.0731000006198883,"wavelength":1.54499995708466},{"T":0.0,"Rb":0.0731000006198883,"Rf":0.0731000006198883,"wavelength":1.54999995231628},{"T":0.0,"Rb":0.0719000026583672,"Rf":0.0719000026583672,"wavelength":1.55499994754791},{"T":0.0,"Rb":0.0731000006198883,"Rf":0.0731000006198883,"wavelength":1.55999994277954},{"T":0.0,"Rb":0.0750999972224236,"Rf":0.0750999972224236,"wavelength":1.56500005722046},{"T":0.0,"Rb":0.0751999989151955,"Rf":0.0751999989151955,"wavelength":1.57000005245209},{"T":0.0,"Rb":0.0740000009536743,"Rf":0.0740000009536743,"wavelength":1.57500004768372},{"T":0.0,"Rb":0.0746000036597252,"Rf":0.0746000036597252,"wavelength":1.58000004291534},{"T":0.0,"Rb":0.0749000012874603,"Rf":0.0749000012874603,"wavelength":1.58500003814697},{"T":0.0,"Rb":0.0732000023126602,"Rf":0.0732000023126602,"wavelength":1.5900000333786},{"T":0.0,"Rb":0.0724999979138374,"Rf":0.0724999979138374,"wavelength":1.59500002861023},{"T":0.0,"Rb":0.0740000009536743,"Rf":0.0740000009536743,"wavelength":1.60000002384186},{"T":0.0,"Rb":0.0738999992609024,"Rf":0.0738999992609024,"wavelength":1.60500001907349},{"T":0.0,"Rb":0.0737000033259392,"Rf":0.0737000033259392,"wavelength":1.61000001430511},{"T":0.0,"Rb":0.0749000012874603,"Rf":0.0749000012874603,"wavelength":1.61500000953674},{"T":0.0,"Rb":0.0741000026464462,"Rf":0.0741000026464462,"wavelength":1.62000000476837},{"T":0.0,"Rb":0.0736000016331673,"Rf":0.0736000016331673,"wavelength":1.625},{"T":0.0,"Rb":0.0744000002741814,"Rf":0.0744000002741814,"wavelength":1.62999999523163},{"T":0.0,"Rb":0.0751999989151955,"Rf":0.0751999989151955,"wavelength":1.63499999046326},{"T":0.0,"Rb":0.0741999968886375,"Rf":0.0741999968886375,"wavelength":1.63999998569489},{"T":0.0,"Rb":0.0749000012874603,"Rf":0.0749000012874603,"wavelength":1.64499998092651},{"T":0.0,"Rb":0.0734999999403954,"Rf":0.0734999999403954,"wavelength":1.64999997615814},{"T":0.0,"Rb":0.0727000012993813,"Rf":0.0727000012993813,"wavelength":1.65499997138977},{"T":0.0,"Rb":0.0750000029802322,"Rf":0.0750000029802322,"wavelength":1.6599999666214},{"T":0.0,"Rb":0.0750000029802322,"Rf":0.0750000029802322,"wavelength":1.66499996185303},{"T":0.0,"Rb":0.0740000009536743,"Rf":0.0740000009536743,"wavelength":1.66999995708466},{"T":0.0,"Rb":0.0762000009417534,"Rf":0.0762000009417534,"wavelength":1.67499995231628},{"T":0.0,"Rb":0.0767000019550323,"Rf":0.0767000019550323,"wavelength":1.67999994754791},{"T":0.0,"Rb":0.0746000036597252,"Rf":0.0746000036597252,"wavelength":1.68499994277954},{"T":0.0,"Rb":0.0768000036478043,"Rf":0.0768000036478043,"wavelength":1.69000005722046},{"T":0.0,"Rb":0.0753000006079674,"Rf":0.0753000006079674,"wavelength":1.69500005245209},{"T":0.0,"Rb":0.0741000026464462,"Rf":0.0741000026464462,"wavelength":1.70000004768372},{"T":0.0,"Rb":0.0755999982357025,"Rf":0.0755999982357025,"wavelength":1.70500004291534},{"T":0.0,"Rb":0.0794999971985817,"Rf":0.0794999971985817,"wavelength":1.71000003814697},{"T":0.0,"Rb":0.0795999988913536,"Rf":0.0795999988913536,"wavelength":1.7150000333786},{"T":0.0,"Rb":0.0750999972224236,"Rf":0.0750999972224236,"wavelength":1.72000002861023},{"T":0.0,"Rb":0.0747999995946884,"Rf":0.0747999995946884,"wavelength":1.72500002384186},{"T":0.0,"Rb":0.0753000006079674,"Rf":0.0753000006079674,"wavelength":1.73000001907349},{"T":0.0,"Rb":0.0771000012755394,"Rf":0.0771000012755394,"wavelength":1.73500001430511},{"T":0.0,"Rb":0.0772000029683113,"Rf":0.0772000029683113,"wavelength":1.74000000953674},{"T":0.0,"Rb":0.0768999978899956,"Rf":0.0768999978899956,"wavelength":1.74500000476837},{"T":0.0,"Rb":0.0751999989151955,"Rf":0.0751999989151955,"wavelength":1.75},{"T":0.0,"Rb":0.0741999968886375,"Rf":0.0741999968886375,"wavelength":1.75499999523163},{"T":0.0,"Rb":0.0763999968767166,"Rf":0.0763999968767166,"wavelength":1.75999999046326},{"T":0.0,"Rb":0.0767000019550323,"Rf":0.0767000019550323,"wavelength":1.76499998569489},{"T":0.0,"Rb":0.0784000009298325,"Rf":0.0784000009298325,"wavelength":1.76999998092651},{"T":0.0,"Rb":0.0777999982237816,"Rf":0.0777999982237816,"wavelength":1.77499997615814},{"T":0.0,"Rb":0.0755999982357025,"Rf":0.0755999982357025,"wavelength":1.77999997138977},{"T":0.0,"Rb":0.0754000023007393,"Rf":0.0754000023007393,"wavelength":1.7849999666214},{"T":0.0,"Rb":0.0775000005960464,"Rf":0.0775000005960464,"wavelength":1.78999996185303},{"T":0.0,"Rb":0.0790000036358833,"Rf":0.0790000036358833,"wavelength":1.79499995708466},{"T":0.0,"Rb":0.0780000016093254,"Rf":0.0780000016093254,"wavelength":1.79999995231628},{"T":0.0,"Rb":0.0777999982237816,"Rf":0.0777999982237816,"wavelength":1.80499994754791},{"T":0.0,"Rb":0.0780000016093254,"Rf":0.0780000016093254,"wavelength":1.80999994277954},{"T":0.0,"Rb":0.0784000009298325,"Rf":0.0784000009298325,"wavelength":1.81500005722046},{"T":0.0,"Rb":0.0785999968647957,"Rf":0.0785999968647957,"wavelength":1.82000005245209},{"T":0.0,"Rb":0.0776000022888184,"Rf":0.0776000022888184,"wavelength":1.82500004768372},{"T":0.0,"Rb":0.0777999982237816,"Rf":0.0777999982237816,"wavelength":1.83000004291534},{"T":0.0,"Rb":0.0812000036239624,"Rf":0.0812000036239624,"wavelength":1.83500003814697},{"T":0.0,"Rb":0.0798999965190887,"Rf":0.0798999965190887,"wavelength":1.8400000333786},{"T":0.0,"Rb":0.0800999999046326,"Rf":0.0800999999046326,"wavelength":1.84500002861023},{"T":0.0,"Rb":0.0786999985575676,"Rf":0.0786999985575676,"wavelength":1.85000002384186},{"T":0.0,"Rb":0.0807000026106834,"Rf":0.0807000026106834,"wavelength":1.85500001907349},{"T":0.0,"Rb":0.0810000002384186,"Rf":0.0810000002384186,"wavelength":1.86000001430511},{"T":0.0,"Rb":0.0795999988913536,"Rf":0.0795999988913536,"wavelength":1.86500000953674},{"T":0.0,"Rb":0.0802000015974045,"Rf":0.0802000015974045,"wavelength":1.87000000476837},{"T":0.0,"Rb":0.0803999975323677,"Rf":0.0803999975323677,"wavelength":1.875},{"T":0.0,"Rb":0.0842999964952469,"Rf":0.0842999964952469,"wavelength":1.87999999523163},{"T":0.0,"Rb":0.0829000025987625,"Rf":0.0829000025987625,"wavelength":1.88499999046326},{"T":0.0,"Rb":0.0793000012636185,"Rf":0.0793000012636185,"wavelength":1.88999998569489},{"T":0.0,"Rb":0.0834000036120415,"Rf":0.0834000036120415,"wavelength":1.89499998092651},{"T":0.0,"Rb":0.0846000015735626,"Rf":0.0846000015735626,"wavelength":1.89999997615814},{"T":0.0,"Rb":0.0807999968528748,"Rf":0.0807999968528748,"wavelength":1.90499997138977},{"T":0.0,"Rb":0.0817999988794327,"Rf":0.0817999988794327,"wavelength":1.9099999666214},{"T":0.0,"Rb":0.0832000002264977,"Rf":0.0832000002264977,"wavelength":1.91499996185303},{"T":0.0,"Rb":0.0825999975204468,"Rf":0.0825999975204468,"wavelength":1.91999995708466},{"T":0.0,"Rb":0.0855000019073486,"Rf":0.0855000019073486,"wavelength":1.92499995231628},{"T":0.0,"Rb":0.0847000032663345,"Rf":0.0847000032663345,"wavelength":1.92999994754791},{"T":0.0,"Rb":0.0868000015616417,"Rf":0.0868000015616417,"wavelength":1.93499994277954},{"T":0.0,"Rb":0.0832000002264977,"Rf":0.0832000002264977,"wavelength":1.94000005722046},{"T":0.0,"Rb":0.0816000029444695,"Rf":0.0816000029444695,"wavelength":1.94500005245209},{"T":0.0,"Rb":0.0829999968409538,"Rf":0.0829999968409538,"wavelength":1.95000004768372},{"T":0.0,"Rb":0.0835999995470047,"Rf":0.0835999995470047,"wavelength":1.95500004291534},{"T":0.0,"Rb":0.0835999995470047,"Rf":0.0835999995470047,"wavelength":1.96000003814697},{"T":0.0,"Rb":0.0848999992012978,"Rf":0.0848999992012978,"wavelength":1.9650000333786},{"T":0.0,"Rb":0.0842000022530556,"Rf":0.0842000022530556,"wavelength":1.97000002861023},{"T":0.0,"Rb":0.0828000009059906,"Rf":0.0828000009059906,"wavelength":1.97500002384186},{"T":0.0,"Rb":0.0835999995470047,"Rf":0.0835999995470047,"wavelength":1.98000001907349},{"T":0.0,"Rb":0.0852999985218048,"Rf":0.0852999985218048,"wavelength":1.98500001430511},{"T":0.0,"Rb":0.0848999992012978,"Rf":0.0848999992012978,"wavelength":1.99000000953674},{"T":0.0,"Rb":0.0860999971628189,"Rf":0.0860999971628189,"wavelength":1.99500000476837},{"T":0.0,"Rb":0.0855000019073486,"Rf":0.0855000019073486,"wavelength":2.0},{"T":0.0,"Rb":0.0856000036001205,"Rf":0.0856000036001205,"wavelength":2.00500011444092},{"T":0.0,"Rb":0.0881000012159348,"Rf":0.0881000012159348,"wavelength":2.00999999046326},{"T":0.0,"Rb":0.0842999964952469,"Rf":0.0842999964952469,"wavelength":2.01500010490417},{"T":0.0,"Rb":0.0873000025749207,"Rf":0.0873000025749207,"wavelength":2.01999998092651},{"T":0.0,"Rb":0.0888999998569489,"Rf":0.0888999998569489,"wavelength":2.02500009536743},{"T":0.0,"Rb":0.090599998831749,"Rf":0.090599998831749,"wavelength":2.02999997138977},{"T":0.0,"Rb":0.0904999971389771,"Rf":0.0904999971389771,"wavelength":2.03500008583069},{"T":0.0,"Rb":0.0873000025749207,"Rf":0.0873000025749207,"wavelength":2.03999996185303},{"T":0.0,"Rb":0.0881000012159348,"Rf":0.0881000012159348,"wavelength":2.04500007629395},{"T":0.0,"Rb":0.0917999967932701,"Rf":0.0917999967932701,"wavelength":2.04999995231628},{"T":0.0,"Rb":0.089599996805191,"Rf":0.089599996805191,"wavelength":2.0550000667572},{"T":0.0,"Rb":0.0900000035762787,"Rf":0.0900000035762787,"wavelength":2.05999994277954},{"T":0.0,"Rb":0.095100000500679,"Rf":0.095100000500679,"wavelength":2.06500005722046},{"T":0.0,"Rb":0.0895000025629997,"Rf":0.0895000025629997,"wavelength":2.0699999332428},{"T":0.0,"Rb":0.0868000015616417,"Rf":0.0868000015616417,"wavelength":2.07500004768372},{"T":0.0,"Rb":0.093800000846386,"Rf":0.093800000846386,"wavelength":2.07999992370605},{"T":0.0,"Rb":0.092799998819828,"Rf":0.092799998819828,"wavelength":2.08500003814697},{"T":0.0,"Rb":0.0945999994874001,"Rf":0.0945999994874001,"wavelength":2.08999991416931},{"T":0.0,"Rb":0.0954999998211861,"Rf":0.0954999998211861,"wavelength":2.09500002861023},{"T":0.0,"Rb":0.0961999967694283,"Rf":0.0961999967694283,"wavelength":2.09999990463257},{"T":0.0,"Rb":0.0967999994754791,"Rf":0.0967999994754791,"wavelength":2.10500001907349},{"T":0.0,"Rb":0.0966000035405159,"Rf":0.0966000035405159,"wavelength":2.10999989509583},{"T":0.0,"Rb":0.0966000035405159,"Rf":0.0966000035405159,"wavelength":2.11500000953674},{"T":0.0,"Rb":0.0920000001788139,"Rf":0.0920000001788139,"wavelength":2.11999988555908},{"T":0.0,"Rb":0.0934000015258789,"Rf":0.0934000015258789,"wavelength":2.125},{"T":0.0,"Rb":0.0954999998211861,"Rf":0.0954999998211861,"wavelength":2.13000011444092},{"T":0.0,"Rb":0.0939000025391579,"Rf":0.0939000025391579,"wavelength":2.13499999046326},{"T":0.0,"Rb":0.096000000834465,"Rf":0.096000000834465,"wavelength":2.14000010490417},{"T":0.0,"Rb":0.0899000018835068,"Rf":0.0899000018835068,"wavelength":2.14499998092651},{"T":0.0,"Rb":0.0966999977827072,"Rf":0.0966999977827072,"wavelength":2.15000009536743},{"T":0.0,"Rb":0.0948999971151352,"Rf":0.0948999971151352,"wavelength":2.15499997138977},{"T":0.0,"Rb":0.094200000166893,"Rf":0.094200000166893,"wavelength":2.16000008583069},{"T":0.0,"Rb":0.0898000001907349,"Rf":0.0898000001907349,"wavelength":2.16499996185303},{"T":0.0,"Rb":0.100599996745586,"Rf":0.100599996745586,"wavelength":2.17000007629395},{"T":0.0,"Rb":0.0913999974727631,"Rf":0.0913999974727631,"wavelength":2.17499995231628},{"T":0.0,"Rb":0.101000003516674,"Rf":0.101000003516674,"wavelength":2.1800000667572},{"T":0.0,"Rb":0.0964000001549721,"Rf":0.0964000001549721,"wavelength":2.18499994277954},{"T":0.0,"Rb":0.0992999970912933,"Rf":0.0992999970912933,"wavelength":2.19000005722046},{"T":0.0,"Rb":0.0975999981164932,"Rf":0.0975999981164932,"wavelength":2.1949999332428},{"T":0.0,"Rb":0.100000001490116,"Rf":0.100000001490116,"wavelength":2.20000004768372},{"T":0.0,"Rb":0.0976999998092651,"Rf":0.0976999998092651,"wavelength":2.20499992370605},{"T":0.0,"Rb":0.101599998772144,"Rf":0.101599998772144,"wavelength":2.21000003814697},{"T":0.0,"Rb":0.0983999967575073,"Rf":0.0983999967575073,"wavelength":2.21499991416931},{"T":0.0,"Rb":0.0961999967694283,"Rf":0.0961999967694283,"wavelength":2.22000002861023},{"T":0.0,"Rb":0.0964000001549721,"Rf":0.0964000001549721,"wavelength":2.22499990463257},{"T":0.0,"Rb":0.101199999451637,"Rf":0.101199999451637,"wavelength":2.23000001907349},{"T":0.0,"Rb":0.100699998438358,"Rf":0.100699998438358,"wavelength":2.23499989509583},{"T":0.0,"Rb":0.0939999967813492,"Rf":0.0939999967813492,"wavelength":2.24000000953674},{"T":0.0,"Rb":0.0958999991416931,"Rf":0.0958999991416931,"wavelength":2.24499988555908},{"T":0.0,"Rb":0.0998999997973442,"Rf":0.0998999997973442,"wavelength":2.25},{"T":0.0,"Rb":0.0953999981284142,"Rf":0.0953999981284142,"wavelength":2.25500011444092},{"T":0.0,"Rb":0.0997999981045723,"Rf":0.0997999981045723,"wavelength":2.25999999046326},{"T":0.0,"Rb":0.100699998438358,"Rf":0.100699998438358,"wavelength":2.26500010490417},{"T":0.0,"Rb":0.0982000008225441,"Rf":0.0982000008225441,"wavelength":2.26999998092651},{"T":0.0,"Rb":0.105700001120567,"Rf":0.105700001120567,"wavelength":2.27500009536743},{"T":0.0,"Rb":0.100100003182888,"Rf":0.100100003182888,"wavelength":2.27999997138977},{"T":0.0,"Rb":0.107199996709824,"Rf":0.107199996709824,"wavelength":2.28500008583069},{"T":0.0,"Rb":0.0953999981284142,"Rf":0.0953999981284142,"wavelength":2.28999996185303},{"T":0.0,"Rb":0.104500003159046,"Rf":0.104500003159046,"wavelength":2.29500007629395},{"T":0.0,"Rb":0.105999998748302,"Rf":0.105999998748302,"wavelength":2.29999995231628},{"T":0.0,"Rb":0.0922000035643578,"Rf":0.0922000035643578,"wavelength":2.3050000667572},{"T":0.0,"Rb":0.106299996376038,"Rf":0.106299996376038,"wavelength":2.30999994277954},{"T":0.0,"Rb":0.0995000004768372,"Rf":0.0995000004768372,"wavelength":2.31500005722046},{"T":0.0,"Rb":0.105200000107288,"Rf":0.105200000107288,"wavelength":2.3199999332428},{"T":0.0,"Rb":0.0997999981045723,"Rf":0.0997999981045723,"wavelength":2.32500004768372},{"T":0.0,"Rb":0.103399999439716,"Rf":0.103399999439716,"wavelength":2.32999992370605},{"T":0.0,"Rb":0.11259999871254,"Rf":0.11259999871254,"wavelength":2.33500003814697},{"T":0.0,"Rb":0.104699999094009,"Rf":0.104699999094009,"wavelength":2.33999991416931},{"T":0.0,"Rb":0.10700000077486,"Rf":0.10700000077486,"wavelength":2.34500002861023},{"T":0.0,"Rb":0.124600000679493,"Rf":0.124600000679493,"wavelength":2.34999990463257},{"T":0.0,"Rb":0.103799998760223,"Rf":0.103799998760223,"wavelength":2.35500001907349},{"T":0.0,"Rb":0.109700001776218,"Rf":0.109700001776218,"wavelength":2.35999989509583},{"T":0.0,"Rb":0.107699997723103,"Rf":0.107699997723103,"wavelength":2.36500000953674},{"T":0.0,"Rb":0.10080000013113,"Rf":0.10080000013113,"wavelength":2.36999988555908},{"T":0.0,"Rb":0.102200001478195,"Rf":0.102200001478195,"wavelength":2.375},{"T":0.0,"Rb":0.11150000244379,"Rf":0.11150000244379,"wavelength":2.38000011444092},{"T":0.0,"Rb":0.0998999997973442,"Rf":0.0998999997973442,"wavelength":2.38499999046326},{"T":0.0,"Rb":0.0966999977827072,"Rf":0.0966999977827072,"wavelength":2.39000010490417},{"T":0.0,"Rb":0.121100001037121,"Rf":0.121100001037121,"wavelength":2.39499998092651},{"T":0.0,"Rb":0.12389999628067,"Rf":0.12389999628067,"wavelength":2.40000009536743},{"T":0.0,"Rb":0.105999998748302,"Rf":0.105999998748302,"wavelength":2.40499997138977},{"T":0.0,"Rb":0.119800001382828,"Rf":0.119800001382828,"wavelength":2.41000008583069},{"T":0.0,"Rb":0.10980000346899,"Rf":0.10980000346899,"wavelength":2.41499996185303},{"T":0.0,"Rb":0.108900003135204,"Rf":0.108900003135204,"wavelength":2.42000007629395},{"T":0.0,"Rb":0.12890000641346,"Rf":0.12890000641346,"wavelength":2.42499995231628},{"T":0.0,"Rb":0.106499999761581,"Rf":0.106499999761581,"wavelength":2.4300000667572},{"T":0.0,"Rb":0.116499997675419,"Rf":0.116499997675419,"wavelength":2.43499994277954},{"T":0.0,"Rb":0.121799997985363,"Rf":0.121799997985363,"wavelength":2.44000005722046},{"T":0.0,"Rb":0.104699999094009,"Rf":0.104699999094009,"wavelength":2.4449999332428},{"T":0.0,"Rb":0.124799996614456,"Rf":0.124799996614456,"wavelength":2.45000004768372},{"T":0.0,"Rb":0.123000003397465,"Rf":0.123000003397465,"wavelength":2.45499992370605},{"T":0.0,"Rb":0.0976999998092651,"Rf":0.0976999998092651,"wavelength":2.46000003814697},{"T":0.0,"Rb":0.135499998927116,"Rf":0.135499998927116,"wavelength":2.46499991416931},{"T":0.0,"Rb":0.120800003409386,"Rf":0.120800003409386,"wavelength":2.47000002861023},{"T":0.0,"Rb":0.128299996256828,"Rf":0.128299996256828,"wavelength":2.47499990463257},{"T":0.0,"Rb":0.116400003433228,"Rf":0.116400003433228,"wavelength":2.48000001907349},{"T":0.0,"Rb":0.109200000762939,"Rf":0.109200000762939,"wavelength":2.48499989509583},{"T":0.0,"Rb":0.125900000333786,"Rf":0.125900000333786,"wavelength":2.49000000953674},{"T":0.0,"Rb":0.103500001132488,"Rf":0.103500001132488,"wavelength":2.49499988555908},{"T":0.0,"Rb":0.124200001358986,"Rf":0.124200001358986,"wavelength":2.5}],"dual_band_values":{"Rb_sol_diffuse":0.08111369,"Rb_vis_diffuse":0.08342645,"Rf_sol_diffuse":0.08111369,"Rf_vis_diffuse":0.08342645,"Tb_sol_diffuse":0.0,"Tb_vis_diffuse":0.0,"Tf_sol_diffuse":0.0,"Tf_vis_diffuse":0.0,"Rb_sol_specular":0.0,"Rb_vis_specular":null,"Rf_sol_specular":0.0,"Rf_vis_specular":0.0,"Tb_sol_specular":0.0,"Tb_vis_specular":0.0,"Tf_sol_specular":0.0,"Tf_vis_specular":0.0}},"igdb_checksum":null,"cgdb_shade_material_id":31114,"cgdb_checksum":-1422500769,"composition":[]},"index":null,"name":null,"extra_data":{"geometry":{"slat_tilt":45.0,"slat_width":11.4,"tilt_choice":"45","slat_spacing":8.8,"slat_curvature":18.30665,"number_segments":5}}}]} \ No newline at end of file diff --git a/examples/pv_local_file.py b/examples/pv_local_file.py new file mode 100644 index 0000000..2a4e67a --- /dev/null +++ b/examples/pv_local_file.py @@ -0,0 +1,22 @@ +import pywincalc + +# Layers with PV data can be created using a subset of the IGSDB v2 json structure. For an example see the +# generic_pv.json file in the examples/products directory. +# Note: This format should only be used for creating json files for layers with PV data. Other layer types are not +# supported yet with this format and should use one of the other available input types as shown in the other examples. +pv_path = "products/generic_pv.json" +pv = pywincalc.parse_json_file(pv_path) + +# Create a list of solid layers in order from outside to inside +solid_layers = [pv] + +# Create a glazing system. This only shows an example of getting one result from a glazing system +# created using default environmental conditions. +# +# For more possible results see optical_results_NFRC.py +# +# For more on environmental conditions see environmental_conditions_user_defined.py +glazing_system = pywincalc.GlazingSystem(solid_layers=solid_layers) + +u_value = glazing_system.u() +print("U-value for a single layer system with integrated PV: {v}".format(v=u_value)) diff --git a/examples/pv_single_layer.py b/examples/pv_single_layer.py deleted file mode 100644 index ee495e5..0000000 --- a/examples/pv_single_layer.py +++ /dev/null @@ -1,45 +0,0 @@ -import pywincalc -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) - -width = 1.0 # width of the glazing system in meters -height = 1.0 # height of the glazing system in meters - -# Layers with PV data can be created using a subset of the IGSDB v2 json structure. For an example see the -# generic_pv.json file in the examples/products directory. -# Note: This format should only be used for creating json files for layers with PV data. Other layer types are not -# supported yet with this format and should use one of the other available input types as shown in the other examples. -pv_path = "products/generic_pv.json" -pv = pywincalc.parse_json_file(pv_path) - -# Create a list of solid layers in order from outside to inside -solid_layers = [pv] - -# 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=solid_layers, - width_meters=width, - height_meters=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, - width_meters=width, - height_meters=height, - environment=pywincalc.nfrc_shgc_environments()) - -results_name = "Results for a single layer system with integrated PV" -print("*" * len(results_name)) -print(results_name) -print("*" * len(results_name)) -results_printer.print_results(glazing_system_u_environment, glazing_system_shgc_environment) \ No newline at end of file diff --git a/examples/results_printer.py b/examples/results_printer.py deleted file mode 100644 index 6613c0c..0000000 --- a/examples/results_printer.py +++ /dev/null @@ -1,204 +0,0 @@ -import pywincalc - - -def print_thermal_results(glazing_system, theta=0, phi=0, leading_tabs=""): - print("{t}U-value: {u}".format(t=leading_tabs, u=glazing_system.u(theta, phi))) - print("{t}SHGC: {shgc}".format(t=leading_tabs, shgc=glazing_system.shgc(theta, phi))) - - print("{t}Solid layer temperatures with solar radiation: {v}".format(t=leading_tabs, - v=glazing_system.layer_temperatures( - pywincalc.TarcogSystemType.SHGC))) - print("{t}Solid layer temperatures without solar radiation: {v}".format(t=leading_tabs, - v=glazing_system.layer_temperatures( - pywincalc.TarcogSystemType.U))) - print("{t}Solid layer effective conductivities with solar radiation: {v}".format(t=leading_tabs, - v=glazing_system.solid_layers_effective_conductivities( - pywincalc.TarcogSystemType.SHGC))) - print("{t}Solid layer effective conductivities without solar radiation: {v}".format(t=leading_tabs, - v=glazing_system.solid_layers_effective_conductivities( - pywincalc.TarcogSystemType.U))) - - if len(glazing_system.solid_layers()) > 1: - print("{t}Gap layer effective conductivities with solar radiation: {v}".format(t=leading_tabs, - v=glazing_system.gap_layers_effective_conductivities( - pywincalc.TarcogSystemType.SHGC))) - print("{t}Gap layer effective conductivities without solar radiation: {v}".format(t=leading_tabs, - v=glazing_system.gap_layers_effective_conductivities( - pywincalc.TarcogSystemType.U))) - - print("{t}System effective conductivity with solar radiation: {v}".format(t=leading_tabs, - v=glazing_system.system_effective_conductivity( - pywincalc.TarcogSystemType.SHGC))) - print("{t}System effective conductivity without solar radiation: {v}".format(t=leading_tabs, - v=glazing_system.system_effective_conductivity( - pywincalc.TarcogSystemType.U))) - - # Relative heat gain does not take a system type as a parameter - print("{t}Relative heat gain: {v}".format(t=leading_tabs, v=glazing_system.relative_heat_gain())) - - -def print_system_optical_results_side(side_results, side, optical_method_name, leading_tabs=""): - print("{t}{m} method direct-direct {s} transmittance: {v}".format(t=leading_tabs, m=optical_method_name, s=side, - v=side_results.transmittance.direct_direct)) - print("{t}{m} method direct-diffuse {s} transmittance: {v}".format(t=leading_tabs, m=optical_method_name, s=side, - v=side_results.transmittance.direct_direct)) - print("{t}{m} method direct-hemispherical {s} transmittance: {v}".format(t=leading_tabs, m=optical_method_name, - s=side, - v=side_results.transmittance.direct_hemispherical)) - print("{t}{m} method diffuse-diffuse {s} transmittance: {v}".format(t=leading_tabs, m=optical_method_name, s=side, - v=side_results.transmittance.diffuse_diffuse)) - print("{t}{m} method direct-direct {s} reflectance: {v}".format(t=leading_tabs, m=optical_method_name, s=side, - v=side_results.reflectance.direct_direct)) - print("{t}{m} method direct-diffuse {s} reflectance: {v}".format(t=leading_tabs, m=optical_method_name, s=side, - v=side_results.reflectance.direct_direct)) - print("{t}{m} method direct-hemispherical {s} reflectance: {v}".format(t=leading_tabs, m=optical_method_name, s=side, - v=side_results.reflectance.direct_hemispherical)) - print("{t}{m} method diffuse-diffuse {s} reflectance: {v}".format(t=leading_tabs, m=optical_method_name, s=side, - v=side_results.reflectance.diffuse_diffuse)) - print("{t}{m} method {s} transmittance matrix: {v}".format(t=leading_tabs, m=optical_method_name, s=side, - v=side_results.transmittance.matrix)) - print("{t}{m} method {s} reflectance matrix: {v}".format(t=leading_tabs, m=optical_method_name, s=side, - v=side_results.reflectance.matrix)) - - -def print_optical_method_results(glazing_system, optical_method_name, theta, phi, leading_tabs=""): - try: - results = glazing_system.optical_method_results(optical_method_name, theta, phi) - except Exception as e: - print(str(e)) - return - - system_results = results.system_results - print_system_optical_results_side(system_results.front, "front", optical_method_name, leading_tabs) - print_system_optical_results_side(system_results.front, "back", optical_method_name, leading_tabs) - - # Currently only absorptance results are provided for each solid layer. Direct and diffuse absportances are - # provided for each side of each layer. - results_per_layer = results.layer_results - for i in range(len(results_per_layer)): - print("{t}{m} method layer {idx} front total direct absorptance: {v}".format(t=leading_tabs, - m=optical_method_name, idx=i + 1, - v=results_per_layer[ - i].front.absorptance.total_direct)) - print("{t}{m} method layer {idx} front total diffuse absorptance: {v}".format(t=leading_tabs, - m=optical_method_name, idx=i + 1, - v=results_per_layer[ - i].front.absorptance.total_diffuse)) - - print("{t}{m} method layer {idx} front heat direct absorptance: {v}".format(t=leading_tabs, - m=optical_method_name, idx=i + 1, - v=results_per_layer[ - i].front.absorptance.heat_direct)) - print("{t}{m} method layer {idx} front heat diffuse absorptance: {v}".format(t=leading_tabs, - m=optical_method_name, idx=i + 1, - v=results_per_layer[ - i].front.absorptance.heat_diffuse)) - - print("{t}{m} method layer {idx} front electricity direct absorptance: {v}".format(t=leading_tabs, - m=optical_method_name, idx=i + 1, - v=results_per_layer[ - i].front.absorptance.electricity_direct)) - print("{t}{m} method layer {idx} front electricity diffuse absorptance: {v}".format(t=leading_tabs, - m=optical_method_name, idx=i + 1, - v=results_per_layer[ - i].front.absorptance.electricity_diffuse)) - print( - "{t}{m} method layer {idx} back total direct absorptance: {v}".format(t=leading_tabs, m=optical_method_name, - idx=i + 1, - v=results_per_layer[ - i].back.absorptance.total_direct)) - print("{t}{m} method layer {idx} back total diffuse absorptance: {v}".format(t=leading_tabs, - m=optical_method_name, idx=i + 1, - v=results_per_layer[ - i].back.absorptance.total_diffuse)) - - print("{t}{m} method layer {idx} back heat direct absorptance: {v}".format(t=leading_tabs, - m=optical_method_name, idx=i + 1, - v=results_per_layer[ - i].back.absorptance.heat_direct)) - print("{t}{m} method layer {idx} back heat diffuse absorptance: {v}".format(t=leading_tabs, - m=optical_method_name, idx=i + 1, - v=results_per_layer[ - i].back.absorptance.heat_diffuse)) - - print("{t}{m} method layer {idx} back electricity direct absorptance: {v}".format(t=leading_tabs, - m=optical_method_name, idx=i + 1, - v=results_per_layer[ - i].back.absorptance.electricity_direct)) - print("{t}{m} method layer {idx} back electricity diffuse absorptance: {v}".format(t=leading_tabs, - m=optical_method_name, idx=i + 1, - v=results_per_layer[ - i].back.absorptance.electricity_diffuse)) - - -def print_color_space_results(flux_results, leading_tabs): - rgb_color = flux_results.rgb - print("{t}RGB: ({r}, {g}, {b})".format(t=leading_tabs, r=rgb_color.R, g=rgb_color.G, b=rgb_color.B)) - lab_color = flux_results.lab - print("{t}Lab: ({l}, {a}, {b})".format(t=leading_tabs, l=lab_color.L, a=lab_color.a, b=lab_color.b)) - trichromatic_color = flux_results.trichromatic - print("{t}Trichromatic: ({x}, {y}, {z})".format(t=leading_tabs, x=trichromatic_color.X, y=trichromatic_color.Y, - z=trichromatic_color.Z)) - - -def print_color_flux_results(transmittance_reflactance_result, leading_tabs): - color_space_leading_tabs = leading_tabs + "\t" - print("{t}Direct-direct:".format(t=leading_tabs)) - print_color_space_results(transmittance_reflactance_result.direct_direct, color_space_leading_tabs) - print("{t}Direct-diffuse:".format(t=leading_tabs)) - print_color_space_results(transmittance_reflactance_result.direct_diffuse, color_space_leading_tabs) - print("{t}Diffuse-diffuse:".format(t=leading_tabs)) - print_color_space_results(transmittance_reflactance_result.diffuse_diffuse, color_space_leading_tabs) - - -def print_color_results(glazing_system, theta, phi, leading_tabs=""): - # If the optical standard defines color methods those have a separate results set and function call - color_results = glazing_system.color(theta, phi) - - # Currently color results only have system results. Individual layer results are not yet supported. - # Color results follow the same layout as the other optical system results except each value is offered in - # the Trichromatic, Lab, and RGB color spaces. - - flux_leading_tabs = leading_tabs + "\t" - print("{t}Front color transmittance:".format(t=leading_tabs)) - print_color_flux_results(color_results.system_results.front.transmittance, flux_leading_tabs) - print("{t}Front color reflectance:".format(t=leading_tabs)) - print_color_flux_results(color_results.system_results.front.reflectance, flux_leading_tabs) - print("{t}Back color transmittance:".format(t=leading_tabs)) - print_color_flux_results(color_results.system_results.back.transmittance, flux_leading_tabs) - print("{t}Back color reflectance:".format(t=leading_tabs)) - print_color_flux_results(color_results.system_results.back.reflectance, flux_leading_tabs) - - -def print_optical_results(glazing_system, theta=0, phi=0, leading_tabs=""): - # Optical results are calculated based on methods defined by the optical standard loaded above. - # Methods available for calculation depend on the standard. Not all methods may be implemented in every standard - # Current non-color methods available for calculation (if implemented): - # SOLAR, PHOTOPIC, THERMAL_IR, TUV, SPF, TDW, TKR) - # - # Calculate all optical results using the solar method: - print_optical_method_results(glazing_system, "SOLAR", theta, phi, leading_tabs) - print_optical_method_results(glazing_system, "PHOTOPIC", theta, phi, leading_tabs) - print_optical_method_results(glazing_system, "TUV", theta, phi, leading_tabs) - print_optical_method_results(glazing_system, "SPF", theta, phi, leading_tabs) - print_optical_method_results(glazing_system, "TDW", theta, phi, leading_tabs) - print_optical_method_results(glazing_system, "TKR", theta, phi, leading_tabs) - print_color_results(glazing_system, theta, phi, leading_tabs) - - -def print_results(glazing_system_u_env, glazing_system_shgc_env): - print("\tResults at normal incidence for system with NFRC U-Value environmental conditions") - leading_tabs = "\t\t" - print_optical_results(glazing_system_u_env, leading_tabs=leading_tabs) - print_thermal_results(glazing_system_u_env, leading_tabs=leading_tabs) - - print("\tResults at normal incidence for system with NFRC SHGC environmental conditions") - print("\tOnly printing thermal results because optical results do not change based on environmental conditions") - leading_tabs = "\t\t" - print_thermal_results(glazing_system_shgc_env, leading_tabs=leading_tabs) - - print("\tResults at incidence of theta = 15° and phi = 270° for system with NFRC SHGC environmental conditions") - theta = 15 - phi = 270 - print_optical_results(glazing_system_shgc_env, theta, phi, leading_tabs=leading_tabs) - print_thermal_results(glazing_system_shgc_env, theta, phi, leading_tabs=leading_tabs) diff --git a/examples/run_all_examples.py b/examples/run_all_examples.py new file mode 100644 index 0000000..6c97ce0 --- /dev/null +++ b/examples/run_all_examples.py @@ -0,0 +1,30 @@ +import glass_local_file +import gaps_and_gases +import bsdf_integrator +import bsdf_shade_igsdb_product +import bsdf_shade_local_file +import cma_double_vision_horizontal +import cma_double_vision_vertical +import cma_single_vision +import deflection +import environmental_conditions_user_defined +import glass_double_layer_igsdb_product +import glass_local_file +import glass_triple_layer_local_file +import glass_user_defined_nband_data +import igsdb_interaction +import minimum_example +import optical_results_EN_410 +import optical_results_NFRC +import perforated_screen_igsdb_product +import perforated_screen_user_defined_geometry_and_user_defined_nband_material +import perforated_screen_user_defined_geometry_igsdb_material +import pv_local_file +import thermal_ir +import thermal_results_ISO_15099 +import venetian_blind_igsdb_product +import venetian_blind_local_file +import venetian_blind_user_defined_geometry_igsdb_material +import venetian_blind_user_defined_geometry_user_defined_dual_band_material +import vertical_venetian_user_defined_geometry_igsdb_material +import woven_shade_user_defined_geometry_igsdb_material \ No newline at end of file diff --git a/examples/single_bsdf.py b/examples/single_bsdf.py deleted file mode 100644 index 044035c..0000000 --- a/examples/single_bsdf.py +++ /dev/null @@ -1,43 +0,0 @@ -import pywincalc -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 - -# -bsdf_hemisphere = pywincalc.BSDFHemisphere.create(pywincalc.BSDFBasisType.FULL) - -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=[bsdf_shade], - 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=[bsdf_shade], - width_meters=glazing_system_width, - height_meters=glazing_system_height, - environment=pywincalc.nfrc_shgc_environments(), - bsdf_hemisphere=bsdf_hemisphere) - -results_name = "Results for a BSDF shade" -print("*" * len(results_name)) -print(results_name) -print("*" * len(results_name)) -results_printer.print_results(glazing_system_u_environment, glazing_system_shgc_environment) diff --git a/examples/single_clear.py b/examples/single_clear.py deleted file mode 100644 index e53ae12..0000000 --- a/examples/single_clear.py +++ /dev/null @@ -1,192 +0,0 @@ -import pywincalc -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) - -width = 1.0 # width of the glazing system in meters -height = 1.0 # height of the glazing system in meters - -# Load solid layer measured values. Solid layer information can come from either igsdb.lbl.gov or files generate -# 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) - -solid_layers = [clear_3] - -# 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_single_layer_u_environment = pywincalc.GlazingSystem(optical_standard=optical_standard, - solid_layers=solid_layers, - width_meters=width, - height_meters=height) -u_value = glazing_system_single_layer_u_environment.u() # calculate U-value according to ISO15099 -print("Single Layer U-value: {u}".format(u=u_value)) - -# To calculate SHGC use the NFRC SHGC environments for the glazing system instead -glazing_system_single_layer_shgc_environment = pywincalc.GlazingSystem(optical_standard=optical_standard, - solid_layers=solid_layers, - width_meters=width, - height_meters=height, - environment=pywincalc.nfrc_shgc_environments()) -shgc_result = glazing_system_single_layer_shgc_environment.shgc() # calculate SHGC according to ISO15099 -print("Single Layer SHGC: {shgc}".format(shgc=shgc_result)) - -# It is possible to calculate U and SHGC for any environmental conditions. -# E.G. The SHGC for the NFRC U environmental conditions is -u_environment_shgc = glazing_system_single_layer_u_environment.shgc() -print("SHGC for the NFRC U-value environmental conditions: {shgc}".format(shgc=u_environment_shgc)) -# And the u-value for the SHGC environment is -shgc_environment_u = glazing_system_single_layer_shgc_environment.u() -print("U for the NFRC SHGC environmental conditions: {u}".format(u=shgc_environment_u)) - -# Other thermal results available: - -# Most other thermal can be calculated for two cases for each environment. When U system is passed as a parameter -# the layer temperatures will be calculated for the given environments without taking solar radiation into account. -# When SHGC system is passed as a parameter solar ration is taken into account -shgc_layer_temperatures_with_solar_radiation = glazing_system_single_layer_shgc_environment.layer_temperatures( - pywincalc.TarcogSystemType.SHGC) -print("Layer 1 temperature in SHGC environment with solar radiation: {v}".format( - v=shgc_layer_temperatures_with_solar_radiation)) -shgc_layer_temperatures_without_solar_radiation = glazing_system_single_layer_shgc_environment.layer_temperatures( - pywincalc.TarcogSystemType.U) -print("Layer 1 temperature in SHGC environment without solar radiation: {v}".format( - v=shgc_layer_temperatures_without_solar_radiation)) - -shgc_environment_solid_layer_effective_conductivities_with_solar_radiation = glazing_system_single_layer_shgc_environment.solid_layers_effective_conductivities( - (pywincalc.TarcogSystemType.SHGC)) -print("Layer 1 effective conductivity in SHGC environment with solar radiation: {v}".format( - v=shgc_environment_solid_layer_effective_conductivities_with_solar_radiation)) -shgc_environment_solid_layer_effective_conductivities_without_solar_radiation = glazing_system_single_layer_shgc_environment.solid_layers_effective_conductivities( - (pywincalc.TarcogSystemType.U)) -print("Layer 1 effective conductivity in SHGC environment without solar radiation: {v}".format( - v=shgc_environment_solid_layer_effective_conductivities_without_solar_radiation)) - -# Single layer systems do not have gaps. For glazing systems with gaps the effective conductivity of gaps is available -# using glazing_system.gap_layers_effective_conductivities - -system_effective_conductivity_with_solar_radiation = glazing_system_single_layer_shgc_environment.system_effective_conductivity( - pywincalc.TarcogSystemType.SHGC) -print("System effective conductivity with solar radiation: {v}".format( - v=system_effective_conductivity_with_solar_radiation)) -system_effective_conductivity_without_solar_radiation = glazing_system_single_layer_shgc_environment.system_effective_conductivity( - pywincalc.TarcogSystemType.U) -print("System effective conductivity without solar radiation: {v}".format( - v=system_effective_conductivity_without_solar_radiation)) - -# Relative heat gain does not take a system type as a parameter -relative_heat_gain = glazing_system_single_layer_shgc_environment.relative_heat_gain() -print("Relative heat gain: {v}".format(v=relative_heat_gain)) - -# Optical results are calculated based on methods defined by the optical standard loaded above. -# Methods available for calculation depend on the standard. Not all methods may be implemented in every standard -# Current non-color methods available for calculation (if implemented): -# SOLAR, PHOTOPIC, THERMAL_IR, TUV, SPF, TDW, TKR) -# -# Calculate all optical results using the solar method: -solar_results = glazing_system_single_layer_u_environment.optical_method_results("SOLAR") - -# Optical results have two parts, results that apply to the entire system and results for each layer. -# System results and results for each layer are then divided by side (front, back). -# then by transmission type (transmittance, reflectance) and then by flux type (direct_direct, direct_diffuse, -# direct_hemispherical, and diffuse_diffuse). direct_diffuse does not include the direct_direct component while -# direct_hemispherical does. In other words direct_direct + direct_diffuse = direct_hemispherical -# -# This prints out all available optical results for the solar method. The same results are available -# for any other method in the optical standards file except for the color methods (method names starting with COLOR_) -system_solar_results = solar_results.system_results -print("Direct-direct front solar transmittance: {v}".format( - v=system_solar_results.front.transmittance.direct_direct)) -print("Direct-diffuse front solar transmittance: {v}".format( - v=system_solar_results.front.transmittance.direct_direct)) -print("Direct-hemispherical front solar transmittance: {v}".format( - v=system_solar_results.front.transmittance.direct_hemispherical)) -print("Diffuse-diffuse front solar transmittance: {v}".format( - v=system_solar_results.front.transmittance.diffuse_diffuse)) -print("Direct-direct front solar reflectance: {v}".format( - v=system_solar_results.front.reflectance.direct_direct)) -print("Direct-diffuse front solar reflectance: {v}".format( - v=system_solar_results.front.reflectance.direct_direct)) -print("Direct-hemispherical front solar reflectance: {v}".format( - v=system_solar_results.front.reflectance.direct_hemispherical)) -print("Diffuse-diffuse front solar reflectance: {v}".format( - v=system_solar_results.front.reflectance.diffuse_diffuse)) -print("Direct-direct back solar transmittance: {v}".format( - v=system_solar_results.back.transmittance.direct_direct)) -print("Direct-diffuse back solar transmittance: {v}".format( - v=system_solar_results.back.transmittance.direct_direct)) -print("Direct-hemispherical back solar transmittance: {v}".format( - v=system_solar_results.back.transmittance.direct_hemispherical)) -print("Diffuse-diffuse back solar transmittance: {v}".format( - v=system_solar_results.back.transmittance.diffuse_diffuse)) -print("Direct-direct back solar reflectance: {v}".format( - v=system_solar_results.back.reflectance.direct_direct)) -print("Direct-diffuse back solar reflectance: {v}".format( - v=system_solar_results.back.reflectance.direct_direct)) -print("Direct-hemispherical back solar reflectance: {v}".format( - v=system_solar_results.back.reflectance.direct_hemispherical)) -print("Diffuse-diffuse back solar reflectance: {v}".format( - v=system_solar_results.back.reflectance.diffuse_diffuse)) - -# Currently only absorptance results are provided for each layer. Direct and diffuse absportances are -# provided for each side of each layer. -solar_results_per_layer = solar_results.layer_results -print("Layer 1 front direct solar absorptance: {v}".format(v=solar_results_per_layer[0].front.absorptance.direct)) -print("Layer 1 front diffuse solar absorptance: {v}".format(v=solar_results_per_layer[0].front.absorptance.diffuse)) -print("Layer 1 back direct solar absorptance: {v}".format(v=solar_results_per_layer[0].back.absorptance.direct)) -print("Layer 1 back diffuse solar absorptance: {v}".format(v=solar_results_per_layer[0].back.absorptance.diffuse)) - -# Similarly for visible results calculate using the Photopic method -visible_results = glazing_system_single_layer_u_environment.optical_method_results("PHOTOPIC") -print("Direct-direct front visible transmittance: {v}".format( - v=visible_results.system_results.front.transmittance.direct_direct)) -print("Direct-hemispheric back visible reflectance: {v}".format( - v=visible_results.system_results.back.reflectance.direct_hemispherical)) -print("Layer 1 front diffuse visible absorptance: {v}".format( - v=visible_results.layer_results[0].front.absorptance.diffuse)) -# etc... - -# If the optical standard defines color methods those have a separate results set and function call -color_results = glazing_system_single_layer_u_environment.color() - -# Currently color results only have system results. Individual layer results are not yet supported. -# Color results follow the same layout as the other optical system results except each value is offered in -# the Trichromatic, Lab, and RGB color spaces. -direct_direct_front_transmittace_rgb_color = color_results.system_results.front.transmittance.direct_direct.rgb -print("Direct-direct front color transmittance in RGB: ({r}, {g}, {b})".format( - r=direct_direct_front_transmittace_rgb_color.R, g=direct_direct_front_transmittace_rgb_color.G, - b=direct_direct_front_transmittace_rgb_color.B)) -direct_hemispherical_back_reflectance_lab_color = color_results.system_results.back.reflectance.direct_hemispherical.lab -print("Direct-hemispheric back color reflectance in Lab: ({l}, {a}, {b})".format( - l=direct_hemispherical_back_reflectance_lab_color.L, a=direct_hemispherical_back_reflectance_lab_color.a, - b=direct_hemispherical_back_reflectance_lab_color.b)) -diffuse_diffuse_front_reflectance_trichromatic_color = color_results.system_results.front.reflectance.diffuse_diffuse.trichromatic -print("Diffuse-diffuse front color reflectance in trichromatic: ({x}, {y}, {z})".format( - x=diffuse_diffuse_front_reflectance_trichromatic_color.X, y=diffuse_diffuse_front_reflectance_trichromatic_color.Y, - z=diffuse_diffuse_front_reflectance_trichromatic_color.Z)) -# etc... - - -# By default glazing system results are calculated at the normal angle of incidence -# but all results are available for any theta and phi -theta = 15 -phi = 270 - -# Calculate SHGC at theta and phi -shgc_value = glazing_system_single_layer_shgc_environment.shgc(theta, phi) -print("SHGC at theta = {t} phi = {p}: {v}".format(t=theta, p=phi, v=shgc_value)) - -# Calculate solar optical results at theta and phi -solar_results = glazing_system_single_layer_u_environment.optical_method_results("SOLAR", theta, phi) -direct_direct_front_transmittance = solar_results.system_results.front.transmittance.direct_direct -print("Direct-direct front solar transmittance at theta = {t} phi = {p}: {v}".format(t=theta, p=phi, - v=direct_direct_front_transmittance)) diff --git a/examples/thermal_ir.py b/examples/thermal_ir.py index 6f28a3c..6d18eea 100644 --- a/examples/thermal_ir.py +++ b/examples/thermal_ir.py @@ -1,7 +1,7 @@ import pywincalc -optical_standard_path = "standards/W5_NFRC_2003.std" -optical_standard = pywincalc.load_standard(optical_standard_path) +# Load default NFRC optical standard +optical_standard = pywincalc.load_standard() clear_3_path = "products/CLEAR_3.DAT" clear_3 = pywincalc.parse_optics_file(clear_3_path) diff --git a/examples/thermal_results_ISO_15099.py b/examples/thermal_results_ISO_15099.py new file mode 100644 index 0000000..13c56bc --- /dev/null +++ b/examples/thermal_results_ISO_15099.py @@ -0,0 +1,105 @@ +import pywincalc + +# Load solid layer measured values. Solid layer information can come from either igsdb.lbl.gov or files generate +# 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) + +solid_layers = [clear_3] + +# Using a small basis here to make printing out the matrix results managable +# Small should probably not be used for actual simulation +bsdf_hemisphere = pywincalc.BSDFHemisphere.create(pywincalc.BSDFBasisType.SMALL) + +# By default a glazing system is created using the environmental conditions defined by +# the NFRC U-value calculations +glazing_system_u_environment = pywincalc.GlazingSystem(solid_layers=solid_layers, + bsdf_hemisphere=bsdf_hemisphere) + +# To calculate SHGC use the NFRC SHGC environments for the glazing system instead. +# These are provided by calling pywincalc.nfrc_shgc_environments(). +# U-value conditions are also available with pywincalc.nfrc_u_environments(). +glazing_system_shgc_environment = pywincalc.GlazingSystem(solid_layers=solid_layers, + environment=pywincalc.nfrc_shgc_environments(), + bsdf_hemisphere=bsdf_hemisphere) + +# In general there are two types of results: optical and thermal. Here optical and thermal +# refer to the calculation methods and not the wavelengths. Environmental conditions can only affect thermal results. +# +# All calculations default to calculating results from radiation at a normal angle of incidence but +# support off-normal calculations by allowing users to pass theta and phi values. +# +# So any result can be calculated for any incidence angle this way. +# e.g. to calculate SHGC results at incidence angle theta = 15 and phi = 25 call +# glazing_system.shgc(theta=15, phi=25) +# +# ------------------------------------Thermal Results-------------------------------------------- +# Since thermal results depend on environmental conditions the below examples will show +# results for the two most common values (U and SHGC) using both sets of standard NFRC environmental conditions +# to demonstrate the difference environmental conditions can make +# +# However any system created with any environmental conditions has all results available to it. +# For more on creating user-defined environmental conditions see environmental_conditions_user_defined.py + +u_value_NFRC_u_conditions = glazing_system_u_environment.u() +u_value_NFRC_shgc_conditions = glazing_system_shgc_environment.u() +print( + "U-Value. Based on NFRC U-value environmental conditions: {u}. Based on NFRC SHGC environmnetal conditions: {shgc}".format( + u=u_value_NFRC_u_conditions, shgc=u_value_NFRC_shgc_conditions)) + +shgc_NFRC_u_conditions = glazing_system_u_environment.shgc() +shgc_NFRC_shgc_conditions = glazing_system_shgc_environment.shgc() +print( + "SHGC. Based on NFRC U-value environmental conditions: {u}. Based on NFRC SHGC environmnetal conditions: {shgc}".format( + u=shgc_NFRC_u_conditions, shgc=shgc_NFRC_shgc_conditions)) + +# ----------------------------Other thermal results----------------------------- +# Most other thermal can be calculated for two cases for each environment. When U system is passed as a parameter +# the layer temperatures will be calculated for the given environments without taking solar radiation into account. +# When SHGC system is passed as a parameter solar ration is taken into account +# +# The exception is relative_heat_gain which does not take a system type. +# +# Since the NFRC U-value conditions have 0 solar radiation the below will all use the SHGC conditions +# as examples. +shgc_layer_temperatures_with_solar_radiation = glazing_system_shgc_environment.layer_temperatures( + pywincalc.TarcogSystemType.SHGC) +print("Layer temperatures in SHGC environment with solar radiation: {v}".format( + v=shgc_layer_temperatures_with_solar_radiation)) +shgc_layer_temperatures_without_solar_radiation = glazing_system_shgc_environment.layer_temperatures( + pywincalc.TarcogSystemType.U) +print("Layer temperatures in SHGC environment without solar radiation: {v}".format( + v=shgc_layer_temperatures_without_solar_radiation)) + +shgc_environment_solid_layer_effective_conductivities_with_solar_radiation = glazing_system_shgc_environment.solid_layers_effective_conductivities( + (pywincalc.TarcogSystemType.SHGC)) +print("Solid layer effective conductivities in SHGC environment with solar radiation: {v}".format( + v=shgc_environment_solid_layer_effective_conductivities_with_solar_radiation)) +shgc_environment_solid_layer_effective_conductivities_without_solar_radiation = glazing_system_shgc_environment.solid_layers_effective_conductivities( + (pywincalc.TarcogSystemType.U)) +print("Solid layer effective conductivities in SHGC environment without solar radiation: {v}".format( + v=shgc_environment_solid_layer_effective_conductivities_without_solar_radiation)) + +shgc_environment_gap_layer_effective_conductivities_with_solar_radiation = glazing_system_shgc_environment.gap_layers_effective_conductivities( + (pywincalc.TarcogSystemType.SHGC)) +print("Gap layer effective conductivities in SHGC environment with solar radiation: {v}".format( + v=shgc_environment_gap_layer_effective_conductivities_with_solar_radiation)) +shgc_environment_gap_layer_effective_conductivities_without_solar_radiation = glazing_system_shgc_environment.gap_layers_effective_conductivities( + (pywincalc.TarcogSystemType.U)) +print("Gap layer effective conductivities in SHGC environment without solar radiation: {v}".format( + v=shgc_environment_gap_layer_effective_conductivities_without_solar_radiation)) + +system_effective_conductivity_with_solar_radiation = glazing_system_shgc_environment.system_effective_conductivity( + pywincalc.TarcogSystemType.SHGC) +print("System effective conductivity with solar radiation: {v}".format( + v=system_effective_conductivity_with_solar_radiation)) +system_effective_conductivity_without_solar_radiation = glazing_system_shgc_environment.system_effective_conductivity( + pywincalc.TarcogSystemType.U) +print("System effective conductivity without solar radiation: {v}".format( + v=system_effective_conductivity_without_solar_radiation)) + +# Relative heat gain is an exception and does not take a system type as a parameter +relative_heat_gain = glazing_system_shgc_environment.relative_heat_gain() +print("Relative heat gain: {v}".format(v=relative_heat_gain)) + diff --git a/examples/triple_clear.py b/examples/triple_clear.py deleted file mode 100644 index 14478f9..0000000 --- a/examples/triple_clear.py +++ /dev/null @@ -1,65 +0,0 @@ -import pywincalc -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) - -width = 1.0 # width of the glazing system in meters -height = 1.0 # height of the glazing system in meters - -# Load solid layer measured values. Solid layer information can come from either igsdb.lbl.gov or files generate -# 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) - -clear_6_path = "products/CLEAR_6.DAT" -clear_6 = pywincalc.parse_optics_file(clear_6_path) - -# Create a list of solid layers in order from outside to inside -# This is a triple glazing where the outside and inside are the glass -# that was just loaded and the middle is the same glass as the single clear example above -solid_layers = [clear_6, clear_3, clear_6] - -# Solid layers must be separated by gap layers -# Currently there are four pre-defined gases available: Air, Argon, Krypton, and Xenon -# Vacuum gaps are not yet supported -# To create a gap with 100% of a predefined gas create a Gap_Data object with the gas type -# and thickness in meters -gap_1 = pywincalc.Gap(pywincalc.PredefinedGasType.AIR, .0127) # .0127 is gap thickness in meters - -# 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) \ No newline at end of file diff --git a/examples/venetian_blind_igsdb_product.py b/examples/venetian_blind_igsdb_product.py new file mode 100644 index 0000000..04da8f0 --- /dev/null +++ b/examples/venetian_blind_igsdb_product.py @@ -0,0 +1,29 @@ +import pywincalc +import requests +from igsdb_interaction import url_single_product, headers + +# 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 a venetian blind from the igsdb.lbl.gov. +slim_white_pella_venetian_blind_igsdb_id = 14684 + +slim_white_pella_venetian_blind_igsdb_response = requests.get( + url_single_product.format(id=slim_white_pella_venetian_blind_igsdb_id), headers=headers) + +slim_white_pella_venetian_blind = pywincalc.parse_json(slim_white_pella_venetian_blind_igsdb_response.content) + +# Create a glazing system. This only shows an example of getting one result from a glazing system +# created using default environmental conditions. +# +# For more possible results see optical_results_NFRC.py +# +# For more on environmental conditions see environmental_conditions_user_defined.py +glazing_system = pywincalc.GlazingSystem(solid_layers=[slim_white_pella_venetian_blind], + bsdf_hemisphere=bsdf_hemisphere) + +u_value = glazing_system.u() +print("U-value for a Venetian blind downloaded from igsdb.lbl.glv: {v}".format(v=u_value)) diff --git a/examples/venetian_blind_local_file.py b/examples/venetian_blind_local_file.py new file mode 100644 index 0000000..3bd3d08 --- /dev/null +++ b/examples/venetian_blind_local_file.py @@ -0,0 +1,23 @@ +import pywincalc + +# 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.FULL) + +# 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) +slim_white_pella_venetian_blind = pywincalc.parse_json_file("products/venetian_blind_CGDB_22034.json") + +# 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 = pywincalc.GlazingSystem(solid_layers=[slim_white_pella_venetian_blind], + bsdf_hemisphere=bsdf_hemisphere) + +u_value = glazing_system.u() +print("U-value for Venetian blind loaded from a local file: {v}".format(v=u_value)) diff --git a/examples/venetian_blind_user_defined_geometry_igsdb_material.py b/examples/venetian_blind_user_defined_geometry_igsdb_material.py new file mode 100644 index 0000000..b420d00 --- /dev/null +++ b/examples/venetian_blind_user_defined_geometry_igsdb_material.py @@ -0,0 +1,60 @@ +import pywincalc +import requests +from igsdb_interaction import url_single_product, headers + +# This example shows how to create a Venetian blind from a user-defined Venetian geometry +# and shade material data download from igsdb.lbl.gov + +# This is the same material used in the venetian in the igsdb_exterior_shade_on_cleara_glass.py example +# but could be any material in the igsdb +shade_material_igsdb_id = 14477 + +shade_material_igsdb_response = requests.get(url_single_product.format(id=shade_material_igsdb_id), headers=headers) + +shade_material = pywincalc.parse_json(shade_material_igsdb_response.content) + +# Venetian blinds need a Venetian_Geometry. +slat_width = .020 # width of 20 mm +slat_spacing = .050 # spacing of 50 mm +slat_curvature = .025 # curvature of 25 mm +slat_tilt = 15 # 15 degree tilt +# distribution_method can be omitted and defaults to directional diffuse. Uniform diffuse is also supported +distribution_method = pywincalc.DistributionMethodType.UNIFORM_DIFFUSE +# number_slat_segments can be omitted and defaults to 5. Do not change unless there is a reason to. +# Included here only for completeness purposes +number_slat_segments = 5 +geometry = pywincalc.VenetianGeometry(slat_width_meters=slat_width, + slat_spacing_meters=slat_spacing, + slat_curvature_meters=slat_curvature, + slat_tilt_degrees=slat_tilt, + number_slat_segments=number_slat_segments, + distribution_method=distribution_method) + +# Create a layer from the geometry and material +venetian_layer = pywincalc.create_venetian_blind(geometry=geometry, material=shade_material) + +# If there are any side gaps in the shade those can be set in the thermal part of the solid layer. +# In this case the left and right openings would apply if the length of the slats was less than the width +# of the glazing system and the top and bottom openings would apply if the top and bottom slats did not +# sit flush with the top and bottom of the glazing system when the slats are closed. +# Do not take slat angle into account for these values. +# These values are for example purposes only +venetian_layer.thermal_data.opening_top = .01 # 10mm top gap +venetian_layer.thermal_data.opening_bottom = .01 # 10mm bottom gap +venetian_layer.thermal_data.opening_left = .02 # 20mm left gap +venetian_layer.thermal_data.opening_right = .02 # 20mm right gap + +# A Venetian blind requires a BSDF hemisphere. Create one based on a standard quarter basis for this example +bsdf_hemisphere = pywincalc.BSDFHemisphere.create(pywincalc.BSDFBasisType.QUARTER) + +# Create a glazing system. This only shows an example of getting one result from a glazing system +# created using default environmental conditions. +# +# For more possible results see optical_results_NFRC.py +# +# For more on environmental conditions see environmental_conditions_user_defined.py +glazing_system = pywincalc.GlazingSystem(solid_layers=[venetian_layer], bsdf_hemisphere=bsdf_hemisphere) + +u_value = glazing_system.u() +print( + "U-value for a custom Venetian blind made from a material downloaded from igsdb.lbl.glv: {v}".format(v=u_value)) diff --git a/examples/venetian_blind_user_defined_geometry_user_defined_dual_band_material.py b/examples/venetian_blind_user_defined_geometry_user_defined_dual_band_material.py new file mode 100644 index 0000000..dfb745a --- /dev/null +++ b/examples/venetian_blind_user_defined_geometry_user_defined_dual_band_material.py @@ -0,0 +1,58 @@ +import pywincalc + +# This example shows how to create a Venetian blind from user-defined dual-band shade +# # material data and user-defined Venetian blind geometry. + +# Create dual-band optical data for the material. All numbers are for example purposes only +shade_material_optical = pywincalc.ProductDataOpticalDualBandHemispheric(solar_transmittance_front=0, + solar_transmittance_back=0, + solar_reflectance_front=0.7, + solar_reflectance_back=0.7, + visible_transmittance_front=0, + visible_transmittance_back=0, + visible_reflectance_front=0.7, + visible_reflectance_back=0.7, + thickness_meters=0.001, + ir_transmittance_front=0, + ir_transmittance_back=0, + emissivity_front=0.8, + emissivity_back=0.8, + permeability_factor=0, + flipped=False) + +# Venetian blinds need a Venetian_Geometry. +slat_width = .020 # width of 20 mm +slat_spacing = .050 # spacing of 50 mm +slat_curvature = .025 # curvature of 25 mm +slat_tilt = 15 # 15 degree tilt +# distribution_method can be omitted and defaults to directional diffuse. Uniform diffuse is also supported +distribution_method = pywincalc.DistributionMethodType.UNIFORM_DIFFUSE +# number_slat_segments can be omitted and defaults to 5. Do not change unless there is a reason to. +# Included here only for completeness purposes +number_slat_segments = 5 +geometry = pywincalc.VenetianGeometry(slat_width_meters=slat_width, + slat_spacing_meters=slat_spacing, + slat_curvature_meters=slat_curvature, + slat_tilt_degrees=slat_tilt, + number_slat_segments=number_slat_segments, + distribution_method=distribution_method, + is_horizontal=True) + +# Create a venetian layer from the geometry and material data. +# NOTE: Since this example only calculates an optical result thermal data can be omitted +# To calculate thermal results product_data_thermal must also be supplied. +# See perforated_screen_user_defined_geometry_and_user_defined_nband_material.py for an example +# of creating thermal data for shade materials +venetian_layer = pywincalc.create_venetian_blind(geometry=geometry, + material_data_optical=shade_material_optical, + material_data_thermal=None) + +# A woven shade requires a BSDF hemisphere. Create one based on a standard quarter basis for this test +bsdf_hemisphere = pywincalc.BSDFHemisphere.create(pywincalc.BSDFBasisType.FULL) + +# Create a glazing system +glazing_system = pywincalc.GlazingSystem(solid_layers=[venetian_layer], bsdf_hemisphere=bsdf_hemisphere) + +solar_results = glazing_system.optical_method_results("SOLAR") +tf_sol_hemispheric = solar_results.system_results.front.transmittance.direct_hemispherical +print("Front hemispheric transmittance for solar: {v}".format(v=tf_sol_hemispheric)) diff --git a/examples/vertical_venetian_user_defined_geometry_igsdb_material.py b/examples/vertical_venetian_user_defined_geometry_igsdb_material.py new file mode 100644 index 0000000..2d20b7f --- /dev/null +++ b/examples/vertical_venetian_user_defined_geometry_igsdb_material.py @@ -0,0 +1,65 @@ +import pywincalc +import requests +from igsdb_interaction import url_single_product, headers + +# This shows an example of how to create a vertical Venetian blind from a user-defined Venetian geometry +# and a material downloaded from igsdb.lbl.gov + +# This is the same material used in the venetian in the igsdb_exterior_shade_on_cleara_glass.py example +# but could be any material in the igsdb +shade_material_igsdb_id = 14477 + +shade_material_igsdb_response = requests.get(url_single_product.format(id=shade_material_igsdb_id), headers=headers) + +shade_material = pywincalc.parse_json(shade_material_igsdb_response.content) + +# Venetian blinds need a Venetian_Geometry. +slat_width = .020 # width of 20 mm +slat_spacing = .050 # spacing of 50 mm +slat_curvature = .025 # curvature of 25 mm +slat_tilt = 15 # 15 degree tilt +# distribution_method can be omitted and defaults to directional diffuse. Uniform diffuse is also supported +distribution_method = pywincalc.DistributionMethodType.UNIFORM_DIFFUSE +# number_slat_segments can be omitted and defaults to 5. Do not change unless there is a reason to. +# Included here only for completeness purposes +number_slat_segments = 5 + +# To make the Venetian vertical set is_horizontal = False when creating the geometry +geometry = pywincalc.VenetianGeometry(slat_width_meters=slat_width, + slat_spacing_meters=slat_spacing, + slat_curvature_meters=slat_curvature, + slat_tilt_degrees=slat_tilt, + number_slat_segments=number_slat_segments, + distribution_method=distribution_method, + is_horizontal=False) + +# Create a layer from the geometry and material +venetian_layer = pywincalc.create_venetian_blind(geometry=geometry, material=shade_material) + +# If there are any side gaps in the shade those can be set in the thermal part of the solid layer. +# In this case the left and right openings would apply if the length of the slats was less than the width +# of the glazing system and the top and bottom openings would apply if the top and bottom slats did not +# sit flush with the top and bottom of the glazing system when the slats are closed. +# Do not take slat angle into account for these values. +# These values are for example purposes only +venetian_layer.thermal_data.opening_top = .01 # 10mm top gap +venetian_layer.thermal_data.opening_bottom = .01 # 10mm bottom gap +venetian_layer.thermal_data.opening_left = .02 # 20mm left gap +venetian_layer.thermal_data.opening_right = .02 # 20mm right gap + +# A Venetian blind requires a BSDF hemisphere. Create one based on a standard quarter basis for this test +bsdf_hemisphere = pywincalc.BSDFHemisphere.create(pywincalc.BSDFBasisType.QUARTER) + +# Create a glazing system. This only shows an example of getting one result from a glazing system +# created using default environmental conditions. +# +# For more possible results see optical_results_NFRC.py +# +# For more on environmental conditions see environmental_conditions_user_defined.py +glazing_system = pywincalc.GlazingSystem(solid_layers=[venetian_layer], + bsdf_hemisphere=bsdf_hemisphere) + +u_value = glazing_system.u() +print( + "U-value for a vertical Venetian blind made from a user-defined geometry and material downloaded from igsdb.lbl.glv: {v}".format( + v=u_value)) diff --git a/examples/woven_shade_user_defined_geometry_igsdb_material.py b/examples/woven_shade_user_defined_geometry_igsdb_material.py new file mode 100644 index 0000000..36dc466 --- /dev/null +++ b/examples/woven_shade_user_defined_geometry_igsdb_material.py @@ -0,0 +1,49 @@ +import pywincalc +import requests +from igsdb_interaction import url_single_product, headers + +# This is the same material used in the venetian example but could be any material in the igsdb +shade_material_igsdb_id = 14477 + +shade_material_igsdb_response = requests.get( + url_single_product.format(id=shade_material_igsdb_id), headers=headers) + +shade_material = pywincalc.parse_json(shade_material_igsdb_response.content) + +# Woven shades need Woven_Geometry. +thread_diameter = 0.002 # 2mm diameter +thread_spacing = 0.003 # 3mm spacing +shade_thickness = 0.002 # 2mm shade thickness +geometry = pywincalc.WovenGeometry(thread_diameter, thread_spacing, shade_thickness) + +# Convert the parsed shade material data into a solid layer. Without doing +# anything else this would be treated as a solid sheet of the material. +woven_layer = pywincalc.convert_to_solid_layer( + shade_material) # The easiest way to transform it into a Venetian blind is to replace the optical portion +# with a ProductDataOpticalWovenShade object made from the material's optical data +# and the user-defined geometry created above. +woven_layer.optical_data = pywincalc.ProductDataOpticalWovenShade(woven_layer.optical_data, geometry) + +# If there are any side gaps in the shade those can be set in the thermal part of the solid layer +# These values are for example purposes only +woven_layer.thermal_data.opening_top = .01 # 10mm top gap +woven_layer.thermal_data.opening_bottom = .01 # 10mm bottom gap +woven_layer.thermal_data.opening_left = .02 # 20mm left gap +woven_layer.thermal_data.opening_right = .02 # 20mm right gap + +# A woven shade requires a BSDF hemisphere. Create one based on a standard quarter basis for this example +bsdf_hemisphere = pywincalc.BSDFHemisphere.create(pywincalc.BSDFBasisType.QUARTER) + +# Create a glazing system. This only shows an example of getting one result from a glazing system +# created using default environmental conditions. +# +# For more possible results see optical_results_NFRC.py +# +# For more on environmental conditions see environmental_conditions_user_defined.py +glazing_system = pywincalc.GlazingSystem(solid_layers=[woven_layer], + bsdf_hemisphere=bsdf_hemisphere) + +u_value = glazing_system.u() +print( + "U-value for a woven shade made from a user-defined geometry and material downloaded from igsdb.lbl.glv: {v}".format( + v=u_value)) diff --git a/pywincalc/__init__.py b/pywincalc/__init__.py new file mode 100644 index 0000000..fcaffd2 --- /dev/null +++ b/pywincalc/__init__.py @@ -0,0 +1,96 @@ +from pathlib import Path +import deprecation + +# Ideally the following long list would just be `from wincalcbindings import *`. +# But there are a few things that we'd like to provide python versions of +# while keeping the same function name for backwards compatibility. +# So the options seem to be either change the name of the C++ bindings, which is a possiblilty +# or specifically import the functions that should be re-exported and alias them in the process +# +# Currently this seems like a better approach since it allows for future cases if needed. +# Also changing library code because of an issue in the client does not seem like the correct approach in general. +# +# If there were a way to import * and then rename the individual functions that would likely work as well +# and require less maintenance. However so far the only way I have come up with is something like +# +# def prepend_underscore_to_package_item(package, name): +# f = getattr(package, name) +# setattr(package, "_"+name, f) +# delattr(package, name) +# return package +# +# wincalcbindings_pkg = importlib.import_module("wincalcbindings") +# wincalcbindings_pkg = prepend_underscore_to_package_item(wincalcbindings_pkg, "load_standard") +# wincalcbindings_pkg = prepend_underscore_to_package_item(wincalcbindings_pkg, "GlazingSystem") +# globals().update(vars(wincalcbindings_pkg)) +# +# And I don't think I understand the implications of that fully enough to trust it doesn't have +# any other side effets. e.g. __file__ changes after the globals update + +from wincalcbindings import AirHorizontalDirection, BSDF, BSDFBasisType, BSDFDirection, BSDFDirections, BSDFHemisphere, \ + BSDFIntegrator, BoundaryConditionsCoefficientModelType, CMABestWorstUFactors, CMAResult, CMAWindow, \ + CMAWindowDualVisionHorizontal, CMAWindowDualVisionVertical, CMAWindowSingleVision, CircularPillar, CoatedSide, \ + ColorResult, DeflectionResults, DistributionMethodType, DualBandBSDF, EffectiveOpenness, Environment, Environments, \ + FlippableSolidLayer, Gas, GasCoefficients, GasData, GlazingSystem as _GlazingSystem, GlazingSystemDimensions, \ + IGUGapLayer, IGUGapLayerDeflection, IntegrationRule, IntegrationRuleType, Lab, Layers, MaterialType, \ + OpticalMeasurementComponent, OpticalResultAbsorptance, OpticalResultFluxType, OpticalResultFluxTypeColor, \ + OpticalResultLayer, OpticalResultSide, OpticalResultSideColor, OpticalResultSide_Layer, OpticalResultTransmission, \ + OpticalResultTransmissionColor, OpticalResults, OpticalResultsColor, OpticalStandard, OpticalStandardMethod, \ + PVPowerProperty, PVWavelengthData, ParsedPerforatedGeometry, ParsedVenetianGeometry, ParsedWovenGeometry, \ + PerforatedGeometry, PredefinedGasConverter, PredefinedGasType, ProductComposistionData, ProductData, \ + ProductDataOptical, ProductDataOpticalAndThermal, ProductDataOpticalDualBand, \ + ProductDataOpticalDualBandBSDF, ProductDataOpticalDualBandHemispheric, ProductDataOpticalNBand, \ + ProductDataOpticalPerforatedScreen, ProductDataOpticalVenetian, ProductDataOpticalWithMaterial, \ + ProductDataOpticalWovenShade, ProductDataThermal, ProductGeometry, PropertySimple, RGB, Side, \ + SpectalDataWavelengthRangeMethodType, Spectrum, SpectrumType, SquareMatrix, SupportPillar, TarcogSystemType, \ + ThermalIRResults, ThmxBoundaryCondition, ThmxBoundaryConditionPolygon, ThmxCMABestWorstOption, ThmxCMAOptions, \ + ThmxFileContents, ThmxMaterial, ThmxMeshParameters, ThmxPolygon, ThmxPolygonPoint, ThmxRGB, ThmxResult, \ + ThmxUFactorProjectionResult, ThmxUFactorResults, Trichromatic, VenetianGeometry, WavelengthBSDFs, \ + WavelengthBoundary, WavelengthBoundaryType, WavelengthData, WavelengthSet, WavelengthSetType, WovenGeometry, \ + load_standard as _load_standard, calc_cma, calc_thermal_ir, convert_to_solid_layer, convert_to_solid_layers, \ + create_best_worst_u_factor_option, create_gas, create_perforated_screen, create_venetian_blind, create_woven_shade, \ + get_cma_window_double_vision_horizontal, get_cma_window_double_vision_vertical, get_cma_window_single_vision, \ + get_spacer_keff, nfrc_shgc_environments, nfrc_u_environments, parse_bsdf_xml_file, parse_bsdf_xml_string, \ + parse_json, parse_json_file, parse_optics_file, parse_thmx_file, parse_thmx_string + + +@deprecation.deprecated(deprecated_in="3.0.0", removed_in="4.0.0", + current_version="3.0.0", + details="Use pywincalc.Layers.gap or pywincalc.create_gas instead") +def Gap(gas, thickness): + converted_gas = None + if type(gas) is list: + # Assume it is a list of PredefinedGasMixtureComponent. + # i.e. a list of (percent, component) tuples + converted_gas = create_gas(gas) + else: + # otherwise it is just a single component and therefore 100% of the mixture + converted_gas = create_gas([[1.0, gas]]) + return Layers.gap(gas=converted_gas, thickness=thickness) + + +@deprecation.deprecated(deprecated_in="3.0.0", removed_in="4.0.0", + current_version="3.0.0", + details="Use pywincalc.create_gas instead") +def PredefinedGasMixtureComponent(component, percent): + return [percent, component] + + +standard_path = Path(__file__).parent / "standards" + + +def load_standard(standard_file=standard_path / "W5_NFRC_2003.std"): + return _load_standard(str(standard_file)) + + +def GlazingSystem(solid_layers, gap_layers=[], optical_standard=load_standard(), width_meters=1.0, + height_meters=1.0, tilt_degrees=90, environment=nfrc_u_environments(), bsdf_hemisphere=None, + spectral_data_wavelength_range_method=SpectalDataWavelengthRangeMethodType.FULL, + number_visible_bands=5, number_solar_bands=10): + return _GlazingSystem(solid_layers=solid_layers, gap_layers=gap_layers, optical_standard=optical_standard, + width_meters=width_meters, height_meters=height_meters, + tilt_degrees=tilt_degrees, environment=environment, + bsdf_hemisphere=bsdf_hemisphere, + spectral_data_wavelength_range_method=spectral_data_wavelength_range_method, + number_visible_bands=number_visible_bands, + number_solar_bands=number_solar_bands) diff --git a/examples/standards/ASTM E308 1931 X.dsp b/pywincalc/standards/ASTM E308 1931 X.dsp similarity index 100% rename from examples/standards/ASTM E308 1931 X.dsp rename to pywincalc/standards/ASTM E308 1931 X.dsp diff --git a/examples/standards/ASTM E308 1931 X.loc b/pywincalc/standards/ASTM E308 1931 X.loc similarity index 100% rename from examples/standards/ASTM E308 1931 X.loc rename to pywincalc/standards/ASTM E308 1931 X.loc diff --git a/examples/standards/ASTM E308 1931 Y.dsp b/pywincalc/standards/ASTM E308 1931 Y.dsp similarity index 100% rename from examples/standards/ASTM E308 1931 Y.dsp rename to pywincalc/standards/ASTM E308 1931 Y.dsp diff --git a/examples/standards/ASTM E308 1931 Y.loc b/pywincalc/standards/ASTM E308 1931 Y.loc similarity index 100% rename from examples/standards/ASTM E308 1931 Y.loc rename to pywincalc/standards/ASTM E308 1931 Y.loc diff --git a/examples/standards/ASTM E308 1931 Z.dsp b/pywincalc/standards/ASTM E308 1931 Z.dsp similarity index 100% rename from examples/standards/ASTM E308 1931 Z.dsp rename to pywincalc/standards/ASTM E308 1931 Z.dsp diff --git a/examples/standards/ASTM E308 1964 X.dsp b/pywincalc/standards/ASTM E308 1964 X.dsp similarity index 100% rename from examples/standards/ASTM E308 1964 X.dsp rename to pywincalc/standards/ASTM E308 1964 X.dsp diff --git a/examples/standards/ASTM E308 1964 X.loc b/pywincalc/standards/ASTM E308 1964 X.loc similarity index 100% rename from examples/standards/ASTM E308 1964 X.loc rename to pywincalc/standards/ASTM E308 1964 X.loc diff --git a/examples/standards/ASTM E308 1964 Y.dsp b/pywincalc/standards/ASTM E308 1964 Y.dsp similarity index 100% rename from examples/standards/ASTM E308 1964 Y.dsp rename to pywincalc/standards/ASTM E308 1964 Y.dsp diff --git a/examples/standards/ASTM E308 1964 Y.loc b/pywincalc/standards/ASTM E308 1964 Y.loc similarity index 100% rename from examples/standards/ASTM E308 1964 Y.loc rename to pywincalc/standards/ASTM E308 1964 Y.loc diff --git a/examples/standards/ASTM E308 1964 Z.dsp b/pywincalc/standards/ASTM E308 1964 Z.dsp similarity index 100% rename from examples/standards/ASTM E308 1964 Z.dsp rename to pywincalc/standards/ASTM E308 1964 Z.dsp diff --git a/examples/standards/ASTM E308 Illuminant A.ssp b/pywincalc/standards/ASTM E308 Illuminant A.ssp similarity index 100% rename from examples/standards/ASTM E308 Illuminant A.ssp rename to pywincalc/standards/ASTM E308 Illuminant A.ssp diff --git a/examples/standards/ASTM E308 Illuminant C.ssp b/pywincalc/standards/ASTM E308 Illuminant C.ssp similarity index 100% rename from examples/standards/ASTM E308 Illuminant C.ssp rename to pywincalc/standards/ASTM E308 Illuminant C.ssp diff --git a/examples/standards/ASTM E308 Illuminant D50.ssp b/pywincalc/standards/ASTM E308 Illuminant D50.ssp similarity index 100% rename from examples/standards/ASTM E308 Illuminant D50.ssp rename to pywincalc/standards/ASTM E308 Illuminant D50.ssp diff --git a/examples/standards/ASTM E308 Illuminant D55.ssp b/pywincalc/standards/ASTM E308 Illuminant D55.ssp similarity index 100% rename from examples/standards/ASTM E308 Illuminant D55.ssp rename to pywincalc/standards/ASTM E308 Illuminant D55.ssp diff --git a/examples/standards/ASTM E308 Illuminant D65.ssp b/pywincalc/standards/ASTM E308 Illuminant D65.ssp similarity index 100% rename from examples/standards/ASTM E308 Illuminant D65.ssp rename to pywincalc/standards/ASTM E308 Illuminant D65.ssp diff --git a/examples/standards/ASTM E308 Table 5-1 X.ssp b/pywincalc/standards/ASTM E308 Table 5-1 X.ssp similarity index 100% rename from examples/standards/ASTM E308 Table 5-1 X.ssp rename to pywincalc/standards/ASTM E308 Table 5-1 X.ssp diff --git a/examples/standards/ASTM E308 Table 5-1 Y.ssp b/pywincalc/standards/ASTM E308 Table 5-1 Y.ssp similarity index 100% rename from examples/standards/ASTM E308 Table 5-1 Y.ssp rename to pywincalc/standards/ASTM E308 Table 5-1 Y.ssp diff --git a/examples/standards/ASTM E308 Table 5-1 Z.ssp b/pywincalc/standards/ASTM E308 Table 5-1 Z.ssp similarity index 100% rename from examples/standards/ASTM E308 Table 5-1 Z.ssp rename to pywincalc/standards/ASTM E308 Table 5-1 Z.ssp diff --git a/examples/standards/ASTM E308 Table 5-19 X.ssp b/pywincalc/standards/ASTM E308 Table 5-19 X.ssp similarity index 100% rename from examples/standards/ASTM E308 Table 5-19 X.ssp rename to pywincalc/standards/ASTM E308 Table 5-19 X.ssp diff --git a/examples/standards/ASTM E308 Table 5-19 Y.ssp b/pywincalc/standards/ASTM E308 Table 5-19 Y.ssp similarity index 100% rename from examples/standards/ASTM E308 Table 5-19 Y.ssp rename to pywincalc/standards/ASTM E308 Table 5-19 Y.ssp diff --git a/examples/standards/ASTM E308 Table 5-19 Z.ssp b/pywincalc/standards/ASTM E308 Table 5-19 Z.ssp similarity index 100% rename from examples/standards/ASTM E308 Table 5-19 Z.ssp rename to pywincalc/standards/ASTM E308 Table 5-19 Z.ssp diff --git a/examples/standards/ASTM E891 Table 1 Direct AM1_5.ssp b/pywincalc/standards/ASTM E891 Table 1 Direct AM1_5.ssp similarity index 100% rename from examples/standards/ASTM E891 Table 1 Direct AM1_5.ssp rename to pywincalc/standards/ASTM E891 Table 1 Direct AM1_5.ssp diff --git a/examples/standards/ASTM E891 Table3 50 Sel Ord AM1_5.ssp b/pywincalc/standards/ASTM E891 Table3 50 Sel Ord AM1_5.ssp similarity index 100% rename from examples/standards/ASTM E891 Table3 50 Sel Ord AM1_5.ssp rename to pywincalc/standards/ASTM E891 Table3 50 Sel Ord AM1_5.ssp diff --git a/examples/standards/ASTM G173 AM1_5 37 Tilt Direct Full Spectrum.ssp b/pywincalc/standards/ASTM G173 AM1_5 37 Tilt Direct Full Spectrum.ssp similarity index 100% rename from examples/standards/ASTM G173 AM1_5 37 Tilt Direct Full Spectrum.ssp rename to pywincalc/standards/ASTM G173 AM1_5 37 Tilt Direct Full Spectrum.ssp diff --git a/examples/standards/ASTM G173 AM1_5 37 Tilt Global Full Spectrum.ssp b/pywincalc/standards/ASTM G173 AM1_5 37 Tilt Global Full Spectrum.ssp similarity index 100% rename from examples/standards/ASTM G173 AM1_5 37 Tilt Global Full Spectrum.ssp rename to pywincalc/standards/ASTM G173 AM1_5 37 Tilt Global Full Spectrum.ssp diff --git a/examples/standards/ASTM G197 AM1_5 20 Tilt Direct Full Spectrum.ssp b/pywincalc/standards/ASTM G197 AM1_5 20 Tilt Direct Full Spectrum.ssp similarity index 100% rename from examples/standards/ASTM G197 AM1_5 20 Tilt Direct Full Spectrum.ssp rename to pywincalc/standards/ASTM G197 AM1_5 20 Tilt Direct Full Spectrum.ssp diff --git a/examples/standards/ASTM G197 AM1_5 20 Tilt Global Full Spectrum.ssp b/pywincalc/standards/ASTM G197 AM1_5 20 Tilt Global Full Spectrum.ssp similarity index 100% rename from examples/standards/ASTM G197 AM1_5 20 Tilt Global Full Spectrum.ssp rename to pywincalc/standards/ASTM G197 AM1_5 20 Tilt Global Full Spectrum.ssp diff --git a/examples/standards/ASTM G197 AM1_5 90 Tilt Direct Full Spectrum.ssp b/pywincalc/standards/ASTM G197 AM1_5 90 Tilt Direct Full Spectrum.ssp similarity index 100% rename from examples/standards/ASTM G197 AM1_5 90 Tilt Direct Full Spectrum.ssp rename to pywincalc/standards/ASTM G197 AM1_5 90 Tilt Direct Full Spectrum.ssp diff --git a/examples/standards/ASTM G197 AM1_5 90 Tilt Global Full Spectrum.ssp b/pywincalc/standards/ASTM G197 AM1_5 90 Tilt Global Full Spectrum.ssp similarity index 100% rename from examples/standards/ASTM G197 AM1_5 90 Tilt Global Full Spectrum.ssp rename to pywincalc/standards/ASTM G197 AM1_5 90 Tilt Global Full Spectrum.ssp diff --git a/examples/standards/CIE 1931 1nm X.dsp b/pywincalc/standards/CIE 1931 1nm X.dsp similarity index 100% rename from examples/standards/CIE 1931 1nm X.dsp rename to pywincalc/standards/CIE 1931 1nm X.dsp diff --git a/examples/standards/CIE 1931 1nm X.loc b/pywincalc/standards/CIE 1931 1nm X.loc similarity index 100% rename from examples/standards/CIE 1931 1nm X.loc rename to pywincalc/standards/CIE 1931 1nm X.loc diff --git a/examples/standards/CIE 1931 1nm Y.dsp b/pywincalc/standards/CIE 1931 1nm Y.dsp similarity index 100% rename from examples/standards/CIE 1931 1nm Y.dsp rename to pywincalc/standards/CIE 1931 1nm Y.dsp diff --git a/examples/standards/CIE 1931 1nm Y.loc b/pywincalc/standards/CIE 1931 1nm Y.loc similarity index 100% rename from examples/standards/CIE 1931 1nm Y.loc rename to pywincalc/standards/CIE 1931 1nm Y.loc diff --git a/examples/standards/CIE 1931 1nm Z.dsp b/pywincalc/standards/CIE 1931 1nm Z.dsp similarity index 100% rename from examples/standards/CIE 1931 1nm Z.dsp rename to pywincalc/standards/CIE 1931 1nm Z.dsp diff --git a/examples/standards/CIE 1931 5nm X.dsp b/pywincalc/standards/CIE 1931 5nm X.dsp similarity index 100% rename from examples/standards/CIE 1931 5nm X.dsp rename to pywincalc/standards/CIE 1931 5nm X.dsp diff --git a/examples/standards/CIE 1931 5nm X.loc b/pywincalc/standards/CIE 1931 5nm X.loc similarity index 100% rename from examples/standards/CIE 1931 5nm X.loc rename to pywincalc/standards/CIE 1931 5nm X.loc diff --git a/examples/standards/CIE 1931 5nm Y.dsp b/pywincalc/standards/CIE 1931 5nm Y.dsp similarity index 100% rename from examples/standards/CIE 1931 5nm Y.dsp rename to pywincalc/standards/CIE 1931 5nm Y.dsp diff --git a/examples/standards/CIE 1931 5nm Y.loc b/pywincalc/standards/CIE 1931 5nm Y.loc similarity index 100% rename from examples/standards/CIE 1931 5nm Y.loc rename to pywincalc/standards/CIE 1931 5nm Y.loc diff --git a/examples/standards/CIE 1931 5nm Z.dsp b/pywincalc/standards/CIE 1931 5nm Z.dsp similarity index 100% rename from examples/standards/CIE 1931 5nm Z.dsp rename to pywincalc/standards/CIE 1931 5nm Z.dsp diff --git a/examples/standards/CIE 1964 1nm X.dsp b/pywincalc/standards/CIE 1964 1nm X.dsp similarity index 100% rename from examples/standards/CIE 1964 1nm X.dsp rename to pywincalc/standards/CIE 1964 1nm X.dsp diff --git a/examples/standards/CIE 1964 1nm X.loc b/pywincalc/standards/CIE 1964 1nm X.loc similarity index 100% rename from examples/standards/CIE 1964 1nm X.loc rename to pywincalc/standards/CIE 1964 1nm X.loc diff --git a/examples/standards/CIE 1964 1nm Y.dsp b/pywincalc/standards/CIE 1964 1nm Y.dsp similarity index 100% rename from examples/standards/CIE 1964 1nm Y.dsp rename to pywincalc/standards/CIE 1964 1nm Y.dsp diff --git a/examples/standards/CIE 1964 1nm Y.loc b/pywincalc/standards/CIE 1964 1nm Y.loc similarity index 100% rename from examples/standards/CIE 1964 1nm Y.loc rename to pywincalc/standards/CIE 1964 1nm Y.loc diff --git a/examples/standards/CIE 1964 1nm Z.dsp b/pywincalc/standards/CIE 1964 1nm Z.dsp similarity index 100% rename from examples/standards/CIE 1964 1nm Z.dsp rename to pywincalc/standards/CIE 1964 1nm Z.dsp diff --git a/examples/standards/CIE 1964 5nm X.dsp b/pywincalc/standards/CIE 1964 5nm X.dsp similarity index 100% rename from examples/standards/CIE 1964 5nm X.dsp rename to pywincalc/standards/CIE 1964 5nm X.dsp diff --git a/examples/standards/CIE 1964 5nm X.loc b/pywincalc/standards/CIE 1964 5nm X.loc similarity index 100% rename from examples/standards/CIE 1964 5nm X.loc rename to pywincalc/standards/CIE 1964 5nm X.loc diff --git a/examples/standards/CIE 1964 5nm Y.dsp b/pywincalc/standards/CIE 1964 5nm Y.dsp similarity index 100% rename from examples/standards/CIE 1964 5nm Y.dsp rename to pywincalc/standards/CIE 1964 5nm Y.dsp diff --git a/examples/standards/CIE 1964 5nm Y.loc b/pywincalc/standards/CIE 1964 5nm Y.loc similarity index 100% rename from examples/standards/CIE 1964 5nm Y.loc rename to pywincalc/standards/CIE 1964 5nm Y.loc diff --git a/examples/standards/CIE 1964 5nm Z.dsp b/pywincalc/standards/CIE 1964 5nm Z.dsp similarity index 100% rename from examples/standards/CIE 1964 5nm Z.dsp rename to pywincalc/standards/CIE 1964 5nm Z.dsp diff --git a/examples/standards/CIE Illuminant A 1nm.ssp b/pywincalc/standards/CIE Illuminant A 1nm.ssp similarity index 100% rename from examples/standards/CIE Illuminant A 1nm.ssp rename to pywincalc/standards/CIE Illuminant A 1nm.ssp diff --git a/examples/standards/CIE Illuminant D65 1nm.ssp b/pywincalc/standards/CIE Illuminant D65 1nm.ssp similarity index 100% rename from examples/standards/CIE Illuminant D65 1nm.ssp rename to pywincalc/standards/CIE Illuminant D65 1nm.ssp diff --git a/examples/standards/CIE SPF McKinlay UV.dsp b/pywincalc/standards/CIE SPF McKinlay UV.dsp similarity index 100% rename from examples/standards/CIE SPF McKinlay UV.dsp rename to pywincalc/standards/CIE SPF McKinlay UV.dsp diff --git a/examples/standards/CIE85 Table4 Global AM1_0.ssp b/pywincalc/standards/CIE85 Table4 Global AM1_0.ssp similarity index 100% rename from examples/standards/CIE85 Table4 Global AM1_0.ssp rename to pywincalc/standards/CIE85 Table4 Global AM1_0.ssp diff --git a/examples/standards/CRI.std b/pywincalc/standards/CRI.std similarity index 100% rename from examples/standards/CRI.std rename to pywincalc/standards/CRI.std diff --git a/examples/standards/Color 5nm.wvl b/pywincalc/standards/Color 5nm.wvl similarity index 100% rename from examples/standards/Color 5nm.wvl rename to pywincalc/standards/Color 5nm.wvl diff --git a/examples/standards/EqualEnergy.ssp b/pywincalc/standards/EqualEnergy.ssp similarity index 100% rename from examples/standards/EqualEnergy.ssp rename to pywincalc/standards/EqualEnergy.ssp diff --git a/examples/standards/ISO 9050 Table 1.ssp b/pywincalc/standards/ISO 9050 Table 1.ssp similarity index 100% rename from examples/standards/ISO 9050 Table 1.ssp rename to pywincalc/standards/ISO 9050 Table 1.ssp diff --git a/examples/standards/ISO 9050 Table 2.ssp b/pywincalc/standards/ISO 9050 Table 2.ssp similarity index 100% rename from examples/standards/ISO 9050 Table 2.ssp rename to pywincalc/standards/ISO 9050 Table 2.ssp diff --git a/examples/standards/ISO 9050 Table 3.ssp b/pywincalc/standards/ISO 9050 Table 3.ssp similarity index 100% rename from examples/standards/ISO 9050 Table 3.ssp rename to pywincalc/standards/ISO 9050 Table 3.ssp diff --git a/examples/standards/ISO 9050 Table 4.ssp b/pywincalc/standards/ISO 9050 Table 4.ssp similarity index 100% rename from examples/standards/ISO 9050 Table 4.ssp rename to pywincalc/standards/ISO 9050 Table 4.ssp diff --git a/examples/standards/ISO 9845 Table 1 Direct AM1_5.ssp b/pywincalc/standards/ISO 9845 Table 1 Direct AM1_5.ssp similarity index 100% rename from examples/standards/ISO 9845 Table 1 Direct AM1_5.ssp rename to pywincalc/standards/ISO 9845 Table 1 Direct AM1_5.ssp diff --git a/examples/standards/ISO 9845 Table 1 Norm Global AM1_5.ssp b/pywincalc/standards/ISO 9845 Table 1 Norm Global AM1_5.ssp similarity index 100% rename from examples/standards/ISO 9845 Table 1 Norm Global AM1_5.ssp rename to pywincalc/standards/ISO 9845 Table 1 Norm Global AM1_5.ssp diff --git a/examples/standards/ISO 9845 Table 1 Raw Global AM1_5.ssp b/pywincalc/standards/ISO 9845 Table 1 Raw Global AM1_5.ssp similarity index 100% rename from examples/standards/ISO 9845 Table 1 Raw Global AM1_5.ssp rename to pywincalc/standards/ISO 9845 Table 1 Raw Global AM1_5.ssp diff --git a/examples/standards/ISO 9845 Table 3 50 Sel Ord AM1_5.ssp b/pywincalc/standards/ISO 9845 Table 3 50 Sel Ord AM1_5.ssp similarity index 100% rename from examples/standards/ISO 9845 Table 3 50 Sel Ord AM1_5.ssp rename to pywincalc/standards/ISO 9845 Table 3 50 Sel Ord AM1_5.ssp diff --git a/examples/standards/ISO_9050.std b/pywincalc/standards/ISO_9050.std similarity index 100% rename from examples/standards/ISO_9050.std rename to pywincalc/standards/ISO_9050.std diff --git a/examples/standards/Moon Solar Source AM2_0.ssp b/pywincalc/standards/Moon Solar Source AM2_0.ssp similarity index 100% rename from examples/standards/Moon Solar Source AM2_0.ssp rename to pywincalc/standards/Moon Solar Source AM2_0.ssp diff --git a/examples/standards/NFRC_300_2003.std b/pywincalc/standards/NFRC_300_2003.std similarity index 100% rename from examples/standards/NFRC_300_2003.std rename to pywincalc/standards/NFRC_300_2003.std diff --git a/examples/standards/Optics5.wvl b/pywincalc/standards/Optics5.wvl similarity index 100% rename from examples/standards/Optics5.wvl rename to pywincalc/standards/Optics5.wvl diff --git a/examples/standards/Radiance.std b/pywincalc/standards/Radiance.std similarity index 100% rename from examples/standards/Radiance.std rename to pywincalc/standards/Radiance.std diff --git a/examples/standards/SAE J1796 Table 1.ssp b/pywincalc/standards/SAE J1796 Table 1.ssp similarity index 100% rename from examples/standards/SAE J1796 Table 1.ssp rename to pywincalc/standards/SAE J1796 Table 1.ssp diff --git a/examples/standards/SAE J1796 Table 2.ssp b/pywincalc/standards/SAE J1796 Table 2.ssp similarity index 100% rename from examples/standards/SAE J1796 Table 2.ssp rename to pywincalc/standards/SAE J1796 Table 2.ssp diff --git a/examples/standards/Sayre UV Source.ssp b/pywincalc/standards/Sayre UV Source.ssp similarity index 100% rename from examples/standards/Sayre UV Source.ssp rename to pywincalc/standards/Sayre UV Source.ssp diff --git a/examples/standards/W5_NFRC_2003.std b/pywincalc/standards/W5_NFRC_2003.std similarity index 100% rename from examples/standards/W5_NFRC_2003.std rename to pywincalc/standards/W5_NFRC_2003.std diff --git a/examples/standards/W7_G173_37Tilt_Direct.std b/pywincalc/standards/W7_G173_37Tilt_Direct.std similarity index 100% rename from examples/standards/W7_G173_37Tilt_Direct.std rename to pywincalc/standards/W7_G173_37Tilt_Direct.std diff --git a/examples/standards/W7_G173_37Tilt_Global.std b/pywincalc/standards/W7_G173_37Tilt_Global.std similarity index 100% rename from examples/standards/W7_G173_37Tilt_Global.std rename to pywincalc/standards/W7_G173_37Tilt_Global.std diff --git a/examples/standards/W7_G197_20Tilt_Direct.std b/pywincalc/standards/W7_G197_20Tilt_Direct.std similarity index 100% rename from examples/standards/W7_G197_20Tilt_Direct.std rename to pywincalc/standards/W7_G197_20Tilt_Direct.std diff --git a/examples/standards/W7_G197_20Tilt_Global.std b/pywincalc/standards/W7_G197_20Tilt_Global.std similarity index 100% rename from examples/standards/W7_G197_20Tilt_Global.std rename to pywincalc/standards/W7_G197_20Tilt_Global.std diff --git a/examples/standards/W7_G197_90Tilt_Direct.std b/pywincalc/standards/W7_G197_90Tilt_Direct.std similarity index 100% rename from examples/standards/W7_G197_90Tilt_Direct.std rename to pywincalc/standards/W7_G197_90Tilt_Direct.std diff --git a/examples/standards/W7_G197_90Tilt_Global.std b/pywincalc/standards/W7_G197_90Tilt_Global.std similarity index 100% rename from examples/standards/W7_G197_90Tilt_Global.std rename to pywincalc/standards/W7_G197_90Tilt_Global.std diff --git a/examples/standards/WINDOW4.std b/pywincalc/standards/WINDOW4.std similarity index 100% rename from examples/standards/WINDOW4.std rename to pywincalc/standards/WINDOW4.std diff --git a/examples/standards/mssccprj.scc b/pywincalc/standards/mssccprj.scc similarity index 100% rename from examples/standards/mssccprj.scc rename to pywincalc/standards/mssccprj.scc diff --git a/examples/standards/prEN 410 Table 2 AM1_0.ssp b/pywincalc/standards/prEN 410 Table 2 AM1_0.ssp similarity index 100% rename from examples/standards/prEN 410 Table 2 AM1_0.ssp rename to pywincalc/standards/prEN 410 Table 2 AM1_0.ssp diff --git a/examples/standards/prEN 410 Table 5 D65.ssp b/pywincalc/standards/prEN 410 Table 5 D65.ssp similarity index 100% rename from examples/standards/prEN 410 Table 5 D65.ssp rename to pywincalc/standards/prEN 410 Table 5 D65.ssp diff --git a/examples/standards/prEN 410 Table 6 1931 X.dsp b/pywincalc/standards/prEN 410 Table 6 1931 X.dsp similarity index 100% rename from examples/standards/prEN 410 Table 6 1931 X.dsp rename to pywincalc/standards/prEN 410 Table 6 1931 X.dsp diff --git a/examples/standards/prEN 410 Table 6 1931 Y.dsp b/pywincalc/standards/prEN 410 Table 6 1931 Y.dsp similarity index 100% rename from examples/standards/prEN 410 Table 6 1931 Y.dsp rename to pywincalc/standards/prEN 410 Table 6 1931 Y.dsp diff --git a/examples/standards/prEN 410 Table 6 1931 Z.dsp b/pywincalc/standards/prEN 410 Table 6 1931 Z.dsp similarity index 100% rename from examples/standards/prEN 410 Table 6 1931 Z.dsp rename to pywincalc/standards/prEN 410 Table 6 1931 Z.dsp diff --git a/examples/standards/prEN_410.std b/pywincalc/standards/prEN_410.std similarity index 100% rename from examples/standards/prEN_410.std rename to pywincalc/standards/prEN_410.std diff --git a/examples/standards/vssver.scc b/pywincalc/standards/vssver.scc similarity index 100% rename from examples/standards/vssver.scc rename to pywincalc/standards/vssver.scc diff --git a/pywincalc_class_documentation.html b/pywincalc_class_documentation.html index c29b811..eb7112f 100644 --- a/pywincalc_class_documentation.html +++ b/pywincalc_class_documentation.html @@ -8,7 +8,7 @@  
 
pywincalc
index
c:\users\dev\source\pywincalc_python3.10_x64\lib\site-packages\pywincalc.cp310-win_amd64.pyd
+>index
c:\users\dev\appdata\local\programs\python\python310\lib\site-packages\pywincalc.cp310-win_amd64.pyd

Python bindings for WinCalc

@@ -21,123 +21,142 @@
pybind11_builtins.pybind11_object(builtins.object)
-
AirHorizontalDirection -
BSDF -
BSDFBasisType -
BSDFHemisphere -
BoundaryConditionsCoefficientModelType -
CMABestWorstUFactors -
CMAResult -
CMAWindow +
AirHorizontalDirection +
BSDF +
BSDFBasisType +
BSDFDirection +
BSDFDirections +
BSDFHemisphere +
BSDFIntegrator +
BoundaryConditionsCoefficientModelType +
CMABestWorstUFactors +
CMAResult +
CMAWindow
-
CMAWindowDualVisionHorizontal -
CMAWindowDualVisionVertical -
CMAWindowSingleVision +
CMAWindowDualVisionHorizontal +
CMAWindowDualVisionVertical +
CMAWindowSingleVision
-
CoatedSide -
ColorResult -
CustomGasData -
CustomGasMixtureComponent -
DeflectionResults -
DistributionMethodType -
DualBandBSDF -
Environment -
Environments -
FlippableSolidLayer +
CoatedSide +
ColorResult +
DeflectionResults +
DistributionMethodType +
DualBandBSDF +
EffectiveOpenness +
Environment +
Environments +
FlippableSolidLayer
-
ProductDataThermal +
ProductDataThermal
-
Gap -
GasCoefficients -
GlazingSystem -
GlazingSystemDimensions -
IntegrationRule -
IntegrationRuleType -
Lab -
MaterialType -
OpticalMeasurementComponent -
OpticalResultAbsorptance -
OpticalResultFluxType -
OpticalResultFluxTypeColor -
OpticalResultLayer -
OpticalResultSide -
OpticalResultSideColor -
OpticalResultSide_Layer -
OpticalResultTransmission -
OpticalResultTransmissionColor -
OpticalResults -
OpticalResultsColor -
OpticalStandard -
OpticalStandardMethod -
PredefinedGasMixtureComponent -
PredefinedGasType -
ProductComposistionData -
ProductData +
Gas +
GasCoefficients +
GasData +
GlazingSystem +
GlazingSystemDimensions +
IGUGapLayer
-
ComposedProductData +
IGUGapLayerDeflection +
SupportPillar +
+
+
CircularPillar
-
ProductDataOptical +
+
+
IntegrationRule +
IntegrationRuleType +
Lab +
Layers +
MaterialType +
OpticalMeasurementComponent +
OpticalResultAbsorptance +
OpticalResultFluxType +
OpticalResultFluxTypeColor +
OpticalResultLayer +
OpticalResultSide +
OpticalResultSideColor +
OpticalResultSide_Layer +
OpticalResultTransmission +
OpticalResultTransmissionColor +
OpticalResults +
OpticalResultsColor +
OpticalStandard +
OpticalStandardMethod +
PVPowerProperty +
PVWavelengthData +
PerforatedGeometry +
PredefinedGasConverter +
PredefinedGasType +
ProductComposistionData +
ProductData +
ProductDataOptical
-
ProductDataOpticalDualBand +
ProductDataOpticalDualBand
-
ProductDataOpticalDualBandBSDF -
ProductDataOpticalDualBandHemispheric +
ProductDataOpticalDualBandBSDF +
ProductDataOpticalDualBandHemispheric
-
ProductDataOpticalNBand -
ProductDataOpticalWithMaterial +
ProductDataOpticalNBand +
ProductDataOpticalWithMaterial
-
ProductDataOpticalPerforatedScreen -
ProductDataOpticalVenetian -
ProductDataOpticalWovenShade +
ProductDataOpticalPerforatedScreen +
ProductDataOpticalVenetian +
ProductDataOpticalWovenShade
-
ProductDataOpticalAndThermal -
ProductGeometry +
ProductDataOpticalAndThermal +
ProductGeometry
-
PerforatedGeometry -
VenetianGeometry -
WovenGeometry +
ParsedPerforatedGeometry +
ParsedVenetianGeometry +
ParsedWovenGeometry
-
RGB -
SpectalDataWavelengthRangeMethodType -
Spectrum -
SpectrumType -
TarcogSystemType -
ThermalIRResults -
ThmxBoundaryCondition -
ThmxBoundaryConditionPolygon -
ThmxCMABestWorstOption -
ThmxCMAOptions -
ThmxFileContents -
ThmxMaterial -
ThmxMeshParameters -
ThmxPolygon -
ThmxPolygonPoint -
ThmxRGB -
ThmxResult -
ThmxUFactorProjectionResult -
ThmxUFactorResults -
Trichromatic -
WavelengthBSDFs -
WavelengthBoundary -
WavelengthBoundaryType -
WavelengthData -
WavelengthSet -
WavelengthSetType +
PropertySimple +
RGB +
Side +
SpectalDataWavelengthRangeMethodType +
Spectrum +
SpectrumType +
SquareMatrix +
TarcogSystemType +
ThermalIRResults +
ThmxBoundaryCondition +
ThmxBoundaryConditionPolygon +
ThmxCMABestWorstOption +
ThmxCMAOptions +
ThmxFileContents +
ThmxMaterial +
ThmxMeshParameters +
ThmxPolygon +
ThmxPolygonPoint +
ThmxRGB +
ThmxResult +
ThmxUFactorProjectionResult +
ThmxUFactorResults +
Trichromatic +
VenetianGeometry +
WavelengthBSDFs +
WavelengthBoundary +
WavelengthBoundaryType +
WavelengthData +
WavelengthSet +
WavelengthSetType +
WovenGeometry
@@ -149,7 +168,7 @@
    
Method resolution order:
-
AirHorizontalDirection
+
AirHorizontalDirection
pybind11_builtins.pybind11_object
builtins.object
@@ -212,7 +231,7 @@
    
Method resolution order:
-
BSDF
+
BSDF
pybind11_builtins.pybind11_object
builtins.object
@@ -240,7 +259,7 @@
    
Method resolution order:
-
BSDFBasisType
+
BSDFBasisType
pybind11_builtins.pybind11_object
builtins.object
@@ -297,6 +316,100 @@ Static methods inherited from pybind11_builtins.pybind11_object:
__new__(*args, **kwargs) from pybind11_builtins.pybind11_type
Create and return a new object.  See help(type) for accurate signature.
+

+ + + + + +
 
+class BSDFDirection(pybind11_builtins.pybind11_object)
    
Method resolution order:
+
BSDFDirection
+
pybind11_builtins.pybind11_object
+
builtins.object
+
+
+Methods defined here:
+
__eq__(...)
__eq__(self: object, other: object) -> bool
+ +
__ge__(...)
__ge__(self: object, other: object) -> bool
+ +
__getstate__(...)
__getstate__(self: object) -> int
+ +
__gt__(...)
__gt__(self: object, other: object) -> bool
+ +
__hash__(...)
__hash__(self: object) -> int
+ +
__index__(...)
__index__(self: pywincalc.BSDFDirection) -> int
+ +
__init__(...)
__init__(self: pywincalc.BSDFDirection, value: int) -> None
+ +
__int__(...)
__int__(self: pywincalc.BSDFDirection) -> int
+ +
__le__(...)
__le__(self: object, other: object) -> bool
+ +
__lt__(...)
__lt__(self: object, other: object) -> bool
+ +
__ne__(...)
__ne__(self: object, other: object) -> bool
+ +
__repr__(...)
__repr__(self: object) -> str
+ +
__setstate__(...)
__setstate__(self: pywincalc.BSDFDirection, state: int) -> None
+ +
__str__ = name(...)
name(self: handle) -> str
+ +
+Readonly properties defined here:
+
__members__
+
+
name
+
name(self: handle) -> str
+
+
value
+
+
+Data and other attributes defined here:
+
Incoming = <BSDFDirection.Incoming: 0>
+ +
Outgoing = <BSDFDirection.Outgoing: 1>
+ +
+Static methods inherited from pybind11_builtins.pybind11_object:
+
__new__(*args, **kwargs) from pybind11_builtins.pybind11_type
Create and return a new object.  See help(type) for accurate signature.
+ +

+ + + + + +
 
+class BSDFDirections(pybind11_builtins.pybind11_object)
    
Method resolution order:
+
BSDFDirections
+
pybind11_builtins.pybind11_object
+
builtins.object
+
+
+Methods defined here:
+
__init__(...)
__init__(*args, **kwargs)
+Overloaded function.

+1. __init__(self: pywincalc.BSDFDirections) -> None

+2. __init__(self: pywincalc.BSDFDirections, definitions: List[SingleLayerOptics::BSDFDefinition], side: pywincalc.BSDFDirection) -> None
+ +
get_nearest_beam_index(...)
get_nearest_beam_index(self: pywincalc.BSDFDirections, arg0: float, arg1: float) -> int
+ +
lambda_matrix(...)
lambda_matrix(self: pywincalc.BSDFDirections) -> pywincalc.SquareMatrix
+ +
lambda_vector(...)
lambda_vector(self: pywincalc.BSDFDirections) -> List[float]
+ +
profile_angles(...)
profile_angles(self: pywincalc.BSDFDirections) -> List[float]
+ +
+Static methods inherited from pybind11_builtins.pybind11_object:
+
__new__(*args, **kwargs) from pybind11_builtins.pybind11_type
Create and return a new object.  See help(type) for accurate signature.
+

@@ -305,7 +418,7 @@
    
Method resolution order:
-
BSDFHemisphere
+
BSDFHemisphere
pybind11_builtins.pybind11_object
builtins.object
@@ -313,7 +426,7 @@ Methods defined here:
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
-
get_directions(...)
get_directions(self: pywincalc.BSDFHemisphere, arg0: SingleLayerOptics::BSDFDirection) -> SingleLayerOptics::CBSDFDirections
+
get_directions(...)
get_directions(self: pywincalc.BSDFHemisphere, arg0: SingleLayerOptics::BSDFDirection) -> SingleLayerOptics::BSDFDirections

Static methods defined here:
@@ -323,6 +436,65 @@ Static methods inherited from pybind11_builtins.pybind11_object:
__new__(*args, **kwargs) from pybind11_builtins.pybind11_type
Create and return a new object.  See help(type) for accurate signature.
+

+ + + + + +
 
+class BSDFIntegrator(pybind11_builtins.pybind11_object)
    
Method resolution order:
+
BSDFIntegrator
+
pybind11_builtins.pybind11_object
+
builtins.object
+
+
+Methods defined here:
+
__init__(...)
__init__(self: pywincalc.BSDFIntegrator, directions: pywincalc.BSDFDirections) -> None
+ +
absorptance(...)
absorptance(*args, **kwargs)
+Overloaded function.

+1. absorptance(self: pywincalc.BSDFIntegrator, arg0: pywincalc.Side) -> List[float]

+2. absorptance(self: pywincalc.BSDFIntegrator, arg0: pywincalc.Side, arg1: float, arg2: float) -> float

+3. absorptance(self: pywincalc.BSDFIntegrator, arg0: pywincalc.Side, arg1: int) -> float
+ +
absorptance_diffuse_diffuse(...)
absorptance_diffuse_diffuse(self: pywincalc.BSDFIntegrator, arg0: pywincalc.Side) -> float
+ +
at(...)
at(self: pywincalc.BSDFIntegrator, arg0: pywincalc.Side, arg1: pywincalc.PropertySimple) -> pywincalc.SquareMatrix
+ +
diffuse_diffuse(...)
diffuse_diffuse(self: pywincalc.BSDFIntegrator, arg0: pywincalc.Side, arg1: pywincalc.PropertySimple) -> float
+ +
direct_direct(...)
direct_direct(*args, **kwargs)
+Overloaded function.

+1. direct_direct(self: pywincalc.BSDFIntegrator, arg0: pywincalc.Side, arg1: pywincalc.PropertySimple, arg2: float, arg3: float) -> float

+2. direct_direct(self: pywincalc.BSDFIntegrator, arg0: pywincalc.Side, arg1: pywincalc.PropertySimple, arg2: int) -> float
+ +
direct_hemispheric(...)
direct_hemispheric(*args, **kwargs)
+Overloaded function.

+1. direct_hemispheric(self: pywincalc.BSDFIntegrator, arg0: pywincalc.Side, arg1: pywincalc.PropertySimple) -> List[float]

+2. direct_hemispheric(self: pywincalc.BSDFIntegrator, arg0: pywincalc.Side, arg1: pywincalc.PropertySimple, arg2: float, arg3: float) -> float
+ +
get_matrix(...)
get_matrix(self: pywincalc.BSDFIntegrator, arg0: pywincalc.Side, arg1: pywincalc.PropertySimple) -> pywincalc.SquareMatrix
+ +
get_nearest_beam_index(...)
get_nearest_beam_index(self: pywincalc.BSDFIntegrator, arg0: float, arg1: float) -> int
+ +
lambda_matrix(...)
lambda_matrix(self: pywincalc.BSDFIntegrator) -> pywincalc.SquareMatrix
+ +
lambda_vector(...)
lambda_vector(self: pywincalc.BSDFIntegrator) -> List[float]
+ +
set_matrices(...)
set_matrices(self: pywincalc.BSDFIntegrator, arg0: pywincalc.SquareMatrix, arg1: pywincalc.SquareMatrix, arg2: pywincalc.Side) -> None
+ +
+Static methods inherited from pybind11_builtins.pybind11_object:
+
__new__(*args, **kwargs) from pybind11_builtins.pybind11_type
Create and return a new object.  See help(type) for accurate signature.
+

@@ -331,7 +503,7 @@
    
Method resolution order:
-
BoundaryConditionsCoefficientModelType
+
BoundaryConditionsCoefficientModelType
pybind11_builtins.pybind11_object
builtins.object
@@ -394,7 +566,7 @@
    
Method resolution order:
-
CMABestWorstUFactors
+
CMABestWorstUFactors
pybind11_builtins.pybind11_object
builtins.object
@@ -425,7 +597,7 @@
    
Method resolution order:
-
CMAResult
+
CMAResult
pybind11_builtins.pybind11_object
builtins.object
@@ -453,7 +625,7 @@
    
Method resolution order:
-
CMAWindow
+
CMAWindow
pybind11_builtins.pybind11_object
builtins.object
@@ -477,18 +649,18 @@ +class CMAWindowDualVisionHorizontal(CMAWindow)
 
-class CMAWindowDualVisionHorizontal(CMAWindow)
    
Method resolution order:
-
CMAWindowDualVisionHorizontal
-
CMAWindow
+
CMAWindowDualVisionHorizontal
+
CMAWindow
pybind11_builtins.pybind11_object
builtins.object

Methods defined here:
-
__init__(...)
__init__(self: pywincalc.CMAWindowDualVisionHorizontal, width: float, height: float, spacer_best_keff: float = 0.01, spacer_worst_keff: float = 10.0, best_u_factor_options: pywincalc.CMABestWorstUFactors = <pywincalc.CMABestWorstUFactors object at 0x00000247EB363BF0>, worst_u_factor_options: pywincalc.CMABestWorstUFactors = <pywincalc.CMABestWorstUFactors object at 0x00000247EB3625F0>) -> None
+
__init__(...)
__init__(self: pywincalc.CMAWindowDualVisionHorizontal, width: float, height: float, spacer_best_keff: float = 0.01, spacer_worst_keff: float = 10.0, best_u_factor_options: pywincalc.CMABestWorstUFactors = <pywincalc.CMABestWorstUFactors object at 0x000001F09E6FD830>, worst_u_factor_options: pywincalc.CMABestWorstUFactors = <pywincalc.CMABestWorstUFactors object at 0x000001F09E6FA630>) -> None
set_dividers(...)
set_dividers(self: pywincalc.CMAWindowDualVisionHorizontal, arg0: CMA::CMAFrame, arg1: int, arg2: int) -> None
@@ -507,7 +679,7 @@
set_frame_top_right(...)
set_frame_top_right(self: pywincalc.CMAWindowDualVisionHorizontal, arg0: CMA::CMAFrame) -> None

-Methods inherited from CMAWindow:
+Methods inherited from CMAWindow:
glazing_system_dimensions(...)
glazing_system_dimensions(self: pywincalc.CMAWindow) -> pywincalc.GlazingSystemDimensions
shgc(...)
shgc(self: pywincalc.CMAWindow, arg0: float, arg1: float) -> float
@@ -524,18 +696,18 @@ +class CMAWindowDualVisionVertical(CMAWindow)
 
-class CMAWindowDualVisionVertical(CMAWindow)
    
Method resolution order:
-
CMAWindowDualVisionVertical
-
CMAWindow
+
CMAWindowDualVisionVertical
+
CMAWindow
pybind11_builtins.pybind11_object
builtins.object

Methods defined here:
-
__init__(...)
__init__(self: pywincalc.CMAWindowDualVisionVertical, width: float, height: float, spacer_best_keff: float = 0.01, spacer_worst_keff: float = 10.0, best_u_factor_options: pywincalc.CMABestWorstUFactors = <pywincalc.CMABestWorstUFactors object at 0x00000247E9993230>, worst_u_factor_options: pywincalc.CMABestWorstUFactors = <pywincalc.CMABestWorstUFactors object at 0x00000247E9993B70>) -> None
+
__init__(...)
__init__(self: pywincalc.CMAWindowDualVisionVertical, width: float, height: float, spacer_best_keff: float = 0.01, spacer_worst_keff: float = 10.0, best_u_factor_options: pywincalc.CMABestWorstUFactors = <pywincalc.CMABestWorstUFactors object at 0x000001F0A00E97B0>, worst_u_factor_options: pywincalc.CMABestWorstUFactors = <pywincalc.CMABestWorstUFactors object at 0x000001F09E6FD870>) -> None
set_dividers(...)
set_dividers(self: pywincalc.CMAWindowDualVisionVertical, arg0: CMA::CMAFrame, arg1: int, arg2: int) -> None
@@ -554,7 +726,7 @@
set_frame_top_right(...)
set_frame_top_right(self: pywincalc.CMAWindowDualVisionVertical, arg0: CMA::CMAFrame) -> None

-Methods inherited from CMAWindow:
+Methods inherited from CMAWindow:
glazing_system_dimensions(...)
glazing_system_dimensions(self: pywincalc.CMAWindow) -> pywincalc.GlazingSystemDimensions
shgc(...)
shgc(self: pywincalc.CMAWindow, arg0: float, arg1: float) -> float
@@ -571,18 +743,18 @@ +class CMAWindowSingleVision(CMAWindow)
 
-class CMAWindowSingleVision(CMAWindow)
    
Method resolution order:
-
CMAWindowSingleVision
-
CMAWindow
+
CMAWindowSingleVision
+
CMAWindow
pybind11_builtins.pybind11_object
builtins.object

Methods defined here:
-
__init__(...)
__init__(self: pywincalc.CMAWindowSingleVision, width: float, height: float, spacer_best_keff: float = 0.01, spacer_worst_keff: float = 10.0, best_u_factor_options: pywincalc.CMABestWorstUFactors = <pywincalc.CMABestWorstUFactors object at 0x00000247EB3621F0>, worst_u_factor_options: pywincalc.CMABestWorstUFactors = <pywincalc.CMABestWorstUFactors object at 0x00000247EB362630>) -> None
+
__init__(...)
__init__(self: pywincalc.CMAWindowSingleVision, width: float, height: float, spacer_best_keff: float = 0.01, spacer_worst_keff: float = 10.0, best_u_factor_options: pywincalc.CMABestWorstUFactors = <pywincalc.CMABestWorstUFactors object at 0x000001F09E6FD270>, worst_u_factor_options: pywincalc.CMABestWorstUFactors = <pywincalc.CMABestWorstUFactors object at 0x000001F0A00BABF0>) -> None
set_dividers(...)
set_dividers(self: pywincalc.CMAWindowSingleVision, arg0: CMA::CMAFrame, arg1: int, arg2: int) -> None
@@ -595,7 +767,7 @@
set_frame_top(...)
set_frame_top(self: pywincalc.CMAWindowSingleVision, arg0: CMA::CMAFrame) -> None

-Methods inherited from CMAWindow:
+Methods inherited from CMAWindow:
glazing_system_dimensions(...)
glazing_system_dimensions(self: pywincalc.CMAWindow) -> pywincalc.GlazingSystemDimensions
shgc(...)
shgc(self: pywincalc.CMAWindow, arg0: float, arg1: float) -> float
@@ -608,6 +780,28 @@ Static methods inherited from pybind11_builtins.pybind11_object:
__new__(*args, **kwargs) from pybind11_builtins.pybind11_type
Create and return a new object.  See help(type) for accurate signature.
+

+ + + + + +
 
+class CircularPillar(SupportPillar)
    
Method resolution order:
+
CircularPillar
+
SupportPillar
+
IGUGapLayer
+
pybind11_builtins.pybind11_object
+
builtins.object
+
+
+Methods defined here:
+
__init__(...)
__init__(self: pywincalc.CircularPillar, gap_layer: pywincalc.IGUGapLayer, conductivity: float, spacing: float, radius: float) -> None
+ +
+Static methods inherited from pybind11_builtins.pybind11_object:
+
__new__(*args, **kwargs) from pybind11_builtins.pybind11_type
Create and return a new object.  See help(type) for accurate signature.
+

@@ -616,7 +810,7 @@
    
Method resolution order:
-
CoatedSide
+
CoatedSide
pybind11_builtins.pybind11_object
builtins.object
@@ -681,7 +875,7 @@
    
Method resolution order:
-
ColorResult
+
ColorResult
pybind11_builtins.pybind11_object
builtins.object
@@ -701,110 +895,6 @@ Static methods inherited from pybind11_builtins.pybind11_object:
__new__(*args, **kwargs) from pybind11_builtins.pybind11_type
Create and return a new object.  See help(type) for accurate signature.
-

- - - - - -
 
-class ComposedProductData(ProductData)
    
Method resolution order:
-
ComposedProductData
-
ProductData
-
pybind11_builtins.pybind11_object
-
builtins.object
-
-
-Methods defined here:
-
__init__(...)
__init__(*args, **kwargs)
-Overloaded function.

-1. __init__(self: pywincalc.ComposedProductData, solid_layers: pywincalc.ProductData, product_composition_data: pywincalc.ProductComposistionData) -> None

-2. __init__(self: pywincalc.ComposedProductData, product_composition_data: pywincalc.ProductComposistionData) -> None
- -
composed_product(...)
composed_product(self: pywincalc.ComposedProductData) -> pywincalc.ProductData
- -
-Data descriptors defined here:
-
product_composition_data
-
-
-Data descriptors inherited from ProductData:
-
conductivity
-
-
density
-
-
emissivity_back
-
-
emissivity_front
-
-
ir_transmittance
-
-
measurements
-
-
nfrc_id
-
-
permeability_factor
-
-
product_name
-
-
product_type
-
-
thickness
-
-
youngs_modulus
-
-
-Static methods inherited from pybind11_builtins.pybind11_object:
-
__new__(*args, **kwargs) from pybind11_builtins.pybind11_type
Create and return a new object.  See help(type) for accurate signature.
- -

- - - - - -
 
-class CustomGasData(pybind11_builtins.pybind11_object)
    
Method resolution order:
-
CustomGasData
-
pybind11_builtins.pybind11_object
-
builtins.object
-
-
-Methods defined here:
-
__init__(...)
__init__(self: pywincalc.CustomGasData, name: str, molecular_weight: float, specific_heat_ratio: float, Cp: pywincalc.GasCoefficients, thermal_conductivity: pywincalc.GasCoefficients, viscosity: pywincalc.GasCoefficients) -> None
- -
-Static methods inherited from pybind11_builtins.pybind11_object:
-
__new__(*args, **kwargs) from pybind11_builtins.pybind11_type
Create and return a new object.  See help(type) for accurate signature.
- -

- - - - - -
 
-class CustomGasMixtureComponent(pybind11_builtins.pybind11_object)
    
Method resolution order:
-
CustomGasMixtureComponent
-
pybind11_builtins.pybind11_object
-
builtins.object
-
-
-Methods defined here:
-
__init__(...)
__init__(self: pywincalc.CustomGasMixtureComponent, gas: pywincalc.CustomGasData, percent: float) -> None
- -
-Data descriptors defined here:
-
gas
-
-
percent
-
-
-Static methods inherited from pybind11_builtins.pybind11_object:
-
__new__(*args, **kwargs) from pybind11_builtins.pybind11_type
Create and return a new object.  See help(type) for accurate signature.
-

@@ -813,7 +903,7 @@
    
Method resolution order:
-
DeflectionResults
+
DeflectionResults
pybind11_builtins.pybind11_object
builtins.object
@@ -841,7 +931,7 @@
    
Method resolution order:
-
DistributionMethodType
+
DistributionMethodType
pybind11_builtins.pybind11_object
builtins.object
@@ -902,7 +992,7 @@
    
Method resolution order:
-
DualBandBSDF
+
DualBandBSDF
pybind11_builtins.pybind11_object
builtins.object
@@ -920,6 +1010,42 @@ Static methods inherited from pybind11_builtins.pybind11_object:
__new__(*args, **kwargs) from pybind11_builtins.pybind11_type
Create and return a new object.  See help(type) for accurate signature.
+

+ + + + + +
 
+class EffectiveOpenness(pybind11_builtins.pybind11_object)
    
Method resolution order:
+
EffectiveOpenness
+
pybind11_builtins.pybind11_object
+
builtins.object
+
+
+Methods defined here:
+
__init__(...)
__init__(self: pywincalc.EffectiveOpenness, ah: float, al: float, ar: float, atop: float, abot: float, front_porosity: float) -> None
+ +
is_closed(...)
is_closed(self: pywincalc.EffectiveOpenness) -> bool
+ +
+Data descriptors defined here:
+
abot
+
+
ah
+
+
al
+
+
ar
+
+
atop
+
+
front_porosity
+
+
+Static methods inherited from pybind11_builtins.pybind11_object:
+
__new__(*args, **kwargs) from pybind11_builtins.pybind11_type
Create and return a new object.  See help(type) for accurate signature.
+

@@ -928,7 +1054,7 @@
    
Method resolution order:
-
Environment
+
Environment
pybind11_builtins.pybind11_object
builtins.object
@@ -968,7 +1094,7 @@
    
Method resolution order:
-
Environments
+
Environments
pybind11_builtins.pybind11_object
builtins.object
@@ -994,7 +1120,7 @@
    
Method resolution order:
-
FlippableSolidLayer
+
FlippableSolidLayer
pybind11_builtins.pybind11_object
builtins.object
@@ -1016,38 +1142,34 @@ +class Gas(pybind11_builtins.pybind11_object)
 
-class Gap(pybind11_builtins.pybind11_object)
    
Method resolution order:
-
Gap
+
Gas
pybind11_builtins.pybind11_object
builtins.object

Methods defined here:
-
__init__(...)
__init__(*args, **kwargs)
+
__init__(...)
__init__(*args, **kwargs)
Overloaded function.
 
-1. __init__(self: pywincalc.Gap, custom_gas_data: pywincalc.CustomGasData, thickness_meters: float) -> None

-2. __init__(self: pywincalc.Gap, engine_gas_mixture_component_list: List[pywincalc.CustomGasMixtureComponent], thickness_meters: float) -> None

-3. __init__(self: pywincalc.Gap, predefined_gas_type: pywincalc.PredefinedGasType, thickness_meters: float) -> None
+1. __init__(self: pywincalc.Gas, gases: List[Tuple[float, pywincalc.GasData]]) -> None
 
-4. __init__(self: pywincalc.Gap, predefined_gas_type_list: List[pywincalc.PredefinedGasMixtureComponent], thickness_meters: float) -> None

-5. __init__(self: pywincalc.Gap, gas_list: List[Union[pywincalc.PredefinedGasMixtureComponent, pywincalc.CustomGasMixtureComponent]], thickness_meters: float) -> None
+2. __init__(self: pywincalc.Gas, gases: List[Tuple[float, pywincalc.PredefinedGasType]]) -> None
+ +
gas_items(...)
gas_items(self: pywincalc.Gas) -> List[Gases::CGasItem]
+ +
get_gas_properties(...)
get_gas_properties(self: pywincalc.Gas) -> Gases::GasProperties
+ +
get_simple_gas_properties(...)
get_simple_gas_properties(self: pywincalc.Gas) -> Gases::GasProperties
+ +
set_temperature_and_pressure(...)
set_temperature_and_pressure(self: pywincalc.Gas, arg0: float, arg1: float) -> None
-
-Data descriptors defined here:
-
gases
-
-
thickness
-

Static methods inherited from pybind11_builtins.pybind11_object:
-
__new__(*args, **kwargs) from pybind11_builtins.pybind11_type
Create and return a new object.  See help(type) for accurate signature.
+
__new__(*args, **kwargs) from pybind11_builtins.pybind11_type
Create and return a new object.  See help(type) for accurate signature.

@@ -1057,7 +1179,7 @@
    
Method resolution order:
-
GasCoefficients
+
GasCoefficients
pybind11_builtins.pybind11_object
builtins.object
@@ -1069,6 +1191,34 @@ Static methods inherited from pybind11_builtins.pybind11_object:
__new__(*args, **kwargs) from pybind11_builtins.pybind11_type
Create and return a new object.  See help(type) for accurate signature.
+

+ + + + + +
 
+class GasData(pybind11_builtins.pybind11_object)
    
Method resolution order:
+
GasData
+
pybind11_builtins.pybind11_object
+
builtins.object
+
+
+Methods defined here:
+
__init__(...)
__init__(self: pywincalc.GasData, name: str, molecular_weight: float, specific_heat_ratio: float, Cp: pywincalc.GasCoefficients, thermal_conductivity: pywincalc.GasCoefficients, viscosity: pywincalc.GasCoefficients) -> None
+ +
get_molecular_weight(...)
get_molecular_weight(self: pywincalc.GasData) -> float
+ +
get_property_value(...)
get_property_value(self: pywincalc.GasData, type: Gases::CoeffType, temperature: float) -> float
+ +
get_specific_heat_ratio(...)
get_specific_heat_ratio(self: pywincalc.GasData) -> float
+ +
name(...)
name(self: pywincalc.GasData) -> str
+ +
+Static methods inherited from pybind11_builtins.pybind11_object:
+
__new__(*args, **kwargs) from pybind11_builtins.pybind11_type
Create and return a new object.  See help(type) for accurate signature.
+

@@ -1077,7 +1227,7 @@
    
Method resolution order:
-
GlazingSystem
+
GlazingSystem
pybind11_builtins.pybind11_object
builtins.object
@@ -1086,11 +1236,11 @@
__init__(...)
__init__(*args, **kwargs)
Overloaded function.
 
-1. __init__(self: pywincalc.GlazingSystem, optical_standard: pywincalc.OpticalStandard, solid_layers: List[pywincalc.ProductDataOpticalAndThermal], gap_layers: List[pywincalc.Gap] = [], width_meters: float = 1.0, height_meters: float = 1.0, tilt_degrees: float = 90, environment: pywincalc.Environments = <pywincalc.Environments object at 0x00000247EB3705F0>, bsdf_hemisphere: Optional[pywincalc.BSDFHemisphere] = None, spectral_data_wavelength_range_method: pywincalc.SpectalDataWavelengthRangeMethodType = <SpectalDataWavelengthRangeMethodType.FULL: 0>, number_visible_bands: int = 5, number_solar_bands: int = 10) -> None
+1. __init__(self: pywincalc.GlazingSystem, optical_standard: pywincalc.OpticalStandard, solid_layers: List[pywincalc.ProductDataOpticalAndThermal], gap_layers: List[pywincalc.IGUGapLayer] = [], width_meters: float = 1.0, height_meters: float = 1.0, tilt_degrees: float = 90, environment: pywincalc.Environments = <pywincalc.Environments object at 0x000001F0A00D3770>, bsdf_hemisphere: Optional[pywincalc.BSDFHemisphere] = None, spectral_data_wavelength_range_method: pywincalc.SpectalDataWavelengthRangeMethodType = <SpectalDataWavelengthRangeMethodType.FULL: 0>, number_visible_bands: int = 5, number_solar_bands: int = 10) -> None
 
-2. __init__(self: pywincalc.GlazingSystem, optical_standard: pywincalc.OpticalStandard, solid_layers: List[pywincalc.ProductData], gap_layers: List[pywincalc.Gap] = [], width_meters: float = 1.0, height_meters: float = 1.0, tilt_degrees: float = 90, environment: pywincalc.Environments = <pywincalc.Environments object at 0x00000247EB370970>, bsdf_hemisphere: Optional[pywincalc.BSDFHemisphere] = None, spectral_data_wavelength_range_method: pywincalc.SpectalDataWavelengthRangeMethodType = <SpectalDataWavelengthRangeMethodType.FULL: 0>, number_visible_bands: int = 5, number_solar_bands: int = 10) -> None
+2. __init__(self: pywincalc.GlazingSystem, optical_standard: pywincalc.OpticalStandard, solid_layers: List[pywincalc.ProductData], gap_layers: List[pywincalc.IGUGapLayer] = [], width_meters: float = 1.0, height_meters: float = 1.0, tilt_degrees: float = 90, environment: pywincalc.Environments = <pywincalc.Environments object at 0x000001F0A00C2930>, bsdf_hemisphere: Optional[pywincalc.BSDFHemisphere] = None, spectral_data_wavelength_range_method: pywincalc.SpectalDataWavelengthRangeMethodType = <SpectalDataWavelengthRangeMethodType.FULL: 0>, number_visible_bands: int = 5, number_solar_bands: int = 10) -> None
 
-3. __init__(self: pywincalc.GlazingSystem, optical_standard: pywincalc.OpticalStandard, solid_layers: List[Union[pywincalc.ProductData, pywincalc.ProductDataOpticalAndThermal]], gap_layers: List[pywincalc.Gap] = [], width_meters: float = 1.0, height_meters: float = 1.0, tilt_degrees: float = 90, environment: pywincalc.Environments = <pywincalc.Environments object at 0x00000247EB370BB0>, bsdf_hemisphere: Optional[pywincalc.BSDFHemisphere] = None, spectral_data_wavelength_range_method: pywincalc.SpectalDataWavelengthRangeMethodType = <SpectalDataWavelengthRangeMethodType.FULL: 0>, number_visible_bands: int = 5, number_solar_bands: int = 10) -> None
+3. __init__(self: pywincalc.GlazingSystem, optical_standard: pywincalc.OpticalStandard, solid_layers: List[Union[pywincalc.ProductData, pywincalc.ProductDataOpticalAndThermal]], gap_layers: List[pywincalc.IGUGapLayer] = [], width_meters: float = 1.0, height_meters: float = 1.0, tilt_degrees: float = 90, environment: pywincalc.Environments = <pywincalc.Environments object at 0x000001F09E6F8570>, bsdf_hemisphere: Optional[pywincalc.BSDFHemisphere] = None, spectral_data_wavelength_range_method: pywincalc.SpectalDataWavelengthRangeMethodType = <SpectalDataWavelengthRangeMethodType.FULL: 0>, number_visible_bands: int = 5, number_solar_bands: int = 10) -> None
calc_deflection_properties(...)
calc_deflection_properties(self: pywincalc.GlazingSystem, system_type: pywincalc.TarcogSystemType, theta: float = 0, phi: float = 0) -> pywincalc.DeflectionResults
@@ -1152,7 +1302,7 @@
    
Method resolution order:
-
GlazingSystemDimensions
+
GlazingSystemDimensions
pybind11_builtins.pybind11_object
builtins.object
@@ -1170,6 +1320,52 @@ Static methods inherited from pybind11_builtins.pybind11_object:
__new__(*args, **kwargs) from pybind11_builtins.pybind11_type
Create and return a new object.  See help(type) for accurate signature.
+

+ + + + + +
 
+class IGUGapLayer(pybind11_builtins.pybind11_object)
    
Method resolution order:
+
IGUGapLayer
+
pybind11_builtins.pybind11_object
+
builtins.object
+
+
+Methods defined here:
+
__init__(...)
__init__(*args, **kwargs)
+Overloaded function.

+1. __init__(self: pywincalc.IGUGapLayer, thickness: float, pressure: float) -> None

+2. __init__(self: pywincalc.IGUGapLayer, thickness: float, pressure: float, gas: pywincalc.Gas) -> None
+ +
+Static methods inherited from pybind11_builtins.pybind11_object:
+
__new__(*args, **kwargs) from pybind11_builtins.pybind11_type
Create and return a new object.  See help(type) for accurate signature.
+ +

+ + + + + +
 
+class IGUGapLayerDeflection(IGUGapLayer)
    
Method resolution order:
+
IGUGapLayerDeflection
+
IGUGapLayer
+
pybind11_builtins.pybind11_object
+
builtins.object
+
+
+Methods defined here:
+
__init__(...)
__init__(self: pywincalc.IGUGapLayerDeflection, gap_layer: pywincalc.IGUGapLayer, temperature_initial: float, pressure_initial: float) -> None
+ +
+Static methods inherited from pybind11_builtins.pybind11_object:
+
__new__(*args, **kwargs) from pybind11_builtins.pybind11_type
Create and return a new object.  See help(type) for accurate signature.
+

@@ -1178,7 +1374,7 @@
    
Method resolution order:
-
IntegrationRule
+
IntegrationRule
pybind11_builtins.pybind11_object
builtins.object
@@ -1204,7 +1400,7 @@
    
Method resolution order:
-
IntegrationRuleType
+
IntegrationRuleType
pybind11_builtins.pybind11_object
builtins.object
@@ -1267,7 +1463,7 @@
    
Method resolution order:
-
Lab
+
Lab
pybind11_builtins.pybind11_object
builtins.object
@@ -1287,6 +1483,55 @@ Static methods inherited from pybind11_builtins.pybind11_object:
__new__(*args, **kwargs) from pybind11_builtins.pybind11_type
Create and return a new object.  See help(type) for accurate signature.
+

+ + + + + +
 
+class Layers(pybind11_builtins.pybind11_object)
    
Method resolution order:
+
Layers
+
pybind11_builtins.pybind11_object
+
builtins.object
+
+
+Methods defined here:
+
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
+ +
+Static methods defined here:
+
add_circular_pillar(...) from builtins.PyCapsule
add_circular_pillar(gap: pywincalc.IGUGapLayer, conductivity: float, spacing: float, radius: float) -> pywincalc.IGUGapLayer

+Static function to add a circular pillar to a Tarcog gap
+ +
gap(...) from builtins.PyCapsule
gap(*args, **kwargs)
+Overloaded function.

+1. gap(thickness: float, pressure: float = 101325) -> pywincalc.IGUGapLayer

+Factory function to create a Tarcog air gap

+2. gap(thickness: float, gas: pywincalc.Gas, pressure: float = 101325) -> pywincalc.IGUGapLayer

+Factory function to create a Tarcog gap from a gas
+ +
shading(...) from builtins.PyCapsule
shading(thickness: float, conductivity: float, effective_openness: pywincalc.EffectiveOpenness = <pywincalc.EffectiveOpenness object at 0x000001F0A00EBDB0>, front_emissivity: float = 0.84, front_transmittance: float = 0.0, back_emissivity: float = 0.84, back_transmittance: float = 0.0) -> Tarcog::ISO15099::CIGUSolidLayer

+Factory function to create a Tarcog shading layer.
+ +
solid(...) from builtins.PyCapsule
solid(thickness: float, conductivity: float, frontEmissivity: float = 0.84, frontIRTransmittance: float = 0.0, backEmissivity: float = 0.84, backIRTransmittance: float = 0.0) -> Tarcog::ISO15099::CIGUSolidLayer

+Factory method for creating a solid Tarcog layer
+ +
update_material_data(...) from builtins.PyCapsule
update_material_data(layer: Tarcog::ISO15099::CIGUSolidLayer, density: float = 2500.0, youngs_modulus: float = 72000000000.0) -> Tarcog::ISO15099::CIGUSolidLayer

+Static method for updating the material information for a solid Tarcog layer.
+ +
+Static methods inherited from pybind11_builtins.pybind11_object:
+
__new__(*args, **kwargs) from pybind11_builtins.pybind11_type
Create and return a new object.  See help(type) for accurate signature.
+

@@ -1295,7 +1540,7 @@
    
Method resolution order:
-
MaterialType
+
MaterialType
pybind11_builtins.pybind11_object
builtins.object
@@ -1368,7 +1613,7 @@
    
Method resolution order:
-
OpticalMeasurementComponent
+
OpticalMeasurementComponent
pybind11_builtins.pybind11_object
builtins.object
@@ -1398,7 +1643,7 @@
    
Method resolution order:
-
OpticalResultAbsorptance
+
OpticalResultAbsorptance
pybind11_builtins.pybind11_object
builtins.object
@@ -1410,10 +1655,28 @@ Data descriptors defined here:
__dict__
+
angular_electricity
+
+
angular_heat
+
+
angular_total
+
diffuse
direct
+
electricity_diffuse
+
+
electricity_direct
+
+
heat_diffuse
+
+
heat_direct
+
+
total_diffuse
+
+
total_direct
+

Static methods inherited from pybind11_builtins.pybind11_object:
__new__(*args, **kwargs) from pybind11_builtins.pybind11_type
Create and return a new object.  See help(type) for accurate signature.
@@ -1426,7 +1689,7 @@
    
Method resolution order:
-
OpticalResultFluxType
+
OpticalResultFluxType
pybind11_builtins.pybind11_object
builtins.object
@@ -1460,7 +1723,7 @@
    
Method resolution order:
-
OpticalResultFluxTypeColor
+
OpticalResultFluxTypeColor
pybind11_builtins.pybind11_object
builtins.object
@@ -1494,7 +1757,7 @@
    
Method resolution order:
-
OpticalResultLayer
+
OpticalResultLayer
pybind11_builtins.pybind11_object
builtins.object
@@ -1520,7 +1783,7 @@
    
Method resolution order:
-
OpticalResultSide
+
OpticalResultSide
pybind11_builtins.pybind11_object
builtins.object
@@ -1548,7 +1811,7 @@
    
Method resolution order:
-
OpticalResultSideColor
+
OpticalResultSideColor
pybind11_builtins.pybind11_object
builtins.object
@@ -1576,7 +1839,7 @@
    
Method resolution order:
-
OpticalResultSide_Layer
+
OpticalResultSide_Layer
pybind11_builtins.pybind11_object
builtins.object
@@ -1604,7 +1867,7 @@
    
Method resolution order:
-
OpticalResultTransmission
+
OpticalResultTransmission
pybind11_builtins.pybind11_object
builtins.object
@@ -1632,7 +1895,7 @@
    
Method resolution order:
-
OpticalResultTransmissionColor
+
OpticalResultTransmissionColor
pybind11_builtins.pybind11_object
builtins.object
@@ -1660,139 +1923,287 @@
    
Method resolution order:
-
OpticalResults
+
OpticalResults
+
pybind11_builtins.pybind11_object
+
builtins.object
+
+
+Methods defined here:
+
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
+ +
+Data descriptors defined here:
+
__dict__
+
+
layer_results
+
A list of results where each item in the list contains the results for one layer in the system.
+
+
system_results
+
Results for the entire system.
+
+
+Static methods inherited from pybind11_builtins.pybind11_object:
+
__new__(*args, **kwargs) from pybind11_builtins.pybind11_type
Create and return a new object.  See help(type) for accurate signature.
+ +

+ + + + + +
 
+class OpticalResultsColor(pybind11_builtins.pybind11_object)
    
Method resolution order:
+
OpticalResultsColor
+
pybind11_builtins.pybind11_object
+
builtins.object
+
+
+Methods defined here:
+
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
+ +
+Data descriptors defined here:
+
__dict__
+
+
system_results
+
Results for the entire system.  Layer results for colors are not currently supported.
+
+
+Static methods inherited from pybind11_builtins.pybind11_object:
+
__new__(*args, **kwargs) from pybind11_builtins.pybind11_type
Create and return a new object.  See help(type) for accurate signature.
+ +

+ + + + + +
 
+class OpticalStandard(pybind11_builtins.pybind11_object)
    
Method resolution order:
+
OpticalStandard
+
pybind11_builtins.pybind11_object
+
builtins.object
+
+
+Methods defined here:
+
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
+ +
+Data descriptors defined here:
+
description
+
+
file
+
+
methods
+
+
name
+
+
+Static methods inherited from pybind11_builtins.pybind11_object:
+
__new__(*args, **kwargs) from pybind11_builtins.pybind11_type
Create and return a new object.  See help(type) for accurate signature.
+ +

+ + + + + +
 
+class OpticalStandardMethod(pybind11_builtins.pybind11_object)
    
Method resolution order:
+
OpticalStandardMethod
+
pybind11_builtins.pybind11_object
+
builtins.object
+
+
+Methods defined here:
+
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
+ +
+Data descriptors defined here:
+
description
+
+
detector_spectrum
+
+
integration_rule
+
+
max_wavelength
+
+
min_wavelength
+
+
name
+
+
source_spectrum
+
+
wavelength_set
+
+
+Static methods inherited from pybind11_builtins.pybind11_object:
+
__new__(*args, **kwargs) from pybind11_builtins.pybind11_type
Create and return a new object.  See help(type) for accurate signature.
+ +

+ + + + + +
 
+class PVPowerProperty(pybind11_builtins.pybind11_object)
    
Method resolution order:
+
PVPowerProperty
+
pybind11_builtins.pybind11_object
+
builtins.object
+
+
+Methods defined here:
+
__init__(...)
__init__(self: pywincalc.PVPowerProperty, jsc: float, voc: float, ff: float) -> None
+ +
+Data descriptors defined here:
+
ff
+
+
jsc
+
+
voc
+
+
+Static methods inherited from pybind11_builtins.pybind11_object:
+
__new__(*args, **kwargs) from pybind11_builtins.pybind11_type
Create and return a new object.  See help(type) for accurate signature.
+ +

+ + + + + +
 
+class PVWavelengthData(pybind11_builtins.pybind11_object)
    
Method resolution order:
+
PVWavelengthData
pybind11_builtins.pybind11_object
builtins.object

Methods defined here:
-
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
+
__init__(...)
__init__(self: pywincalc.PVWavelengthData, eqe_front: float, eqe_back: float) -> None

Data descriptors defined here:
-
__dict__
-
-
layer_results
-
A list of results where each item in the list contains the results for one layer in the system.
+
eqe_back
-
system_results
-
Results for the entire system.
+
eqq_front

Static methods inherited from pybind11_builtins.pybind11_object:
-
__new__(*args, **kwargs) from pybind11_builtins.pybind11_type
Create and return a new object.  See help(type) for accurate signature.
+
__new__(*args, **kwargs) from pybind11_builtins.pybind11_type
Create and return a new object.  See help(type) for accurate signature.

+class ParsedPerforatedGeometry(ProductGeometry)
 
-class OpticalResultsColor(pybind11_builtins.pybind11_object)
    
Method resolution order:
-
OpticalResultsColor
+
ParsedPerforatedGeometry
+
ProductGeometry
pybind11_builtins.pybind11_object
builtins.object

Methods defined here:
-
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
+
__init__(...)
__init__(self: pywincalc.ParsedPerforatedGeometry, spacing_x_meters: float, spacing_y_meters: float, dimension_x_meters: float, dimension_y_meters: float, perforation_type: str) -> None

Data descriptors defined here:
-
__dict__
+
dimension_x
-
system_results
-
Results for the entire system.  Layer results for colors are not currently supported.
+
dimension_y
+
+
perforation_type
+
+
spacing_x
+
+
spacing_y

Static methods inherited from pybind11_builtins.pybind11_object:
-
__new__(*args, **kwargs) from pybind11_builtins.pybind11_type
Create and return a new object.  See help(type) for accurate signature.
+
__new__(*args, **kwargs) from pybind11_builtins.pybind11_type
Create and return a new object.  See help(type) for accurate signature.

+class ParsedVenetianGeometry(ProductGeometry)
 
-class OpticalStandard(pybind11_builtins.pybind11_object)
    
Method resolution order:
-
OpticalStandard
+
ParsedVenetianGeometry
+
ProductGeometry
pybind11_builtins.pybind11_object
builtins.object

Methods defined here:
-
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
+
__init__(...)
__init__(self: pywincalc.ParsedVenetianGeometry, slat_width: float, slat_spacing: float, slat_curvature: float, slat_tilt: float = 0, tilt_choice: str = '0', number_segments: int = 5) -> None

Data descriptors defined here:
-
description
+
number_segments
-
file
+
slat_curvature
-
methods
+
slat_spacing
-
name
+
slat_tilt
+
+
slat_width

Static methods inherited from pybind11_builtins.pybind11_object:
-
__new__(*args, **kwargs) from pybind11_builtins.pybind11_type
Create and return a new object.  See help(type) for accurate signature.
+
__new__(*args, **kwargs) from pybind11_builtins.pybind11_type
Create and return a new object.  See help(type) for accurate signature.

+class ParsedWovenGeometry(ProductGeometry)
 
-class OpticalStandardMethod(pybind11_builtins.pybind11_object)
    
Method resolution order:
-
OpticalStandardMethod
+
ParsedWovenGeometry
+
ProductGeometry
pybind11_builtins.pybind11_object
builtins.object

Methods defined here:
-
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
+
__init__(...)
__init__(self: pywincalc.ParsedWovenGeometry, arg0: float, arg1: float, arg2: float) -> None

Data descriptors defined here:
-
description
-
-
detector_spectrum
-
-
integration_rule
-
-
max_wavelength
-
-
min_wavelength
-
-
name
+
shade_thickness
-
source_spectrum
+
thread_diameter
-
wavelength_set
+
thread_spacing

Static methods inherited from pybind11_builtins.pybind11_object:
-
__new__(*args, **kwargs) from pybind11_builtins.pybind11_type
Create and return a new object.  See help(type) for accurate signature.
+
__new__(*args, **kwargs) from pybind11_builtins.pybind11_type
Create and return a new object.  See help(type) for accurate signature.

+class PerforatedGeometry(pybind11_builtins.pybind11_object)
 
-class PerforatedGeometry(ProductGeometry)
    
Method resolution order:
-
PerforatedGeometry
-
ProductGeometry
+
PerforatedGeometry
pybind11_builtins.pybind11_object
builtins.object

Methods defined here:
-
__init__(...)
__init__(self: pywincalc.PerforatedGeometry, spacing_x_meters: float, spacing_y_meters: float, dimension_x_meters: float, dimension_y_meters: float, perforation_type: str) -> None
+
__init__(...)
__init__(self: pywincalc.PerforatedGeometry, spacing_x: float, spacing_y: float, dimension_x: float, dimension_y: float, perforation_type: wincalc::Perforated_Geometry::Type) -> None

Data descriptors defined here:
@@ -1806,6 +2217,10 @@
spacing_y
+
+Data and other attributes defined here:
+
Type = <class 'pywincalc.PerforatedGeometry.Type'>
+
Static methods inherited from pybind11_builtins.pybind11_object:
__new__(*args, **kwargs) from pybind11_builtins.pybind11_type
Create and return a new object.  See help(type) for accurate signature.
@@ -1814,27 +2229,27 @@ +class PredefinedGasConverter(pybind11_builtins.pybind11_object)
 
-class PredefinedGasMixtureComponent(pybind11_builtins.pybind11_object)
    
Method resolution order:
-
PredefinedGasMixtureComponent
+
PredefinedGasConverter
pybind11_builtins.pybind11_object
builtins.object

Methods defined here:
-
__init__(...)
__init__(self: pywincalc.PredefinedGasMixtureComponent, gas: pywincalc.PredefinedGasType, percent: float) -> None
+
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
+ +
get(...)
get(self: pywincalc.PredefinedGasConverter, arg0: pywincalc.PredefinedGasType) -> pywincalc.GasData

-Data descriptors defined here:
-
gas
-
-
percent
-
+Static methods defined here:
+
instance(...) from builtins.PyCapsule
instance() -> pywincalc.PredefinedGasConverter
+
Static methods inherited from pybind11_builtins.pybind11_object:
-
__new__(*args, **kwargs) from pybind11_builtins.pybind11_type
Create and return a new object.  See help(type) for accurate signature.
+
__new__(*args, **kwargs) from pybind11_builtins.pybind11_type
Create and return a new object.  See help(type) for accurate signature.

@@ -1844,7 +2259,7 @@
    
Method resolution order:
-
PredefinedGasType
+
PredefinedGasType
pybind11_builtins.pybind11_object
builtins.object
@@ -1909,7 +2324,7 @@
    
Method resolution order:
-
ProductComposistionData
+
ProductComposistionData
pybind11_builtins.pybind11_object
builtins.object
@@ -1935,7 +2350,7 @@
    
Method resolution order:
-
ProductData
+
ProductData
pybind11_builtins.pybind11_object
builtins.object
@@ -1943,10 +2358,10 @@ Methods defined here:
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
-
composed_product(...)
composed_product(self: pywincalc.ProductData) -> pywincalc.ProductData
-
Data descriptors defined here:
+
composition
+
conductivity
density
@@ -1967,6 +2382,8 @@
product_type
+
pv_power_properties
+
thickness
youngs_modulus
@@ -1983,7 +2400,7 @@
    
Method resolution order:
-
ProductDataOptical
+
ProductDataOptical
pybind11_builtins.pybind11_object
builtins.object
@@ -2019,13 +2436,13 @@
    
Method resolution order:
-
ProductDataOpticalAndThermal
+
ProductDataOpticalAndThermal
pybind11_builtins.pybind11_object
builtins.object

Methods defined here:
-
__init__(...)
__init__(self: pywincalc.ProductDataOpticalAndThermal, prouct_data_optical: pywincalc.ProductDataOptical, product_data_thermal: pywincalc.ProductDataThermal) -> None
+
__init__(...)
__init__(self: pywincalc.ProductDataOpticalAndThermal, product_data_optical: pywincalc.ProductDataOptical, product_data_thermal: pywincalc.ProductDataThermal) -> None

Data descriptors defined here:
@@ -2041,12 +2458,12 @@ +class ProductDataOpticalDualBand(ProductDataOptical)
 
-class ProductDataOpticalDualBand(ProductDataOptical)
    
Method resolution order:
-
ProductDataOpticalDualBand
-
ProductDataOptical
+
ProductDataOpticalDualBand
+
ProductDataOptical
pybind11_builtins.pybind11_object
builtins.object
@@ -2057,11 +2474,11 @@
wavelengths(...)
wavelengths(self: pywincalc.ProductDataOpticalDualBand) -> List[float]

-Methods inherited from ProductDataOptical:
+Methods inherited from ProductDataOptical:
effective_thermal_values(...)
effective_thermal_values(self: pywincalc.ProductDataOptical, arg0: float, arg1: float, arg2: float, arg3: float, arg4: float, arg5: float) -> EffectiveLayers::EffectiveLayer

-Data descriptors inherited from ProductDataOptical:
+Data descriptors inherited from ProductDataOptical:
emissivity_back
emissivity_front
@@ -2080,19 +2497,19 @@ +class ProductDataOpticalDualBandBSDF(ProductDataOpticalDualBand)
 
-class ProductDataOpticalDualBandBSDF(ProductDataOpticalDualBand)
    
Method resolution order:
-
ProductDataOpticalDualBandBSDF
-
ProductDataOpticalDualBand
-
ProductDataOptical
+
ProductDataOpticalDualBandBSDF
+
ProductDataOpticalDualBand
+
ProductDataOptical
pybind11_builtins.pybind11_object
builtins.object

Methods defined here:
-
__init__(...)
__init__(self: pywincalc.ProductDataOpticalDualBandBSDF, solar_transmittance_front: List[List[float]], solar_transmittance_back: List[List[float]], solar_reflectance_front: List[List[float]], solar_reflectance_back: List[List[float]], visible_transmittance_front: List[List[float]], visible_transmittance_back: List[List[float]], visible_reflectance_front: List[List[float]], visible_reflectance_back: List[List[float]], bsdf_hemisphere: SingleLayerOptics::CBSDFHemisphere, thickness_meters: float, ir_transmittance_front: Optional[float] = None, ir_transmittance_back: Optional[float] = None, emissivity_front: Optional[float] = None, emissivity_back: Optional[float] = None, permeability_factor: float = 0.0, flipped: bool = False) -> None
+
__init__(...)
__init__(self: pywincalc.ProductDataOpticalDualBandBSDF, solar_transmittance_front: List[List[float]], solar_transmittance_back: List[List[float]], solar_reflectance_front: List[List[float]], solar_reflectance_back: List[List[float]], visible_transmittance_front: List[List[float]], visible_transmittance_back: List[List[float]], visible_reflectance_front: List[List[float]], visible_reflectance_back: List[List[float]], bsdf_hemisphere: SingleLayerOptics::BSDFHemisphere, thickness_meters: float, ir_transmittance_front: Optional[float] = None, ir_transmittance_back: Optional[float] = None, emissivity_front: Optional[float] = None, emissivity_back: Optional[float] = None, permeability_factor: float = 0.0, flipped: bool = False) -> None
effective_thermal_values(...)
effective_thermal_values(self: pywincalc.ProductDataOpticalDualBandBSDF, arg0: float, arg1: float, arg2: float, arg3: float, arg4: float, arg5: float) -> EffectiveLayers::EffectiveLayer
@@ -2115,11 +2532,11 @@
visible_transmittance_front

-Methods inherited from ProductDataOpticalDualBand:
+Methods inherited from ProductDataOpticalDualBand:
wavelengths(...)
wavelengths(self: pywincalc.ProductDataOpticalDualBand) -> List[float]

-Data descriptors inherited from ProductDataOptical:
+Data descriptors inherited from ProductDataOptical:
emissivity_back
emissivity_front
@@ -2138,13 +2555,13 @@ +class ProductDataOpticalDualBandHemispheric(ProductDataOpticalDualBand)
 
-class ProductDataOpticalDualBandHemispheric(ProductDataOpticalDualBand)
    
Method resolution order:
-
ProductDataOpticalDualBandHemispheric
-
ProductDataOpticalDualBand
-
ProductDataOptical
+
ProductDataOpticalDualBandHemispheric
+
ProductDataOpticalDualBand
+
ProductDataOptical
pybind11_builtins.pybind11_object
builtins.object
@@ -2171,15 +2588,15 @@
visible_transmittance_front

-Methods inherited from ProductDataOpticalDualBand:
+Methods inherited from ProductDataOpticalDualBand:
wavelengths(...)
wavelengths(self: pywincalc.ProductDataOpticalDualBand) -> List[float]

-Methods inherited from ProductDataOptical:
+Methods inherited from ProductDataOptical:
effective_thermal_values(...)
effective_thermal_values(self: pywincalc.ProductDataOptical, arg0: float, arg1: float, arg2: float, arg3: float, arg4: float, arg5: float) -> EffectiveLayers::EffectiveLayer

-Data descriptors inherited from ProductDataOptical:
+Data descriptors inherited from ProductDataOptical:
emissivity_back
emissivity_front
@@ -2198,12 +2615,12 @@ +class ProductDataOpticalNBand(ProductDataOptical)
 
-class ProductDataOpticalNBand(ProductDataOptical)
    
Method resolution order:
-
ProductDataOpticalNBand
-
ProductDataOptical
+
ProductDataOpticalNBand
+
ProductDataOptical
pybind11_builtins.pybind11_object
builtins.object
@@ -2220,11 +2637,11 @@
wavelength_data

-Methods inherited from ProductDataOptical:
+Methods inherited from ProductDataOptical:
effective_thermal_values(...)
effective_thermal_values(self: pywincalc.ProductDataOptical, arg0: float, arg1: float, arg2: float, arg3: float, arg4: float, arg5: float) -> EffectiveLayers::EffectiveLayer

-Data descriptors inherited from ProductDataOptical:
+Data descriptors inherited from ProductDataOptical:
emissivity_back
emissivity_front
@@ -2243,52 +2660,40 @@ +class ProductDataOpticalPerforatedScreen(ProductDataOpticalWithMaterial)
 
-class ProductDataOpticalPerforatedScreen(ProductDataOpticalWithMaterial)
    
Method resolution order:
-
ProductDataOpticalPerforatedScreen
-
ProductDataOpticalWithMaterial
-
ProductDataOptical
+
ProductDataOpticalPerforatedScreen
+
ProductDataOpticalWithMaterial
+
ProductDataOptical
pybind11_builtins.pybind11_object
builtins.object

Methods defined here:
-
__init__(...)
__init__(self: pywincalc.ProductDataOpticalPerforatedScreen, material_product_data_optical: pywincalc.ProductDataOptical, spacing_x: float, spacing_y: float, dimension_x: float, dimension_y: float, perforation_type: wincalc::Product_Data_Optical_Perforated_Screen::Type) -> None
+
__init__(...)
__init__(self: pywincalc.ProductDataOpticalPerforatedScreen, material_product_data_optical: pywincalc.ProductDataOptical, geometry: pywincalc.PerforatedGeometry) -> None

Data descriptors defined here:
-
dimension_x
-
-
dimension_y
-
-
perforation_type
-
-
spacing_x
-
-
spacing_y
+
geometry

-Data and other attributes defined here:
-
Type = <class 'pywincalc.ProductDataOpticalPerforatedScreen.Type'>
- -
-Methods inherited from ProductDataOpticalWithMaterial:
+Methods inherited from ProductDataOpticalWithMaterial:
optical_data(...)
optical_data(self: pywincalc.ProductDataOpticalWithMaterial) -> pywincalc.ProductDataOptical
wavelengths(...)
wavelengths(self: pywincalc.ProductDataOpticalWithMaterial) -> List[float]

-Data descriptors inherited from ProductDataOpticalWithMaterial:
+Data descriptors inherited from ProductDataOpticalWithMaterial:
material_optical_data

-Methods inherited from ProductDataOptical:
+Methods inherited from ProductDataOptical:
effective_thermal_values(...)
effective_thermal_values(self: pywincalc.ProductDataOptical, arg0: float, arg1: float, arg2: float, arg3: float, arg4: float, arg5: float) -> EffectiveLayers::EffectiveLayer

-Data descriptors inherited from ProductDataOptical:
+Data descriptors inherited from ProductDataOptical:
emissivity_back
emissivity_front
@@ -2307,52 +2712,40 @@ +class ProductDataOpticalVenetian(ProductDataOpticalWithMaterial)
 
-class ProductDataOpticalVenetian(ProductDataOpticalWithMaterial)
    
Method resolution order:
-
ProductDataOpticalVenetian
-
ProductDataOpticalWithMaterial
-
ProductDataOptical
+
ProductDataOpticalVenetian
+
ProductDataOpticalWithMaterial
+
ProductDataOptical
pybind11_builtins.pybind11_object
builtins.object

Methods defined here:
-
__init__(...)
__init__(self: pywincalc.ProductDataOpticalVenetian, product_data_optical: pywincalc.ProductDataOptical, slat_tilt_meters: float, slat_width_meters: float, slat_spacing_meters: float, slat_curvature_meters: float, numbers_slats: int, distribution_method: pywincalc.DistributionMethodType = <DistributionMethodType.DIRECTIONAL_DIFFUSE: 1>, is_horizontal: bool = True) -> None
+
__init__(...)
__init__(self: pywincalc.ProductDataOpticalVenetian, product_data_optical: pywincalc.ProductDataOptical, geometry: pywincalc.VenetianGeometry) -> None

Data descriptors defined here:
-
distribution_method
-
-
is_horizontal
-
-
number_slats
-
-
slat_curvature
-
-
slat_spacing
-
-
slat_tilt
-
-
slat_width
+
geometry

-Methods inherited from ProductDataOpticalWithMaterial:
+Methods inherited from ProductDataOpticalWithMaterial:
optical_data(...)
optical_data(self: pywincalc.ProductDataOpticalWithMaterial) -> pywincalc.ProductDataOptical
wavelengths(...)
wavelengths(self: pywincalc.ProductDataOpticalWithMaterial) -> List[float]

-Data descriptors inherited from ProductDataOpticalWithMaterial:
+Data descriptors inherited from ProductDataOpticalWithMaterial:
material_optical_data

-Methods inherited from ProductDataOptical:
+Methods inherited from ProductDataOptical:
effective_thermal_values(...)
effective_thermal_values(self: pywincalc.ProductDataOptical, arg0: float, arg1: float, arg2: float, arg3: float, arg4: float, arg5: float) -> EffectiveLayers::EffectiveLayer

-Data descriptors inherited from ProductDataOptical:
+Data descriptors inherited from ProductDataOptical:
emissivity_back
emissivity_front
@@ -2371,12 +2764,12 @@ +class ProductDataOpticalWithMaterial(ProductDataOptical)
 
-class ProductDataOpticalWithMaterial(ProductDataOptical)
    
Method resolution order:
-
ProductDataOpticalWithMaterial
-
ProductDataOptical
+
ProductDataOpticalWithMaterial
+
ProductDataOptical
pybind11_builtins.pybind11_object
builtins.object
@@ -2393,11 +2786,11 @@
material_optical_data

-Methods inherited from ProductDataOptical:
+Methods inherited from ProductDataOptical:
effective_thermal_values(...)
effective_thermal_values(self: pywincalc.ProductDataOptical, arg0: float, arg1: float, arg2: float, arg3: float, arg4: float, arg5: float) -> EffectiveLayers::EffectiveLayer

-Data descriptors inherited from ProductDataOptical:
+Data descriptors inherited from ProductDataOptical:
emissivity_back
emissivity_front
@@ -2416,44 +2809,40 @@ +class ProductDataOpticalWovenShade(ProductDataOpticalWithMaterial)
 
-class ProductDataOpticalWovenShade(ProductDataOpticalWithMaterial)
    
Method resolution order:
-
ProductDataOpticalWovenShade
-
ProductDataOpticalWithMaterial
-
ProductDataOptical
+
ProductDataOpticalWovenShade
+
ProductDataOpticalWithMaterial
+
ProductDataOptical
pybind11_builtins.pybind11_object
builtins.object

Methods defined here:
-
__init__(...)
__init__(self: pywincalc.ProductDataOpticalWovenShade, material_product_data_optical: pywincalc.ProductDataOptical, thread_diamater: float, thread_spacing: float, shade_thickness: float) -> None
+
__init__(...)
__init__(self: pywincalc.ProductDataOpticalWovenShade, material_product_data_optical: pywincalc.ProductDataOptical, geometry: pywincalc.WovenGeometry) -> None

Data descriptors defined here:
-
shade_thickness
-
-
thread_diameter
-
-
thread_spacing
+
geometry

-Methods inherited from ProductDataOpticalWithMaterial:
+Methods inherited from ProductDataOpticalWithMaterial:
optical_data(...)
optical_data(self: pywincalc.ProductDataOpticalWithMaterial) -> pywincalc.ProductDataOptical
wavelengths(...)
wavelengths(self: pywincalc.ProductDataOpticalWithMaterial) -> List[float]

-Data descriptors inherited from ProductDataOpticalWithMaterial:
+Data descriptors inherited from ProductDataOpticalWithMaterial:
material_optical_data

-Methods inherited from ProductDataOptical:
+Methods inherited from ProductDataOptical:
effective_thermal_values(...)
effective_thermal_values(self: pywincalc.ProductDataOptical, arg0: float, arg1: float, arg2: float, arg3: float, arg4: float, arg5: float) -> EffectiveLayers::EffectiveLayer

-Data descriptors inherited from ProductDataOptical:
+Data descriptors inherited from ProductDataOptical:
emissivity_back
emissivity_front
@@ -2472,12 +2861,12 @@ +class ProductDataThermal(FlippableSolidLayer)
 
-class ProductDataThermal(FlippableSolidLayer)
    
Method resolution order:
-
ProductDataThermal
-
FlippableSolidLayer
+
ProductDataThermal
+
FlippableSolidLayer
pybind11_builtins.pybind11_object
builtins.object
@@ -2504,7 +2893,7 @@
youngs_modulus

-Data descriptors inherited from FlippableSolidLayer:
+Data descriptors inherited from FlippableSolidLayer:
flipped
thickness_meters
@@ -2521,7 +2910,7 @@
    
Method resolution order:
-
ProductGeometry
+
ProductGeometry
pybind11_builtins.pybind11_object
builtins.object
@@ -2533,6 +2922,67 @@ Static methods inherited from pybind11_builtins.pybind11_object:
__new__(*args, **kwargs) from pybind11_builtins.pybind11_type
Create and return a new object.  See help(type) for accurate signature.
+

+ + + + + +
 
+class PropertySimple(pybind11_builtins.pybind11_object)
    
Method resolution order:
+
PropertySimple
+
pybind11_builtins.pybind11_object
+
builtins.object
+
+
+Methods defined here:
+
__eq__(...)
__eq__(self: object, other: object) -> bool
+ +
__ge__(...)
__ge__(self: object, other: object) -> bool
+ +
__getstate__(...)
__getstate__(self: object) -> int
+ +
__gt__(...)
__gt__(self: object, other: object) -> bool
+ +
__hash__(...)
__hash__(self: object) -> int
+ +
__index__(...)
__index__(self: pywincalc.PropertySimple) -> int
+ +
__init__(...)
__init__(self: pywincalc.PropertySimple, value: int) -> None
+ +
__int__(...)
__int__(self: pywincalc.PropertySimple) -> int
+ +
__le__(...)
__le__(self: object, other: object) -> bool
+ +
__lt__(...)
__lt__(self: object, other: object) -> bool
+ +
__ne__(...)
__ne__(self: object, other: object) -> bool
+ +
__repr__(...)
__repr__(self: object) -> str
+ +
__setstate__(...)
__setstate__(self: pywincalc.PropertySimple, state: int) -> None
+ +
__str__ = name(...)
name(self: handle) -> str
+ +
+Readonly properties defined here:
+
__members__
+
+
name
+
name(self: handle) -> str
+
+
value
+
+
+Data and other attributes defined here:
+
R = <PropertySimple.R: 1>
+ +
T = <PropertySimple.T: 0>
+ +
+Static methods inherited from pybind11_builtins.pybind11_object:
+
__new__(*args, **kwargs) from pybind11_builtins.pybind11_type
Create and return a new object.  See help(type) for accurate signature.
+

@@ -2541,7 +2991,7 @@
    
Method resolution order:
-
RGB
+
RGB
pybind11_builtins.pybind11_object
builtins.object
@@ -2561,6 +3011,67 @@ Static methods inherited from pybind11_builtins.pybind11_object:
__new__(*args, **kwargs) from pybind11_builtins.pybind11_type
Create and return a new object.  See help(type) for accurate signature.
+

+ + + + + +
 
+class Side(pybind11_builtins.pybind11_object)
    
Method resolution order:
+
Side
+
pybind11_builtins.pybind11_object
+
builtins.object
+
+
+Methods defined here:
+
__eq__(...)
__eq__(self: object, other: object) -> bool
+ +
__ge__(...)
__ge__(self: object, other: object) -> bool
+ +
__getstate__(...)
__getstate__(self: object) -> int
+ +
__gt__(...)
__gt__(self: object, other: object) -> bool
+ +
__hash__(...)
__hash__(self: object) -> int
+ +
__index__(...)
__index__(self: pywincalc.Side) -> int
+ +
__init__(...)
__init__(self: pywincalc.Side, value: int) -> None
+ +
__int__(...)
__int__(self: pywincalc.Side) -> int
+ +
__le__(...)
__le__(self: object, other: object) -> bool
+ +
__lt__(...)
__lt__(self: object, other: object) -> bool
+ +
__ne__(...)
__ne__(self: object, other: object) -> bool
+ +
__repr__(...)
__repr__(self: object) -> str
+ +
__setstate__(...)
__setstate__(self: pywincalc.Side, state: int) -> None
+ +
__str__ = name(...)
name(self: handle) -> str
+ +
+Readonly properties defined here:
+
__members__
+
+
name
+
name(self: handle) -> str
+
+
value
+
+
+Data and other attributes defined here:
+
Back = <Side.Back: 1>
+ +
Front = <Side.Front: 0>
+ +
+Static methods inherited from pybind11_builtins.pybind11_object:
+
__new__(*args, **kwargs) from pybind11_builtins.pybind11_type
Create and return a new object.  See help(type) for accurate signature.
+

@@ -2569,7 +3080,7 @@
    
Method resolution order:
-
SpectalDataWavelengthRangeMethodType
+
SpectalDataWavelengthRangeMethodType
pybind11_builtins.pybind11_object
builtins.object
@@ -2632,7 +3143,7 @@
    
Method resolution order:
-
Spectrum
+
Spectrum
pybind11_builtins.pybind11_object
builtins.object
@@ -2666,7 +3177,7 @@
    
Method resolution order:
-
SpectrumType
+
SpectrumType
pybind11_builtins.pybind11_object
builtins.object
@@ -2725,6 +3236,63 @@ Static methods inherited from pybind11_builtins.pybind11_object:
__new__(*args, **kwargs) from pybind11_builtins.pybind11_type
Create and return a new object.  See help(type) for accurate signature.
+

+ + + + + +
 
+class SquareMatrix(pybind11_builtins.pybind11_object)
    
Method resolution order:
+
SquareMatrix
+
pybind11_builtins.pybind11_object
+
builtins.object
+
+
+Methods defined here:
+
__init__(...)
__init__(self: pywincalc.SquareMatrix, input: List[List[float]]) -> None
+ +
get_matrix(...)
get_matrix(self: pywincalc.SquareMatrix) -> List[List[float]]
+ +
inverse(...)
inverse(self: pywincalc.SquareMatrix) -> pywincalc.SquareMatrix
+ +
make_upper_triangular(...)
make_upper_triangular(self: pywincalc.SquareMatrix) -> List[int]
+ +
mmult_rows(...)
mmult_rows(self: pywincalc.SquareMatrix, arg0: List[float]) -> pywincalc.SquareMatrix
+ +
set_diagonal(...)
set_diagonal(self: pywincalc.SquareMatrix, arg0: List[float]) -> None
+ +
set_identity(...)
set_identity(self: pywincalc.SquareMatrix) -> None
+ +
set_zeros(...)
set_zeros(self: pywincalc.SquareMatrix) -> None
+ +
size(...)
size(self: pywincalc.SquareMatrix) -> int
+ +
+Static methods inherited from pybind11_builtins.pybind11_object:
+
__new__(*args, **kwargs) from pybind11_builtins.pybind11_type
Create and return a new object.  See help(type) for accurate signature.
+ +

+ + + + + +
 
+class SupportPillar(IGUGapLayer)
    
Method resolution order:
+
SupportPillar
+
IGUGapLayer
+
pybind11_builtins.pybind11_object
+
builtins.object
+
+
+Methods defined here:
+
__init__(...)
__init__(self: pywincalc.SupportPillar, gap_layer: pywincalc.IGUGapLayer, conductivity: float) -> None
+ +
+Static methods inherited from pybind11_builtins.pybind11_object:
+
__new__(*args, **kwargs) from pybind11_builtins.pybind11_type
Create and return a new object.  See help(type) for accurate signature.
+

@@ -2733,7 +3301,7 @@
    
Method resolution order:
-
TarcogSystemType
+
TarcogSystemType
pybind11_builtins.pybind11_object
builtins.object
@@ -2794,7 +3362,7 @@
    
Method resolution order:
-
ThermalIRResults
+
ThermalIRResults
pybind11_builtins.pybind11_object
builtins.object
@@ -2824,7 +3392,7 @@
    
Method resolution order:
-
ThmxBoundaryCondition
+
ThmxBoundaryCondition
pybind11_builtins.pybind11_object
builtins.object
@@ -2878,7 +3446,7 @@
    
Method resolution order:
-
ThmxBoundaryConditionPolygon
+
ThmxBoundaryConditionPolygon
pybind11_builtins.pybind11_object
builtins.object
@@ -2920,7 +3488,7 @@
    
Method resolution order:
-
ThmxCMABestWorstOption
+
ThmxCMABestWorstOption
pybind11_builtins.pybind11_object
builtins.object
@@ -2952,7 +3520,7 @@
    
Method resolution order:
-
ThmxCMAOptions
+
ThmxCMAOptions
pybind11_builtins.pybind11_object
builtins.object
@@ -2992,7 +3560,7 @@
    
Method resolution order:
-
ThmxFileContents
+
ThmxFileContents
pybind11_builtins.pybind11_object
builtins.object
@@ -3030,7 +3598,7 @@
    
Method resolution order:
-
ThmxMaterial
+
ThmxMaterial
pybind11_builtins.pybind11_object
builtins.object
@@ -3072,7 +3640,7 @@
    
Method resolution order:
-
ThmxMeshParameters
+
ThmxMeshParameters
pybind11_builtins.pybind11_object
builtins.object
@@ -3104,7 +3672,7 @@
    
Method resolution order:
-
ThmxPolygon
+
ThmxPolygon
pybind11_builtins.pybind11_object
builtins.object
@@ -3132,7 +3700,7 @@
    
Method resolution order:
-
ThmxPolygonPoint
+
ThmxPolygonPoint
pybind11_builtins.pybind11_object
builtins.object
@@ -3160,7 +3728,7 @@
    
Method resolution order:
-
ThmxRGB
+
ThmxRGB
pybind11_builtins.pybind11_object
builtins.object
@@ -3188,7 +3756,7 @@
    
Method resolution order:
-
ThmxResult
+
ThmxResult
pybind11_builtins.pybind11_object
builtins.object
@@ -3218,7 +3786,7 @@
    
Method resolution order:
-
ThmxUFactorProjectionResult
+
ThmxUFactorProjectionResult
pybind11_builtins.pybind11_object
builtins.object
@@ -3250,7 +3818,7 @@
    
Method resolution order:
-
ThmxUFactorResults
+
ThmxUFactorResults
pybind11_builtins.pybind11_object
builtins.object
@@ -3280,7 +3848,7 @@
    
Method resolution order:
-
Trichromatic
+
Trichromatic
pybind11_builtins.pybind11_object
builtins.object
@@ -3304,22 +3872,25 @@ +class VenetianGeometry(pybind11_builtins.pybind11_object)
 
-class VenetianGeometry(ProductGeometry)
    
Method resolution order:
-
VenetianGeometry
-
ProductGeometry
+
VenetianGeometry
pybind11_builtins.pybind11_object
builtins.object

Methods defined here:
-
__init__(...)
__init__(self: pywincalc.VenetianGeometry, slat_width: float, slat_spacing: float, slat_curvature: float, slat_tilt: float = 0, tilt_choice: str = '0', number_segments: int = 5) -> None
+
__init__(...)
__init__(self: pywincalc.VenetianGeometry, slat_tilt_degrees: float, slat_width_meters: float, slat_spacing_meters: float, slat_curvature_meters: float, is_horizontal: bool = True, distribution_method: pywincalc.DistributionMethodType = <DistributionMethodType.DIRECTIONAL_DIFFUSE: 1>, number_slat_segments: int = 5) -> None

Data descriptors defined here:
-
number_segments
+
distribution_method
+
+
is_horizontal
+
+
number_slat_segments
slat_curvature
@@ -3341,7 +3912,7 @@
    
Method resolution order:
-
WavelengthBSDFs
+
WavelengthBSDFs
pybind11_builtins.pybind11_object
builtins.object
@@ -3371,7 +3942,7 @@
    
Method resolution order:
-
WavelengthBoundary
+
WavelengthBoundary
pybind11_builtins.pybind11_object
builtins.object
@@ -3397,7 +3968,7 @@
    
Method resolution order:
-
WavelengthBoundaryType
+
WavelengthBoundaryType
pybind11_builtins.pybind11_object
builtins.object
@@ -3458,7 +4029,7 @@
    
Method resolution order:
-
WavelengthData
+
WavelengthData
pybind11_builtins.pybind11_object
builtins.object
@@ -3479,6 +4050,8 @@
direct_component
+
pv_component
+
wavelength

@@ -3493,7 +4066,7 @@
    
Method resolution order:
-
WavelengthSet
+
WavelengthSet
pybind11_builtins.pybind11_object
builtins.object
@@ -3521,7 +4094,7 @@
    
Method resolution order:
-
WavelengthSetType
+
WavelengthSetType
pybind11_builtins.pybind11_object
builtins.object
@@ -3580,18 +4153,17 @@ +class WovenGeometry(pybind11_builtins.pybind11_object)
 
-class WovenGeometry(ProductGeometry)
    
Method resolution order:
-
WovenGeometry
-
ProductGeometry
+
WovenGeometry
pybind11_builtins.pybind11_object
builtins.object

Methods defined here:
-
__init__(...)
__init__(self: pywincalc.WovenGeometry, arg0: float, arg1: float, arg2: float) -> None
+
__init__(...)
__init__(self: pywincalc.WovenGeometry, thread_diamater: float, thread_spacing: float, shade_thickness: float) -> None

Data descriptors defined here:
@@ -3623,13 +4195,67 @@  
Convert a list of product data into a solid layer that can be used in glazing systems.
create_best_worst_u_factor_option(...) method of builtins.PyCapsule instance
create_best_worst_u_factor_option(arg0: CMA::Option) -> pywincalc.CMABestWorstUFactors
-
get_cma_window_double_vision_horizontal(...) method of builtins.PyCapsule instance
get_cma_window_double_vision_horizontal(arg0: pywincalc.ThmxFileContents, arg1: pywincalc.ThmxFileContents, arg2: pywincalc.ThmxFileContents, arg3: pywincalc.ThmxFileContents, arg4: pywincalc.ThmxFileContents, arg5: pywincalc.ThmxFileContents, arg6: pywincalc.ThmxFileContents, arg7: float, arg8: float) -> pywincalc.CMAWindowDualVisionHorizontal
+
create_gas(...) method of builtins.PyCapsule instance
create_gas(components: List[Tuple[float, Union[pywincalc.PredefinedGasType, pywincalc.GasData]]]) -> pywincalc.Gas

+Create a gas mixture from components: a list of pairs where the first in each item is the percent of the total and the second is the gas.
+
create_perforated_screen(...) method of builtins.PyCapsule instance
create_perforated_screen(*args, **kwargs)
+Overloaded function.

+1. create_perforated_screen(geometry: pywincalc.PerforatedGeometry, material: pywincalc.ProductData) -> pywincalc.ProductDataOpticalAndThermal

+Create a perforated screen from a geometry and parsed material.

+2. create_perforated_screen(geometry: pywincalc.PerforatedGeometry, material_data_optical: pywincalc.ProductDataOptical, material_data_thermal: pywincalc.ProductDataThermal) -> pywincalc.ProductDataOpticalAndThermal

+Create a perforated screen from a geometry and material optical and thermal data.
+
create_venetian_blind(...) method of builtins.PyCapsule instance
create_venetian_blind(*args, **kwargs)
+Overloaded function.

+1. create_venetian_blind(geometry: pywincalc.VenetianGeometry, material: pywincalc.ProductData) -> pywincalc.ProductDataOpticalAndThermal

+Create a venetian blind from a geometry and parsed material.

+2. create_venetian_blind(geometry: pywincalc.VenetianGeometry, material_data_optical: pywincalc.ProductDataOptical, material_data_thermal: pywincalc.ProductDataThermal) -> pywincalc.ProductDataOpticalAndThermal

+Create a venetian blind from a geometry and material optical and thermal data.
+
create_woven_shade(...) method of builtins.PyCapsule instance
create_woven_shade(*args, **kwargs)
+Overloaded function.

+1. create_woven_shade(geometry: pywincalc.WovenGeometry, material: pywincalc.ProductData) -> pywincalc.ProductDataOpticalAndThermal

+Create a woven shade from a geometry and parsed material.

+2. create_woven_shade(geometry: pywincalc.WovenGeometry, material_data_optical: pywincalc.ProductDataOptical, material_data_thermal: pywincalc.ProductDataThermal) -> pywincalc.ProductDataOpticalAndThermal

+Create a woven shade from a geometry and material optical and thermal data.
+
get_cma_window_double_vision_horizontal(...) method of builtins.PyCapsule instance
get_cma_window_double_vision_horizontal(*args, **kwargs)
+Overloaded function.

+1. get_cma_window_double_vision_horizontal(arg0: pywincalc.ThmxFileContents, arg1: pywincalc.ThmxFileContents, arg2: pywincalc.ThmxFileContents, arg3: pywincalc.ThmxFileContents, arg4: pywincalc.ThmxFileContents, arg5: pywincalc.ThmxFileContents, arg6: pywincalc.ThmxFileContents, arg7: float, arg8: float) -> pywincalc.CMAWindowDualVisionHorizontal

+Get the CMA template for a double vision horizontal window.

+2. get_cma_window_double_vision_horizontal(arg0: CMA::CMAFrame, arg1: CMA::CMAFrame, arg2: CMA::CMAFrame, arg3: CMA::CMAFrame, arg4: CMA::CMAFrame, arg5: CMA::CMAFrame, arg6: CMA::CMAFrame, arg7: float, arg8: float, arg9: float, arg10: float, arg11: pywincalc.CMABestWorstUFactors, arg12: pywincalc.CMABestWorstUFactors) -> pywincalc.CMAWindowDualVisionHorizontal
 
Get the CMA template for a double vision horizontal window.
-
get_cma_window_double_vision_vertical(...) method of builtins.PyCapsule instance
get_cma_window_double_vision_vertical(arg0: pywincalc.ThmxFileContents, arg1: pywincalc.ThmxFileContents, arg2: pywincalc.ThmxFileContents, arg3: pywincalc.ThmxFileContents, arg4: pywincalc.ThmxFileContents, arg5: pywincalc.ThmxFileContents, arg6: pywincalc.ThmxFileContents, arg7: float, arg8: float) -> pywincalc.CMAWindowDualVisionVertical
+
get_cma_window_double_vision_vertical(...) method of builtins.PyCapsule instance
get_cma_window_double_vision_vertical(*args, **kwargs)
+Overloaded function.

+1. get_cma_window_double_vision_vertical(arg0: pywincalc.ThmxFileContents, arg1: pywincalc.ThmxFileContents, arg2: pywincalc.ThmxFileContents, arg3: pywincalc.ThmxFileContents, arg4: pywincalc.ThmxFileContents, arg5: pywincalc.ThmxFileContents, arg6: pywincalc.ThmxFileContents, arg7: float, arg8: float) -> pywincalc.CMAWindowDualVisionVertical

+Get the CMA template for a double vision vertical window.

+2. get_cma_window_double_vision_vertical(arg0: CMA::CMAFrame, arg1: CMA::CMAFrame, arg2: CMA::CMAFrame, arg3: CMA::CMAFrame, arg4: CMA::CMAFrame, arg5: CMA::CMAFrame, arg6: CMA::CMAFrame, arg7: float, arg8: float, arg9: float, arg10: float, arg11: pywincalc.CMABestWorstUFactors, arg12: pywincalc.CMABestWorstUFactors) -> pywincalc.CMAWindowDualVisionVertical
 
Get the CMA template for a double vision vertical window.
-
get_cma_window_single_vision(...) method of builtins.PyCapsule instance
get_cma_window_single_vision(arg0: pywincalc.ThmxFileContents, arg1: pywincalc.ThmxFileContents, arg2: pywincalc.ThmxFileContents, arg3: pywincalc.ThmxFileContents, arg4: float, arg5: float) -> pywincalc.CMAWindowSingleVision
+
get_cma_window_single_vision(...) method of builtins.PyCapsule instance
get_cma_window_single_vision(*args, **kwargs)
+Overloaded function.

+1. get_cma_window_single_vision(arg0: pywincalc.ThmxFileContents, arg1: pywincalc.ThmxFileContents, arg2: pywincalc.ThmxFileContents, arg3: pywincalc.ThmxFileContents, arg4: float, arg5: float) -> pywincalc.CMAWindowSingleVision

+Get the CMA template for a single vision window.

+2. get_cma_window_single_vision(arg0: CMA::CMAFrame, arg1: CMA::CMAFrame, arg2: CMA::CMAFrame, arg3: CMA::CMAFrame, arg4: float, arg5: float, arg6: float, arg7: float, arg8: pywincalc.CMABestWorstUFactors, arg9: pywincalc.CMABestWorstUFactors) -> pywincalc.CMAWindowSingleVision
 
Get the CMA template for a single vision window.
get_spacer_keff(...) method of builtins.PyCapsule instance
get_spacer_keff(arg0: pywincalc.ThmxFileContents) -> float
diff --git a/readme.md b/readme.md index 094c8f6..d5a338b 100644 --- a/readme.md +++ b/readme.md @@ -1,6 +1,6 @@ -Berkeley Lab WINDOW Calc Engine (CalcEngine) Copyright (c) 2016 - 2020, The Regents of the University of California, through Lawrence Berkeley National Laboratory (subject to receipt of any required approvals from the U.S. Dept. of Energy). All rights reserved. +Berkeley Lab WINDOW Calc Engine (CalcEngine) Copyright (c) 2016 - 2023, The Regents of the University of California, through Lawrence Berkeley National Laboratory (subject to receipt of any required approvals from the U.S. Dept. of Energy). All rights reserved. If you have questions about your rights to use or distribute this software, please contact Berkeley Lab's Innovation & Partnerships Office at IPO@lbl.gov. @@ -13,6 +13,8 @@ This module provides a simplified method for calculating various thermal and opt Version 2 has substantially more features but the interface has also changed as a result. For help updating existing code see [Migrating from version 1](#Migrating-from-version-1) +Version 3 has additional features but should maintain compatability with code written for version 2 with the exception of cases creating user-defined shades. Some methods of creating gases and gaps have been deprecated. If you experience any problems updating code that creates user-defined shades to match the updated examples or problems with gaps or gases please let us know. + # Table of contents 1. [Requirements](#Requirements) 1. [Windows](#Windows) @@ -69,6 +71,8 @@ Windows requires a version of the Microsoft C++ redistributable >= the version o #### Linux/Mac The pre-built wheels provided at pypi should work on any x86/x64 version of Linux or Mac that supports at least C++17. +For M2 Macs pre-built wheels are not currently available. From our limited testing building from source (see below) should work. If you have experience problems building from source on a Mac using the M2 architecture please let us know. + #### Building from source [Git](https://git-scm.com/) @@ -77,12 +81,12 @@ The pre-built wheels provided at pypi should work on any x86/x64 version of Linu ## Install ### From PyPi -Once the requirements have been installed this can be installed with pip by doing +Once any needed requirements have been installed: ` pip install pywincalc ` ### Building from source -Once the requirements have been installed this can be installed with pip by doing +Once the requirements have been installed this project can be built from source directly from the repository by ` pip install git+https://github.com/LBNL-ETA/pyWinCalc.git ` @@ -94,13 +98,15 @@ Building Python packages from source on Windows is more complicated than Mac/Lin ### Overview We recognize that there is a fair amount of complexity in the functionality provided by this library. To attempt to mitigate this somewhat we have provided a selection of [examples](#Examples) that we hope cover all potential use cases between them. It may be beneficial to begin by looking at whichever example(s) seem to cover your particular use case and then consulting the rest of this and other documentation. -For example, if you are interested in exploring the effect various gas fills have on glazing systems made from combinations of existing commercial glass products contained in the [IGSDB](igsdb.lbl.gov) you could look at the [gases](https://github.com/LBNL-ETA/pyWinCalc/blob/main/examples/gases.py) example and the [igsdb_double_clear_glass.py](https://github.com/LBNL-ETA/pyWinCalc/blob/main/examples/igsdb_double_clear_glass.py ) example +For example, if you are interested in exploring the effect various gas fills have on glazing systems made from combinations of existing commercial glass products contained in the [IGSDB](igsdb.lbl.gov) you could look at the [gaps_and_gases](https://github.com/LBNL-ETA/pyWinCalc/blob/main/examples/gaps_and_gases.py) example. + +Or if you are interested in seeing all of the possible optical results that can be calculated from the NFRC standard you can find them in the [optical_results_NFRC.py](https://github.com/LBNL-ETA/pyWinCalc/blob/main/examples/optica_results_NFRC.py) example. Most of the functionality provided by pywincalc is based around a glazing system. That is the solid and gap layers that make up a window not including frames or dividers. One exception is CMA calculations using frames are also provided, see the [CMA](#CMA) section for more information about the CMA process and calculations. For glazing systems calculations can be grouped into two broad categories: optical and thermal calculations. -In the context of this program `optical` and `thermal` refer to the algorithms used to perform the calculations and not the part of the spectrum used in the calculations. E.g. the calculation for the transmittance of the infrared spectrum is considered an optical calculation here not a thermal calculation. +In the context of this program `optical` and `thermal` refer to the algorithms used to perform the calculations and not the part of the spectrum used in the calculations. E.g. the calculation for the transmittance in the infrared spectrum is considered an optical calculation here not a thermal calculation. #### Optical Calculations Optical calculations are based on optical standards which are defined by `.std` files and are not affected by environmental conditions. The optical standards define various methods that can be used to generate [optical results](#Optical-Results). @@ -112,7 +118,7 @@ There are a few important exceptions to this. See the section on [optical calcu #### Thermal Calculations Currently only [ISO 15099](https://www.iso.org/standard/26425.html) thermal calculations are supported. -Thermal calculations depend on the [environmental conditions](#Environmental-Conditions) and, in some cases, optical results calculated using specific methods. E.g. the [SHGC](https://www.energy.gov/energysaver/energy-performance-ratings-windows-doors-and-skylights) calculations can depend on optical results calculated using the `SOLAR`method from the optical standard. +Thermal calculations depend on the [environmental conditions](#Environmental-Conditions) and, in some cases, optical results calculated using specific methods. E.g. the [SHGC](https://www.energy.gov/energysaver/energy-performance-ratings-windows-doors-and-skylights) calculations can depend on optical results calculated using the `SOLAR` method from the optical standard. It is important to note that it is possible to calculate thermal results using an optical standard that does not necessarily conform to the ISO 15099 standard so care should be used when selecting which optical standard is used for thermal calculations. @@ -132,10 +138,16 @@ Calculations can be performed using predefined optical standards in the form tha Custom standards can be created by creating a new set of files following the same format. +As of version 3.0.0 the standards files are now bundled with the python package so there should be no longer be a need to clone the repository just to get the standards files. + +As of version 3.0.0 optical_standard is no longer a required parameter for GlazingSystem. By default a glazing system created without an optical standard will use the NFRC standard as implemented in the [W5_NFRC_2003.std](https://github.com/LBNL-ETA/pyWinCalc/blob/main/pywincalc/standards/W5_NFRC_2003.std) file. + +The path to the directory the bundled standards files are in is in the `pywincalc.standard_path` variable. + #### Optical Standard File Optical standards used by pywincalc are defined using a standards file and usually several related files referenced by the standards file. -For an example standards file see [W5 NFRC 2003.std](https://github.com/LBNL-ETA/pyWinCalc/blob/main/examples/standards/W5_NFRC_2003.std) +For an example standards file see [W5_NFRC_2003.std](https://github.com/LBNL-ETA/pyWinCalc/blob/main/pywincalc/standards/W5_NFRC_2003.std) Each standards file contains sections that define the optical methods provided by the standard. In the W5 NFRC 2003 standard file the first method defined looks like this: @@ -151,23 +163,33 @@ Maximum Wavelength : 2.5 ``` The most important part for using pywincalc is the name of the method. Since optical standard files can set anything for a name pywincalc has one generic method for calculating optical results and two other methods to handle exceptions to the generic rule: THERMAL IR and color calculations. See the section on [optical calculation details](#Optical-Calculations-Details) for more on those two cases. -The choice of standards file affects what can be calculated because not all files implement all methods. For example the [prEN_410.std](https://github.com/LBNL-ETA/pyWinCalc/blob/main/examples/standards/prEN_410.std) file does not contain a definition of the THERMAL IR method. +The choice of standards file affects what can be calculated because not all files implement all methods. For example the [prEN_410.std](https://github.com/LBNL-ETA/pyWinCalc/blob/main/pywincalc/standards/prEN_410.std) file does not contain a definition of the THERMAL IR method. Calculations that rely on specific methods will not work if the standard does not provide them. Since the prEN_410.std files does not contain a definition for the thermal IR method the `pywincalc.calc_thermal_ir` function will not work. ### Solid layers -Solid layers define the glazing or shading products that make up a glazing system. The methods for creating solid layers currently supported are: - -- From paths to measured data files as exported by [Optics](https://windows.lbl.gov/software/optics). See [single_clear.py](https://github.com/LBNL-ETA/pyWinCalc/blob/main/examples/single_clear.py) and [triple_clear.py](https://github.com/LBNL-ETA/pyWinCalc/blob/main/examples/triple_clear.py) in the examples directory. -- From json returned by a request for a shading layer to the [IGSDB](igsdb.lbl.gov). See [igsdb_exterior_shade_on_clear_glass.py](https://github.com/LBNL-ETA/pyWinCalc/blob/main/examples/igsdb_exterior_shade_on_clear_glass.py) in the examples directory. -- From a combination of json returned by a request for a material from the [IGSDB](igsdb.lbl.gov) and user-defined geometry. See [igsdb_custom_perforated.py](https://github.com/LBNL-ETA/pyWinCalc/blob/main/examples/igsdb_custom_perforated.py), [igsdb_custom_venetian.py](https://github.com/LBNL-ETA/pyWinCalc/blob/main/examples/igsdb_custom_venetian.py), and [igsdb_custom_woven.py](https://github.com/LBNL-ETA/pyWinCalc/blob/main/examples/igsdb_custom_woven.py) in the examples directory. -- Shading layers that are represented by discrete BSDFs are currently a special case in the [IGSDB](igsdb.lbl.gov). See [igsdb_interior_bsdf.py] (https://github.com/LBNL-ETA/pyWinCalc/blob/bsdf_input/examples/igsdb_interior_bsdf.py) -- From measured wavelength data from some other source and user-defined geometry. See [custom_perforated.py](https://github.com/LBNL-ETA/pyWinCalc/blob/main/examples/custom_perforated.py) in the examples directory. +Solid layers define the glazing or shading products that make up a glazing system. There are several methods for creating solid layers currently supported which use two broad categories of data sources: +- Data files exported from either [Optics](https://windows.lbl.gov/software/optics) or the [IGSDB](https://igsdb.lbl.gov) +- User-defined data which is data the user has obtained from some other source and needs to be transformed into data structures pywincalc recognizes. + +In the examples files with "igsdb" in the name use data downloaded from the IGSDB. Files with "user_defined" in the name show how to create objects using data supplied by the user. + +It is possible to use data IGSDB in conjunction with user-defined data. E.g. the example file [perforated_screen_user_defined_geometry_igsdb_material](https://github.com/LBNL-ETA/pyWinCalc/blob/include_standards/examples/perforated_screen_user_defined_geometry_igsdb_material.py) uses data downloaded from the IGSDB for a shade material and combines that with a user-defined geometry to create a perforated screen. + +Here are some examples of each method of creating a solid layer +- For a glass layer made from measured data files as exported by Optics: [glass_local_file.py](https://github.com/LBNL-ETA/pyWinCalc/blob/main/examples/glass_local_file.py) +- For a glass layer made from n-band wavelength data from a user-defined source: [glass_user_defined_nband_data.py](https://github.com/LBNL-ETA/pyWinCalc/blob/main/examples/glass_user_defined_nband_data.py) +- For a glass or shade layer made from json returned from the [IGSDB](igsdb.lbl.gov): [glass_double_layer_igsdb_product.py](https://github.com/LBNL-ETA/pyWinCalc/blob/main/examples/glass_double_layer_igsdb_product.py) or [venetian_blind_igsdb_product.py](https://github.com/LBNL-ETA/pyWinCalc/blob/main/examples/venetian_blind_igsdb_product.py). +- For a shade layer made from a combination of json returned by a request for a material from the [IGSDB](igsdb.lbl.gov) and user-defined geometry: [woven_shade_user_defined_geometry_igsdb_material.py](https://github.com/LBNL-ETA/pyWinCalc/blob/main/examples/woven_shade_user_defined_geometry_igsdb_material.py) +- For a shade layers made from a local bsdf xml file: [bsdf_shade_local_file.py](https://github.com/LBNL-ETA/pyWinCalc/blob/main/examples/bsdf_shade_local_file.py) + - Shading layers that are represented by discrete BSDFs are currently a special case in the [IGSDB](igsdb.lbl.gov). For an example of how to download them see [igsdb_interior_bsdf.py] (https://github.com/LBNL-ETA/pyWinCalc/blob/bsdf_input/examples/igsdb_interior_bsdf.py) +- For a shade layer made from measured n-band wavelength data from some other source and user-defined geometry: [perforated_screen_user_defined_geometry_and_user_defined_nband_material.py](https://github.com/LBNL-ETA/pyWinCalc/blob/main/examples/perforated_screen_user_defined_geometry_and_user_defined_nband_material.py) +- For a shade layer made from dual-band wavelength data from some other source and user-defined geometry: [venetian_blind_user_defined_geometry_user_defined_dual_band_material.py](https://github.com/LBNL-ETA/pyWinCalc/blob/main/examples/venetian_blind_user_defined_geometry_user_defined_dual_band_material.py) #### Supported solid layer types The following types of solid layers are currently supported: - Glazings that are represented as one set of measured wavelength data. Products that require deconstruction like some laminates and coated glass are not yet supported. -- Venetian blinds +- Venetian blinds (both horizontal and vertical) - Woven shades - Perforated screens - BSDF shades @@ -180,13 +202,15 @@ For systems with more than one solid layer each solid layer must be separated by - From creating a custom gas by providing molecular weight, specific heat ratio, and coefficients for specific heat at constant pressure (Cp), thermal conductivity, and viscosity. - From a mixture of custom gases. -For examples of each see [gases.py](https://github.com/LBNL-ETA/pyWinCalc/blob/main/examples/gases.py) in the examples directory. +As of version 3.0.0 vacuum gaps are supported. + +For examples of each see [gaps_and_gases.py](https://github.com/LBNL-ETA/pyWinCalc/blob/main/examples/gaps_and_gases.py) in the examples directory. ### BSDF Calculations -Shading products require BSDF calculations while glazings do not. If any layer passed to a glazing system is a shading layer the glazing system will also require a BSDF hemisphere. For examples see any of the igsdb examples or [custom_perforated.py](https://github.com/LBNL-ETA/pyWinCalc/blob/main/examples/custom_perforated.py) in the examples directory. +Shading products require BSDF calculations while glazings do not. If any layer passed to a glazing system is a shading layer the glazing system will also require a BSDF hemisphere. For examples see any of the shade examples e.g. [venetian_blind_local_file.py](https://github.com/LBNL-ETA/pyWinCalc/blob/main/examples/venetian_blind_local_file.py) -However it is possible to use BSDF calculations for a system with no shading products. To do so pass a BSDF hemisphere as in the examples with shading systems. +However it is possible to use BSDF calculations for a system with no shading products. To do so pass a BSDF hemisphere as in the examples with shading systems. For an example that also shows results that are only available for BSDF calculations see [optical_results_NFRC.py](https://github.com/LBNL-ETA/pyWinCalc/blob/main/examples/optical_results_NFRC.py) If a glazing system is given a BSDF hemisphere as a parameter it will always use that for optical calculations. @@ -194,25 +218,18 @@ If a glazing system is given a BSDF hemisphere as a parameter it will always use Since there are several ways of creating and combining layers plus different calculation options example scripts are provided in the [/example](https://github.com/LBNL-ETA/pyWinCalc/blob/main/examples/) directory. -These scripts use optical standards provided in the [/examples/standards](https://github.com/LBNL-ETA/pyWinCalc/blob/main/examples/standards) directory. Some scripts use measured data for example products provided in the [/examples/products](https://github.com/LBNL-ETA/pyWinCalc/blob/main/examples/products) directory. +These scripts use optical standards that are included with pywincalc. Some scripts use measured data for example products provided in the [/examples/products](https://github.com/LBNL-ETA/pyWinCalc/blob/main/examples/products) directory. A minimum example might look like this ``` import pywincalc -optical_standard_path = "standards/W5_NFRC_2003.std" -optical_standard = pywincalc.load_standard(optical_standard_path) - -width = 1.0 -height = 1.0 - clear_3_path = "products/CLEAR_3.DAT" clear_3 = pywincalc.parse_optics_file(clear_3_path) solid_layers = [clear_3] -gaps = [] -glazing_system = pywincalc.GlazingSystem(solid_layers, gaps, optical_standard, width, height) +glazing_system = pywincalc.GlazingSystem(solid_layers=solid_layers) print("Single Layer U-value: {u}".format(u=glazing_system.u())) ``` @@ -220,44 +237,55 @@ Please see the following examples which contain more information. The examples names have the following meanings: 1. `igsdb` means the example downloads data from the [IGSDB](http://igsdb.lbl.gov) -2. `custom` means the example does not use a completely defined existing product. This could be anything from using a pre-defined material to make a shade to using user-defined measured spectral data. +2. `user-defined` means the example does not use a completely defined existing product. This could be anything from using a pre-defined material to make a shade to using user-defined measured spectral data. NOTE: The igsdb examples require the python requests library and an API token for igsdb.lbl.gov. An API token can be obtained by creating an account there. See https://igsdb.lbl.gov/about/ for more information on creating an account. #### Examples - [minimum_example.py](https://github.com/LBNL-ETA/pyWinCalc/blob/main/examples/minimum_example.py) The minimum example shown above. Calculates the U-value for a single piece of generic clear glass. -- [single_clear.py](https://github.com/LBNL-ETA/pyWinCalc/blob/main/examples/single_clear.py): Creates a single layer glazing system from a sample optics file. Shows all thermal results, all optical results for a single optical method and some optical results from a second optical method. -- [triple_clear.py](https://github.com/LBNL-ETA/pyWinCalc/blob/main/examples/triple_clear.py): Creates a triple layer glazing system from sample optics files. Creates two gaps, one with a single gas and one with a gas mixture. Shows another example of optical results for each layer. -- [igsdb_double_clear_glass.py](https://github.com/LBNL-ETA/pyWinCalc/blob/main/examples/igsdb_double_clear_glass.py ) Creates a double layer glazing system from products defined in the [IGSDB](http://igsdb.lbl.gov). -- [igsdb_exterior perforated_shade_on_clear_glass.py](https://github.com/LBNL-ETA/pyWinCalc/blob/main/examples/igsdb_exterior_perforated_shade_on_clear_glass.py): Creates a double-layer glazing system with an exterior perforated screen from products defined in the [IGSDB](http://igsdb.lbl.gov). -- [igsdb_exterior_venetian blind_on_clear_glass.py](https://github.com/LBNL-ETA/pyWinCalc/blob/main/examples/igsdb_exterior_venetian_blind_on_clear_glass.py): Creates a double-layer glazing systems with an exterior Venetian blind from products defined in the [IGSDB](http://igsdb.lbl.gov). -- [igsdb_custom_perforated.py](https://github.com/LBNL-ETA/pyWinCalc/blob/main/examples/igsdb_custom_perforated.py) Creates a double layer glazing system with an exterior perforated screen. The perforated screen uses a material from the [IGSDB](http://igsdb.lbl.gov) and a user-defined geometry describing the perforations. The glass layer uses data from the [IGSDB](http://igsdb.lbl.gov) -- [igsdb_custom_venetian.py](https://github.com/LBNL-ETA/pyWinCalc/blob/main/examples/igsdb_custom_venetian.py). Creates a double layer glazing system with an exterior venetian blind. The venetian blind uses a material from the [IGSDB](http://igsdb.lbl.gov) and a user-defined geometry describing the slats. Also includes an example of how to change the distribution method used for calculating optical results for the shade. The glass layer uses data from the [IGSDB](http://igsdb.lbl.gov) -- [igsdb_custom_vertical_venetian.py](https://github.com/LBNL-ETA/pyWinCalc/blob/main/examples/igsdb_custom_vertical_venetian.py). Creates a double layer glazing system with an exterior vertical louver. The vertical louver uses a material from the [IGSDB](http://igsdb.lbl.gov) and a user-defined geometry describing the slats. Also includes an example of how to change the distribution method used for calculating optical results for the shade. The glass layer uses data from the [IGSDB](http://igsdb.lbl.gov) -- [igsdb_custom_woven.py](https://github.com/LBNL-ETA/pyWinCalc/blob/main/examples/igsdb_custom_woven.py) Creates a double layer glazing system with an exterior woven shade. The woven shade uses a material from the [IGSDB](http://igsdb.lbl.gov) and a user-defined geometry describing the thread layout. The glass layer uses data from the [IGSDB](http://igsdb.lbl.gov) -- [custom_perforated.py](https://github.com/LBNL-ETA/pyWinCalc/blob/main/examples/custom_perforated.py) Creates a double layer glazing system with an exterior perforated screen. Shows an example of getting measured data from somewhere other than either the [IGSDB](http://igsdb.lbl.gov) or optics file. -- [gases.py](https://github.com/LBNL-ETA/pyWinCalc/blob/main/examples/gases.py) Creates gases and gas mixtures from predefined gas types and custom gases created from gas properties. -- [deflection.py](https://github.com/LBNL-ETA/pyWinCalc/blob/main/examples/deflection.py) Shows how to set and enable deflection properties and which deflection results are available. -- [cma_single_vision.py](https://github.com/LBNL-ETA/pyWinCalc/blob/main/examples/cma_single_vision.py) Shows how to do a CMA calculation for a single-vision window and which results are available for CMA calculations. -- [cma_double_vision_horizontal.py](https://github.com/LBNL-ETA/pyWinCalc/blob/main/examples/cma_double_vision_horizontal.py) Shows how to do a CMA calculation for a horizontal double-vision window and which results are available for CMA calculations. -- [cma_double_vision_vertical.py](https://github.com/LBNL-ETA/pyWinCalc/blob/main/examples/cma_double_vision_vertical.py) Shows how to do a CMA calculation for a vertical double-vision window and which results are available for CMA calculations. -- [thermal_ir.py](https://github.com/LBNL-ETA/pyWinCalc/blob/main/examples/thermal_ir.py) Shows how to calculate optical results for the thermal IR method. Note that currently only calculations for a single solid layer are supported and these only have diffuse-diffuse transmittances and hemispherical emissivities. -- [custom_environmental_conditions.py](https://github.com/LBNL-ETA/pyWinCalc/blob/main/examples/custom_environmental_conditions.py) Shows how to create custom environmental conditions. -- [pv_single_layer.py](https://github.com/LBNL-ETA/pyWinCalc/blob/main/examples/pv_single_layer.py) Shows how to create a system with a single layer that has integrated PV data. For information on creating a IGSDB v2 json file with PV data see the provided [generic_pv.json](https://github.com/LBNL-ETA/pyWinCalc/tree/main/examples/products/generic_pv.json) file and the [IGSDB v2 JSON format](#IGSDB-v2-JSON-format) section below. +- [bsdf_integrator.py](https://github.com/LBNL-ETA/pyWinCalc/blob/main/examples/bsdf_integrator.py): Shows how to integrate BSDF matrices to get transmittances and reflectances for each incident angle. +- [bsdf_shade_igsdb_product.py](https://github.com/LBNL-ETA/pyWinCalc/blob/main/examples/bsdf_shade_igsdb_product.py): Shows how to create a BSDF shade by downloading data from the IGSDB. +- [bsdf_shade_local_file.py](https://github.com/LBNL-ETA/pyWinCalc/blob/main/examples/bsdf_shade_local_file.py): Shows how to create a BSDF shade from a BSDF XML file stored locally. +- [bsdf_shade_local_file.py](https://github.com/LBNL-ETA/pyWinCalc/blob/main/examples/bsdf_shade_local_file.py): Shows how to create a BSDF shade from a BSDF XML file stored locally. +- [cma_single_vision.py](https://github.com/LBNL-ETA/pyWinCalc/blob/main/examples/cma_single_vision.py): Shows how to do a CMA calculation for a single-vision window and which results are available for CMA calculations. +- [cma_double_vision_horizontal.py](https://github.com/LBNL-ETA/pyWinCalc/blob/main/examples/cma_double_vision_horizontal.py): Shows how to do a CMA calculation for a horizontal double-vision window and which results are available for CMA calculations. +- [cma_double_vision_vertical.py](https://github.com/LBNL-ETA/pyWinCalc/blob/main/examples/cma_double_vision_vertical.py): Shows how to do a CMA calculation for a vertical double-vision window and which results are available for CMA calculations. +- [deflection.py](https://github.com/LBNL-ETA/pyWinCalc/blob/main/examples/deflection.py): Shows how to enable and set deflection properties and which deflection results are available. +- [environmental_conditions_user_defined.py](https://github.com/LBNL-ETA/pyWinCalc/blob/main/examples/environmental_conditions_user_defined.py): Shows how to create user-defined environmental conditions. +- [gases.py](https://github.com/LBNL-ETA/pyWinCalc/blob/main/examples/gases.py): Shows how to create gases and gas mixtures from predefined gas types and custom gases created from gas properties. Then shows how to uses those gases in gap layers for the glazing system. +- [glass_double_layer_igsdb_product.py](https://github.com/LBNL-ETA/pyWinCalc/blob/main/examples/glass_double_layer_igsdb_product.py): Shows how to create a double layer glazing system from generic glass data downloaded from the IGSDB. +- [glass_local_file.py](https://github.com/LBNL-ETA/pyWinCalc/blob/main/examples/glass_local_file.py): Shows how to create a single layer glazing system from generic glass data from a local file. +- [glass_triple_layer_local_file.py](https://github.com/LBNL-ETA/pyWinCalc/blob/main/examples/glass_triple_layer_local_file.py): Shows how to create a triple layer glazing system from generic glass data from a local file +- [glass_user_defined_nband_data.py](https://github.com/LBNL-ETA/pyWinCalc/blob/main/examples/glass_user_defined_nband_data.py): Shows how to create a single layer glazing system from user-defined data. +- [optical_results_EN_410.py](https://github.com/LBNL-ETA/pyWinCalc/blob/main/examples/optical_results_EN_410.py): Shows how to create a glazing system using the EN-410 optical standard and all optical results available. +- [optical_results_NFRC.py](https://github.com/LBNL-ETA/pyWinCalc/blob/main/examples/optical_results_NFRC.py): Shows how to create a glazing system using the NFRC optical standard and all optical results available. +- [perforated_screen_igsdb_product.py](https://github.com/LBNL-ETA/pyWinCalc/blob/main/examples/perforated_screen_igsdb_product.py): Shows how to create a perforated screen by downloading shading layer information from the IGSDB. +- [perforated_screen_user_defined_geometry_and_user_defined_nband_material.py](https://github.com/LBNL-ETA/pyWinCalc/blob/main/examples/perforated_screen_user_defined_geometry_and_user_defined_nband_material.py): Shows how to create a perforated screen from user-defined n-band material data and a user-defined geometry. +- [perforated_screen_user_defined_geometry_igsdb_material.py](https://github.com/LBNL-ETA/pyWinCalc/blob/main/examples/perforated_screen_user_defined_geometry_igsdb_material.py): Shows how to create a perforated screen by downloading shade material data from the IGSDB and combining it with a user-defined geometry. +- [pv_local_file.py](https://github.com/LBNL-ETA/pyWinCalc/blob/main/examples/pv_local_file.py): Shows how to create a system with a single layer that has integrated PV data. For information on creating a IGSDB v2 json file with PV data see the provided [generic_pv.json](https://github.com/LBNL-ETA/pyWinCalc/tree/main/examples/products/generic_pv.json) file and the [IGSDB v2 JSON format](#IGSDB-v2-JSON-format) section below. +- [thermal_ir.py](https://github.com/LBNL-ETA/pyWinCalc/blob/main/examples/thermal_ir.py): Shows how to calculate optical results for the thermal IR method. Note that currently only calculations for a single solid layer are supported and these only have diffuse-diffuse transmittances and hemispherical emissivities. +- [thermal_results_ISO_15099.py](https://github.com/LBNL-ETA/pyWinCalc/blob/main/examples/thermal_results_ISO_15099.py): Shows all thermal results available. Currently only ISO 15099 is supported for thermal calculations. +- [venetian_blind_igsdb_product.py](https://github.com/LBNL-ETA/pyWinCalc/blob/main/examples/venetian_blind_igsdb_product.py): Shows how to create a Venetian blind by downloading shading layer information from the IGSDB. +- [venetian_blind_local_file.py](https://github.com/LBNL-ETA/pyWinCalc/blob/main/examples/venetian_blind_local_file.py): Shows how to create a Venetian blind by using shading layer information stored in a local file. +- [venetian_blind_user_defined_geometry_igsdb_material.py](https://github.com/LBNL-ETA/pyWinCalc/blob/main/examples/venetian_blind_user_defined_geometry_igsdb_material.py): Shows how to create a Venetian blind from material data downloaded from the IGSDB and a user-defined geometry. +- [venetian_blind_user_defined_geometry_user_defined_dual_band_material.py](https://github.com/LBNL-ETA/pyWinCalc/blob/main/examples/venetian_blind_user_defined_geometry_user_defined_dual_band_material.py): Shows how to create a Venetian blind from user-defined dual-band material data and a user-defined geometry. +- [vertical_venetian_user_defined_geometry_igsdb_material.py](https://github.com/LBNL-ETA/pyWinCalc/blob/main/examples/vertical_venetian_user_defined_geometry_igsdb_material.py): Shows how to create a vertical Venetian blind from material data downloaded from the IGSDB and a user-defined geometry. +- [woven_shade_user_defined_geometry_igsdb_material.py](https://github.com/LBNL-ETA/pyWinCalc/blob/main/examples/woven_shade_user_defined_geometry_igsdb_material.py): Shows how to create a woven shade from material data downloaded from the IGSDB and a user-defined geometry. + #### Non-example files These are files in the example folder that provide some functionality but are not calculation examples. -- [igsdb_interaction.py](https://github.com/LBNL-ETA/pyWinCalc/blob/main/examples/igsdb_interaction.py) Encapsulates some basic interaction with the [IGSDB](http://igsdb.lbl.gov) -- [results_printer.py](https://github.com/LBNL-ETA/pyWinCalc/blob/main/examples/results_printer.py) Contains some methods for displaying all available results. The [single_clear.py](https://github.com/LBNL-ETA/pyWinCalc/blob/main/examples/single_clear.py) example contains notes on how to calculate and access the various results. To simplify the other examples the code to display the results has been encapsulated in this file. +- [igsdb_interaction.py](https://github.com/LBNL-ETA/pyWinCalc/blob/main/examples/igsdb_interaction.py): Encapsulates some basic interaction with the [IGSDB](http://igsdb.lbl.gov) If there is something you are trying to calculate that does not exist as an example yet please contact us. ### pywincalc objects #### GlazingSystem +As of version 3.0.0 if you create a GlazingSystem without an optical standard it will default to using the NFRC optical standard and optical_standard is not required. - Constructor: - Requires parameters: - - optical_standard - solid_layers - Optional parameters: + - optical_standard Defaults to NFRC - gap_layers Defaults to no gap layers. If more than one solid layer is provided then len(solid_layers) - 1 gap_layers must be provided - width_meters Defaults to 1.0 meters - height_meters Defaults to 1.0 meters @@ -298,11 +326,13 @@ An `OpticalResults` object has two parts: `system_results` and `layer_results`. E.g. the direct-diffuse front reflectance is `system_results.front.reflectance.direct_diffuse` -`layer_results` contain a list of results corresponding to each solid layer. Results for both sides are provided for each layer. Currently the only supported result per side is absorptance. Absorptance is available for both direct and diffuse cases. +`layer_results` contain a list of results corresponding to each solid layer. Results for both sides are provided for each layer. Currently the only supported result per side is absorptance. Absorptance is available for both direct and diffuse cases. As of version 2.4.0 absorptance results are available as heat and electricity. Electricity absoprtance is only non-zero for layers with PV data. The following results are available for each side of each layer: `total_direct, total_diffuse, heat_direct, heat_diffuse, electricity_direct, electricity_diffuse, direct, diffuse` NOTE: direct and diffuse are deprecated and equal to total_direct and total_diffuse. +As of version 3.0.0 angular absorptance results are also available. These results are only available for systems that have a BSDF hemisphere. + E.g the diffuse back absorptance for the first solid layer is `layer_results[0].back.absorptance.diffuse` ##### Matrix Optical Results @@ -321,7 +351,7 @@ Thermal IR results are only available for a single layer and only have four resu 4. `emissivity_back_hemispheric` #### Environmental Conditions -An environment consists of two parts: the inside and outside environment. The exterior environment will be used as the environment before the first solid layer in the system and the interior environment will be used after the last solid layer in the system. Each contains the same fields. To use custom values for thermal calculations create an Environments object from inside and outside Environment objects. +Environmental conditions consists of two parts: the inside and outside environment. The exterior environment will be used as the environment before the first solid layer in the system and the interior environment will be used after the last solid layer in the system. Each contains the same fields. To use custom values for thermal calculations create an Environments object from inside and outside Environment objects. See [environmental_conditions_user_defined.py](https://github.com/LBNL-ETA/pyWinCalc/blob/main/examples/environmental_conditions_user_defined.py) Environment fields: - air_temperature @@ -342,6 +372,8 @@ There are several options for gases. Gases can be created either from pre-defin ##### Predefined gases Gases can be created from a `PredefinedGasType`. Current supported predefined gas types are: AIR, ARGON, KRYPTON, and XENON. +As of version 3.0.0 the below is deprecated. See See [gaps_and_gases.py](https://github.com/LBNL-ETA/pyWinCalc/blob/include_standards/examples/gaps_and_gases.py) for the new method of creating gases. + A gap layer can be created from a predefined gas type like so: ``` gap_1 = pywincalc.Gap(pywincalc.PredefinedGasType.AIR, .0127) # .0127 is gap thickness in meters @@ -359,10 +391,12 @@ A `CustomGasData` object can be created by providing the following information: - viscosity - Expressed as a GasCoefficients object with A, B, and C fields. -See [gases.py](https://github.com/LBNL-ETA/pyWinCalc/blob/main/examples/gases.py) for more on creating custom gases. +See [gaps_and_gases.py](https://github.com/LBNL-ETA/pyWinCalc/blob/include_standards/examples/gaps_and_gases.py) for more on creating custom gases. ##### Gas mixtures -Gas mixtures can be created from custom and predefined gases by specifying the percentage of each in the mixtures. E,g, +Gas mixtures can be created from custom and predefined gases by specifying the percentage of each in the mixtures. + +As of version 3.0.0 the below is deprecated. See See [gaps_and_gases.py](https://github.com/LBNL-ETA/pyWinCalc/blob/include_standards/examples/gaps_and_gases.py) for the new method of creating gases. ``` # The following creates a gas that is 80% sulfur hexafluoride, 15% Argonm and 5% Air @@ -372,8 +406,6 @@ gap_4_component_3 = pywincalc.PredefinedGasMixtureComponent(pywincalc.Predefined gap_4 = pywincalc.Gap([gap_4_component_1, gap_4_component_2, gap_4_component_3], .025) # 2.5mm thick gap ``` -See [gases.py](https://github.com/LBNL-ETA/pyWinCalc/blob/main/examples/gases.py) for more on creating gas mixtures. - #### Pydoc Class Documentation Complete class documentation generated by pydoc can be found here: https://github.com/LBNL-ETA/pyWinCalc/blob/main/pywincalc_class_documentation.html @@ -394,7 +426,7 @@ The CMA calculation process can be summarized with the following steps: 2. Parse the thmx files using pywincalc.parse_thmx_file 3. Get the effective conductivity for the spacer using pywincalc.get_spacer_keff 4. Create a CMA window. Currently three configurations are supported: pywincalc.get_cma_window_single_vision, pywincalc.get_cma_window_double_vision_vertical, and pywincalc.get_cma_window_double_vision_horizontal. -5. Get CMA results by calling pywincalc.calc_cma with the CMA window from step 4, the glazing system U, SHGC, and visibile transmittance, and the spacer keff from step 3. Note: The glazing system values can be calculated using a pywincalc.GlazingSystem (see glazing system examples above) or from other sources. However the dimensions of the glazing system used calculate those results should match the dimensions that will be used in the CMA window. pywincalc.CMAWindow provides a glazing_system_dimensions function that will return the appropriate glazing system size. See the cma_single_vision_igsdb_parametric.py example. +5. Get CMA results by calling pywincalc.calc_cma with the CMA window from step 4, the glazing system U, SHGC, and visibile transmittance, and the spacer keff from step 3. Note: The glazing system values can be calculated using a pywincalc.GlazingSystem (see glazing system examples above) or from other sources. However the dimensions of the glazing system used calculate those results should match the dimensions that will be used in the CMA window. pywincalc.CMAWindow provides a glazing_system_dimensions function that will return the appropriate glazing system size. ### CMA Examples The examples folder has the following examples: @@ -404,7 +436,15 @@ The examples folder has the following examples: - [cma_double_vision_horizontal.py](https://github.com/LBNL-ETA/pyWinCalc/blob/CMA/examples/cma_double_vision_horizontal.py): Perform a CMA calculation for a double vision horizontal using sample THERM frames and spacer thmx files and precalculated glazing system results. - [cma_single_vision_igsdb_parametric.py](https://github.com/LBNL-ETA/pyWinCalc/blob/CMA/examples/cma_double_vision_horizontal.py): An example of how a parametric calculation might be performed. Makes all possible double layer glazing systems from IGSDB glazing records with the inner layer set to generic clear 3mm glass. Runs CMA calculations on them using sample frames and spacers. Reports the systems with the highest and lowest U, SHGC, and visible transmittance. -## Migrating from version 1 +## Migrating from version plder versions + +# From version 2 to 3 + +Most of the interface in version 2 should work in version 3 with the exception of user-defined shades. Creating shades with user-defined data should hopefully be easier and clearer. There are now factory methods for each non-BSDF shade type: `create_perforated_screen`, `create_venetian_blind` and `create_woven_shade`. See [perforated_screen_user_defined_geometry_and_user_defined_nband_material.py](https://github.com/LBNL-ETA/pyWinCalc/blob/main/examples/perforated_screen_user_defined_geometry_and_user_defined_nband_material.py), [perforated_screen_user_defined_geometry_igsdb_material.py](https://github.com/LBNL-ETA/pyWinCalc/blob/main/examples/perforated_screen_user_defined_geometry_igsdb_material.py), [venetian_blind_user_defined_geometry_igsdb_material.py](https://github.com/LBNL-ETA/pyWinCalc/blob/main/examples/venetian_blind_user_defined_geometry_igsdb_material.py), [venetian_blind_user_defined_geometry_user_defined_dual_band_material.py](https://github.com/LBNL-ETA/pyWinCalc/blob/main/examples/venetian_blind_user_defined_geometry_user_defined_dual_band_material.py), [vertical_venetian_user_defined_geometry_igsdb_material.py](https://github.com/LBNL-ETA/pyWinCalc/blob/main/examples/vertical_venetian_user_defined_geometry_igsdb_material.py), or [woven_shade_user_defined_geometry_igsdb_material.py](https://github.com/LBNL-ETA/pyWinCalc/blob/main/examples/woven_shade_user_defined_geometry_igsdb_material.py) + +Creating gases and gaps has changed but the prior interface has been retained and flagged as deprecated. If you run into any problems with existing code and cannot easily convert it following the examples in [gaps_and_gases.py](https://github.com/LBNL-ETA/pyWinCalc/blob/include_standards/examples/gaps_and_gases.py) contact us and hopefully we will be able to help. + +# From version 1 There were several interface changes that resulted from the new functionality. These changes are mostly contained in two places: The GlazingSystem constructor and the results structures. Each section will start with a guide on how to convert existing code and will follow with some rational and explination. This conversion will convert the code in the v1 example.py file to code that will work in v2. @@ -670,6 +710,15 @@ Please refer to the [generic_pv.json](https://github.com/LBNL-ETA/pyWinCalc/tree - A string that is convertible to a float. ## Changelog +### v3.0.0 +- Included optical standards with package installed from pypi. +- Added angular absorptance to layer optical results for glazing systems with a BSDF hemisphere. +- Added the ability to model vacuum gaps. +- Added the ability to integrate BSDF matrices. +- Refactored the method of creating user-defined shade layers. +- Fixes for issues creating user-defined Venetian blinds. +- Simplified and expanded examples. Changed the names of the examples to make finding functionality easier. Simplified the code in the examples to try to make them easier to understand. + ### v2.4.2 - Changed the behavior of dual-band BSDF materials. Now if there a system only has a single layer that is a dual band BSDF and the requested optical method is solar or photopic the layer is treated as a single band using the appropritate band values. In all other cases the layer is created as a dual band layer as before. This change is needed so that the single layer calculated solar and visible properties are derived from the values specified for those bands in the input data. diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..bdab32d --- /dev/null +++ b/requirements.txt @@ -0,0 +1,2 @@ +deprecation +requests \ No newline at end of file diff --git a/setup.cfg b/setup.cfg index 99d89e7..bf34b6f 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = pywincalc -version = 2.4.3 +version = 3.0.0 description = A Python library for calculating thermal and optical properties of glazing systems long_description = file: README.md long_description_content_type = text/markdown; charset=UTF-8 @@ -10,5 +10,11 @@ author_email = sczarnecki@lbl.gov license = BSD 3-clause license_file = LICENSE +[options] +zip_safe = False +include_package_data = True +packages = pywincalc +install_requires = deprecation + [bdist_wheel] universal = 1 diff --git a/src/pywincalc.cpp b/src/wincalcbindings.cpp similarity index 68% rename from src/pywincalc.cpp rename to src/wincalcbindings.cpp index 70ec045..6854813 100644 --- a/src/pywincalc.cpp +++ b/src/wincalcbindings.cpp @@ -29,12 +29,15 @@ void declare_wce_optical_result_absorptance(py::module &m, py::dynamic_attr()) .def_readwrite("direct", &Class::total_direct) .def_readwrite("diffuse", &Class::total_diffuse) - .def_readwrite("total_direct", &Class::total_direct) + .def_readwrite("total_direct", &Class::total_direct) .def_readwrite("total_diffuse", &Class::total_diffuse) - .def_readwrite("heat_direct", &Class::heat_direct) + .def_readwrite("heat_direct", &Class::heat_direct) .def_readwrite("heat_diffuse", &Class::heat_diffuse) - .def_readwrite("electricity_direct", &Class::electricity_direct) - .def_readwrite("electricity_diffuse", &Class::electricity_diffuse); + .def_readwrite("electricity_direct", &Class::electricity_direct) + .def_readwrite("electricity_diffuse", &Class::electricity_diffuse) + .def_readwrite("angular_total", &Class::angular_total) + .def_readwrite("angular_heat", &Class::angular_heat) + .def_readwrite("angular_electricity", &Class::angular_electricity); } template @@ -106,6 +109,7 @@ void declare_wce_optical_results_template( "are not currently supported."); } + class Py_Product_Data_Optical : public wincalc::Product_Data_Optical //_Base { public: @@ -117,23 +121,36 @@ class Py_Product_Data_Optical : public wincalc::Product_Data_Optical //_Base } }; -#if 0 -template -class Py_Product_Data_N_Band_Optical - : public Py_Product_Data_Optical { +class Py_CSupportPillar : public Tarcog::ISO15099::CSupportPillar //_Base +{ public: - using Py_Product_Data_Optical:: - Py_Product_Data_Optical; // Inherit constructors - // Override PyAnimal's pure virtual go() with a non-pure one: - std::vector wavelengths() const override { - PYBIND11_OVERRIDE(std::vector, Product_Data_N_Band_Optical_Base, - wavelengths, ); + using Tarcog::ISO15099::CSupportPillar::CSupportPillar; // Inherit + // constructors + +protected: + double conductivityOfPillarArray() override { + PYBIND11_OVERRIDE_PURE(double, Tarcog::ISO15099::CSupportPillar, + conductivityOfPillarArray, ); } }; + +#if 0 +template + class Py_Product_Data_N_Band_Optical + : public Py_Product_Data_Optical { + public: + using Py_Product_Data_Optical:: + Py_Product_Data_Optical; // Inherit constructors + // Override PyAnimal's pure virtual go() with a non-pure one: + std::vector wavelengths() const override { + PYBIND11_OVERRIDE(std::vector, Product_Data_N_Band_Optical_Base, + wavelengths, ); + } +}; #endif -PYBIND11_MODULE(pywincalc, m) { +PYBIND11_MODULE(wincalcbindings, m) { m.doc() = "Python bindings for WinCalc"; py::enum_(m, "PredefinedGasType", py::arithmetic()) @@ -142,54 +159,66 @@ PYBIND11_MODULE(pywincalc, m) { .value("KRYPTON", Gases::GasDef::Krypton) .value("XENON", Gases::GasDef::Xenon); - py::class_( - m, "PredefinedGasMixtureComponent") - .def(py::init(), py::arg("gas"), - py::arg("percent")) - .def_readwrite("gas", &wincalc::Predefined_Gas_Mixture_Component::gas) - .def_readwrite("percent", - &wincalc::Predefined_Gas_Mixture_Component::percent); - py::class_(m, "GasCoefficients") .def(py::init(), py::arg("A"), py::arg("B"), py::arg("C")); - py::class_(m, "CustomGasData") + py::class_(m, "GasData") .def(py::init(), py::arg("name"), py::arg("molecular_weight"), py::arg("specific_heat_ratio"), py::arg("Cp"), - py::arg("thermal_conductivity"), py::arg("viscosity")); - - py::class_(m, - "CustomGasMixtureComponent") - .def(py::init(), py::arg("gas"), - py::arg("percent")) - .def_readwrite("gas", &wincalc::Engine_Gas_Mixture_Component::gas) - .def_readwrite("percent", - &wincalc::Engine_Gas_Mixture_Component::percent); - - py::class_(m, "Gap") - .def(py::init(), - py::arg("custom_gas_data"), py::arg("thickness_meters")) - .def(py::init const &, - double>(), - py::arg("engine_gas_mixture_component_list"), - py::arg("thickness_meters")) - .def(py::init(), - py::arg("predefined_gas_type"), py::arg("thickness_meters")) - .def(py::init< - std::vector const &, - double>(), - py::arg("predefined_gas_type_list"), py::arg("thickness_meters")) - .def(py::init> const &, + py::arg("thermal_conductivity"), py::arg("viscosity")) + .def("get_molecular_weight", &Gases::CGasData::getMolecularWeight) + .def("get_property_value", &Gases::CGasData::getPropertyValue, + py::arg("type"), py::arg("temperature")) + .def("get_specific_heat_ratio", &Gases::CGasData::getSpecificHeatRatio) + .def("name", &Gases::CGasData::name); + + py::class_(m, "Gas") + .def(py::init> const &>(), + py::arg("gases")) + .def(py::init> const &>(), + py::arg("gases")) + .def("get_simple_gas_properties", &Gases::CGas::getSimpleGasProperties) + .def("get_gas_properties", &Gases::CGas::getGasProperties) + .def("set_temperature_and_pressure", + &Gases::CGas::setTemperatureAndPressure) + .def("gas_items", &Gases::CGas::gasItems); + + py::class_(m, "PredefinedGasConverter") + .def_static("instance", &Gases::Gas::instance) + .def("get", &Gases::Gas::get); + + py::class_>(m, "IGUGapLayer") + .def(py::init(), py::arg("thickness"), + py::arg("pressure")) + .def(py::init(), + py::arg("thickness"), py::arg("pressure"), py::arg("gas")); + + py::class_>( + m, "IGUGapLayerDeflection") + .def(py::init(), + py::arg("gap_layer"), py::arg("temperature_initial"), + py::arg("pressure_initial")); + + py::class_>(m, "SupportPillar") + .def(py::init(), + py::arg("gap_layer"), py::arg("conductivity")); + + py::class_>( + m, "CircularPillar") + .def(py::init(), - py::arg("gas_list"), py::arg("thickness_meters")) - .def_readwrite("gases", &wincalc::Engine_Gap_Info::gases) - .def_readwrite("thickness", &wincalc::Engine_Gap_Info::thickness); + py::arg("gap_layer"), py::arg("conductivity"), py::arg("spacing"), + py::arg("radius")); py::class_(m, "OpticalMeasurementComponent") @@ -204,15 +233,12 @@ PYBIND11_MODULE(pywincalc, m) { &OpticsParser::MeasurementComponent::rf) .def_readwrite("reflectance_back", &OpticsParser::MeasurementComponent::rb); - - + py::class_(m, "PVWavelengthData") - .def(py::init(), - py::arg("eqe_front"), py::arg("eqe_back")) - .def_readwrite("eqq_front", - &OpticsParser::PVWavelengthData::eqef) - .def_readwrite("eqe_back", - &OpticsParser::PVWavelengthData::eqeb); + .def(py::init(), py::arg("eqe_front"), + py::arg("eqe_back")) + .def_readwrite("eqq_front", &OpticsParser::PVWavelengthData::eqef) + .def_readwrite("eqe_back", &OpticsParser::PVWavelengthData::eqeb); py::class_(m, "WavelengthData") .def(py::init>(m, @@ -247,7 +272,7 @@ PYBIND11_MODULE(pywincalc, m) { py::class_>( - m, "VenetianGeometry") + m, "ParsedVenetianGeometry") .def(py::init(), py::arg("slat_width"), py::arg("slat_spacing"), py::arg("slat_curvature"), py::arg("slat_tilt") = 0, @@ -262,7 +287,8 @@ PYBIND11_MODULE(pywincalc, m) { &OpticsParser::VenetianGeometry::numberSegments); py::class_>(m, "WovenGeometry") + std::shared_ptr>( + m, "ParsedWovenGeometry") .def(py::init()) .def_readwrite("thread_diameter", &OpticsParser::WovenGeometry::threadDiameter) @@ -273,7 +299,7 @@ PYBIND11_MODULE(pywincalc, m) { py::class_>( - m, "PerforatedGeometry") + m, "ParsedPerforatedGeometry") .def(py::init(), py::arg("spacing_x_meters"), py::arg("spacing_y_meters"), py::arg("dimension_x_meters"), py::arg("dimension_y_meters"), @@ -303,20 +329,16 @@ PYBIND11_MODULE(pywincalc, m) { py::class_(m, "DualBandBSDF") .def_readwrite("solar", &OpticsParser::DualBandBSDF::solar) .def_readwrite("visible", &OpticsParser::DualBandBSDF::visible); - + py::class_(m, "PVPowerProperty") - .def(py::init(), - py::arg("jsc"), py::arg("voc"), py::arg("ff")) - .def_readwrite("jsc", - &OpticsParser::PVPowerProperty::jsc) - .def_readwrite("voc", - &OpticsParser::PVPowerProperty::voc) - .def_readwrite("ff", - &OpticsParser::PVPowerProperty::ff); + .def(py::init(), py::arg("jsc"), py::arg("voc"), + py::arg("ff")) + .def_readwrite("jsc", &OpticsParser::PVPowerProperty::jsc) + .def_readwrite("voc", &OpticsParser::PVPowerProperty::voc) + .def_readwrite("ff", &OpticsParser::PVPowerProperty::ff); py::class_>(m, "ProductData") - .def("composed_product", &OpticsParser::ProductData::composedProduct) .def_readwrite("product_name", &OpticsParser::ProductData::productName) .def_readwrite("product_type", &OpticsParser::ProductData::productType) .def_readwrite("nfrc_id", &OpticsParser::ProductData::nfrcid) @@ -335,7 +357,8 @@ PYBIND11_MODULE(pywincalc, m) { .def_readwrite("youngs_modulus", &OpticsParser::ProductData::youngsModulus) .def_readwrite("pv_power_properties", - &OpticsParser::ProductData::pvPowerProperties); + &OpticsParser::ProductData::pvPowerProperties) + .def_readwrite("composition", &OpticsParser::ProductData::composition); py::class_>( @@ -348,21 +371,6 @@ PYBIND11_MODULE(pywincalc, m) { .def_readwrite("geometry", &OpticsParser::CompositionInformation::geometry); - py::class_>( - m, "ComposedProductData") - .def(py::init>(), - py::arg("solid_layers"), py::arg("product_composition_data")) - .def(py::init>(), - py::arg("product_composition_data")) - .def("composed_product", - &OpticsParser::ComposedProductData::composedProduct) - .def_readwrite( - "product_composition_data", - &OpticsParser::ComposedProductData::compositionInformation); - - py::enum_(m, "SpectrumType", py::arithmetic()) .value("NONE", window_standards::Spectrum_Type::NONE) @@ -634,9 +642,10 @@ PYBIND11_MODULE(pywincalc, m) { .def("wavelengths", &wincalc::Product_Data_Dual_Band_Optical::wavelengths); - py::class_>( + py::class_< + wincalc::Product_Data_Dual_Band_Optical_Hemispheric, + wincalc::Product_Data_Dual_Band_Optical, + std::shared_ptr>( m, "ProductDataOpticalDualBandHemispheric") .def(py::init, @@ -692,7 +701,7 @@ PYBIND11_MODULE(pywincalc, m) { std::vector> const &, std::vector> const &, std::vector> const &, - SingleLayerOptics::CBSDFHemisphere const &, double, + SingleLayerOptics::BSDFHemisphere const &, double, std::optional, std::optional, std::optional, std::optional, double, bool>(), @@ -751,96 +760,95 @@ PYBIND11_MODULE(pywincalc, m) { .value("DIRECTIONAL_DIFFUSE", SingleLayerOptics::DistributionMethod::DirectionalDiffuse); + py::class_>(m, "VenetianGeometry") + .def(py::init(), + py::arg("slat_tilt_degrees"), py::arg("slat_width_meters"), + py::arg("slat_spacing_meters"), py::arg("slat_curvature_meters"), + py::arg("is_horizontal") = true, + py::arg("distribution_method") = + SingleLayerOptics::DistributionMethod::DirectionalDiffuse, + py::arg("number_slat_segments") = 5) + .def_readwrite("slat_tilt", &wincalc::Venetian_Geometry::slat_tilt) + .def_readwrite("slat_width", &wincalc::Venetian_Geometry::slat_width) + .def_readwrite("slat_spacing", &wincalc::Venetian_Geometry::slat_spacing) + .def_readwrite("slat_curvature", + &wincalc::Venetian_Geometry::slat_curvature) + .def_readwrite("number_slat_segments", + &wincalc::Venetian_Geometry::number_slat_segments) + .def_readwrite("distribution_method", + &wincalc::Venetian_Geometry::distribution_method) + .def_readwrite("is_horizontal", + &wincalc::Venetian_Geometry::is_horizontal); + py::class_>( m, "ProductDataOpticalVenetian") .def(py::init const &, - double, double, double, double, int, - SingleLayerOptics::DistributionMethod, bool>(), - py::arg("product_data_optical"), py::arg("slat_tilt_meters"), - py::arg("slat_width_meters"), py::arg("slat_spacing_meters"), - py::arg("slat_curvature_meters"), py::arg("numbers_slats"), - py::arg("distribution_method") = - SingleLayerOptics::DistributionMethod::DirectionalDiffuse, - py::arg("is_horizontal") = true) - .def_readwrite("slat_tilt", - &wincalc::Product_Data_Optical_Venetian::slat_tilt) - .def_readwrite("slat_width", - &wincalc::Product_Data_Optical_Venetian::slat_width) - .def_readwrite("slat_spacing", - &wincalc::Product_Data_Optical_Venetian::slat_spacing) - .def_readwrite("slat_curvature", - &wincalc::Product_Data_Optical_Venetian::slat_curvature) - .def_readwrite("number_slats", - &wincalc::Product_Data_Optical_Venetian::number_slats) - .def_readwrite( - "distribution_method", - &wincalc::Product_Data_Optical_Venetian::distribution_method) - .def_readwrite( - "is_horizontal", - &wincalc::Product_Data_Optical_Venetian::is_horizontal); + wincalc::Venetian_Geometry const &>(), + py::arg("product_data_optical"), py::arg("geometry")) + .def_readwrite("geometry", + &wincalc::Product_Data_Optical_Venetian::geometry); + + py::class_>( + m, "WovenGeometry") + .def(py::init(), py::arg("thread_diamater"), + py::arg("thread_spacing"), py::arg("shade_thickness")) + .def_readwrite("thread_diameter", + &wincalc::Woven_Geometry::thread_diameter) + .def_readwrite("thread_spacing", &wincalc::Woven_Geometry::thread_spacing) + .def_readwrite("shade_thickness", + &wincalc::Woven_Geometry::shade_thickness); py::class_>( m, "ProductDataOpticalWovenShade") .def(py::init const &, - double, double, double>(), - py::arg("material_product_data_optical"), py::arg("thread_diamater"), - py::arg("thread_spacing"), py::arg("shade_thickness")) - .def_readwrite( - "thread_diameter", - &wincalc::Product_Data_Optical_Woven_Shade::thread_diameter) - .def_readwrite("thread_spacing", - &wincalc::Product_Data_Optical_Woven_Shade::thread_spacing) - .def_readwrite( - "shade_thickness", - &wincalc::Product_Data_Optical_Woven_Shade::shade_thickness); + wincalc::Woven_Geometry const &>(), + py::arg("material_product_data_optical"), py::arg("geometry")) + .def_readwrite("geometry", + &wincalc::Product_Data_Optical_Woven_Shade::geometry); + + py::class_> + perforated_geometry(m, "PerforatedGeometry"); + + perforated_geometry + .def(py::init(), + py::arg("spacing_x"), py::arg("spacing_y"), py::arg("dimension_x"), + py::arg("dimension_y"), py::arg("perforation_type")) + .def_readwrite("spacing_x", &wincalc::Perforated_Geometry::spacing_x) + .def_readwrite("spacing_y", &wincalc::Perforated_Geometry::spacing_y) + .def_readwrite("dimension_x", &wincalc::Perforated_Geometry::dimension_x) + .def_readwrite("dimension_y", &wincalc::Perforated_Geometry::dimension_y) + .def_readwrite("perforation_type", + &wincalc::Perforated_Geometry::perforation_type); + + py::enum_(perforated_geometry, "Type") + .value("CIRCULAR", wincalc::Perforated_Geometry::Type::CIRCULAR) + .value("RECTANGULAR", wincalc::Perforated_Geometry::Type::RECTANGULAR) + .value("SQUARE", wincalc::Perforated_Geometry::Type::SQUARE); py::class_> - product_data_optical_perforated_screen( - m, "ProductDataOpticalPerforatedScreen"); - - product_data_optical_perforated_screen + std::shared_ptr>( + m, "ProductDataOpticalPerforatedScreen") .def(py::init const &, - double, double, double, double, - wincalc::Product_Data_Optical_Perforated_Screen::Type>(), - py::arg("material_product_data_optical"), py::arg("spacing_x"), - py::arg("spacing_y"), py::arg("dimension_x"), py::arg("dimension_y"), - py::arg("perforation_type")) - .def_readwrite( - "spacing_x", - &wincalc::Product_Data_Optical_Perforated_Screen::spacing_x) - .def_readwrite( - "spacing_y", - &wincalc::Product_Data_Optical_Perforated_Screen::spacing_y) - .def_readwrite( - "dimension_x", - &wincalc::Product_Data_Optical_Perforated_Screen::dimension_x) + wincalc::Perforated_Geometry const &>(), + py::arg("material_product_data_optical"), py::arg("geometry")) .def_readwrite( - "dimension_y", - &wincalc::Product_Data_Optical_Perforated_Screen::dimension_y) - .def_readwrite( - "perforation_type", - &wincalc::Product_Data_Optical_Perforated_Screen::perforation_type); - - py::enum_( - product_data_optical_perforated_screen, "Type") - .value("CIRCULAR", - wincalc::Product_Data_Optical_Perforated_Screen::Type::CIRCULAR) - .value("RECTANGULAR", - wincalc::Product_Data_Optical_Perforated_Screen::Type::RECTANGULAR) - .value("SQUARE", - wincalc::Product_Data_Optical_Perforated_Screen::Type::SQUARE); + "geometry", + &wincalc::Product_Data_Optical_Perforated_Screen::geometry); py::class_( m, "ProductDataOpticalAndThermal") .def(py::init, std::shared_ptr>(), - py::arg("prouct_data_optical"), py::arg("product_data_thermal")) + py::arg("product_data_optical"), py::arg("product_data_thermal")) .def_readwrite("optical_data", &wincalc::Product_Data_Optical_Thermal::optical_data) .def_readwrite("thermal_data", @@ -852,13 +860,12 @@ PYBIND11_MODULE(pywincalc, m) { .value("HALF", SingleLayerOptics::BSDFBasis::Half) .value("FULL", SingleLayerOptics::BSDFBasis::Full); - py::class_(m, "BSDFHemisphere") + py::class_(m, "BSDFHemisphere") .def_static("create", py::overload_cast( - &SingleLayerOptics::CBSDFHemisphere::create), + &SingleLayerOptics::BSDFHemisphere::create), py::arg("bsdf_basis")) - .def("get_directions", - &SingleLayerOptics::CBSDFHemisphere::getDirections); + .def("get_directions", &SingleLayerOptics::BSDFHemisphere::getDirections); py::enum_(m, "TarcogSystemType", py::arithmetic()) .value("U", Tarcog::ISO15099::System::Uvalue) @@ -883,63 +890,72 @@ PYBIND11_MODULE(pywincalc, m) { .def_readwrite("panes_load", &wincalc::Deflection_Results::panes_load); py::class_(m, "GlazingSystem") - .def(py::init const &, - std::vector const &, double, - double, double, wincalc::Environments const &, - std::optional const &, - wincalc::Spectal_Data_Wavelength_Range_Method const &, int, - int>(), - py::arg("optical_standard"), py::arg("solid_layers"), - py::arg("gap_layers") = std::vector(), - py::arg("width_meters") = 1.0, py::arg("height_meters") = 1.0, - py::arg("tilt_degrees") = 90, - py::arg("environment") = wincalc::nfrc_u_environments(), - py::arg("bsdf_hemisphere") = - std::optional(), - py::arg("spectral_data_wavelength_range_method") = - wincalc::Spectal_Data_Wavelength_Range_Method::FULL, - py::arg("number_visible_bands") = 5, - py::arg("number_solar_bands") = 10) - .def(py::init< - window_standards::Optical_Standard const &, - std::vector> const &, - std::vector const &, double, double, - double, wincalc::Environments const &, - std::optional const &, - wincalc::Spectal_Data_Wavelength_Range_Method const &, int, - int>(), - py::arg("optical_standard"), py::arg("solid_layers"), - py::arg("gap_layers") = std::vector(), - py::arg("width_meters") = 1.0, py::arg("height_meters") = 1.0, - py::arg("tilt_degrees") = 90, - py::arg("environment") = wincalc::nfrc_u_environments(), - py::arg("bsdf_hemisphere") = - std::optional(), - py::arg("spectral_data_wavelength_range_method") = - wincalc::Spectal_Data_Wavelength_Range_Method::FULL, - py::arg("number_visible_bands") = 5, - py::arg("number_solar_bands") = 10) - .def(py::init, - wincalc::Product_Data_Optical_Thermal>> const &, - std::vector const &, double, - double, double, wincalc::Environments const &, - std::optional const &, - wincalc::Spectal_Data_Wavelength_Range_Method const &, int, - int>(), - py::arg("optical_standard"), py::arg("solid_layers"), - py::arg("gap_layers") = std::vector(), - py::arg("width_meters") = 1.0, py::arg("height_meters") = 1.0, - py::arg("tilt_degrees") = 90, - py::arg("environment") = wincalc::nfrc_u_environments(), - py::arg("bsdf_hemisphere") = - std::optional(), - py::arg("spectral_data_wavelength_range_method") = - wincalc::Spectal_Data_Wavelength_Range_Method::FULL, - py::arg("number_visible_bands") = 5, - py::arg("number_solar_bands") = 10) + .def( + py::init const &, + std::vector< + std::shared_ptr> const &, + double, double, double, wincalc::Environments const &, + std::optional const &, + wincalc::Spectal_Data_Wavelength_Range_Method const &, int, + int>(), + py::arg("optical_standard"), py::arg("solid_layers"), + py::arg("gap_layers") = + std::vector>(), + py::arg("width_meters") = 1.0, py::arg("height_meters") = 1.0, + py::arg("tilt_degrees") = 90, + py::arg("environment") = wincalc::nfrc_u_environments(), + py::arg("bsdf_hemisphere") = + std::optional(), + py::arg("spectral_data_wavelength_range_method") = + wincalc::Spectal_Data_Wavelength_Range_Method::FULL, + py::arg("number_visible_bands") = 5, + py::arg("number_solar_bands") = 10) + .def( + py::init const &, + std::vector< + std::shared_ptr> const &, + double, double, double, wincalc::Environments const &, + std::optional const &, + wincalc::Spectal_Data_Wavelength_Range_Method const &, int, + int>(), + py::arg("optical_standard"), py::arg("solid_layers"), + py::arg("gap_layers") = + std::vector>(), + py::arg("width_meters") = 1.0, py::arg("height_meters") = 1.0, + py::arg("tilt_degrees") = 90, + py::arg("environment") = wincalc::nfrc_u_environments(), + py::arg("bsdf_hemisphere") = + std::optional(), + py::arg("spectral_data_wavelength_range_method") = + wincalc::Spectal_Data_Wavelength_Range_Method::FULL, + py::arg("number_visible_bands") = 5, + py::arg("number_solar_bands") = 10) + .def( + py::init< + window_standards::Optical_Standard const &, + std::vector< + std::variant> const &, + std::vector> const + &, + double, double, double, wincalc::Environments const &, + std::optional const &, + wincalc::Spectal_Data_Wavelength_Range_Method const &, int, + int>(), + py::arg("optical_standard"), py::arg("solid_layers"), + py::arg("gap_layers") = + std::vector>(), + py::arg("width_meters") = 1.0, py::arg("height_meters") = 1.0, + py::arg("tilt_degrees") = 90, + py::arg("environment") = wincalc::nfrc_u_environments(), + py::arg("bsdf_hemisphere") = + std::optional(), + py::arg("spectral_data_wavelength_range_method") = + wincalc::Spectal_Data_Wavelength_Range_Method::FULL, + py::arg("number_visible_bands") = 5, + py::arg("number_solar_bands") = 10) .def("u", &wincalc::Glazing_System::u, py::arg("theta") = 0, py::arg("phi") = 0) .def("shgc", &wincalc::Glazing_System::shgc, py::arg("theta") = 0, @@ -988,10 +1004,11 @@ PYBIND11_MODULE(pywincalc, m) { py::arg("width_meters")) .def("set_tilt", &wincalc::Glazing_System::set_tilt, py::arg("tilt_degrees")) - .def("flip_layer", &wincalc::Glazing_System::flip_layer, - py::arg("layer_index"), py::arg("flipped")) - .def("solid_layers", - py::overload_cast const &>( + .def("flip_layer", &wincalc::Glazing_System::flip_layer, + py::arg("layer_index"), py::arg("flipped")) + .def("solid_layers", + py::overload_cast< + std::vector const &>( &wincalc::Glazing_System::solid_layers), py::arg("solid_layers")) .def("solid_layers", @@ -1024,6 +1041,60 @@ PYBIND11_MODULE(pywincalc, m) { m.def("parse_thmx_string", &thmxParser::parseString, "Parse THERM thmx format from a string"); + m.def("create_gas", &wincalc::create_gas, py::arg("components"), + "Create a gas mixture from components: a list of pairs where the first in each item is the percent of the total and the second is the gas."); + + m.def("create_venetian_blind", + py::overload_cast( + &wincalc::create_venetian_blind), + py::arg("geometry"), py::arg("material"), + "Create a venetian blind from a geometry and parsed material."); + + m.def("create_venetian_blind", + py::overload_cast, + std::shared_ptr>( + &wincalc::create_venetian_blind), + py::arg("geometry"), py::arg("material_data_optical"), + py::arg("material_data_thermal").none(true), + "Create a venetian blind from a geometry and material optical and " + "thermal data."); + + m.def("create_woven_shade", + py::overload_cast( + &wincalc::create_woven_shade), + py::arg("geometry"), py::arg("material"), + "Create a woven shade from a geometry and parsed material."); + + m.def("create_woven_shade", + py::overload_cast, + std::shared_ptr>( + &wincalc::create_woven_shade), + py::arg("geometry"), py::arg("material_data_optical"), + py::arg("material_data_thermal").none(true), + "Create a woven shade from a geometry and material optical and " + "thermal data."); + + m.def("create_perforated_screen", + py::overload_cast( + &wincalc::create_perforated_screen), + py::arg("geometry"), py::arg("material"), + "Create a perforated screen from a geometry and parsed material."); + + m.def("create_perforated_screen", + py::overload_cast, + std::shared_ptr>( + &wincalc::create_perforated_screen), + py::arg("geometry"), py::arg("material_data_optical"), + py::arg("material_data_thermal").none(true), + "Create a perforated screen from a geometry and material optical and " + "thermal data."); + py::class_(m, "ThmxMeshParameters") .def_readwrite("quad_tree_mesh_level", &thmxParser::MeshParameters::quadTreeMeshLevel) @@ -1268,26 +1339,78 @@ PYBIND11_MODULE(pywincalc, m) { .def("set_frame_meeting_rail", &CMA::CMAWindowDualVisionVertical::setFrameMeetingRail) .def("set_dividers", &CMA::CMAWindowDualVisionVertical::setDividers); - + py::class_(m, "ThermalIRResults") - .def_readwrite("transmittance_front_diffuse_diffuse", &wincalc::ThermalIRResults::transmittance_front_diffuse_diffuse) - .def_readwrite("transmittance_back_diffuse_diffuse", &wincalc::ThermalIRResults::transmittance_back_diffuse_diffuse) - .def_readwrite("emissivity_front_hemispheric", &wincalc::ThermalIRResults::emissivity_front_hemispheric) - .def_readwrite("emissivity_back_hemispheric", &wincalc::ThermalIRResults::emissivity_back_hemispheric); + .def_readwrite( + "transmittance_front_diffuse_diffuse", + &wincalc::ThermalIRResults::transmittance_front_diffuse_diffuse) + .def_readwrite( + "transmittance_back_diffuse_diffuse", + &wincalc::ThermalIRResults::transmittance_back_diffuse_diffuse) + .def_readwrite("emissivity_front_hemispheric", + &wincalc::ThermalIRResults::emissivity_front_hemispheric) + .def_readwrite("emissivity_back_hemispheric", + &wincalc::ThermalIRResults::emissivity_back_hemispheric); - m.def("calc_thermal_ir", &wincalc::calc_thermal_ir, py::arg("optical_standard"), py::arg("product_data")); + m.def("calc_thermal_ir", &wincalc::calc_thermal_ir, + py::arg("optical_standard"), py::arg("product_data")); m.def("get_spacer_keff", &wincalc::get_spacer_keff, "Calculate the effective conductivity of a spacer from a THERM thmx " "file."); - m.def("get_cma_window_single_vision", &wincalc::get_cma_window_single_vision, + m.def("get_cma_window_single_vision", + py::overload_cast( + &wincalc::get_cma_window_single_vision), "Get the CMA template for a single vision window."); + m.def( + "get_cma_window_single_vision", + py::overload_cast< + CMA::CMAFrame const &, CMA::CMAFrame const &, CMA::CMAFrame const &, + CMA::CMAFrame const &, double, double, double, double, + CMA::CMABestWorstUFactors const &, CMA::CMABestWorstUFactors const &>( + &wincalc::get_cma_window_single_vision), + "Get the CMA template for a single vision window."); m.def("get_cma_window_double_vision_vertical", - &wincalc::get_cma_window_double_vision_vertical, + py::overload_cast( + &wincalc::get_cma_window_double_vision_vertical), "Get the CMA template for a double vision vertical window."); + m.def( + "get_cma_window_double_vision_vertical", + py::overload_cast< + CMA::CMAFrame const &, CMA::CMAFrame const &, CMA::CMAFrame const &, + CMA::CMAFrame const &, CMA::CMAFrame const &, CMA::CMAFrame const &, + CMA::CMAFrame const &, double, double, double, double, + CMA::CMABestWorstUFactors const &, CMA::CMABestWorstUFactors const &>( + &wincalc::get_cma_window_double_vision_vertical), + "Get the CMA template for a double vision vertical window."); m.def("get_cma_window_double_vision_horizontal", - &wincalc::get_cma_window_double_vision_horizontal, + py::overload_cast( + &wincalc::get_cma_window_double_vision_horizontal), "Get the CMA template for a double vision horizontal window."); + m.def( + "get_cma_window_double_vision_horizontal", + py::overload_cast< + CMA::CMAFrame const &, CMA::CMAFrame const &, CMA::CMAFrame const &, + CMA::CMAFrame const &, CMA::CMAFrame const &, CMA::CMAFrame const &, + CMA::CMAFrame const &, double, double, double, double, + CMA::CMABestWorstUFactors const &, CMA::CMABestWorstUFactors const &>( + &wincalc::get_cma_window_double_vision_horizontal), + "Get the CMA template for a double vision horizontal window."); py::class_(m, "CMAResult") .def_readwrite("u", &wincalc::CMAResult::u) @@ -1295,4 +1418,136 @@ PYBIND11_MODULE(pywincalc, m) { .def_readwrite("vt", &wincalc::CMAResult::vt); m.def("calc_cma", &wincalc::calc_cma, "Get CMA results."); + + py::enum_(m, "BSDFDirection", + py::arithmetic()) + .value("Incoming", SingleLayerOptics::BSDFDirection::Incoming) + .value("Outgoing", SingleLayerOptics::BSDFDirection::Outgoing); + + py::enum_(m, "Side", py::arithmetic()) + .value("Front", FenestrationCommon::Side::Front) + .value("Back", FenestrationCommon::Side::Back); + + py::enum_(m, "PropertySimple", + py::arithmetic()) + .value("T", FenestrationCommon::PropertySimple::T) + .value("R", FenestrationCommon::PropertySimple::R); + + py::class_(m, "SquareMatrix") + .def(py::init> const &>(), + py::arg("input")) + .def("size", &FenestrationCommon::SquareMatrix::size) + .def("set_zeros", &FenestrationCommon::SquareMatrix::setZeros) + .def("set_identity", &FenestrationCommon::SquareMatrix::setIdentity) + .def("set_diagonal", &FenestrationCommon::SquareMatrix::setDiagonal) + .def("make_upper_triangular", + &FenestrationCommon::SquareMatrix::makeUpperTriangular) + .def("inverse", &FenestrationCommon::SquareMatrix::inverse) + .def("mmult_rows", &FenestrationCommon::SquareMatrix::mmultRows) + .def("get_matrix", &FenestrationCommon::SquareMatrix::getMatrix); + + py::class_(m, "BSDFDirections") + .def(py::init<>()) + .def(py::init const &, + SingleLayerOptics::BSDFDirection>(), + py::arg("definitions"), py::arg("side")) + .def("lambda_vector", &SingleLayerOptics::BSDFDirections::lambdaVector) + .def("profile_angles", &SingleLayerOptics::BSDFDirections::profileAngles) + .def("lambda_matrix", &SingleLayerOptics::BSDFDirections::lambdaMatrix) + .def("get_nearest_beam_index", + &SingleLayerOptics::BSDFDirections::getNearestBeamIndex); + + py::class_(m, "BSDFIntegrator") + .def(py::init(), + py::arg("directions")) + .def("get_matrix", &SingleLayerOptics::BSDFIntegrator::getMatrix) + .def("at", &SingleLayerOptics::BSDFIntegrator::at) + .def("set_matrices", &SingleLayerOptics::BSDFIntegrator::setMatrices) + .def( + "direct_direct", + py::overload_cast( + &SingleLayerOptics::BSDFIntegrator::DirDir, py::const_)) + .def("direct_direct", + py::overload_cast( + &SingleLayerOptics::BSDFIntegrator::DirDir, py::const_)) + .def("direct_hemispheric", + py::overload_cast( + &SingleLayerOptics::BSDFIntegrator::DirHem)) + .def( + "direct_hemispheric", + py::overload_cast( + &SingleLayerOptics::BSDFIntegrator::DirHem)) + .def("absorptance", py::overload_cast( + &SingleLayerOptics::BSDFIntegrator::Abs)) + .def("absorptance", + py::overload_cast( + &SingleLayerOptics::BSDFIntegrator::Abs)) + .def("absorptance", py::overload_cast( + &SingleLayerOptics::BSDFIntegrator::Abs)) + .def("diffuse_diffuse", &SingleLayerOptics::BSDFIntegrator::DiffDiff) + .def("absorptance_diffuse_diffuse", + &SingleLayerOptics::BSDFIntegrator::AbsDiffDiff) + .def("lambda_vector", &SingleLayerOptics::BSDFIntegrator::lambdaVector) + .def("lambda_matrix", &SingleLayerOptics::BSDFIntegrator::lambdaMatrix) + .def("get_nearest_beam_index", + &SingleLayerOptics::BSDFIntegrator::getNearestBeamIndex); + + py::class_(m, "EffectiveOpenness") + .def(py::init(), + py::arg("ah"), py::arg("al"), py::arg("ar"), py::arg("atop"), + py::arg("abot"), py::arg("front_porosity")) + .def("is_closed", &EffectiveLayers::EffectiveOpenness::isClosed) + .def_readwrite("ah", &EffectiveLayers::EffectiveOpenness::Ah) + .def_readwrite("al", &EffectiveLayers::EffectiveOpenness::Al) + .def_readwrite("ar", &EffectiveLayers::EffectiveOpenness::Ar) + .def_readwrite("atop", &EffectiveLayers::EffectiveOpenness::Atop) + .def_readwrite("abot", &EffectiveLayers::EffectiveOpenness::Abot) + .def_readwrite("front_porosity", + &EffectiveLayers::EffectiveOpenness::FrontPorosity); + + py::class_(m, "Layers") + .def_static("solid", &Tarcog::ISO15099::Layers::solid, + "Factory method for creating a solid Tarcog layer", + py::arg("thickness"), py::arg("conductivity"), + py::arg("frontEmissivity") = 0.84, + py::arg("frontIRTransmittance") = 0.0, + py::arg("backEmissivity") = 0.84, + py::arg("backIRTransmittance") = 0.0) + .def_static("update_material_data", + &Tarcog::ISO15099::Layers::updateMaterialData, + "Static method for updating the material information for a " + "solid Tarcog layer.", + py::arg("layer"), + py::arg("density") = Tarcog::MaterialConstants::GLASSDENSITY, + py::arg("youngs_modulus") = + Tarcog::DeflectionConstants::YOUNGSMODULUS) + .def_static("shading", &Tarcog::ISO15099::Layers::shading, + "Factory function to create a Tarcog shading layer.", + py::arg("thickness"), py::arg("conductivity"), + py::arg("effective_openness") = + EffectiveLayers::EffectiveOpenness(0, 0, 0, 0, 0, 0), + py::arg("front_emissivity") = 0.84, + py::arg("front_transmittance") = 0.0, + py::arg("back_emissivity") = 0.84, + py::arg("back_transmittance") = 0.0) + .def_static( + "gap", + py::overload_cast(&Tarcog::ISO15099::Layers::gap), + "Factory function to create a Tarcog air gap", py::arg("thickness"), + py::arg("pressure") = 101325) + .def_static("gap", + py::overload_cast( + &Tarcog::ISO15099::Layers::gap), + "Factory function to create a Tarcog gap from a gas", + py::arg("thickness"), py::arg("gas"), + py::arg("pressure") = 101325) + .def_static("add_circular_pillar", + &Tarcog::ISO15099::Layers::addCircularPillar, + "Static function to add a circular pillar to a Tarcog gap", + py::arg("gap"), py::arg("conductivity"), py::arg("spacing"), + py::arg("radius")); } diff --git a/wheels/pywincalc-2.3.2-cp310-cp310-win32.whl b/wheels/pywincalc-2.3.2-cp310-cp310-win32.whl deleted file mode 100644 index dc33470..0000000 Binary files a/wheels/pywincalc-2.3.2-cp310-cp310-win32.whl and /dev/null differ diff --git a/wheels/pywincalc-2.3.2-cp310-cp310-win_amd64.whl b/wheels/pywincalc-2.3.2-cp310-cp310-win_amd64.whl deleted file mode 100644 index 4499bbc..0000000 Binary files a/wheels/pywincalc-2.3.2-cp310-cp310-win_amd64.whl and /dev/null differ diff --git a/wheels/pywincalc-2.3.2-cp37-cp37m-win32.whl b/wheels/pywincalc-2.3.2-cp37-cp37m-win32.whl deleted file mode 100644 index d10471a..0000000 Binary files a/wheels/pywincalc-2.3.2-cp37-cp37m-win32.whl and /dev/null differ diff --git a/wheels/pywincalc-2.3.2-cp37-cp37m-win_amd64.whl b/wheels/pywincalc-2.3.2-cp37-cp37m-win_amd64.whl deleted file mode 100644 index 76198e8..0000000 Binary files a/wheels/pywincalc-2.3.2-cp37-cp37m-win_amd64.whl and /dev/null differ diff --git a/wheels/pywincalc-2.3.2-cp38-cp38-win32.whl b/wheels/pywincalc-2.3.2-cp38-cp38-win32.whl deleted file mode 100644 index 7a66049..0000000 Binary files a/wheels/pywincalc-2.3.2-cp38-cp38-win32.whl and /dev/null differ diff --git a/wheels/pywincalc-2.3.2-cp38-cp38-win_amd64.whl b/wheels/pywincalc-2.3.2-cp38-cp38-win_amd64.whl deleted file mode 100644 index 2abcf5c..0000000 Binary files a/wheels/pywincalc-2.3.2-cp38-cp38-win_amd64.whl and /dev/null differ diff --git a/wheels/pywincalc-2.3.2-cp39-cp39-win32.whl b/wheels/pywincalc-2.3.2-cp39-cp39-win32.whl deleted file mode 100644 index 1450270..0000000 Binary files a/wheels/pywincalc-2.3.2-cp39-cp39-win32.whl and /dev/null differ diff --git a/wheels/pywincalc-2.3.2-cp39-cp39-win_amd64.whl b/wheels/pywincalc-2.3.2-cp39-cp39-win_amd64.whl deleted file mode 100644 index d34c218..0000000 Binary files a/wheels/pywincalc-2.3.2-cp39-cp39-win_amd64.whl and /dev/null differ diff --git a/wheels/pywincalc-2.4.4-cp310-cp310-macosx_12_0_x86_64.whl b/wheels/pywincalc-2.4.4-cp310-cp310-macosx_12_0_x86_64.whl new file mode 100644 index 0000000..2abcc9b Binary files /dev/null and b/wheels/pywincalc-2.4.4-cp310-cp310-macosx_12_0_x86_64.whl differ diff --git a/wheels/pywincalc-2.4.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl b/wheels/pywincalc-2.4.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl new file mode 100644 index 0000000..9c37a5d Binary files /dev/null and b/wheels/pywincalc-2.4.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl differ diff --git a/wheels/pywincalc-2.4.4-cp310-cp310-win32.whl b/wheels/pywincalc-2.4.4-cp310-cp310-win32.whl new file mode 100644 index 0000000..ad9fd39 Binary files /dev/null and b/wheels/pywincalc-2.4.4-cp310-cp310-win32.whl differ diff --git a/wheels/pywincalc-2.4.4-cp310-cp310-win_amd64.whl b/wheels/pywincalc-2.4.4-cp310-cp310-win_amd64.whl new file mode 100644 index 0000000..6b7a048 Binary files /dev/null and b/wheels/pywincalc-2.4.4-cp310-cp310-win_amd64.whl differ diff --git a/wheels/pywincalc-2.4.4-cp311-cp311-macosx_12_0_universal2.whl b/wheels/pywincalc-2.4.4-cp311-cp311-macosx_12_0_universal2.whl new file mode 100644 index 0000000..e40bacf Binary files /dev/null and b/wheels/pywincalc-2.4.4-cp311-cp311-macosx_12_0_universal2.whl differ diff --git a/wheels/pywincalc-2.4.4-cp311-cp311-win32.whl b/wheels/pywincalc-2.4.4-cp311-cp311-win32.whl new file mode 100644 index 0000000..76d1ea7 Binary files /dev/null and b/wheels/pywincalc-2.4.4-cp311-cp311-win32.whl differ diff --git a/wheels/pywincalc-2.4.4-cp311-cp311-win_amd64.whl b/wheels/pywincalc-2.4.4-cp311-cp311-win_amd64.whl new file mode 100644 index 0000000..bddfa26 Binary files /dev/null and b/wheels/pywincalc-2.4.4-cp311-cp311-win_amd64.whl differ diff --git a/wheels/pywincalc-2.4.4-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl b/wheels/pywincalc-2.4.4-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl new file mode 100644 index 0000000..0171b39 Binary files /dev/null and b/wheels/pywincalc-2.4.4-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl differ diff --git a/wheels/pywincalc-2.4.4-cp37-cp37m-macosx_12_0_x86_64.whl b/wheels/pywincalc-2.4.4-cp37-cp37m-macosx_12_0_x86_64.whl new file mode 100644 index 0000000..6030a28 Binary files /dev/null and b/wheels/pywincalc-2.4.4-cp37-cp37m-macosx_12_0_x86_64.whl differ diff --git a/wheels/pywincalc-2.4.4-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl b/wheels/pywincalc-2.4.4-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl new file mode 100644 index 0000000..3f48e69 Binary files /dev/null and b/wheels/pywincalc-2.4.4-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl differ diff --git a/wheels/pywincalc-2.4.4-cp37-cp37m-win32.whl b/wheels/pywincalc-2.4.4-cp37-cp37m-win32.whl new file mode 100644 index 0000000..1caff41 Binary files /dev/null and b/wheels/pywincalc-2.4.4-cp37-cp37m-win32.whl differ diff --git a/wheels/pywincalc-2.4.4-cp37-cp37m-win_amd64.whl b/wheels/pywincalc-2.4.4-cp37-cp37m-win_amd64.whl new file mode 100644 index 0000000..75a4c33 Binary files /dev/null and b/wheels/pywincalc-2.4.4-cp37-cp37m-win_amd64.whl differ diff --git a/wheels/pywincalc-2.4.4-cp38-cp38-macosx_12_0_x86_64.whl b/wheels/pywincalc-2.4.4-cp38-cp38-macosx_12_0_x86_64.whl new file mode 100644 index 0000000..394db5c Binary files /dev/null and b/wheels/pywincalc-2.4.4-cp38-cp38-macosx_12_0_x86_64.whl differ diff --git a/wheels/pywincalc-2.4.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl b/wheels/pywincalc-2.4.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl new file mode 100644 index 0000000..df37c84 Binary files /dev/null and b/wheels/pywincalc-2.4.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl differ diff --git a/wheels/pywincalc-2.4.4-cp38-cp38-win32.whl b/wheels/pywincalc-2.4.4-cp38-cp38-win32.whl new file mode 100644 index 0000000..6f5a7e3 Binary files /dev/null and b/wheels/pywincalc-2.4.4-cp38-cp38-win32.whl differ diff --git a/wheels/pywincalc-2.4.4-cp38-cp38-win_amd64.whl b/wheels/pywincalc-2.4.4-cp38-cp38-win_amd64.whl new file mode 100644 index 0000000..9b4bc8e Binary files /dev/null and b/wheels/pywincalc-2.4.4-cp38-cp38-win_amd64.whl differ diff --git a/wheels/pywincalc-2.4.4-cp39-cp39-macosx_12_0_x86_64.whl b/wheels/pywincalc-2.4.4-cp39-cp39-macosx_12_0_x86_64.whl new file mode 100644 index 0000000..7f9723a Binary files /dev/null and b/wheels/pywincalc-2.4.4-cp39-cp39-macosx_12_0_x86_64.whl differ diff --git a/wheels/pywincalc-2.4.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl b/wheels/pywincalc-2.4.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl new file mode 100644 index 0000000..de54b9e Binary files /dev/null and b/wheels/pywincalc-2.4.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl differ diff --git a/wheels/pywincalc-2.4.4-cp39-cp39-win32.whl b/wheels/pywincalc-2.4.4-cp39-cp39-win32.whl new file mode 100644 index 0000000..caae756 Binary files /dev/null and b/wheels/pywincalc-2.4.4-cp39-cp39-win32.whl differ diff --git a/wheels/pywincalc-2.4.4-cp39-cp39-win_amd64.whl b/wheels/pywincalc-2.4.4-cp39-cp39-win_amd64.whl new file mode 100644 index 0000000..0945ae8 Binary files /dev/null and b/wheels/pywincalc-2.4.4-cp39-cp39-win_amd64.whl differ