finished central data model new structure for energy systems, importer and test

This commit is contained in:
Pilar Monsalvete 2023-10-13 13:31:46 -04:00
parent d94bce4174
commit 3f649fd020
23 changed files with 1104 additions and 2063 deletions

View File

@ -754,19 +754,17 @@ class Building(CityObject):
return None
for energy_system in self.energy_systems:
generation_systems = energy_system.generation_systems
print(generation_systems)
print(type(generation_systems))
for demand_type in energy_system.demand_types:
if demand_type.lower() == consumption_type.lower():
if consumption_type in (cte.HEATING, cte.DOMESTIC_HOT_WATER):
for generation_system in generation_systems:
coefficient_of_performance = generation_system.generic_generation_system.heat_efficiency
coefficient_of_performance = generation_system.heat_efficiency
elif consumption_type == cte.COOLING:
for generation_system in generation_systems:
coefficient_of_performance = generation_system.generic_generation_system.cooling_efficiency
coefficient_of_performance = generation_system.cooling_efficiency
elif consumption_type == cte.ELECTRICITY:
for generation_system in generation_systems:
coefficient_of_performance = generation_system.generic_generation_system.electricity_efficiency
coefficient_of_performance = generation_system.electricity_efficiency
if coefficient_of_performance == 0:
values = [0]*len(demand)
final_energy_consumed = values
@ -797,8 +795,8 @@ class Building(CityObject):
if self.energy_systems is None:
return self._onsite_electrical_production
for energy_system in self.energy_systems:
if energy_system.generation_systems.generic_generation_system.type == cte.PHOTOVOLTAIC:
_efficiency = energy_system.generation_systems.generic_generation_system.electricity_efficiency
if energy_system.generation_systems[0].system_type == cte.PHOTOVOLTAIC:
_efficiency = energy_system.generation_systems[0].electricity_efficiency
self._onsite_electrical_production = {}
for _key in self.roofs[0].global_irradiance.keys():
_results = [0 for _ in range(0, len(self.roofs[0].global_irradiance[_key]))]

View File

@ -62,7 +62,6 @@ class City:
self._level_of_detail = LevelOfDetail()
self._city_objects_dictionary = {}
self._city_objects_alias_dictionary = {}
self._energy_systems_connection_table = None
self._generic_energy_systems = None
def _get_location(self) -> Location:
@ -505,24 +504,6 @@ class City:
"""
return self._level_of_detail
@property
def energy_systems_connection_table(self) -> Union[None, DataFrame]:
"""
Get energy systems connection table which includes at least two columns: energy_system_type and associated_building
and may also include dimensioned_energy_system and connection_building_to_dimensioned_energy_system
:return: DataFrame
"""
return self._energy_systems_connection_table
@energy_systems_connection_table.setter
def energy_systems_connection_table(self, value):
"""
Set energy systems connection table which includes at least two columns: energy_system_type and associated_building
and may also include dimensioned_energy_system and connection_building_to_dimensioned_energy_system
:param value: DataFrame
"""
self._energy_systems_connection_table = value
@property
def generic_energy_systems(self) -> dict:
"""

View File

@ -5,7 +5,12 @@ Copyright © 2023 Concordia CERC group
Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca
"""
from hub.city_model_structure.energy_systems.generic_distribution_system import GenericDistributionSystem
from typing import Union, List, TypeVar
from hub.city_model_structure.energy_systems.emission_system import EmissionSystem
from hub.city_model_structure.energy_systems.energy_storage_system import EnergyStorageSystem
GenerationSystem = TypeVar('GenerationSystem')
class DistributionSystem:
@ -13,20 +18,158 @@ class DistributionSystem:
DistributionSystem class
"""
def __init__(self):
self._generic_distribution_system = None
self._model_name = None
self._type = None
self._supply_temperature = None
self._distribution_consumption_fix_flow = None
self._distribution_consumption_variable_flow = None
self._heat_losses = None
self._generation_systems = None
self._energy_storage_systems = None
self._emission_systems = None
@property
def generic_distribution_system(self) -> GenericDistributionSystem:
def model_name(self):
"""
Get generic_distribution_system
:return: GenericDistributionSystem
Get model name
:return: string
"""
return self._generic_distribution_system
return self._model_name
@generic_distribution_system.setter
def generic_distribution_system(self, value):
@model_name.setter
def model_name(self, value):
"""
Set associated generic_distribution_system
:param value: GenericDistributionSystem
Set model name
:param value: string
"""
self._generic_distribution_system = value
self._model_name = value
@property
def type(self):
"""
Get type from [air, water, refrigerant]
:return: string
"""
return self._type
@type.setter
def type(self, value):
"""
Set type from [air, water, refrigerant]
:param value: string
"""
self._type = value
@property
def supply_temperature(self):
"""
Get supply_temperature in degree Celsius
:return: float
"""
return self._supply_temperature
@supply_temperature.setter
def supply_temperature(self, value):
"""
Set supply_temperature in degree Celsius
:param value: float
"""
self._supply_temperature = value
@property
def distribution_consumption_fix_flow(self):
"""
Get distribution_consumption if the pump or fan work at fix mass or volume flow in ratio over peak power (W/W)
:return: float
"""
return self._distribution_consumption_fix_flow
@distribution_consumption_fix_flow.setter
def distribution_consumption_fix_flow(self, value):
"""
Set distribution_consumption if the pump or fan work at fix mass or volume flow in ratio over peak power (W/W)
:return: float
"""
self._distribution_consumption_fix_flow = value
@property
def distribution_consumption_variable_flow(self):
"""
Get distribution_consumption if the pump or fan work at variable mass or volume flow in ratio
over energy produced (J/J)
:return: float
"""
return self._distribution_consumption_variable_flow
@distribution_consumption_variable_flow.setter
def distribution_consumption_variable_flow(self, value):
"""
Set distribution_consumption if the pump or fan work at variable mass or volume flow in ratio
over energy produced (J/J)
:return: float
"""
self._distribution_consumption_variable_flow = value
@property
def heat_losses(self):
"""
Get heat_losses in ratio over energy produced
:return: float
"""
return self._heat_losses
@heat_losses.setter
def heat_losses(self, value):
"""
Set heat_losses in ratio over energy produced
:param value: float
"""
self._heat_losses = value
@property
def generation_systems(self) -> Union[None, List[GenerationSystem]]:
"""
Get generation systems connected to the distribution system
:return: [GenerationSystem]
"""
return self._generation_systems
@generation_systems.setter
def generation_systems(self, value):
"""
Set generation systems connected to the distribution system
:param value: [GenerationSystem]
"""
self._generation_systems = value
@property
def energy_storage_systems(self) -> Union[None, List[EnergyStorageSystem]]:
"""
Get energy storage systems connected to this distribution system
:return: [EnergyStorageSystem]
"""
return self._energy_storage_systems
@energy_storage_systems.setter
def energy_storage_systems(self, value):
"""
Set energy storage systems connected to this distribution system
:param value: [EnergyStorageSystem]
"""
self._energy_storage_systems = value
@property
def emission_systems(self) -> Union[None, List[EmissionSystem]]:
"""
Get energy emission systems connected to this distribution system
:return: [EmissionSystem]
"""
return self._emission_systems
@emission_systems.setter
def emission_systems(self, value):
"""
Set energy emission systems connected to this distribution system
:param value: [EmissionSystem]
"""
self._emission_systems = value

View File

@ -1,83 +1,32 @@
"""
Energy System catalog heat generation system
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
"""
from __future__ import annotations
from hub.city_model_structure.energy_systems.generic_storage_system import GenericStorageSystem
from hub.city_model_structure.energy_systems.energy_storage_system import EnergyStorageSystem
class ElectricalStorageSystem:
"""
Electrical Storage system class
class ElectricalStorageSystem(EnergyStorageSystem):
""""
Electrical Storage System Class
"""
def __init__(self):
self._model_name = None
self._manufacturer = None
self._generic_storage_system = None
super().__init__()
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
Get the rated output power of storage system in Watts
:return: float
"""
return self._rated_output_power
@ -85,15 +34,15 @@ class ElectricalStorageSystem:
@rated_output_power.setter
def rated_output_power(self, value):
"""
Set the rated output power in Watts
:return: float
Set the rated output power of storage system in Watts
:param value: float
"""
self._rated_output_power = value
@property
def nominal_efficiency(self):
"""
Get the nominal efficiency
Get the nominal efficiency of the storage system
:return: float
"""
return self._nominal_efficiency
@ -101,8 +50,8 @@ class ElectricalStorageSystem:
@nominal_efficiency.setter
def nominal_efficiency(self, value):
"""
Set the nominal efficiency
:return: float
Set the nominal efficiency of the storage system
:param value: float
"""
self._nominal_efficiency = value
@ -117,8 +66,8 @@ class ElectricalStorageSystem:
@battery_voltage.setter
def battery_voltage(self, value):
"""
Get the battery voltage in Volts
:return: float
Set the battery voltage in Volts
:param value: float
"""
self._battery_voltage = value
@ -134,7 +83,7 @@ class ElectricalStorageSystem:
def depth_of_discharge(self, value):
"""
Set the depth of discharge as a percentage
:return: float
:param value: float
"""
self._depth_of_discharge = value
@ -149,7 +98,7 @@ class ElectricalStorageSystem:
@self_discharge_rate.setter
def self_discharge_rate(self, value):
"""
Get the self discharge rate of battery as a percentage
:return: float
Set the self discharge rate of battery as a percentage
:param value: float
"""
self._self_discharge_rate = value

View File

@ -1,32 +1,64 @@
"""
Energy emission system definition
Emission system module
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_emission_system import GenericEmissionSystem
class EmissionSystem:
"""
EmissionSystem class
"""
def __init__(self):
self._generic_emission_system = None
self._model_name = None
self._type = None
self._parasitic_energy_consumption = None
@property
def generic_emission_system(self) -> GenericEmissionSystem:
def model_name(self):
"""
Get associated generic_emission_system
:return: GenericEmissionSystem
Get model name
:return: string
"""
return self._generic_emission_system
return self._model_name
@generic_emission_system.setter
def generic_emission_system(self, value):
@model_name.setter
def model_name(self, value):
"""
Set associated
:param value: GenericEmissionSystem
Set model name
:param value: string
"""
self._generic_emission_system = value
self._model_name = value
@property
def type(self):
"""
Get type
:return: string
"""
return self._type
@type.setter
def type(self, value):
"""
Set type
:param value: string
"""
self._type = value
@property
def parasitic_energy_consumption(self):
"""
Get parasitic_energy_consumption in ratio (W/W)
:return: float
"""
return self._parasitic_energy_consumption
@parasitic_energy_consumption.setter
def parasitic_energy_consumption(self, value):
"""
Set parasitic_energy_consumption in ratio (W/W)
:param value: float
"""
self._parasitic_energy_consumption = value

View File

@ -1,9 +1,9 @@
"""
Energy storage system
Energy storage system. Abstract class
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
Project Coder Saeed Ranjbar saeed.ranjbar@concordia.ca
Code contributors: Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca
"""
from abc import ABC
@ -13,8 +13,13 @@ class EnergyStorageSystem(ABC):
"""
Energy storage System class
"""
def __init__(self, generic_storage_system):
self._generic_storage_system = generic_storage_system
def __init__(self):
self._type_energy_stored = None
self._storage_type = None
self._model_name = None
self._manufacturer = None
self._nominal_capacity = None
self._losses_ratio = None
@property
def type_energy_stored(self):
@ -22,7 +27,15 @@ class EnergyStorageSystem(ABC):
Get type of energy stored from ['electrical', 'thermal']
:return: string
"""
return self._generic_storage_system.type_energy_stored
return self._type_energy_stored
@type_energy_stored.setter
def type_energy_stored(self, value):
"""
Set type of energy stored from ['electrical', 'thermal']
:return: string
"""
self._type_energy_stored = value
@property
def storage_type(self):
@ -30,7 +43,15 @@ class EnergyStorageSystem(ABC):
Get storage type
:return: string
"""
return self._generic_storage_system.storage_type
return self._storage_type
@storage_type.setter
def storage_type(self, value):
"""
Get storage type
:param value: string
"""
self._storage_type = value
@property
def model_name(self):
@ -38,7 +59,15 @@ class EnergyStorageSystem(ABC):
Get system model
:return: string
"""
return self._generic_storage_system.model_name
return self._model_name
@model_name.setter
def model_name(self, value):
"""
Set system model
:param value: string
"""
self._model_name = value
@property
def manufacturer(self):
@ -46,7 +75,15 @@ class EnergyStorageSystem(ABC):
Get name of manufacturer
:return: string
"""
return self._generic_storage_system.manufacturer
return self._manufacturer
@manufacturer.setter
def manufacturer(self, value):
"""
Set name of manufacturer
:param value: string
"""
self._manufacturer = value
@property
def nominal_capacity(self):
@ -54,7 +91,15 @@ class EnergyStorageSystem(ABC):
Get the nominal capacity of storage systems in Jules
:return: float
"""
return self._generic_storage_system.nominal_capacity
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):
@ -62,4 +107,12 @@ class EnergyStorageSystem(ABC):
Get the losses-ratio of storage system in Jules lost / Jules stored
:return: float
"""
return self._generic_storage_system.losses_ratio
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

View File

@ -6,9 +6,10 @@ Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca
"""
from typing import Union, List
from pathlib import Path
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.generation_system import GenerationSystem
from hub.city_model_structure.energy_systems.control_system import ControlSystem
from hub.city_model_structure.city_object import CityObject
@ -17,28 +18,46 @@ class EnergySystem:
"""
EnergySystem class
"""
def __init__(self, generic_energy_system):
self._generic_energy_system = generic_energy_system
def __init__(self):
self._demand_types = None
self._name = None
self._generation_systems = None
self._distribution_systems = None
self._configuration_schema = None
self._connected_city_objects = None
self._control_system = None
@property
def name(self):
"""
Get energy system name
:return: str
"""
return self._generic_energy_system.name
@property
def demand_types(self):
"""
Get demand able to cover from [Heating, Cooling, Domestic Hot Water, Electricity]
:return: [string]
"""
return self._generic_energy_system.demand_types
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
@property
def name(self):
"""
Get energy system name
:return: str
"""
return self._name
@name.setter
def name(self, value):
"""
Set energy system name
:param value:
"""
self._name = value
@property
def generation_systems(self) -> List[GenerationSystem]:
@ -52,7 +71,7 @@ class EnergySystem:
def generation_systems(self, value):
"""
Set generation systems
:param value: [GenerationSystem]
:return: [GenerationSystem]
"""
self._generation_systems = value
@ -72,6 +91,22 @@ class EnergySystem:
"""
self._distribution_systems = value
@property
def configuration_schema(self) -> Path:
"""
Get the schema of the system configuration
:return: Path
"""
return self._configuration_schema
@configuration_schema.setter
def configuration_schema(self, value):
"""
Set the schema of the system configuration
:param value: Path
"""
self._configuration_schema = value
@property
def connected_city_objects(self) -> Union[None, List[CityObject]]:
"""

View File

@ -1,8 +1,9 @@
"""
Energy generation system definition
Energy generation system (abstract class)
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 __future__ import annotations
@ -17,10 +18,13 @@ class GenerationSystem(ABC):
"""
GenerationSystem class
"""
def __init__(self, generic_generation_system):
self._generic_generation_system = generic_generation_system
def __init__(self):
self._system_type = None
self._model_name = None
self._manufacturer = None
self._fuel_type = None
self._distribution_systems = None
self._storage_systems = None
self._energy_storage_systems = None
@property
def system_type(self):
@ -28,23 +32,47 @@ class GenerationSystem(ABC):
Get type
:return: string
"""
return self._generic_generation_system.system_type
return self._system_type
@system_type.setter
def system_type(self, value):
"""
Set type
:param value: string
"""
self._system_type = value
@property
def model_name(self):
"""
Get the model name
Get model name
:return: string
"""
return self._generic_generation_system.model_name
return self._model_name
@model_name.setter
def model_name(self, value):
"""
Set model name
:param value: string
"""
self._model_name = value
@property
def manufacturer(self):
"""
Get the manufacturer name
Get manufacturer's name
:return: string
"""
return self._generic_generation_system.manufacturer
return self._manufacturer
@manufacturer.setter
def manufacturer(self, value):
"""
Set manufacturer's name
:param value: string
"""
self._manufacturer = value
@property
def fuel_type(self):
@ -52,13 +80,21 @@ class GenerationSystem(ABC):
Get fuel_type from [Renewable, Gas, Diesel, Electricity, Wood, Coal]
:return: string
"""
return self._generic_generation_system.fuel_type
return self._fuel_type
@fuel_type.setter
def fuel_type(self, value):
"""
Set fuel_type from [Renewable, Gas, Diesel, Electricity, Wood, Coal]
:param value: string
"""
self._fuel_type = value
@property
def distribution_systems(self) -> Union[None, List[DistributionSystem]]:
"""
Get distributions systems connected to this generation system
:return: [GenericDistributionSystem]
:return: [DistributionSystem]
"""
return self._distribution_systems
@ -71,17 +107,17 @@ class GenerationSystem(ABC):
self._distribution_systems = value
@property
def storage_systems(self) -> Union[None, List[EnergyStorageSystem]]:
def energy_storage_systems(self) -> Union[None, List[EnergyStorageSystem]]:
"""
Get energy storage systems connected to this generation system
:return: [EnergyStorageSystem]
"""
return self._storage_systems
return self._energy_storage_systems
@storage_systems.setter
def storage_systems(self, value):
@energy_storage_systems.setter
def energy_storage_systems(self, value):
"""
Set energy storage systems connected to this generation system
:param value: [EnergyStorageSystem]
"""
self._storage_systems = value
self._energy_storage_systems = value

View File

@ -1,175 +0,0 @@
"""
Generic energy distribution 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, List, TypeVar
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:
"""
GenericDistributionSystem class
"""
def __init__(self):
self._model_name = None
self._type = None
self._supply_temperature = None
self._distribution_consumption_fix_flow = None
self._distribution_consumption_variable_flow = None
self._heat_losses = None
self._generic_generation_systems = None
self._generic_storage_systems = None
self._generic_emission_systems = None
@property
def model_name(self):
"""
Get model name
:return: string
"""
return self._model_name
@model_name.setter
def model_name(self, value):
"""
Set model name
:param value: string
"""
self._model_name = value
@property
def type(self):
"""
Get type from [air, water, refrigerant]
:return: string
"""
return self._type
@type.setter
def type(self, value):
"""
Set type from [air, water, refrigerant]
:param value: string
"""
self._type = value
@property
def supply_temperature(self):
"""
Get supply_temperature in degree Celsius
:return: float
"""
return self._supply_temperature
@supply_temperature.setter
def supply_temperature(self, value):
"""
Set supply_temperature in degree Celsius
:param value: float
"""
self._supply_temperature = value
@property
def distribution_consumption_fix_flow(self):
"""
Get distribution_consumption if the pump or fan work at fix mass or volume flow in ratio over peak power (W/W)
:return: float
"""
return self._distribution_consumption_fix_flow
@distribution_consumption_fix_flow.setter
def distribution_consumption_fix_flow(self, value):
"""
Set distribution_consumption if the pump or fan work at fix mass or volume flow in ratio over peak power (W/W)
:return: float
"""
self._distribution_consumption_fix_flow = value
@property
def distribution_consumption_variable_flow(self):
"""
Get distribution_consumption if the pump or fan work at variable mass or volume flow in ratio
over energy produced (J/J)
:return: float
"""
return self._distribution_consumption_variable_flow
@distribution_consumption_variable_flow.setter
def distribution_consumption_variable_flow(self, value):
"""
Set distribution_consumption if the pump or fan work at variable mass or volume flow in ratio
over energy produced (J/J)
:return: float
"""
self._distribution_consumption_variable_flow = value
@property
def heat_losses(self):
"""
Get heat_losses in ratio over energy produced
:return: float
"""
return self._heat_losses
@heat_losses.setter
def heat_losses(self, value):
"""
Set heat_losses in ratio over energy produced
:param value: float
"""
self._heat_losses = value
@property
def generic_generation_systems(self) -> Union[None, List[GenericGenerationSystem]]:
"""
Get generation systems connected to the distribution system
:return: [generic_generation_systems]
"""
return self._generic_generation_systems
@generic_generation_systems.setter
def generic_generation_systems(self, value):
"""
Set generation systems connected to the distribution system
:param value: [generic_generation_systems]
"""
self._generic_generation_systems = value
@property
def generic_storage_systems(self) -> Union[None, List[GenericStorageSystem]]:
"""
Get energy storage systems connected to this distribution system
:return: [GenericStorageSystem]
"""
return self._generic_storage_systems
@generic_storage_systems.setter
def generic_storage_systems(self, value):
"""
Set energy storage systems connected to this distribution system
:param value: [GenericStorageSystem]
"""
self._generic_storage_systems = value
@property
def generic_emission_systems(self) -> Union[None, List[GenericEmissionSystem]]:
"""
Get energy emission systems connected to this distribution system
:return: [GenericEmissionSystem]
"""
return self._generic_emission_systems
@generic_emission_systems.setter
def generic_emission_systems(self, value):
"""
Set energy emission systems connected to this distribution system
:param value: [GenericEmissionSystem]
"""
self._generic_emission_systems = value

View File

@ -1,104 +0,0 @@
"""
Generic 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.city_model_structure.energy_systems.generic_storage_system import GenericStorageSystem
class GenericElectricalStorageSystem(GenericStorageSystem):
""""
Generic Electrical Storage System Class
"""
def __init__(self):
super().__init__()
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 rated_output_power(self):
"""
Get the rated output power of storage system in Watts
:return: float
"""
return self._rated_output_power
@rated_output_power.setter
def rated_output_power(self, value):
"""
Set the rated output power of storage system in Watts
:param value: float
"""
self._rated_output_power = value
@property
def nominal_efficiency(self):
"""
Get the nominal efficiency of the storage system
:return: float
"""
return self._nominal_efficiency
@nominal_efficiency.setter
def nominal_efficiency(self, value):
"""
Set the nominal efficiency of the storage system
:param value: 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):
"""
Set the battery voltage in Volts
:param value: 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
:param value: 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):
"""
Set the self discharge rate of battery as a percentage
:param value: float
"""
self._self_discharge_rate = value

View File

@ -1,64 +0,0 @@
"""
Generic energy emission system module
SPDX - License - Identifier: LGPL - 3.0 - or -later
Copyright © 2023 Concordia CERC group
Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca
"""
class GenericEmissionSystem:
"""
GenericEmissionSystem class
"""
def __init__(self):
self._model_name = None
self._type = None
self._parasitic_energy_consumption = None
@property
def model_name(self):
"""
Get model name
:return: string
"""
return self._model_name
@model_name.setter
def model_name(self, value):
"""
Set model name
:param value: string
"""
self._model_name = value
@property
def type(self):
"""
Get type
:return: string
"""
return self._type
@type.setter
def type(self, value):
"""
Set type
:param value: string
"""
self._type = value
@property
def parasitic_energy_consumption(self):
"""
Get parasitic_energy_consumption in ratio (W/W)
:return: float
"""
return self._parasitic_energy_consumption
@parasitic_energy_consumption.setter
def parasitic_energy_consumption(self, value):
"""
Set parasitic_energy_consumption in ratio (W/W)
:param value: float
"""
self._parasitic_energy_consumption = value

View File

@ -1,104 +0,0 @@
"""
Generic energy 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, List
from pathlib import Path
from hub.city_model_structure.energy_systems.generic_distribution_system import GenericDistributionSystem
from hub.city_model_structure.energy_systems.generic_generation_system import GenericGenerationSystem
class GenericEnergySystem:
"""
GenericEnergySystem class
"""
def __init__(self):
self._demand_types = None
self._name = None
self._generation_systems = None
self._distribution_systems = None
self._configuration_schema = None
@property
def demand_types(self):
"""
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
@property
def name(self):
"""
Get energy system name
:return: str
"""
return self._name
@name.setter
def name(self, value):
"""
Set energy system name
:param value:
"""
self._name = value
@property
def generation_systems(self) -> List[GenericGenerationSystem]:
"""
Get generation systems
:return: [GenerationSystem]
"""
return self._generation_systems
@generation_systems.setter
def generation_systems(self, value):
"""
Set generation systems
:return: [GenerationSystem]
"""
self._generation_systems = value
@property
def distribution_systems(self) -> Union[None, List[GenericDistributionSystem]]:
"""
Get distribution systems
:return: [DistributionSystem]
"""
return self._distribution_systems
@distribution_systems.setter
def distribution_systems(self, value):
"""
Set distribution systems
:param value: [DistributionSystem]
"""
self._distribution_systems = value
@property
def configuration_schema(self) -> Path:
"""
Get the schema of the system configuration
:return: Path
"""
return self._configuration_schema
@configuration_schema.setter
def configuration_schema(self, value):
"""
Set the schema of the system configuration
:param value: Path
"""
self._configuration_schema = value

View File

@ -1,123 +0,0 @@
"""
Generic energy generation system (abstract class)
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 __future__ import annotations
from abc import ABC
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_storage_system import GenericStorageSystem
class GenericGenerationSystem(ABC):
"""
GenericGenerationSystem class
"""
def __init__(self):
self._system_type = None
self._model_name = None
self._manufacturer = None
self._fuel_type = None
self._generic_distribution_systems = None
self._generic_storage_systems = None
@property
def system_type(self):
"""
Get type
:return: string
"""
return self._system_type
@system_type.setter
def system_type(self, value):
"""
Set type
:param value: string
"""
self._system_type = value
@property
def model_name(self):
"""
Get model name
:return: string
"""
return self._model_name
@model_name.setter
def model_name(self, value):
"""
Set model name
:param value: string
"""
self._model_name = value
@property
def manufacturer(self):
"""
Get manufacturer's name
:return: string
"""
return self._manufacturer
@manufacturer.setter
def manufacturer(self, value):
"""
Set manufacturer's name
:param value: string
"""
self._manufacturer = value
@property
def fuel_type(self):
"""
Get fuel_type from [Renewable, Gas, Diesel, Electricity, Wood, Coal]
:return: string
"""
return self._fuel_type
@fuel_type.setter
def fuel_type(self, value):
"""
Set fuel_type from [Renewable, Gas, Diesel, Electricity, Wood, Coal]
:param value: string
"""
self._fuel_type = value
@property
def generic_distribution_systems(self) -> Union[None, List[GenericDistributionSystem]]:
"""
Get distributions systems connected to this generation system
:return: [GenericDistributionSystem]
"""
return self._generic_distribution_systems
@generic_distribution_systems.setter
def generic_distribution_systems(self, value):
"""
Set distributions systems connected to this generation system
:param value: [GenericDistributionSystem]
"""
self._generic_distribution_systems = value
@property
def generic_storage_systems(self) -> Union[None, List[GenericStorageSystem]]:
"""
Get energy storage systems connected to this generation system
:return: [GenericStorageSystem]
"""
return self._generic_storage_systems
@generic_storage_systems.setter
def generic_storage_systems(self, value):
"""
Set energy storage systems connected to this generation system
:param value: [GenericStorageSystem]
"""
self._generic_storage_systems = value

View File

@ -1,428 +0,0 @@
"""
Generic non PV 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
Code contributors: Saeed Ranjbar saeed.ranjbar@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 GenericNonPvGenerationSystem(GenericGenerationSystem):
"""
GenericNonPvGenerationSystem class
"""
def __init__(self):
super().__init__()
self._nominal_heat_output = None
self._maximum_heat_output = None
self._minimum_heat_output = None
self._heat_efficiency = None
self._nominal_cooling_output = None
self._maximum_cooling_output = None
self._minimum_cooling_output = None
self._cooling_efficiency = None
self._electricity_efficiency = None
self._nominal_electricity_output = None
self._source_medium = None
self._source_temperature = None
self._source_mass_flow = None
self._supply_medium = None
self._maximum_heat_supply_temperature = None
self._minimum_heat_supply_temperature = None
self._maximum_cooling_supply_temperature = None
self._minimum_cooling_supply_temperature = None
self._heat_output_curve = None
self._heat_fuel_consumption_curve = None
self._heat_efficiency_curve = None
self._cooling_output_curve = None
self._cooling_fuel_consumption_curve = None
self._cooling_efficiency_curve = None
@property
def nominal_heat_output(self):
"""
Get nominal heat output of heat generation devices in W
:return: float
"""
return self._nominal_heat_output
@nominal_heat_output.setter
def nominal_heat_output(self, value):
"""
Set nominal heat output of heat generation devices in W
:param value: float
"""
self._nominal_heat_output = value
@property
def maximum_heat_output(self):
"""
Get maximum heat output of heat generation devices in W
:return: float
"""
return self._maximum_heat_output
@maximum_heat_output.setter
def maximum_heat_output(self, value):
"""
Set maximum heat output of heat generation devices in W
:param value: float
"""
self._maximum_heat_output = value
@property
def minimum_heat_output(self):
"""
Get minimum heat output of heat generation devices in W
:return: float
"""
return self._minimum_heat_output
@minimum_heat_output.setter
def minimum_heat_output(self, value):
"""
Set minimum heat output of heat generation devices in W
:param value: float
"""
self._minimum_heat_output = value
@property
def source_medium(self):
"""
Get source_type from [air, water, ground, district_heating, grid, on_site_electricity]
:return: string
"""
return self._source_medium
@source_medium.setter
def source_medium(self, value):
"""
Set source medium from [Air, Water, Geothermal, District Heating, Grid, Onsite Electricity]
:param value: [string]
"""
self._source_medium = value
@property
def supply_medium(self):
"""
Get the supply medium from ['air', 'water']
:return: string
"""
return self._supply_medium
@supply_medium.setter
def supply_medium(self, value):
"""
Set the supply medium from ['air', 'water']
:param value: string
"""
self._supply_medium = value
@property
def heat_efficiency(self):
"""
Get heat_efficiency
:return: float
"""
return self._heat_efficiency
@heat_efficiency.setter
def heat_efficiency(self, value):
"""
Set heat_efficiency
:param value: float
"""
self._heat_efficiency = value
@property
def nominal_cooling_output(self):
"""
Get nominal cooling output of heat generation devices in W
:return: float
"""
return self._nominal_cooling_output
@nominal_cooling_output.setter
def nominal_cooling_output(self, value):
"""
Set nominal cooling output of heat generation devices in W
:param value: float
"""
self._nominal_cooling_output = value
@property
def maximum_cooling_output(self):
"""
Get maximum heat output of heat generation devices in W
:return: float
"""
return self._maximum_cooling_output
@maximum_cooling_output.setter
def maximum_cooling_output(self, value):
"""
Set maximum heat output of heat generation devices in W
:param value: float
"""
self._maximum_cooling_output = value
@property
def minimum_cooling_output(self):
"""
Get minimum heat output of heat generation devices in W
:return: float
"""
return self._minimum_cooling_output
@minimum_cooling_output.setter
def minimum_cooling_output(self, value):
"""
Set minimum heat output of heat generation devices in W
:param value: float
"""
self._minimum_cooling_output = value
@property
def cooling_efficiency(self):
"""
Get cooling_efficiency
:return: float
"""
return self._cooling_efficiency
@cooling_efficiency.setter
def cooling_efficiency(self, value):
"""
Set cooling_efficiency
:param value: float
"""
self._cooling_efficiency = value
@property
def electricity_efficiency(self):
"""
Get electricity_efficiency
:return: float
"""
return self._electricity_efficiency
@electricity_efficiency.setter
def electricity_efficiency(self, value):
"""
Set electricity_efficiency
:param value: float
"""
self._electricity_efficiency = value
@property
def source_temperature(self):
"""
Get source_temperature in degree Celsius
:return: float
"""
return self._source_temperature
@source_temperature.setter
def source_temperature(self, value):
"""
Set source_temperature in degree Celsius
:param value: float
"""
self._source_temperature = value
@property
def source_mass_flow(self):
"""
Get source_mass_flow in kg/s
:return: float
"""
return self._source_mass_flow
@source_mass_flow.setter
def source_mass_flow(self, value):
"""
Set source_mass_flow in kg/s
:param value: float
"""
self._source_mass_flow = value
@property
def nominal_electricity_output(self):
"""
Get nominal_power_output of electricity generation devices or inverters in W
:return: float
"""
return self._nominal_electricity_output
@nominal_electricity_output.setter
def nominal_electricity_output(self, value):
"""
Get nominal_power_output of electricity generation devices or inverters in W
:param value: float
"""
self._nominal_electricity_output = value
@property
def maximum_heat_supply_temperature(self):
"""
Get the maximum heat supply temperature in degree Celsius
:return: float
"""
return self._minimum_heat_supply_temperature
@maximum_heat_supply_temperature.setter
def maximum_heat_supply_temperature(self, value):
"""
Set maximum heating supply temperature in degree Celsius
:param value: float
"""
self._maximum_heat_supply_temperature = value
@property
def minimum_heat_supply_temperature(self):
"""
Get the minimum heat supply temperature in degree Celsius
:return: float
"""
return self._minimum_heat_supply_temperature
@minimum_heat_supply_temperature.setter
def minimum_heat_supply_temperature(self, value):
"""
Set minimum heating supply temperature in degree Celsius
:param value: float
"""
self._minimum_heat_supply_temperature = value
@property
def maximum_cooling_supply_temperature(self):
"""
Get the maximum cooling supply temperature in degree Celsius
:return: float
"""
return self._maximum_cooling_supply_temperature
@maximum_cooling_supply_temperature.setter
def maximum_cooling_supply_temperature(self, value):
"""
Set maximum cooling supply temperature in degree Celsius
:param value: float
"""
self._maximum_cooling_supply_temperature = value
@property
def minimum_cooling_supply_temperature(self):
"""
Get the minimum cooling supply temperature in degree Celsius
:return: float
"""
return self._minimum_cooling_supply_temperature
@minimum_cooling_supply_temperature.setter
def minimum_cooling_supply_temperature(self, value):
"""
Set minimum cooling supply temperature in degree Celsius
:param value: float
"""
self._minimum_cooling_supply_temperature = value
@property
def heat_output_curve(self) -> Union[None, PerformanceCurves]:
"""
Get the heat output curve of the heat generation device
:return: PerformanceCurve
"""
return self._heat_output_curve
@heat_output_curve.setter
def heat_output_curve(self, value):
"""
Set the heat output curve of the heat generation device
:return: PerformanceCurve
"""
self._heat_output_curve = value
@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._heat_fuel_consumption_curve
@heat_fuel_consumption_curve.setter
def heat_fuel_consumption_curve(self, value):
"""
Set the heating fuel consumption curve of the heat generation device
:return: PerformanceCurve
"""
self._heat_fuel_consumption_curve = value
@property
def heat_efficiency_curve(self) -> Union[None, PerformanceCurves]:
"""
Get the heating efficiency curve of the heat generation device
:return: PerformanceCurve
"""
return self._heat_efficiency_curve
@heat_efficiency_curve.setter
def heat_efficiency_curve(self, value):
"""
Set the heating efficiency curve of the heat generation device
:return: PerformanceCurve
"""
self._heat_efficiency_curve = value
@property
def cooling_output_curve(self) -> Union[None, PerformanceCurves]:
"""
Get the heat output curve of the heat generation device
:return: PerformanceCurve
"""
return self._cooling_output_curve
@cooling_output_curve.setter
def cooling_output_curve(self, value):
"""
Set the cooling output curve of the heat generation device
:return: PerformanceCurve
"""
self._cooling_output_curve = value
@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._cooling_fuel_consumption_curve
@cooling_fuel_consumption_curve.setter
def cooling_fuel_consumption_curve(self, value):
"""
Set the heating fuel consumption curve of the heat generation device
:return: PerformanceCurve
"""
self._cooling_fuel_consumption_curve = value
@property
def cooling_efficiency_curve(self) -> Union[None, PerformanceCurves]:
"""
Get the heating efficiency curve of the heat generation device
:return: PerformanceCurve
"""
return self._cooling_efficiency_curve
@cooling_efficiency_curve.setter
def cooling_efficiency_curve(self, value):
"""
Set the heating efficiency curve of the heat generation device
:return: PerformanceCurve
"""
self._cooling_efficiency_curve = value

View File

@ -1,187 +0,0 @@
"""
Generic PV 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
Code contributors: Saeed Ranjbar saeed.ranjbar@concordia.ca
"""
from hub.city_model_structure.energy_systems.generic_generation_system import GenericGenerationSystem
class GenericPvGenerationSystem(GenericGenerationSystem):
"""
GenericPvGenerationSystem class
"""
def __init__(self):
super().__init__()
self._electricity_efficiency = None
self._nominal_electricity_output = None
self._nominal_ambient_temperature = None
self._nominal_cell_temperature = None
self._nominal_radiation = None
self._standard_test_condition_cell_temperature = None
self._standard_test_condition_maximum_power = None
self._cell_temperature_coefficient = None
self._width = None
self._height = None
@property
def nominal_electricity_output(self):
"""
Get nominal_power_output of electricity generation devices or inverters in W
:return: float
"""
return self._nominal_electricity_output
@nominal_electricity_output.setter
def nominal_electricity_output(self, value):
"""
Set nominal_power_output of electricity generation devices or inverters in W
:param value: float
"""
self._nominal_electricity_output = value
@property
def electricity_efficiency(self):
"""
Get electricity_efficiency
:return: float
"""
return self._electricity_efficiency
@electricity_efficiency.setter
def electricity_efficiency(self, value):
"""
Set electricity_efficiency
:param value: float
"""
self._electricity_efficiency = value
@property
def nominal_ambient_temperature(self):
"""
Get nominal ambient temperature of PV panels in degree Celsius
:return: float
"""
return self._nominal_ambient_temperature
@nominal_ambient_temperature.setter
def nominal_ambient_temperature(self, value):
"""
Set nominal ambient temperature of PV panels in degree Celsius
:param value: float
"""
self._nominal_ambient_temperature = value
@property
def nominal_cell_temperature(self):
"""
Get nominal cell temperature of PV panels in degree Celsius
:return: float
"""
return self._nominal_cell_temperature
@nominal_cell_temperature.setter
def nominal_cell_temperature(self, value):
"""
Set nominal cell temperature of PV panels in degree Celsius
:param value: float
"""
self._nominal_cell_temperature = value
@property
def nominal_radiation(self):
"""
Get nominal radiation of PV panels
:return: float
"""
return self._nominal_radiation
@nominal_radiation.setter
def nominal_radiation(self, value):
"""
Set nominal radiation of PV panels
:param value: float
"""
self._nominal_radiation = value
@property
def standard_test_condition_cell_temperature(self):
"""
Get standard test condition cell temperature of PV panels in degree Celsius
:return: float
"""
return self._standard_test_condition_cell_temperature
@standard_test_condition_cell_temperature.setter
def standard_test_condition_cell_temperature(self, value):
"""
Set standard test condition cell temperature of PV panels in degree Celsius
:param value: float
"""
self._standard_test_condition_cell_temperature = value
@property
def standard_test_condition_maximum_power(self):
"""
Get standard test condition maximum power of PV panels in W
:return: float
"""
return self._standard_test_condition_maximum_power
@standard_test_condition_maximum_power.setter
def standard_test_condition_maximum_power(self, value):
"""
Set standard test condition maximum power of PV panels in W
:param value: float
"""
self._standard_test_condition_maximum_power = value
@property
def cell_temperature_coefficient(self):
"""
Get cell temperature coefficient of PV module
:return: float
"""
return self._cell_temperature_coefficient
@cell_temperature_coefficient.setter
def cell_temperature_coefficient(self, value):
"""
Set cell temperature coefficient of PV module
:param value: float
"""
self._cell_temperature_coefficient = value
@property
def width(self):
"""
Get PV module width in m
:return: float
"""
return self._width
@width.setter
def width(self, value):
"""
Set PV module width in m
:param value: float
"""
self._width = value
@property
def height(self):
"""
Get PV module height in m
:return: float
"""
return self._height
@height.setter
def height(self, value):
"""
Set PV module height in m
:param value: float
"""
self._height = value

View File

@ -1,118 +0,0 @@
"""
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 abc import ABC
class GenericStorageSystem(ABC):
"""
Generic storage System class
"""
def __init__(self):
self._type_energy_stored = None
self._storage_type = None
self._model_name = None
self._manufacturer = None
self._nominal_capacity = None
self._losses_ratio = None
@property
def type_energy_stored(self):
"""
Get type of energy stored from ['electrical', 'thermal']
:return: string
"""
return self._type_energy_stored
@type_energy_stored.setter
def type_energy_stored(self, value):
"""
Set type of energy stored from ['electrical', 'thermal']
:return: string
"""
self._type_energy_stored = value
@property
def storage_type(self):
"""
Get storage type
:return: string
"""
return self._storage_type
@storage_type.setter
def storage_type(self, value):
"""
Get storage type
:param value: string
"""
self._storage_type = value
@property
def model_name(self):
"""
Get system model
:return: string
"""
return self._model_name
@model_name.setter
def model_name(self, value):
"""
Set system model
:param value: string
"""
self._model_name = value
@property
def manufacturer(self):
"""
Get name of manufacturer
:return: string
"""
return self._manufacturer
@manufacturer.setter
def manufacturer(self, value):
"""
Set name of manufacturer
:param value: string
"""
self._manufacturer = 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

View File

@ -1,88 +0,0 @@
"""
Generic 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.city_model_structure.energy_systems.generic_storage_system import GenericStorageSystem
from hub.city_model_structure.building_demand.layer import Layer
class GenericThermalStorageSystem(GenericStorageSystem):
""""
Generic Thermal Storage System Class
"""
def __init__(self):
super().__init__()
self._volume = None
self._height = None
self._layers = None
self._maximum_operating_temperature = None
@property
def volume(self):
"""
Get the physical volume of the storage system in cubic meters
:return: float
"""
return self._volume
@volume.setter
def volume(self, value):
"""
Set the physical volume of the storage system in cubic meters
:param value: float
"""
self._volume = value
@property
def height(self):
"""
Get the diameter of the storage system in meters
:return: float
"""
return self._height
@height.setter
def height(self, value):
"""
Set the diameter of the storage system in meters
:param value: float
"""
self._height = value
@property
def layers(self) -> [Layer]:
"""
Get construction layers
:return: [layer]
"""
return self._layers
@layers.setter
def layers(self, value):
"""
Set construction layers
:param value: [layer]
"""
self._layers = value
@property
def maximum_operating_temperature(self):
"""
Get maximum operating temperature of the storage system in degree Celsius
:return: float
"""
return self._maximum_operating_temperature
@maximum_operating_temperature.setter
def maximum_operating_temperature(self, value):
"""
Set maximum operating temperature of the storage system in degree Celsius
:param value: float
"""
self._maximum_operating_temperature = value

View File

@ -1,27 +1,435 @@
"""
Non PV generation system definition
Non PV 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
Code contributors: Saeed Ranjbar saeed.ranjbar@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.generation_system import GenerationSystem
from hub.city_model_structure.energy_systems.performance_curve import PerformanceCurves
class NonPvGenerationSystem(GenericGenerationSystem):
class NonPvGenerationSystem(GenerationSystem):
"""
NonPvGenerationSystem class
"""
def __init__(self, non_pv_generation_system):
def __init__(self):
super().__init__()
self._non_pv_generation_system = non_pv_generation_system
self._nominal_heat_output = None
self._maximum_heat_output = None
self._minimum_heat_output = None
self._heat_efficiency = None
self._nominal_cooling_output = None
self._maximum_cooling_output = None
self._minimum_cooling_output = None
self._cooling_efficiency = None
self._electricity_efficiency = None
self._nominal_electricity_output = None
self._source_medium = None
self._source_temperature = None
self._source_mass_flow = None
self._supply_medium = None
self._maximum_heat_supply_temperature = None
self._minimum_heat_supply_temperature = None
self._maximum_cooling_supply_temperature = None
self._minimum_cooling_supply_temperature = None
self._heat_output_curve = None
self._heat_fuel_consumption_curve = None
self._heat_efficiency_curve = None
self._cooling_output_curve = None
self._cooling_fuel_consumption_curve = None
self._cooling_efficiency_curve = None
self._heat_power = None
self._cooling_power = None
self._electricity_power = None
@property
def nominal_heat_output(self):
"""
Get nominal heat output of heat generation devices in W
:return: float
"""
return self._nominal_heat_output
@nominal_heat_output.setter
def nominal_heat_output(self, value):
"""
Set nominal heat output of heat generation devices in W
:param value: float
"""
self._nominal_heat_output = value
@property
def maximum_heat_output(self):
"""
Get maximum heat output of heat generation devices in W
:return: float
"""
return self._maximum_heat_output
@maximum_heat_output.setter
def maximum_heat_output(self, value):
"""
Set maximum heat output of heat generation devices in W
:param value: float
"""
self._maximum_heat_output = value
@property
def minimum_heat_output(self):
"""
Get minimum heat output of heat generation devices in W
:return: float
"""
return self._minimum_heat_output
@minimum_heat_output.setter
def minimum_heat_output(self, value):
"""
Set minimum heat output of heat generation devices in W
:param value: float
"""
self._minimum_heat_output = value
@property
def source_medium(self):
"""
Get source_type from [air, water, ground, district_heating, grid, on_site_electricity]
:return: string
"""
return self._source_medium
@source_medium.setter
def source_medium(self, value):
"""
Set source medium from [Air, Water, Geothermal, District Heating, Grid, Onsite Electricity]
:param value: [string]
"""
self._source_medium = value
@property
def supply_medium(self):
"""
Get the supply medium from ['air', 'water']
:return: string
"""
return self._supply_medium
@supply_medium.setter
def supply_medium(self, value):
"""
Set the supply medium from ['air', 'water']
:param value: string
"""
self._supply_medium = value
@property
def heat_efficiency(self):
"""
Get heat_efficiency
:return: float
"""
return self._heat_efficiency
@heat_efficiency.setter
def heat_efficiency(self, value):
"""
Set heat_efficiency
:param value: float
"""
self._heat_efficiency = value
@property
def nominal_cooling_output(self):
"""
Get nominal cooling output of heat generation devices in W
:return: float
"""
return self._nominal_cooling_output
@nominal_cooling_output.setter
def nominal_cooling_output(self, value):
"""
Set nominal cooling output of heat generation devices in W
:param value: float
"""
self._nominal_cooling_output = value
@property
def maximum_cooling_output(self):
"""
Get maximum heat output of heat generation devices in W
:return: float
"""
return self._maximum_cooling_output
@maximum_cooling_output.setter
def maximum_cooling_output(self, value):
"""
Set maximum heat output of heat generation devices in W
:param value: float
"""
self._maximum_cooling_output = value
@property
def minimum_cooling_output(self):
"""
Get minimum heat output of heat generation devices in W
:return: float
"""
return self._minimum_cooling_output
@minimum_cooling_output.setter
def minimum_cooling_output(self, value):
"""
Set minimum heat output of heat generation devices in W
:param value: float
"""
self._minimum_cooling_output = value
@property
def cooling_efficiency(self):
"""
Get cooling_efficiency
:return: float
"""
return self._cooling_efficiency
@cooling_efficiency.setter
def cooling_efficiency(self, value):
"""
Set cooling_efficiency
:param value: float
"""
self._cooling_efficiency = value
@property
def electricity_efficiency(self):
"""
Get electricity_efficiency
:return: float
"""
return self._electricity_efficiency
@electricity_efficiency.setter
def electricity_efficiency(self, value):
"""
Set electricity_efficiency
:param value: float
"""
self._electricity_efficiency = value
@property
def source_temperature(self):
"""
Get source_temperature in degree Celsius
:return: float
"""
return self._source_temperature
@source_temperature.setter
def source_temperature(self, value):
"""
Set source_temperature in degree Celsius
:param value: float
"""
self._source_temperature = value
@property
def source_mass_flow(self):
"""
Get source_mass_flow in kg/s
:return: float
"""
return self._source_mass_flow
@source_mass_flow.setter
def source_mass_flow(self, value):
"""
Set source_mass_flow in kg/s
:param value: float
"""
self._source_mass_flow = value
@property
def nominal_electricity_output(self):
"""
Get nominal_power_output of electricity generation devices or inverters in W
:return: float
"""
return self._nominal_electricity_output
@nominal_electricity_output.setter
def nominal_electricity_output(self, value):
"""
Get nominal_power_output of electricity generation devices or inverters in W
:param value: float
"""
self._nominal_electricity_output = value
@property
def maximum_heat_supply_temperature(self):
"""
Get the maximum heat supply temperature in degree Celsius
:return: float
"""
return self._minimum_heat_supply_temperature
@maximum_heat_supply_temperature.setter
def maximum_heat_supply_temperature(self, value):
"""
Set maximum heating supply temperature in degree Celsius
:param value: float
"""
self._maximum_heat_supply_temperature = value
@property
def minimum_heat_supply_temperature(self):
"""
Get the minimum heat supply temperature in degree Celsius
:return: float
"""
return self._minimum_heat_supply_temperature
@minimum_heat_supply_temperature.setter
def minimum_heat_supply_temperature(self, value):
"""
Set minimum heating supply temperature in degree Celsius
:param value: float
"""
self._minimum_heat_supply_temperature = value
@property
def maximum_cooling_supply_temperature(self):
"""
Get the maximum cooling supply temperature in degree Celsius
:return: float
"""
return self._maximum_cooling_supply_temperature
@maximum_cooling_supply_temperature.setter
def maximum_cooling_supply_temperature(self, value):
"""
Set maximum cooling supply temperature in degree Celsius
:param value: float
"""
self._maximum_cooling_supply_temperature = value
@property
def minimum_cooling_supply_temperature(self):
"""
Get the minimum cooling supply temperature in degree Celsius
:return: float
"""
return self._minimum_cooling_supply_temperature
@minimum_cooling_supply_temperature.setter
def minimum_cooling_supply_temperature(self, value):
"""
Set minimum cooling supply temperature in degree Celsius
:param value: float
"""
self._minimum_cooling_supply_temperature = value
@property
def heat_output_curve(self) -> Union[None, PerformanceCurves]:
"""
Get the heat output curve of the heat generation device
:return: PerformanceCurve
"""
return self._heat_output_curve
@heat_output_curve.setter
def heat_output_curve(self, value):
"""
Set the heat output curve of the heat generation device
:return: PerformanceCurve
"""
self._heat_output_curve = value
@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._heat_fuel_consumption_curve
@heat_fuel_consumption_curve.setter
def heat_fuel_consumption_curve(self, value):
"""
Set the heating fuel consumption curve of the heat generation device
:return: PerformanceCurve
"""
self._heat_fuel_consumption_curve = value
@property
def heat_efficiency_curve(self) -> Union[None, PerformanceCurves]:
"""
Get the heating efficiency curve of the heat generation device
:return: PerformanceCurve
"""
return self._heat_efficiency_curve
@heat_efficiency_curve.setter
def heat_efficiency_curve(self, value):
"""
Set the heating efficiency curve of the heat generation device
:return: PerformanceCurve
"""
self._heat_efficiency_curve = value
@property
def cooling_output_curve(self) -> Union[None, PerformanceCurves]:
"""
Get the heat output curve of the heat generation device
:return: PerformanceCurve
"""
return self._cooling_output_curve
@cooling_output_curve.setter
def cooling_output_curve(self, value):
"""
Set the cooling output curve of the heat generation device
:return: PerformanceCurve
"""
self._cooling_output_curve = value
@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._cooling_fuel_consumption_curve
@cooling_fuel_consumption_curve.setter
def cooling_fuel_consumption_curve(self, value):
"""
Set the heating fuel consumption curve of the heat generation device
:return: PerformanceCurve
"""
self._cooling_fuel_consumption_curve = value
@property
def cooling_efficiency_curve(self) -> Union[None, PerformanceCurves]:
"""
Get the heating efficiency curve of the heat generation device
:return: PerformanceCurve
"""
return self._cooling_efficiency_curve
@cooling_efficiency_curve.setter
def cooling_efficiency_curve(self, value):
"""
Set the heating efficiency curve of the heat generation device
:return: PerformanceCurve
"""
self._cooling_efficiency_curve = value
@property
def heat_power(self):
"""
@ -70,194 +478,3 @@ class NonPvGenerationSystem(GenericGenerationSystem):
"""
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

View File

@ -1,22 +1,192 @@
"""
PV generation system definition
PV 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
Code contributors: Saeed Ranjbar saeed.ranjbar@concordia.ca
"""
from hub.city_model_structure.energy_systems.generic_generation_system import GenericGenerationSystem
from hub.city_model_structure.energy_systems.generation_system import GenerationSystem
class PvGenerationSystem(GenericGenerationSystem):
class PvGenerationSystem(GenerationSystem):
"""
PvGenerationSystem class
"""
def __init__(self, generic_pv_generation_system):
def __init__(self):
super().__init__()
self._generic_pv_generation_system = generic_pv_generation_system
self._electricity_efficiency = None
self._nominal_electricity_output = None
self._nominal_ambient_temperature = None
self._nominal_cell_temperature = None
self._nominal_radiation = None
self._standard_test_condition_cell_temperature = None
self._standard_test_condition_maximum_power = None
self._cell_temperature_coefficient = None
self._width = None
self._height = None
self._electricity_power = None
@property
def nominal_electricity_output(self):
"""
Get nominal_power_output of electricity generation devices or inverters in W
:return: float
"""
return self._nominal_electricity_output
@nominal_electricity_output.setter
def nominal_electricity_output(self, value):
"""
Set nominal_power_output of electricity generation devices or inverters in W
:param value: float
"""
self._nominal_electricity_output = value
@property
def electricity_efficiency(self):
"""
Get electricity_efficiency
:return: float
"""
return self._electricity_efficiency
@electricity_efficiency.setter
def electricity_efficiency(self, value):
"""
Set electricity_efficiency
:param value: float
"""
self._electricity_efficiency = value
@property
def nominal_ambient_temperature(self):
"""
Get nominal ambient temperature of PV panels in degree Celsius
:return: float
"""
return self._nominal_ambient_temperature
@nominal_ambient_temperature.setter
def nominal_ambient_temperature(self, value):
"""
Set nominal ambient temperature of PV panels in degree Celsius
:param value: float
"""
self._nominal_ambient_temperature = value
@property
def nominal_cell_temperature(self):
"""
Get nominal cell temperature of PV panels in degree Celsius
:return: float
"""
return self._nominal_cell_temperature
@nominal_cell_temperature.setter
def nominal_cell_temperature(self, value):
"""
Set nominal cell temperature of PV panels in degree Celsius
:param value: float
"""
self._nominal_cell_temperature = value
@property
def nominal_radiation(self):
"""
Get nominal radiation of PV panels
:return: float
"""
return self._nominal_radiation
@nominal_radiation.setter
def nominal_radiation(self, value):
"""
Set nominal radiation of PV panels
:param value: float
"""
self._nominal_radiation = value
@property
def standard_test_condition_cell_temperature(self):
"""
Get standard test condition cell temperature of PV panels in degree Celsius
:return: float
"""
return self._standard_test_condition_cell_temperature
@standard_test_condition_cell_temperature.setter
def standard_test_condition_cell_temperature(self, value):
"""
Set standard test condition cell temperature of PV panels in degree Celsius
:param value: float
"""
self._standard_test_condition_cell_temperature = value
@property
def standard_test_condition_maximum_power(self):
"""
Get standard test condition maximum power of PV panels in W
:return: float
"""
return self._standard_test_condition_maximum_power
@standard_test_condition_maximum_power.setter
def standard_test_condition_maximum_power(self, value):
"""
Set standard test condition maximum power of PV panels in W
:param value: float
"""
self._standard_test_condition_maximum_power = value
@property
def cell_temperature_coefficient(self):
"""
Get cell temperature coefficient of PV module
:return: float
"""
return self._cell_temperature_coefficient
@cell_temperature_coefficient.setter
def cell_temperature_coefficient(self, value):
"""
Set cell temperature coefficient of PV module
:param value: float
"""
self._cell_temperature_coefficient = value
@property
def width(self):
"""
Get PV module width in m
:return: float
"""
return self._width
@width.setter
def width(self, value):
"""
Set PV module width in m
:param value: float
"""
self._width = value
@property
def height(self):
"""
Get PV module height in m
:return: float
"""
return self._height
@height.setter
def height(self, value):
"""
Set PV module height in m
:param value: float
"""
self._height = value
@property
def electricity_power(self):
"""
@ -32,83 +202,3 @@ class PvGenerationSystem(GenericGenerationSystem):
: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

View File

@ -1,61 +1,32 @@
"""
Energy System catalog heat generation system
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 hub.city_model_structure.energy_systems.energy_storage_system import EnergyStorageSystem
from hub.city_model_structure.building_demand.layer import Layer
class ThermalStorageSystem:
def __init__(self, generic_thermal_storage_system):
self._generic_thermal_storage_system = generic_thermal_storage_system
self._model_name = None
self._manufacturer = None
class ThermalStorageSystem(EnergyStorageSystem):
""""
Thermal Storage System Class
"""
def __init__(self):
super().__init__()
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
Get the physical volume of the storage system in cubic meters
:return: float
"""
return self._volume
@ -63,15 +34,15 @@ class ThermalStorageSystem:
@volume.setter
def volume(self, value):
"""
Set the thermal storage volume in m3
:return: float
Set the physical volume of the storage system in cubic meters
:param value: float
"""
self._volume = value
@property
def height(self):
"""
Get the storage height in m
Get the diameter of the storage system in meters
:return: float
"""
return self._height
@ -79,31 +50,31 @@ class ThermalStorageSystem:
@height.setter
def height(self, value):
"""
Set the storage height in m
:return: float
Set the diameter of the storage system in meters
:param value: float
"""
self._height = value
@property
def generic_storage_system(self) -> GenericStorageSystem:
def layers(self) -> [Layer]:
"""
Get associated generic_storage_system
:return: GenericStorageSystem
Get construction layers
:return: [layer]
"""
return self._generic_storage_system
return self._layers
@generic_storage_system.setter
def generic_storage_system(self, value):
@layers.setter
def layers(self, value):
"""
Set associated generic_storage_system
:param value: GenericStorageSystem
Set construction layers
:param value: [layer]
"""
self._generic_storage_system = value
self._layers = value
@property
def maximum_operating_temperature(self):
"""
Get the storage maximum operating temperature in degree Celsius
Get maximum operating temperature of the storage system in degree Celsius
:return: float
"""
return self._maximum_operating_temperature
@ -111,23 +82,7 @@ class ThermalStorageSystem:
@maximum_operating_temperature.setter
def maximum_operating_temperature(self, value):
"""
Set the storage maximum operating temperature in degree Celsius
:return: float
Set maximum operating temperature of the storage system in degree Celsius
:param value: 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

View File

@ -8,20 +8,13 @@ Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca
import logging
import copy
from pandas import DataFrame
from hub.catalog_factories.energy_systems_catalog_factory import EnergySystemsCatalogFactory
from hub.city_model_structure.energy_systems.generic_energy_system import GenericEnergySystem
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
from hub.city_model_structure.energy_systems.non_pv_generation_system import NonPvGenerationSystem
from hub.city_model_structure.energy_systems.pv_generation_system import PvGenerationSystem
from hub.city_model_structure.energy_systems.electrical_storage_system import ElectricalStorageSystem
from hub.city_model_structure.energy_systems.thermal_storage_system import ThermalStorageSystem
from hub.city_model_structure.energy_systems.emission_system import EmissionSystem
from hub.helpers.dictionaries import Dictionaries
@ -41,10 +34,6 @@ class MontrealCustomEnergySystemParameters:
"""
city = self._city
montreal_custom_catalog = EnergySystemsCatalogFactory('montreal_custom').catalog
if city.energy_systems_connection_table is None:
_energy_systems_connection_table = DataFrame(columns=['Energy System Type', 'Building'])
else:
_energy_systems_connection_table = city.energy_systems_connection_table
if city.generic_energy_systems is None:
_generic_energy_systems = {}
else:
@ -58,16 +47,12 @@ class MontrealCustomEnergySystemParameters:
archetype_name)
continue
_energy_systems_connection_table, _generic_energy_systems = self._create_generic_systems(
archetype,
building,
_energy_systems_connection_table,
_generic_energy_systems
)
city.energy_systems_connection_table = _energy_systems_connection_table
if archetype.name not in _generic_energy_systems:
_generic_energy_systems = self._create_generic_systems_list(archetype, _generic_energy_systems)
city.generic_energy_systems = _generic_energy_systems
self._associate_energy_systems(city)
self._assign_energy_systems_to_buildings(city)
@staticmethod
def _search_archetypes(catalog, name):
@ -77,108 +62,88 @@ class MontrealCustomEnergySystemParameters:
return building_archetype
raise KeyError('archetype not found')
@staticmethod
def _create_generic_systems(archetype, building,
_energy_systems_connection_table, _generic_energy_systems):
data = [archetype.name, building.name]
_energy_systems_connection_table.loc[len(_energy_systems_connection_table)] = data
if archetype.name not in _generic_energy_systems:
def _create_generic_systems_list(self, archetype, _generic_energy_systems):
building_systems = []
for system in archetype.systems:
energy_system = GenericEnergySystem()
for archetype_system in archetype.systems:
energy_system = EnergySystem()
_hub_demand_types = []
for demand_type in system.demand_types:
for demand_type in archetype_system.demand_types:
_hub_demand_types.append(Dictionaries().montreal_demand_type_to_hub_energy_demand_type[demand_type])
energy_system.name = system.name
energy_system.name = archetype_system.name
energy_system.demand_types = _hub_demand_types
_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.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()
_distribution_system.type = catalog_distribution_system.type
_distribution_system.distribution_consumption_fix_flow = \
catalog_distribution_system.distribution_consumption_fix_flow
_distribution_system.distribution_consumption_variable_flow = \
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
energy_system.generation_systems = self._create_generation_systems(archetype_system)
energy_system.distribution_systems = self._create_distribution_systems(archetype_system)
building_systems.append(energy_system)
_generic_energy_systems[archetype.name] = building_systems
return _energy_systems_connection_table, _generic_energy_systems
return _generic_energy_systems
@staticmethod
def _associate_energy_systems(city):
energy_systems_connection = city.energy_systems_connection_table
def _create_generation_systems(archetype_system):
_generation_systems = []
for archetype_generation_system in archetype_system.generation_systems:
if archetype_generation_system.system_type == 'PV system':
_generation_system = PvGenerationSystem()
_type = 'PV system'
_generation_system.system_type = Dictionaries().montreal_generation_system_to_hub_energy_generation_system[_type]
_fuel_type = Dictionaries().montreal_custom_fuel_to_hub_fuel[archetype_generation_system.fuel_type]
_generation_system.fuel_type = _fuel_type
_generation_system.electricity_efficiency = archetype_generation_system.electricity_efficiency
_generic_storage_system = None
if archetype_generation_system.energy_storage_systems is not None:
_generic_storage_system = ElectricalStorageSystem()
_generic_storage_system.type_energy_stored = 'electrical'
_generation_system.energy_storage_systems = [_generic_storage_system]
else:
_generation_system = NonPvGenerationSystem()
_type = archetype_generation_system.system_type
_generation_system.system_type = Dictionaries().montreal_generation_system_to_hub_energy_generation_system[_type]
_fuel_type = Dictionaries().montreal_custom_fuel_to_hub_fuel[archetype_generation_system.fuel_type]
_generation_system.fuel_type = _fuel_type
_generation_system.source_types = archetype_generation_system.source_medium
_generation_system.heat_efficiency = archetype_generation_system.heat_efficiency
_generation_system.cooling_efficiency = archetype_generation_system.cooling_efficiency
_generation_system.electricity_efficiency = archetype_generation_system.electricity_efficiency
_generic_storage_system = None
if archetype_generation_system.energy_storage_systems is not None:
if archetype_generation_system.energy_storage_systems.type_energy_stored == 'electrical':
_generic_storage_system = ElectricalStorageSystem()
_generic_storage_system.type_energy_stored = 'electrical'
else:
_generic_storage_system = ThermalStorageSystem()
_generic_storage_system.type_energy_stored = 'thermal'
_generation_system.energy_storage_systems = [_generic_storage_system]
_generation_systems.append(_generation_system)
return _generation_systems
@staticmethod
def _create_distribution_systems(archetype_system):
_distribution_systems = []
for archetype_distribution_system in archetype_system.distribution_systems:
_distribution_system = DistributionSystem()
_distribution_system.type = archetype_distribution_system.type
_distribution_system.distribution_consumption_fix_flow = \
archetype_distribution_system.distribution_consumption_fix_flow
_distribution_system.distribution_consumption_variable_flow = \
archetype_distribution_system.distribution_consumption_variable_flow
_distribution_system.heat_losses = archetype_distribution_system.heat_losses
_emission_system = None
if archetype_distribution_system.emission_systems is not None:
_emission_system = EmissionSystem()
_distribution_system.emission_systems = [_emission_system]
_distribution_systems.append(_distribution_system)
return _distribution_systems
@staticmethod
def _assign_energy_systems_to_buildings(city):
for building in city.buildings:
_building_energy_systems = []
energy_systems = energy_systems_connection['Energy System Type'][
energy_systems_connection['Building'] == building.name]
for energy_system in energy_systems:
if str(energy_system) == 'nan':
energy_systems_cluster_name = building.energy_systems_archetype_name
if str(energy_systems_cluster_name) == 'nan':
break
_generic_building_energy_systems = city.generic_energy_systems[energy_system]
_generic_building_energy_systems = city.generic_energy_systems[energy_systems_cluster_name]
for _generic_building_energy_system in _generic_building_energy_systems:
_building_energy_equipment = EnergySystem()
_building_energy_equipment.name = _generic_building_energy_system.name
_building_energy_equipment.demand_types = _generic_building_energy_system.demand_types
_building_energy_systems.append(copy.deepcopy(_generic_building_energy_system))
_building_distribution_system = DistributionSystem()
_building_distribution_system.generic_distribution_system = \
copy.deepcopy(_generic_building_energy_system.distribution_systems)
_building_emission_system = EmissionSystem()
_building_emission_system.generic_emission_system = \
copy.deepcopy(_generic_building_energy_system.emission_systems)
_building_generation_system = GenerationSystem()
_building_generation_system.generic_generation_system = \
copy.deepcopy(_generic_building_energy_system.generation_systems)
_building_energy_equipment.generation_systems = _building_generation_system
_building_energy_equipment.distribution_systems = _building_distribution_system
_building_energy_equipment.emission_systems = _building_emission_system
_building_energy_systems.append(_building_energy_equipment)
building.energy_systems = _building_energy_systems

View File

@ -16,8 +16,8 @@ from hub.city_model_structure.energy_systems.distribution_system import Distribu
from hub.city_model_structure.energy_systems.emission_system import EmissionSystem
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.generic_energy_system import GenericEnergySystem
from hub.city_model_structure.energy_systems.generic_generation_system import GenericGenerationSystem
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.thermal_storage_system import ThermalStorageSystem
from hub.helpers.dictionaries import Dictionaries
@ -79,7 +79,7 @@ class NorthAmericaCustomEnergySystemParameters:
data = [archetype.name, building.name]
_energy_systems_connection_table.loc[len(_energy_systems_connection_table)] = data
for system in archetype.systems:
energy_system = GenericEnergySystem()
energy_system = EnergySystem()
_hub_demand_types = []
demand_types = system.demand_types
if isinstance(demand_types, str):
@ -91,7 +91,7 @@ class NorthAmericaCustomEnergySystemParameters:
archetype_generation_equipments = system.generation_systems
_generation_systems = []
for archetype_generation_equipment in archetype_generation_equipments:
_generation_system = GenericGenerationSystem()
_generation_system = GenerationSystem()
_type = archetype_generation_equipment.name
_generation_system.type = Dictionaries().north_america_system_to_hub_energy_generation_system[_type]
_fuel_type = Dictionaries().north_america_custom_fuel_to_hub_fuel[archetype_generation_equipment.fuel_type]

View File

@ -9,6 +9,7 @@ import subprocess
from pathlib import Path
from unittest import TestCase
import copy
from typing import cast
import hub.helpers.constants as cte
from hub.exports.energy_building_exports_factory import EnergyBuildingsExportsFactory
@ -25,6 +26,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.thermal_storage_system import ThermalStorageSystem
from hub.city_model_structure.energy_systems.non_pv_generation_system import NonPvGenerationSystem
class TestSystemsFactory(TestCase):
"""
@ -54,7 +57,6 @@ class TestSystemsFactory(TestCase):
building.energy_systems_archetype_name = 'system 1 gas'
EnergySystemsFactory('montreal_custom', self._city).enrich()
self.assertEqual(17, len(self._city.energy_systems_connection_table))
self.assertEqual(1, len(self._city.generic_energy_systems))
def test_montreal_custom_system_results(self):
@ -78,39 +80,15 @@ class TestSystemsFactory(TestCase):
building.energy_systems_archetype_name = 'system 1 gas pv'
EnergySystemsFactory('montreal_custom', self._city).enrich()
# Need to assign energy systems to buildings:
energy_systems_connection = self._city.energy_systems_connection_table
for building in self._city.buildings:
_building_energy_systems = []
energy_systems = energy_systems_connection['Energy System Type'][
energy_systems_connection['Building'] == building.name]
for energy_system in energy_systems:
_generic_building_energy_systems = self._city.generic_energy_systems[energy_system]
for _generic_building_energy_system in _generic_building_energy_systems:
_building_energy_equipment = EnergySystem()
_building_energy_equipment.demand_types = _generic_building_energy_system.demand_types
_building_distribution_system = DistributionSystem()
_building_distribution_system.generic_distribution_system = (
copy.deepcopy(_generic_building_energy_system.distribution_systems)
)
_building_emission_system = EmissionSystem()
_building_emission_system.generic_emission_system = (
copy.deepcopy(_generic_building_energy_system.emission_systems)
)
_building_generation_system = GenerationSystem()
_building_generation_system.generic_generation_system = (
copy.deepcopy(_generic_building_energy_system.generation_systems)
)
if cte.HEATING in _building_energy_equipment.demand_types:
_building_generation_system.heat_power = building.heating_peak_load[cte.YEAR][0]
if cte.COOLING in _building_energy_equipment.demand_types:
_building_generation_system.cooling_power = building.cooling_peak_load[cte.YEAR][0]
_building_energy_equipment.generation_systems = _building_generation_system
_building_energy_equipment.distribution_systems = _building_distribution_system
_building_energy_equipment.emission_systems = _building_emission_system
_building_energy_systems.append(_building_energy_equipment)
building.energy_systems = _building_energy_systems
for energy_system in building.energy_systems:
if cte.HEATING in energy_system.demand_types:
_generation_system = cast(NonPvGenerationSystem, energy_system.generation_systems[0])
_generation_system.heat_power = building.heating_peak_load[cte.YEAR][0]
if cte.COOLING in energy_system.demand_types:
_generation_system = cast(NonPvGenerationSystem, energy_system.generation_systems[0])
_generation_system.cooling_power = building.cooling_peak_load[cte.YEAR][0]
for building in self._city.buildings:
self.assertLess(0, building.heating_consumption[cte.YEAR][0])