forked from s_ranjbar/city_retrofit
LCA materials XML
This commit is contained in:
parent
5246cb27ee
commit
01ff8ddcf3
|
@ -12,16 +12,60 @@ class Material:
|
||||||
"""
|
"""
|
||||||
Material class
|
Material class
|
||||||
"""
|
"""
|
||||||
def __init__(self):
|
def __init__(self, type, material_id, material_name, density, density_unit, embodied_carbon, embodied_carbon_unit, recycling_ratio,
|
||||||
self._name = None
|
onsite_recycling_ratio, company_recycling_ratio, landfilling_ratio, cost, cost_unit):
|
||||||
|
self._type = type
|
||||||
|
self._id = material_id
|
||||||
|
self._name = material_name
|
||||||
self._conductivity = None
|
self._conductivity = None
|
||||||
self._specific_heat = None
|
self._specific_heat = None
|
||||||
self._density = None
|
self._density = density
|
||||||
|
self._density_unit = density_unit
|
||||||
self._solar_absorptance = None
|
self._solar_absorptance = None
|
||||||
self._thermal_absorptance = None
|
self._thermal_absorptance = None
|
||||||
self._visible_absorptance = None
|
self._visible_absorptance = None
|
||||||
self._no_mass = False
|
self._no_mass = False
|
||||||
self._thermal_resistance = None
|
self._thermal_resistance = None
|
||||||
|
self._embodied_carbon = embodied_carbon
|
||||||
|
self._embodied_carbon_unit = embodied_carbon_unit
|
||||||
|
self._recycling_ratio = recycling_ratio
|
||||||
|
self._onsite_recycling_ratio = onsite_recycling_ratio
|
||||||
|
self._company_recycling_ratio = company_recycling_ratio
|
||||||
|
self._landfilling_ratio = landfilling_ratio
|
||||||
|
self._cost = cost
|
||||||
|
self._cost_unit = cost_unit
|
||||||
|
|
||||||
|
@property
|
||||||
|
def type(self):
|
||||||
|
"""
|
||||||
|
Get material type
|
||||||
|
:return: str
|
||||||
|
"""
|
||||||
|
return self._type
|
||||||
|
|
||||||
|
@type.setter
|
||||||
|
def type(self, value):
|
||||||
|
"""
|
||||||
|
Set material type
|
||||||
|
:param value: string
|
||||||
|
"""
|
||||||
|
self._type = str(value)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def id(self):
|
||||||
|
"""
|
||||||
|
Get material id
|
||||||
|
:return: int
|
||||||
|
"""
|
||||||
|
return self._id
|
||||||
|
|
||||||
|
@id.setter
|
||||||
|
def id(self, value):
|
||||||
|
"""
|
||||||
|
Set material id
|
||||||
|
:param value: int
|
||||||
|
"""
|
||||||
|
self._id = int(value)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def name(self):
|
def name(self):
|
||||||
|
@ -84,12 +128,29 @@ class Material:
|
||||||
@density.setter
|
@density.setter
|
||||||
def density(self, value):
|
def density(self, value):
|
||||||
"""
|
"""
|
||||||
Set material density in kg/m3
|
Set material density
|
||||||
:param value: float
|
:param value: float
|
||||||
"""
|
"""
|
||||||
if value is not None:
|
if value is not None:
|
||||||
self._density = float(value)
|
self._density = float(value)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def density_unit(self) -> Union[None, str]:
|
||||||
|
"""
|
||||||
|
Get material density unit
|
||||||
|
:return: None or string
|
||||||
|
"""
|
||||||
|
return self._density_unit
|
||||||
|
|
||||||
|
@density_unit.setter
|
||||||
|
def density_unit(self, value):
|
||||||
|
"""
|
||||||
|
Set material density unit
|
||||||
|
:param value: string
|
||||||
|
"""
|
||||||
|
if value is not None:
|
||||||
|
self._density_unit = str(value)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def solar_absorptance(self) -> Union[None, float]:
|
def solar_absorptance(self) -> Union[None, float]:
|
||||||
"""
|
"""
|
||||||
|
@ -174,3 +235,139 @@ class Material:
|
||||||
"""
|
"""
|
||||||
if value is not None:
|
if value is not None:
|
||||||
self._thermal_resistance = float(value)
|
self._thermal_resistance = float(value)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def embodied_carbon(self) -> Union[None, float]:
|
||||||
|
"""
|
||||||
|
Get material embodied carbon
|
||||||
|
:return: None or float
|
||||||
|
"""
|
||||||
|
return self._embodied_carbon
|
||||||
|
|
||||||
|
@embodied_carbon.setter
|
||||||
|
def embodied_carbon(self, value):
|
||||||
|
"""
|
||||||
|
Set material embodied carbon
|
||||||
|
:param value: float
|
||||||
|
"""
|
||||||
|
if value is not None:
|
||||||
|
self._embodied_carbon = float(value)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def embodied_carbon_unit(self) -> Union[None, str]:
|
||||||
|
"""
|
||||||
|
Get material embodied carbon unit
|
||||||
|
:return: None or string
|
||||||
|
"""
|
||||||
|
return self._embodied_carbon
|
||||||
|
|
||||||
|
@embodied_carbon_unit.setter
|
||||||
|
def embodied_carbon_unit(self, value):
|
||||||
|
"""
|
||||||
|
Set material embodied carbon unit
|
||||||
|
:param value: string
|
||||||
|
"""
|
||||||
|
if value is not None:
|
||||||
|
self._embodied_carbon_unit = str(value)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def recycling_ratio(self) -> Union[None, float]:
|
||||||
|
"""
|
||||||
|
Get material recycling ratio
|
||||||
|
:return: None or float
|
||||||
|
"""
|
||||||
|
return self._recycling_ratio
|
||||||
|
|
||||||
|
@recycling_ratio.setter
|
||||||
|
def recycling_ratio(self, value):
|
||||||
|
"""
|
||||||
|
Set material recycling ratio
|
||||||
|
:param value: float
|
||||||
|
"""
|
||||||
|
if value is not None:
|
||||||
|
self._recycling_ratio = float(value)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def onsite_recycling_ratio(self) -> Union[None, float]:
|
||||||
|
"""
|
||||||
|
Get material onsite recycling ratio
|
||||||
|
:return: None or float
|
||||||
|
"""
|
||||||
|
return self._onsite_recycling_ratio
|
||||||
|
|
||||||
|
@onsite_recycling_ratio.setter
|
||||||
|
def onsite_recycling_ratio(self, value):
|
||||||
|
"""
|
||||||
|
Set material onsite recycling ratio
|
||||||
|
:param value: float
|
||||||
|
"""
|
||||||
|
if value is not None:
|
||||||
|
self._onsite_recycling_ratio = float(value)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def company_recycling_ratio(self) -> Union[None, float]:
|
||||||
|
"""
|
||||||
|
Get material company recycling ratio
|
||||||
|
:return: None or float
|
||||||
|
"""
|
||||||
|
return self._company_recycling_ratio
|
||||||
|
|
||||||
|
@company_recycling_ratio.setter
|
||||||
|
def company_recycling_ratio(self, value):
|
||||||
|
"""
|
||||||
|
Set material company recycling ratio
|
||||||
|
:param value: float
|
||||||
|
"""
|
||||||
|
if value is not None:
|
||||||
|
self._company_recycling_ratio = float(value)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def landfilling_ratio(self) -> Union[None, float]:
|
||||||
|
"""
|
||||||
|
Get material landfilling ratio
|
||||||
|
:return: None or float
|
||||||
|
"""
|
||||||
|
return self._landfilling_ratio
|
||||||
|
|
||||||
|
@landfilling_ratio.setter
|
||||||
|
def landfilling_ratio(self, value):
|
||||||
|
"""
|
||||||
|
Set material landfilling ratio
|
||||||
|
:param value: float
|
||||||
|
"""
|
||||||
|
if value is not None:
|
||||||
|
self._landfilling_ratio = float(value)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def cost(self) -> Union[None, float]:
|
||||||
|
"""
|
||||||
|
Get material cost
|
||||||
|
:return: None or float
|
||||||
|
"""
|
||||||
|
return self._cost
|
||||||
|
|
||||||
|
@cost.setter
|
||||||
|
def cost(self, value):
|
||||||
|
"""
|
||||||
|
Set material cost
|
||||||
|
:param value: float
|
||||||
|
"""
|
||||||
|
if value is not None:
|
||||||
|
self._cost = float(value)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def cost_unit(self) -> Union[None, str]:
|
||||||
|
"""
|
||||||
|
Get material cost unit
|
||||||
|
:return: None or string
|
||||||
|
"""
|
||||||
|
return self._cost_unit
|
||||||
|
|
||||||
|
@cost_unit.setter
|
||||||
|
def cost_unit(self, value):
|
||||||
|
"""
|
||||||
|
Set material cost unit
|
||||||
|
:param value: string
|
||||||
|
"""
|
||||||
|
if value is not None:
|
||||||
|
self._cost_unit = float(value)
|
||||||
|
|
|
@ -9,11 +9,11 @@ class Material:
|
||||||
LCA Material class
|
LCA Material class
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, material_name, material_id, type, density, density_unit, embodied_carbon, embodied_carbon_unit, recycling_ratio,
|
def __init__(self, type, material_id, material_name, density, density_unit, embodied_carbon, embodied_carbon_unit, recycling_ratio,
|
||||||
onsite_recycling_ratio, company_recycling_ratio, landfilling_ratio, cost, cost_unit):
|
onsite_recycling_ratio, company_recycling_ratio, landfilling_ratio, cost, cost_unit):
|
||||||
self._material_name = material_name
|
|
||||||
self._material_id = material_id
|
|
||||||
self._type = type
|
self._type = type
|
||||||
|
self._material_id = material_id
|
||||||
|
self._material_name = material_name
|
||||||
self._density = density
|
self._density = density
|
||||||
self._density_unit = density_unit
|
self._density_unit = density_unit
|
||||||
self._embodied_carbon = embodied_carbon
|
self._embodied_carbon = embodied_carbon
|
||||||
|
|
|
@ -429,7 +429,7 @@
|
||||||
<landfilling_ratio> 0.4 </landfilling_ratio>
|
<landfilling_ratio> 0.4 </landfilling_ratio>
|
||||||
<cost unit= "...."> .... </cost>
|
<cost unit= "...."> .... </cost>
|
||||||
</material>
|
</material>
|
||||||
<material type = "wood" id="1" name= "acrylic filler">
|
<material type = "covering" id="1" name= "acrylic filler">
|
||||||
<density unit= "ton/m3"> 1.43 </density>
|
<density unit= "ton/m3"> 1.43 </density>
|
||||||
<embodied_carbon unit= "kgCO2/ton"> 1070 </embodied_carbon>
|
<embodied_carbon unit= "kgCO2/ton"> 1070 </embodied_carbon>
|
||||||
<recycling_ratio> 0 </recycling_ratio>
|
<recycling_ratio> 0 </recycling_ratio>
|
||||||
|
@ -438,7 +438,7 @@
|
||||||
<landfilling_ratio> 1 </landfilling_ratio>
|
<landfilling_ratio> 1 </landfilling_ratio>
|
||||||
<cost unit= "...."> .... </cost>
|
<cost unit= "...."> .... </cost>
|
||||||
</material>
|
</material>
|
||||||
<material type = "wood" id="2" name= "anhydrite floor">
|
<material type = "covering" id="2" name= "anhydrite floor">
|
||||||
<density unit= "ton/m3"> 1.43 </density>
|
<density unit= "ton/m3"> 1.43 </density>
|
||||||
<embodied_carbon unit= "kgCO2/ton"> 240 </embodied_carbon>
|
<embodied_carbon unit= "kgCO2/ton"> 240 </embodied_carbon>
|
||||||
<recycling_ratio> 0 </recycling_ratio>
|
<recycling_ratio> 0 </recycling_ratio>
|
||||||
|
@ -447,7 +447,7 @@
|
||||||
<landfilling_ratio> 1 </landfilling_ratio>
|
<landfilling_ratio> 1 </landfilling_ratio>
|
||||||
<cost unit= "...."> .... </cost>
|
<cost unit= "...."> .... </cost>
|
||||||
</material>
|
</material>
|
||||||
<material type = "wood" id="3" name= "base plaster">
|
<material type = "covering" id="3" name= "base plaster">
|
||||||
<density unit= "ton/m3"> 1.43 </density>
|
<density unit= "ton/m3"> 1.43 </density>
|
||||||
<embodied_carbon unit= "kgCO2/ton"> 430 </embodied_carbon>
|
<embodied_carbon unit= "kgCO2/ton"> 430 </embodied_carbon>
|
||||||
<recycling_ratio> 0 </recycling_ratio>
|
<recycling_ratio> 0 </recycling_ratio>
|
||||||
|
@ -456,7 +456,7 @@
|
||||||
<landfilling_ratio> 1 </landfilling_ratio>
|
<landfilling_ratio> 1 </landfilling_ratio>
|
||||||
<cost unit= "...."> .... </cost>
|
<cost unit= "...."> .... </cost>
|
||||||
</material>
|
</material>
|
||||||
<material type = "wood" id="4" name= "cement cast plaster floor">
|
<material type = "covering" id="4" name= "cement cast plaster floor">
|
||||||
<density unit= "ton/m3"> 1.43 </density>
|
<density unit= "ton/m3"> 1.43 </density>
|
||||||
<embodied_carbon unit= "kgCO2/ton"> 340 </embodied_carbon>
|
<embodied_carbon unit= "kgCO2/ton"> 340 </embodied_carbon>
|
||||||
<recycling_ratio> 0 </recycling_ratio>
|
<recycling_ratio> 0 </recycling_ratio>
|
||||||
|
@ -465,7 +465,7 @@
|
||||||
<landfilling_ratio> 1 </landfilling_ratio>
|
<landfilling_ratio> 1 </landfilling_ratio>
|
||||||
<cost unit= "...."> .... </cost>
|
<cost unit= "...."> .... </cost>
|
||||||
</material>
|
</material>
|
||||||
<material type = "wood" id="5" name= "cement tile">
|
<material type = "covering" id="5" name= "cement tile">
|
||||||
<density unit= "ton/m3"> 1.2 </density>
|
<density unit= "ton/m3"> 1.2 </density>
|
||||||
<embodied_carbon unit= "kgCO2/ton"> 440 </embodied_carbon>
|
<embodied_carbon unit= "kgCO2/ton"> 440 </embodied_carbon>
|
||||||
<recycling_ratio> 0.8 </recycling_ratio>
|
<recycling_ratio> 0.8 </recycling_ratio>
|
||||||
|
@ -474,7 +474,7 @@
|
||||||
<landfilling_ratio> 0.2 </landfilling_ratio>
|
<landfilling_ratio> 0.2 </landfilling_ratio>
|
||||||
<cost unit= "...."> .... </cost>
|
<cost unit= "...."> .... </cost>
|
||||||
</material>
|
</material>
|
||||||
<material type = "wood" id="6" name= "ceramic tile">
|
<material type = "covering" id="6" name= "ceramic tile">
|
||||||
<density unit= "ton/m3"> 2.1 </density>
|
<density unit= "ton/m3"> 2.1 </density>
|
||||||
<embodied_carbon unit= "kgCO2/ton"> 1410 </embodied_carbon>
|
<embodied_carbon unit= "kgCO2/ton"> 1410 </embodied_carbon>
|
||||||
<recycling_ratio> 0.8 </recycling_ratio>
|
<recycling_ratio> 0.8 </recycling_ratio>
|
||||||
|
@ -483,7 +483,7 @@
|
||||||
<landfilling_ratio> 0.2 </landfilling_ratio>
|
<landfilling_ratio> 0.2 </landfilling_ratio>
|
||||||
<cost unit= "...."> .... </cost>
|
<cost unit= "...."> .... </cost>
|
||||||
</material>
|
</material>
|
||||||
<material type = "wood" id="7" name= "clay plaster">
|
<material type = "covering" id="7" name= "clay plaster">
|
||||||
<density unit= "ton/m3"> 1.43 </density>
|
<density unit= "ton/m3"> 1.43 </density>
|
||||||
<embodied_carbon unit= "kgCO2/ton"> 250 </embodied_carbon>
|
<embodied_carbon unit= "kgCO2/ton"> 250 </embodied_carbon>
|
||||||
<recycling_ratio> 0 </recycling_ratio>
|
<recycling_ratio> 0 </recycling_ratio>
|
||||||
|
@ -492,7 +492,7 @@
|
||||||
<landfilling_ratio> 1 </landfilling_ratio>
|
<landfilling_ratio> 1 </landfilling_ratio>
|
||||||
<cost unit= "...."> .... </cost>
|
<cost unit= "...."> .... </cost>
|
||||||
</material>
|
</material>
|
||||||
<material type = "wood" id="7" name= "fiber cement corrugated slab">
|
<material type = "covering" id="8" name= "fiber cement corrugated slab">
|
||||||
<density unit= "ton/m3"> 1.44 </density>
|
<density unit= "ton/m3"> 1.44 </density>
|
||||||
<embodied_carbon unit= "kgCO2/ton"> 1480 </embodied_carbon>
|
<embodied_carbon unit= "kgCO2/ton"> 1480 </embodied_carbon>
|
||||||
<recycling_ratio> 0.8 </recycling_ratio>
|
<recycling_ratio> 0.8 </recycling_ratio>
|
||||||
|
@ -501,7 +501,7 @@
|
||||||
<landfilling_ratio> 0.2 </landfilling_ratio>
|
<landfilling_ratio> 0.2 </landfilling_ratio>
|
||||||
<cost unit= "...."> .... </cost>
|
<cost unit= "...."> .... </cost>
|
||||||
</material>
|
</material>
|
||||||
<material type = "wood" id="7" name= "fiber cement facing tile">
|
<material type = "covering" id="9" name= "fiber cement facing tile">
|
||||||
<density unit= "ton/m3"> 1.44 </density>
|
<density unit= "ton/m3"> 1.44 </density>
|
||||||
<embodied_carbon unit= "kgCO2/ton"> 2220 </embodied_carbon>
|
<embodied_carbon unit= "kgCO2/ton"> 2220 </embodied_carbon>
|
||||||
<recycling_ratio> 0.8 </recycling_ratio>
|
<recycling_ratio> 0.8 </recycling_ratio>
|
||||||
|
@ -510,7 +510,7 @@
|
||||||
<landfilling_ratio> 0.2 </landfilling_ratio>
|
<landfilling_ratio> 0.2 </landfilling_ratio>
|
||||||
<cost unit= "...."> .... </cost>
|
<cost unit= "...."> .... </cost>
|
||||||
</material>
|
</material>
|
||||||
<material type = "wood" id="7" name= "gypsum fibreboard">
|
<material type = "wood" id="10" name= "gypsum fibreboard">
|
||||||
<density unit= "ton/m3"> 1.27 </density>
|
<density unit= "ton/m3"> 1.27 </density>
|
||||||
<embodied_carbon unit= "kgCO2/ton"> 3960 </embodied_carbon>
|
<embodied_carbon unit= "kgCO2/ton"> 3960 </embodied_carbon>
|
||||||
<recycling_ratio> 0.8 </recycling_ratio>
|
<recycling_ratio> 0.8 </recycling_ratio>
|
||||||
|
@ -519,7 +519,7 @@
|
||||||
<landfilling_ratio> 0.2 </landfilling_ratio>
|
<landfilling_ratio> 0.2 </landfilling_ratio>
|
||||||
<cost unit= "...."> .... </cost>
|
<cost unit= "...."> .... </cost>
|
||||||
</material>
|
</material>
|
||||||
<material type = "wood" id="7" name= "gypsum plaster board">
|
<material type = "covering" id="11" name= "gypsum plaster board">
|
||||||
<density unit= "ton/m3"> 1.15 </density>
|
<density unit= "ton/m3"> 1.15 </density>
|
||||||
<embodied_carbon unit= "kgCO2/ton"> 760 </embodied_carbon>
|
<embodied_carbon unit= "kgCO2/ton"> 760 </embodied_carbon>
|
||||||
<recycling_ratio> 0.8 </recycling_ratio>
|
<recycling_ratio> 0.8 </recycling_ratio>
|
||||||
|
|
|
@ -5,7 +5,7 @@ Copyright © 2020 Project Author Atiya
|
||||||
"""
|
"""
|
||||||
import xmltodict
|
import xmltodict
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from city_model_structure.material import Material
|
from city_model_structure.building_demand.material import Material
|
||||||
|
|
||||||
class LcaMaterial:
|
class LcaMaterial:
|
||||||
def __init__(self, city, base_path):
|
def __init__(self, city, base_path):
|
||||||
|
@ -25,11 +25,10 @@ class LcaMaterial:
|
||||||
# vehicle['fuel_consumption_rate']['@unit'], vehicle['carbon_emission_factor']['#text'],
|
# vehicle['fuel_consumption_rate']['@unit'], vehicle['carbon_emission_factor']['#text'],
|
||||||
# vehicle['carbon_emission_factor']['@unit']))
|
# vehicle['carbon_emission_factor']['@unit']))
|
||||||
for material in self._lca["library"]["building_materials"]['material']:
|
for material in self._lca["library"]["building_materials"]['material']:
|
||||||
material_name = "material"
|
self._city.materials.append(Material(material['@type'], material['@id'], material['@name'], material['density']['#text'],
|
||||||
self._city.materials.append(Material(material['@type'], material['@id'], material['@name'], material['density']['#text'], material['density']['@unit'],
|
material['density']['@unit'], material['embodied_carbon']['#text'], material['embodied_carbon']['@unit'],
|
||||||
material['embodied_carbon']['#text'], material['embodied_carbon']['@unit'], material['recycling_ratio'],
|
material['recycling_ratio'], material['onsite_recycling_ratio'], material['company_recycling_ratio'],
|
||||||
material['onsite_recycling_ratio'], material['company_recycling_ratio'], material['landfilling_ratio'],
|
material['landfilling_ratio'], material['cost']['#text'], material['cost']['@unit']))
|
||||||
material['cost']['#text'], material['cost']['@unit']))
|
|
||||||
# for concrete in self._lca["library"]["building_materials"]['concretes']['concrete']:
|
# for concrete in self._lca["library"]["building_materials"]['concretes']['concrete']:
|
||||||
# material_name = "concrete"
|
# material_name = "concrete"
|
||||||
# self._city.materials.append(Material(material_name, concrete['@id'], material['@type'], concrete['density']['#text'], concrete['density']['@unit'],
|
# self._city.materials.append(Material(material_name, concrete['@id'], material['@type'], concrete['density']['#text'], concrete['density']['@unit'],
|
||||||
|
|
Loading…
Reference in New Issue
Block a user