From ddf10fb2ae851165b2df6d7add6402896dc920b3 Mon Sep 17 00:00:00 2001 From: s_ranjbar Date: Fri, 15 Nov 2024 13:58:11 +0100 Subject: [PATCH] feat: catalogues and importers are modified to be able to be implemented with PV workflow --- .../data_models/energy_systems/archetype.py | 14 +- .../energy_systems/thermal_storage_system.py | 2 +- .../energy_systems/montreal_custom_catalog.py | 4 +- .../montreal_future_system_catalogue.py | 3 +- hub/city_model_structure/building.py | 125 +- .../building_demand/surface.py | 1 + hub/data/construction/palma_archetypes.json | 2 +- .../montreal_custom_systems.xml | 6 +- .../montreal_future_systems.xml | 1242 +++++++++++++---- hub/data/energy_systems/palma_systems.xml | 22 +- .../data/montreal_custom_fuel_to_hub_fuel.py | 1 + ..._system_to_hub_energy_generation_system.py | 2 +- ...ontreal_custom_energy_system_parameters.py | 15 +- ...ntreal_future_energy_systems_parameters.py | 25 +- .../palma_energy_systems_parameters.py | 2 +- tests/test_systems_catalog.py | 6 +- tests/test_systems_factory.py | 3 +- 17 files changed, 1148 insertions(+), 327 deletions(-) diff --git a/hub/catalog_factories/data_models/energy_systems/archetype.py b/hub/catalog_factories/data_models/energy_systems/archetype.py index 84bcef9a..7115767d 100644 --- a/hub/catalog_factories/data_models/energy_systems/archetype.py +++ b/hub/catalog_factories/data_models/energy_systems/archetype.py @@ -15,11 +15,20 @@ class Archetype: """ Archetype class """ - def __init__(self, name, systems): + def __init__(self, name, systems, archetype_cluster_id=None): + self._cluster_id = archetype_cluster_id self._name = name self._systems = systems + @property + def cluster_id(self): + """ + Get id + :return: string + """ + return self._cluster_id + @property def name(self): """ @@ -43,8 +52,9 @@ class Archetype: _systems.append(_system.to_dictionary()) content = { 'Archetype': { + 'cluster_id': self.cluster_id, 'name': self.name, 'systems': _systems - } } + } return content diff --git a/hub/catalog_factories/data_models/energy_systems/thermal_storage_system.py b/hub/catalog_factories/data_models/energy_systems/thermal_storage_system.py index ca773e09..583345aa 100644 --- a/hub/catalog_factories/data_models/energy_systems/thermal_storage_system.py +++ b/hub/catalog_factories/data_models/energy_systems/thermal_storage_system.py @@ -119,7 +119,7 @@ class ThermalStorageSystem(EnergyStorageSystem): 'height [m]': self.height, 'layers': _layers, 'maximum operating temperature [Celsius]': self.maximum_operating_temperature, - 'storage_medium': self.storage_medium.to_dictionary(), + 'storage_medium': _medias, 'heating coil capacity [W]': self.heating_coil_capacity } } diff --git a/hub/catalog_factories/energy_systems/montreal_custom_catalog.py b/hub/catalog_factories/energy_systems/montreal_custom_catalog.py index cace9278..9ec7b7ea 100644 --- a/hub/catalog_factories/energy_systems/montreal_custom_catalog.py +++ b/hub/catalog_factories/energy_systems/montreal_custom_catalog.py @@ -69,10 +69,10 @@ class MontrealCustomCatalog(Catalog): storage_system = ThermalStorageSystem(equipment_id) storage_systems = [storage_system] if model_name == 'PV system': - system_type = 'Photovoltaic' + system_type = 'photovoltaic' generation_system = PvGenerationSystem(equipment_id, name=None, - system_type= system_type, + system_type=system_type, model_name=model_name, electricity_efficiency=electricity_efficiency, energy_storage_systems=storage_systems diff --git a/hub/catalog_factories/energy_systems/montreal_future_system_catalogue.py b/hub/catalog_factories/energy_systems/montreal_future_system_catalogue.py index c5036a3e..4a9672ad 100644 --- a/hub/catalog_factories/energy_systems/montreal_future_system_catalogue.py +++ b/hub/catalog_factories/energy_systems/montreal_future_system_catalogue.py @@ -381,6 +381,7 @@ class MontrealFutureSystemCatalogue(Catalog): _system_archetypes = [] system_clusters = self._archetypes['EnergySystemCatalog']['system_archetypes']['system_archetype'] for system_cluster in system_clusters: + archetype_id = system_cluster['@cluster_id'] name = system_cluster['name'] systems = system_cluster['systems']['system_id'] integer_system_ids = [int(item) for item in systems] @@ -388,7 +389,7 @@ class MontrealFutureSystemCatalogue(Catalog): for system_archetype in self._systems: if int(system_archetype.id) in integer_system_ids: _systems.append(system_archetype) - _system_archetypes.append(Archetype(name=name, systems=_systems)) + _system_archetypes.append(Archetype(archetype_cluster_id=archetype_id, name=name, systems=_systems)) return _system_archetypes def _load_materials(self): diff --git a/hub/city_model_structure/building.py b/hub/city_model_structure/building.py index 5e838791..3555badf 100644 --- a/hub/city_model_structure/building.py +++ b/hub/city_model_structure/building.py @@ -92,6 +92,7 @@ class Building(CityObject): logging.error('Building %s [%s] has an unexpected surface type %s.', self.name, self.aliases, surface.type) self._domestic_hot_water_peak_load = None self._fuel_consumption_breakdown = {} + self._systems_archetype_cluster_id = None self._pv_generation = {} @property @@ -867,53 +868,87 @@ class Building(CityObject): Get energy consumption of different sectors return: dict """ - fuel_breakdown = {cte.ELECTRICITY: {cte.LIGHTING: self.lighting_electrical_demand[cte.YEAR][0], - cte.APPLIANCES: self.appliances_electrical_demand[cte.YEAR][0]}} + fuel_breakdown = {cte.ELECTRICITY: {cte.LIGHTING: self.lighting_electrical_demand[cte.YEAR][0] if self.lighting_electrical_demand else 0, + cte.APPLIANCES: self.appliances_electrical_demand[cte.YEAR][0] if self.appliances_electrical_demand else 0}} energy_systems = self.energy_systems - for energy_system in energy_systems: - demand_types = energy_system.demand_types - generation_systems = energy_system.generation_systems - for demand_type in demand_types: - for generation_system in generation_systems: - if generation_system.system_type != cte.PHOTOVOLTAIC: - if generation_system.fuel_type not in fuel_breakdown: - fuel_breakdown[generation_system.fuel_type] = {} - if demand_type in generation_system.energy_consumption: - fuel_breakdown[f'{generation_system.fuel_type}'][f'{demand_type}'] = ( - generation_system.energy_consumption)[f'{demand_type}'][cte.YEAR][0] - storage_systems = generation_system.energy_storage_systems - if storage_systems: - for storage_system in storage_systems: - if storage_system.type_energy_stored == 'thermal' and storage_system.heating_coil_energy_consumption: - fuel_breakdown[cte.ELECTRICITY][f'{demand_type}'] += storage_system.heating_coil_energy_consumption[cte.YEAR][0] - #TODO: When simulation models of all energy system archetypes are created, this part can be removed - heating_fuels = [] - dhw_fuels = [] - for energy_system in self.energy_systems: - if cte.HEATING in energy_system.demand_types: - for generation_system in energy_system.generation_systems: - heating_fuels.append(generation_system.fuel_type) - if cte.DOMESTIC_HOT_WATER in energy_system.demand_types: - for generation_system in energy_system.generation_systems: - dhw_fuels.append(generation_system.fuel_type) - for key in fuel_breakdown: - if key == cte.ELECTRICITY and cte.COOLING not in fuel_breakdown[key]: - for energy_system in energy_systems: - if cte.COOLING in energy_system.demand_types and cte.COOLING not in fuel_breakdown[key]: - for generation_system in energy_system.generation_systems: - fuel_breakdown[generation_system.fuel_type][cte.COOLING] = self.cooling_consumption[cte.YEAR][0] - for fuel in heating_fuels: - if cte.HEATING not in fuel_breakdown[fuel]: + if energy_systems is not None: + for energy_system in energy_systems: + demand_types = energy_system.demand_types + generation_systems = energy_system.generation_systems + for demand_type in demand_types: + for generation_system in generation_systems: + if generation_system.system_type != cte.PHOTOVOLTAIC: + if generation_system.fuel_type not in fuel_breakdown: + fuel_breakdown[generation_system.fuel_type] = {} + if demand_type in generation_system.energy_consumption: + fuel_breakdown[f'{generation_system.fuel_type}'][f'{demand_type}'] = ( + generation_system.energy_consumption)[f'{demand_type}'][cte.YEAR][0] + storage_systems = generation_system.energy_storage_systems + if storage_systems: + for storage_system in storage_systems: + if storage_system.type_energy_stored == 'thermal' and storage_system.heating_coil_energy_consumption: + fuel_breakdown[cte.ELECTRICITY][f'{demand_type}'] += ( + storage_system.heating_coil_energy_consumption)[f'{demand_type}'][cte.YEAR][0] + #TODO: When simulation models of all energy system archetypes are created, this part can be removed + heating_fuels = [] + dhw_fuels = [] + for energy_system in self.energy_systems: + if cte.HEATING in energy_system.demand_types: + for generation_system in energy_system.generation_systems: + heating_fuels.append(generation_system.fuel_type) + if cte.DOMESTIC_HOT_WATER in energy_system.demand_types: + for generation_system in energy_system.generation_systems: + dhw_fuels.append(generation_system.fuel_type) + for key in fuel_breakdown: + if key == cte.ELECTRICITY and cte.COOLING not in fuel_breakdown[key]: for energy_system in energy_systems: - if cte.HEATING in energy_system.demand_types: - for generation_system in energy_system.generation_systems: - fuel_breakdown[generation_system.fuel_type][cte.HEATING] = self.heating_consumption[cte.YEAR][0] - for fuel in dhw_fuels: - if cte.DOMESTIC_HOT_WATER not in fuel_breakdown[fuel]: - for energy_system in energy_systems: - if cte.DOMESTIC_HOT_WATER in energy_system.demand_types: - for generation_system in energy_system.generation_systems: - fuel_breakdown[generation_system.fuel_type][cte.DOMESTIC_HOT_WATER] = self.domestic_hot_water_consumption[cte.YEAR][0] + if cte.COOLING in energy_system.demand_types and cte.COOLING not in fuel_breakdown[key]: + if self.cooling_consumption: + fuel_breakdown[energy_system.generation_systems[0].fuel_type][cte.COOLING] = self.cooling_consumption[cte.YEAR][0] + for fuel in heating_fuels: + if cte.HEATING not in fuel_breakdown[fuel]: + for energy_system in energy_systems: + if cte.HEATING in energy_system.demand_types: + if self.heating_consumption: + fuel_breakdown[energy_system.generation_systems[0].fuel_type][cte.HEATING] = self.heating_consumption[cte.YEAR][0] + for fuel in dhw_fuels: + if cte.DOMESTIC_HOT_WATER not in fuel_breakdown[fuel]: + for energy_system in energy_systems: + if cte.DOMESTIC_HOT_WATER in energy_system.demand_types: + if self.domestic_hot_water_consumption: + fuel_breakdown[energy_system.generation_systems[0].fuel_type][cte.DOMESTIC_HOT_WATER] = self.domestic_hot_water_consumption[cte.YEAR][0] self._fuel_consumption_breakdown = fuel_breakdown return self._fuel_consumption_breakdown + @property + def energy_systems_archetype_cluster_id(self): + """ + Get energy systems archetype id + :return: str + """ + return self._systems_archetype_cluster_id + + @energy_systems_archetype_cluster_id.setter + def energy_systems_archetype_cluster_id(self, value): + """ + Set energy systems archetype id + :param value: str + """ + self._systems_archetype_cluster_id = value + + @property + def pv_generation(self): + """ + temporary attribute to get the onsite pv generation in W + :return: dict + """ + return self._pv_generation + + @pv_generation.setter + def pv_generation(self, value): + """ + temporary attribute to set the onsite pv generation in W + :param value: float + """ + self._pv_generation = value + diff --git a/hub/city_model_structure/building_demand/surface.py b/hub/city_model_structure/building_demand/surface.py index c67b157c..bf704d18 100644 --- a/hub/city_model_structure/building_demand/surface.py +++ b/hub/city_model_structure/building_demand/surface.py @@ -157,6 +157,7 @@ class Surface: if self._inclination is None: self._inclination = np.arccos(self.perimeter_polygon.normal[2]) return self._inclination + @property def type(self): """ diff --git a/hub/data/construction/palma_archetypes.json b/hub/data/construction/palma_archetypes.json index 8023d726..5e32e0fc 100644 --- a/hub/data/construction/palma_archetypes.json +++ b/hub/data/construction/palma_archetypes.json @@ -339,7 +339,7 @@ "infiltration_rate_area_for_ventilation_system_off": 0.0055, "constructions": { "OutdoorsWall": { - "opaque_surface_name": " C_1941_1960_FACEXT1", + "opaque_surface_name": "C_1941_1960_FACEXT1", "transparent_surface_name": "C_1941_1960_WIN1", "transparent_ratio": { "north": "30", diff --git a/hub/data/energy_systems/montreal_custom_systems.xml b/hub/data/energy_systems/montreal_custom_systems.xml index f3b0466f..14c77f88 100644 --- a/hub/data/energy_systems/montreal_custom_systems.xml +++ b/hub/data/energy_systems/montreal_custom_systems.xml @@ -198,7 +198,7 @@ 3 8 -g + Single zone packaged rooftop unit with electrical resistance furnace and baseboards and fuel boiler for acs @@ -240,7 +240,7 @@ g domestic_hot_water - 2 + 1 3 @@ -302,7 +302,7 @@ g 5 - 6 + 4 diff --git a/hub/data/energy_systems/montreal_future_systems.xml b/hub/data/energy_systems/montreal_future_systems.xml index 5d9b2fb6..e85ad3fb 100644 --- a/hub/data/energy_systems/montreal_future_systems.xml +++ b/hub/data/energy_systems/montreal_future_systems.xml @@ -448,7 +448,7 @@ 12 Photovoltaic Module - Photovoltaic + photovoltaic 445MS Canadian Solar @@ -684,14 +684,14 @@ 18 - template Air-to-Water heat pump with storage + template reversible 4-pipe air-to-water heat pump with storage heat pump - 2 + 2.5 True electricity Air @@ -737,7 +737,7 @@ 19 - template Groundwater-to-Water heat pump with storage + template reversible 4-pipe groundwater-to-water heat pump with storage heat pump @@ -778,7 +778,7 @@ 20 - template Water-to-Water heat pump with storage + template reversible 4-pipe water-to-water heat pump with storage heat pump @@ -897,7 +897,7 @@ 23 - template Air-to-Water heat pump + template reversible 4-pipe air-to-water heat pump heat pump @@ -928,7 +928,7 @@ COP source_temperature supply_temperature - + @@ -948,7 +948,7 @@ 24 - template Groundwater-to-Water heat pump + template reversible 4-pipe groundwater-to-water heat pump heat pump @@ -963,7 +963,7 @@ - + 5 @@ -987,14 +987,14 @@ 25 - template Water-to-Water heat pump + template reversible 4-pipe water-to-water heat pump heat pump - 3.5 + 4 True electricity Water @@ -1002,7 +1002,7 @@ - + 6 @@ -1024,30 +1024,62 @@ True - + 26 - template Photovoltaic Module - Photovoltaic + template reversible 2-pipe air-to-water heat pump with storage + heat pump + + + + 3 + True + electricity + Air + Water + + + + 4.5 + + + - 0.2 - - - - - - - - 1.0 - 1.0 + + + + + + + + bi-quadratic + COP + source_temperature + supply_temperature + + + + + + bi-quadratic + COP + source_temperature + supply_temperature + + - + + 6 + + False + + False - + 27 - template domestic hot water heat pump + template reversible 2-pipe groundwater-to-water heat pump with storage heat pump @@ -1055,6 +1087,385 @@ 3.5 + True + electricity + Ground + Water + + + + 5 + + + + + + + + + + + + + + + + + 6 + + False + + + False + + + 28 + template reversible 2-pipe water-to-water heat pump with storage + heat pump + + + + + + 4 + True + electricity + Water + Water + + + + 6 + + + + + + + + + + + + + + + + + 6 + + False + + + False + + + 29 + template reversible 2-pipe air-to-water heat pump + heat pump + + + + + + 3 + True + electricity + Air + Water + + + + 4.5 + + + + + + + + + + + + bi-quadratic + COP + source_temperature + supply_temperature + + + + + + bi-quadratic + COP + source_temperature + supply_temperature + + + + + False + + + False + + + 30 + template reversible 2-pipe groundwater-to-water heat pump + heat pump + + + + + + 3.5 + True + electricity + Ground + Water + + + + 5 + + + + + + + + + + + + + + + + + False + + + False + + + 31 + template reversible 2-pipe water-to-water heat pump + heat pump + + + + + + 4 + True + electricity + Water + Water + + + + 6 + + + + + + + + + + + + + + + + + False + + + False + + + 32 + template air-to-water heating heat pump + heat pump + + + + + + 3 + False + electricity + Air + Water + + + + + + + + + + + + + + + + bi-quadratic + COP + source_temperature + supply_temperature + + + + + + + + False + + + False + + + 33 + template groundwater-to-water heating heat pump + heat pump + + + + + + 3.5 + False + electricity + Ground + Water + + + + 5 + + + + + + + + + + + + + + + + + False + + + False + + + 34 + template water-to-water heating heat pump + heat pump + + + + + + 4 + False + electricity + Water + Water + + + + 6 + + + + + + + + + + + + + + + + + False + + + False + + + 35 + template unitary split system + heat pump + + + + + + + False + electricity + Air + Air + + + + 3 + + + + + + + + + + + + + + + bi-quadratic + COP + source_temperature + supply_temperature + + + + + False + + + False + + + 36 + template domestic hot water heat pump + heat pump + + + + + + 3.2 electricity Air @@ -1078,7 +1489,7 @@ COP source_temperature supply_temperature - + @@ -1092,6 +1503,216 @@ False + + 37 + template Photovoltaic Module + photovoltaic + + + + 0.2 + 20 + 45 + 800 + 25 + 1000 + 500 + 0.34 + 2.0 + 1.0 + + + False + + + 38 + Photovoltaic Module + photovoltaic + RE400CAA Pure 2 + REC + 305 + 0.206 + 20 + 44 + 800 + 25 + 1000 + 400 + 0.24 + 1.86 + 1.04 + + + False + + + 39 + Photovoltaic Module + photovoltaic + RE410CAA Pure 2 + REC + 312 + 0.211 + 20 + 44 + 800 + 25 + 1000 + 410 + 0.24 + 1.86 + 1.04 + + + False + + + 40 + Photovoltaic Module + photovoltaic + RE420CAA Pure 2 + REC + 320 + 0.217 + 20 + 44 + 800 + 25 + 1000 + 420 + 0.24 + 1.86 + 1.04 + + + False + + + 41 + Photovoltaic Module + photovoltaic + RE430CAA Pure 2 + REC + 327 + 0.222 + 20 + 44 + 800 + 25 + 1000 + 430 + 0.24 + 1.86 + 1.04 + + + False + + + 42 + Photovoltaic Module + photovoltaic + REC600AA Pro M + REC + 457 + 0.211 + 20 + 44 + 800 + 25 + 1000 + 600 + 0.24 + 2.17 + 1.3 + + + False + + + 43 + Photovoltaic Module + photovoltaic + REC610AA Pro M + REC + 464 + 0.215 + 20 + 44 + 800 + 25 + 1000 + 610 + 0.24 + 2.17 + 1.3 + + + False + + + 44 + Photovoltaic Module + photovoltaic + REC620AA Pro M + REC + 472 + 0.218 + 20 + 44 + 800 + 25 + 1000 + 620 + 0.24 + 2.17 + 1.3 + + + False + + + 45 + Photovoltaic Module + photovoltaic + REC630AA Pro M + REC + 480 + 0.222 + 20 + 44 + 800 + 25 + 1000 + 630 + 0.24 + 2.17 + 1.3 + + + False + + + 46 + Photovoltaic Module + photovoltaic + REC640AA Pro M + REC + 487 + 0.215 + 20 + 44 + 800 + 25 + 1000 + 640 + 0.24 + 2.17 + 1.3 + + + False + @@ -1182,7 +1803,8 @@ 1 90.0 - + + 2 0 1.5 @@ -1273,7 +1895,7 @@ sensible - 5000 + 0 @@ -1311,101 +1933,18 @@ 1 - 4 pipe storage equipped air source heat pump and gas boiler - schemas/ASHP+TES+GasBoiler.jpg - - heating - cooling - - - 21 - 18 - - - - 2 - 4 pipe storage equipped air source heat pump and electrical boiler - schemas/ASHP+TES+GasBoiler.jpg - - heating - cooling - domestic_hot_water - - - 22 - 18 - - - - 3 - 4 pipe storage equipped ground source heat pump and gas boiler - schemas/GSHP+TES+GasBoiler.jpg - - heating - cooling - domestic_hot_water - - - 21 - 19 - - - - 4 - 4 pipe storage equipped ground source heat pump and electrical boiler - schemas/GSHP+TES+ElectricBoiler.jpg - - heating - cooling - domestic_hot_water - - - 22 - 19 - - - - 5 - 4 pipe storage equipped ground source heat pump and gas boiler - schemas/WSHP+TES+GasBoiler.jpg - - heating - cooling - domestic_hot_water - - - 21 - 20 - - - - 6 - 4 pipe storage equipped ground source heat pump and electrical boiler - schemas/WSHP+TES+ElectricBoiler.jpg - - heating - cooling - domestic_hot_water - - - 22 - 20 - - - - 7 Photovoltaic System schemas/PV.jpg electricity - 26 + 37 - 8 - 4 pipe system with air source heat pump storage and gas boiler + 2 + 4 pipe central air to water heat pump with storage tank and gas boiler schemas/ASHP+TES+GasBoiler.jpg heating @@ -1417,157 +1956,382 @@ - 9 - 4 pipe system with air source heat pump storage and electric boiler + 3 + 4 pipe central air to water heat pump with storage tank and electric boiler + schemas/ASHP+TES+GasBoiler.jpg + + heating + cooling + + + 23 + 17 + + + + 4 + 4 pipe central ground to water heat pump with storage tank and gas boiler + schemas/ASHP+TES+GasBoiler.jpg + + heating + cooling + + + 24 + 16 + + + + 5 + 4 pipe central ground to water heat pump with storage tank and electric boiler + schemas/ASHP+TES+GasBoiler.jpg + + heating + cooling + + + 24 + 17 + + + + 6 + 4 pipe central water to water heat pump with storage tank and gas boiler + schemas/ASHP+TES+GasBoiler.jpg + + heating + cooling + + + 25 + 16 + + + + 7 + 4 pipe central water to water heat pump with storage tank and electric boiler + schemas/ASHP+TES+GasBoiler.jpg + + heating + cooling + + + 25 + 17 + + + + 8 + 4 pipe central air to water heat pump with storage tank schemas/ASHP+TES+GasBoiler.jpg heating cooling - 22 18 + + 9 + 4 pipe central ground to water heat pump with storage tank + schemas/ASHP+TES+GasBoiler.jpg + + heating + cooling + + + 19 + + 10 + 4 pipe central water to water heat pump with storage tank + schemas/ASHP+TES+GasBoiler.jpg + + heating + cooling + + + 20 + + + + 11 + hydronic heating system with air source heat pump storage tank and auxiliary gas boiler + schemas/ASHP+TES+GasBoiler.jpg + + heating + + + 32 + 16 + + + + 12 + hydronic heating system with air source heat pump storage tank and auxiliary electric boiler + schemas/ASHP+TES+GasBoiler.jpg + + heating + + + 32 + 17 + + + + 13 + hydronic heating system with ground source heat pump storage tank and auxiliary gas boiler + schemas/ASHP+TES+GasBoiler.jpg + + heating + + + 33 + 16 + + + + 14 + hydronic heating system with ground source heat pump storage tank and auxiliary electric boiler + schemas/ASHP+TES+GasBoiler.jpg + + heating + + + 33 + 17 + + + + 15 + hydronic heating system with water source heat pump storage tank and auxiliary gas boiler + schemas/ASHP+TES+GasBoiler.jpg + + heating + + + 34 + 16 + + + + 16 + hydronic heating system with water source heat pump storage tank and auxiliary gas boiler + schemas/ASHP+TES+GasBoiler.jpg + + heating + cooling + + + 35 + 17 + + + + 17 + district heating network with air to water heat pump gas boiler thermal storage tank + schemas/ASHP+TES+GasBoiler.jpg + + heating + + + 23 + 16 + + + + 18 + district heating network with air to water heat pump electrical boiler thermal storage tank + schemas/ASHP+TES+GasBoiler.jpg + + heating + + + 23 + 17 + + + + 19 + district heating network with ground to water heat pump gas boiler thermal storage tank + schemas/ASHP+TES+GasBoiler.jpg + + heating + + + 24 + 16 + + + + 20 + district heating network with ground to water heat pump electrical boiler thermal storage tank + schemas/ASHP+TES+GasBoiler.jpg + + heating + + + 24 + 17 + + + + 21 + district heating network with water to water heat pump gas boiler thermal storage tank + schemas/ASHP+TES+GasBoiler.jpg + + heating + + + 25 + 16 + + + + 22 + district heating network with water to water heat pump electrical boiler thermal storage tank + schemas/ASHP+TES+GasBoiler.jpg + + heating + + + 25 + 17 + + + + 23 + Unitary split cooling system + schemas/ASHP+TES+GasBoiler.jpg + + cooling + + + 35 + + + + 24 Domestic Hot Water Heat Pump with Coiled Storage schemas/ASHP+TES+GasBoiler.jpg domestic_hot_water - 27 - - - - 11 - Central Heating System َASHP Gas-Boiler TES - schemas/ASHP+TES+GasBoiler.jpg - - heating - - - 23 - 16 - - - - 12 - Unitary ASHP Cooling System - schemas/ASHP+TES+GasBoiler.jpg - - cooling - - - 23 + 36 - - PV+ASHP+GasBoiler+TES - - 7 - 1 - 10 - - - - PV+ASHP+ElectricBoiler+TES - - 7 - 2 - - - - PV+GSHP+GasBoiler+TES - - 7 - 3 - - - - PV+GSHP+ElectricBoiler+TES - - 7 - 4 - - - - PV+WSHP+GasBoiler+TES - - 7 - 5 - - - - PV+WSHP+ElectricBoiler+TES - - 7 - 6 - - - - ASHP+GasBoiler+TES + + Central Hydronic Air and Gas Source Heating System with Unitary Split Cooling and Air Source HP DHW and PV 1 - - - - ASHP+ElectricBoiler+TES - - 2 - - - - GSHP+GasBoiler+TES - - 3 - - - - GSHP+ElectricBoiler+TES - - 4 - - - - WSHP+GasBoiler+TES - - 5 - - - - WSHP+ElectricBoiler+TES - - 6 - - - - PV+4Pipe+DHW - - 7 - 8 - 10 - - - - Central Heating+Unitary Cooling+Unitary DHW - - 10 11 - 12 + 23 + 24 - - Central Heating+Unitary Cooling+Unitary DHW+PV + + Central Hydronic Air and Electricity Source Heating System with Unitary Split Cooling and Air Source HP DHW and PV + + 1 + 12 + 23 + 8 + + + + Central Hydronic Ground and Gas Source Heating System with Unitary Split Cooling and Air Source HP DHW and PV + + 1 + 13 + 23 + 24 + + + + Central Hydronic Ground and Electricity Source Heating System with Unitary Split Cooling and Air Source HP DHW and PV + + 1 + 14 + 23 + 24 + + + + Central Hydronic Water and Gas Source Heating System with Unitary Split Cooling and Air Source HP DHW and PV + + 1 + 15 + 23 + 24 + + + + Central Hydronic Water and Electricity Source Heating System with Unitary Split Cooling and Air Source HP DHW and PV + + 1 + 16 + 23 + 24 + + + + Central Hydronic Air and Gas Source Heating System with Unitary Split and Air Source HP DHW - 7 - 10 11 - 12 + 23 + 24 + + + + Central Hydronic Air and Electricity Source Heating System with Unitary Split and Air Source HP DHW + + 12 + 23 + 24 + + + + Central Hydronic Ground and Gas Source Heating System with Unitary Split and Air Source HP DHW + + 13 + 23 + 24 + + + + Central Hydronic Ground and Electricity Source Heating System with Unitary Split and Air Source HP DHW + + 14 + 23 + 24 + + + + Central Hydronic Water and Gas Source Heating System with Unitary Split and Air Source HP DHW + + 15 + 23 + 24 + + + + Central Hydronic Water and Electricity Source Heating System with Unitary Split and Air Source HP DHW + + 16 + 23 + 24 + + + + Grid-Tied PV System + + 1 diff --git a/hub/data/energy_systems/palma_systems.xml b/hub/data/energy_systems/palma_systems.xml index 1b788dbf..71177c89 100644 --- a/hub/data/energy_systems/palma_systems.xml +++ b/hub/data/energy_systems/palma_systems.xml @@ -253,7 +253,7 @@ 7 template Photovoltaic Module - Photovoltaic + photovoltaic @@ -264,7 +264,7 @@ 25 1000 500 - + 0.3 2.0 1.0 @@ -274,7 +274,7 @@ 8 Photovoltaic Module - Photovoltaic + photovoltaic RE400CAA Pure 2 REC 305 @@ -295,7 +295,7 @@ 9 Photovoltaic Module - Photovoltaic + photovoltaic RE410CAA Pure 2 REC 312 @@ -316,7 +316,7 @@ 10 Photovoltaic Module - Photovoltaic + photovoltaic RE420CAA Pure 2 REC 320 @@ -337,7 +337,7 @@ 11 Photovoltaic Module - Photovoltaic + photovoltaic RE430CAA Pure 2 REC 327 @@ -358,7 +358,7 @@ 12 Photovoltaic Module - Photovoltaic + photovoltaic REC600AA Pro M REC 457 @@ -379,7 +379,7 @@ 13 Photovoltaic Module - Photovoltaic + photovoltaic REC610AA Pro M REC 464 @@ -400,7 +400,7 @@ 14 Photovoltaic Module - Photovoltaic + photovoltaic REC620AA Pro M REC 472 @@ -421,7 +421,7 @@ 15 Photovoltaic Module - Photovoltaic + photovoltaic REC630AA Pro M REC 480 @@ -442,7 +442,7 @@ 16 Photovoltaic Module - Photovoltaic + photovoltaic REC640AA Pro M REC 487 diff --git a/hub/helpers/data/montreal_custom_fuel_to_hub_fuel.py b/hub/helpers/data/montreal_custom_fuel_to_hub_fuel.py index be65a012..8bfc716d 100644 --- a/hub/helpers/data/montreal_custom_fuel_to_hub_fuel.py +++ b/hub/helpers/data/montreal_custom_fuel_to_hub_fuel.py @@ -17,6 +17,7 @@ class MontrealCustomFuelToHubFuel: self._dictionary = { 'gas': cte.GAS, 'natural gas': cte.GAS, + 'biomass': cte.BIOMASS, 'electricity': cte.ELECTRICITY, 'renewable': cte.RENEWABLE, 'butane': cte.BUTANE, diff --git a/hub/helpers/data/montreal_generation_system_to_hub_energy_generation_system.py b/hub/helpers/data/montreal_generation_system_to_hub_energy_generation_system.py index be85d7b6..163f74df 100644 --- a/hub/helpers/data/montreal_generation_system_to_hub_energy_generation_system.py +++ b/hub/helpers/data/montreal_generation_system_to_hub_energy_generation_system.py @@ -18,7 +18,7 @@ class MontrealGenerationSystemToHubEnergyGenerationSystem: 'furnace': cte.BASEBOARD, 'cooler': cte.CHILLER, 'electricity generator': cte.ELECTRICITY_GENERATOR, - 'Photovoltaic': cte.PHOTOVOLTAIC, + 'photovoltaic': cte.PHOTOVOLTAIC, 'heat pump': cte.HEAT_PUMP, 'joule': cte.JOULE, 'split': cte.SPLIT, diff --git a/hub/imports/energy_systems/montreal_custom_energy_system_parameters.py b/hub/imports/energy_systems/montreal_custom_energy_system_parameters.py index 710efd00..4bbb83ef 100644 --- a/hub/imports/energy_systems/montreal_custom_energy_system_parameters.py +++ b/hub/imports/energy_systems/montreal_custom_energy_system_parameters.py @@ -3,6 +3,7 @@ Montreal custom energy system importer SPDX - License - Identifier: LGPL - 3.0 - or -later Copyright © 2023 Concordia CERC group Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca +Project Contributor Saeed Ranjbar saeed.ranjbar@concordia.ca """ import logging @@ -83,9 +84,9 @@ class MontrealCustomEnergySystemParameters: def _create_generation_systems(archetype_system): _generation_systems = [] for archetype_generation_system in archetype_system.generation_systems: - if archetype_generation_system.system_type == 'Photovoltaic': + if archetype_generation_system.system_type == 'photovoltaic': _generation_system = PvGenerationSystem() - _type = 'Photovoltaic' + _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] @@ -136,14 +137,14 @@ class MontrealCustomEnergySystemParameters: _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 + _generic_emission_system = None if archetype_distribution_system.emission_systems is not None: _emission_systems = [] for emission_system in archetype_distribution_system.emission_systems: - _emission_system = EmissionSystem() - _emission_system.parasitic_energy_consumption = emission_system.parasitic_energy_consumption - _emission_systems.append(_emission_system) - _distribution_system.emission_systems = _emission_systems + _generic_emission_system = EmissionSystem() + _generic_emission_system.parasitic_energy_consumption = emission_system.parasitic_energy_consumption + _emission_systems.append(_generic_emission_system) + _distribution_system.emission_systems = _emission_systems _distribution_systems.append(_distribution_system) return _distribution_systems diff --git a/hub/imports/energy_systems/montreal_future_energy_systems_parameters.py b/hub/imports/energy_systems/montreal_future_energy_systems_parameters.py index 73484f33..76ac9351 100644 --- a/hub/imports/energy_systems/montreal_future_energy_systems_parameters.py +++ b/hub/imports/energy_systems/montreal_future_energy_systems_parameters.py @@ -43,6 +43,7 @@ class MontrealFutureEnergySystemParameters: archetype_name = building.energy_systems_archetype_name try: archetype = self._search_archetypes(montreal_custom_catalog, archetype_name) + building.energy_systems_archetype_cluster_id = archetype.cluster_id except KeyError: logging.error('Building %s has unknown energy system archetype for system name %s', building.name, archetype_name) @@ -87,7 +88,7 @@ class MontrealFutureEnergySystemParameters: archetype_generation_systems = archetype_system.generation_systems if archetype_generation_systems is not None: for archetype_generation_system in archetype_system.generation_systems: - if archetype_generation_system.system_type == 'Photovoltaic': + if archetype_generation_system.system_type == 'photovoltaic': _generation_system = PvGenerationSystem() _generation_system.name = archetype_generation_system.name _generation_system.model_name = archetype_generation_system.model_name @@ -103,15 +104,21 @@ class MontrealFutureEnergySystemParameters: _generation_system.nominal_radiation = archetype_generation_system.nominal_radiation _generation_system.standard_test_condition_cell_temperature = archetype_generation_system.standard_test_condition_cell_temperature _generation_system.standard_test_condition_maximum_power = archetype_generation_system.standard_test_condition_maximum_power + _generation_system.standard_test_condition_radiation = archetype_generation_system.standard_test_condition_radiation _generation_system.cell_temperature_coefficient = archetype_generation_system.cell_temperature_coefficient _generation_system.width = archetype_generation_system.width _generation_system.height = archetype_generation_system.height _generation_system.tilt_angle = self._city.latitude _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] + _storage_systems = [] + for storage_system in archetype_generation_system.energy_storage_systems: + if storage_system.type_energy_stored == 'electrical': + _generic_storage_system = ElectricalStorageSystem() + _generic_storage_system.type_energy_stored = 'electrical' + _storage_systems.append(_generic_storage_system) + _generation_system.energy_storage_systems = _storage_systems + else: _generation_system = NonPvGenerationSystem() _generation_system.name = archetype_generation_system.name @@ -185,14 +192,14 @@ class MontrealFutureEnergySystemParameters: _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 + _generic_emission_system = None if archetype_distribution_system.emission_systems is not None: _emission_systems = [] for emission_system in archetype_distribution_system.emission_systems: - _emission_system = EmissionSystem() - _emission_system.parasitic_energy_consumption = emission_system.parasitic_energy_consumption - _emission_systems.append(_emission_system) - _distribution_system.emission_systems = _emission_systems + _generic_emission_system = EmissionSystem() + _generic_emission_system.parasitic_energy_consumption = emission_system.parasitic_energy_consumption + _emission_systems.append(_generic_emission_system) + _distribution_system.emission_systems = _emission_systems _distribution_systems.append(_distribution_system) return _distribution_systems diff --git a/hub/imports/energy_systems/palma_energy_systems_parameters.py b/hub/imports/energy_systems/palma_energy_systems_parameters.py index f61f5ea1..5e6b149f 100644 --- a/hub/imports/energy_systems/palma_energy_systems_parameters.py +++ b/hub/imports/energy_systems/palma_energy_systems_parameters.py @@ -87,7 +87,7 @@ class PalmaEnergySystemParameters: archetype_generation_systems = archetype_system.generation_systems if archetype_generation_systems is not None: for archetype_generation_system in archetype_system.generation_systems: - if archetype_generation_system.system_type == 'Photovoltaic': + if archetype_generation_system.system_type == 'photovoltaic': _generation_system = PvGenerationSystem() _generation_system.name = archetype_generation_system.name _generation_system.model_name = archetype_generation_system.model_name diff --git a/tests/test_systems_catalog.py b/tests/test_systems_catalog.py index d31dfb99..b8011ea6 100644 --- a/tests/test_systems_catalog.py +++ b/tests/test_systems_catalog.py @@ -39,11 +39,11 @@ class TestSystemsCatalog(TestCase): catalog_categories = catalog.names() archetypes = catalog.names() - self.assertEqual(15, len(archetypes['archetypes'])) + self.assertEqual(13, len(archetypes['archetypes'])) systems = catalog.names('systems') - self.assertEqual(12, len(systems['systems'])) + self.assertEqual(24, len(systems['systems'])) generation_equipments = catalog.names('generation_equipments') - self.assertEqual(27, len(generation_equipments['generation_equipments'])) + self.assertEqual(46, len(generation_equipments['generation_equipments'])) with self.assertRaises(ValueError): catalog.names('unknown') diff --git a/tests/test_systems_factory.py b/tests/test_systems_factory.py index 95393fbf..26c2534d 100644 --- a/tests/test_systems_factory.py +++ b/tests/test_systems_factory.py @@ -114,7 +114,8 @@ class TestSystemsFactory(TestCase): ResultFactory('insel_monthly_energy_balance', self._city, self._output_path).enrich() for building in self._city.buildings: - building.energy_systems_archetype_name = 'PV+ASHP+GasBoiler+TES' + building.energy_systems_archetype_name = ('Central Hydronic Air and Gas Source Heating System with Unitary Split ' + 'Cooling and Air Source HP DHW and PV') EnergySystemsFactory('montreal_future', self._city).enrich() # Need to assign energy systems to buildings: for building in self._city.buildings: