Compare commits
8 Commits
1beadca2b9
...
7b8ea656f3
Author | SHA1 | Date | |
---|---|---|---|
|
7b8ea656f3 | ||
|
0321072c0e | ||
|
ed2ae3e9b6 | ||
|
726271aa6d | ||
|
b974496348 | ||
|
5b8ddc742a | ||
|
674e24997c | ||
|
6e2c82e1a3 |
|
@ -3,7 +3,7 @@ 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
|
||||
Project developers: Alireza Adli alireza.adli@concordia.ca
|
||||
Project developers: Alireza Adli alireza.adli@mail.concordia.ca
|
||||
Mohammad Reza Seyedabadi mohammad.seyedabadi@mail.concordia.ca
|
||||
"""
|
||||
|
||||
|
@ -33,8 +33,36 @@ class LCACarbonWorkflow:
|
|||
constructions_catalog_file,
|
||||
catalog='nrcan',
|
||||
building_parameters=('height', 'year_of_construction', 'function')):
|
||||
self.file_path = Path(__file__).parent / 'input_files' / \
|
||||
InputGeoJsonContent(city_path).content
|
||||
"""
|
||||
LCACarbonWorkflow takes a number of buildings and enrich the city object
|
||||
using cerc-hub GeometryFactory and ConstructionFactory. Then it
|
||||
calculates embodied and end of life carbon emission of each building.
|
||||
It puts out the results of opening and envelop emission for each
|
||||
mentioned cycle separately.
|
||||
Final results will be stored in the below attributes:
|
||||
building_envelope_emission: <class 'float'>
|
||||
building_opening_emission: <class 'float'>
|
||||
building_component_emission: <class 'float'>
|
||||
building_envelope_end_of_life_emission: <class 'float'>
|
||||
building_opening_end_of_life_emission: <class 'float'>
|
||||
building_component_end_of_life_emission: <class 'float'>
|
||||
|
||||
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'
|
||||
archetypes (JSON).
|
||||
:param constructions_catalog_file: Path to the construction materials
|
||||
data.
|
||||
:param catalog: Type of the catalog (in this case 'nrcan', the default
|
||||
argument)
|
||||
:param building_parameters: Parameters used for using the catalog (in
|
||||
this case three default arguments)
|
||||
"""
|
||||
self.file_path = Path(__file__).parent / 'input_files' / InputGeoJsonContent(
|
||||
city_path).content
|
||||
self.catalogs_path = Path(__file__).parent / 'input_files'
|
||||
self.archetypes_catalog_file_name = archetypes_catalog_file_name
|
||||
self.constructions_catalog_file = constructions_catalog_file
|
||||
|
@ -67,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: <class 'hub.city_model_structure.building.Building'>
|
||||
:return: <class 'tuple'>
|
||||
"""
|
||||
surface_envelope_emission = []
|
||||
surface_opening_emission = []
|
||||
surface_envelope_end_of_life_emission = []
|
||||
|
@ -118,12 +166,26 @@ class LCACarbonWorkflow:
|
|||
building_opening_workload, building_component_workload
|
||||
|
||||
def _calculate_envelope_emission(self, boundary):
|
||||
"""
|
||||
The method calculates embodied and end of life emission of the building's
|
||||
envelope by iterating through each building boundary's layers. The
|
||||
argument corresponding to the boundary parameter comes from the
|
||||
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: <class
|
||||
'hub.city_model_structure.
|
||||
building_demand.thermal_boundary.ThermalBoundary'>
|
||||
:return: <class 'tuple'>
|
||||
"""
|
||||
layer_emission = []
|
||||
layer_end_of_life_emission = []
|
||||
for layer in boundary.layers:
|
||||
if not layer.no_mass:
|
||||
layer_material = \
|
||||
self.nrcan_catalogs.search_materials(layer.material_name)
|
||||
self.nrcan_catalogs.search_material(layer.material_name)
|
||||
layer_emission.append(EnvelopeEmission(
|
||||
layer_material['embodied_carbon'],
|
||||
boundary.opaque_area,
|
||||
|
@ -145,10 +207,29 @@ class LCACarbonWorkflow:
|
|||
self,
|
||||
building, surface, boundary, opaque_surface_code,
|
||||
density=2579):
|
||||
"""Windows have the assumed density of 2579 kg/m3
|
||||
"""
|
||||
This calculates the opening emission by iterating through each thermal
|
||||
opening of each building's boundary. It is done based on the mentioned
|
||||
parameters.
|
||||
The arguments come from the calculate_building_component_emission()
|
||||
method and the output is used in the same method. So the current method
|
||||
is hidden to the user.
|
||||
Windows have the assumed density of 2579 kg/m3
|
||||
Window's thickness assumed the same as wall's thickness
|
||||
These two values are being used to calculate window's workload
|
||||
for End of Life emission evaluation."""
|
||||
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: <class 'hub.city_model_structure.building.Building'>
|
||||
:param surface: <class
|
||||
'hub.city_model_structure.building_demand.surface.Surface'>
|
||||
:param boundary: <class
|
||||
'hub.city_model_structure.
|
||||
building_demand.thermal_boundary.ThermalBoundary'>
|
||||
:param opaque_surface_code: <class 'str'>
|
||||
:param density: <class 'int'>
|
||||
:return: <class 'tuple'>
|
||||
"""
|
||||
opening_emission = []
|
||||
opening_end_of_life_emission = []
|
||||
for opening in boundary.thermal_openings:
|
||||
|
@ -172,6 +253,13 @@ class LCACarbonWorkflow:
|
|||
return opening_emission, opening_end_of_life_emission
|
||||
|
||||
def calculate_emission(self):
|
||||
"""
|
||||
It iterates through the city object and gives each building to the
|
||||
calculate_building_component_emission() method. Then it unpack the results
|
||||
of the mentioned method to the (currently six) attributes which hold the
|
||||
final results. These attributes are mentioned in the constructor method
|
||||
description.
|
||||
"""
|
||||
for building in self.city.buildings:
|
||||
envelope_emission, opening_emission, component_emission, \
|
||||
envelope_end_of_life_emission, \
|
||||
|
|
Loading…
Reference in New Issue
Block a user