Replace workload with endOfLife emission for each opening

This commit is contained in:
Alireza Adli 2024-08-02 12:11:01 -04:00
parent f155725e7b
commit 5017c73486

View File

@ -113,7 +113,7 @@ class LCACarbonWorkflow:
def _calculate_envelope_emission(self, boundary):
layer_emission = []
boundary_emission = []
layer_end_of_life_emission = []
for layer in boundary.layers:
if not layer.no_mass:
layer_material = \
@ -122,13 +122,14 @@ class LCACarbonWorkflow:
layer_material['embodied_carbon'],
boundary.opaque_area,
layer.thickness, layer.density).calculate_envelope_emission())
boundary_workload = boundary.opaque_area * layer.thickness * layer.density
boundary_emission.append(EndOfLifeEmission(
layer_end_of_life_emission.append(EndOfLifeEmission(
layer_material['recycling_ratio'],
layer_material['onsite_recycling_ratio'],
layer_material['company_recycling_ratio'],
layer_material['landfilling_ratio'], boundary_workload))
return layer_emission, boundary_emission
return layer_emission, layer_end_of_life_emission
def _calculate_opening_emission(
self,
@ -139,18 +140,25 @@ class LCACarbonWorkflow:
These two values are being used to calculate window's workload
for End of Life emission evaluation."""
opening_emission = []
window_workload = []
window_end_of_life_emission = []
for opening in boundary.thermal_openings:
transparent_surface_type = 'Window'
if building.year_of_construction >= 2020 and \
surface.type == 'Roof':
transparent_surface_type = 'Skylight'
opening_emission.append(OpeningEmission(
self.nrcan_catalogs.search_transparent_surfaces(
transparent_surface_type, opaque_surface_code)['embodied_carbon'],
opening.area).calculate_opening_emission())
window_workload.append(opening.area * boundary.thickness * density)
return opening_emission, window_workload
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
window_end_of_life_emission.append(EndOfLifeEmission(
opening_material['recycling_ratio'],
opening_material['onsite_recycling_ratio'],
opening_material['company_recycling_ratio'],
opening_material['landfilling_ratio'], window_workload))
return opening_emission, window_end_of_life_emission
def calculate_emission(self):
for building in self.city.buildings: