From 0321072c0ec6225303491d1e335bb4bf2d2ff710 Mon Sep 17 00:00:00 2001 From: Alireza Adli Date: Mon, 14 Oct 2024 13:15:29 -0400 Subject: [PATCH] Finalize the class comments and descriptions --- lca_carbon_workflow.py | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/lca_carbon_workflow.py b/lca_carbon_workflow.py index 59a206d..fddeeb1 100644 --- a/lca_carbon_workflow.py +++ b/lca_carbon_workflow.py @@ -46,6 +46,10 @@ class LCACarbonWorkflow: building_envelope_end_of_life_emission: building_opening_end_of_life_emission: building_component_end_of_life_emission: + + The above attributes will be computed when the calculate_emission() + method of a LCACarbonWorkflow object is called. + :param city_path: Either a path to the buildings (GeoJson) file or the content of such a file. :param archetypes_catalog_file_name: Path to the buildings' @@ -91,6 +95,26 @@ class LCACarbonWorkflow: self.building_component_end_of_life_emission = [] def calculate_building_component_emission(self, building): + """ + This method is the core of the whole class. It takes each building + contained in the city object and calculates and returns the envelope + and opening emission of the embodied and end of life cycles. The building + comes from the calculate_emission() method which goes through every + building of the city object (meaning the input of the LCACarbonWorkflow + object. + The calculate_building_component_emission() method goes through each + surface of the given building then each boundary of that surface to + calculate the embodied and end of life emission of openings and the + envelope of the building. It is being carried out by utilizing to + hidden methods of the current class (methods contain description.) + At the end, a tuple will be returned, containing the emissions + attributes. The tuple will be unpacked in the calculate_emission() + method. The attributes and their types are explained in the constructor. + The building parameter comes from the calculate_emission() method + which iterates through the city object buildings. + :param building: + :return: + """ surface_envelope_emission = [] surface_opening_emission = [] surface_envelope_end_of_life_emission = [] @@ -149,6 +173,8 @@ class LCACarbonWorkflow: calculate_building_component_emission() method. The output also is used in the calculate_building_component_emission() method. So the current method is hidden to the user. + The method utilizes the EnvelopeEmission and EndOfLifeEmission classes of + (currently named) life_cycle_assessment series of class. :param boundary: @@ -192,6 +218,8 @@ class LCACarbonWorkflow: Window's thickness assumed the same as wall's thickness These two values are being used to calculate window's workload for the End of Life emission evaluation. + The method utilizes the OpeningEmission and EndOfLifeEmission classes of + (currently named) life_cycle_assessment series of class. :param building: :param surface: