46 lines
2.3 KiB
Python
46 lines
2.3 KiB
Python
"""
|
|
LifeCycleCosts calculates the life cycle costs of one building
|
|
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
|
Copyright © 2022 Project Coder Atiya atiya.atiya@mail.concordia.ca
|
|
"""
|
|
|
|
|
|
|
|
|
|
class CapitalCost:
|
|
|
|
def calculate_capital_cost(building_area, building_volume, content):
|
|
structural_cost = float(content.costs[0].capital_cost.structural_cost) * building_volume
|
|
sub_structural_cost = float(content.costs[0].capital_cost.sub_structural_cost) * building_volume
|
|
lighting_cost = float(content.costs[0].capital_cost.lighting_cost) * building_volume
|
|
surface_finish_cost = float(content.costs[0].capital_cost.surface_finish_cost) * building_volume
|
|
engineer_cost = float(content.costs[0].capital_cost.engineer_cost) * building_volume
|
|
envelop_cost = float(content.costs[0].capital_cost.EnvelopCost.reposition) * building_volume +
|
|
# system_cost = float(content.costs[0].capital_cost.system_cost) * building_volume
|
|
# subsidy = float(content.costs[0].capital_cost.subsidy) * building_volume
|
|
|
|
print("structural_cost ", structural_cost)
|
|
print("sub_structural_cost ", sub_structural_cost)
|
|
print("lighting_cost ", lighting_cost)
|
|
print("surface_finish_cost ", surface_finish_cost)
|
|
print("engineer_cost ", engineer_cost)
|
|
# print("envelop_cost ", envelop_cost)
|
|
# print("system_cost ", system_cost)
|
|
# print("subsidy ", subsidy)
|
|
|
|
|
|
# for thermal_zone in internal_zone.thermal_zones:
|
|
# for thermal_boundary in thermal_zone.thermal_boundaries:
|
|
# total_opaque_area = []
|
|
# for i, layer in enumerate(thermal_boundary.layers):
|
|
# print(layer)
|
|
# if layer.material.no_mass == False:
|
|
# layer_area = layer.thickness * thermal_boundary.opaque_area
|
|
# # total_opaque_area[layer.material.].append(material_layers_lca)
|
|
# # else:
|
|
# # material_layers_lca['layer_name'] = f'Layer {i+1}'
|
|
# # material_layers_lca['nrel_material_id'] = layer.material.id
|
|
# # material_layers_lca['lca_material_id'] = mat_id
|
|
# # material_layers_lca['embodied_carbon'] = (layer.thickness * thermal_boundary.opaque_area) * mat_density * embodied_carbon
|
|
# # material_layers_lca['end_of_life_per_layer'] = 0.0
|
|
# # materials_lca[thermal_boundary.type].append(material_layers_lca) |