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
Copyright © 2023 Concordia CERC group
Project Coder Saeed Ranjbar saeed.ranjbar@concordia.ca
Code contributors: Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca
Project Coder 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
class ThermalStorageSystem(EnergyStorageSystem):
"""
Thermal Storage system class
class ElectricalStorageSystem(EnergyStorageSystem):
""""
Energy Storage System Class
"""
def __init__(self, storage_id, name, model_name, manufacturer, storage_type, 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)
self._storage_type = storage_type
def __init__(self, storage_id, name, model_name, manufacturer, storage_type, nominal_capacity, losses_ratio,
rated_output_power, nominal_efficiency, battery_voltage, depth_of_discharge, self_discharge_rate):
super().__init__(storage_id, name, model_name, manufacturer, storage_type, nominal_capacity, losses_ratio)
self._rated_output_power = rated_output_power
self._nominal_efficiency = nominal_efficiency
self._battery_voltage = battery_voltage
self._depth_of_discharge = depth_of_discharge
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
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 self._rated_output_power
@ -52,7 +43,7 @@ class ThermalStorageSystem(EnergyStorageSystem):
@property
def battery_voltage(self):
"""
Get the battery voltage in Volt
Get the battery voltage in Volts
:return: float
"""
return self._battery_voltage
@ -81,10 +72,13 @@ class ThermalStorageSystem(EnergyStorageSystem):
'model name': self.model_name,
'manufacturer': self.manufacturer,
'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,
'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

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
"""
from __future__ import annotations
from hub.catalog_factories.data_models.construction.layer import Layer
from abc import ABC
class EnergyStorageSystem:
class EnergyStorageSystem(ABC):
""""
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._name = name
self._model_name = model_name
self._manufacturer = manufacturer
self._storage_type = storage_type
self._nominal_capacity = nominal_capacity
self._losses_ratio = losses_ratio
@property
def id(self):
@ -57,22 +58,24 @@ class EnergyStorageSystem:
@property
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 self._storage_type
def to_dictionary(self):
"""Class content to dictionary"""
_layers = []
for _layer in self.layers:
_layers.append(_layer.to_dictionary())
content = {'Storage component': {
'storage id': self.id,
'name': self.name,
'model name': self.model_name,
'manufacturer': self.manufacturer,
'storage type': self.storage_type
}
}
return content
@property
def nominal_capacity(self):
"""
Get the nominal capacity of the storage system in Jules
:return: float
"""
return self._nominal_capacity
@property
def losses_ratio(self):
"""
Get the losses-ratio of storage system in Jules lost / Jules stored
:return: float
"""
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
Copyright © 2023 Concordia CERC group
Project Coder Saeed Ranjbar saeed.ranjbar@concordia.ca
Code contributors: Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca
Project Coder 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.construction.layer import Layer
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,
maximum_operating_temperature):
super().__init__(storage_id=storage_id, name=name, model_name=model_name,
manufacturer=manufacturer, storage_type=storage_type)
def __init__(self, storage_id, name, model_name, manufacturer, storage_type, nominal_capacity, losses_ratio,
volume, height, layers, maximum_operating_temperature):
super().__init__(storage_id, name, model_name, manufacturer, storage_type, nominal_capacity, losses_ratio)
self._volume = volume
self._height = height
self._layers = layers
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
def volume(self):
"""
@ -75,7 +67,9 @@ class ThermalStorageSystem(EnergyStorageSystem):
'model name': self.model_name,
'manufacturer': self.manufacturer,
'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,
'layers': _layers,
'maximum operating temperature [Celsius]': self.maximum_operating_temperature