diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index 3a21382..54f0f96 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -12,7 +12,7 @@ jobs: matrix: os: [windows-2019] arch: [x86, x64] - python-version: [3.7, 3.8, 3.9, "3.10", "3.11", "3.12"] + python-version: [3.8, 3.9, "3.10", "3.11", "3.12"] steps: - name: Checkout repository @@ -46,7 +46,7 @@ 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", "3.12"] + python-version: [3.8, 3.9, "3.10", "3.11", "3.12"] env: SYSTEM_VERSION_COMPAT: 0 diff --git a/CMakeLists-WinCalc.txt.in b/CMakeLists-WinCalc.txt.in index 22f2726..6595301 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 "VacuumDec2023" + GIT_TAG "VariableAirflowCoefficients" UPDATE_COMMAND "" PATCH_COMMAND "" diff --git a/pywincalc/__init__.py b/pywincalc/__init__.py index c7fd635..2d13a56 100644 --- a/pywincalc/__init__.py +++ b/pywincalc/__init__.py @@ -30,10 +30,10 @@ from wincalcbindings import AirHorizontalDirection, BSDF, BSDFBasisType, BSDFDirection, BSDFDirections, BSDFHemisphere, \ BSDFIntegrator, BoundaryConditionsCoefficientModelType, CMABestWorstUFactors, CMAResult, CMAWindow, \ CMAWindowDualVisionHorizontal, CMAWindowDualVisionVertical, CMAWindowSingleVision, CellSpacingType, PolygonType, pillar_cell_area, \ - PillarData, CylindricalPillar, SphericalPillar, RectangularPillar, PolygonalPillar, LinearBearingPillar, TruncatedConePillar, Glass, PillarMeasurement, \ - AnnulusCylinderPillar, UniversalSupportPillar, CylindricalPillarLayer, SphericalPillarLayer, RectangularPillarLayer, \ + PillarData, CylindricalPillar, SphericalPillar, RectangularPillar, TriangularPillar, PentagonPillar, HexagonPillar, LinearBearingPillar, TruncatedConePillar, Glass, PillarMeasurement, \ + AnnulusCylinderPillar, CShapedCylinderPillar, UniversalSupportPillar, CylindricalPillarLayer, SphericalPillarLayer, RectangularPillarLayer, \ TriangularPillarLayer, PentagonPillarLayer, HexagonPillarLayer, LinearBearingPillarLayer, TruncatedConePillarLayer, \ - AnnulusCylinderPillarLayer, MeasuredPillarLayer, CoatedSide, \ + AnnulusCylinderPillarLayer, CShapedCylinderPillarLayer, MeasuredPillarLayer, CoatedSide, \ ColorResult, DeflectionResults, DistributionMethodType, DualBandBSDF, EffectiveOpenness, Environment, Environments, \ FlippableSolidLayer, Gas, GasCoefficients, GasData, GlazingSystem as _GlazingSystem, GlazingSystemDimensions, \ IGUGapLayer, IntegrationRule, IntegrationRuleType, Lab, Layers, MaterialType, \ diff --git a/setup.cfg b/setup.cfg index 6b4bca4..9bffcf0 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = pywincalc -version = 3.4.0 +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 aa4b1d1..0c0efba 100644 --- a/src/wincalcbindings.cpp +++ b/src/wincalcbindings.cpp @@ -263,39 +263,57 @@ PYBIND11_MODULE(wincalcbindings, m) { .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"), py::arg("polygon_type")) - .def_readwrite("length", &Tarcog::ISO15099::PolygonalPillar::length) - .def_readwrite("polygon_type", &Tarcog::ISO15099::PolygonalPillar::type); + + 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(), + Tarcog::ISO15099::TriangularPillar const &>(), 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(), + Tarcog::ISO15099::PentagonPillar const &>(), 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(), + Tarcog::ISO15099::HexagonPillar const &>(), py::arg("gap_layer"), py::arg("polygon_pillar")); py::class_(), 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") @@ -756,12 +797,11 @@ 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, - py::arg("opening_right") = 0) + py::arg("opening_right") = 0, py::arg("opening_front") = 0) .def_readwrite("conductivity", &wincalc::Product_Data_Thermal::conductivity) .def_readwrite("opening_top", &wincalc::Product_Data_Thermal::opening_top) @@ -771,10 +811,6 @@ PYBIND11_MODULE(wincalcbindings, m) { &wincalc::Product_Data_Thermal::opening_left) .def_readwrite("opening_right", &wincalc::Product_Data_Thermal::opening_right) - .def_readwrite("effective_openness", - &wincalc::Product_Data_Thermal::effective_openness) - .def_readwrite("effective_thickness", - &wincalc::Product_Data_Thermal::effective_thickness) .def_readwrite("youngs_modulus", &wincalc::Product_Data_Thermal::youngs_modulus) .def_readwrite("density", &wincalc::Product_Data_Thermal::density); @@ -923,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"), @@ -937,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", @@ -954,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); @@ -1796,9 +1834,21 @@ PYBIND11_MODULE(wincalcbindings, m) { py::arg("pillar"), py::arg("pressure")) .def_static( "create_pillar", - py::overload_cast( + py::overload_cast( + &Tarcog::ISO15099::Layers::createPillar), + "Static function to add a triangular pillar to a Tarcog gap", + py::arg("pillar"), py::arg("pressure")) + .def_static( + "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")) + .def_static( + "create_pillar", + py::overload_cast( &Tarcog::ISO15099::Layers::createPillar), - "Static function to add a polygonal pillar to a Tarcog gap", + "Static function to add a hexagon pillar to a Tarcog gap", py::arg("pillar"), py::arg("pressure")) .def_static( "create_pillar",