forked from s_ranjbar/city_retrofit
finished creating generic generation system in the _create_generic_systems method in north_america_custom_energy_system_parameters.py
This commit is contained in:
parent
3809cf2885
commit
8dbbfb9460
|
@ -26,7 +26,6 @@ class GenericGenerationSystem:
|
||||||
self._source_mass_flow = None
|
self._source_mass_flow = None
|
||||||
self._storage = None
|
self._storage = None
|
||||||
self._auxiliary_equipment = None
|
self._auxiliary_equipment = None
|
||||||
self._source_medium = None
|
|
||||||
self._supply_medium = None
|
self._supply_medium = None
|
||||||
self._maximum_heat_supply_temperature = None
|
self._maximum_heat_supply_temperature = None
|
||||||
self._minimum_heat_supply_temperature = None
|
self._minimum_heat_supply_temperature = None
|
||||||
|
@ -38,12 +37,6 @@ class GenericGenerationSystem:
|
||||||
self._cooling_output_curve = None
|
self._cooling_output_curve = None
|
||||||
self._cooling_fuel_consumption_curve = None
|
self._cooling_fuel_consumption_curve = None
|
||||||
self._cooling_efficiency_curve = None
|
self._cooling_efficiency_curve = None
|
||||||
self._heat_output_curve = None
|
|
||||||
self._heat_fuel_consumption_curve = None
|
|
||||||
self._heat_efficiency_curve = None
|
|
||||||
self._cooling_output_curve = None
|
|
||||||
self._cooling_fuel_consumption_curve = None
|
|
||||||
self._cooling_efficiency_curve = None
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def type(self):
|
def type(self):
|
||||||
|
@ -205,22 +198,6 @@ class GenericGenerationSystem:
|
||||||
"""
|
"""
|
||||||
self._auxiliary_equipment = value
|
self._auxiliary_equipment = value
|
||||||
|
|
||||||
@property
|
|
||||||
def source_medium(self):
|
|
||||||
"""
|
|
||||||
Get the source medium [air, water, ground, district_heating, grid, on_site_electricity]
|
|
||||||
:return: string
|
|
||||||
"""
|
|
||||||
return self._source_medium
|
|
||||||
|
|
||||||
@source_medium.setter
|
|
||||||
def source_medium(self, value):
|
|
||||||
"""
|
|
||||||
Set the source medium [air, water, ground, district_heating, grid, on_site_electricity]
|
|
||||||
:param value: string
|
|
||||||
"""
|
|
||||||
self._source_medium = value
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def supply_medium(self):
|
def supply_medium(self):
|
||||||
"""
|
"""
|
||||||
|
|
28
hub/helpers/data/north_america_custom_fuel_to_hub_fuel.py
Normal file
28
hub/helpers/data/north_america_custom_fuel_to_hub_fuel.py
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
"""
|
||||||
|
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 NorthAmericaCustomFuelToHubFuel:
|
||||||
|
"""
|
||||||
|
Montreal custom fuel to hub fuel class
|
||||||
|
"""
|
||||||
|
def __init__(self):
|
||||||
|
self._dictionary = {
|
||||||
|
'natural gas': cte.GAS,
|
||||||
|
'electricity': cte.ELECTRICITY,
|
||||||
|
'renewable': cte.RENEWABLE
|
||||||
|
}
|
||||||
|
|
||||||
|
@property
|
||||||
|
def dictionary(self) -> dict:
|
||||||
|
"""
|
||||||
|
Get the dictionary
|
||||||
|
:return: {}
|
||||||
|
"""
|
||||||
|
return self._dictionary
|
|
@ -0,0 +1,33 @@
|
||||||
|
"""
|
||||||
|
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 NorthAmericaSystemToHubEnergyGenerationSystem:
|
||||||
|
"""
|
||||||
|
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.HEAT_PUMP, cte.BOILER],
|
||||||
|
'Air Source Heat Pump with Electrical Boiler and thermal storage': [cte.HEAT_PUMP, cte.BOILER],
|
||||||
|
'Ground Source Heat Pump with Natural Gas Boiler and thermal storage': [cte.HEAT_PUMP, cte.BOILER],
|
||||||
|
'Ground Source Heat Pump with Electrical Gas Boiler and thermal storage': [cte.HEAT_PUMP, cte.BOILER],
|
||||||
|
'Water Source Heat Pump with Natural Gas Boiler and thermal storage': [cte.HEAT_PUMP, cte.BOILER],
|
||||||
|
'Water Source Heat Pump with Electrical Gas Boiler and thermal storage': [cte.HEAT_PUMP, cte.BOILER],
|
||||||
|
'Photovoltaic system': cte.PHOTOVOLTAIC,
|
||||||
|
}
|
||||||
|
|
||||||
|
@property
|
||||||
|
def dictionary(self) -> dict:
|
||||||
|
"""
|
||||||
|
Get the dictionary
|
||||||
|
:return: {}
|
||||||
|
"""
|
||||||
|
return self._dictionary
|
|
@ -22,6 +22,8 @@ from hub.helpers.data.montreal_system_to_hub_energy_generation_system import Mon
|
||||||
from hub.helpers.data.montreal_demand_type_to_hub_energy_demand_type import MontrealDemandTypeToHubEnergyDemandType
|
from hub.helpers.data.montreal_demand_type_to_hub_energy_demand_type import MontrealDemandTypeToHubEnergyDemandType
|
||||||
from hub.helpers.data.hub_function_to_montreal_custom_costs_function import HubFunctionToMontrealCustomCostsFunction
|
from hub.helpers.data.hub_function_to_montreal_custom_costs_function import HubFunctionToMontrealCustomCostsFunction
|
||||||
from hub.helpers.data.north_america_demand_type_to_hub_energy_demand_type import NorthAmericaDemandTypeToHubEnergyDemandType
|
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
|
||||||
|
|
||||||
|
|
||||||
class Dictionaries:
|
class Dictionaries:
|
||||||
|
@ -129,13 +131,6 @@ class Dictionaries:
|
||||||
"""
|
"""
|
||||||
return MontrealDemandTypeToHubEnergyDemandType().dictionary
|
return MontrealDemandTypeToHubEnergyDemandType().dictionary
|
||||||
|
|
||||||
@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
|
|
||||||
"""
|
|
||||||
return NorthAmericaDemandTypeToHubEnergyDemandType().dictionary
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def hub_function_to_montreal_custom_costs_function(self) -> dict:
|
def hub_function_to_montreal_custom_costs_function(self) -> dict:
|
||||||
"""
|
"""
|
||||||
|
@ -157,3 +152,24 @@ class Dictionaries:
|
||||||
Get hub fuel from montreal_custom catalog fuel
|
Get hub fuel from montreal_custom catalog fuel
|
||||||
"""
|
"""
|
||||||
return MontrealCustomFuelToHubFuel().dictionary
|
return MontrealCustomFuelToHubFuel().dictionary
|
||||||
|
|
||||||
|
@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
|
||||||
|
"""
|
||||||
|
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
|
||||||
|
"""
|
||||||
|
return NorthAmericaSystemToHubEnergyGenerationSystem().dictionary
|
||||||
|
|
||||||
|
@property
|
||||||
|
def north_america_custom_fuel_to_hub_fuel(self) -> dict:
|
||||||
|
"""
|
||||||
|
Get hub fuel from montreal_custom catalog fuel
|
||||||
|
"""
|
||||||
|
return NorthAmericaCustomFuelToHubFuel().dictionary
|
||||||
|
|
|
@ -12,7 +12,6 @@ import copy
|
||||||
from pandas import DataFrame
|
from pandas import DataFrame
|
||||||
|
|
||||||
from hub.catalog_factories.energy_systems_catalog_factory import EnergySystemsCatalogFactory
|
from hub.catalog_factories.energy_systems_catalog_factory import EnergySystemsCatalogFactory
|
||||||
from hub.city_model_structure.energy_systems.generic_distribution_system import GenericDistributionSystem
|
|
||||||
from hub.city_model_structure.energy_systems.generic_energy_system import GenericEnergySystem
|
from hub.city_model_structure.energy_systems.generic_energy_system import GenericEnergySystem
|
||||||
from hub.city_model_structure.energy_systems.generic_generation_system import GenericGenerationSystem
|
from hub.city_model_structure.energy_systems.generic_generation_system import GenericGenerationSystem
|
||||||
from hub.city_model_structure.energy_systems.energy_system import EnergySystem
|
from hub.city_model_structure.energy_systems.energy_system import EnergySystem
|
||||||
|
@ -20,6 +19,7 @@ from hub.city_model_structure.energy_systems.generation_system import Generation
|
||||||
from hub.city_model_structure.energy_systems.distribution_system import DistributionSystem
|
from hub.city_model_structure.energy_systems.distribution_system import DistributionSystem
|
||||||
from hub.city_model_structure.energy_systems.emission_system import EmissionSystem
|
from hub.city_model_structure.energy_systems.emission_system import EmissionSystem
|
||||||
from hub.helpers.dictionaries import Dictionaries
|
from hub.helpers.dictionaries import Dictionaries
|
||||||
|
from hub.city_model_structure.energy_systems.generic_storage_system import GenericStorageSystem
|
||||||
|
|
||||||
|
|
||||||
class NorthAmericaCustomEnergySystemParameters:
|
class NorthAmericaCustomEnergySystemParameters:
|
||||||
|
@ -84,11 +84,10 @@ class NorthAmericaCustomEnergySystemParameters:
|
||||||
energy_system.name = system.name
|
energy_system.name = system.name
|
||||||
energy_system.demand_types = _hub_demand_types
|
energy_system.demand_types = _hub_demand_types
|
||||||
_generation_system = GenericGenerationSystem()
|
_generation_system = GenericGenerationSystem()
|
||||||
archetype_generation_equipment = system.generation_system
|
archetype_generation_equipment = system.generation_systems
|
||||||
_type = system.name
|
_type = system.name
|
||||||
_generation_system.type = Dictionaries().montreal_system_to_hub_energy_generation_system[
|
_generation_system.type = Dictionaries().north_america_system_to_hub_energy_generation_system[_type]
|
||||||
_type]
|
_fuel_type = Dictionaries().north_america_custom_fuel_to_hub_fuel[archetype_generation_equipment.fuel_type]
|
||||||
_fuel_type = Dictionaries().montreal_custom_fuel_to_hub_fuel[archetype_generation_equipment.fuel_type]
|
|
||||||
_generation_system.fuel_type = _fuel_type
|
_generation_system.fuel_type = _fuel_type
|
||||||
_generation_system.source_types = archetype_generation_equipment.source_medium
|
_generation_system.source_types = archetype_generation_equipment.source_medium
|
||||||
_generation_system.heat_efficiency = archetype_generation_equipment.heat_efficiency
|
_generation_system.heat_efficiency = archetype_generation_equipment.heat_efficiency
|
||||||
|
@ -98,20 +97,27 @@ class NorthAmericaCustomEnergySystemParameters:
|
||||||
_generation_system.source_mass_flow = archetype_generation_equipment.source_mass_flow
|
_generation_system.source_mass_flow = archetype_generation_equipment.source_mass_flow
|
||||||
_generation_system.storage = archetype_generation_equipment.storage
|
_generation_system.storage = archetype_generation_equipment.storage
|
||||||
_generation_system.auxiliary_equipment = 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
|
||||||
|
_generation_system._minimum_heat_supply_temperature = archetype_generation_equipment.minimum_heat_supply_temperature
|
||||||
|
_generation_system._maximum_cooling_supply_temperature = archetype_generation_equipment.maximum_cooling_supply_temperature
|
||||||
|
_generation_system._minimum_cooling_supply_temperature = archetype_generation_equipment.minimum_cooling_supply_temperature
|
||||||
|
_generation_system._heat_output_curve = archetype_generation_equipment.heat_output_curve
|
||||||
|
_generation_system._heat_fuel_consumption_curve = archetype_generation_equipment.heat_fuel_consumption_curve
|
||||||
|
_generation_system._heat_efficiency_curve = archetype_generation_equipment.heat_efficiency_curve
|
||||||
|
_generation_system._cooling_output_curve = archetype_generation_equipment.cooling_output_curve
|
||||||
|
_generation_system._cooling_fuel_consumption_curve = archetype_generation_equipment.cooling_fuel_consumption_curve
|
||||||
|
_generation_system._cooling_efficiency_curve = archetype_generation_equipment.cooling_efficiency_curve
|
||||||
|
|
||||||
energy_system.generation_system = _generation_system
|
energy_system.generation_system = _generation_system
|
||||||
|
|
||||||
_distribution_system = GenericDistributionSystem()
|
_energy_storage_system = GenericStorageSystem()
|
||||||
archetype_distribution_equipment = system.distribution_systems
|
archetype_storage_equipment = system.energy_storage_systems
|
||||||
_distribution_system.type = archetype_distribution_equipment.type
|
|
||||||
_distribution_system.supply_temperature = archetype_distribution_equipment.supply_temperature
|
|
||||||
_distribution_system.distribution_consumption_fix_flow = \
|
|
||||||
archetype_distribution_equipment.distribution_consumption_fix_flow
|
|
||||||
_distribution_system.distribution_consumption_variable_flow = \
|
|
||||||
archetype_distribution_equipment.distribution_consumption_variable_flow
|
|
||||||
_distribution_system.heat_losses = archetype_distribution_equipment.heat_losses
|
|
||||||
|
|
||||||
energy_system.distribution_system = _distribution_system
|
|
||||||
|
|
||||||
building_systems.append(energy_system)
|
building_systems.append(energy_system)
|
||||||
if archetype.name not in _generic_energy_systems:
|
if archetype.name not in _generic_energy_systems:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user