added generic energy system classes to cdm

This commit is contained in:
Pilar Monsalvete 2023-04-28 12:24:08 -04:00
parent 42c39e771c
commit 0a96b83c22
9 changed files with 444 additions and 14 deletions

View File

@ -5,6 +5,8 @@ Copyright © 2023 Concordia CERC group
Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca
"""
from typing import Union
from hub.catalog_factories.data_models.energy_systems.generation_system import GenerationSystem
from hub.catalog_factories.data_models.energy_systems.distribution_system import DistributionSystem
from hub.catalog_factories.data_models.energy_systems.emission_system import EmissionSystem
@ -59,7 +61,7 @@ class Archetype:
return self._generation_system
@property
def distribution_system(self) -> DistributionSystem:
def distribution_system(self) -> Union[None, DistributionSystem]:
"""
Get distribution system
:return: DistributionSystem
@ -67,7 +69,7 @@ class Archetype:
return self._distribution_system
@property
def emission_system(self) -> EmissionSystem:
def emission_system(self) -> Union[None, EmissionSystem]:
"""
Get emission system
:return: EmissionSystem

View File

@ -34,7 +34,7 @@ class DistributionSystem:
@property
def distribution_consumption(self):
"""
Get distribution_consumption (pump of fan) in % over energy produced
Get distribution_consumption (pump of fan) in ratio over energy produced
:return: float
"""
return self._distribution_consumption
@ -42,7 +42,7 @@ class DistributionSystem:
@property
def heat_losses(self):
"""
Get heat_losses in % over energy produced
Get heat_losses in ratio over energy produced
:return: float
"""
return self._heat_losses

View File

@ -8,7 +8,6 @@ Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca
class EmissionSystem:
def __init__(self, system_type, parasitic_energy_consumption):
self._type = system_type
self._parasitic_energy_consumption = parasitic_energy_consumption

View File

@ -6,6 +6,7 @@ Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca
"""
from __future__ import annotations
from typing import Union
class GenerationSystem:
@ -96,7 +97,7 @@ class GenerationSystem:
return self._storage_capacity
@property
def auxiliary_equipment(self) -> GenerationSystem:
def auxiliary_equipment(self) -> Union[None, GenerationSystem]:
"""
Get auxiliary_equipment
:return: GenerationSystem

View File

@ -16,6 +16,7 @@ from hub.city_model_structure.city_object import CityObject
from hub.city_model_structure.building_demand.household import Household
from hub.city_model_structure.building_demand.internal_zone import InternalZone
from hub.city_model_structure.attributes.polyhedron import Polyhedron
from hub.city_model_structure.energy_systems.generic_energy_system import GenericEnergySystem
class Building(CityObject):
@ -45,6 +46,7 @@ class Building(CityObject):
self._appliances_electrical_demand = dict()
self._domestic_hot_water_heat_demand = dict()
self._eave_height = None
self._energy_systems = None
self._grounds = []
self._roofs = []
self._walls = []
@ -190,14 +192,6 @@ class Building(CityObject):
if value is not None:
self._basement_heated = int(value)
@property
def heated_volume(self):
"""
Raises not implemented error
"""
# todo: this need to be calculated based on the basement and attic heated values
raise NotImplementedError
@property
def year_of_construction(self):
"""
@ -458,3 +452,19 @@ class Building(CityObject):
for usage in internal_zone.usages:
_usage = f'{_usage}{usage.name}_{usage.percentage} '
return _usage.rstrip()
@property
def energy_systems(self) -> Union[None, List[GenericEnergySystem]]:
"""
Get list of energy systems installed to cover the building demands
:return: [GenericEnergySystem]
"""
return self._energy_systems
@energy_systems.setter
def energy_systems(self, value):
"""
Set list of energy systems installed to cover the building demands
:param value: [GenericEnergySystem]
"""
self._energy_systems = value

View File

@ -0,0 +1,81 @@
"""
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
"""
class GenericDistributionSystem:
"""
GenericDistributionSystem class
"""
def __init__(self):
self._type = None
self._supply_temperature = None
self._distribution_consumption = None
self._heat_losses = None
@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(self):
"""
Get distribution_consumption (pump of fan) in ratio over energy produced
:return: float
"""
return self._distribution_consumption
@distribution_consumption.setter
def distribution_consumption(self, value):
"""
Set distribution_consumption (pump of fan) in ratio over energy produced
:param value: float
"""
self._distribution_consumption = 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

View File

@ -0,0 +1,30 @@
"""
Generic energy emission 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
"""
class GenericEmissionSystem:
"""
GenericEmissionSystem class
"""
def __init__(self):
self._parasitic_energy_consumption = None
@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

@ -0,0 +1,87 @@
"""
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
from hub.city_model_structure.energy_systems.generic_generation_system import GenericGenerationSystem
from hub.city_model_structure.energy_systems.generic_distribution_system import GenericDistributionSystem
from hub.city_model_structure.energy_systems.generic_emission_system import GenericEmissionSystem
class GenericEnergySystem:
"""
GenericEnergySystem class
"""
def __init__(self):
self._demand_types = None
self._generation_system = None
self._distribution_system = None
self._emission_system = 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 generation_system(self) -> GenericGenerationSystem:
"""
Get generation system
:return: GenerationSystem
"""
return self._generation_system
@generation_system.setter
def generation_system(self, value):
"""
Set generation system
:param value: GenerationSystem
"""
self._generation_system = value
@property
def distribution_system(self) -> Union[None, GenericDistributionSystem]:
"""
Get distribution system
:return: DistributionSystem
"""
return self._distribution_system
@distribution_system.setter
def distribution_system(self, value):
"""
Set distribution system
:param value: DistributionSystem
"""
self._distribution_system = value
@property
def emission_system(self) -> Union[None, GenericEmissionSystem]:
"""
Get emission system
:return: EmissionSystem
"""
return self._emission_system
@emission_system.setter
def emission_system(self, value):
"""
Set emission system
:param value: EmissionSystem
"""
self._emission_system = value

View File

@ -0,0 +1,220 @@
"""
Generic energy generation system definition
SPDX - License - Identifier: LGPL - 3.0 - or -later
Copyright © 2023 Concordia CERC group
Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca
"""
from __future__ import annotations
from typing import Union
class GenericGenerationSystem:
"""
GenericGenerationSystem class
"""
def __init__(self):
self._fuel_type = None
self._heat_power = None
self._cooling_power = None
self._electricity_power = None
self._source_types = None
self._heat_efficiency = None
self._cooling_efficiency = None
self._electricity_efficiency = None
self._source_temperature = None
self._source_mass_flow = None
self._storage_capacity = None
self._auxiliary_equipment = None
@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 source_types(self):
"""
Get source_type from [air, water, geothermal, district_heating, grid, on_site_electricity]
:return: [string]
"""
return self._source_types
@source_types.setter
def source_types(self, value):
"""
Set source_type from [air, water, geothermal, district_heating, grid, on_site_electricity]
:param value: [string]
"""
self._source_types = value
@property
def heat_power(self):
"""
Get heat_power in W
:return: float
"""
return self._heat_power
@heat_power.setter
def heat_power(self, value):
"""
Set heat_power in W
:param value: float
"""
self._heat_power = value
@property
def cooling_power(self):
"""
Get cooling_power in W
:return: float
"""
return self._cooling_power
@cooling_power.setter
def cooling_power(self, value):
"""
Set cooling_power in W
:param value: float
"""
self._cooling_power = value
@property
def electricity_power(self):
"""
Get electricity_power in W
:return: float
"""
return self._electricity_power
@electricity_power.setter
def electricity_power(self, value):
"""
Set electricity_power in W
:param value: float
"""
self._electricity_power = value
@property
def 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 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 storage_capacity(self):
"""
Get storage_capacity in J
:return: float
"""
return self._storage_capacity
@storage_capacity.setter
def storage_capacity(self, value):
"""
Set storage_capacity in J
:param value: float
"""
self._storage_capacity = value
@property
def auxiliary_equipment(self) -> Union[None, GenericGenerationSystem]:
"""
Get auxiliary_equipment
:return: GenerationSystem
"""
return self._auxiliary_equipment
@auxiliary_equipment.setter
def auxiliary_equipment(self, value):
"""
Set auxiliary_equipment
:param value: GenerationSystem
"""
self._auxiliary_equipment = value