Add building workload
This commit is contained in:
parent
ce5a148f54
commit
0ab64df61b
@ -56,12 +56,15 @@ class LCACarbonWorkflow:
|
||||
self.building_envelope_emission = []
|
||||
self.building_opening_emission = []
|
||||
self.building_component_emission = []
|
||||
self.building_demolition_work_load = []
|
||||
self.building_envelope_workload = []
|
||||
self.building_opening_workload = []
|
||||
self.building_component_workload = []
|
||||
|
||||
def calculate_building_component_emission(self, building):
|
||||
surface_envelope_emission = []
|
||||
surface_opening_emission = []
|
||||
boundary_volume = []
|
||||
surface_envelope_workload = []
|
||||
surface_opening_workload = []
|
||||
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(
|
||||
@ -71,31 +74,40 @@ class LCACarbonWorkflow:
|
||||
for surface in building.surfaces:
|
||||
boundary_envelope_emission = []
|
||||
boundary_opening_emission = []
|
||||
boundary_envelope_workload =[]
|
||||
boundary_opening_workload = []
|
||||
|
||||
for boundary in surface.associated_thermal_boundaries:
|
||||
opening_emission = None
|
||||
opening_workload = None
|
||||
layer_emission, boundary_work_load = \
|
||||
self._calculate_envelope_emission(boundary)
|
||||
boundary_envelope_emission += layer_emission
|
||||
boundary_volume.append(boundary.opaque_area * boundary.thickness)
|
||||
boundary_envelope_workload += boundary_work_load
|
||||
|
||||
if boundary.window_ratio:
|
||||
opening_emission, opening_workload = \
|
||||
self._calculate_opening_emission(
|
||||
building, surface, boundary, opaque_surface_code)
|
||||
boundary_work_load += opening_workload
|
||||
if opening_emission:
|
||||
boundary_opening_emission += opening_emission
|
||||
boundary_opening_workload += opening_workload
|
||||
if boundary_opening_emission:
|
||||
surface_opening_emission += boundary_opening_emission
|
||||
surface_opening_workload += boundary_opening_workload
|
||||
surface_envelope_emission += boundary_envelope_emission
|
||||
building_envelope_volume = sum(boundary_volume)
|
||||
surface_envelope_workload += boundary_envelope_workload
|
||||
building_envelope_emission = sum(surface_envelope_emission)
|
||||
building_envelope_workload = sum(surface_envelope_workload)
|
||||
building_opening_emission = sum(surface_opening_emission)
|
||||
building_opening_workload = sum(surface_opening_workload)
|
||||
building_component_emission = \
|
||||
building_envelope_emission + building_opening_emission
|
||||
building_component_workload = \
|
||||
building_envelope_workload + building_opening_workload
|
||||
return building_envelope_emission, building_opening_emission, \
|
||||
building_component_emission, building_envelope_volume
|
||||
building_component_emission, building_envelope_workload, \
|
||||
building_opening_workload, building_component_workload
|
||||
|
||||
def _calculate_envelope_emission(self, boundary):
|
||||
layer_emission = []
|
||||
@ -109,7 +121,7 @@ class LCACarbonWorkflow:
|
||||
boundary.opaque_area, layer.thickness).calculate_envelope_emission())
|
||||
boundary_workload.append(
|
||||
boundary.opaque_area * layer.thickness * layer_material['density'])
|
||||
return layer_emission, sum(boundary_workload)
|
||||
return layer_emission, boundary_workload
|
||||
|
||||
def _calculate_opening_emission(
|
||||
self,
|
||||
@ -131,13 +143,16 @@ class LCACarbonWorkflow:
|
||||
transparent_surface_type, opaque_surface_code)['embodied_carbon'],
|
||||
opening.area).calculate_opening_emission())
|
||||
window_workload.append(opening.area * boundary.thickness * density)
|
||||
return opening_emission, sum(window_workload)
|
||||
return opening_emission, window_workload
|
||||
|
||||
def calculate_emission(self):
|
||||
for building in self.city.buildings:
|
||||
envelope, opening, building_component, building_envelope_volume = \
|
||||
envelope_emission, opening_emission, component_emission, \
|
||||
envelope_workload, opening_workload, component_workload = \
|
||||
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)
|
||||
self.building_envelope_emission.append(envelope_emission)
|
||||
self.building_opening_emission.append(opening_emission)
|
||||
self.building_component_emission.append(component_emission)
|
||||
self.building_envelope_workload.append(envelope_workload)
|
||||
self.building_opening_workload.append(opening_workload)
|
||||
self.building_component_workload.append(component_workload)
|
||||
|
Loading…
Reference in New Issue
Block a user