2024-07-15 15:06:44 -04:00
|
|
|
"""
|
2024-07-16 16:29:33 -04:00
|
|
|
lca_carbon_workflow module
|
2024-07-15 15:06:44 -04:00
|
|
|
Returns the summarize of envelope and energy systems
|
|
|
|
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
|
|
|
Copyright © 2024 Concordia CERC group
|
2024-08-13 13:13:10 -04:00
|
|
|
Project developers: Alireza Adli alireza.adli@concordia.ca
|
2024-07-15 15:06:44 -04:00
|
|
|
Mohammad Reza Seyedabadi mohammad.seyedabadi@mail.concordia.ca
|
|
|
|
"""
|
|
|
|
|
|
|
|
from pathlib import Path
|
|
|
|
|
2024-10-09 15:59:38 -04:00
|
|
|
from input_geojson_content import InputGeoJsonContent
|
|
|
|
|
2024-07-15 15:06:44 -04:00
|
|
|
from hub.imports.geometry_factory import GeometryFactory
|
|
|
|
from hub.imports.construction_factory import ConstructionFactory
|
|
|
|
from hub.helpers.dictionaries import Dictionaries
|
2024-08-05 16:55:11 -04:00
|
|
|
|
2024-07-17 16:08:40 -04:00
|
|
|
from city_model_structure.life_cycle_assessment.access_nrcan_catalogue \
|
|
|
|
import AccessNrcanCatalog
|
2024-07-18 17:19:32 -04:00
|
|
|
from city_model_structure.life_cycle_assessment.opening_emission \
|
|
|
|
import OpeningEmission
|
2024-07-20 12:17:56 -04:00
|
|
|
from city_model_structure.life_cycle_assessment.envelope_emission \
|
|
|
|
import EnvelopeEmission
|
2024-08-02 12:05:34 -04:00
|
|
|
from city_model_structure.life_cycle_assessment.lca_end_of_life_carbon \
|
|
|
|
import EndOfLifeEmission
|
2024-07-15 15:06:44 -04:00
|
|
|
|
|
|
|
|
|
|
|
class LCACarbonWorkflow:
|
2024-07-16 10:25:31 -04:00
|
|
|
def __init__(
|
|
|
|
self,
|
|
|
|
city_path,
|
2024-07-17 16:08:40 -04:00
|
|
|
archetypes_catalog_file_name,
|
|
|
|
constructions_catalog_file,
|
|
|
|
catalog='nrcan',
|
2024-07-16 10:25:31 -04:00
|
|
|
building_parameters=('height', 'year_of_construction', 'function')):
|
2024-10-14 11:04:57 -04:00
|
|
|
"""
|
|
|
|
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.
|
|
|
|
: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
|
2024-10-09 15:59:38 -04:00
|
|
|
self.catalogs_path = Path(__file__).parent / 'input_files'
|
2024-07-17 16:08:40 -04:00
|
|
|
self.archetypes_catalog_file_name = archetypes_catalog_file_name
|
|
|
|
self.constructions_catalog_file = constructions_catalog_file
|
|
|
|
self.nrcan_catalogs = AccessNrcanCatalog(
|
|
|
|
self.catalogs_path,
|
|
|
|
archetypes=self.archetypes_catalog_file_name,
|
|
|
|
constructions=self.constructions_catalog_file)
|
2024-07-16 10:25:31 -04:00
|
|
|
self.out_path = (Path(__file__).parent / 'out_files')
|
2024-07-17 16:08:40 -04:00
|
|
|
self.handler = catalog
|
2024-07-16 10:25:31 -04:00
|
|
|
self.height, self.year_of_construction, self.function = \
|
|
|
|
building_parameters
|
2024-07-15 15:06:44 -04:00
|
|
|
|
|
|
|
print('[simulation start]')
|
|
|
|
|
2024-07-16 10:25:31 -04:00
|
|
|
self.city = GeometryFactory(
|
|
|
|
'geojson',
|
|
|
|
path=self.file_path,
|
|
|
|
height_field=self.height,
|
|
|
|
year_of_construction_field=self.year_of_construction,
|
|
|
|
function_field=self.function,
|
|
|
|
function_to_hub=Dictionaries().montreal_function_to_hub_function).city
|
|
|
|
print(f'city created from {self.file_path}')
|
|
|
|
ConstructionFactory(self.handler, self.city).enrich()
|
2024-07-15 15:06:44 -04:00
|
|
|
|
2024-07-21 10:35:42 -04:00
|
|
|
self.building_envelope_emission = []
|
|
|
|
self.building_opening_emission = []
|
|
|
|
self.building_component_emission = []
|
2024-08-02 12:26:13 -04:00
|
|
|
self.building_envelope_end_of_life_emission = []
|
|
|
|
self.building_opening_end_of_life_emission = []
|
|
|
|
self.building_component_end_of_life_emission = []
|
2024-07-21 10:35:42 -04:00
|
|
|
|
2024-07-20 10:39:33 -04:00
|
|
|
def calculate_building_component_emission(self, building):
|
2024-07-20 20:00:07 -04:00
|
|
|
surface_envelope_emission = []
|
2024-07-18 17:19:32 -04:00
|
|
|
surface_opening_emission = []
|
2024-08-02 12:26:13 -04:00
|
|
|
surface_envelope_end_of_life_emission = []
|
|
|
|
surface_opening_end_of_life_emission = []
|
2024-07-18 17:19:32 -04:00
|
|
|
opaque_surface_code = self.nrcan_catalogs.find_opaque_surface(
|
|
|
|
self.nrcan_catalogs.hub_to_nrcan_function(building.function),
|
|
|
|
self.nrcan_catalogs.year_to_period_of_construction(
|
|
|
|
building.year_of_construction),
|
|
|
|
'6')
|
|
|
|
|
2024-07-16 16:29:33 -04:00
|
|
|
for surface in building.surfaces:
|
2024-07-20 20:00:07 -04:00
|
|
|
boundary_envelope_emission = []
|
2024-07-18 17:19:32 -04:00
|
|
|
boundary_opening_emission = []
|
2024-08-02 12:26:13 -04:00
|
|
|
boundary_envelope_end_of_life_emission = []
|
|
|
|
boundary_opening_end_of_life_emission = []
|
2024-07-29 14:09:33 -04:00
|
|
|
|
2024-07-17 14:35:00 -04:00
|
|
|
for boundary in surface.associated_thermal_boundaries:
|
2024-07-20 20:00:07 -04:00
|
|
|
opening_emission = None
|
2024-08-02 12:26:13 -04:00
|
|
|
opening_end_of_life_emission = None
|
|
|
|
layer_emission, layer_end_of_life_emission = \
|
2024-07-31 15:26:12 -04:00
|
|
|
self._calculate_envelope_emission(boundary)
|
2024-07-20 20:00:07 -04:00
|
|
|
boundary_envelope_emission += layer_emission
|
2024-08-02 12:26:13 -04:00
|
|
|
boundary_envelope_end_of_life_emission += layer_end_of_life_emission
|
2024-07-20 12:17:56 -04:00
|
|
|
|
2024-07-20 20:00:07 -04:00
|
|
|
if boundary.window_ratio:
|
2024-08-02 12:26:13 -04:00
|
|
|
opening_emission, opening_end_of_life_emission = \
|
2024-07-31 15:26:12 -04:00
|
|
|
self._calculate_opening_emission(
|
|
|
|
building, surface, boundary, opaque_surface_code)
|
2024-07-19 14:08:32 -04:00
|
|
|
if opening_emission:
|
|
|
|
boundary_opening_emission += opening_emission
|
2024-08-02 12:26:13 -04:00
|
|
|
boundary_opening_end_of_life_emission += opening_end_of_life_emission
|
2024-07-19 14:08:32 -04:00
|
|
|
if boundary_opening_emission:
|
|
|
|
surface_opening_emission += boundary_opening_emission
|
2024-08-02 12:26:13 -04:00
|
|
|
surface_opening_end_of_life_emission += \
|
|
|
|
boundary_opening_end_of_life_emission
|
2024-07-20 20:00:07 -04:00
|
|
|
surface_envelope_emission += boundary_envelope_emission
|
2024-08-02 12:26:13 -04:00
|
|
|
surface_envelope_end_of_life_emission += \
|
|
|
|
boundary_envelope_end_of_life_emission
|
2024-07-20 20:00:07 -04:00
|
|
|
building_envelope_emission = sum(surface_envelope_emission)
|
2024-08-02 12:26:13 -04:00
|
|
|
building_envelope_workload = sum(surface_envelope_end_of_life_emission)
|
2024-07-20 10:57:16 -04:00
|
|
|
building_opening_emission = sum(surface_opening_emission)
|
2024-08-02 12:26:13 -04:00
|
|
|
building_opening_workload = sum(surface_opening_end_of_life_emission)
|
2024-07-20 20:00:07 -04:00
|
|
|
building_component_emission = \
|
2024-07-21 10:35:42 -04:00
|
|
|
building_envelope_emission + building_opening_emission
|
2024-07-31 15:54:02 -04:00
|
|
|
building_component_workload = \
|
|
|
|
building_envelope_workload + building_opening_workload
|
2024-07-21 10:35:42 -04:00
|
|
|
return building_envelope_emission, building_opening_emission, \
|
2024-07-31 15:54:02 -04:00
|
|
|
building_component_emission, building_envelope_workload, \
|
|
|
|
building_opening_workload, building_component_workload
|
2024-07-20 20:00:07 -04:00
|
|
|
|
|
|
|
def _calculate_envelope_emission(self, boundary):
|
|
|
|
layer_emission = []
|
2024-08-02 12:11:01 -04:00
|
|
|
layer_end_of_life_emission = []
|
2024-07-20 20:00:07 -04:00
|
|
|
for layer in boundary.layers:
|
|
|
|
if not layer.no_mass:
|
2024-07-31 15:08:02 -04:00
|
|
|
layer_material = \
|
2024-10-13 12:36:43 -04:00
|
|
|
self.nrcan_catalogs.search_material(layer.material_name)
|
2024-07-20 20:00:07 -04:00
|
|
|
layer_emission.append(EnvelopeEmission(
|
2024-07-31 15:08:02 -04:00
|
|
|
layer_material['embodied_carbon'],
|
2024-08-01 13:45:26 -04:00
|
|
|
boundary.opaque_area,
|
|
|
|
layer.thickness, layer.density).calculate_envelope_emission())
|
2024-08-02 12:11:01 -04:00
|
|
|
|
2024-08-02 12:26:13 -04:00
|
|
|
boundary_workload = \
|
|
|
|
boundary.opaque_area * \
|
|
|
|
layer.thickness * \
|
|
|
|
layer.density
|
2024-08-02 12:11:01 -04:00
|
|
|
layer_end_of_life_emission.append(EndOfLifeEmission(
|
2024-08-02 12:05:34 -04:00
|
|
|
layer_material['recycling_ratio'],
|
|
|
|
layer_material['onsite_recycling_ratio'],
|
|
|
|
layer_material['company_recycling_ratio'],
|
2024-08-02 12:26:13 -04:00
|
|
|
layer_material['landfilling_ratio'],
|
|
|
|
boundary_workload).calculate_end_of_life_emission())
|
2024-08-02 12:11:01 -04:00
|
|
|
return layer_emission, layer_end_of_life_emission
|
2024-07-20 10:39:33 -04:00
|
|
|
|
|
|
|
def _calculate_opening_emission(
|
2024-07-31 15:26:12 -04:00
|
|
|
self,
|
|
|
|
building, surface, boundary, opaque_surface_code,
|
|
|
|
density=2579):
|
|
|
|
"""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."""
|
2024-07-20 10:39:33 -04:00
|
|
|
opening_emission = []
|
2024-08-02 12:26:13 -04:00
|
|
|
opening_end_of_life_emission = []
|
2024-07-20 10:39:33 -04:00
|
|
|
for opening in boundary.thermal_openings:
|
|
|
|
transparent_surface_type = 'Window'
|
|
|
|
if building.year_of_construction >= 2020 and \
|
|
|
|
surface.type == 'Roof':
|
|
|
|
transparent_surface_type = 'Skylight'
|
2024-08-02 12:11:01 -04:00
|
|
|
opening_material = self.nrcan_catalogs.search_transparent_surfaces(
|
|
|
|
transparent_surface_type, opaque_surface_code)
|
|
|
|
opening_emission.append(
|
|
|
|
OpeningEmission(opening_material['embodied_carbon'],
|
|
|
|
opening.area).calculate_opening_emission())
|
|
|
|
|
|
|
|
window_workload = opening.area * boundary.thickness * density
|
2024-08-02 12:26:13 -04:00
|
|
|
opening_end_of_life_emission.append(EndOfLifeEmission(
|
2024-08-02 12:11:01 -04:00
|
|
|
opening_material['recycling_ratio'],
|
|
|
|
opening_material['onsite_recycling_ratio'],
|
|
|
|
opening_material['company_recycling_ratio'],
|
2024-08-02 12:26:13 -04:00
|
|
|
opening_material['landfilling_ratio'],
|
|
|
|
window_workload).calculate_end_of_life_emission())
|
|
|
|
return opening_emission, opening_end_of_life_emission
|
2024-07-16 16:29:33 -04:00
|
|
|
|
2024-07-16 16:45:43 -04:00
|
|
|
def calculate_emission(self):
|
2024-07-17 14:35:00 -04:00
|
|
|
for building in self.city.buildings:
|
2024-07-31 15:54:02 -04:00
|
|
|
envelope_emission, opening_emission, component_emission, \
|
2024-08-02 12:26:13 -04:00
|
|
|
envelope_end_of_life_emission, \
|
|
|
|
opening_end_of_life_emission, \
|
|
|
|
component_end_of_life_emission = \
|
2024-07-21 10:35:42 -04:00
|
|
|
self.calculate_building_component_emission(building)
|
2024-07-31 15:54:02 -04:00
|
|
|
self.building_envelope_emission.append(envelope_emission)
|
|
|
|
self.building_opening_emission.append(opening_emission)
|
|
|
|
self.building_component_emission.append(component_emission)
|
2024-08-02 12:26:13 -04:00
|
|
|
self.building_envelope_end_of_life_emission.append(
|
|
|
|
envelope_end_of_life_emission)
|
|
|
|
self.building_opening_end_of_life_emission.append(
|
|
|
|
opening_end_of_life_emission)
|
|
|
|
self.building_component_end_of_life_emission.append(
|
|
|
|
component_end_of_life_emission)
|