Replace workload with endOfLife emission for each layer

This commit is contained in:
Alireza Adli 2024-08-02 12:05:34 -04:00
parent 006b30dfb2
commit f155725e7b

View File

@ -18,6 +18,8 @@ from city_model_structure.life_cycle_assessment.opening_emission \
import OpeningEmission import OpeningEmission
from city_model_structure.life_cycle_assessment.envelope_emission \ from city_model_structure.life_cycle_assessment.envelope_emission \
import EnvelopeEmission import EnvelopeEmission
from city_model_structure.life_cycle_assessment.lca_end_of_life_carbon \
import EndOfLifeEmission
class LCACarbonWorkflow: class LCACarbonWorkflow:
@ -74,7 +76,7 @@ class LCACarbonWorkflow:
for surface in building.surfaces: for surface in building.surfaces:
boundary_envelope_emission = [] boundary_envelope_emission = []
boundary_opening_emission = [] boundary_opening_emission = []
boundary_envelope_workload =[] boundary_envelope_workload = []
boundary_opening_workload = [] boundary_opening_workload = []
for boundary in surface.associated_thermal_boundaries: for boundary in surface.associated_thermal_boundaries:
@ -111,7 +113,7 @@ class LCACarbonWorkflow:
def _calculate_envelope_emission(self, boundary): def _calculate_envelope_emission(self, boundary):
layer_emission = [] layer_emission = []
boundary_workload = [] boundary_emission = []
for layer in boundary.layers: for layer in boundary.layers:
if not layer.no_mass: if not layer.no_mass:
layer_material = \ layer_material = \
@ -120,9 +122,13 @@ class LCACarbonWorkflow:
layer_material['embodied_carbon'], layer_material['embodied_carbon'],
boundary.opaque_area, boundary.opaque_area,
layer.thickness, layer.density).calculate_envelope_emission()) layer.thickness, layer.density).calculate_envelope_emission())
boundary_workload.append( boundary_workload = boundary.opaque_area * layer.thickness * layer.density
boundary.opaque_area * layer.thickness * layer.density) boundary_emission.append(EndOfLifeEmission(
return layer_emission, boundary_workload 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
def _calculate_opening_emission( def _calculate_opening_emission(
self, self,