diff --git a/hub/catalog_factories/data_models/energy_systems/energy_storage_system.py b/hub/catalog_factories/data_models/energy_systems/energy_storage_system.py index 7ac5d7d0..c84e6706 100644 --- a/hub/catalog_factories/data_models/energy_systems/energy_storage_system.py +++ b/hub/catalog_factories/data_models/energy_systems/energy_storage_system.py @@ -18,9 +18,8 @@ class EnergyStorageSystem: """ def __init__(self, model_name, manufacturer, storage_type, volume, rated_output_power, - nominal_efficiency, battery_voltage, depth_of_discharge, self_discharge_rate, diameter, - storage_material, storage_thickness, material_conductivity, insulation_material, insulation_thickness, - insulation_conductivity, maximum_operating_temperature): + nominal_efficiency, battery_voltage, depth_of_discharge, self_discharge_rate, diameter, layers + , maximum_operating_temperature): self._model_name = model_name self._manufacturer = manufacturer self._storage_type = storage_type @@ -31,12 +30,7 @@ class EnergyStorageSystem: self._depth_of_discharge = depth_of_discharge self._self_discharge_rate = self_discharge_rate self._diameter = diameter - self._storage_material = storage_material - self._storage_thickness = storage_thickness - self._material_conductivity = material_conductivity - self._insulation_material = insulation_material - self._insulation_thickness = insulation_thickness - self._insulation_conductivity = insulation_conductivity + self._layers = layers self._maximum_operating_temperature = maximum_operating_temperature @property @@ -120,52 +114,12 @@ class EnergyStorageSystem: return self._diameter @property - def storage_material(self): + def layers(self) -> [Layer]: """ - Get the name of the storage system material - :return: string + Get construction layers + :return: [layer] """ - return self._storage_material - - @property - def storage_thickness(self): - """ - Get the thickness of the storage system in meters - :return: float - """ - return self._storage_thickness - - @property - def material_conductivity(self): - """ - Get the thermal conductivity of the storage system material in W/(m.K) - :return: float - """ - return self._material_conductivity - - @property - def insulation_material(self): - """ - Get the name of the material used as insulation - :return: string - """ - return self._insulation_material - - @property - def insulation_thickness(self): - """ - Get the thickness of the insulation used for the storage system in meters - :return: float - """ - return self._storage_thickness - - @property - def insulation_conductivity(self): - """ - Get the thickness of the insulation used for the storage system in W/(m.K) - :return: float - """ - return self._insulation_conductivity + return self._layers @property def maximum_operating_temperature(self): @@ -177,6 +131,9 @@ class EnergyStorageSystem: def to_dictionary(self): """Class content to dictionary""" + _layers = [] + for _layer in self.layers: + _layers.append(_layer.to_dictionary()) content = {'Storage component': {'model name': self.model_name, 'manufacturer': self.manufacturer, 'storage type': self.storage_type, @@ -187,12 +144,7 @@ class EnergyStorageSystem: 'depth of discharge': self.depth_of_discharge, 'self discharge rate': self.self_discharge_rate, 'diameter [m]': self.diameter, - 'storage material': self.storage_material, - 'storage thickness [m]': self.storage_thickness, - 'storage material thermal conductivity [W/m.K]': self.material_conductivity, - 'insulation material': self.insulation_material, - 'insulation thickness[m]': self.insulation_thickness, - 'insulation thermal conductivity [W/m.K]': self.insulation_conductivity, + 'layers': _layers, 'maximum operating temperature [Celsius]': self.maximum_operating_temperature } }