diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index 0edfd42..98dd770 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -12,20 +12,22 @@ jobs: matrix: os: [windows-2019] arch: [x86, x64] - python-version: [3.7, 3.8, 3.9, "3.10", "3.11"] + python-version: [3.8, 3.9, "3.10", "3.11", "3.12"] steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} architecture: ${{ matrix.arch }} - name: Install packages - run: pip install wheel + run: | + pip install wheel + pip install setuptools - name: build run: python setup.py bdist_wheel @@ -44,21 +46,23 @@ jobs: # 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-latest] - python-version: [3.7, 3.8, 3.9, "3.10", "3.11"] + python-version: [3.8, 3.9, "3.10", "3.11", "3.12"] env: SYSTEM_VERSION_COMPAT: 0 steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - name: Install packages - run: pip install wheel + run: | + pip install wheel + pip install setuptools - name: build run: python setup.py bdist_wheel @@ -80,6 +84,9 @@ jobs: # Note that at least manylinux2014 is needed to get support for C++17 - name: Build manylinux Python wheels uses: RalfG/python-wheels-manylinux-build@v0.7.1-manylinux2014_x86_64 + with: + python-versions: 'cp38-cp38 cp39-cp39 cp310-cp310 cp311-cp311 cp312-cp312' + build-requirements: 'setuptools' - name: upload wheels uses: actions/upload-artifact@v2 diff --git a/CMakeLists-WinCalc.txt.in b/CMakeLists-WinCalc.txt.in index 5f429b5..aec7b81 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.4.1" + GIT_TAG "v2.4.3" UPDATE_COMMAND "" PATCH_COMMAND "" diff --git a/examples/bsdf_shade_igsdb_product.py b/examples/bsdf_shade_igsdb_product.py index 4cf3f5a..47e100d 100644 --- a/examples/bsdf_shade_igsdb_product.py +++ b/examples/bsdf_shade_igsdb_product.py @@ -4,7 +4,7 @@ bsdf_hemisphere = pywincalc.BSDFHemisphere.create(pywincalc.BSDFBasisType.FULL) -bsdf_igsdb_id = 14710 +bsdf_igsdb_id = 17200 bsdf_igsdb_response = requests.get(url_single_product_datafile.format(id=bsdf_igsdb_id), headers=headers) diff --git a/examples/gap_annulus_cylinder_pillar.py b/examples/gap_annulus_cylinder_pillar.py new file mode 100644 index 0000000..e69fec9 --- /dev/null +++ b/examples/gap_annulus_cylinder_pillar.py @@ -0,0 +1,22 @@ +import pywincalc + +pillar = pywincalc.AnnulusCylinderPillar(height=0.002, material_conductivity=20, + cell_area=pywincalc.pillar_cell_area(pywincalc.CellSpacingType.SQUARE, 0.03), + inner_radius=0.01e-3, outer_radius=0.25e-3) +gap = pywincalc.Layers.create_pillar(pillar=pillar, pressure=0.1333) + +gaps = [gap] + +clear_3_path = "products/CLEAR_3.DAT" +clear_3 = pywincalc.parse_optics_file(clear_3_path) +solid_layers = [clear_3, 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, gap_layers=gaps) +u_value = glazing_system.u() +print(f"U-value for the system: {u_value}") diff --git a/examples/gap_cylindrical_pillar.py b/examples/gap_cylindrical_pillar.py new file mode 100644 index 0000000..f612022 --- /dev/null +++ b/examples/gap_cylindrical_pillar.py @@ -0,0 +1,22 @@ +import pywincalc + +pillar = pywincalc.CylindricalPillar(height=0.002, material_conductivity=20, + cell_area=pywincalc.pillar_cell_area(pywincalc.CellSpacingType.SQUARE, 0.03), + radius=0.25e-3) +gap = pywincalc.Layers.create_pillar(pillar=pillar, pressure=0.1333) + +gaps = [gap] + +clear_3_path = "products/CLEAR_3.DAT" +clear_3 = pywincalc.parse_optics_file(clear_3_path) +solid_layers = [clear_3, 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, gap_layers=gaps) +u_value = glazing_system.u() +print(f"U-value for the system: {u_value}") diff --git a/examples/gap_linear_bearing_pillar.py b/examples/gap_linear_bearing_pillar.py new file mode 100644 index 0000000..e0c314e --- /dev/null +++ b/examples/gap_linear_bearing_pillar.py @@ -0,0 +1,22 @@ +import pywincalc + +pillar = pywincalc.LinearBearingPillar(height=0.002, material_conductivity=20, + cell_area=pywincalc.pillar_cell_area(pywincalc.CellSpacingType.SQUARE, 0.03), + length=0.25e-3, width=0.01e-3) +gap = pywincalc.Layers.create_pillar(pillar=pillar, pressure=0.1333) + +gaps = [gap] + +clear_3_path = "products/CLEAR_3.DAT" +clear_3 = pywincalc.parse_optics_file(clear_3_path) +solid_layers = [clear_3, 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, gap_layers=gaps) +u_value = glazing_system.u() +print(f"U-value for the system: {u_value}") diff --git a/examples/gap_measured_pillar.py b/examples/gap_measured_pillar.py new file mode 100644 index 0000000..204fb1d --- /dev/null +++ b/examples/gap_measured_pillar.py @@ -0,0 +1,24 @@ +import pywincalc + +glass_1 = pywincalc.Glass(thickness=0.05, conductivity=1, emissivity=0.8) +glass_2 = pywincalc.Glass(thickness=0.05, conductivity=1, emissivity=0.8) +measured_pillar = pywincalc.PillarMeasurement(total_thickness=0.12, conductivity=0.3, temperature_surface_1=295, + temperature_surface_4=305, glass_1=glass_1, glass_2=glass_2) + +gap = pywincalc.Layers.create_pillar(pillar=measured_pillar) + +gaps = [gap] + +clear_3_path = "products/CLEAR_3.DAT" +clear_3 = pywincalc.parse_optics_file(clear_3_path) +solid_layers = [clear_3, 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, gap_layers=gaps) +u_value = glazing_system.u() +print(f"U-value for the system: {u_value}") diff --git a/examples/gap_pentagon_pillar.py b/examples/gap_pentagon_pillar.py new file mode 100644 index 0000000..979d97b --- /dev/null +++ b/examples/gap_pentagon_pillar.py @@ -0,0 +1,22 @@ +import pywincalc + +pillar = pywincalc.PolygonalPillar(height=0.002, material_conductivity=20, + cell_area=pywincalc.pillar_cell_area(pywincalc.CellSpacingType.SQUARE, 0.03), + length=0.25e-3, polygon_type=pywincalc.PolygonType.PENTAGON) +gap = pywincalc.Layers.create_pillar(pillar=pillar, pressure=0.1333) + +gaps = [gap] + +clear_3_path = "products/CLEAR_3.DAT" +clear_3 = pywincalc.parse_optics_file(clear_3_path) +solid_layers = [clear_3, 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, gap_layers=gaps) +u_value = glazing_system.u() +print(f"U-value for the system: {u_value}") diff --git a/examples/gap_rectangular_pillar.py b/examples/gap_rectangular_pillar.py new file mode 100644 index 0000000..5924e56 --- /dev/null +++ b/examples/gap_rectangular_pillar.py @@ -0,0 +1,22 @@ +import pywincalc + +pillar = pywincalc.RectangularPillar(height=0.002, material_conductivity=20, + cell_area=pywincalc.pillar_cell_area(pywincalc.CellSpacingType.SQUARE, 0.03), + length=0.25e-3, width=0.05e-3) +gap = pywincalc.Layers.create_pillar(pillar=pillar, pressure=0.1333) + +gaps = [gap] + +clear_3_path = "products/CLEAR_3.DAT" +clear_3 = pywincalc.parse_optics_file(clear_3_path) +solid_layers = [clear_3, 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, gap_layers=gaps) +u_value = glazing_system.u() +print(f"U-value for the system: {u_value}") diff --git a/examples/gap_spherical_pillar.py b/examples/gap_spherical_pillar.py new file mode 100644 index 0000000..97a2245 --- /dev/null +++ b/examples/gap_spherical_pillar.py @@ -0,0 +1,22 @@ +import pywincalc + +pillar = pywincalc.SphericalPillar(height=0.002, material_conductivity=20, + cell_area=pywincalc.pillar_cell_area(pywincalc.CellSpacingType.SQUARE, 0.03), + radius_of_contact=0.25e-3) +gap = pywincalc.Layers.create_pillar(pillar=pillar, pressure=0.1333) + +gaps = [gap] + +clear_3_path = "products/CLEAR_3.DAT" +clear_3 = pywincalc.parse_optics_file(clear_3_path) +solid_layers = [clear_3, 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, gap_layers=gaps) +u_value = glazing_system.u() +print(f"U-value for the system: {u_value}") diff --git a/examples/gap_triangular_pillar.py b/examples/gap_triangular_pillar.py new file mode 100644 index 0000000..0922eb8 --- /dev/null +++ b/examples/gap_triangular_pillar.py @@ -0,0 +1,22 @@ +import pywincalc + +pillar = pywincalc.PolygonalPillar(height=0.002, material_conductivity=20, + cell_area=pywincalc.pillar_cell_area(pywincalc.CellSpacingType.SQUARE, 0.03), + length=0.25e-3, polygon_type=pywincalc.PolygonType.TRIANGLE) +gap = pywincalc.Layers.create_pillar(pillar=pillar, pressure=0.1333) + +gaps = [gap] + +clear_3_path = "products/CLEAR_3.DAT" +clear_3 = pywincalc.parse_optics_file(clear_3_path) +solid_layers = [clear_3, 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, gap_layers=gaps) +u_value = glazing_system.u() +print(f"U-value for the system: {u_value}") diff --git a/examples/gap_truncated_cone_pillar.py b/examples/gap_truncated_cone_pillar.py new file mode 100644 index 0000000..8c7dc56 --- /dev/null +++ b/examples/gap_truncated_cone_pillar.py @@ -0,0 +1,22 @@ +import pywincalc + +pillar = pywincalc.TruncatedConePillar(height=0.002, material_conductivity=20, + cell_area=pywincalc.pillar_cell_area(pywincalc.CellSpacingType.SQUARE, 0.03), + radius_1=0.25e-3, radius_2=0.01e-3) +gap = pywincalc.Layers.create_pillar(pillar=pillar, pressure=0.1333) + +gaps = [gap] + +clear_3_path = "products/CLEAR_3.DAT" +clear_3 = pywincalc.parse_optics_file(clear_3_path) +solid_layers = [clear_3, 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, gap_layers=gaps) +u_value = glazing_system.u() +print(f"U-value for the system: {u_value}") diff --git a/examples/gaps_and_gases.py b/examples/gaps_and_gases.py index 298d157..ee2934e 100644 --- a/examples/gaps_and_gases.py +++ b/examples/gaps_and_gases.py @@ -68,10 +68,10 @@ # (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) +pillar = pywincalc.CylindricalPillar(height=0.002, material_conductivity=20, + cell_area=pywincalc.pillar_cell_area(pywincalc.CellSpacingType.SQUARE, 0.03), + radius=0.25e-3) +gap_6 = pywincalc.Layers.create_pillar(pillar=pillar, pressure=0.1333) # Gaps can now have forced ventilation. To create one first create a regular gap and then convert # to a forced ventilated gap. The gap that will be converted can be any of the above. diff --git a/examples/perforated_screen_igsdb_product.py b/examples/perforated_screen_igsdb_product.py index 7bade27..665b247 100644 --- a/examples/perforated_screen_igsdb_product.py +++ b/examples/perforated_screen_igsdb_product.py @@ -1,30 +1,32 @@ -import pywincalc -import requests -from igsdb_interaction import url_single_product, headers +### IGSDB does not cuurently have perforated screens. The below code will work when a valid perforated screen IGSDB ID is available. -# 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. +# import pywincalc +# import requests +# from igsdb_interaction import url_single_product, headers # -# For more possible results see optical_results_NFRC.py +# # 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) # -# 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)) +# # 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/perforated_screen_user_defined_geometry_igsdb_material.py b/examples/perforated_screen_user_defined_geometry_igsdb_material.py index fe978cf..9ffdf0f 100644 --- a/examples/perforated_screen_user_defined_geometry_igsdb_material.py +++ b/examples/perforated_screen_user_defined_geometry_igsdb_material.py @@ -6,7 +6,7 @@ # 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_id = 17935 shade_material_igsdb_response = requests.get( url_single_product.format(id=shade_material_igsdb_id), headers=headers) diff --git a/examples/venetian_blind_igsdb_product.py b/examples/venetian_blind_igsdb_product.py index 04da8f0..4b722cf 100644 --- a/examples/venetian_blind_igsdb_product.py +++ b/examples/venetian_blind_igsdb_product.py @@ -9,7 +9,7 @@ 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_id = 17186 slim_white_pella_venetian_blind_igsdb_response = requests.get( url_single_product.format(id=slim_white_pella_venetian_blind_igsdb_id), headers=headers) diff --git a/examples/venetian_blind_user_defined_geometry_igsdb_material.py b/examples/venetian_blind_user_defined_geometry_igsdb_material.py index b420d00..6b15b6b 100644 --- a/examples/venetian_blind_user_defined_geometry_igsdb_material.py +++ b/examples/venetian_blind_user_defined_geometry_igsdb_material.py @@ -7,7 +7,7 @@ # 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_id = 17935 shade_material_igsdb_response = requests.get(url_single_product.format(id=shade_material_igsdb_id), headers=headers) diff --git a/examples/vertical_venetian_user_defined_geometry_igsdb_material.py b/examples/vertical_venetian_user_defined_geometry_igsdb_material.py index 2d20b7f..068d41c 100644 --- a/examples/vertical_venetian_user_defined_geometry_igsdb_material.py +++ b/examples/vertical_venetian_user_defined_geometry_igsdb_material.py @@ -7,7 +7,7 @@ # 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_id = 17935 shade_material_igsdb_response = requests.get(url_single_product.format(id=shade_material_igsdb_id), headers=headers) diff --git a/examples/woven_shade_user_defined_geometry_igsdb_material.py b/examples/woven_shade_user_defined_geometry_igsdb_material.py index 36dc466..4f33a71 100644 --- a/examples/woven_shade_user_defined_geometry_igsdb_material.py +++ b/examples/woven_shade_user_defined_geometry_igsdb_material.py @@ -3,7 +3,7 @@ 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_id = 17935 shade_material_igsdb_response = requests.get( url_single_product.format(id=shade_material_igsdb_id), headers=headers) diff --git a/pywincalc/__init__.py b/pywincalc/__init__.py index aaa709e..8167fba 100644 --- a/pywincalc/__init__.py +++ b/pywincalc/__init__.py @@ -1,60 +1,38 @@ 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, 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, 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, IGUVentilatedGapLayer, \ - forced_ventilation_gap - - +from wincalcbindings import ( + AirHorizontalDirection, BSDF, BSDFBasisType, BSDFDirection, BSDFDirections, BSDFHemisphere, + BSDFIntegrator, BoundaryConditionsCoefficientModelType, CMABestWorstUFactors, CMAResult, CMAWindow, + CMAWindowDualVisionHorizontal, CMAWindowDualVisionVertical, CMAWindowSingleVision, Layers, CellSpacingType, PolygonType, pillar_cell_area, + PillarData, CylindricalPillar, SphericalPillar, RectangularPillar, TriangularPillar, PentagonPillar, HexagonPillar, LinearBearingPillar, TruncatedConePillar, Glass, PillarMeasurement, + AnnulusCylinderPillar, CShapedCylinderPillar, UniversalSupportPillar, CylindricalPillarLayer, SphericalPillarLayer, RectangularPillarLayer, + TriangularPillarLayer, PentagonPillarLayer, HexagonPillarLayer, LinearBearingPillarLayer, TruncatedConePillarLayer, + AnnulusCylinderPillarLayer, CShapedCylinderPillarLayer, MeasuredPillarLayer, CoatedSide, + ColorResult, DeflectionResults, DistributionMethodType, DualBandBSDF, EffectiveOpenness, Environment, Environments, + FlippableSolidLayer, Gas, GasCoefficients, GasData, GlazingSystem as _GlazingSystem, GlazingSystemDimensions, + IGUGapLayer, IntegrationRule, IntegrationRuleType, Lab, MaterialType, + OpticalMeasurementComponent, OpticalResultAbsorptance, OpticalResultFluxType, OpticalResultFluxTypeColor, + OpticalResultLayer, OpticalResultSide, OpticalResultSideColor, OpticalResultSide_Layer, OpticalResultTransmission, + OpticalResultTransmissionColor, OpticalResults, OpticalResultsColor, OpticalStandard, OpticalStandardMethod, + PVPowerProperty, PVWavelengthData, ParsedPerforatedGeometry, ParsedVenetianGeometry, ParsedWovenGeometry, + PerforatedGeometry, PredefinedGasType, ProductComposistionData, ProductData, + ProductDataOptical, ProductDataOpticalAndThermal, ProductDataOpticalDualBand, + ProductDataOpticalDualBandBSDF, ProductDataOpticalDualBandHemispheric, ProductDataOpticalNBand, + ProductDataOpticalPerforatedScreen, ProductDataOpticalVenetian, ProductDataOpticalWithMaterial, + ProductDataOpticalWovenShade, ProductDataThermal, ProductGeometry, 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, + 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, IGUVentilatedGapLayer, + forced_ventilation_gap +) @deprecation.deprecated(deprecated_in="3.0.0", removed_in="4.0.0", current_version="3.0.0", @@ -68,7 +46,7 @@ def Gap(gas, thickness): 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) + return layers.gap(gas=converted_gas, thickness=thickness) @deprecation.deprecated(deprecated_in="3.0.0", removed_in="4.0.0", diff --git a/setup.cfg b/setup.cfg index a354ba4..9bffcf0 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = pywincalc -version = 3.3.1 +version = 3.5.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 diff --git a/src/wincalcbindings.cpp b/src/wincalcbindings.cpp index 21a448b..9580bb6 100644 --- a/src/wincalcbindings.cpp +++ b/src/wincalcbindings.cpp @@ -113,23 +113,22 @@ class Py_Product_Data_Optical : public wincalc::Product_Data_Optical //_Base { public: using wincalc::Product_Data_Optical::Product_Data_Optical; // Inherit - // constructors + // constructors std::vector wavelengths() const override { PYBIND11_OVERRIDE_PURE(std::vector, wincalc::Product_Data_Optical, wavelengths, ); } }; -class Py_CSupportPillar : public Tarcog::ISO15099::CSupportPillar //_Base -{ +class Py_UniversalSupportPillar + : public Tarcog::ISO15099::UniversalSupportPillar { public: - using Tarcog::ISO15099::CSupportPillar::CSupportPillar; // Inherit - // constructors + using Tarcog::ISO15099::UniversalSupportPillar::UniversalSupportPillar; protected: - double conductivityOfPillarArray() override { - PYBIND11_OVERRIDE_PURE(double, Tarcog::ISO15099::CSupportPillar, - conductivityOfPillarArray, ); + double areaOfContact() override { + PYBIND11_OVERRIDE_PURE(double, Tarcog::ISO15099::UniversalSupportPillar, + areaOfContact, ); } }; @@ -183,21 +182,255 @@ PYBIND11_MODULE(wincalcbindings, m) { .def(py::init(), py::arg("thickness"), py::arg("pressure"), py::arg("gas")); - py::class_(m, "CellSpacingType", + py::arithmetic()) + .value("SQUARE", Tarcog::ISO15099::CellSpacingType::Square) + .value("SHIFTEDSQUARE", Tarcog::ISO15099::CellSpacingType::ShiftedSquare) + .value("SHIFTEDROTATEDSQUARE", + Tarcog::ISO15099::CellSpacingType::ShiftedRotatedSquare); + + m.def("pillar_cell_area", Tarcog::ISO15099::pillarCellArea, + py::arg("cell_spacing_type"), py::arg("sp")); + + py::enum_(m, "PolygonType", py::arithmetic()) + .value("TRIANGLE", Tarcog::ISO15099::PolygonType::Triangle) + .value("PENTAGON", Tarcog::ISO15099::PolygonType::Pentagon) + .value("HEXAGON", Tarcog::ISO15099::PolygonType::Hexagon); + + py::class_>( + m, "UniversalSupportPillar") + .def(py::init(), + py::arg("gap_layer"), py::arg("material_conductivity"), + py::arg("cell_area")); + + py::class_>(m, "PillarData") + .def(py::init(), py::arg("height"), + py::arg("material_conductivity"), py::arg("cell_area")) + .def_readwrite("height", &Tarcog::ISO15099::PillarData::height) + .def_readwrite("material_conductivity", + &Tarcog::ISO15099::PillarData::materialConductivity) + .def_readwrite("cell_area", &Tarcog::ISO15099::PillarData::cellArea); + + py::class_>( + m, "CylindricalPillar") + .def(py::init(), py::arg("height"), + py::arg("material_conductivity"), py::arg("cell_area"), + py::arg("radius")) + .def_readwrite("radius", &Tarcog::ISO15099::CylindricalPillar::radius); + + py::class_>( + m, "CylindricalPillarLayer") + .def(py::init(), + py::arg("gap_layer"), py::arg("cylindrical_pillar")); + + py::class_>( + m, "SphericalPillar") + .def(py::init(), py::arg("height"), + py::arg("material_conductivity"), py::arg("cell_area"), + py::arg("radius_of_contact")) + .def_readwrite("radius_of_contact", + &Tarcog::ISO15099::SphericalPillar::radiusOfContact); + + py::class_>( + m, "SphericalPillarLayer") + .def(py::init(), + py::arg("gap_layer"), py::arg("spherical_pillar")); + + py::class_>( + m, "RectangularPillar") + .def(py::init(), + py::arg("height"), py::arg("material_conductivity"), + py::arg("cell_area"), py::arg("length"), py::arg("width")) + .def_readwrite("length", &Tarcog::ISO15099::RectangularPillar::length) + .def_readwrite("width", &Tarcog::ISO15099::RectangularPillar::width); + + py::class_>( + m, "RectangularPillarLayer") + .def(py::init(), + py::arg("gap_layer"), py::arg("rectangular_pillar")); + + py::class_>(m, "PolygonalPillar") + .def(py::init(), py::arg("height"), + py::arg("material_conductivity"), py::arg("cell_area"), py::arg("length")) + .def_readwrite("legnth", &Tarcog::ISO15099::PolygonalPillar::length); + + py::class_>(m, "TriangularPillar") + .def(py::init(), py::arg("height"), + py::arg("material_conductivity"), py::arg("cell_area"), py::arg("length")); + + py::class_>( + m, "TriangularPillarLayer") + .def(py::init(), + py::arg("gap_layer"), py::arg("polygon_pillar")); + + py::class_>(m, "PentagonPillar") + .def(py::init(), py::arg("height"), + py::arg("material_conductivity"), py::arg("cell_area"), py::arg("length")); + + py::class_>( + m, "PentagonPillarLayer") + .def(py::init(), + py::arg("gap_layer"), py::arg("polygon_pillar")); + + py::class_>(m, "HexagonPillar") + .def(py::init(), py::arg("height"), + py::arg("material_conductivity"), py::arg("cell_area"), py::arg("length")); + + py::class_>( + m, "HexagonPillarLayer") + .def(py::init(), + py::arg("gap_layer"), py::arg("polygon_pillar")); + + py::class_>( + m, "LinearBearingPillar") + .def(py::init(), + py::arg("height"), py::arg("material_conductivity"), + py::arg("cell_area"), py::arg("length"), py::arg("width")) + .def_readwrite("length", &Tarcog::ISO15099::LinearBearingPillar::length) + .def_readwrite("width", &Tarcog::ISO15099::LinearBearingPillar::width); + + py::class_>( + m, "LinearBearingPillarLayer") + .def(py::init(), + py::arg("gap_layer"), py::arg("linear_bearing_pillar")); + + py::class_>( + m, "TruncatedConePillar") + .def(py::init(), + py::arg("height"), py::arg("material_conductivity"), + py::arg("cell_area"), py::arg("radius_1"), py::arg("radius_2")) + .def_readwrite("radius_1", + &Tarcog::ISO15099::TruncatedConePillar::radius1) + .def_readwrite("radius_2", + &Tarcog::ISO15099::TruncatedConePillar::radius2); + + py::class_>( + m, "TruncatedConePillarLayer") + .def(py::init(), + py::arg("gap_layer"), py::arg("truncated_cone_pillar")); + + py::class_>( + m, "AnnulusCylinderPillar") + .def(py::init(), + py::arg("height"), py::arg("material_conductivity"), + py::arg("cell_area"), py::arg("inner_radius"), + py::arg("outer_radius")) + .def_readwrite("inner_radius", + &Tarcog::ISO15099::AnnulusCylinderPillar::innerRadius) + .def_readwrite("outer_radius", + &Tarcog::ISO15099::AnnulusCylinderPillar::outerRadius); + + py::class_>( + m, "AnnulusCylinderPillarLayer") + .def(py::init(), + py::arg("gap_layer"), py::arg("annulus_cylinder_pillar")); + + py::class_>( + m, "CShapedCylinderPillar") + .def(py::init(), + py::arg("height"), py::arg("material_conductivity"), + py::arg("cell_area"), py::arg("inner_radius"), + py::arg("outer_radius"), py::arg("fraction_covered")) + .def_readwrite("inner_radius", + &Tarcog::ISO15099::CShapedCylinderPillar::innerRadius) + .def_readwrite("outer_radius", + &Tarcog::ISO15099::CShapedCylinderPillar::outerRadius) + .def_readwrite("fraction_covered", + &Tarcog::ISO15099::CShapedCylinderPillar::fractionCovered); + + py::class_>( + m, "CShapedCylinderPillarLayer") + .def(py::init(), + py::arg("gap_layer"), py::arg("cshaped_cylinder_pillar")); + + py::class_>( + m, "Glass") + .def(py::init(), py::arg("thickness"), + py::arg("conductivity"), py::arg("emissivity")) + .def_readwrite("thickness", &Tarcog::ISO15099::Glass::thickness) + .def_readwrite("conductivity", &Tarcog::ISO15099::Glass::conductivity) + .def_readwrite("emissivity", &Tarcog::ISO15099::Glass::emissivity); + + py::class_>( + m, "PillarMeasurement") + .def(py::init(), + py::arg("total_thickness"), py::arg("conductivity"), + py::arg("temperature_surface_1"), py::arg("temperature_surface_4"), + py::arg("glass_1"), py::arg("glass_2")) + .def_readwrite("total_thickness", + &Tarcog::ISO15099::PillarMeasurement::totalThickness) + .def_readwrite("conductivity", + &Tarcog::ISO15099::PillarMeasurement::conductivity) + .def_readwrite("temperature_surface_1", + &Tarcog::ISO15099::PillarMeasurement::temperatureSurface1) + .def_readwrite("temperature_surface_4", + &Tarcog::ISO15099::PillarMeasurement::temperatureSurface4) + .def_readwrite("glass_1", &Tarcog::ISO15099::PillarMeasurement::glass1) + .def_readwrite("glass_2", &Tarcog::ISO15099::PillarMeasurement::glass2); + + py::class_>(m, - "SupportPillar") - .def(py::init(), - py::arg("gap_layer"), py::arg("conductivity")); - - py::class_>( - m, "CircularPillar") - .def(py::init(), - py::arg("gap_layer"), py::arg("conductivity"), py::arg("spacing"), - py::arg("radius")); + std::shared_ptr>( + m, "MeasuredPillarLayer") + .def(py::init(), + py::arg("pillar")); py::class_(), py::arg("gap_layer"), py::arg("inlet_temperature"), py::arg("inlet_speed")) - .def("inlet_temperature", - &Tarcog::ISO15099::CIGUVentilatedGapLayer::inletTemperature) - .def("outlet_temperature", - &Tarcog::ISO15099::CIGUVentilatedGapLayer::outletTemperature) .def("layer_temperature", - &Tarcog::ISO15099::CIGUVentilatedGapLayer::layerTemperature) + &Tarcog::ISO15099::CIGUVentilatedGapLayer::averageLayerTemperature) .def("set_flow_geometry", &Tarcog::ISO15099::CIGUVentilatedGapLayer::setFlowGeometry, py::arg("a_in"), py::arg("a_out")) @@ -568,8 +797,7 @@ PYBIND11_MODULE(wincalcbindings, m) { py::class_>( m, "ProductDataThermal") - .def(py::init(), + .def(py::init(), py::arg("conductivity"), py::arg("thickness_meters"), py::arg("flipped") = false, py::arg("opening_top") = 0, py::arg("opening_bottom") = 0, py::arg("opening_left") = 0, @@ -583,8 +811,6 @@ PYBIND11_MODULE(wincalcbindings, m) { &wincalc::Product_Data_Thermal::opening_left) .def_readwrite("opening_right", &wincalc::Product_Data_Thermal::opening_right) - .def_readwrite("opening_front", - &wincalc::Product_Data_Thermal::opening_front) .def_readwrite("youngs_modulus", &wincalc::Product_Data_Thermal::youngs_modulus) .def_readwrite("density", &wincalc::Product_Data_Thermal::density); @@ -733,7 +959,7 @@ PYBIND11_MODULE(wincalcbindings, m) { SingleLayerOptics::BSDFHemisphere const &, double, std::optional, std::optional, std::optional, std::optional, double, - bool>(), + bool, bool>(), py::arg("solar_transmittance_front"), py::arg("solar_transmittance_back"), py::arg("solar_reflectance_front"), @@ -747,7 +973,7 @@ PYBIND11_MODULE(wincalcbindings, m) { py::arg("ir_transmittance_back") = std::optional(), py::arg("emissivity_front") = std::optional(), py::arg("emissivity_back") = std::optional(), - py::arg("permeability_factor") = 0.0, py::arg("flipped") = false) + py::arg("permeability_factor") = 0.0, py::arg("flipped") = false, py::arg("user_defined_effective_values") = false) .def_readwrite("solar_transmittance_front", &wincalc::Product_Data_Dual_Band_Optical_BSDF::tf_solar) .def_readwrite("solar_transmittance_back", @@ -764,6 +990,8 @@ PYBIND11_MODULE(wincalcbindings, m) { &wincalc::Product_Data_Dual_Band_Optical_BSDF::rf_visible) .def_readwrite("visible_reflectance_back", &wincalc::Product_Data_Dual_Band_Optical_BSDF::rb_visible) + .def_readwrite("user_defined_effective_values", + &wincalc::Product_Data_Dual_Band_Optical_BSDF::user_defined_effective_values) .def("effective_thermal_values", &wincalc::Product_Data_Dual_Band_Optical_BSDF:: effective_thermal_values); @@ -1540,7 +1768,6 @@ PYBIND11_MODULE(wincalcbindings, m) { .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) @@ -1548,46 +1775,138 @@ PYBIND11_MODULE(wincalcbindings, m) { .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")); + + m.def("is_closed", &EffectiveLayers::isClosed, py::arg("effective_openness")); + + py::module_ layers = m.def_submodule("Layers", "Submodule for Tarcog Layers"); + + layers.def("solid", py::overload_cast(&Tarcog::ISO15099::Layers::solid), + "Factory method for creating a solid Tarcog layer with basic parameters", + py::arg("thickness"), py::arg("conductivity")); + + layers.def("solid", py::overload_cast(&Tarcog::ISO15099::Layers::solid), + "Factory method for creating a solid Tarcog layer including IR parameters", + 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); + + layers.def("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); + + layers.def("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); + + layers.def("sealedLayer", &Tarcog::ISO15099::Layers::sealedLayer, + "Factory function to create a Tarcog sealed layer.", + py::arg("thickness"), py::arg("conductivity"), + py::arg("front_emissivity") = 0.84, + py::arg("front_transmittance") = 0.0, + py::arg("back_emissivity") = 0.84, + py::arg("back_transmittance") = 0.0); + + layers.def("gap", py::overload_cast(&Tarcog::ISO15099::Layers::gap), + "Factory function to create a Tarcog gap with basic parameters", + py::arg("thickness")); + + layers.def("gap", py::overload_cast(&Tarcog::ISO15099::Layers::gap), + "Factory function to create a Tarcog gap with thickness and pressure", + py::arg("thickness"), py::arg("pressure") = 101325); + + layers.def("gap", py::overload_cast(&Tarcog::ISO15099::Layers::gap), + "Factory function to create a Tarcog gap with thickness and gas", + py::arg("thickness"), py::arg("gas")); + + layers.def("gap", py::overload_cast(&Tarcog::ISO15099::Layers::gap), + "Factory function to create a Tarcog gap with thickness, pressure and gas", + py::arg("thickness"), py::arg("pressure"), py::arg("gas")); + + layers.def("gap", py::overload_cast(&Tarcog::ISO15099::Layers::gap), + "Factory function to create a Tarcog gap with all parameters", + py::arg("thickness"), py::arg("pressure"), py::arg("gas"), + py::arg("accommodation1"), py::arg("accommodation2")); + + layers.def("forced_ventilation_gap", &Tarcog::ISO15099::Layers::forcedVentilationGap, + "Function to create a forced ventilation Tarcog gap", + py::arg("gap"), py::arg("forcedVentilationAirSpeed"), + py::arg("forcedVentilationAirTemperature")); + + layers.def("default_vacuum_mixture", &Tarcog::ISO15099::Layers::defaultVacuumMixture, + "Function to get the default vacuum mixture"); + + layers.def("create_pillar", py::overload_cast(&Tarcog::ISO15099::Layers::createPillar), + "Static function to add a cylindrical pillar to a Tarcog gap", + py::arg("pillar"), py::arg("pressure"), py::arg("gas") = Tarcog::ISO15099::Layers::defaultVacuumMixture(), + py::arg("accommodation1") = ConstantsData::DEFAULT_SURFACE_ACCOMMODATION_COEFFICIENT, + py::arg("accommodation2") = ConstantsData::DEFAULT_SURFACE_ACCOMMODATION_COEFFICIENT); + + layers.def("create_pillar", py::overload_cast(&Tarcog::ISO15099::Layers::createPillar), + "Static function to add a spherical pillar to a Tarcog gap", + py::arg("pillar"), py::arg("pressure"), py::arg("gas") = Tarcog::ISO15099::Layers::defaultVacuumMixture(), + py::arg("accommodation1") = ConstantsData::DEFAULT_SURFACE_ACCOMMODATION_COEFFICIENT, + py::arg("accommodation2") = ConstantsData::DEFAULT_SURFACE_ACCOMMODATION_COEFFICIENT); + + layers.def("create_pillar", py::overload_cast(&Tarcog::ISO15099::Layers::createPillar), + "Static function to add a rectangular pillar to a Tarcog gap", + py::arg("pillar"), py::arg("pressure"), py::arg("gas") = Tarcog::ISO15099::Layers::defaultVacuumMixture(), + py::arg("accommodation1") = ConstantsData::DEFAULT_SURFACE_ACCOMMODATION_COEFFICIENT, + py::arg("accommodation2") = ConstantsData::DEFAULT_SURFACE_ACCOMMODATION_COEFFICIENT); + + layers.def("create_pillar", py::overload_cast(&Tarcog::ISO15099::Layers::createPillar), + "Static function to add a triangular pillar to a Tarcog gap", + py::arg("pillar"), py::arg("pressure"), py::arg("gas") = Tarcog::ISO15099::Layers::defaultVacuumMixture(), + py::arg("accommodation1") = ConstantsData::DEFAULT_SURFACE_ACCOMMODATION_COEFFICIENT, + py::arg("accommodation2") = ConstantsData::DEFAULT_SURFACE_ACCOMMODATION_COEFFICIENT); + + layers.def("create_pillar", py::overload_cast(&Tarcog::ISO15099::Layers::createPillar), + "Static function to add a pentagon pillar to a Tarcog gap", + py::arg("pillar"), py::arg("pressure"), py::arg("gas") = Tarcog::ISO15099::Layers::defaultVacuumMixture(), + py::arg("accommodation1") = ConstantsData::DEFAULT_SURFACE_ACCOMMODATION_COEFFICIENT, + py::arg("accommodation2") = ConstantsData::DEFAULT_SURFACE_ACCOMMODATION_COEFFICIENT); + + layers.def("create_pillar", py::overload_cast(&Tarcog::ISO15099::Layers::createPillar), + "Static function to add a hexagon pillar to a Tarcog gap", + py::arg("pillar"), py::arg("pressure"), py::arg("gas") = Tarcog::ISO15099::Layers::defaultVacuumMixture(), + py::arg("accommodation1") = ConstantsData::DEFAULT_SURFACE_ACCOMMODATION_COEFFICIENT, + py::arg("accommodation2") = ConstantsData::DEFAULT_SURFACE_ACCOMMODATION_COEFFICIENT); + + layers.def("create_pillar", py::overload_cast(&Tarcog::ISO15099::Layers::createPillar), + "Static function to add a linear bearing pillar to a Tarcog gap", + py::arg("pillar"), py::arg("pressure"), py::arg("gas") = Tarcog::ISO15099::Layers::defaultVacuumMixture(), + py::arg("accommodation1") = ConstantsData::DEFAULT_SURFACE_ACCOMMODATION_COEFFICIENT, + py::arg("accommodation2") = ConstantsData::DEFAULT_SURFACE_ACCOMMODATION_COEFFICIENT); + + layers.def("create_pillar", py::overload_cast(&Tarcog::ISO15099::Layers::createPillar), + "Static function to add a truncated cone pillar to a Tarcog gap", + py::arg("pillar"), py::arg("pressure"), py::arg("gas") = Tarcog::ISO15099::Layers::defaultVacuumMixture(), + py::arg("accommodation1") = ConstantsData::DEFAULT_SURFACE_ACCOMMODATION_COEFFICIENT, + py::arg("accommodation2") = ConstantsData::DEFAULT_SURFACE_ACCOMMODATION_COEFFICIENT); + + layers.def("create_pillar", py::overload_cast(&Tarcog::ISO15099::Layers::createPillar), + "Static function to add an annulus cylinder pillar to a Tarcog gap", + py::arg("pillar"), py::arg("pressure"), py::arg("gas") = Tarcog::ISO15099::Layers::defaultVacuumMixture(), + py::arg("accommodation1") = ConstantsData::DEFAULT_SURFACE_ACCOMMODATION_COEFFICIENT, + py::arg("accommodation2") = ConstantsData::DEFAULT_SURFACE_ACCOMMODATION_COEFFICIENT); + + layers.def("create_pillar", py::overload_cast(&Tarcog::ISO15099::Layers::createPillar), + "Static function to add a C-shaped cylinder pillar to a Tarcog gap", + py::arg("pillar"), py::arg("pressure"), py::arg("gas") = Tarcog::ISO15099::Layers::defaultVacuumMixture(), + py::arg("accommodation1") = ConstantsData::DEFAULT_SURFACE_ACCOMMODATION_COEFFICIENT, + py::arg("accommodation2") = ConstantsData::DEFAULT_SURFACE_ACCOMMODATION_COEFFICIENT); + + layers.def("create_pillar", py::overload_cast(&Tarcog::ISO15099::Layers::createPillar), + "Static function to add a measured pillar to a Tarcog gap", + py::arg("pillar")); }