forked from s_ranjbar/city_retrofit
I completed the generation_system.py
Created generic_storage_system.py, thermal_storage_system.py, and electrical_storage_system.py and added them to energy_system.py and generic_energy_system.py
This commit is contained in:
parent
41cf280aab
commit
cb3e100fd4
|
@ -0,0 +1,155 @@
|
|||
"""
|
||||
Energy System catalog heat generation 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
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from hub.city_model_structure.energy_systems.generic_storage_system import GenericStorageSystem
|
||||
|
||||
|
||||
|
||||
class ElectricalStorageSystem:
|
||||
def __init__(self):
|
||||
self._model_name = None
|
||||
self._manufacturer = None
|
||||
self._generic_storage_system = None
|
||||
self._rated_output_power = None
|
||||
self._nominal_efficiency = None
|
||||
self._battery_voltage = None
|
||||
self._depth_of_discharge = None
|
||||
self._self_discharge_rate = None
|
||||
|
||||
@property
|
||||
def model_name(self):
|
||||
"""
|
||||
Get the model name
|
||||
:return: string
|
||||
"""
|
||||
return self._model_name
|
||||
|
||||
@model_name.setter
|
||||
def model_name(self, value):
|
||||
"""
|
||||
Set the model name
|
||||
:return: string
|
||||
"""
|
||||
self._model_name = value
|
||||
|
||||
@property
|
||||
def manufacturer(self):
|
||||
"""
|
||||
Get the manufacturer name
|
||||
:return: string
|
||||
"""
|
||||
return self._manufacturer
|
||||
|
||||
@manufacturer.setter
|
||||
def manufacturer(self, value):
|
||||
"""
|
||||
Set the manufacturer name
|
||||
:return: string
|
||||
"""
|
||||
self._manufacturer = value
|
||||
|
||||
@property
|
||||
def generic_storage_system(self) -> GenericStorageSystem:
|
||||
"""
|
||||
Get associated generic_storage_system
|
||||
:return: GenericStorageSystem
|
||||
"""
|
||||
return self._generic_storage_system
|
||||
|
||||
@generic_storage_system.setter
|
||||
def generic_storage_system(self, value):
|
||||
"""
|
||||
Set associated generic_storage_system
|
||||
:param value: GenericStorageSystem
|
||||
"""
|
||||
self._generic_storage_system = value
|
||||
|
||||
@property
|
||||
def rated_output_power(self):
|
||||
"""
|
||||
Get the rated output power in Watts
|
||||
:return: float
|
||||
"""
|
||||
return self._rated_output_power
|
||||
|
||||
@rated_output_power.setter
|
||||
def rated_output_power(self, value):
|
||||
"""
|
||||
Set the rated output power in Watts
|
||||
:return: float
|
||||
"""
|
||||
self._rated_output_power = value
|
||||
|
||||
@property
|
||||
def nominal_efficiency(self):
|
||||
"""
|
||||
Get the nominal efficiency
|
||||
:return: float
|
||||
"""
|
||||
return self._nominal_efficiency
|
||||
|
||||
@nominal_efficiency.setter
|
||||
def nominal_efficiency(self, value):
|
||||
"""
|
||||
Set the nominal efficiency
|
||||
:return: float
|
||||
"""
|
||||
self._nominal_efficiency = value
|
||||
|
||||
@property
|
||||
def battery_voltage(self):
|
||||
"""
|
||||
Get the battery voltage in Volts
|
||||
:return: float
|
||||
"""
|
||||
return self._battery_voltage
|
||||
|
||||
@battery_voltage.setter
|
||||
def battery_voltage(self, value):
|
||||
"""
|
||||
Get the battery voltage in Volts
|
||||
:return: float
|
||||
"""
|
||||
self._battery_voltage = value
|
||||
|
||||
@property
|
||||
def depth_of_discharge(self):
|
||||
"""
|
||||
Get the depth of discharge as a percentage
|
||||
:return: float
|
||||
"""
|
||||
return self._depth_of_discharge
|
||||
|
||||
@depth_of_discharge.setter
|
||||
def depth_of_discharge(self, value):
|
||||
"""
|
||||
Set the depth of discharge as a percentage
|
||||
:return: float
|
||||
"""
|
||||
self._depth_of_discharge = value
|
||||
|
||||
@property
|
||||
def self_discharge_rate(self):
|
||||
"""
|
||||
Get the self discharge rate of battery as a percentage
|
||||
:return: float
|
||||
"""
|
||||
return self._self_discharge_rate
|
||||
|
||||
@self_discharge_rate.setter
|
||||
def self_discharge_rate(self, value):
|
||||
"""
|
||||
Get the self discharge rate of battery as a percentage
|
||||
:return: float
|
||||
"""
|
||||
self._self_discharge_rate = value
|
||||
|
||||
|
||||
|
|
@ -11,6 +11,8 @@ from hub.city_model_structure.energy_systems.generation_system import Generation
|
|||
from hub.city_model_structure.energy_systems.distribution_system import DistributionSystem
|
||||
from hub.city_model_structure.energy_systems.emission_system import EmissionSystem
|
||||
from hub.city_model_structure.energy_systems.control_system import ControlSystem
|
||||
from hub.city_model_structure.energy_systems.thermal_storage_system import ThermalStorageSystem
|
||||
from hub.city_model_structure.energy_systems.electrical_storage_system import ElectricalStorageSystem
|
||||
from hub.city_model_structure.city_object import CityObject
|
||||
|
||||
|
||||
|
@ -26,6 +28,7 @@ class EnergySystem:
|
|||
self._emission_system = None
|
||||
self._connected_city_objects = None
|
||||
self._control_system = None
|
||||
self._energy_storage_system = None
|
||||
|
||||
@property
|
||||
def name(self):
|
||||
|
@ -138,3 +141,19 @@ class EnergySystem:
|
|||
:param value: ControlSystem
|
||||
"""
|
||||
self._control_system = value
|
||||
|
||||
@property
|
||||
def energy_storage_system(self) -> Union[None, List[ThermalStorageSystem], List[ElectricalStorageSystem]]:
|
||||
"""
|
||||
Get energy storage systems
|
||||
:return: [EnergyStorageSystem]
|
||||
"""
|
||||
return self._energy_storage_system
|
||||
|
||||
@energy_storage_system.setter
|
||||
def energy_storage_system(self, value):
|
||||
"""
|
||||
Set storage system
|
||||
:param value: [EnergyStorageSystem]
|
||||
"""
|
||||
self._energy_storage_system = value
|
||||
|
|
|
@ -125,3 +125,100 @@ class GenerationSystem:
|
|||
:param value: GenerationSystem
|
||||
"""
|
||||
self._auxiliary_equipment = value
|
||||
|
||||
@property
|
||||
def model_name(self):
|
||||
"""
|
||||
Get the model name
|
||||
:return: string
|
||||
"""
|
||||
return self._model_name
|
||||
|
||||
@model_name.setter
|
||||
def model_name(self, value):
|
||||
"""
|
||||
Set the model name
|
||||
:return: string
|
||||
"""
|
||||
self._model_name = value
|
||||
|
||||
@property
|
||||
def manufacturer(self):
|
||||
"""
|
||||
Get the manufacturer name
|
||||
:return: string
|
||||
"""
|
||||
return self._manufacturer
|
||||
|
||||
@manufacturer.setter
|
||||
def manufacturer(self, value):
|
||||
"""
|
||||
Set the manufacturer name
|
||||
:return: string
|
||||
"""
|
||||
self._manufacturer = value
|
||||
|
||||
@property
|
||||
def maximum_heat_output(self):
|
||||
"""
|
||||
Get maximum heat output in W
|
||||
:return: float
|
||||
"""
|
||||
return self._maximum_heat_output
|
||||
|
||||
@maximum_heat_output.setter
|
||||
def maximum_heat_output(self, value):
|
||||
"""
|
||||
Set maximum heat output in W
|
||||
:return: float
|
||||
"""
|
||||
self._maximum_heat_output = value
|
||||
|
||||
@property
|
||||
def minimum_heat_output(self):
|
||||
"""
|
||||
Get minimum heat output in W
|
||||
:return: float
|
||||
"""
|
||||
return self._minimum_heat_output
|
||||
|
||||
@minimum_heat_output.setter
|
||||
def minimum_heat_output(self, value):
|
||||
"""
|
||||
Set minimum heat output in W
|
||||
:return: float
|
||||
"""
|
||||
self._minimum_heat_output = value
|
||||
|
||||
@property
|
||||
def maximum_cooling_output(self):
|
||||
"""
|
||||
Get maximum cooling output in W
|
||||
:return: float
|
||||
"""
|
||||
return self._maximum_cooling_output
|
||||
|
||||
@maximum_cooling_output.setter
|
||||
def maximum_cooling_output(self, value):
|
||||
"""
|
||||
Set maximum cooling output in W
|
||||
:return: float
|
||||
"""
|
||||
self._maximum_cooling_output = value
|
||||
|
||||
@property
|
||||
def minimum_cooling_output(self):
|
||||
"""
|
||||
Get minimum cooling output in W
|
||||
:return: float
|
||||
"""
|
||||
return self._minimum_cooling_output
|
||||
|
||||
@minimum_cooling_output.setter
|
||||
def minimum_cooling_output(self, value):
|
||||
"""
|
||||
Set minimum cooling output in W
|
||||
:return: float
|
||||
"""
|
||||
self._minimum_cooling_output = value
|
||||
|
||||
|
|
|
@ -5,12 +5,12 @@ Copyright © 2023 Concordia CERC group
|
|||
Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca
|
||||
"""
|
||||
|
||||
from typing import Union
|
||||
from typing import Union, List
|
||||
|
||||
from hub.city_model_structure.energy_systems.generic_distribution_system import GenericDistributionSystem
|
||||
from hub.city_model_structure.energy_systems.generic_emission_system import GenericEmissionSystem
|
||||
from hub.city_model_structure.energy_systems.generic_generation_system import GenericGenerationSystem
|
||||
|
||||
from hub.city_model_structure.energy_systems.generic_storage_system import GenericStorageSystem
|
||||
|
||||
class GenericEnergySystem:
|
||||
"""
|
||||
|
@ -23,6 +23,8 @@ class GenericEnergySystem:
|
|||
self._distribution_system = None
|
||||
self._emission_system = None
|
||||
self._connected_city_objects = None
|
||||
self._energy_storage_system = None
|
||||
|
||||
|
||||
@property
|
||||
def name(self):
|
||||
|
@ -57,7 +59,7 @@ class GenericEnergySystem:
|
|||
self._demand_types = value
|
||||
|
||||
@property
|
||||
def generation_system(self) -> GenericGenerationSystem:
|
||||
def generation_system(self) -> List[GenericGenerationSystem]:
|
||||
"""
|
||||
Get generation system
|
||||
:return: GenerationSystem
|
||||
|
@ -103,3 +105,19 @@ class GenericEnergySystem:
|
|||
:param value: EmissionSystem
|
||||
"""
|
||||
self._emission_system = value
|
||||
|
||||
@property
|
||||
def energy_storage_system(self) -> Union[None, GenericStorageSystem]:
|
||||
"""
|
||||
Get storage system
|
||||
:return: EnergyStorageSystem
|
||||
"""
|
||||
return self._energy_storage_system
|
||||
|
||||
@energy_storage_system.setter
|
||||
def energy_storage_system(self, value):
|
||||
"""
|
||||
Set storage system
|
||||
:return: EnergyStorageSystem
|
||||
"""
|
||||
self._energy_storage_system = value
|
||||
|
|
|
@ -0,0 +1,65 @@
|
|||
"""
|
||||
Energy System catalog heat generation 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
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
class GenericStorageSystem:
|
||||
def __init__(self):
|
||||
self._storage_type = None
|
||||
self._nominal_capacity = None
|
||||
self._losses_ratio = None
|
||||
|
||||
@property
|
||||
def storage_type(self):
|
||||
"""
|
||||
Get the type of storage system from [sensible, latent, lithium_ion, NiCd, lead_acid]
|
||||
:return: string
|
||||
"""
|
||||
return self._storage_type
|
||||
|
||||
@storage_type.setter
|
||||
def storage_type(self, value):
|
||||
"""
|
||||
Set the type of storage system from [sensible, latent, lithium_ion, NiCd, lead_acid]
|
||||
:return: string
|
||||
"""
|
||||
self._storage_type = value
|
||||
|
||||
@property
|
||||
def nominal_capacity(self):
|
||||
"""
|
||||
Get the nominal capacity of storage systems in Jules
|
||||
:return: float
|
||||
"""
|
||||
return self._nominal_capacity
|
||||
|
||||
@nominal_capacity.setter
|
||||
def nominal_capacity(self, value):
|
||||
"""
|
||||
Set the nominal capacity of storage systems in Jules
|
||||
:return: float
|
||||
"""
|
||||
self._nominal_capacity = value
|
||||
|
||||
@property
|
||||
def losses_ratio(self):
|
||||
"""
|
||||
Get the losses-ratio of storage system in Jules lost / Jules stored
|
||||
:return: float
|
||||
"""
|
||||
return self._losses_ratio
|
||||
|
||||
@losses_ratio.setter
|
||||
def losses_ratio(self, value):
|
||||
"""
|
||||
Set the losses-ratio of storage system in Jules lost / Jules stored
|
||||
:return: float
|
||||
"""
|
||||
self._losses_ratio = value
|
||||
|
|
@ -0,0 +1,136 @@
|
|||
"""
|
||||
Energy System catalog heat generation 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
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
from hub.city_model_structure.energy_systems.generic_storage_system import GenericStorageSystem
|
||||
from hub.city_model_structure.building_demand.layer import Layer
|
||||
|
||||
|
||||
class ThermalStorageSystem:
|
||||
def __init__(self):
|
||||
self._model_name = None
|
||||
self._manufacturer = None
|
||||
self._volume = None
|
||||
self._height = None
|
||||
self._layers = None
|
||||
self._maximum_operating_temperature = None
|
||||
self._generic_storage_system = None
|
||||
|
||||
@property
|
||||
def model_name(self):
|
||||
"""
|
||||
Get the model name
|
||||
:return: string
|
||||
"""
|
||||
return self._model_name
|
||||
|
||||
@model_name.setter
|
||||
def model_name(self, value):
|
||||
"""
|
||||
Set the model name
|
||||
:return: string
|
||||
"""
|
||||
self._model_name = value
|
||||
|
||||
@property
|
||||
def manufacturer(self):
|
||||
"""
|
||||
Get the manufacturer name
|
||||
:return: string
|
||||
"""
|
||||
return self._manufacturer
|
||||
|
||||
@manufacturer.setter
|
||||
def manufacturer(self, value):
|
||||
"""
|
||||
Set the manufacturer name
|
||||
:return: string
|
||||
"""
|
||||
self._manufacturer = value
|
||||
|
||||
@property
|
||||
def volume(self):
|
||||
"""
|
||||
Get the volume of thermal storage in m3
|
||||
:return: float
|
||||
"""
|
||||
return self._volume
|
||||
|
||||
@volume.setter
|
||||
def volume(self, value):
|
||||
"""
|
||||
Set the thermal storage volume in m3
|
||||
:return: float
|
||||
"""
|
||||
self._volume = value
|
||||
|
||||
@property
|
||||
def height(self):
|
||||
"""
|
||||
Get the storage height in m
|
||||
:return: float
|
||||
"""
|
||||
return self._height
|
||||
|
||||
@height.setter
|
||||
def height(self, value):
|
||||
"""
|
||||
Set the storage height in m
|
||||
:return: float
|
||||
"""
|
||||
self._height = value
|
||||
|
||||
@property
|
||||
def generic_storage_system(self) -> GenericStorageSystem:
|
||||
"""
|
||||
Get associated generic_storage_system
|
||||
:return: GenericStorageSystem
|
||||
"""
|
||||
return self._generic_storage_system
|
||||
|
||||
@generic_storage_system.setter
|
||||
def generic_storage_system(self, value):
|
||||
"""
|
||||
Set associated generic_storage_system
|
||||
:param value: GenericStorageSystem
|
||||
"""
|
||||
self._generic_storage_system = value
|
||||
|
||||
@property
|
||||
def maximum_operating_temperature(self):
|
||||
"""
|
||||
Get the storage maximum operating temperature in degree Celsius
|
||||
:return: float
|
||||
"""
|
||||
return self._maximum_operating_temperature
|
||||
|
||||
@maximum_operating_temperature.setter
|
||||
def maximum_operating_temperature(self, value):
|
||||
"""
|
||||
Set the storage maximum operating temperature in degree Celsius
|
||||
:return: float
|
||||
"""
|
||||
self._maximum_operating_temperature = value
|
||||
|
||||
@property
|
||||
def layers(self) -> [Layer]:
|
||||
"""
|
||||
Get the storage system layers
|
||||
:return: Layer
|
||||
"""
|
||||
return self._layers
|
||||
|
||||
@layers.setter
|
||||
def layers(self, value):
|
||||
"""
|
||||
Set the storage system layers
|
||||
:return: Layer
|
||||
"""
|
||||
self._layers = value
|
Loading…
Reference in New Issue
Block a user