add generation and config
This commit is contained in:
parent
16618fb54a
commit
e91e61741e
|
@ -17,8 +17,9 @@ class PvGenerationSystem(GenerationSystem):
|
|||
"""
|
||||
|
||||
def __init__(self, nominal_ambient_temperature, nominal_cell_temperature, nominal_radiation,
|
||||
standard_test_condition_cell_temperature, standard_test_condition_maximum_power, width, height,
|
||||
model_name, manufacturer, electricity_efficiency, nominal_electricity_output):
|
||||
standard_test_condition_cell_temperature, standard_test_condition_maximum_power,
|
||||
cell_temperature_coefficient, width, height, model_name, manufacturer, electricity_efficiency,
|
||||
nominal_electricity_output):
|
||||
super(GenerationSystem, self).__init__(model_name=model_name, manufacturer=manufacturer, system_type='pv',
|
||||
fuel_type='renewable', nominal_thermal_output=None, modulation_range=None,
|
||||
source_types=None, heat_efficiency=None, cooling_efficiency=None,
|
||||
|
@ -29,6 +30,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._cell_temperature_coefficient = cell_temperature_coefficient
|
||||
self._width = width
|
||||
self._height = height
|
||||
|
||||
|
@ -72,6 +74,14 @@ class PvGenerationSystem(GenerationSystem):
|
|||
"""
|
||||
return self._standard_test_condition_maximum_power
|
||||
|
||||
@property
|
||||
def cell_temperature_coefficient(self):
|
||||
"""
|
||||
Get cell temperature coefficient of PV module
|
||||
:return: float
|
||||
"""
|
||||
return self._cell_temperature_coefficient
|
||||
|
||||
@property
|
||||
def width(self):
|
||||
"""
|
||||
|
@ -102,6 +112,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 [kW]': self.standard_test_condition_maximum_power,
|
||||
'cell temperature coefficient':self.cell_temperature_coefficient,
|
||||
'width': self.width,
|
||||
'height': self.height,
|
||||
}
|
||||
|
|
|
@ -12,6 +12,7 @@ from hub.catalog_factories.catalog import Catalog
|
|||
from hub.catalog_factories.data_models.energy_systems.system import System
|
||||
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.energy_emission_system import EnergyEmissionSystem
|
||||
from hub.catalog_factories.data_models.energy_systems.energy_storage_system import EnergyStorageSystem
|
||||
|
@ -25,23 +26,129 @@ class NorthAmericaEnergySystemCatalog(Catalog):
|
|||
"""
|
||||
North america energy system catalog class
|
||||
"""
|
||||
|
||||
def __init__(self, path):
|
||||
path = str(path / 'Tools4CitiesESMF.xml')
|
||||
with open(path, 'r', encoding='utf-8') as xml:
|
||||
self._archetypes = xmltodict.parse(xml.read())
|
||||
# self._systems = self._load_systems()
|
||||
# self._generation_components = self._load_generation_components()
|
||||
self._systems = self._load_systems()
|
||||
print(self._load_systems())
|
||||
self._generation_components = self._load_generation_components()
|
||||
print(self._generation_components)
|
||||
self._storage_components = self._load_storage_components()
|
||||
print(self._storage_components)
|
||||
# self._system_archetypes = self._load_system_archetypes()
|
||||
|
||||
# self._system_archetypes = self._load_system_archetypes()
|
||||
|
||||
# store the full catalog data model in self._content
|
||||
# self._content = Content(self._system_archetypes,
|
||||
# self._systems,
|
||||
# self._generation_components,
|
||||
# None,
|
||||
# None,
|
||||
# self._storage_components)
|
||||
# self._content = Content(self._system_archetypes,
|
||||
# self._systems,
|
||||
# self._generation_components,
|
||||
# None,
|
||||
# None,
|
||||
# self._storage_components)
|
||||
def _load_systems(self):
|
||||
system_configurations = []
|
||||
configurations = self._archetypes['encomp:EnergySystemCatalog']['energysystemconfiguration']
|
||||
for configuration in configurations:
|
||||
system_configurations.append(configuration['@configurationName'])
|
||||
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']
|
||||
print(photovoltaics.keys())
|
||||
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 = []
|
||||
|
|
|
@ -2,18 +2,18 @@
|
|||
<encomp:EnergySystemCatalog xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:encomp="https://www.hft-stuttgart.de/energycomponents">
|
||||
<energycomponent>
|
||||
<media name="Water" density="981.0" heatCapacity="4180.0" evaporationTemperature="100.0"/>
|
||||
<boilers modelName="ALP080B" manufacturer="Alpine" installedThermalPower="21.0" modulationRange="0.88" nominalEfficiency="0.95" combi="true"/>
|
||||
<boilers modelName="ALP105B" manufacturer="Alpine" installedThermalPower="28.0" modulationRange="0.88" nominalEfficiency="0.95" combi="true"/>
|
||||
<boilers modelName="ALP150B" manufacturer="Alpine" installedThermalPower="40.0" modulationRange="0.88" nominalEfficiency="0.95" combi="true"/>
|
||||
<boilers modelName="ALP210B" manufacturer="Alpine" installedThermalPower="57.0" modulationRange="0.87" nominalEfficiency="0.95" combi="true"/>
|
||||
<boilers modelName="ALTAC-136" manufacturer="Alta" installedThermalPower="33.0" modulationRange="0.95" nominalEfficiency="0.95" combi="true"/>
|
||||
<boilers modelName="ALTA-120" manufacturer="Alta" installedThermalPower="33.0" modulationRange="0.95" nominalEfficiency="0.95" combi="true"/>
|
||||
<boilers modelName="ASPN-085" manufacturer="Aspen" installedThermalPower="23.15" modulationRange="0.97" nominalEfficiency="0.96"/>
|
||||
<boilers modelName="ASPN-110" manufacturer="Aspen" installedThermalPower="30.19" modulationRange="0.96" nominalEfficiency="0.96"/>
|
||||
<boilers modelName="ASPNC-155" manufacturer="Aspen" installedThermalPower="42.5" modulationRange="0.96" nominalEfficiency="0.95" combi="true"/>
|
||||
<boilers modelName="K2WTC-135B" manufacturer="K2" installedThermalPower="32.8" modulationRange="0.96" nominalEfficiency="0.95" combi="true"/>
|
||||
<boilers modelName="K2WTC-180B" manufacturer="K2" installedThermalPower="49.5" modulationRange="0.96" nominalEfficiency="0.95" combi="true"/>
|
||||
<photovoltaicModules modelName="445MS" manufacturer="Canadian Solar" nominalPower="334.0" nominalEfficiency="0.201" nominalRadiation="800.0" STCRadiation="1000.0" nominalCellTemperature="41.0" STCCellTemperature="26.0" nominalAmbientTemperature="20.0" STCMaxPower="445.0" CellTemperatureCoefficient="-0.0034" height="1.048"/>
|
||||
<boilers modelName="ALP080B" manufacturer="Alpine" installedThermalPower="21.0" modulationRange="0.88" nominalEfficiency="0.95" combi="true" fuel="natural gas"/>
|
||||
<boilers modelName="ALP105B" manufacturer="Alpine" installedThermalPower="28.0" modulationRange="0.88" nominalEfficiency="0.95" combi="true" fuel="natural gas"/>
|
||||
<boilers modelName="ALP150B" manufacturer="Alpine" installedThermalPower="40.0" modulationRange="0.88" nominalEfficiency="0.95" combi="true" fuel="natural gas"/>
|
||||
<boilers modelName="ALP210B" manufacturer="Alpine" installedThermalPower="57.0" modulationRange="0.87" nominalEfficiency="0.95" combi="true" fuel="natural gas"/>
|
||||
<boilers modelName="ALTAC-136" manufacturer="Alta" installedThermalPower="33.0" modulationRange="0.95" nominalEfficiency="0.95" combi="true" fuel="natural gas"/>
|
||||
<boilers modelName="ALTA-120" manufacturer="Alta" installedThermalPower="33.0" modulationRange="0.95" nominalEfficiency="0.95" combi="true" fuel="natural gas"/>
|
||||
<boilers modelName="ASPN-085" manufacturer="Aspen" installedThermalPower="23.15" modulationRange="0.97" nominalEfficiency="0.96" fuel="natural gas"/>
|
||||
<boilers modelName="ASPN-110" manufacturer="Aspen" installedThermalPower="30.19" modulationRange="0.96" nominalEfficiency="0.96" fuel="natural gas"/>
|
||||
<boilers modelName="ASPNC-155" manufacturer="Aspen" installedThermalPower="42.5" modulationRange="0.96" nominalEfficiency="0.95" combi="true" fuel="natural gas"/>
|
||||
<boilers modelName="K2WTC-135B" manufacturer="K2" installedThermalPower="32.8" modulationRange="0.96" nominalEfficiency="0.95" combi="true" fuel="natural gas"/>
|
||||
<boilers modelName="K2WTC-180B" manufacturer="K2" installedThermalPower="49.5" modulationRange="0.96" nominalEfficiency="0.95" combi="true" fuel="natural gas"/>
|
||||
<photovoltaicModules modelName="445MS" manufacturer="Canadian Solar" nominalPower="334.0" nominalEfficiency="0.201" nominalRadiation="800.0" STCRadiation="1000.0" nominalCellTemperature="41.0" STCCellTemperature="26.0" nominalAmbientTemperature="20.0" STCMaxPower="445.0" CellTemperatureCoefficient="-0.0034" height="1.048" width="2.01"/>
|
||||
<heatPumps modelName="CMAA 012" description="A second degree equation is used in form of A*T_source^2 + B*T_source + C*T_source*T_sup + D*T_sup + E*T_sup^2 + F" manufacturer="TRANE" installedThermalPower="51.7" modulationRange="0.0" fuel="Electricity" heatSource="Air" nominalCOP="3.32" maxHeatingSupTemperature="55.0" minHeatingSupTemperature="6.0" maxCoolingSupTemperature="30.0" minCoolingSupTemperature="11.0" supply_medium="water">
|
||||
<coefficientOfPerformance xsi:type="encomp:SecondDegreePolynomialFunction" parameter="COP" parameterA="9.5E-4" parameterB="0.177" parameterC="-0.00242" parameterD="-0.155" parameterE="9.3E-4" parameterF="8.044"/>
|
||||
</heatPumps>
|
||||
|
|
Loading…
Reference in New Issue
Block a user