Add features to the Material
This commit is contained in:
parent
c36ce1b83a
commit
e474541201
|
@ -3,6 +3,8 @@ Construction catalog material
|
||||||
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
||||||
Copyright © 2022 Concordia CERC group
|
Copyright © 2022 Concordia CERC group
|
||||||
Project Coder Guille Gutierrez guillermo.gutierrezmorote@concordia.ca
|
Project Coder Guille Gutierrez guillermo.gutierrezmorote@concordia.ca
|
||||||
|
Code contributors: Alireza Adli alireza.adli@concordia.ca
|
||||||
|
Mohammad Reza Seyedabadi mohammad.seyedabadi@mail.concordia.ca
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
@ -15,6 +17,13 @@ class Material:
|
||||||
solar_absorptance,
|
solar_absorptance,
|
||||||
thermal_absorptance,
|
thermal_absorptance,
|
||||||
visible_absorptance,
|
visible_absorptance,
|
||||||
|
density_unit,
|
||||||
|
embodied_carbon,
|
||||||
|
embodied_carbon_unit,
|
||||||
|
recycling_ratio,
|
||||||
|
company_recycling_ratio,
|
||||||
|
onsite_recycling_ratio,
|
||||||
|
landfilling_ratio,
|
||||||
no_mass=False,
|
no_mass=False,
|
||||||
thermal_resistance=None,
|
thermal_resistance=None,
|
||||||
conductivity=None,
|
conductivity=None,
|
||||||
|
@ -29,7 +38,14 @@ class Material:
|
||||||
self._thermal_resistance = thermal_resistance
|
self._thermal_resistance = thermal_resistance
|
||||||
self._conductivity = conductivity
|
self._conductivity = conductivity
|
||||||
self._density = density
|
self._density = density
|
||||||
|
self._density_unit = density_unit
|
||||||
self._specific_heat = specific_heat
|
self._specific_heat = specific_heat
|
||||||
|
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._embodied_carbon = embodied_carbon
|
||||||
|
self._embodied_carbon_unit = embodied_carbon_unit
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def id(self):
|
def id(self):
|
||||||
|
@ -71,6 +87,14 @@ class Material:
|
||||||
"""
|
"""
|
||||||
return self._density
|
return self._density
|
||||||
|
|
||||||
|
@property
|
||||||
|
def density_unit(self):
|
||||||
|
"""
|
||||||
|
Get material density unit in kg/m3
|
||||||
|
:return: str
|
||||||
|
"""
|
||||||
|
return self._density_unit
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def solar_absorptance(self):
|
def solar_absorptance(self):
|
||||||
"""
|
"""
|
||||||
|
@ -111,18 +135,73 @@ class Material:
|
||||||
"""
|
"""
|
||||||
return self._thermal_resistance
|
return self._thermal_resistance
|
||||||
|
|
||||||
|
@property
|
||||||
|
def recycling_ratio(self):
|
||||||
|
"""
|
||||||
|
Get recycling ratio in %
|
||||||
|
:return: float
|
||||||
|
"""
|
||||||
|
return self._recycling_ratio
|
||||||
|
|
||||||
|
@property
|
||||||
|
def onsite_recycling_ratio(self):
|
||||||
|
"""
|
||||||
|
Get onsite recycling ratio in %
|
||||||
|
:return: float
|
||||||
|
"""
|
||||||
|
return self._onsite_recycling_ratio
|
||||||
|
|
||||||
|
@property
|
||||||
|
def company_recycling_ratio(self):
|
||||||
|
"""
|
||||||
|
Get company recycling ratio in %
|
||||||
|
:return: float
|
||||||
|
"""
|
||||||
|
return self._company_recycling_ratio
|
||||||
|
|
||||||
|
@property
|
||||||
|
def landfilling_ratio(self):
|
||||||
|
"""
|
||||||
|
Get landfilling ratio in %
|
||||||
|
:return: float
|
||||||
|
"""
|
||||||
|
return self._landfilling_ratio
|
||||||
|
|
||||||
|
@property
|
||||||
|
def embodied_carbon(self):
|
||||||
|
"""
|
||||||
|
Get embodied carbon in kg
|
||||||
|
:return: float
|
||||||
|
"""
|
||||||
|
return self._embodied_carbon
|
||||||
|
|
||||||
|
@property
|
||||||
|
def embodied_carbon_unit(self):
|
||||||
|
"""
|
||||||
|
Get embodied carbon unit in kg_co2_eq/kg_material
|
||||||
|
:return: str
|
||||||
|
"""
|
||||||
|
return self._embodied_carbon_unit
|
||||||
|
|
||||||
def to_dictionary(self):
|
def to_dictionary(self):
|
||||||
"""Class content to dictionary"""
|
"""Class content to dictionary"""
|
||||||
content = {'Material': {'id': self.id,
|
content = {'Material': {'id': self.id,
|
||||||
'name': self.name,
|
'name': self.name,
|
||||||
'is no-mass': self.no_mass,
|
'is no-mass': self.no_mass,
|
||||||
'density [kg/m3]': self.density,
|
'density [kg/m3]': self.density,
|
||||||
|
'density unit [kg/m3]': self.density_unit,
|
||||||
'specific heat [J/kgK]': self.specific_heat,
|
'specific heat [J/kgK]': self.specific_heat,
|
||||||
'conductivity [W/mK]': self.conductivity,
|
'conductivity [W/mK]': self.conductivity,
|
||||||
'thermal resistance [m2K/W]': self.thermal_resistance,
|
'thermal resistance [m2K/W]': self.thermal_resistance,
|
||||||
'solar absorptance': self.solar_absorptance,
|
'solar absorptance': self.solar_absorptance,
|
||||||
'thermal absorptance': self.thermal_absorptance,
|
'thermal absorptance': self.thermal_absorptance,
|
||||||
'visible absorptance': self.visible_absorptance
|
'visible absorptance': self.visible_absorptance,
|
||||||
|
'recycling ratio': self.recycling_ratio,
|
||||||
|
'onsite recycling ratio': self.onsite_recycling_ratio,
|
||||||
|
'company recycling ratio': self.company_recycling_ratio,
|
||||||
|
'landfilling ratio': self.landfilling_ratio,
|
||||||
|
'embodied carbon': self.embodied_carbon,
|
||||||
|
'embodied carbon unit': self.embodied_carbon_unit
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return content
|
return content
|
||||||
|
|
Loading…
Reference in New Issue
Block a user