From 53f639aefa04246695c967500f5c5db844efcd25 Mon Sep 17 00:00:00 2001 From: Simon Vidanovic Date: Fri, 8 Dec 2023 13:01:08 -0800 Subject: [PATCH] Several pillar examples added. --- examples/gap_annulus_cylinder_pillar.py | 22 ++++++++++++++++++++++ examples/gap_cylindrical_pillar.py | 22 ++++++++++++++++++++++ examples/gap_linear_bearing_pillar.py | 22 ++++++++++++++++++++++ examples/gap_measured_pillar.py | 24 ++++++++++++++++++++++++ examples/gap_pentagon_pillar.py | 22 ++++++++++++++++++++++ examples/gap_rectangular_pillar.py | 22 ++++++++++++++++++++++ examples/gap_spherical_pillar.py | 22 ++++++++++++++++++++++ examples/gap_triangular_pillar.py | 22 ++++++++++++++++++++++ examples/gap_truncated_cone_pillar.py | 22 ++++++++++++++++++++++ 9 files changed, 200 insertions(+) create mode 100644 examples/gap_annulus_cylinder_pillar.py create mode 100644 examples/gap_cylindrical_pillar.py create mode 100644 examples/gap_linear_bearing_pillar.py create mode 100644 examples/gap_measured_pillar.py create mode 100644 examples/gap_pentagon_pillar.py create mode 100644 examples/gap_rectangular_pillar.py create mode 100644 examples/gap_spherical_pillar.py create mode 100644 examples/gap_triangular_pillar.py create mode 100644 examples/gap_truncated_cone_pillar.py 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}")