diff --git a/__pycache__/lca_carbon_workflow.cpython-310.pyc b/__pycache__/lca_carbon_workflow.cpython-310.pyc deleted file mode 100644 index 42c9fa4..0000000 Binary files a/__pycache__/lca_carbon_workflow.cpython-310.pyc and /dev/null differ diff --git a/building_component_surface.py b/building_component_surface.py index e69de29..7d648d3 100644 --- a/building_component_surface.py +++ b/building_component_surface.py @@ -0,0 +1,48 @@ +""" +building_component_surface module +Returns each individual surface values that are needed for +carbon emission calculation in building_component and eventually in +lca_carbon_workflow modules. +SPDX - License - Identifier: LGPL - 3.0 - or -later +Copyright © 2024 Concordia CERC group +Code contributors: Alireza Adli alireza.adli@concordia.ca +Mohammad Reza Seyedabadi mohammad.seyedabadi@mail.concordia.ca +""" + + +class BuildingComponentSurface: + def __init__(self): + self._opening_material_emission = None + self._opening_surface = None + self._envelope_material_emission = None + self._envelope_thickness = None + self._envelope_surface = None + + @property + def opening_material_emission(self): + return self._opening_material_emission + + @opening_material_emission.setter + def opening_material_emission(self, value): + pass + + @property + def opening_surface(self): + return self._opening_surface + + @opening_surface.setter + def opening_surface(self, value): + pass + + @property + def envelope_material_emission(self): + return self._envelope_material_emission + + @property + def envelope_thickness(self): + return self._envelope_thickness + + @property + def envelope_surface(self): + return self._envelope_surface + diff --git a/lca_carbon_workflow.py b/lca_carbon_workflow.py index 23d500b..079f157 100644 --- a/lca_carbon_workflow.py +++ b/lca_carbon_workflow.py @@ -1,5 +1,5 @@ """ -building_component module +lca_carbon_workflow module Returns the summarize of envelope and energy systems SPDX - License - Identifier: LGPL - 3.0 - or -later Copyright © 2024 Concordia CERC group @@ -40,6 +40,23 @@ class LCACarbonWorkflow: print(f'city created from {self.file_path}') ConstructionFactory(self.handler, self.city).enrich() - def calculate_emission(self): - for building in self.city.buildings: - return len(building.surfaces) + @staticmethod + 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 + opening_material_emission = + + + +# def calculate_emission(self): + # emitted_carbon = [] + # for building in self.city.buildings: + # return len(building.surfaces)