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..6c5678f0 100644 --- a/hub/catalog_factories/energy_systems/montreal_future_system_catalogue.py +++ b/hub/catalog_factories/energy_systems/montreal_future_system_catalogue.py @@ -30,7 +30,8 @@ class MontrealFutureSystemCatalogue(Catalog): path = str(path / 'montreal_future_systems.xml') with open(path, 'r', encoding='utf-8') as xml: self._archetypes = xmltodict.parse(xml.read(), - force_list=['pv_generation_component', 'templateStorages', 'demand']) + force_list=['pv_generation_component', 'templateStorages', 'demand', + 'system', 'system_id']) self._storage_components = self._load_storage_components() self._generation_components = self._load_generation_components() @@ -49,7 +50,7 @@ class MontrealFutureSystemCatalogue(Catalog): 'non_pv_generation_component'] if non_pv_generation_components is not None: for non_pv in non_pv_generation_components: - system_id = non_pv['system_id'] + system_id = non_pv['generation_system_id'] name = non_pv['name'] system_type = non_pv['system_type'] model_name = non_pv['model_name'] @@ -181,7 +182,7 @@ class MontrealFutureSystemCatalogue(Catalog): 'pv_generation_component'] if pv_generation_components is not None: for pv in pv_generation_components: - system_id = pv['system_id'] + system_id = pv['generation_system_id'] name = pv['name'] system_type = pv['system_type'] model_name = pv['model_name'] @@ -381,6 +382,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 +390,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 0083cb16..3fd84df8 100644 --- a/hub/city_model_structure/building.py +++ b/hub/city_model_structure/building.py @@ -93,6 +93,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 @@ -887,53 +888,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..12f5130e 100644 --- a/hub/data/energy_systems/montreal_future_systems.xml +++ b/hub/data/energy_systems/montreal_future_systems.xml @@ -17,7 +17,7 @@ - 1 + 1 Natural-Gas Boiler boiler ALP080B @@ -56,7 +56,7 @@ False - 2 + 2 Natural-Gas boiler boiler ALP105B @@ -95,7 +95,7 @@ False - 3 + 3 Natural-Gas boiler boiler ALP150B @@ -134,7 +134,7 @@ False - 4 + 4 Natural-Gas boiler boiler ALP210B @@ -173,7 +173,7 @@ False - 5 + 5 Natural-Gas boiler boiler ALTAC-136 @@ -212,7 +212,7 @@ False - 6 + 6 Natural-Gas boiler boiler ALTA-120 @@ -251,7 +251,7 @@ False - 7 + 7 Natural-Gas boiler boiler ASPN-085 @@ -290,7 +290,7 @@ False - 8 + 8 Natural-Gas boiler boiler ASPN-110 @@ -329,7 +329,7 @@ False - 9 + 9 Natural-Gas boiler boiler ASPNC-155 @@ -368,7 +368,7 @@ False - 10 + 10 Natural-Gas boiler boiler K2WTC-135B @@ -407,7 +407,7 @@ False - 11 + 11 Natural-Gas boiler boiler K2WTC-180B @@ -446,27 +446,27 @@ False - 12 + 12 Photovoltaic Module - Photovoltaic + photovoltaic 445MS Canadian Solar - - - - - - - - - + 332 + 0.201 + 20 + 40 + 800 + 25 + 1000 + 445 + 0.35 2.01 1.048 - 13 + 13 Air-to-Water heat pump heat pump CMAA 012 @@ -511,7 +511,7 @@ False - 14 + 14 Air-to-Water heat pump heat pump CMAA 70 @@ -556,7 +556,7 @@ False - 15 + 15 Air-to-Water heat pump heat pump CMAA 140 @@ -601,7 +601,7 @@ False - 16 + 16 template Natural-Gas boiler boiler @@ -642,7 +642,7 @@ False - 17 + 17 template Electric boiler boiler @@ -683,15 +683,15 @@ False - 18 - template Air-to-Water heat pump with storage + 18 + template reversible 4-pipe air-to-water heat pump with storage heat pump - 2 + 2.5 True electricity Air @@ -736,8 +736,8 @@ True - 19 - template Groundwater-to-Water heat pump with storage + 19 + template reversible 4-pipe groundwater-to-water heat pump with storage heat pump @@ -777,8 +777,8 @@ True - 20 - template Water-to-Water heat pump with storage + 20 + template reversible 4-pipe water-to-water heat pump with storage heat pump @@ -818,7 +818,7 @@ False - 21 + 21 template Natural-Gas boiler boiler @@ -857,7 +857,7 @@ False - 22 + 22 template Electric boiler boiler @@ -896,8 +896,8 @@ False - 23 - template Air-to-Water heat pump + 23 + template reversible 4-pipe air-to-water heat pump heat pump @@ -928,7 +928,7 @@ COP source_temperature supply_temperature - + @@ -947,8 +947,8 @@ True - 24 - template Groundwater-to-Water heat pump + 24 + template reversible 4-pipe groundwater-to-water heat pump heat pump @@ -963,7 +963,7 @@ - + 5 @@ -986,8 +986,100 @@ True - 25 - template Water-to-Water heat pump + 25 + template reversible 4-pipe water-to-water heat pump + heat pump + + + + + + 4 + True + electricity + Water + Water + + + + 6 + + + + + + + + + + + + + + + + + True + + + True + + + 26 + template reversible 2-pipe air-to-water heat pump with storage + heat pump + + + + + + 3 + True + electricity + Air + Water + + + + 4.5 + + + + + + + + + + + + bi-quadratic + COP + source_temperature + supply_temperature + + + + + + bi-quadratic + COP + source_temperature + supply_temperature + + + + + 6 + + False + + + False + + + 27 + template reversible 2-pipe groundwater-to-water heat pump with storage heat pump @@ -997,11 +1089,222 @@ 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 + + + @@ -1013,41 +1316,26 @@ - + + bi-quadratic + COP + source_temperature + supply_temperature + + - True + False - True - - - 26 - template Photovoltaic Module - Photovoltaic - - - - 0.2 - - - - - - - - 1.0 - 1.0 - - False - + - 27 - template domestic hot water heat pump + 33 + template groundwater-to-water heating heat pump heat pump @@ -1055,6 +1343,129 @@ 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,333 @@ False + + 37 + template gas furnace + furnace + + + + + + 0.85 + + natural gas + + + + + + + + + + + + + + + + + + + + + + + + + + False + + + 38 + template electrical furnace + furnace + + + + + + 0.85 + + electricity + + + + + + + + + + + + + + + + + + + + + + + + + + False + + + 39 + template air cooled DX with external condenser + cooler + + + + + + + + electricity + + + + + + 3.23 + + + + + + + + + + + + + + + + + + + + False + + + 40 + template Photovoltaic Module + photovoltaic + + + + 0.2 + 20 + 45 + 800 + 25 + 1000 + 500 + 0.34 + 2.0 + 1.0 + + + False + + + 41 + Photovoltaic Module + photovoltaic + RE400CAA Pure 2 + REC + 305 + 0.206 + 20 + 44 + 800 + 25 + 1000 + 400 + 0.24 + 1.86 + 1.04 + + + False + + + 42 + Photovoltaic Module + photovoltaic + RE410CAA Pure 2 + REC + 312 + 0.211 + 20 + 44 + 800 + 25 + 1000 + 410 + 0.24 + 1.86 + 1.04 + + + False + + + 43 + Photovoltaic Module + photovoltaic + RE420CAA Pure 2 + REC + 320 + 0.217 + 20 + 44 + 800 + 25 + 1000 + 420 + 0.24 + 1.86 + 1.04 + + + False + + + 44 + Photovoltaic Module + photovoltaic + RE430CAA Pure 2 + REC + 327 + 0.222 + 20 + 44 + 800 + 25 + 1000 + 430 + 0.24 + 1.86 + 1.04 + + + False + + + 45 + Photovoltaic Module + photovoltaic + REC600AA Pro M + REC + 457 + 0.211 + 20 + 44 + 800 + 25 + 1000 + 600 + 0.24 + 2.17 + 1.3 + + + False + + + 46 + Photovoltaic Module + photovoltaic + REC610AA Pro M + REC + 464 + 0.215 + 20 + 44 + 800 + 25 + 1000 + 610 + 0.24 + 2.17 + 1.3 + + + False + + + 47 + Photovoltaic Module + photovoltaic + REC620AA Pro M + REC + 472 + 0.218 + 20 + 44 + 800 + 25 + 1000 + 620 + 0.24 + 2.17 + 1.3 + + + False + + + 48 + Photovoltaic Module + photovoltaic + REC630AA Pro M + REC + 480 + 0.222 + 20 + 44 + 800 + 25 + 1000 + 630 + 0.24 + 2.17 + 1.3 + + + False + + + 49 + 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 +1920,8 @@ 1 90.0 - + + 2 0 1.5 @@ -1273,7 +2012,7 @@ sensible - 5000 + 0 @@ -1311,101 +2050,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 + 40 - 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,159 +2073,713 @@ - 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 + 36 - 11 - Central Heating System َASHP Gas-Boiler TES + 25 + Unitary air conditioner with baseboard heater fuel fired boiler schemas/ASHP+TES+GasBoiler.jpg - - heating - - - 23 - 16 - - + + heating + domestic_hot_water + + + 21 + + - 12 - Unitary ASHP Cooling System + 26 + Unitary air conditioner with baseboard heater electrical boiler schemas/ASHP+TES+GasBoiler.jpg - - cooling - - - 23 - - + + heating + domestic_hot_water + + + 22 + + + + 27 + 4 pipe fan coils with fuel fired boiler + schemas/ASHP+TES+GasBoiler.jpg + + heating + domestic_hot_water + + + 21 + + + + 28 + 4 pipe fan coils with electrical resistance water boiler + schemas/ASHP+TES+GasBoiler.jpg + + heating + domestic_hot_water + + + 21 + + + + 29 + Single zone packaged rooftop unit with fuel-fired furnace and baseboards and fuel boiler for acs + schemas/ASHP+TES+GasBoiler.jpg + + heating + domestic_hot_water + + + 37 + + + + 30 + Single zone packaged rooftop unit with electrical resistance furnace and baseboards and fuel boiler for acs + schemas/ASHP+TES+GasBoiler.jpg + + heating + domestic_hot_water + + + 38 + + + + 31 + Single zone make-up air unit with baseboard heating with fuel fired boiler + schemas/ASHP+TES+GasBoiler.jpg + + heating + domestic_hot_water + + + 21 + + + + 32 + Single zone make-up air unit with electrical baseboard heating and DHW with resistance + schemas/ASHP+TES+GasBoiler.jpg + + heating + domestic_hot_water + + + 22 + + + + 33 + Multi-zone built-up system with baseboard heater hydronic with fuel fired boiler + schemas/ASHP+TES+GasBoiler.jpg + + heating + domestic_hot_water + + + 21 + + + + 34 + Multi-zone built-up system with electrical baseboard heater and electrical hot water + schemas/ASHP+TES+GasBoiler.jpg + + heating + domestic_hot_water + + + 22 + + + + 35 + Unitary air conditioner air cooled DX with external condenser + schemas/ASHP+TES+GasBoiler.jpg + + cooling + + + 39 + + + + 36 + 4 pipe fan coils with water cooled, water chiller + schemas/ASHP+TES+GasBoiler.jpg + + cooling + + + 39 + + + + 37 + Single zone packaged rooftop unit with air cooled DX + schemas/ASHP+TES+GasBoiler.jpg + + cooling + + + 39 + + + + 38 + Single zone make-up air unit with air cooled DX + schemas/ASHP+TES+GasBoiler.jpg + + cooling + + + 39 + + + + 39 + Multi-zone built-up system with water cooled, water chiller + schemas/ASHP+TES+GasBoiler.jpg + + cooling + + + 39 + + - - PV+ASHP+GasBoiler+TES + + Central Hydronic Air and Gas Source Heating System with Unitary Split Cooling and Air Source HP DHW and Grid Tied PV - 7 1 - 10 + 11 + 23 + 24 - - PV+ASHP+ElectricBoiler+TES + + Central Hydronic Air and Electricity Source Heating System with Unitary Split Cooling and Air Source HP DHW and Grid Tied PV - 7 - 2 + 1 + 12 + 23 + 24 - - PV+GSHP+GasBoiler+TES + + Central Hydronic Ground and Gas Source Heating System with Unitary Split Cooling and Air Source HP DHW and Grid Tied PV - 7 - 3 + 1 + 13 + 23 + 24 - - PV+GSHP+ElectricBoiler+TES + + Central Hydronic Ground and Electricity Source Heating System with Unitary Split Cooling and Air Source HP DHW and Grid Tied PV - 7 - 4 + 1 + 14 + 23 + 24 - - PV+WSHP+GasBoiler+TES + + Central Hydronic Water and Gas Source Heating System with Unitary Split Cooling and Air Source HP DHW and Grid Tied PV - 7 - 5 + 1 + 15 + 23 + 24 - - PV+WSHP+ElectricBoiler+TES + + Central Hydronic Water and Electricity Source Heating System with Unitary Split Cooling and Air Source HP DHW and Grid Tied PV - 7 - 6 + 1 + 16 + 23 + 24 - - ASHP+GasBoiler+TES + + Central Hydronic Air and Gas Source Heating System with Unitary Split and Air Source HP DHW + + 11 + 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 - - 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 - - - - Central Heating+Unitary Cooling+Unitary DHW+PV - - 7 - 10 - 11 - 12 - - + + system 1 gas + + 25 + 35 + + + + system 1 gas grid tied pv + + 1 + 25 + 35 + + + + system 1 electricity + + 26 + 35 + + + + system 1 electricity grid tied pv + + 26 + 1 + 35 + + + + system 2 gas + + 27 + 36 + + + + system 2 gas grid tied pv + + 1 + 27 + 36 + + + + system 2 electricity + + 28 + 36 + + + + system 2 electricity grid tied pv + + 1 + 28 + 36 + + + + system 3 and 4 gas + + 29 + 37 + + + + system 3 and 4 gas grid tied pv + + 1 + 29 + 37 + + + + system 3 and 4 electricity + + 30 + 37 + + + + system 3 and 4 electricity grid tied pv + + 30 + 37 + 1 + + + + system 6 gas + + 33 + 39 + + + + system 6 gas grid tied pv + + 33 + 39 + 1 + + + + system 6 electricity + + 34 + 39 + + + + system 6 electricity grid tied pv + + 34 + 39 + 1 + + + + system 7 electricity grid tied pv + + 1 + 8 + 24 + + + + system 8 gas + + 25 + + + + system 8 gas grid tied pv + + 25 + 1 + + + + system 8 electricity + + 26 + + + + system 8 electricity grid tied pv + + 26 + 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/constants.py b/hub/helpers/constants.py index f345b4f0..fda9a4e3 100644 --- a/hub/helpers/constants.py +++ b/hub/helpers/constants.py @@ -304,6 +304,7 @@ GRID = 'Grid' ONSITE_ELECTRICITY = 'Onsite Electricity' PHOTOVOLTAIC = 'Photovoltaic' BOILER = 'Boiler' +FURNACE = 'Furnace' HEAT_PUMP = 'Heat Pump' BASEBOARD = 'Baseboard' ELECTRICITY_GENERATOR = 'Electricity generator' 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..7d4d4db1 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 @@ -15,10 +15,10 @@ class MontrealGenerationSystemToHubEnergyGenerationSystem: def __init__(self): self._dictionary = { 'boiler': cte.BOILER, - 'furnace': cte.BASEBOARD, + 'furnace': cte.FURNACE, '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/hub/version.py b/hub/version.py index fb3b3f94..7c16b7a8 100644 --- a/hub/version.py +++ b/hub/version.py @@ -1,4 +1,4 @@ """ Hub version number """ -__version__ = '0.2.0.13' +__version__ = '0.2.0.14' diff --git a/tests/test_systems_catalog.py b/tests/test_systems_catalog.py index d31dfb99..45e58453 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(34, len(archetypes['archetypes'])) systems = catalog.names('systems') - self.assertEqual(12, len(systems['systems'])) + self.assertEqual(39, len(systems['systems'])) generation_equipments = catalog.names('generation_equipments') - self.assertEqual(27, len(generation_equipments['generation_equipments'])) + self.assertEqual(49, len(generation_equipments['generation_equipments'])) with self.assertRaises(ValueError): catalog.names('unknown') @@ -55,6 +55,7 @@ class TestSystemsCatalog(TestCase): with self.assertRaises(IndexError): catalog.get_entry('unknown') + def test_palma_catalog(self): catalog = EnergySystemsCatalogFactory('palma').catalog catalog_categories = catalog.names() diff --git a/tests/test_systems_factory.py b/tests/test_systems_factory.py index 95393fbf..e0ce412d 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 Grid Tied PV') EnergySystemsFactory('montreal_future', self._city).enrich() # Need to assign energy systems to buildings: for building in self._city.buildings: @@ -131,7 +132,8 @@ class TestSystemsFactory(TestCase): self.assertLess(0, building.heating_consumption[cte.YEAR][0]) self.assertLess(0, building.cooling_consumption[cte.YEAR][0]) self.assertLess(0, building.domestic_hot_water_consumption[cte.YEAR][0]) - self.assertLess(0, building.onsite_electrical_production[cte.YEAR][0]) + if 'PV' in building.energy_systems_archetype_name: + self.assertLess(0, building.onsite_electrical_production[cte.YEAR][0]) def test_palma_system_results(self): """