half made changes in central data model for systems
This commit is contained in:
parent
1a7ad20135
commit
d94bce4174
@ -8,7 +8,6 @@ Code contributors: Saeed Ranjbar saeed.ranjbar@concordia.ca
|
||||
|
||||
from typing import Union, List, TypeVar
|
||||
|
||||
#from hub.catalog_factories.data_models.energy_systems.generation_system import GenerationSystem
|
||||
from hub.catalog_factories.data_models.energy_systems.energy_storage_system import EnergyStorageSystem
|
||||
from hub.catalog_factories.data_models.energy_systems.emission_system import EmissionSystem
|
||||
|
||||
|
@ -22,7 +22,7 @@ class PvGenerationSystem(GenerationSystem):
|
||||
super().__init__(system_id=system_id, model_name=model_name,
|
||||
manufacturer=manufacturer, fuel_type='renewable', distribution_systems=distribution_systems,
|
||||
energy_storage_systems=energy_storage_systems)
|
||||
self._system_type = 'PV'
|
||||
self._system_type = 'PV system'
|
||||
self._electricity_efficiency = electricity_efficiency
|
||||
self._nominal_electricity_output = nominal_electricity_output
|
||||
self._nominal_ambient_temperature = nominal_ambient_temperature
|
||||
|
@ -0,0 +1,65 @@
|
||||
"""
|
||||
Energy 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 abc import ABC
|
||||
|
||||
|
||||
class EnergyStorageSystem(ABC):
|
||||
"""
|
||||
Energy storage System class
|
||||
"""
|
||||
def __init__(self, generic_storage_system):
|
||||
self._generic_storage_system = generic_storage_system
|
||||
|
||||
@property
|
||||
def type_energy_stored(self):
|
||||
"""
|
||||
Get type of energy stored from ['electrical', 'thermal']
|
||||
:return: string
|
||||
"""
|
||||
return self._generic_storage_system.type_energy_stored
|
||||
|
||||
@property
|
||||
def storage_type(self):
|
||||
"""
|
||||
Get storage type
|
||||
:return: string
|
||||
"""
|
||||
return self._generic_storage_system.storage_type
|
||||
|
||||
@property
|
||||
def model_name(self):
|
||||
"""
|
||||
Get system model
|
||||
:return: string
|
||||
"""
|
||||
return self._generic_storage_system.model_name
|
||||
|
||||
@property
|
||||
def manufacturer(self):
|
||||
"""
|
||||
Get name of manufacturer
|
||||
:return: string
|
||||
"""
|
||||
return self._generic_storage_system.manufacturer
|
||||
|
||||
@property
|
||||
def nominal_capacity(self):
|
||||
"""
|
||||
Get the nominal capacity of storage systems in Jules
|
||||
:return: float
|
||||
"""
|
||||
return self._generic_storage_system.nominal_capacity
|
||||
|
||||
@property
|
||||
def losses_ratio(self):
|
||||
"""
|
||||
Get the losses-ratio of storage system in Jules lost / Jules stored
|
||||
:return: float
|
||||
"""
|
||||
return self._generic_storage_system.losses_ratio
|
@ -9,10 +9,7 @@ from typing import Union, List
|
||||
|
||||
from hub.city_model_structure.energy_systems.generation_system import GenerationSystem
|
||||
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
|
||||
|
||||
|
||||
@ -20,15 +17,12 @@ class EnergySystem:
|
||||
"""
|
||||
EnergySystem class
|
||||
"""
|
||||
def __init__(self):
|
||||
self._name = None
|
||||
self._demand_types = None
|
||||
def __init__(self, generic_energy_system):
|
||||
self._generic_energy_system = generic_energy_system
|
||||
self._generation_systems = None
|
||||
self._distribution_systems = None
|
||||
self._emission_systems = None
|
||||
self._connected_city_objects = None
|
||||
self._control_system = None
|
||||
self._energy_storage_systems = None
|
||||
|
||||
@property
|
||||
def name(self):
|
||||
@ -36,15 +30,7 @@ class EnergySystem:
|
||||
Get energy system name
|
||||
:return: str
|
||||
"""
|
||||
return self._name
|
||||
|
||||
@name.setter
|
||||
def name(self, value):
|
||||
"""
|
||||
Set energy system name
|
||||
:param value:
|
||||
"""
|
||||
self._name = value
|
||||
return self._generic_energy_system.name
|
||||
|
||||
@property
|
||||
def demand_types(self):
|
||||
@ -52,69 +38,45 @@ class EnergySystem:
|
||||
Get demand able to cover from [Heating, Cooling, Domestic Hot Water, Electricity]
|
||||
:return: [string]
|
||||
"""
|
||||
return self._demand_types
|
||||
|
||||
@demand_types.setter
|
||||
def demand_types(self, value):
|
||||
"""
|
||||
Set demand able to cover from [Heating, Cooling, Domestic Hot Water, Electricity]
|
||||
:param value: [string]
|
||||
"""
|
||||
self._demand_types = value
|
||||
return self._generic_energy_system.demand_types
|
||||
|
||||
@property
|
||||
def generation_systems(self) -> List[GenerationSystem]:
|
||||
"""
|
||||
Get generation systems
|
||||
:return: GenerationSystem
|
||||
:return: [GenerationSystem]
|
||||
"""
|
||||
return self._generation_systems
|
||||
|
||||
@generation_systems.setter
|
||||
def generation_systems(self, value):
|
||||
"""
|
||||
Set generation system
|
||||
:param value: GenerationSystem
|
||||
Set generation systems
|
||||
:param value: [GenerationSystem]
|
||||
"""
|
||||
self._generation_systems = value
|
||||
|
||||
@property
|
||||
def distribution_systems(self) -> Union[None, List[DistributionSystem]]:
|
||||
"""
|
||||
Get distribution system
|
||||
:return: DistributionSystem
|
||||
Get distribution systems
|
||||
:return: [DistributionSystem]
|
||||
"""
|
||||
return self._distribution_systems
|
||||
|
||||
@distribution_systems.setter
|
||||
def distribution_systems(self, value):
|
||||
"""
|
||||
Set distribution system
|
||||
:param value: DistributionSystem
|
||||
Set distribution systems
|
||||
:param value: [DistributionSystem]
|
||||
"""
|
||||
self._distribution_systems = value
|
||||
|
||||
@property
|
||||
def emission_systems(self) -> Union[None, List[EmissionSystem]]:
|
||||
"""
|
||||
Get emission system
|
||||
:return: EmissionSystem
|
||||
"""
|
||||
return self._emission_systems
|
||||
|
||||
@emission_systems.setter
|
||||
def emission_systems(self, value):
|
||||
"""
|
||||
Set emission system
|
||||
:param value: EmissionSystem
|
||||
"""
|
||||
self._emission_systems = value
|
||||
|
||||
@property
|
||||
def connected_city_objects(self) -> Union[None, List[CityObject]]:
|
||||
"""
|
||||
Get list of city objects that are connected to this energy system
|
||||
:return: List[CityObject]
|
||||
:return: [CityObject]
|
||||
"""
|
||||
return self._connected_city_objects
|
||||
|
||||
@ -122,7 +84,7 @@ class EnergySystem:
|
||||
def connected_city_objects(self, value):
|
||||
"""
|
||||
Set list of city objects that are connected to this energy system
|
||||
:param value: List[CityObject]
|
||||
:param value: [CityObject]
|
||||
"""
|
||||
self._connected_city_objects = value
|
||||
|
||||
@ -141,19 +103,3 @@ class EnergySystem:
|
||||
:param value: ControlSystem
|
||||
"""
|
||||
self._control_system = value
|
||||
|
||||
@property
|
||||
def energy_storage_systems(self) -> Union[None, List[ThermalStorageSystem], List[ElectricalStorageSystem]]:
|
||||
"""
|
||||
Get energy storage systems
|
||||
:return: [EnergyStorageSystem]
|
||||
"""
|
||||
return self._energy_storage_systems
|
||||
|
||||
@energy_storage_systems.setter
|
||||
def energy_storage_systems(self, value):
|
||||
"""
|
||||
Set storage system
|
||||
:param value: [EnergyStorageSystem]
|
||||
"""
|
||||
self._energy_storage_systems = value
|
||||
|
@ -6,125 +6,29 @@ Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
from typing import Union
|
||||
from abc import ABC
|
||||
from typing import Union, List
|
||||
|
||||
from hub.city_model_structure.energy_systems.generic_generation_system import GenericGenerationSystem
|
||||
from hub.city_model_structure.energy_systems.distribution_system import DistributionSystem
|
||||
from hub.city_model_structure.energy_systems.energy_storage_system import EnergyStorageSystem
|
||||
|
||||
|
||||
class GenerationSystem:
|
||||
class GenerationSystem(ABC):
|
||||
"""
|
||||
GenerationSystem class
|
||||
"""
|
||||
def __init__(self):
|
||||
self._heat_power = None
|
||||
self._cooling_power = None
|
||||
self._electricity_power = None
|
||||
self._storage_capacity = None
|
||||
self._generic_generation_system = None
|
||||
self._auxiliary_equipment = None
|
||||
self._model_name = None
|
||||
self._manufacturer = None
|
||||
self._maximum_heat_output = None
|
||||
self._minimum_heat_output = None
|
||||
self._maximum_cooling_output = None
|
||||
self._minimum_cooling_output = None
|
||||
|
||||
def __init__(self, generic_generation_system):
|
||||
self._generic_generation_system = generic_generation_system
|
||||
self._distribution_systems = None
|
||||
self._storage_systems = None
|
||||
|
||||
@property
|
||||
def generic_generation_system(self) -> GenericGenerationSystem:
|
||||
def system_type(self):
|
||||
"""
|
||||
Get associated generic_generation_system
|
||||
:return: GenericGenerationSystem
|
||||
Get type
|
||||
:return: string
|
||||
"""
|
||||
return self._generic_generation_system
|
||||
|
||||
@generic_generation_system.setter
|
||||
def generic_generation_system(self, value):
|
||||
"""
|
||||
Set associated generic_generation_system
|
||||
:param value: GenericGenerationSystem
|
||||
"""
|
||||
self._generic_generation_system = value
|
||||
|
||||
@property
|
||||
def heat_power(self):
|
||||
"""
|
||||
Get heat_power in W
|
||||
:return: float
|
||||
"""
|
||||
return self._heat_power
|
||||
|
||||
@heat_power.setter
|
||||
def heat_power(self, value):
|
||||
"""
|
||||
Set heat_power in W
|
||||
:param value: float
|
||||
"""
|
||||
self._heat_power = value
|
||||
|
||||
@property
|
||||
def cooling_power(self):
|
||||
"""
|
||||
Get cooling_power in W
|
||||
:return: float
|
||||
"""
|
||||
return self._cooling_power
|
||||
|
||||
@cooling_power.setter
|
||||
def cooling_power(self, value):
|
||||
"""
|
||||
Set cooling_power in W
|
||||
:param value: float
|
||||
"""
|
||||
self._cooling_power = value
|
||||
|
||||
@property
|
||||
def electricity_power(self):
|
||||
"""
|
||||
Get electricity_power in W
|
||||
:return: float
|
||||
"""
|
||||
return self._electricity_power
|
||||
|
||||
@electricity_power.setter
|
||||
def electricity_power(self, value):
|
||||
"""
|
||||
Set electricity_power in W
|
||||
:param value: float
|
||||
"""
|
||||
self._electricity_power = value
|
||||
|
||||
@property
|
||||
def storage_capacity(self):
|
||||
"""
|
||||
Get storage_capacity in J
|
||||
:return: float
|
||||
"""
|
||||
return self._storage_capacity
|
||||
|
||||
@storage_capacity.setter
|
||||
def storage_capacity(self, value):
|
||||
"""
|
||||
Set storage_capacity in J
|
||||
:param value: float
|
||||
"""
|
||||
self._storage_capacity = value
|
||||
|
||||
@property
|
||||
def auxiliary_equipment(self) -> Union[None, GenerationSystem]:
|
||||
"""
|
||||
Get auxiliary_equipment
|
||||
:return: GenerationSystem
|
||||
"""
|
||||
return self._auxiliary_equipment
|
||||
|
||||
@auxiliary_equipment.setter
|
||||
def auxiliary_equipment(self, value):
|
||||
"""
|
||||
Set auxiliary_equipment
|
||||
:param value: GenerationSystem
|
||||
"""
|
||||
self._auxiliary_equipment = value
|
||||
return self._generic_generation_system.system_type
|
||||
|
||||
@property
|
||||
def model_name(self):
|
||||
@ -132,15 +36,7 @@ class GenerationSystem:
|
||||
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
|
||||
return self._generic_generation_system.model_name
|
||||
|
||||
@property
|
||||
def manufacturer(self):
|
||||
@ -148,77 +44,44 @@ class GenerationSystem:
|
||||
Get the manufacturer name
|
||||
:return: string
|
||||
"""
|
||||
return self._manufacturer
|
||||
return self._generic_generation_system.manufacturer
|
||||
|
||||
@manufacturer.setter
|
||||
def manufacturer(self, value):
|
||||
@property
|
||||
def fuel_type(self):
|
||||
"""
|
||||
Set the manufacturer name
|
||||
Get fuel_type from [Renewable, Gas, Diesel, Electricity, Wood, Coal]
|
||||
:return: string
|
||||
"""
|
||||
self._manufacturer = value
|
||||
return self._generic_generation_system.fuel_type
|
||||
|
||||
@property
|
||||
def maximum_heat_output(self):
|
||||
def distribution_systems(self) -> Union[None, List[DistributionSystem]]:
|
||||
"""
|
||||
Get maximum heat output in W
|
||||
:return: float
|
||||
Get distributions systems connected to this generation system
|
||||
:return: [GenericDistributionSystem]
|
||||
"""
|
||||
return self._maximum_heat_output
|
||||
return self._distribution_systems
|
||||
|
||||
@maximum_heat_output.setter
|
||||
def maximum_heat_output(self, value):
|
||||
@distribution_systems.setter
|
||||
def distribution_systems(self, value):
|
||||
"""
|
||||
Set maximum heat output in W
|
||||
:return: float
|
||||
Set distributions systems connected to this generation system
|
||||
:param value: [DistributionSystem]
|
||||
"""
|
||||
self._maximum_heat_output = value
|
||||
self._distribution_systems = value
|
||||
|
||||
@property
|
||||
def minimum_heat_output(self):
|
||||
def storage_systems(self) -> Union[None, List[EnergyStorageSystem]]:
|
||||
"""
|
||||
Get minimum heat output in W
|
||||
:return: float
|
||||
Get energy storage systems connected to this generation system
|
||||
:return: [EnergyStorageSystem]
|
||||
"""
|
||||
return self._minimum_heat_output
|
||||
return self._storage_systems
|
||||
|
||||
@minimum_heat_output.setter
|
||||
def minimum_heat_output(self, value):
|
||||
@storage_systems.setter
|
||||
def storage_systems(self, value):
|
||||
"""
|
||||
Set minimum heat output in W
|
||||
:return: float
|
||||
Set energy storage systems connected to this generation system
|
||||
:param value: [EnergyStorageSystem]
|
||||
"""
|
||||
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
|
||||
|
||||
self._storage_systems = value
|
||||
|
@ -5,12 +5,13 @@ Copyright © 2023 Concordia CERC group
|
||||
Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca
|
||||
"""
|
||||
|
||||
from typing import Union, List
|
||||
from typing import Union, List, TypeVar
|
||||
|
||||
from hub.city_model_structure.energy_systems.generic_generation_system import GenericGenerationSystem
|
||||
from hub.city_model_structure.energy_systems.generic_emission_system import GenericEmissionSystem
|
||||
from hub.city_model_structure.energy_systems.generic_storage_system import GenericStorageSystem
|
||||
|
||||
GenericGenerationSystem = TypeVar('GenericGenerationSystem')
|
||||
|
||||
|
||||
class GenericDistributionSystem:
|
||||
"""
|
||||
|
@ -6,7 +6,6 @@ Project Coder Saeed Ranjbar saeed.ranjbar@concordia.ca
|
||||
Code contributors: Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
from abc import ABC
|
||||
|
||||
|
||||
|
@ -1,64 +0,0 @@
|
||||
"""
|
||||
heat_pump module defines a heat pump
|
||||
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
||||
Copyright © 2022 Concordia CERC group
|
||||
Project Coder Peter Yefi peteryefi@gmail.com
|
||||
"""
|
||||
from typing import List
|
||||
from pandas.core.series import Series
|
||||
|
||||
|
||||
class HeatPump:
|
||||
"""
|
||||
HeatPump class
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
self._model = None
|
||||
self._hp_monthly_fossil_consumption = None
|
||||
self._hp_monthly_electricity_demand = None
|
||||
|
||||
@property
|
||||
def model(self) -> str:
|
||||
"""
|
||||
Get model name
|
||||
:return: str
|
||||
"""
|
||||
return self._model
|
||||
|
||||
@model.setter
|
||||
def model(self, value):
|
||||
"""
|
||||
Set model (name, indicated in capacity)
|
||||
:param value: str
|
||||
"""
|
||||
if self._model is None:
|
||||
self._model = value
|
||||
|
||||
@property
|
||||
def hp_monthly_fossil_consumption(self) -> List:
|
||||
"""
|
||||
Fossil fuel consumption that results from insel simulation
|
||||
":return: []
|
||||
:return:
|
||||
"""
|
||||
return self._hp_monthly_fossil_consumption
|
||||
|
||||
@hp_monthly_fossil_consumption.setter
|
||||
def hp_monthly_fossil_consumption(self, value):
|
||||
if isinstance(value, Series):
|
||||
self._hp_monthly_fossil_consumption = value
|
||||
|
||||
@property
|
||||
def hp_monthly_electricity_demand(self) -> List:
|
||||
"""
|
||||
Electricity demand that results from insel simulation
|
||||
":return: []
|
||||
:return:
|
||||
"""
|
||||
return self._hp_monthly_electricity_demand
|
||||
|
||||
@hp_monthly_electricity_demand.setter
|
||||
def hp_monthly_electricity_demand(self, value):
|
||||
if isinstance(value, Series):
|
||||
self._hp_monthly_electricity_demand = value
|
@ -1,32 +0,0 @@
|
||||
"""
|
||||
HvacTerminalUnit module
|
||||
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
||||
Copyright © 2022 Concordia CERC group
|
||||
Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca
|
||||
"""
|
||||
from typing import Union
|
||||
|
||||
|
||||
class HvacTerminalUnit:
|
||||
"""
|
||||
HvacTerminalUnit class
|
||||
"""
|
||||
def __init__(self):
|
||||
self._type = None
|
||||
|
||||
@property
|
||||
def type(self) -> Union[None, str]:
|
||||
"""
|
||||
Get type of hvac terminal unit defined for a thermal zone
|
||||
:return: None or str
|
||||
"""
|
||||
return self._type
|
||||
|
||||
@type.setter
|
||||
def type(self, value):
|
||||
"""
|
||||
Set type of hvac terminal unit defined for a thermal zone
|
||||
:param value: str
|
||||
"""
|
||||
if value is not None:
|
||||
self._type = str(value)
|
@ -0,0 +1,263 @@
|
||||
"""
|
||||
Non PV generation system definition
|
||||
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
||||
Copyright © 2023 Concordia CERC group
|
||||
Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca
|
||||
"""
|
||||
|
||||
from typing import Union
|
||||
|
||||
from hub.city_model_structure.energy_systems.generic_generation_system import GenericGenerationSystem
|
||||
from hub.city_model_structure.energy_systems.performance_curve import PerformanceCurves
|
||||
|
||||
|
||||
class NonPvGenerationSystem(GenericGenerationSystem):
|
||||
"""
|
||||
NonPvGenerationSystem class
|
||||
"""
|
||||
def __init__(self, non_pv_generation_system):
|
||||
super().__init__()
|
||||
self._non_pv_generation_system = non_pv_generation_system
|
||||
self._heat_power = None
|
||||
self._cooling_power = None
|
||||
self._electricity_power = None
|
||||
|
||||
@property
|
||||
def heat_power(self):
|
||||
"""
|
||||
Get heat_power in W
|
||||
:return: float
|
||||
"""
|
||||
return self._heat_power
|
||||
|
||||
@heat_power.setter
|
||||
def heat_power(self, value):
|
||||
"""
|
||||
Set heat_power in W
|
||||
:param value: float
|
||||
"""
|
||||
self._heat_power = value
|
||||
|
||||
@property
|
||||
def cooling_power(self):
|
||||
"""
|
||||
Get cooling_power in W
|
||||
:return: float
|
||||
"""
|
||||
return self._cooling_power
|
||||
|
||||
@cooling_power.setter
|
||||
def cooling_power(self, value):
|
||||
"""
|
||||
Set cooling_power in W
|
||||
:param value: float
|
||||
"""
|
||||
self._cooling_power = value
|
||||
|
||||
@property
|
||||
def electricity_power(self):
|
||||
"""
|
||||
Get electricity_power in W
|
||||
:return: float
|
||||
"""
|
||||
return self._electricity_power
|
||||
|
||||
@electricity_power.setter
|
||||
def electricity_power(self, value):
|
||||
"""
|
||||
Set electricity_power in W
|
||||
:param value: float
|
||||
"""
|
||||
self._electricity_power = value
|
||||
|
||||
@property
|
||||
def nominal_heat_output(self):
|
||||
"""
|
||||
Get nominal heat output of heat generation devices in W
|
||||
:return: float
|
||||
"""
|
||||
return self._non_pv_generation_system.nominal_heat_output
|
||||
|
||||
@property
|
||||
def maximum_heat_output(self):
|
||||
"""
|
||||
Get maximum heat output of heat generation devices in W
|
||||
:return: float
|
||||
"""
|
||||
return self._non_pv_generation_system.maximum_heat_output
|
||||
|
||||
@property
|
||||
def minimum_heat_output(self):
|
||||
"""
|
||||
Get minimum heat output of heat generation devices in W
|
||||
:return: float
|
||||
"""
|
||||
return self._non_pv_generation_system.minimum_heat_output
|
||||
|
||||
@property
|
||||
def source_medium(self):
|
||||
"""
|
||||
Get source_type from [air, water, ground, district_heating, grid, on_site_electricity]
|
||||
:return: string
|
||||
"""
|
||||
return self._non_pv_generation_system.source_medium
|
||||
|
||||
@property
|
||||
def supply_medium(self):
|
||||
"""
|
||||
Get the supply medium from ['air', 'water']
|
||||
:return: string
|
||||
"""
|
||||
return self._non_pv_generation_system.supply_medium
|
||||
|
||||
@property
|
||||
def heat_efficiency(self):
|
||||
"""
|
||||
Get heat_efficiency
|
||||
:return: float
|
||||
"""
|
||||
return self._non_pv_generation_system.heat_efficiency
|
||||
|
||||
@property
|
||||
def nominal_cooling_output(self):
|
||||
"""
|
||||
Get nominal cooling output of heat generation devices in W
|
||||
:return: float
|
||||
"""
|
||||
return self._non_pv_generation_system.nominal_cooling_output
|
||||
|
||||
@property
|
||||
def maximum_cooling_output(self):
|
||||
"""
|
||||
Get maximum heat output of heat generation devices in W
|
||||
:return: float
|
||||
"""
|
||||
return self._non_pv_generation_system.maximum_cooling_output
|
||||
|
||||
@property
|
||||
def minimum_cooling_output(self):
|
||||
"""
|
||||
Get minimum heat output of heat generation devices in W
|
||||
:return: float
|
||||
"""
|
||||
return self._non_pv_generation_system.minimum_cooling_output
|
||||
|
||||
@property
|
||||
def cooling_efficiency(self):
|
||||
"""
|
||||
Get cooling_efficiency
|
||||
:return: float
|
||||
"""
|
||||
return self._non_pv_generation_system.cooling_efficiency
|
||||
|
||||
@property
|
||||
def electricity_efficiency(self):
|
||||
"""
|
||||
Get electricity_efficiency
|
||||
:return: float
|
||||
"""
|
||||
return self._non_pv_generation_system.electricity_efficiency
|
||||
|
||||
@property
|
||||
def source_temperature(self):
|
||||
"""
|
||||
Get source_temperature in degree Celsius
|
||||
:return: float
|
||||
"""
|
||||
return self._non_pv_generation_system.source_temperature
|
||||
|
||||
@property
|
||||
def source_mass_flow(self):
|
||||
"""
|
||||
Get source_mass_flow in kg/s
|
||||
:return: float
|
||||
"""
|
||||
return self._non_pv_generation_system.source_mass_flow
|
||||
|
||||
@property
|
||||
def nominal_electricity_output(self):
|
||||
"""
|
||||
Get nominal_power_output of electricity generation devices or inverters in W
|
||||
:return: float
|
||||
"""
|
||||
return self._non_pv_generation_system.nominal_electricity_output
|
||||
|
||||
@property
|
||||
def maximum_heat_supply_temperature(self):
|
||||
"""
|
||||
Get the maximum heat supply temperature in degree Celsius
|
||||
:return: float
|
||||
"""
|
||||
return self._non_pv_generation_system.maximum_heat_supply_temperature
|
||||
|
||||
@property
|
||||
def minimum_heat_supply_temperature(self):
|
||||
"""
|
||||
Get the minimum heat supply temperature in degree Celsius
|
||||
:return: float
|
||||
"""
|
||||
return self._non_pv_generation_system.minimum_heat_supply_temperature
|
||||
|
||||
@property
|
||||
def maximum_cooling_supply_temperature(self):
|
||||
"""
|
||||
Get the maximum cooling supply temperature in degree Celsius
|
||||
:return: float
|
||||
"""
|
||||
return self._non_pv_generation_system.maximum_cooling_supply_temperature
|
||||
|
||||
@property
|
||||
def minimum_cooling_supply_temperature(self):
|
||||
"""
|
||||
Get the minimum cooling supply temperature in degree Celsius
|
||||
:return: float
|
||||
"""
|
||||
return self._non_pv_generation_system.minimum_cooling_supply_temperature
|
||||
|
||||
@property
|
||||
def heat_output_curve(self) -> Union[None, PerformanceCurves]:
|
||||
"""
|
||||
Get the heat output curve of the heat generation device
|
||||
:return: PerformanceCurve
|
||||
"""
|
||||
return self._non_pv_generation_system.heat_output_curve
|
||||
|
||||
@property
|
||||
def heat_fuel_consumption_curve(self) -> Union[None, PerformanceCurves]:
|
||||
"""
|
||||
Get the heating fuel consumption curve of the heat generation device
|
||||
:return: PerformanceCurve
|
||||
"""
|
||||
return self._non_pv_generation_system.heat_fuel_consumption_curve
|
||||
|
||||
@property
|
||||
def heat_efficiency_curve(self) -> Union[None, PerformanceCurves]:
|
||||
"""
|
||||
Get the heating efficiency curve of the heat generation device
|
||||
:return: PerformanceCurve
|
||||
"""
|
||||
return self._non_pv_generation_system.heat_efficiency_curve
|
||||
|
||||
@property
|
||||
def cooling_output_curve(self) -> Union[None, PerformanceCurves]:
|
||||
"""
|
||||
Get the heat output curve of the heat generation device
|
||||
:return: PerformanceCurve
|
||||
"""
|
||||
return self._non_pv_generation_system.cooling_output_curve
|
||||
|
||||
@property
|
||||
def cooling_fuel_consumption_curve(self) -> Union[None, PerformanceCurves]:
|
||||
"""
|
||||
Get the heating fuel consumption curve of the heat generation device
|
||||
:return: PerformanceCurve
|
||||
"""
|
||||
return self._non_pv_generation_system.cooling_fuel_consumption_curve
|
||||
|
||||
@property
|
||||
def cooling_efficiency_curve(self) -> Union[None, PerformanceCurves]:
|
||||
"""
|
||||
Get the heating efficiency curve of the heat generation device
|
||||
:return: PerformanceCurve
|
||||
"""
|
||||
return self._non_pv_generation_system.cooling_efficiency_curve
|
114
hub/city_model_structure/energy_systems/pv_generation_system.py
Normal file
114
hub/city_model_structure/energy_systems/pv_generation_system.py
Normal file
@ -0,0 +1,114 @@
|
||||
"""
|
||||
PV generation system definition
|
||||
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
||||
Copyright © 2023 Concordia CERC group
|
||||
Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca
|
||||
"""
|
||||
|
||||
from hub.city_model_structure.energy_systems.generic_generation_system import GenericGenerationSystem
|
||||
|
||||
|
||||
class PvGenerationSystem(GenericGenerationSystem):
|
||||
"""
|
||||
PvGenerationSystem class
|
||||
"""
|
||||
def __init__(self, generic_pv_generation_system):
|
||||
super().__init__()
|
||||
self._generic_pv_generation_system = generic_pv_generation_system
|
||||
self._electricity_power = None
|
||||
|
||||
@property
|
||||
def electricity_power(self):
|
||||
"""
|
||||
Get electricity_power in W
|
||||
:return: float
|
||||
"""
|
||||
return self._electricity_power
|
||||
|
||||
@electricity_power.setter
|
||||
def electricity_power(self, value):
|
||||
"""
|
||||
Set electricity_power in W
|
||||
:param value: float
|
||||
"""
|
||||
self._electricity_power = value
|
||||
|
||||
@property
|
||||
def nominal_electricity_output(self):
|
||||
"""
|
||||
Get nominal_power_output of electricity generation devices or inverters in W
|
||||
:return: float
|
||||
"""
|
||||
return self._generic_pv_generation_system.nominal_electricity_output
|
||||
|
||||
@property
|
||||
def electricity_efficiency(self):
|
||||
"""
|
||||
Get electricity_efficiency
|
||||
:return: float
|
||||
"""
|
||||
return self._generic_pv_generation_system.electricity_efficiency
|
||||
|
||||
@property
|
||||
def nominal_ambient_temperature(self):
|
||||
"""
|
||||
Get nominal ambient temperature of PV panels in degree Celsius
|
||||
:return: float
|
||||
"""
|
||||
return self._generic_pv_generation_system.nominal_ambient_temperature
|
||||
|
||||
@property
|
||||
def nominal_cell_temperature(self):
|
||||
"""
|
||||
Get nominal cell temperature of PV panels in degree Celsius
|
||||
:return: float
|
||||
"""
|
||||
return self._generic_pv_generation_system.nominal_cell_temperature
|
||||
|
||||
@property
|
||||
def nominal_radiation(self):
|
||||
"""
|
||||
Get nominal radiation of PV panels
|
||||
:return: float
|
||||
"""
|
||||
return self._generic_pv_generation_system.nominal_radiation
|
||||
|
||||
@property
|
||||
def standard_test_condition_cell_temperature(self):
|
||||
"""
|
||||
Get standard test condition cell temperature of PV panels in degree Celsius
|
||||
:return: float
|
||||
"""
|
||||
return self._generic_pv_generation_system.standard_test_condition_cell_temperature
|
||||
|
||||
@property
|
||||
def standard_test_condition_maximum_power(self):
|
||||
"""
|
||||
Get standard test condition maximum power of PV panels in W
|
||||
:return: float
|
||||
"""
|
||||
return self._generic_pv_generation_system.standard_test_condition_maximum_power
|
||||
|
||||
@property
|
||||
def cell_temperature_coefficient(self):
|
||||
"""
|
||||
Get cell temperature coefficient of PV module
|
||||
:return: float
|
||||
"""
|
||||
return self._generic_pv_generation_system.cell_temperature_coefficient
|
||||
|
||||
@property
|
||||
def width(self):
|
||||
"""
|
||||
Get PV module width in m
|
||||
:return: float
|
||||
"""
|
||||
return self._generic_pv_generation_system.width
|
||||
|
||||
@property
|
||||
def height(self):
|
||||
"""
|
||||
Get PV module height in m
|
||||
:return: float
|
||||
"""
|
||||
return self._generic_pv_generation_system.height
|
@ -6,15 +6,12 @@ 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):
|
||||
def __init__(self, generic_thermal_storage_system):
|
||||
self._generic_thermal_storage_system = generic_thermal_storage_system
|
||||
self._model_name = None
|
||||
self._manufacturer = None
|
||||
self._volume = None
|
||||
|
@ -302,6 +302,7 @@ PHOTOVOLTAIC = 'Photovoltaic'
|
||||
BOILER = 'Boiler'
|
||||
HEAT_PUMP = 'Heat Pump'
|
||||
BASEBOARD = 'Baseboard'
|
||||
ELECTRICITY_GENERATOR = 'Electricity generator'
|
||||
CHILLER = 'Chiller'
|
||||
SENSIBLE = 'sensible'
|
||||
LATENT = 'Latent'
|
||||
|
@ -0,0 +1,31 @@
|
||||
"""
|
||||
Dictionaries module for Montreal system to hub energy generation 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
|
||||
"""
|
||||
|
||||
import hub.helpers.constants as cte
|
||||
|
||||
|
||||
class MontrealGenerationSystemToHubEnergyGenerationSystem:
|
||||
"""
|
||||
Montreal's generation system to hub energy generation system class
|
||||
"""
|
||||
def __init__(self):
|
||||
self._dictionary = {
|
||||
'boiler': cte.BOILER,
|
||||
'furnace': cte.BASEBOARD,
|
||||
'cooler': cte.CHILLER,
|
||||
'electricity generator': cte.ELECTRICITY_GENERATOR,
|
||||
'PV system': cte.PHOTOVOLTAIC,
|
||||
'heat pump': cte.HEAT_PUMP
|
||||
}
|
||||
|
||||
@property
|
||||
def dictionary(self) -> dict:
|
||||
"""
|
||||
Get the dictionary
|
||||
:return: {}
|
||||
"""
|
||||
return self._dictionary
|
@ -19,6 +19,7 @@ from hub.helpers.data.hub_usage_to_hft_usage import HubUsageToHftUsage
|
||||
from hub.helpers.data.hub_usage_to_nrcan_usage import HubUsageToNrcanUsage
|
||||
from hub.helpers.data.hub_usage_to_eilat_usage import HubUsageToEilatUsage
|
||||
from hub.helpers.data.montreal_system_to_hub_energy_generation_system import MontrealSystemToHubEnergyGenerationSystem
|
||||
from hub.helpers.data.montreal_generation_system_to_hub_energy_generation_system import MontrealGenerationSystemToHubEnergyGenerationSystem
|
||||
from hub.helpers.data.montreal_demand_type_to_hub_energy_demand_type import MontrealDemandTypeToHubEnergyDemandType
|
||||
from hub.helpers.data.hub_function_to_montreal_custom_costs_function import HubFunctionToMontrealCustomCostsFunction
|
||||
from hub.helpers.data.north_america_demand_type_to_hub_energy_demand_type import NorthAmericaDemandTypeToHubEnergyDemandType
|
||||
@ -154,6 +155,13 @@ class Dictionaries:
|
||||
"""
|
||||
return MontrealCustomFuelToHubFuel().dictionary
|
||||
|
||||
@property
|
||||
def montreal_generation_system_to_hub_energy_generation_system(self):
|
||||
"""
|
||||
Get montreal custom generation system names to hub energy system names, transformation dictionary
|
||||
"""
|
||||
return MontrealGenerationSystemToHubEnergyGenerationSystem().dictionary
|
||||
|
||||
@property
|
||||
def north_america_demand_type_to_hub_energy_demand_type(self):
|
||||
"""
|
||||
|
@ -11,9 +11,14 @@ import copy
|
||||
from pandas import DataFrame
|
||||
|
||||
from hub.catalog_factories.energy_systems_catalog_factory import EnergySystemsCatalogFactory
|
||||
from hub.city_model_structure.energy_systems.generic_distribution_system import GenericDistributionSystem
|
||||
from hub.city_model_structure.energy_systems.generic_energy_system import GenericEnergySystem
|
||||
from hub.city_model_structure.energy_systems.generic_generation_system import GenericGenerationSystem
|
||||
from hub.city_model_structure.energy_systems.generic_distribution_system import GenericDistributionSystem
|
||||
from hub.city_model_structure.energy_systems.generic_non_pv_generation_system import GenericNonPvGenerationSystem
|
||||
from hub.city_model_structure.energy_systems.generic_pv_generation_system import GenericPvGenerationSystem
|
||||
from hub.city_model_structure.energy_systems.generic_electrical_storage_system import GenericElectricalStorageSystem
|
||||
from hub.city_model_structure.energy_systems.generic_thermal_storage_system import GenericThermalStorageSystem
|
||||
from hub.city_model_structure.energy_systems.generic_emission_system import GenericEmissionSystem
|
||||
|
||||
from hub.city_model_structure.energy_systems.energy_system import EnergySystem
|
||||
from hub.city_model_structure.energy_systems.generation_system import GenerationSystem
|
||||
from hub.city_model_structure.energy_systems.distribution_system import DistributionSystem
|
||||
@ -86,35 +91,58 @@ class MontrealCustomEnergySystemParameters:
|
||||
_hub_demand_types.append(Dictionaries().montreal_demand_type_to_hub_energy_demand_type[demand_type])
|
||||
energy_system.name = system.name
|
||||
energy_system.demand_types = _hub_demand_types
|
||||
_generation_system = GenericGenerationSystem()
|
||||
archetype_generation_equipment = system.generation_systems
|
||||
_type = system.name
|
||||
_generation_system.type = Dictionaries().montreal_system_to_hub_energy_generation_system[
|
||||
_type]
|
||||
_fuel_type = Dictionaries().montreal_custom_fuel_to_hub_fuel[archetype_generation_equipment.fuel_type]
|
||||
|
||||
_generation_systems = []
|
||||
for catalog_generation_system in system.generation_systems:
|
||||
if catalog_generation_system.system_type == 'PV system':
|
||||
_generation_system = GenericPvGenerationSystem()
|
||||
_type = 'PV system'
|
||||
_generation_system.type = Dictionaries().montreal_generation_system_to_hub_energy_generation_system[_type]
|
||||
_fuel_type = Dictionaries().montreal_custom_fuel_to_hub_fuel[catalog_generation_system.fuel_type]
|
||||
_generation_system.fuel_type = _fuel_type
|
||||
_generation_system.source_types = archetype_generation_equipment.source_medium
|
||||
_generation_system.heat_efficiency = archetype_generation_equipment.heat_efficiency
|
||||
_generation_system.cooling_efficiency = archetype_generation_equipment.cooling_efficiency
|
||||
_generation_system.electricity_efficiency = archetype_generation_equipment.electricity_efficiency
|
||||
_generation_system.source_temperature = archetype_generation_equipment.source_temperature
|
||||
_generation_system.source_mass_flow = archetype_generation_equipment.source_mass_flow
|
||||
_generation_system.storage = archetype_generation_equipment.storage
|
||||
_generation_system.auxiliary_equipment = None
|
||||
|
||||
energy_system.generation_systems = _generation_system
|
||||
_generation_system.electricity_efficiency = catalog_generation_system.electricity_efficiency
|
||||
_generic_storage_system = None
|
||||
if catalog_generation_system.energy_storage_systems is not None:
|
||||
_generic_storage_system = GenericElectricalStorageSystem()
|
||||
_generic_storage_system.type_energy_stored = 'electrical'
|
||||
_generation_system.generic_storage_systems = [_generic_storage_system]
|
||||
else:
|
||||
_generation_system = GenericNonPvGenerationSystem()
|
||||
_type = catalog_generation_system.system_type
|
||||
_generation_system.type = Dictionaries().montreal_generation_system_to_hub_energy_generation_system[_type]
|
||||
_fuel_type = Dictionaries().montreal_custom_fuel_to_hub_fuel[catalog_generation_system.fuel_type]
|
||||
_generation_system.fuel_type = _fuel_type
|
||||
_generation_system.source_types = catalog_generation_system.source_medium
|
||||
_generation_system.heat_efficiency = catalog_generation_system.heat_efficiency
|
||||
_generation_system.cooling_efficiency = catalog_generation_system.cooling_efficiency
|
||||
_generation_system.electricity_efficiency = catalog_generation_system.electricity_efficiency
|
||||
_generic_storage_system = None
|
||||
if catalog_generation_system.energy_storage_systems is not None:
|
||||
if catalog_generation_system.energy_storage_systems.type_energy_stored == 'electrical':
|
||||
_generic_storage_system = GenericElectricalStorageSystem()
|
||||
_generic_storage_system.type_energy_stored = 'electrical'
|
||||
else:
|
||||
_generic_storage_system = GenericThermalStorageSystem()
|
||||
_generic_storage_system.type_energy_stored = 'thermal'
|
||||
_generation_system.generic_storage_systems = [_generic_storage_system]
|
||||
_generation_systems.append(_generation_system)
|
||||
energy_system.generation_systems = _generation_systems
|
||||
|
||||
_distribution_systems = []
|
||||
for catalog_distribution_system in system.distribution_systems:
|
||||
_distribution_system = GenericDistributionSystem()
|
||||
archetype_distribution_equipment = system.distribution_systems
|
||||
_distribution_system.type = archetype_distribution_equipment.type
|
||||
_distribution_system.supply_temperature = archetype_distribution_equipment.supply_temperature
|
||||
_distribution_system.type = catalog_distribution_system.type
|
||||
_distribution_system.distribution_consumption_fix_flow = \
|
||||
archetype_distribution_equipment.distribution_consumption_fix_flow
|
||||
catalog_distribution_system.distribution_consumption_fix_flow
|
||||
_distribution_system.distribution_consumption_variable_flow = \
|
||||
archetype_distribution_equipment.distribution_consumption_variable_flow
|
||||
_distribution_system.heat_losses = archetype_distribution_equipment.heat_losses
|
||||
|
||||
energy_system.distribution_systems = _distribution_system
|
||||
catalog_distribution_system.distribution_consumption_variable_flow
|
||||
_distribution_system.heat_losses = catalog_distribution_system.heat_losses
|
||||
_emission_system = None
|
||||
if catalog_distribution_system.emission_systems is not None:
|
||||
_emission_system = GenericEmissionSystem()
|
||||
_distribution_system.generic_emission_systems = [_emission_system]
|
||||
_distribution_systems.append(_distribution_system)
|
||||
energy_system.distribution_systems = _distribution_systems
|
||||
|
||||
building_systems.append(energy_system)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user