157 lines
3.1 KiB
Python
157 lines
3.1 KiB
Python
|
"""
|
||
|
Material module
|
||
|
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
||
|
Copyright © 2020 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca
|
||
|
"""
|
||
|
|
||
|
|
||
|
class Material:
|
||
|
"""
|
||
|
Material class
|
||
|
"""
|
||
|
def __init__(self):
|
||
|
self._conductivity = None
|
||
|
self._specific_heat = None
|
||
|
self._density = None
|
||
|
self._solar_absorptance = None
|
||
|
self._thermal_absorptance = None
|
||
|
self._visible_absorptance = None
|
||
|
self._no_mass = False
|
||
|
self._thermal_resistance = None
|
||
|
|
||
|
@property
|
||
|
def conductivity(self):
|
||
|
"""
|
||
|
Get material conductivity in W/mK
|
||
|
:return: float
|
||
|
"""
|
||
|
return self._conductivity
|
||
|
|
||
|
@conductivity.setter
|
||
|
def conductivity(self, value):
|
||
|
"""
|
||
|
Set material conductivity in W/mK
|
||
|
:param value: float
|
||
|
:return: None
|
||
|
"""
|
||
|
self._conductivity = value
|
||
|
|
||
|
@property
|
||
|
def specific_heat(self):
|
||
|
"""
|
||
|
Get material conductivity in J/kgK
|
||
|
:return: float
|
||
|
"""
|
||
|
return self._specific_heat
|
||
|
|
||
|
@specific_heat.setter
|
||
|
def specific_heat(self, value):
|
||
|
"""
|
||
|
Get material conductivity in J/kgK
|
||
|
:param value: float
|
||
|
:return: None
|
||
|
"""
|
||
|
self._specific_heat = value
|
||
|
|
||
|
@property
|
||
|
def density(self):
|
||
|
"""
|
||
|
Get material density in kg/m3
|
||
|
:return: float
|
||
|
"""
|
||
|
return self._density
|
||
|
|
||
|
@density.setter
|
||
|
def density(self, value):
|
||
|
"""
|
||
|
Set material density in kg/m3
|
||
|
:param value: float
|
||
|
:return: None
|
||
|
"""
|
||
|
self._density = value
|
||
|
|
||
|
@property
|
||
|
def solar_absorptance(self):
|
||
|
"""
|
||
|
Get material solar absorptance
|
||
|
:return: float
|
||
|
"""
|
||
|
return self._solar_absorptance
|
||
|
|
||
|
@solar_absorptance.setter
|
||
|
def solar_absorptance(self, value):
|
||
|
"""
|
||
|
Set material solar absorptance
|
||
|
:param value: float
|
||
|
:return: None
|
||
|
"""
|
||
|
self._solar_absorptance = value
|
||
|
|
||
|
@property
|
||
|
def thermal_absorptance(self):
|
||
|
"""
|
||
|
Get material thermal absorptance
|
||
|
:return: float
|
||
|
"""
|
||
|
return self._thermal_absorptance
|
||
|
|
||
|
@thermal_absorptance.setter
|
||
|
def thermal_absorptance(self, value):
|
||
|
"""
|
||
|
Set material thermal absorptance
|
||
|
:param value: float
|
||
|
:return: None
|
||
|
"""
|
||
|
self._thermal_absorptance = value
|
||
|
|
||
|
@property
|
||
|
def visible_absorptance(self):
|
||
|
"""
|
||
|
Get material visible absorptance
|
||
|
:return: float
|
||
|
"""
|
||
|
return self._visible_absorptance
|
||
|
|
||
|
@visible_absorptance.setter
|
||
|
def visible_absorptance(self, value):
|
||
|
"""
|
||
|
Set material visible absorptance
|
||
|
:param value: float
|
||
|
:return: None
|
||
|
"""
|
||
|
self._visible_absorptance = value
|
||
|
|
||
|
@property
|
||
|
def no_mass(self):
|
||
|
"""
|
||
|
Get material no mass flag
|
||
|
:return: Boolean
|
||
|
"""
|
||
|
return self._no_mass
|
||
|
|
||
|
@no_mass.setter
|
||
|
def no_mass(self, value):
|
||
|
"""
|
||
|
Set material no mass flag
|
||
|
:param value: Boolean
|
||
|
:return: None
|
||
|
"""
|
||
|
self._no_mass = value
|
||
|
|
||
|
@property
|
||
|
def thermal_resistance(self):
|
||
|
"""
|
||
|
Get material thermal resistance in m2K/W
|
||
|
:return: float
|
||
|
"""
|
||
|
return self._thermal_resistance
|
||
|
|
||
|
@thermal_resistance.setter
|
||
|
def thermal_resistance(self, value):
|
||
|
"""
|
||
|
Set material thermal resistance in m2K/W
|
||
|
:param value: float
|
||
|
:return: None
|
||
|
"""
|
||
|
self._thermal_resistance = value
|