diff --git a/hub/catalog_factories/construction/eilat_catalog.py b/hub/catalog_factories/construction/eilat_catalog.py index 8868f3e1..0afe0f73 100644 --- a/hub/catalog_factories/construction/eilat_catalog.py +++ b/hub/catalog_factories/construction/eilat_catalog.py @@ -126,6 +126,10 @@ class EilatCatalog(Catalog): 'infiltration_rate_for_ventilation_system_off'] / cte.HOUR_TO_SECONDS infiltration_rate_for_ventilation_system_on = archetype[ 'infiltration_rate_for_ventilation_system_on'] / cte.HOUR_TO_SECONDS + infiltration_rate_area_for_ventilation_system_off = archetype[ + 'infiltration_rate_area_for_ventilation_system_off'] + infiltration_rate_area_for_ventilation_system_on = archetype[ + 'infiltration_rate_area_for_ventilation_system_on'] archetype_constructions = [] for archetype_construction in archetype['constructions']: @@ -164,8 +168,8 @@ class EilatCatalog(Catalog): None, infiltration_rate_for_ventilation_system_off, infiltration_rate_for_ventilation_system_on, - 0, - 0)) + infiltration_rate_area_for_ventilation_system_off, + infiltration_rate_area_for_ventilation_system_on)) return _catalog_archetypes def names(self, category=None): diff --git a/hub/catalog_factories/construction/nrel_catalog.py b/hub/catalog_factories/construction/nrel_catalog.py index 6236a420..f825746b 100644 --- a/hub/catalog_factories/construction/nrel_catalog.py +++ b/hub/catalog_factories/construction/nrel_catalog.py @@ -129,6 +129,12 @@ class NrelCatalog(Catalog): infiltration_rate_for_ventilation_system_on = float( archetype['infiltration_rate_for_ventilation_system_on']['#text'] ) / cte.HOUR_TO_SECONDS + infiltration_rate_area_for_ventilation_system_off = float( + archetype['infiltration_rate_area_for_ventilation_system_on']['#text'] + ) + infiltration_rate_area_for_ventilation_system_on = float( + archetype['infiltration_rate_area_for_ventilation_system_on']['#text'] + ) archetype_constructions = [] for archetype_construction in archetype['constructions']['construction']: @@ -163,8 +169,8 @@ class NrelCatalog(Catalog): indirect_heated_ratio, infiltration_rate_for_ventilation_system_off, infiltration_rate_for_ventilation_system_on, - 0, - 0)) + infiltration_rate_area_for_ventilation_system_off, + infiltration_rate_area_for_ventilation_system_on)) return _catalog_archetypes def names(self, category=None): 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/generation_system.py b/hub/catalog_factories/data_models/energy_systems/generation_system.py index cb4b1e9d..ad9bd103 100644 --- a/hub/catalog_factories/data_models/energy_systems/generation_system.py +++ b/hub/catalog_factories/data_models/energy_systems/generation_system.py @@ -20,7 +20,7 @@ class GenerationSystem(ABC): """ def __init__(self, system_id, name, model_name=None, manufacturer=None, fuel_type=None, - distribution_systems=None, energy_storage_systems=None): + distribution_systems=None, energy_storage_systems=None, number_of_units=None): self._system_id = system_id self._name = name self._model_name = model_name @@ -28,6 +28,7 @@ class GenerationSystem(ABC): self._fuel_type = fuel_type self._distribution_systems = distribution_systems self._energy_storage_systems = energy_storage_systems + self._number_of_units = number_of_units @property def id(self): diff --git a/hub/catalog_factories/data_models/energy_systems/pv_generation_system.py b/hub/catalog_factories/data_models/energy_systems/pv_generation_system.py index 87228afa..68ac1460 100644 --- a/hub/catalog_factories/data_models/energy_systems/pv_generation_system.py +++ b/hub/catalog_factories/data_models/energy_systems/pv_generation_system.py @@ -17,8 +17,9 @@ class PvGenerationSystem(GenerationSystem): def __init__(self, system_id, name, system_type, model_name=None, manufacturer=None, electricity_efficiency=None, nominal_electricity_output=None, nominal_ambient_temperature=None, nominal_cell_temperature=None, nominal_radiation=None, standard_test_condition_cell_temperature=None, - standard_test_condition_maximum_power=None, cell_temperature_coefficient=None, width=None, height=None, - distribution_systems=None, energy_storage_systems=None): + standard_test_condition_maximum_power=None, standard_test_condition_radiation=None, + cell_temperature_coefficient=None, width=None, height=None, distribution_systems=None, + energy_storage_systems=None): super().__init__(system_id=system_id, name=name, model_name=model_name, manufacturer=manufacturer, fuel_type='renewable', distribution_systems=distribution_systems, energy_storage_systems=energy_storage_systems) @@ -30,6 +31,7 @@ class PvGenerationSystem(GenerationSystem): self._nominal_radiation = nominal_radiation self._standard_test_condition_cell_temperature = standard_test_condition_cell_temperature self._standard_test_condition_maximum_power = standard_test_condition_maximum_power + self._standard_test_condition_radiation = standard_test_condition_radiation self._cell_temperature_coefficient = cell_temperature_coefficient self._width = width self._height = height @@ -98,6 +100,15 @@ class PvGenerationSystem(GenerationSystem): """ return self._standard_test_condition_maximum_power + @property + def standard_test_condition_radiation(self): + """ + Get standard test condition cell temperature of PV panels in W/m2 + :return: float + """ + return self._standard_test_condition_radiation + + @property def cell_temperature_coefficient(self): """ @@ -143,6 +154,7 @@ class PvGenerationSystem(GenerationSystem): 'nominal radiation [W/m2]': self.nominal_radiation, 'standard test condition cell temperature [Celsius]': self.standard_test_condition_cell_temperature, 'standard test condition maximum power [W]': self.standard_test_condition_maximum_power, + 'standard test condition radiation [W/m2]': self.standard_test_condition_radiation, 'cell temperature coefficient': self.cell_temperature_coefficient, 'width': self.width, 'height': self.height, 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 a4477ba2..4a9672ad 100644 --- a/hub/catalog_factories/energy_systems/montreal_future_system_catalogue.py +++ b/hub/catalog_factories/energy_systems/montreal_future_system_catalogue.py @@ -193,6 +193,7 @@ class MontrealFutureSystemCatalogue(Catalog): nominal_radiation = pv['nominal_radiation'] standard_test_condition_cell_temperature = pv['standard_test_condition_cell_temperature'] standard_test_condition_maximum_power = pv['standard_test_condition_maximum_power'] + standard_test_condition_radiation = pv['standard_test_condition_radiation'] cell_temperature_coefficient = pv['cell_temperature_coefficient'] width = pv['width'] height = pv['height'] @@ -215,6 +216,7 @@ class MontrealFutureSystemCatalogue(Catalog): standard_test_condition_cell_temperature= standard_test_condition_cell_temperature, standard_test_condition_maximum_power=standard_test_condition_maximum_power, + standard_test_condition_radiation=standard_test_condition_radiation, cell_temperature_coefficient=cell_temperature_coefficient, width=width, height=height, @@ -379,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] @@ -386,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 387a4bf9..17e6fb84 100644 --- a/hub/city_model_structure/building.py +++ b/hub/city_model_structure/building.py @@ -92,7 +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._pv_generation = {} + self._systems_archetype_cluster_id = None @property def shell(self) -> Polyhedron: @@ -880,8 +880,8 @@ class Building(CityObject): 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] + if storage_system.type_energy_stored == 'thermal' and storage_system.heating_coil_capacity is not None: + 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 = [] @@ -913,3 +913,19 @@ class Building(CityObject): 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 + 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/city_model_structure/building_demand/thermal_archetype.py b/hub/city_model_structure/building_demand/thermal_archetype.py index 242e5104..30c33e23 100644 --- a/hub/city_model_structure/building_demand/thermal_archetype.py +++ b/hub/city_model_structure/building_demand/thermal_archetype.py @@ -20,8 +20,8 @@ class ThermalArchetype: self._indirect_heated_ratio = None self._infiltration_rate_for_ventilation_system_off = None self._infiltration_rate_for_ventilation_system_on = None - self._infiltration_rate_area_for_ventilation_system_off=None - self._infiltration_rate_area_for_ventilation_system_on=None + self._infiltration_rate_area_for_ventilation_system_off = None + self._infiltration_rate_area_for_ventilation_system_on = None @property def constructions(self) -> [Construction]: @@ -141,7 +141,7 @@ class ThermalArchetype: Get infiltration rate for ventilation system off in l/s/m2 :return: float """ - return self._infiltration_rate_for_ventilation_system_off + return self._infiltration_rate_area_for_ventilation_system_off @infiltration_rate_area_for_ventilation_system_off.setter def infiltration_rate_area_for_ventilation_system_off(self, value): @@ -149,7 +149,7 @@ class ThermalArchetype: Set infiltration rate for ventilation system off in l/s/m2 :param value: float """ - self._infiltration_rate_for_ventilation_system_off = value + self._infiltration_rate_area_for_ventilation_system_off = value @property def infiltration_rate_area_for_ventilation_system_on(self): @@ -157,7 +157,7 @@ class ThermalArchetype: Get infiltration rate for ventilation system on in l/s/m2 :return: float """ - return self._infiltration_rate_for_ventilation_system_on + return self._infiltration_rate_area_for_ventilation_system_on @infiltration_rate_area_for_ventilation_system_on.setter def infiltration_rate_area_for_ventilation_system_on(self, value): @@ -165,4 +165,4 @@ class ThermalArchetype: Set infiltration rate for ventilation system on in l/s/m2 :param value: float """ - self._infiltration_rate_for_ventilation_system_on = value + self._infiltration_rate_area_for_ventilation_system_on = value diff --git a/hub/city_model_structure/energy_systems/generation_system.py b/hub/city_model_structure/energy_systems/generation_system.py index 1765c08e..4d06eb14 100644 --- a/hub/city_model_structure/energy_systems/generation_system.py +++ b/hub/city_model_structure/energy_systems/generation_system.py @@ -11,6 +11,7 @@ from abc import ABC from typing import Union, List from hub.city_model_structure.energy_systems.distribution_system import DistributionSystem +from hub.city_model_structure.energy_systems.energy_storage_system import EnergyStorageSystem from hub.city_model_structure.energy_systems.thermal_storage_system import ThermalStorageSystem from hub.city_model_structure.energy_systems.electrical_storage_system import ElectricalStorageSystem diff --git a/hub/city_model_structure/energy_systems/thermal_storage_system.py b/hub/city_model_structure/energy_systems/thermal_storage_system.py index fd9b8f81..fc25e5a8 100644 --- a/hub/city_model_structure/energy_systems/thermal_storage_system.py +++ b/hub/city_model_structure/energy_systems/thermal_storage_system.py @@ -24,7 +24,7 @@ class ThermalStorageSystem(EnergyStorageSystem): self._maximum_operating_temperature = None self._heating_coil_capacity = None self._temperature = None - self._heating_coil_energy_consumption = None + self._heating_coil_energy_consumption = {} @property def volume(self): diff --git a/hub/data/construction/eilat_archetypes.json b/hub/data/construction/eilat_archetypes.json index 25748055..809c971b 100644 --- a/hub/data/construction/eilat_archetypes.json +++ b/hub/data/construction/eilat_archetypes.json @@ -8,6 +8,8 @@ "extra_loses_due_thermal_bridges": 0.1, "infiltration_rate_for_ventilation_system_on": 0, "infiltration_rate_for_ventilation_system_off": 0.9, + "infiltration_rate_area_for_ventilation_system_on": 0, + "infiltration_rate_area_for_ventilation_system_off": 0.006, "constructions": { "OutdoorsWall": { "opaque_surface_name": "residential_1000_1980_BWh", @@ -42,6 +44,8 @@ "extra_loses_due_thermal_bridges": 0.1, "infiltration_rate_for_ventilation_system_on": 0, "infiltration_rate_for_ventilation_system_off": 0.31, + "infiltration_rate_area_for_ventilation_system_on": 0, + "infiltration_rate_area_for_ventilation_system_off": 0.002, "constructions": { "OutdoorsWall": { "opaque_surface_name": "dormitory_2011_3000_BWh", @@ -76,6 +80,8 @@ "extra_loses_due_thermal_bridges": 0.09, "infiltration_rate_for_ventilation_system_on": 0, "infiltration_rate_for_ventilation_system_off": 0.65, + "infiltration_rate_area_for_ventilation_system_on": 0, + "infiltration_rate_area_for_ventilation_system_off": 0.004, "constructions": { "OutdoorsWall": { "opaque_surface_name": "hotel_employees_1981_2010_BWh", diff --git a/hub/data/construction/us_archetypes.xml b/hub/data/construction/us_archetypes.xml index 629feb8c..a6384316 100644 --- a/hub/data/construction/us_archetypes.xml +++ b/hub/data/construction/us_archetypes.xml @@ -21,6 +21,8 @@ 0.15 0.5 0 + 0.003 + 0 @@ -44,6 +46,8 @@ 0.15 0.50 0 + 0.003 + 0 @@ -67,6 +71,8 @@ 0.15 0.50 0 + 0.003 + 0 @@ -89,6 +95,8 @@ 0.15 0.50 0 + 0.003 + 0 @@ -111,6 +119,8 @@ 0.15 0.50 0 + 0.003 + 0 @@ -133,6 +143,8 @@ 0.15 0.50 0 + 0.003 + 0 @@ -155,6 +167,8 @@ 0.15 0.50 0 + 0.003 + 0 @@ -177,6 +191,8 @@ 0.15 0.50 0 + 0.003 + 0 @@ -199,6 +215,8 @@ 0.15 0.50 0 + 0.003 + 0 @@ -221,6 +239,8 @@ 0.15 0.50 0 + 0.003 + 0 @@ -243,6 +263,8 @@ 0.15 0.50 0 + 0.003 + 0 @@ -265,6 +287,8 @@ 0.15 0.50 0 + 0.003 + 0 @@ -287,6 +311,8 @@ 0.15 0.50 0 + 0.003 + 0 @@ -309,6 +335,8 @@ 0.15 0.50 0 + 0.003 + 0 @@ -331,6 +359,8 @@ 0.15 0.50 0 + 0.003 + 0 @@ -353,6 +383,8 @@ 0.15 0.50 0 + 0.003 + 0 @@ -375,6 +407,8 @@ 0.15 0.50 0 + 0.003 + 0 @@ -397,6 +431,8 @@ 0.15 0.1 0 + 0.0005 + 0 @@ -419,6 +455,8 @@ 0.15 0.1 0 + 0.0005 + 0 @@ -441,6 +479,8 @@ 0.15 0.1 0 + 0.0005 + 0 @@ -463,6 +503,8 @@ 0.15 0.1 0 + 0.0005 + 0 @@ -485,6 +527,8 @@ 0.15 0.1 0 + 0.0005 + 0 @@ -507,6 +551,8 @@ 0.15 0.1 0 + 0.0005 + 0 @@ -529,6 +575,8 @@ 0.15 0.1 0 + 0.0005 + 0 @@ -551,6 +599,8 @@ 0.15 0.10 0 + 0.0005 + 0 @@ -573,6 +623,8 @@ 0.15 0.10 0 + 0.0005 + 0 @@ -595,6 +647,8 @@ 0.15 0.10 0 + 0.0005 + 0 @@ -617,6 +671,8 @@ 0.15 0.10 0 + 0.0005 + 0 @@ -639,6 +695,8 @@ 0.15 0.10 0 + 0.0005 + 0 @@ -661,6 +719,8 @@ 0.15 0.10 0 + 0.0005 + 0 @@ -683,6 +743,8 @@ 0.15 0.10 0 + 0.0005 + 0 @@ -705,6 +767,8 @@ 0.15 0.10 0 + 0.0005 + 0 @@ -727,6 +791,8 @@ 0.15 0.10 0 + 0.0005 + 0 @@ -749,6 +815,8 @@ 0.15 0.10 0 + 0.0005 + 0 @@ -771,6 +839,8 @@ 0.15 0.10 0 + 0.0005 + 0 @@ -793,6 +863,8 @@ 0.15 0.50 0 + 0.003 + 0 @@ -815,5 +887,7 @@ 0.15 0.10 0 + 0.0005 + 0 diff --git a/hub/exports/building_energy/idf.py b/hub/exports/building_energy/idf.py index aa2d0d5e..d22988d0 100644 --- a/hub/exports/building_energy/idf.py +++ b/hub/exports/building_energy/idf.py @@ -331,7 +331,6 @@ class Idf: for material in self._idf.idfobjects[self._MATERIAL]: if material.Name == "DefaultMaterial": return - self._idf.set_default_constructions() return for layer in thermal_boundary.layers: @@ -467,7 +466,7 @@ class Idf: def _add_infiltration_surface(self, thermal_zone, zone_name): schedule = f'INF_CONST schedules {thermal_zone.usage_name}' - _infiltration = thermal_zone.infiltration_rate_area_system_off*1 + _infiltration = thermal_zone.infiltration_rate_area_system_off*cte.INFILTRATION_75PA_TO_4PA self._idf.newidfobject(self._INFILTRATION, Name=f'{zone_name}_infiltration', Zone_or_ZoneList_or_Space_or_SpaceList_Name=zone_name, diff --git a/hub/helpers/constants.py b/hub/helpers/constants.py index 39586c54..5827e6d7 100644 --- a/hub/helpers/constants.py +++ b/hub/helpers/constants.py @@ -24,6 +24,7 @@ BTU_H_TO_WATTS = 0.29307107 KILO_WATTS_HOUR_TO_JULES = 3600000 WATTS_HOUR_TO_JULES = 3600 GALLONS_TO_QUBIC_METERS = 0.0037854117954011185 +INFILTRATION_75PA_TO_4PA = (4/75)**0.65 # time @@ -311,7 +312,8 @@ LATENT = 'Latent' LITHIUMION = 'Lithium Ion' NICD = 'NiCd' LEADACID = 'Lead Acid' - +THERMAL = 'thermal' +ELECTRICAL = 'electrical' # Geometry EPSILON = 0.0000001 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 7a42c832..ac5f4cae 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, - 'PV system': cte.PHOTOVOLTAIC, + 'photovoltaic': cte.PHOTOVOLTAIC, 'heat pump': cte.HEAT_PUMP } diff --git a/hub/imports/construction/eilat_physics_parameters.py b/hub/imports/construction/eilat_physics_parameters.py index 6aab492e..9f800079 100644 --- a/hub/imports/construction/eilat_physics_parameters.py +++ b/hub/imports/construction/eilat_physics_parameters.py @@ -66,6 +66,8 @@ class EilatPhysicsParameters: thermal_archetype.indirect_heated_ratio = 0 thermal_archetype.infiltration_rate_for_ventilation_system_on = catalog_archetype.infiltration_rate_for_ventilation_system_on thermal_archetype.infiltration_rate_for_ventilation_system_off = catalog_archetype.infiltration_rate_for_ventilation_system_off + thermal_archetype.infiltration_rate_area_for_ventilation_system_on = catalog_archetype.infiltration_rate_area_for_ventilation_system_on + thermal_archetype.infiltration_rate_area_for_ventilation_system_off = catalog_archetype.infiltration_rate_area_for_ventilation_system_off effective_thermal_capacity = 0 _constructions = [] for catalog_construction in catalog_archetype.constructions: diff --git a/hub/imports/construction/nrcan_physics_parameters.py b/hub/imports/construction/nrcan_physics_parameters.py index 35f5382a..1f532a22 100644 --- a/hub/imports/construction/nrcan_physics_parameters.py +++ b/hub/imports/construction/nrcan_physics_parameters.py @@ -81,6 +81,7 @@ class NrcanPhysicsParameters: thermal_archetype.infiltration_rate_for_ventilation_system_off = catalog_archetype.infiltration_rate_for_ventilation_system_off thermal_archetype.infiltration_rate_area_for_ventilation_system_on = catalog_archetype.infiltration_rate_area_for_ventilation_system_on thermal_archetype.infiltration_rate_area_for_ventilation_system_off = catalog_archetype.infiltration_rate_area_for_ventilation_system_off + _constructions = [] for catalog_construction in catalog_archetype.constructions: construction = Construction() diff --git a/hub/imports/construction/nrel_physics_parameters.py b/hub/imports/construction/nrel_physics_parameters.py index d38a4bd4..36fc84b7 100644 --- a/hub/imports/construction/nrel_physics_parameters.py +++ b/hub/imports/construction/nrel_physics_parameters.py @@ -69,6 +69,8 @@ class NrelPhysicsParameters: thermal_archetype.indirect_heated_ratio = catalog_archetype.indirect_heated_ratio thermal_archetype.infiltration_rate_for_ventilation_system_on = catalog_archetype.infiltration_rate_for_ventilation_system_on thermal_archetype.infiltration_rate_for_ventilation_system_off = catalog_archetype.infiltration_rate_for_ventilation_system_off + thermal_archetype.infiltration_rate_area_for_ventilation_system_on = catalog_archetype.infiltration_rate_area_for_ventilation_system_on + thermal_archetype.infiltration_rate_area_for_ventilation_system_off = catalog_archetype.infiltration_rate_area_for_ventilation_system_off _constructions = [] for catalog_construction in catalog_archetype.constructions: construction = Construction() 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 0a9d589f..eb1b9e92 100644 --- a/hub/imports/energy_systems/montreal_custom_energy_system_parameters.py +++ b/hub/imports/energy_systems/montreal_custom_energy_system_parameters.py @@ -136,14 +136,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 ab2b6dda..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,12 +88,12 @@ 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 _generation_system.manufacturer = archetype_generation_system.manufacturer - _type = 'PV system' + _type = archetype_generation_system.system_type _generation_system.system_type = Dictionaries().montreal_generation_system_to_hub_energy_generation_system[_type] _fuel_type = Dictionaries().montreal_custom_fuel_to_hub_fuel[archetype_generation_system.fuel_type] _generation_system.fuel_type = _fuel_type @@ -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 @@ -119,7 +126,7 @@ class MontrealFutureEnergySystemParameters: _generation_system.manufacturer = archetype_generation_system.manufacturer _type = archetype_generation_system.system_type _generation_system.system_type = Dictionaries().montreal_generation_system_to_hub_energy_generation_system[_type] - _fuel_type = Dictionaries().north_america_custom_fuel_to_hub_fuel[archetype_generation_system.fuel_type] + _fuel_type = Dictionaries().montreal_custom_fuel_to_hub_fuel[archetype_generation_system.fuel_type] _generation_system.fuel_type = _fuel_type _generation_system.nominal_heat_output = archetype_generation_system.nominal_heat_output _generation_system.nominal_cooling_output = archetype_generation_system.nominal_cooling_output @@ -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