From 21ca1e1e28f35d6bfd8823c8c2a8e5dc6d794efd Mon Sep 17 00:00:00 2001 From: Saeed Ranjbar Date: Tue, 15 Aug 2023 14:49:17 -0400 Subject: [PATCH] modified energy_storage_system.py and energy_system_catalog.py generation_system.py The xml data is modified --- .../energy_systems/energy_storage_system.py | 10 +-- .../energy_systems/generation_system.py | 87 +++++++++++++++---- ...atalog_new.py => energy_system_catalog.py} | 4 +- .../energy_systems/Tools4CitiesESMF.encomp | 46 +++++----- 4 files changed, 101 insertions(+), 46 deletions(-) rename hub/catalog_factories/energy_systems/{montreal_custom_catalog_new.py => energy_system_catalog.py} (99%) diff --git a/hub/catalog_factories/data_models/energy_systems/energy_storage_system.py b/hub/catalog_factories/data_models/energy_systems/energy_storage_system.py index 9be2d17d..52812ca1 100644 --- a/hub/catalog_factories/data_models/energy_systems/energy_storage_system.py +++ b/hub/catalog_factories/data_models/energy_systems/energy_storage_system.py @@ -18,7 +18,7 @@ class EnergyStorageSystem: """ def __init__(self, model_name, manufacturer, storage_type, volume, rated_output_power, - nominal_efficiency, battery_voltage, depth_of_discharge, self_discharge_rate, diameter, layers, + nominal_efficiency, battery_voltage, depth_of_discharge, self_discharge_rate, height, layers, maximum_operating_temperature): self._model_name = model_name self._manufacturer = manufacturer @@ -29,7 +29,7 @@ class EnergyStorageSystem: self._battery_voltage = battery_voltage self._depth_of_discharge = depth_of_discharge self._self_discharge_rate = self_discharge_rate - self._diameter = diameter + self._height = height self._layers = layers self._maximum_operating_temperature = maximum_operating_temperature @@ -106,12 +106,12 @@ class EnergyStorageSystem: return self._self_discharge_rate @property - def diameter(self): + def height(self): """ Get the diameter of the storage system in meters :return: float """ - return self._diameter + return self._height @property def layers(self) -> [Layer]: @@ -143,7 +143,7 @@ class EnergyStorageSystem: 'battery voltage [V]': self.battery_voltage, 'depth of discharge': self.depth_of_discharge, 'self discharge rate': self.self_discharge_rate, - 'diameter [m]': self.diameter, + 'height [m]': self.height, 'layers': _layers, 'maximum operating temperature [Celsius]': self.maximum_operating_temperature } diff --git a/hub/catalog_factories/data_models/energy_systems/generation_system.py b/hub/catalog_factories/data_models/energy_systems/generation_system.py index f0ce35ab..11560500 100644 --- a/hub/catalog_factories/data_models/energy_systems/generation_system.py +++ b/hub/catalog_factories/data_models/energy_systems/generation_system.py @@ -16,8 +16,10 @@ class GenerationSystem: """ def __init__(self, model_name, manufacturer, system_type, fuel_type, nominal_thermal_output, modulation_range, - source_types, heat_efficiency, cooling_efficiency, electricity_efficiency, source_temperature, - source_mass_flow, nominal_electricity_output): + source_types, supply_medium, heat_efficiency, cooling_efficiency, electricity_efficiency, + source_temperature, source_mass_flow, nominal_electricity_output, maximum_heating_supply_temperature, + minimum_heating_supply_temperature, maximum_cooling_supply_temperature, + minimum_cooling_supply_temperature): self._model_name = model_name self._manufacturer = manufacturer self._system_type = system_type @@ -25,12 +27,17 @@ class GenerationSystem: self._nominal_thermal_output = nominal_thermal_output self._modulation_range = modulation_range self._source_types = source_types + self._supply_medium = supply_medium self._heat_efficiency = heat_efficiency self._cooling_efficiency = cooling_efficiency self._electricity_efficiency = electricity_efficiency self._source_temperature = source_temperature self._source_mass_flow = source_mass_flow self._nominal_electricity_output = nominal_electricity_output + self._maximum_heating_supply_temperature = maximum_heating_supply_temperature + self._minimum_heating_supply_temperature = minimum_heating_supply_temperature + self._maximum_cooling_supply_temperature = maximum_cooling_supply_temperature + self._minimum_cooling_supply_temperature = minimum_cooling_supply_temperature @property def model_name(self): @@ -88,6 +95,14 @@ class GenerationSystem: """ return self._source_types + @property + def supply_medium(self): + """ + Get the supply medium from ['air', 'water'] + :return: string + """ + return self._supply_medium + @property def heat_efficiency(self): """ @@ -136,21 +151,59 @@ class GenerationSystem: """ return self._nominal_electricity_output + @property + def maximum_heating_supply_temperature(self): + """ + Get the maximum heating supply temperature in degree Celsius + :return: float + """ + return self._minimum_heating_supply_temperature + + @property + def minimum_heating_supply_temperature(self): + """ + Get the minimum heating supply temperature in degree Celsius + :return: float + """ + return self._minimum_heating_supply_temperature + + @property + def maximum_cooling_supply_temperature(self): + """ + Get the maximum cooling supply temperature in degree Celsius + :return: float + """ + return self._maximum_cooling_supply_temperature + + @property + def minimum_cooling_supply_temperature(self): + """ + Get the minimum cooling supply temperature in degree Celsius + :return: float + """ + return self._minimum_cooling_supply_temperature + def to_dictionary(self): """Class content to dictionary""" - content = {'Energy Generation component': {'model name': self.model_name, - 'manufacturer': self.manufacturer, - 'type': self.system_type, - 'fuel type': self.fuel_type, - 'nominal thermal output': self.nominal_thermal_output, - 'modulation_range': self.modulation_range, - 'source types': self.source_types, - 'source temperature [Celsius]': self.source_temperature, - 'source mass flow [kg/s]': self.source_mass_flow, - 'heat efficiency': self.heat_efficiency, - 'cooling efficiency': self.cooling_efficiency, - 'electricity efficiency': self.electricity_efficiency, - 'nominal power output [kW]': self.nominal_electricity_output, - } - } + content = {'Energy Generation component': { + 'model name': self.model_name, + 'manufacturer': self.manufacturer, + 'type': self.system_type, + 'fuel type': self.fuel_type, + 'nominal thermal output': self.nominal_thermal_output, + 'modulation_range': self.modulation_range, + 'source types': self.source_types, + 'supply medium': self.supply_medium, + 'source temperature [Celsius]': self.source_temperature, + 'source mass flow [kg/s]': self.source_mass_flow, + 'heat efficiency': self.heat_efficiency, + 'cooling efficiency': self.cooling_efficiency, + 'electricity efficiency': self.electricity_efficiency, + 'nominal power output [kW]': self.nominal_electricity_output, + 'maximum heating supply temperature [Celsius]': self.maximum_heating_supply_temperature, + 'minimum heating supply temperature [Celsius]': self.minimum_heating_supply_temperature, + 'maximum cooling supply temperature [Celsius]': self.maximum_cooling_supply_temperature, + 'minimum cooling supply temperature [Celsius]': self.minimum_cooling_supply_temperature + } + } return content diff --git a/hub/catalog_factories/energy_systems/montreal_custom_catalog_new.py b/hub/catalog_factories/energy_systems/energy_system_catalog.py similarity index 99% rename from hub/catalog_factories/energy_systems/montreal_custom_catalog_new.py rename to hub/catalog_factories/energy_systems/energy_system_catalog.py index e24dde48..564b5d40 100644 --- a/hub/catalog_factories/energy_systems/montreal_custom_catalog_new.py +++ b/hub/catalog_factories/energy_systems/energy_system_catalog.py @@ -1,5 +1,5 @@ """ -Montreal custom energy systems catalog module +Energy system catalog SPDX - License - Identifier: LGPL - 3.0 - or -later Copyright © 2022 Concordia CERC group Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca @@ -18,7 +18,7 @@ from hub.catalog_factories.data_models.energy_systems.performance_curves import from hub.catalog_factories.data_models.energy_systems.archetype import Archetype -class MontrealCustomCatalog(Catalog): +class EnergySystem(Catalog): """ Montreal custom energy systems catalog class """ diff --git a/hub/data/energy_systems/Tools4CitiesESMF.encomp b/hub/data/energy_systems/Tools4CitiesESMF.encomp index 26344db0..06c9e622 100644 --- a/hub/data/energy_systems/Tools4CitiesESMF.encomp +++ b/hub/data/energy_systems/Tools4CitiesESMF.encomp @@ -2,42 +2,44 @@ - - - - - - - - - - - - - + + + + + + + + + + + + + - + - + - - - - - + + + + + + + - + - +