final_energy_system_model #60
|
@ -54,7 +54,6 @@ class GenerationSystem:
|
||||||
self._cooling_output_curve = cooling_output_curve
|
self._cooling_output_curve = cooling_output_curve
|
||||||
self._cooling_fuel_consumption_curve = cooling_fuel_consumption_curve
|
self._cooling_fuel_consumption_curve = cooling_fuel_consumption_curve
|
||||||
self._cooling_efficiency_curve = cooling_efficiency_curve
|
self._cooling_efficiency_curve = cooling_efficiency_curve
|
||||||
|
|
||||||
self._storage = storage
|
self._storage = storage
|
||||||
self._auxiliary_equipment = auxiliary_equipment
|
self._auxiliary_equipment = auxiliary_equipment
|
||||||
|
|
||||||
|
|
|
@ -9,10 +9,8 @@ Code contributors: Saeed Ranjbar saeed.ranjbar@concordia.ca
|
||||||
from typing import Union, List
|
from typing import Union, List
|
||||||
|
|
||||||
from hub.catalog_factories.data_models.energy_systems.generation_system import GenerationSystem
|
from hub.catalog_factories.data_models.energy_systems.generation_system import GenerationSystem
|
||||||
from hub.catalog_factories.data_models.energy_systems.pv_generation_system import PvGenerationSystem
|
|
||||||
from hub.catalog_factories.data_models.energy_systems.energy_storage_system import EnergyStorageSystem
|
from hub.catalog_factories.data_models.energy_systems.energy_storage_system import EnergyStorageSystem
|
||||||
from hub.catalog_factories.data_models.energy_systems.distribution_system import DistributionSystem
|
from hub.catalog_factories.data_models.energy_systems.distribution_system import DistributionSystem
|
||||||
from hub.catalog_factories.data_models.energy_systems.performance_curves import PerformanceCurves
|
|
||||||
from hub.catalog_factories.data_models.energy_systems.emission_system import EmissionSystem
|
from hub.catalog_factories.data_models.energy_systems.emission_system import EmissionSystem
|
||||||
|
|
||||||
|
|
||||||
|
@ -24,24 +22,20 @@ class System:
|
||||||
def __init__(self,
|
def __init__(self,
|
||||||
lod,
|
lod,
|
||||||
system_id,
|
system_id,
|
||||||
system_configuration,
|
name,
|
||||||
demand_types,
|
demand_types,
|
||||||
generation_systems,
|
generation_systems,
|
||||||
pv_generation_system,
|
|
||||||
distribution_system,
|
distribution_system,
|
||||||
emission_system,
|
emission_system,
|
||||||
energy_storage_systems,
|
energy_storage_systems):
|
||||||
performance_curves):
|
|
||||||
self._lod = lod
|
self._lod = lod
|
||||||
self._system_id = system_id
|
self._system_id = system_id
|
||||||
self._system_configuration = system_configuration
|
self._name = name
|
||||||
self._demand_types = demand_types
|
self._demand_types = demand_types
|
||||||
self._distribution_system = distribution_system
|
self._distribution_system = distribution_system
|
||||||
self._emission_system = emission_system
|
self._emission_system = emission_system
|
||||||
self._generation_systems = generation_systems
|
self._generation_systems = generation_systems
|
||||||
self._pv_generation_system = pv_generation_system
|
|
||||||
self._energy_storage_systems = energy_storage_systems
|
self._energy_storage_systems = energy_storage_systems
|
||||||
self._performance_curves = performance_curves
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def lod(self):
|
def lod(self):
|
||||||
|
@ -60,13 +54,12 @@ class System:
|
||||||
return self._system_id
|
return self._system_id
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def system_configuration(self):
|
def name(self):
|
||||||
"""
|
"""
|
||||||
Get the system configuration from ['hp_tes', 'hp_boiler_tes', 'pv_hp', 'pv_battery', 'pv', 'pv_hp_tes',
|
Get the system name
|
||||||
'pv_hp_battery_tes']
|
|
||||||
:return: string
|
:return: string
|
||||||
"""
|
"""
|
||||||
return self._system_configuration
|
return self._name
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def demand_types(self):
|
def demand_types(self):
|
||||||
|
@ -84,14 +77,6 @@ class System:
|
||||||
"""
|
"""
|
||||||
return self._generation_systems
|
return self._generation_systems
|
||||||
|
|
||||||
@property
|
|
||||||
def pv_generation_system(self) -> Union[None, PvGenerationSystem]:
|
|
||||||
"""
|
|
||||||
Get pv generation system
|
|
||||||
:return: ElectricityGenerationSystem
|
|
||||||
"""
|
|
||||||
return self._pv_generation_system
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def distribution_system(self) -> Union[None, DistributionSystem]:
|
def distribution_system(self) -> Union[None, DistributionSystem]:
|
||||||
"""
|
"""
|
||||||
|
@ -116,22 +101,11 @@ class System:
|
||||||
"""
|
"""
|
||||||
return self._energy_storage_systems
|
return self._energy_storage_systems
|
||||||
|
|
||||||
@property
|
|
||||||
def performance_curves(self) -> Union[None, List[PerformanceCurves]]:
|
|
||||||
"""
|
|
||||||
Get the list of all performance curves associated with components
|
|
||||||
:return: PerformanceCurves
|
|
||||||
"""
|
|
||||||
return self._performance_curves
|
|
||||||
|
|
||||||
def to_dictionary(self):
|
def to_dictionary(self):
|
||||||
"""Class content to dictionary"""
|
"""Class content to dictionary"""
|
||||||
_generation_systems = []
|
_generation_systems = []
|
||||||
for _generation in self.generation_systems:
|
for _generation in self.generation_systems:
|
||||||
_generation_systems.append(_generation.to_dictionary())
|
_generation_systems.append(_generation.to_dictionary())
|
||||||
_pv_system = None
|
|
||||||
if self.pv_generation_system is not None:
|
|
||||||
_pv_system = self.pv_generation_system.to_dictionary()
|
|
||||||
_distribution_system = None
|
_distribution_system = None
|
||||||
if self.distribution_system is not None:
|
if self.distribution_system is not None:
|
||||||
_distribution_system = self.distribution_system.to_dictionary()
|
_distribution_system = self.distribution_system.to_dictionary()
|
||||||
|
@ -140,19 +114,15 @@ class System:
|
||||||
_emission_system = self.emission_system.to_dictionary()
|
_emission_system = self.emission_system.to_dictionary()
|
||||||
_storage_system = [_storage.to_dictionary() for _storage in
|
_storage_system = [_storage.to_dictionary() for _storage in
|
||||||
self.energy_storage_system] if self.energy_storage_system is not None else None
|
self.energy_storage_system] if self.energy_storage_system is not None else None
|
||||||
_performance_curves = [_curve.to_dictionary() for _curve in
|
|
||||||
self.performance_curves] if self.performance_curves is not None else None
|
|
||||||
|
|
||||||
content = {'Layer': {'id': self.id,
|
content = {'Layer': {'id': self.id,
|
||||||
'name': self.system_configuration,
|
'name': self.name,
|
||||||
'level of detail': self.lod,
|
'level of detail': self.lod,
|
||||||
'demand types': self.demand_types,
|
'demand types': self.demand_types,
|
||||||
'Generation system(s)': _generation_systems,
|
'Generation system(s)': _generation_systems,
|
||||||
'electricity generation system': _pv_system,
|
|
||||||
'distribution system': _distribution_system,
|
'distribution system': _distribution_system,
|
||||||
'emission system': _emission_system,
|
'emission system': _emission_system,
|
||||||
'energy storage system': _storage_system,
|
'energy storage system': _storage_system,
|
||||||
'performance curves': _performance_curves
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return content
|
return content
|
||||||
|
|
|
@ -31,137 +31,257 @@ class NorthAmericaEnergySystemCatalog(Catalog):
|
||||||
def __init__(self, path):
|
def __init__(self, path):
|
||||||
path = str(path / 'north_america_systems.xml')
|
path = str(path / 'north_america_systems.xml')
|
||||||
with open(path, 'r', encoding='utf-8') as xml:
|
with open(path, 'r', encoding='utf-8') as xml:
|
||||||
self._archetypes = xmltodict.parse(xml.read(), force_list=['photovoltaicModules'])
|
self._archetypes = xmltodict.parse(xml.read(), force_list=['photovoltaicModules', 'templateStorages'])
|
||||||
# self._generation_components = self._load_generation_components()
|
self._generation_components = self._load_generation_components()
|
||||||
# print(self._generation_components)
|
print(self._generation_components)
|
||||||
|
print(len(self._generation_components))
|
||||||
self._storage_components = self._load_storage_components()
|
self._storage_components = self._load_storage_components()
|
||||||
print(self._storage_components)
|
print(self._storage_components)
|
||||||
self._systems = self._load_systems()
|
# self._systems = self._load_systems()
|
||||||
print(self._load_systems())
|
# print(self._load_systems())
|
||||||
|
|
||||||
# self._system_archetypes = self._load_system_archetypes()
|
def _load_generation_components(self):
|
||||||
|
generation_components = []
|
||||||
|
boilers = self._archetypes['EnergySystemCatalog']['energy_generation_components']['boilers']
|
||||||
|
heat_pumps = self._archetypes['EnergySystemCatalog']['energy_generation_components']['heatPumps']
|
||||||
|
photovoltaics = self._archetypes['EnergySystemCatalog']['energy_generation_components']['photovoltaicModules']
|
||||||
|
templates = self._archetypes['EnergySystemCatalog']['energy_generation_components']['templateGenerationEquipments']
|
||||||
|
for boiler in boilers:
|
||||||
|
boiler_id = boiler['@generation_id']
|
||||||
|
boiler_name = boiler['@name']
|
||||||
|
boiler_model_name = boiler['@modelName']
|
||||||
|
boiler_manufacturer = boiler['@manufacturer']
|
||||||
|
system_type = 'boiler'
|
||||||
|
boiler_fuel_type = boiler['@fuel']
|
||||||
|
boiler_nominal_thermal_output = float(boiler['@installedThermalPower'])
|
||||||
|
boiler_maximum_heat_output = float(boiler['@modulationRange'])
|
||||||
|
boiler_heat_efficiency = float(boiler['@nominalEfficiency'])
|
||||||
|
|
||||||
# store the full catalog data model in self._content
|
boiler_component = GenerationSystem(boiler_id,
|
||||||
# self._content = Content(self._system_archetypes,
|
boiler_name,
|
||||||
# self._systems,
|
boiler_model_name,
|
||||||
# self._generation_components,
|
boiler_manufacturer,
|
||||||
# None,
|
system_type,
|
||||||
# None,
|
boiler_fuel_type,
|
||||||
# self._storage_components)
|
boiler_nominal_thermal_output,
|
||||||
# def _load_systems(self):
|
None,
|
||||||
# systems = []
|
None,
|
||||||
# catalog_systems = self._archetypes['encomp:EnergySystemCatalog']['energysystemconfiguration']
|
None,
|
||||||
# for catalog_system in catalog_systems:
|
None,
|
||||||
# look for the demands and add it to demands[]
|
boiler_heat_efficiency,
|
||||||
# look for the components in self._generation_systems and add them to generation_systems[]
|
None,
|
||||||
# same with emission and distribution and storage
|
None,
|
||||||
# System(None,
|
None,
|
||||||
# None,
|
None,
|
||||||
# catalog_system['@configurationName'],
|
None,
|
||||||
# demands,
|
None,
|
||||||
# generation_systems,...
|
None,
|
||||||
# )
|
None,
|
||||||
|
None,
|
||||||
|
None,
|
||||||
|
None,
|
||||||
|
None,
|
||||||
|
None,
|
||||||
|
None,
|
||||||
|
None,
|
||||||
|
None,
|
||||||
|
None,
|
||||||
|
None,
|
||||||
|
None,
|
||||||
|
None)
|
||||||
|
generation_components.append(boiler_component)
|
||||||
|
for heat_pump in heat_pumps:
|
||||||
|
heat_pump_id = heat_pump['@generation_id']
|
||||||
|
heat_pump_name = heat_pump['@name']
|
||||||
|
heat_pump_model_name = heat_pump['@modelName']
|
||||||
|
heat_pump_manufacturer = heat_pump['@manufacturer']
|
||||||
|
system_type = 'heat pump'
|
||||||
|
heat_pump_fuel_type = heat_pump['@fuel']
|
||||||
|
heat_pump_nominal_thermal_output = float(heat_pump['@installedThermalPower'])
|
||||||
|
heat_pump_modulation_range = float(heat_pump['@modulationRange'])
|
||||||
|
heat_pump_source_type = heat_pump['@heatSource']
|
||||||
|
heat_pump_supply_medium = heat_pump['@supply_medium']
|
||||||
|
heat_pump_nominal_cop = float(heat_pump['@nominalCOP'])
|
||||||
|
heat_pump_maximum_heating_temperature = float(heat_pump['@maxHeatingSupTemperature'])
|
||||||
|
heat_pump_minimum_heating_temperature = float(heat_pump['@minHeatingSupTemperature'])
|
||||||
|
heat_pump_maximum_cooling_temperature = float(heat_pump['@maxCoolingSupTemperature'])
|
||||||
|
heat_pump_minimum_cooling_temperature = float(heat_pump['@minCoolingSupTemperature'])
|
||||||
|
cop_curve_type = heat_pump['performance_curve']['@curve_type']
|
||||||
|
parameters = heat_pump['performance_curve']['parameters']
|
||||||
|
coefficients = list(heat_pump['performance_curve']['coefficients'].values())
|
||||||
|
cop_curve = PerformanceCurves(cop_curve_type, parameters, coefficients)
|
||||||
|
|
||||||
# return system_configurations
|
heat_pump_component = GenerationSystem(heat_pump_id,
|
||||||
|
heat_pump_name,
|
||||||
|
heat_pump_model_name,
|
||||||
|
heat_pump_manufacturer,
|
||||||
|
system_type,
|
||||||
|
heat_pump_fuel_type,
|
||||||
|
heat_pump_nominal_thermal_output,
|
||||||
|
None,
|
||||||
|
None,
|
||||||
|
heat_pump_source_type,
|
||||||
|
heat_pump_supply_medium,
|
||||||
|
heat_pump_nominal_cop,
|
||||||
|
None,
|
||||||
|
None,
|
||||||
|
None,
|
||||||
|
None,
|
||||||
|
None,
|
||||||
|
None,
|
||||||
|
None,
|
||||||
|
None,
|
||||||
|
heat_pump_maximum_heating_temperature,
|
||||||
|
heat_pump_minimum_heating_temperature,
|
||||||
|
heat_pump_maximum_cooling_temperature,
|
||||||
|
heat_pump_minimum_cooling_temperature,
|
||||||
|
None,
|
||||||
|
None,
|
||||||
|
cop_curve,
|
||||||
|
None,
|
||||||
|
None,
|
||||||
|
None,
|
||||||
|
None,
|
||||||
|
None)
|
||||||
|
generation_components.append(heat_pump_component)
|
||||||
|
for pv in photovoltaics:
|
||||||
|
pv_id = pv['@generation_id']
|
||||||
|
pv_name = pv['@name']
|
||||||
|
pv_model_name = pv['@modelName']
|
||||||
|
pv_manufacturer = pv['@manufacturer']
|
||||||
|
pv_electricity_efficiency = pv['@nominalEfficiency']
|
||||||
|
pv_nominal_electricity_output = pv['@nominalPower']
|
||||||
|
nominal_ambient_temperature = float(pv['@nominalAmbientTemperature'])
|
||||||
|
nominal_cell_temperature = float(pv['@nominalCellTemperature'])
|
||||||
|
nominal_radiation = float(pv['@nominalRadiation'])
|
||||||
|
standard_test_condition_cell_temperature = float(pv['@STCCellTemperature'])
|
||||||
|
standard_test_condition_maximum_power = float(pv['@STCMaxPower'])
|
||||||
|
cell_temperature_coefficient = float(pv['@CellTemperatureCoefficient'])
|
||||||
|
width = float(pv['@width'])
|
||||||
|
height = float(pv['@height'])
|
||||||
|
|
||||||
# def _load_generation_components(self):
|
pv_component = PvGenerationSystem(pv_id,
|
||||||
# generation_components = []
|
pv_name,
|
||||||
# boilers = self._archetypes['encomp:EnergySystemCatalog']['energycomponent']['boilers']
|
pv_model_name,
|
||||||
# heat_pumps = self._archetypes['encomp:EnergySystemCatalog']['energycomponent']['heatPumps']
|
pv_manufacturer,
|
||||||
# photovoltaics = self._archetypes['encomp:EnergySystemCatalog']['energycomponent']['photovoltaicModules']
|
pv_electricity_efficiency,
|
||||||
# for boiler in boilers:
|
pv_nominal_electricity_output,
|
||||||
# boiler_model_name = boiler['@modelName']
|
nominal_ambient_temperature,
|
||||||
# boiler_manufacturer = boiler['@manufacturer']
|
nominal_cell_temperature,
|
||||||
# system_type = 'boiler'
|
nominal_radiation,
|
||||||
# boiler_fuel_type = boiler['@fuel']
|
standard_test_condition_cell_temperature,
|
||||||
# boiler_nominal_thermal_output = float(boiler['@installedThermalPower'])
|
standard_test_condition_maximum_power,
|
||||||
# boiler_modulation_range = float(boiler['@modulationRange'])
|
cell_temperature_coefficient,
|
||||||
# boiler_heat_efficiency = float(boiler['@nominalEfficiency'])
|
width,
|
||||||
#
|
height)
|
||||||
# boiler_component = GenerationSystem(boiler_model_name,
|
generation_components.append(pv_component)
|
||||||
# boiler_manufacturer,
|
for template in templates:
|
||||||
# system_type,
|
system_id = template['@generation_id']
|
||||||
# boiler_fuel_type,
|
system_name = template['@name']
|
||||||
# boiler_nominal_thermal_output,
|
if "Boiler" in system_name:
|
||||||
# boiler_modulation_range,
|
system_type = 'boiler'
|
||||||
# None,
|
fuel_type = template['@fuel']
|
||||||
# None,
|
heat_efficiency = float(template['@nominalEfficiency'])
|
||||||
# boiler_heat_efficiency,
|
source_medium = None
|
||||||
# None,
|
supply_medium = None
|
||||||
# None,
|
boiler_template = GenerationSystem(system_id,
|
||||||
# None,
|
system_name,
|
||||||
# None,
|
None,
|
||||||
# None,
|
None,
|
||||||
# None,
|
system_type,
|
||||||
# None,
|
fuel_type,
|
||||||
# None,
|
None,
|
||||||
# None)
|
None,
|
||||||
# generation_components.append(boiler_component)
|
None,
|
||||||
# for heat_pump in heat_pumps:
|
source_medium,
|
||||||
# heat_pump_model_name = heat_pump['@modelName']
|
supply_medium,
|
||||||
# heat_pump_manufacturer = heat_pump['@manufacturer']
|
heat_efficiency,
|
||||||
# system_type = 'heat pump'
|
None,
|
||||||
# heat_pump_fuel_type = heat_pump['@fuel']
|
None,
|
||||||
# heat_pump_nominal_thermal_output = float(heat_pump['@installedThermalPower'])
|
None,
|
||||||
# heat_pump_modulation_range = float(heat_pump['@modulationRange'])
|
None,
|
||||||
# heat_pump_source_type = heat_pump['@heatSource']
|
None,
|
||||||
# heat_pump_supply_medium = heat_pump['@supply_medium']
|
None,
|
||||||
# heat_pump_nominal_cop = float(heat_pump['@nominalCOP'])
|
None,
|
||||||
# heat_pump_maximum_heating_temperature = float(heat_pump['@maxHeatingSupTemperature'])
|
None,
|
||||||
# heat_pump_minimum_heating_temperature = float(heat_pump['@minHeatingSupTemperature'])
|
None,
|
||||||
# heat_pump_maximum_cooling_temperature = float(heat_pump['@maxCoolingSupTemperature'])
|
None,
|
||||||
# heat_pump_minimum_cooling_temperature = float(heat_pump['@minCoolingSupTemperature'])
|
None,
|
||||||
#
|
None,
|
||||||
# heat_pump_component = GenerationSystem(heat_pump_model_name,
|
None,
|
||||||
# heat_pump_manufacturer,
|
None,
|
||||||
# system_type,
|
None,
|
||||||
# heat_pump_fuel_type,
|
None,
|
||||||
# heat_pump_nominal_thermal_output,
|
None,
|
||||||
# heat_pump_modulation_range,
|
None,
|
||||||
# heat_pump_source_type,
|
None,
|
||||||
# heat_pump_supply_medium,
|
None)
|
||||||
# heat_pump_nominal_cop,
|
generation_components.append(boiler_template)
|
||||||
# None,
|
elif "Heat Pump" in system_name:
|
||||||
# None,
|
system_type = 'heat pump'
|
||||||
# None,
|
fuel_type = template['@fuel']
|
||||||
# None,
|
heat_efficiency = template['@nominalCOP']
|
||||||
# None,
|
source_medium = template['@heatSource']
|
||||||
# heat_pump_maximum_heating_temperature,
|
supply_medium = template['@supply_medium']
|
||||||
# heat_pump_minimum_heating_temperature,
|
heat_pump_template = GenerationSystem(system_id,
|
||||||
# heat_pump_maximum_cooling_temperature,
|
system_name,
|
||||||
# heat_pump_minimum_cooling_temperature)
|
None,
|
||||||
# generation_components.append(heat_pump_component)
|
None,
|
||||||
# for pv in photovoltaics:
|
system_type,
|
||||||
# nominal_ambient_temperature = float(pv['@nominalAmbientTemperature'])
|
fuel_type,
|
||||||
# nominal_cell_temperature = float(pv['@nominalCellTemperature'])
|
None,
|
||||||
# nominal_radiation = float(pv['@nominalRadiation'])
|
None,
|
||||||
# standard_test_condition_cell_temperature = float(pv['@STCCellTemperature'])
|
None,
|
||||||
# standard_test_condition_maximum_power = float(pv['@STCMaxPower'])
|
source_medium,
|
||||||
# cell_temperature_coefficient = float(pv['@CellTemperatureCoefficient'])
|
supply_medium,
|
||||||
# width = float(pv['@width'])
|
heat_efficiency,
|
||||||
# height = float(pv['@height'])
|
None,
|
||||||
# pv_model_name = pv['@modelName']
|
None,
|
||||||
# pv_manufacturer = pv['@manufacturer']
|
None,
|
||||||
# pv_electricity_efficiency = pv['@nominalEfficiency']
|
None,
|
||||||
# pv_nominal_electricity_output = pv['@nominalPower']
|
None,
|
||||||
# pv_component = PvGenerationSystem(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,
|
||||||
# pv_model_name,
|
None,
|
||||||
# pv_manufacturer,
|
None,
|
||||||
# pv_electricity_efficiency,
|
None,
|
||||||
# pv_nominal_electricity_output)
|
None,
|
||||||
# generation_components.append(pv_component)
|
None,
|
||||||
# return generation_components
|
None,
|
||||||
|
None)
|
||||||
|
generation_components.append(heat_pump_template)
|
||||||
|
else:
|
||||||
|
electricity_efficiency = float(template['@nominalEfficiency'])
|
||||||
|
height = float(template['@height'])
|
||||||
|
width = float(template['@width'])
|
||||||
|
pv_template = PvGenerationSystem(system_id,
|
||||||
|
system_name,
|
||||||
|
None,
|
||||||
|
None,
|
||||||
|
electricity_efficiency,
|
||||||
|
None,
|
||||||
|
None,
|
||||||
|
None,
|
||||||
|
None,
|
||||||
|
None,
|
||||||
|
None,
|
||||||
|
None,
|
||||||
|
width,
|
||||||
|
height)
|
||||||
|
generation_components.append(pv_template)
|
||||||
|
|
||||||
|
return generation_components
|
||||||
|
|
||||||
def _load_storage_components(self):
|
def _load_storage_components(self):
|
||||||
storage_components = []
|
storage_components = []
|
||||||
thermal_storages = self._archetypes['EnergySystemCatalog']['energy_storage_components']['thermalStorages']
|
thermal_storages = self._archetypes['EnergySystemCatalog']['energy_storage_components']['thermalStorages']
|
||||||
|
template_storages = self._archetypes['EnergySystemCatalog']['energy_storage_components']['templateStorages']
|
||||||
for tes in thermal_storages:
|
for tes in thermal_storages:
|
||||||
storage_id = tes['@storage_id']
|
storage_id = tes['@storage_id']
|
||||||
name = tes['@name']
|
name = tes['@name']
|
||||||
|
@ -196,30 +316,57 @@ class NorthAmericaEnergySystemCatalog(Catalog):
|
||||||
layers,
|
layers,
|
||||||
maximum_operating_temperature)
|
maximum_operating_temperature)
|
||||||
storage_components.append(storage_component)
|
storage_components.append(storage_component)
|
||||||
|
|
||||||
|
for template in template_storages:
|
||||||
|
storage_id = template['@storage_id']
|
||||||
|
name = template['@name']
|
||||||
|
maximum_temperature = template['@maxTemp']
|
||||||
|
materials = self._load_materials()
|
||||||
|
insulation_material_name = template['@insulationMaterial']
|
||||||
|
insulation_material = self._search_material(materials, insulation_material_name)
|
||||||
|
material_name = template['@tankMaterial']
|
||||||
|
tank_material = self._search_material(materials, material_name)
|
||||||
|
thickness = float(template['@insulationThickness']) / 100 # from cm to m
|
||||||
|
insulation_layer = Layer(None, 'insulation', insulation_material, thickness)
|
||||||
|
thickness = float(template['@tankThickness']) / 100 # from cm to m
|
||||||
|
tank_layer = Layer(None, 'insulation', tank_material, thickness)
|
||||||
|
# the convention is from outside to inside
|
||||||
|
layers = [insulation_layer, tank_layer]
|
||||||
|
storage_component = EnergyStorageSystem(storage_id,
|
||||||
|
name,
|
||||||
|
None,
|
||||||
|
None,
|
||||||
|
'thermal',
|
||||||
|
None,
|
||||||
|
None,
|
||||||
|
None,
|
||||||
|
None,
|
||||||
|
None,
|
||||||
|
None,
|
||||||
|
None,
|
||||||
|
layers,
|
||||||
|
maximum_temperature)
|
||||||
|
storage_components.append(storage_component)
|
||||||
return storage_components
|
return storage_components
|
||||||
|
|
||||||
# def _load_systems(self):
|
# def _load_systems(self):
|
||||||
# systems = []
|
# _catalog_systems = []
|
||||||
# catalog_systems = self._archetypes['encomp:EnergySystemCatalog']['energysystemconfiguration']
|
# systems = self._archetypes['EnergySystemCatalog']['systems']['system']
|
||||||
# for catalog_system in catalog_systems:
|
# for system in systems:
|
||||||
# system_configuration = catalog_system['@configurationName']
|
# system_id = system['@id']
|
||||||
# demands = catalog_system['demands']
|
# name = system['@name']
|
||||||
# demand_types = []
|
# generation_components =
|
||||||
# for demand in demands:
|
#
|
||||||
# name = demand['@name']
|
|
||||||
# demand_types.append(name)
|
|
||||||
# energy_system = System(None,
|
# energy_system = System(None,
|
||||||
# None,
|
# system_id,
|
||||||
# system_configuration,
|
|
||||||
# demand_types,
|
|
||||||
# None,
|
# None,
|
||||||
# None,
|
# None,
|
||||||
# None,
|
# None,
|
||||||
# None,
|
# None,
|
||||||
# None,
|
# None,
|
||||||
# None)
|
# None)
|
||||||
# systems.append(energy_system)
|
# _catalog_systems.append(energy_system)
|
||||||
# return systems
|
# return _catalog_systems
|
||||||
|
|
||||||
def _load_materials(self):
|
def _load_materials(self):
|
||||||
materials = []
|
materials = []
|
||||||
|
|
|
@ -40,12 +40,12 @@
|
||||||
<coefficients a="0.00109" b="0.209" c="-0.00291" d="-0.172" e="0.00102" f="8.95"/>
|
<coefficients a="0.00109" b="0.209" c="-0.00291" d="-0.172" e="0.00102" f="8.95"/>
|
||||||
</performance_curve>
|
</performance_curve>
|
||||||
</heatPumps>
|
</heatPumps>
|
||||||
<templates generation_id="16" name="template Natural-Gas Boiler" nominalEfficiency="0.90"/>
|
<templateGenerationEquipments generation_id="16" name="template Natural-Gas Boiler" nominalEfficiency="0.90" fuel="natural gas"/>
|
||||||
<templates generation_id="17" name="template Electric Boiler" nominalEfficiency="0.95"/>
|
<templateGenerationEquipments generation_id="17" name="template Electric Boiler" nominalEfficiency="0.95" fuel="electricity"/>
|
||||||
<templates generation_id="18" name="template Air-to-Water Heat Pump" fuel="Electricity" heatSource="Air" nominalCOP="3" supply_medium="water"/>
|
<templateGenerationEquipments generation_id="18" name="template Air-to-Water Heat Pump" fuel="Electricity" heatSource="Air" nominalCOP="3" supply_medium="water"/>
|
||||||
<templates generation_id="19" name="template Groundwater-to-Water Heat Pump" fuel="Electricity" heatSource="Ground" nominalCOP="3.5" supply_medium="water"/>
|
<templateGenerationEquipments generation_id="19" name="template Groundwater-to-Water Heat Pump" fuel="Electricity" heatSource="Ground" nominalCOP="3.5" supply_medium="water"/>
|
||||||
<templates generation_id="20" name="template Water-to-Water Heat Pump" fuel="Electricity" heatSource="Water" nominalCOP="3.5" supply_medium="water"/>
|
<templateGenerationEquipments generation_id="20" name="template Water-to-Water Heat Pump" fuel="Electricity" heatSource="Water" nominalCOP="3.5" supply_medium="water"/>
|
||||||
<templates generation_id="21" name="template Photovoltaic Module" nominalEfficiency="0.2" width="1.0" height="1.0"/>
|
<templateGenerationEquipments generation_id="21" name="template Photovoltaic Module" nominalEfficiency="0.2" width="1.0" height="1.0"/>
|
||||||
<manufacturers manufacturer_id="1" name="Alpine" country="USA" product="Natural Gas Boiler"/>
|
<manufacturers manufacturer_id="1" name="Alpine" country="USA" product="Natural Gas Boiler"/>
|
||||||
<manufacturers manufacturer_id="2" name="Alta" country="USA" product="Natural Gas Boiler"/>
|
<manufacturers manufacturer_id="2" name="Alta" country="USA" product="Natural Gas Boiler"/>
|
||||||
<manufacturers manufacturer_id="3" name="Aspen" country="USA" product="Natural Gas Boiler"/>
|
<manufacturers manufacturer_id="3" name="Aspen" country="USA" product="Natural Gas Boiler"/>
|
||||||
|
@ -59,7 +59,7 @@
|
||||||
<thermalStorages storage_id="3" name="Hot Water Storage Tank" modelName="HF 500" manufacturer="reflex" volume="0.5" maxTemp="95.0" insulationThickness="90.0" tankThickness="0" usesMedium="Water" insulationMaterial="Polyurethane" height="1.5" tankMaterial="Steel"/>
|
<thermalStorages storage_id="3" name="Hot Water Storage Tank" modelName="HF 500" manufacturer="reflex" volume="0.5" maxTemp="95.0" insulationThickness="90.0" tankThickness="0" usesMedium="Water" insulationMaterial="Polyurethane" height="1.5" tankMaterial="Steel"/>
|
||||||
<thermalStorages storage_id="4" name="Hot Water Storage Tank" modelName="HF 200" manufacturer="reflex" volume="0.5" maxTemp="95.0" insulationThickness="90.0" tankThickness="0" usesMedium="Water" insulationMaterial="Polyurethane" height="1.5" tankMaterial="Steel"/>
|
<thermalStorages storage_id="4" name="Hot Water Storage Tank" modelName="HF 200" manufacturer="reflex" volume="0.5" maxTemp="95.0" insulationThickness="90.0" tankThickness="0" usesMedium="Water" insulationMaterial="Polyurethane" height="1.5" tankMaterial="Steel"/>
|
||||||
<thermalStorages storage_id="5" name="Hot Water Storage Tank" modelName="HF 200" manufacturer="reflex" volume="0.5" maxTemp="95.0" insulationThickness="90.0" tankThickness="0" usesMedium="Water" insulationMaterial="Polyurethane" height="1.5" tankMaterial="Steel"/>
|
<thermalStorages storage_id="5" name="Hot Water Storage Tank" modelName="HF 200" manufacturer="reflex" volume="0.5" maxTemp="95.0" insulationThickness="90.0" tankThickness="0" usesMedium="Water" insulationMaterial="Polyurethane" height="1.5" tankMaterial="Steel"/>
|
||||||
<templates storage_id="6" name="template Hot Water Storage Tank" maxTemp="95.0" insulationThickness="90.0" tankThickness="0" usesMedium="Water" insulationMaterial="Polyurethane" tankMaterial="Steel"/>
|
<templateStorages storage_id="6" name="template Hot Water Storage Tank" maxTemp="95.0" insulationThickness="90.0" tankThickness="0" usesMedium="Water" insulationMaterial="Polyurethane" tankMaterial="Steel"/>
|
||||||
<powerStorages/>
|
<powerStorages/>
|
||||||
<manufacturers manufacturer_id="1" name="reflex" product="Storage Tank"/>
|
<manufacturers manufacturer_id="1" name="reflex" product="Storage Tank"/>
|
||||||
</energy_storage_components>
|
</energy_storage_components>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user