diff --git a/hub/catalog_factories/energy_systems/north_america_energy_system_catalog.py b/hub/catalog_factories/energy_systems/north_america_energy_system_catalog.py
index 543c2e43..306da80a 100644
--- a/hub/catalog_factories/energy_systems/north_america_energy_system_catalog.py
+++ b/hub/catalog_factories/energy_systems/north_america_energy_system_catalog.py
@@ -14,7 +14,7 @@ from hub.catalog_factories.data_models.energy_systems.content import Content
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.distribution_system import DistributionSystem
-from hub.catalog_factories.data_models.energy_systems.emission_system import EnergyEmissionSystem
+from hub.catalog_factories.data_models.energy_systems.emission_system import EmissionSystem
from hub.catalog_factories.data_models.energy_systems.energy_storage_system import EnergyStorageSystem
from hub.catalog_factories.data_models.energy_systems.performance_curves import PerformanceCurves
from hub.catalog_factories.data_models.energy_systems.archetype import Archetype
@@ -29,11 +29,11 @@ class NorthAmericaEnergySystemCatalog(Catalog):
"""
def __init__(self, path):
- path = str(path / 'north_america_components.xml')
+ path = str(path / 'north_america_systems.xml')
with open(path, 'r', encoding='utf-8') as xml:
self._archetypes = xmltodict.parse(xml.read(), force_list=['photovoltaicModules'])
- self._generation_components = self._load_generation_components()
- print(self._generation_components)
+ # self._generation_components = self._load_generation_components()
+ # print(self._generation_components)
self._storage_components = self._load_storage_components()
print(self._storage_components)
self._systems = self._load_systems()
@@ -64,122 +64,126 @@ class NorthAmericaEnergySystemCatalog(Catalog):
# return system_configurations
- def _load_generation_components(self):
- generation_components = []
- boilers = self._archetypes['encomp:EnergySystemCatalog']['energycomponent']['boilers']
- heat_pumps = self._archetypes['encomp:EnergySystemCatalog']['energycomponent']['heatPumps']
- photovoltaics = self._archetypes['encomp:EnergySystemCatalog']['energycomponent']['photovoltaicModules']
- for boiler in boilers:
- 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_modulation_range = float(boiler['@modulationRange'])
- boiler_heat_efficiency = float(boiler['@nominalEfficiency'])
-
- boiler_component = GenerationSystem(boiler_model_name,
- boiler_manufacturer,
- system_type,
- boiler_fuel_type,
- boiler_nominal_thermal_output,
- boiler_modulation_range,
- None,
- None,
- boiler_heat_efficiency,
- None,
- None,
- None,
- None,
- None,
- None,
- None,
- None,
- None)
- generation_components.append(boiler_component)
- for heat_pump in heat_pumps:
- 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'])
-
- heat_pump_component = GenerationSystem(heat_pump_model_name,
- heat_pump_manufacturer,
- system_type,
- heat_pump_fuel_type,
- heat_pump_nominal_thermal_output,
- heat_pump_modulation_range,
- heat_pump_source_type,
- heat_pump_supply_medium,
- heat_pump_nominal_cop,
- 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)
- generation_components.append(heat_pump_component)
- for pv in photovoltaics:
- 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'])
- pv_model_name = pv['@modelName']
- pv_manufacturer = pv['@manufacturer']
- pv_electricity_efficiency = pv['@nominalEfficiency']
- pv_nominal_electricity_output = pv['@nominalPower']
- pv_component = PvGenerationSystem(nominal_ambient_temperature,
- nominal_cell_temperature,
- nominal_radiation,
- standard_test_condition_cell_temperature,
- standard_test_condition_maximum_power,
- cell_temperature_coefficient,
- width,
- height,
- pv_model_name,
- pv_manufacturer,
- pv_electricity_efficiency,
- pv_nominal_electricity_output)
- generation_components.append(pv_component)
- return generation_components
+ # def _load_generation_components(self):
+ # generation_components = []
+ # boilers = self._archetypes['encomp:EnergySystemCatalog']['energycomponent']['boilers']
+ # heat_pumps = self._archetypes['encomp:EnergySystemCatalog']['energycomponent']['heatPumps']
+ # photovoltaics = self._archetypes['encomp:EnergySystemCatalog']['energycomponent']['photovoltaicModules']
+ # for boiler in boilers:
+ # 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_modulation_range = float(boiler['@modulationRange'])
+ # boiler_heat_efficiency = float(boiler['@nominalEfficiency'])
+ #
+ # boiler_component = GenerationSystem(boiler_model_name,
+ # boiler_manufacturer,
+ # system_type,
+ # boiler_fuel_type,
+ # boiler_nominal_thermal_output,
+ # boiler_modulation_range,
+ # None,
+ # None,
+ # boiler_heat_efficiency,
+ # None,
+ # None,
+ # None,
+ # None,
+ # None,
+ # None,
+ # None,
+ # None,
+ # None)
+ # generation_components.append(boiler_component)
+ # for heat_pump in heat_pumps:
+ # 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'])
+ #
+ # heat_pump_component = GenerationSystem(heat_pump_model_name,
+ # heat_pump_manufacturer,
+ # system_type,
+ # heat_pump_fuel_type,
+ # heat_pump_nominal_thermal_output,
+ # heat_pump_modulation_range,
+ # heat_pump_source_type,
+ # heat_pump_supply_medium,
+ # heat_pump_nominal_cop,
+ # 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)
+ # generation_components.append(heat_pump_component)
+ # for pv in photovoltaics:
+ # 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'])
+ # pv_model_name = pv['@modelName']
+ # pv_manufacturer = pv['@manufacturer']
+ # pv_electricity_efficiency = pv['@nominalEfficiency']
+ # pv_nominal_electricity_output = pv['@nominalPower']
+ # pv_component = PvGenerationSystem(nominal_ambient_temperature,
+ # nominal_cell_temperature,
+ # nominal_radiation,
+ # standard_test_condition_cell_temperature,
+ # standard_test_condition_maximum_power,
+ # cell_temperature_coefficient,
+ # width,
+ # height,
+ # pv_model_name,
+ # pv_manufacturer,
+ # pv_electricity_efficiency,
+ # pv_nominal_electricity_output)
+ # generation_components.append(pv_component)
+ # return generation_components
def _load_storage_components(self):
storage_components = []
- components = self._archetypes['encomp:EnergySystemCatalog']['energycomponent']['thermalStorages']
- for component in components:
- model_name = component['@modelName']
- manufacturer = component['@manufacturer']
- volume = component['@volume']
- height = component['@height']
- maximum_operating_temperature = component['@maxTemp']
+ thermal_storages = self._archetypes['EnergySystemCatalog']['energy_storage_components']['thermalStorages']
+ for tes in thermal_storages:
+ storage_id = tes['@storage_id']
+ name = tes['@name']
+ model_name = tes['@modelName']
+ manufacturer = tes['@manufacturer']
+ volume = tes['@volume']
+ height = tes['@height']
+ maximum_operating_temperature = tes['@maxTemp']
materials = self._load_materials()
- material_name = component['@insulationMaterial']
- insulation_material = self._search_material(materials, material_name)
- material_name = component['@tankMaterial']
+ insulation_material_name = tes['@insulationMaterial']
+ insulation_material = self._search_material(materials, insulation_material_name)
+ material_name = tes['@tankMaterial']
tank_material = self._search_material(materials, material_name)
- thickness = float(component['@insulationThickness']) / 100 # from cm to m
+ thickness = float(tes['@insulationThickness']) / 100 # from cm to m
insulation_layer = Layer(None, 'insulation', insulation_material, thickness)
- thickness = float(component['@tankThickness']) / 100 # from cm to m
+ thickness = float(tes['@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(model_name,
+ storage_component = EnergyStorageSystem(storage_id,
+ name,
+ model_name,
manufacturer,
'thermal',
volume,
@@ -194,32 +198,32 @@ class NorthAmericaEnergySystemCatalog(Catalog):
storage_components.append(storage_component)
return storage_components
- def _load_systems(self):
- systems = []
- catalog_systems = self._archetypes['encomp:EnergySystemCatalog']['energysystemconfiguration']
- for catalog_system in catalog_systems:
- system_configuration = catalog_system['@configurationName']
- demands = catalog_system['demands']
- demand_types = []
- for demand in demands:
- name = demand['@name']
- demand_types.append(name)
- energy_system = System(None,
- None,
- system_configuration,
- demand_types,
- None,
- None,
- None,
- None,
- None,
- None)
- systems.append(energy_system)
- return systems
+ # def _load_systems(self):
+ # systems = []
+ # catalog_systems = self._archetypes['encomp:EnergySystemCatalog']['energysystemconfiguration']
+ # for catalog_system in catalog_systems:
+ # system_configuration = catalog_system['@configurationName']
+ # demands = catalog_system['demands']
+ # demand_types = []
+ # for demand in demands:
+ # name = demand['@name']
+ # demand_types.append(name)
+ # energy_system = System(None,
+ # None,
+ # system_configuration,
+ # demand_types,
+ # None,
+ # None,
+ # None,
+ # None,
+ # None,
+ # None)
+ # systems.append(energy_system)
+ # return systems
def _load_materials(self):
materials = []
- _materials = self._archetypes['encomp:EnergySystemCatalog']['energycomponent']['materials']
+ _materials = self._archetypes['EnergySystemCatalog']['materials']['material']
for _material in _materials:
name = _material['@name']
thermal_conductivity = _material['@thermalConductivity']
diff --git a/hub/data/energy_systems/north_america_components.xml b/hub/data/energy_systems/north_america_components.xml
deleted file mode 100644
index b4a9a71a..00000000
--- a/hub/data/energy_systems/north_america_components.xml
+++ /dev/null
@@ -1,74 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/hub/data/energy_systems/north_america_systems.xml b/hub/data/energy_systems/north_america_systems.xml
index 0adcff00..c9618448 100644
--- a/hub/data/energy_systems/north_america_systems.xml
+++ b/hub/data/energy_systems/north_america_systems.xml
@@ -1,29 +1,204 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ COP
+ source_temperature
+ supply_temperature
+
+
+
+
+
+ COP
+ source_temperature
+ supply_temperature
+
+
+
+
+
+ COP
+ source_temperature
+ supply_temperature
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Air Source Heat Pump with Natural Gas Boiler and thermal storage
+
+ 1
+ 2
+
+
+ 16
+ 18
+ 6
+
+
+
+ Air Source Heat Pump with Electrical Boiler and thermal storage
+
+ 1
+ 2
+
+
+ 17
+ 18
+ 6
+
+
+
+ Ground Source Heat Pump with Natural Gas Boiler and thermal storage
+
+ 1
+ 2
+
+
+ 16
+ 19
+ 6
+
+
+
+ Ground Source Heat Pump with Electrical Boiler and thermal storage
+
+ 1
+ 2
+
+
+ 17
+ 19
+ 6
+
+
+
+ Water Source Heat Pump with Natural Gas Boiler and thermal storage
+
+ 1
+ 2
+
+
+ 16
+ 20
+ 6
+
+
+
+ Water Source Heat Pump with Electrical Boiler and thermal storage
+
+ 1
+ 2
+
+
+ 17
+ 20
+ 6
+
+
+
+ Photovoltaic System
+
+ 3
+
+
+ 21
+
+
+
+
+
+ PV+ASHP+GasBoiler+TES
+
+ 7
+ 1
+
+
+
+ PV+ASHP+ElectricBoiler+TES
+
+ 7
+ 2
+
+
+
+ PV+GSHP+GasBoiler+TES
+
+ 7
+ 3
+
+
+
+ PV+GSHP+ElectricBoiler+TES
+
+ 7
+ 4
+
+
+
+ PV+WSHP+GasBoiler+TES
+
+ 7
+ 5
+
+
+
+ PV+WSHP+ElectricBoiler+TES
+
+ 7
+ 6
+
+
+
+
+
+
+
+
+
+