final_energy_system_model #60

Merged
g_gutierrez merged 113 commits from final_energy_system_model into main 2024-03-14 09:13:21 -04:00
3 changed files with 174 additions and 102 deletions
Showing only changes of commit 6ac63adaaf - Show all commits

View File

@ -0,0 +1,84 @@
"""
Energy System catalog electrical storage system
SPDX - License - Identifier: LGPL - 3.0 - or -later
Copyright © 2023 Concordia CERC group
Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca
Code contributors: Saeed Ranjbar saeed.ranjbar@concordia.ca
"""
from hub.catalog_factories.data_models.energy_systems.energy_storage_system import EnergyStorageSystem
class ElectricalStorageSystem(EnergyStorageSystem):
""""
Energy Storage System Class
"""
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 rated_output_power(self):
"""
Get the rated output power of storage system in kW
:return: float
"""
return self._rated_output_power
@property
def nominal_efficiency(self):
"""
Get the nominal efficiency of the storage system
:return: float
"""
return self._nominal_efficiency
@property
def battery_voltage(self):
"""
Get the battery voltage in Volt
:return: float
"""
return self._battery_voltage
@property
def depth_of_discharge(self):
"""
Get the depth of discharge as a percentage
:return: float
"""
return self._depth_of_discharge
@property
def self_discharge_rate(self):
"""
Get the self discharge rate of battery as a percentage
:return: float
"""
return self._self_discharge_rate
def to_dictionary(self):
"""Class content 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,
'nominal capacity [J]': self.nominal_capacity,
'losses-ratio [J/J]': self.losses_ratio,
'rated power [kW]': self.rated_output_power,
'nominal efficiency': self.nominal_efficiency,
'battery voltage [V]': self.battery_voltage,
'depth of discharge': self.depth_of_discharge,
'self discharge rate': self.self_discharge_rate
}
}
return content

View File

@ -6,32 +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, volume, 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, height, layers,
maximum_operating_temperature):
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._physical_volume = volume self._nominal_capacity = nominal_capacity
self._rated_output_power = rated_output_power self._losses_ratio = losses_ratio
self._nominal_efficiency = nominal_efficiency
self._battery_voltage = battery_voltage
self._depth_of_discharge = depth_of_discharge
self._self_discharge_rate = self_discharge_rate
self._height = height
self._layers = layers
self._maximum_operating_temperature = maximum_operating_temperature
@property @property
def id(self): def id(self):
@ -68,103 +58,23 @@ 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', 'sensible', 'latent']
:return: string :return: string
""" """
return self._storage_type return self._storage_type
@property @property
def physical_volume(self): def nominal_capacity(self):
""" """
Get the physical volume of the storage system in cubic meters Get the nominal capacity of the storage system in Jules
:return: float :return: float
""" """
return self._physical_volume return self._nominal_capacity
@property @property
def rated_output_power(self): def losses_ratio(self):
""" """
Get the rated output power of storage system in kW Get the losses-ratio of storage system in Jules lost / Jules stored
:return: float :return: float
""" """
return self._rated_output_power return self._losses_ratio
@property
def nominal_efficiency(self):
"""
Get the nominal efficiency of the storage system
:return: float
"""
return self._nominal_efficiency
@property
def battery_voltage(self):
"""
Get the battery voltage in Volt
:return: float
"""
return self._battery_voltage
@property
def depth_of_discharge(self):
"""
Get the depth of discharge as a percentage
:return: float
"""
return self._depth_of_discharge
@property
def self_discharge_rate(self):
"""
Get the self discharge rate of battery as a percentage
:return: float
"""
return self._self_discharge_rate
@property
def height(self):
"""
Get the diameter of the storage system in meters
:return: float
"""
return self._height
@property
def layers(self) -> [Layer]:
"""
Get construction layers
:return: [layer]
"""
return self._layers
@property
def maximum_operating_temperature(self):
"""
Get maximum operating temperature of the storage system in degree Celsius
:return: float
"""
return self._maximum_operating_temperature
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,
'physical volume [m3]': self.physical_volume,
'rated power [kW]': self.rated_output_power,
'nominal efficiency': self.nominal_efficiency,
'battery voltage [V]': self.battery_voltage,
'depth of discharge': self.depth_of_discharge,
'self discharge rate': self.self_discharge_rate,
'height [m]': self.height,
'layers': _layers,
'maximum operating temperature [Celsius]': self.maximum_operating_temperature
}
}
return content

View File

@ -0,0 +1,78 @@
"""
Energy System catalog thermal storage system
SPDX - License - Identifier: LGPL - 3.0 - or -later
Copyright © 2023 Concordia CERC group
Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca
Code contributors: Saeed Ranjbar saeed.ranjbar@concordia.ca
"""
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):
""""
Energy Storage System Class
"""
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._physical_volume = volume
self._height = height
self._layers = layers
self._maximum_operating_temperature = maximum_operating_temperature
@property
def physical_volume(self):
"""
Get the physical volume of the storage system in cubic meters
:return: float
"""
return self._physical_volume
@property
def height(self):
"""
Get the diameter of the storage system in meters
:return: float
"""
return self._height
@property
def layers(self) -> [Layer]:
"""
Get construction layers
:return: [layer]
"""
return self._layers
@property
def maximum_operating_temperature(self):
"""
Get maximum operating temperature of the storage system in degree Celsius
:return: float
"""
return self._maximum_operating_temperature
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,
'nominal capacity [J]': self.nominal_capacity,
'losses-ratio [J/J]': self.losses_ratio,
'physical volume [m3]': self.physical_volume,
'height [m]': self.height,
'layers': _layers,
'maximum operating temperature [Celsius]': self.maximum_operating_temperature
}
}
return content