diff --git a/.gitignore b/.gitignore index 7c2edc4..3c3375d 100644 --- a/.gitignore +++ b/.gitignore @@ -7,4 +7,4 @@ __pycache__/ input_files/*.geojson !input_files/.gitkeep -test_*.py \ No newline at end of file +itest_*.py \ No newline at end of file diff --git a/.idea/lca_carbon_workflow.iml b/.idea/lca_carbon_workflow.iml index 747adc1..de1e4d0 100644 --- a/.idea/lca_carbon_workflow.iml +++ b/.idea/lca_carbon_workflow.iml @@ -1,6 +1,7 @@ + diff --git a/lca_carbon_workflow.py b/lca_carbon_workflow.py index c1a913f..93dfb01 100644 --- a/lca_carbon_workflow.py +++ b/lca_carbon_workflow.py @@ -12,6 +12,10 @@ from pathlib import Path from hub.imports.geometry_factory import GeometryFactory from hub.imports.construction_factory import ConstructionFactory from hub.helpers.dictionaries import Dictionaries +# from hub.city_model_structure.life_cycle_assessment.access_nrcan_catalogue \ +# import AccessNrcanCatalog +# from hub.city_model_structure.life_cycle_assessment.building_component \ +# import BuildingComponent class LCACarbonWorkflow: @@ -44,18 +48,23 @@ class LCACarbonWorkflow: def calculate_opening_emission(building): surface_emission = [] for surface in building.surfaces: - if surface.window_ratio == 0: - opening_surface = 0 - opening_material_emission = 0 - else: - opening_surface = 0 - opening_material_emission = 0 - for opening in surface.associated_thermal_boundaries.thermal_openings: - opening_surface += opening.area - # test migration to gittea - # opening_material_emission = + for boundary in surface.associated_thermal_boundaries: + if boundary.window_ratio == 0: + opening_surface = 0 + opening_material_emission = 0 + print('window = 0') + else: + opening_surface = 0 + opening_material_emission = 0 + print('window != 0') + # for opening in surface.associated_thermal_boundaries.thermal_openings: + # opening_surface += opening.area + # opening_material_emission = def calculate_emission(self): - emitted_carbon = [] - for building in self.city.buildings: - return len(building.surfaces) + emitted_carbon = [] + for building in self.city.buildings: + # self.calculate_opening_emission(building) + for surface in building.surfaces: + for boundary in surface.associated_thermal_boundaries: + print(boundary.window_ratio) \ No newline at end of file