continued working on energy system importer

This commit is contained in:
Saeed Ranjbar 2023-09-28 19:19:32 -04:00
parent 8dbbfb9460
commit eaa3064a3f
4 changed files with 56 additions and 10 deletions

View File

@ -199,6 +199,11 @@ BOILER = 'Boiler'
HEAT_PUMP = 'Heat Pump'
BASEBOARD = 'Baseboard'
CHILLER = 'Chiller'
SENSIBLE = 'Sensible'
LATENT = 'Latent'
LITHIUMION = 'Lithium Ion'
NICD = 'NiCd'
LEADACID = 'Lead Acid'
# Geometry
EPSILON = 0.0000001

View File

@ -0,0 +1,32 @@
"""
Energy System catalog heat generation system
SPDX - License - Identifier: LGPL - 3.0 - or -later
Copyright © 2023 Concordia CERC group
Project Coder Saeed Ranjbar saeed.ranjbar@concordia.ca
Code contributors: Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca
"""
import hub.helpers.constants as cte
class NorthAmericaStorageSystemToHubEnergyStorage:
"""
Montreal's system to hub energy generation system class
"""
def __init__(self):
self._dictionary = {
'Air Source Heat Pump with Natural Gas Boiler and thermal storage': cte.SENSIBLE,
'Air Source Heat Pump with Electrical Boiler and thermal storage': cte.SENSIBLE,
'Ground Source Heat Pump with Natural Gas Boiler and thermal storage': cte.SENSIBLE,
'Ground Source Heat Pump with Electrical Gas Boiler and thermal storage': cte.SENSIBLE,
'Water Source Heat Pump with Natural Gas Boiler and thermal storage': cte.SENSIBLE,
'Water Source Heat Pump with Electrical Gas Boiler and thermal storage': cte.SENSIBLE,
}
@property
def dictionary(self) -> dict:
"""
Get the dictionary
:return: {}
"""
return self._dictionary

View File

@ -24,6 +24,7 @@ from hub.helpers.data.hub_function_to_montreal_custom_costs_function import HubF
from hub.helpers.data.north_america_demand_type_to_hub_energy_demand_type import NorthAmericaDemandTypeToHubEnergyDemandType
from hub.helpers.data.north_america_system_to_hub_energy_generation_system import NorthAmericaSystemToHubEnergyGenerationSystem
from hub.helpers.data.north_america_custom_fuel_to_hub_fuel import NorthAmericaCustomFuelToHubFuel
from hub.helpers.data.north_america_storage_system_to_hub_storage import NorthAmericaStorageSystemToHubEnergyStorage
class Dictionaries:
@ -156,20 +157,27 @@ class Dictionaries:
@property
def north_america_demand_type_to_hub_energy_demand_type(self):
"""
Get montreal custom system demand type to hub energy demand type, transformation dictionary
Get north america system demand type to hub energy demand type, transformation dictionary
"""
return NorthAmericaDemandTypeToHubEnergyDemandType().dictionary
@property
def north_america_system_to_hub_energy_generation_system(self):
"""
Get montreal custom system names to hub energy system names, transformation dictionary
Get north america system names to hub energy system names, transformation dictionary
"""
return NorthAmericaSystemToHubEnergyGenerationSystem().dictionary
@property
def north_america_custom_fuel_to_hub_fuel(self) -> dict:
"""
Get hub fuel from montreal_custom catalog fuel
Get hub fuel from north_america catalog fuel
"""
return NorthAmericaCustomFuelToHubFuel().dictionary
@property
def north_america_storage_system_to_hub_storage(self):
"""
Get montreal custom system names to hub storage system
"""
return NorthAmericaStorageSystemToHubEnergyStorage().dictionary

View File

@ -20,6 +20,7 @@ from hub.city_model_structure.energy_systems.distribution_system import Distribu
from hub.city_model_structure.energy_systems.emission_system import EmissionSystem
from hub.helpers.dictionaries import Dictionaries
from hub.city_model_structure.energy_systems.generic_storage_system import GenericStorageSystem
from hub.city_model_structure.energy_systems.thermal_storage_system import ThermalStorageSystem
class NorthAmericaCustomEnergySystemParameters:
@ -95,7 +96,7 @@ class NorthAmericaCustomEnergySystemParameters:
_generation_system.electricity_efficiency = archetype_generation_equipment.electricity_efficiency
_generation_system.source_temperature = archetype_generation_equipment.source_temperature
_generation_system.source_mass_flow = archetype_generation_equipment.source_mass_flow
_generation_system.storage = archetype_generation_equipment.storage
_generation_system.storage = None
_generation_system.auxiliary_equipment = None
_generation_system._supply_medium = archetype_generation_equipment.supply_medium
_generation_system._maximum_heat_supply_temperature = archetype_generation_equipment.maximum_heat_supply_temperature
@ -111,13 +112,13 @@ class NorthAmericaCustomEnergySystemParameters:
energy_system.generation_system = _generation_system
_energy_storage_system = GenericStorageSystem()
_thermal_storage_system = ThermalStorageSystem()
archetype_storage_equipment = system.energy_storage_systems
_thermal_storage_system.generic_storage_system.storage_type = Dictionaries().north_america_storage_system_to_hub_storage[archetype_storage_equipment.storage_type]
_thermal_storage_system.maximum_operating_temperature = archetype_storage_equipment.maximum_operating_temperature
_thermal_storage_system.height = archetype_storage_equipment.height
_thermal_storage_system.layers = archetype_storage_equipment.layers
energy_system.energy_storage_system = _thermal_storage_system
building_systems.append(energy_system)
if archetype.name not in _generic_energy_systems: