Compare commits

...

4 Commits

Author SHA1 Message Date
8dbeeaafa1 changed some units in electrical storage 2023-08-29 12:29:11 -04:00
c77b2254f1 separated storage class in three, one abstract 2023-08-29 12:26:19 -04:00
b1d42ee00b Merge remote-tracking branch 'origin/systems_catalog_improvement' into systems_catalog_improvement
# Conflicts:
#	hub/catalog_factories/data_models/energy_systems/electrical_storage_system.py
#	hub/catalog_factories/data_models/energy_systems/energy_storage_system.py
#	hub/catalog_factories/data_models/energy_systems/thermal_storage_system.py
2023-08-29 12:25:04 -04:00
6ac63adaaf separated storage class in three, one abstract 2023-08-29 12:22:06 -04:00
3 changed files with 54 additions and 63 deletions

View File

@ -1,42 +1,33 @@
""" """
Energy System catalog heat generation system Energy System catalog electrical storage system
SPDX - License - Identifier: LGPL - 3.0 - or -later SPDX - License - Identifier: LGPL - 3.0 - or -later
Copyright © 2023 Concordia CERC group Copyright © 2023 Concordia CERC group
Project Coder Saeed Ranjbar saeed.ranjbar@concordia.ca Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca
Code contributors: Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca Code contributors: Saeed Ranjbar saeed.ranjbar@concordia.ca
""" """
from __future__ import annotations
from hub.catalog_factories.data_models.energy_systems.energy_storage_system import EnergyStorageSystem from hub.catalog_factories.data_models.energy_systems.energy_storage_system import EnergyStorageSystem
class ThermalStorageSystem(EnergyStorageSystem): class ElectricalStorageSystem(EnergyStorageSystem):
""" """"
Thermal Storage system class Energy Storage System Class
""" """
def __init__(self, storage_id, name, model_name, manufacturer, storage_type, rated_output_power, def __init__(self, storage_id, name, model_name, manufacturer, storage_type, nominal_capacity, losses_ratio,
nominal_efficiency, battery_voltage, depth_of_discharge, self_discharge_rate): rated_output_power, nominal_efficiency, battery_voltage, depth_of_discharge, self_discharge_rate):
super().__init__(storage_id=storage_id, name=name, model_name=model_name,
manufacturer=manufacturer) super().__init__(storage_id, name, model_name, manufacturer, storage_type, nominal_capacity, losses_ratio)
self._storage_type = storage_type
self._rated_output_power = rated_output_power self._rated_output_power = rated_output_power
self._nominal_efficiency = nominal_efficiency self._nominal_efficiency = nominal_efficiency
self._battery_voltage = battery_voltage self._battery_voltage = battery_voltage
self._depth_of_discharge = depth_of_discharge self._depth_of_discharge = depth_of_discharge
self._self_discharge_rate = self_discharge_rate self._self_discharge_rate = self_discharge_rate
@property
def storage_type(self):
"""
Get storage type from ['lithium_ion', 'lead_acid', 'NiCd']
:return: string
"""
return self._storage_type
@property @property
def rated_output_power(self): def rated_output_power(self):
""" """
Get the rated output power of storage system in kW Get the rated output power of storage system in Watts
:return: float :return: float
""" """
return self._rated_output_power return self._rated_output_power
@ -52,7 +43,7 @@ class ThermalStorageSystem(EnergyStorageSystem):
@property @property
def battery_voltage(self): def battery_voltage(self):
""" """
Get the battery voltage in Volt Get the battery voltage in Volts
:return: float :return: float
""" """
return self._battery_voltage return self._battery_voltage
@ -81,10 +72,13 @@ class ThermalStorageSystem(EnergyStorageSystem):
'model name': self.model_name, 'model name': self.model_name,
'manufacturer': self.manufacturer, 'manufacturer': self.manufacturer,
'storage type': self.storage_type, 'storage type': self.storage_type,
'rated power [kW]': self.rated_output_power, 'nominal capacity [J]': self.nominal_capacity,
'losses-ratio [J/J]': self.losses_ratio,
'rated power [W]': self.rated_output_power,
'nominal efficiency': self.nominal_efficiency, 'nominal efficiency': self.nominal_efficiency,
'battery voltage [V]': self.battery_voltage, 'battery voltage [V]': self.battery_voltage,
'depth of discharge': self.depth_of_discharge, 'depth of discharge [%]': self.depth_of_discharge,
'self discharge rate': self.self_discharge_rate
} }
} }
return content return content

View File

@ -6,21 +6,22 @@ Project Coder Saeed Ranjbar saeed.ranjbar@concordia.ca
Code contributors: Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca Code contributors: Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca
""" """
from __future__ import annotations from abc import ABC
from hub.catalog_factories.data_models.construction.layer import Layer
class EnergyStorageSystem: class EnergyStorageSystem(ABC):
"""" """"
Energy Storage System Class Energy Storage System Class
""" """
def __init__(self, storage_id, name, model_name, manufacturer, storage_type): def __init__(self, storage_id, name, model_name, manufacturer, storage_type, nominal_capacity, losses_ratio):
self._storage_id = storage_id self._storage_id = storage_id
self._name = name self._name = name
self._model_name = model_name self._model_name = model_name
self._manufacturer = manufacturer self._manufacturer = manufacturer
self._storage_type = storage_type self._storage_type = storage_type
self._nominal_capacity = nominal_capacity
self._losses_ratio = losses_ratio
@property @property
def id(self): def id(self):
@ -57,22 +58,24 @@ class EnergyStorageSystem:
@property @property
def storage_type(self): def storage_type(self):
""" """
Get storage type from ['lithium_ion', 'sensible', 'latent'] Get storage type from ['electricity', 'thermal', 'chemical',
'lithium_ion', 'lead_acid', 'NiCd', 'sensible', 'latent']
:return: string :return: string
""" """
return self._storage_type return self._storage_type
def to_dictionary(self): @property
"""Class content to dictionary""" def nominal_capacity(self):
_layers = [] """
for _layer in self.layers: Get the nominal capacity of the storage system in Jules
_layers.append(_layer.to_dictionary()) :return: float
content = {'Storage component': { """
'storage id': self.id, return self._nominal_capacity
'name': self.name,
'model name': self.model_name, @property
'manufacturer': self.manufacturer, def losses_ratio(self):
'storage type': self.storage_type """
} Get the losses-ratio of storage system in Jules lost / Jules stored
} :return: float
return content """
return self._losses_ratio

View File

@ -1,37 +1,29 @@
""" """
Energy System catalog heat generation system Energy System catalog thermal storage system
SPDX - License - Identifier: LGPL - 3.0 - or -later SPDX - License - Identifier: LGPL - 3.0 - or -later
Copyright © 2023 Concordia CERC group Copyright © 2023 Concordia CERC group
Project Coder Saeed Ranjbar saeed.ranjbar@concordia.ca Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca
Code contributors: Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca Code contributors: Saeed Ranjbar saeed.ranjbar@concordia.ca
""" """
from __future__ import annotations
from hub.catalog_factories.data_models.construction.layer import Layer
from hub.catalog_factories.data_models.energy_systems.energy_storage_system import EnergyStorageSystem from hub.catalog_factories.data_models.energy_systems.energy_storage_system import EnergyStorageSystem
from hub.catalog_factories.data_models.construction.layer import Layer
class ThermalStorageSystem(EnergyStorageSystem): class ThermalStorageSystem(EnergyStorageSystem):
""" """"
Thermal Storage system class Energy Storage System Class
""" """
def __init__(self, storage_id, name, model_name, manufacturer, storage_type, volume, height, layers, def __init__(self, storage_id, name, model_name, manufacturer, storage_type, nominal_capacity, losses_ratio,
maximum_operating_temperature): volume, height, layers, maximum_operating_temperature):
super().__init__(storage_id=storage_id, name=name, model_name=model_name,
manufacturer=manufacturer, storage_type=storage_type) super().__init__(storage_id, name, model_name, manufacturer, storage_type, nominal_capacity, losses_ratio)
self._volume = volume self._volume = volume
self._height = height self._height = height
self._layers = layers self._layers = layers
self._maximum_operating_temperature = maximum_operating_temperature self._maximum_operating_temperature = maximum_operating_temperature
@property
def storage_type(self):
"""
Get storage type from ['sensible', 'latent']
:return: string
"""
return self._storage_type
@property @property
def volume(self): def volume(self):
""" """
@ -75,7 +67,9 @@ class ThermalStorageSystem(EnergyStorageSystem):
'model name': self.model_name, 'model name': self.model_name,
'manufacturer': self.manufacturer, 'manufacturer': self.manufacturer,
'storage type': self.storage_type, 'storage type': self.storage_type,
'volume [m3]': self.physical_volume, 'nominal capacity [J]': self.nominal_capacity,
'losses-ratio [J/J]': self.losses_ratio,
'volume [m3]': self.volume,
'height [m]': self.height, 'height [m]': self.height,
'layers': _layers, 'layers': _layers,
'maximum operating temperature [Celsius]': self.maximum_operating_temperature 'maximum operating temperature [Celsius]': self.maximum_operating_temperature