Calculate work load
This commit is contained in:
parent
098c722aac
commit
8d3b8cdc45
@ -56,10 +56,12 @@ class LCACarbonWorkflow:
|
||||
self.building_envelope_emission = []
|
||||
self.building_opening_emission = []
|
||||
self.building_component_emission = []
|
||||
self.building_demolition_work_load = []
|
||||
|
||||
def calculate_building_component_emission(self, building):
|
||||
surface_envelope_emission = []
|
||||
surface_opening_emission = []
|
||||
boundary_volume = []
|
||||
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(
|
||||
@ -69,10 +71,13 @@ class LCACarbonWorkflow:
|
||||
for surface in building.surfaces:
|
||||
boundary_envelope_emission = []
|
||||
boundary_opening_emission = []
|
||||
|
||||
|
||||
for boundary in surface.associated_thermal_boundaries:
|
||||
opening_emission = None
|
||||
layer_emission = self._calculate_envelope_emission(boundary)
|
||||
boundary_envelope_emission += layer_emission
|
||||
boundary_volume.append(boundary.opaque_area * boundary.thickness)
|
||||
|
||||
if boundary.window_ratio:
|
||||
opening_emission = self._calculate_opening_emission(
|
||||
@ -82,12 +87,13 @@ class LCACarbonWorkflow:
|
||||
if boundary_opening_emission:
|
||||
surface_opening_emission += boundary_opening_emission
|
||||
surface_envelope_emission += boundary_envelope_emission
|
||||
building_envelope_volume = sum(boundary_volume)
|
||||
building_envelope_emission = sum(surface_envelope_emission)
|
||||
building_opening_emission = sum(surface_opening_emission)
|
||||
building_component_emission = \
|
||||
building_envelope_emission + building_opening_emission
|
||||
return building_envelope_emission, building_opening_emission, \
|
||||
building_component_emission
|
||||
building_component_emission, building_envelope_volume
|
||||
|
||||
def _calculate_envelope_emission(self, boundary):
|
||||
layer_emission = []
|
||||
@ -115,8 +121,9 @@ class LCACarbonWorkflow:
|
||||
|
||||
def calculate_emission(self):
|
||||
for building in self.city.buildings:
|
||||
envelope, opening, building_component = \
|
||||
envelope, opening, building_component, building_envelope_volume = \
|
||||
self.calculate_building_component_emission(building)
|
||||
self.building_envelope_emission.append(envelope)
|
||||
self.building_opening_emission.append(opening)
|
||||
self.building_component_emission.append(building_component)
|
||||
self.building_demolition_work_load.append(building_envelope_volume)
|
||||
|
Loading…
Reference in New Issue
Block a user