Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Vacuum dec23 #49

Closed
wants to merge 29 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
20b9585
Cylindrical pillar added.
vidanovic Dec 7, 2023
d5a954a
Example for cylindrical pillar added.
vidanovic Dec 7, 2023
2a70d32
Spherical, Rectangular, Triangular, Pentagon and Hexagon pillars added.
vidanovic Dec 7, 2023
2d39884
All mathematical pillars added.
vidanovic Dec 7, 2023
84ab9e9
Measured pillar added.
vidanovic Dec 8, 2023
3553530
Commented lines removed from the wincalcbindings.cpp
vidanovic Dec 8, 2023
53f639a
Several pillar examples added.
vidanovic Dec 8, 2023
91a6827
Update build_wheels.yml
StephenCzarnecki Dec 8, 2023
f004182
Update build_wheels.yml
StephenCzarnecki Dec 9, 2023
792ebde
Update build_wheels.yml
StephenCzarnecki Dec 9, 2023
0eef300
Update build_wheels.yml
StephenCzarnecki Dec 9, 2023
f4052f9
Update build_wheels.yml
StephenCzarnecki Dec 12, 2023
62ee06a
Update build_wheels.yml
StephenCzarnecki Dec 12, 2023
9ed9159
Update build_wheels.yml
StephenCzarnecki Dec 12, 2023
2a869f0
Merge pull request #47 from LBNL-ETA/github_action_dec_2023
StephenCzarnecki Dec 12, 2023
eef0037
Update setup.cfg
StephenCzarnecki Dec 19, 2023
7b7d32f
Update to bindings definitions for new effective openness and thickenss.
vidanovic Jun 12, 2024
1f1336d
VariableAirflowCoefficients
vidanovic Jun 12, 2024
2460649
Polygonial pillars interface change.
vidanovic Jun 12, 2024
75d50cd
Project is compiling now and pyd file is produced.
vidanovic Jun 12, 2024
3bff950
Init file and wincalcbindins.cpp updated with missing pillars data.
vidanovic Jun 13, 2024
06e0e3a
Update build_wheels.yml
StephenCzarnecki Jun 17, 2024
3853d31
Merge pull request #48 from LBNL-ETA/VariableAirflowCoefficients
vidanovic Jun 26, 2024
06fb1ca
Creating pillars with new arguments added to the system. Also Layers …
vidanovic Jun 26, 2024
f448fe4
Pointing to tagged version of WC.
vidanovic Jun 27, 2024
e378435
Update change of namespace Layer to layers.
vidanovic Jul 18, 2024
18cccd8
layers is reverted back to Layers (capital L) and IGSDB numbers were …
vidanovic Jul 19, 2024
45dc03d
Update CMakeLists-WinCalc.txt.in
StephenCzarnecki Jul 24, 2024
c6cb860
Update build_wheels.yml
StephenCzarnecki Jul 24, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 15 additions & 8 deletions .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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/[email protected]_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
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists-WinCalc.txt.in
Original file line number Diff line number Diff line change
Expand Up @@ -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 ""
Expand Down
2 changes: 1 addition & 1 deletion examples/bsdf_shade_igsdb_product.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
22 changes: 22 additions & 0 deletions examples/gap_annulus_cylinder_pillar.py
Original file line number Diff line number Diff line change
@@ -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}")
22 changes: 22 additions & 0 deletions examples/gap_cylindrical_pillar.py
Original file line number Diff line number Diff line change
@@ -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}")
22 changes: 22 additions & 0 deletions examples/gap_linear_bearing_pillar.py
Original file line number Diff line number Diff line change
@@ -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}")
24 changes: 24 additions & 0 deletions examples/gap_measured_pillar.py
Original file line number Diff line number Diff line change
@@ -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}")
22 changes: 22 additions & 0 deletions examples/gap_pentagon_pillar.py
Original file line number Diff line number Diff line change
@@ -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}")
22 changes: 22 additions & 0 deletions examples/gap_rectangular_pillar.py
Original file line number Diff line number Diff line change
@@ -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}")
22 changes: 22 additions & 0 deletions examples/gap_spherical_pillar.py
Original file line number Diff line number Diff line change
@@ -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}")
22 changes: 22 additions & 0 deletions examples/gap_triangular_pillar.py
Original file line number Diff line number Diff line change
@@ -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}")
22 changes: 22 additions & 0 deletions examples/gap_truncated_cone_pillar.py
Original file line number Diff line number Diff line change
@@ -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}")
8 changes: 4 additions & 4 deletions examples/gaps_and_gases.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
56 changes: 29 additions & 27 deletions examples/perforated_screen_igsdb_product.py
Original file line number Diff line number Diff line change
@@ -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))
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion examples/venetian_blind_igsdb_product.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
Loading
Loading