Compare commits
No commits in common. "ee875859e8c781abb302d73d9ee569bf6c507de0" and "b24a616d0000f6a97e73c4ae71ac0a4d31448442" have entirely different histories.
ee875859e8
...
b24a616d00
13
.gitignore
vendored
13
.gitignore
vendored
@ -1 +1,12 @@
|
||||
.idea
|
||||
!.gitignore
|
||||
**/venv/
|
||||
.idea/
|
||||
/development_tests/
|
||||
/data/energy_systems/heat_pumps/*.csv
|
||||
/data/energy_systems/heat_pumps/*.insel
|
||||
.DS_Store
|
||||
**/.env
|
||||
**/hub/logs/
|
||||
**/__pycache__/
|
||||
**/.idea/
|
||||
|
||||
|
@ -3,7 +3,6 @@ Energy System catalog archetype
|
||||
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
||||
Copyright © 2023 Concordia CERC group
|
||||
Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca
|
||||
Code contributors: Saeed Ranjbar saeed.ranjbar@concordia.ca
|
||||
"""
|
||||
|
||||
from typing import List
|
||||
@ -56,5 +55,3 @@ class Archetype:
|
||||
}
|
||||
}
|
||||
return content
|
||||
|
||||
|
||||
|
@ -10,13 +10,12 @@ class Content:
|
||||
"""
|
||||
Content class
|
||||
"""
|
||||
def __init__(self, archetypes, systems, generations, distributions, emissions, storages):
|
||||
def __init__(self, archetypes, systems, generations, distributions, emissions):
|
||||
self._archetypes = archetypes
|
||||
self._systems = systems
|
||||
self._generations = generations
|
||||
self._distributions = distributions
|
||||
self._emissions = emissions
|
||||
self._storages = storages
|
||||
|
||||
@property
|
||||
def archetypes(self):
|
||||
@ -53,13 +52,6 @@ class Content:
|
||||
"""
|
||||
return self._emissions
|
||||
|
||||
@property
|
||||
def storage_equipments(self):
|
||||
"""
|
||||
All storage equipments in the catalog
|
||||
"""
|
||||
return self._storages
|
||||
|
||||
def to_dictionary(self):
|
||||
"""Class content to dictionary"""
|
||||
_archetypes = []
|
||||
|
@ -3,7 +3,6 @@ Energy System catalog distribution system
|
||||
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
||||
Copyright © 2023 Concordia CERC group
|
||||
Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca
|
||||
Code contributors: Saeed Ranjbar saeed.ranjbar@concordia.ca
|
||||
"""
|
||||
|
||||
|
||||
|
@ -1,93 +0,0 @@
|
||||
"""
|
||||
Energy System catalog electrical storage system
|
||||
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
||||
Copyright © 2023 Concordia CERC group
|
||||
Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca
|
||||
Code contributors: Saeed Ranjbar saeed.ranjbar@concordia.ca
|
||||
"""
|
||||
|
||||
from hub.catalog_factories.data_models.energy_systems.energy_storage_system import EnergyStorageSystem
|
||||
|
||||
|
||||
class ElectricalStorageSystem(EnergyStorageSystem):
|
||||
""""
|
||||
Energy Storage System Class
|
||||
"""
|
||||
|
||||
def __init__(self, storage_id, name, model_name, manufacturer, storage_type, nominal_capacity, losses_ratio,
|
||||
rated_output_power, nominal_efficiency, battery_voltage, depth_of_discharge, self_discharge_rate):
|
||||
|
||||
super().__init__(storage_id, name, model_name, manufacturer, nominal_capacity, losses_ratio)
|
||||
self._storage_type = storage_type
|
||||
self._rated_output_power = rated_output_power
|
||||
self._nominal_efficiency = nominal_efficiency
|
||||
self._battery_voltage = battery_voltage
|
||||
self._depth_of_discharge = depth_of_discharge
|
||||
self._self_discharge_rate = self_discharge_rate
|
||||
|
||||
@property
|
||||
def storage_type(self):
|
||||
"""
|
||||
Get storage type from ['electrical', 'lithium_ion', 'lead_acid', 'NiCd']
|
||||
:return: string
|
||||
"""
|
||||
return self._storage_type
|
||||
|
||||
@property
|
||||
def rated_output_power(self):
|
||||
"""
|
||||
Get the rated output power of storage system in Watts
|
||||
:return: float
|
||||
"""
|
||||
return self._rated_output_power
|
||||
|
||||
@property
|
||||
def nominal_efficiency(self):
|
||||
"""
|
||||
Get the nominal efficiency of the storage system
|
||||
:return: float
|
||||
"""
|
||||
return self._nominal_efficiency
|
||||
|
||||
@property
|
||||
def battery_voltage(self):
|
||||
"""
|
||||
Get the battery voltage in Volts
|
||||
:return: float
|
||||
"""
|
||||
return self._battery_voltage
|
||||
|
||||
@property
|
||||
def depth_of_discharge(self):
|
||||
"""
|
||||
Get the depth of discharge as a percentage
|
||||
:return: float
|
||||
"""
|
||||
return self._depth_of_discharge
|
||||
|
||||
@property
|
||||
def self_discharge_rate(self):
|
||||
"""
|
||||
Get the self discharge rate of battery as a percentage
|
||||
:return: float
|
||||
"""
|
||||
return self._self_discharge_rate
|
||||
|
||||
def to_dictionary(self):
|
||||
"""Class content to dictionary"""
|
||||
content = {'Storage component': {
|
||||
'storage id': self.id,
|
||||
'name': self.name,
|
||||
'model name': self.model_name,
|
||||
'manufacturer': self.manufacturer,
|
||||
'storage type': self.storage_type,
|
||||
'nominal capacity [J]': self.nominal_capacity,
|
||||
'losses-ratio [J/J]': self.losses_ratio,
|
||||
'rated power [W]': self.rated_output_power,
|
||||
'nominal efficiency': self.nominal_efficiency,
|
||||
'battery voltage [V]': self.battery_voltage,
|
||||
'depth of discharge [%]': self.depth_of_discharge,
|
||||
'self discharge rate': self.self_discharge_rate
|
||||
}
|
||||
}
|
||||
return content
|
@ -1,75 +0,0 @@
|
||||
"""
|
||||
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
|
||||
"""
|
||||
|
||||
from abc import ABC
|
||||
|
||||
|
||||
class EnergyStorageSystem(ABC):
|
||||
""""
|
||||
Energy Storage System Abstract Class
|
||||
"""
|
||||
|
||||
def __init__(self, storage_id, name, model_name, manufacturer, nominal_capacity, losses_ratio):
|
||||
self._storage_id = storage_id
|
||||
self._name = name
|
||||
self._model_name = model_name
|
||||
self._manufacturer = manufacturer
|
||||
self._nominal_capacity = nominal_capacity
|
||||
self._losses_ratio = losses_ratio
|
||||
|
||||
@property
|
||||
def id(self):
|
||||
"""
|
||||
Get storage id
|
||||
:return: string
|
||||
"""
|
||||
return self._storage_id
|
||||
|
||||
@property
|
||||
def name(self):
|
||||
"""
|
||||
Get storage name
|
||||
:return: string
|
||||
"""
|
||||
return self._name
|
||||
|
||||
@property
|
||||
def model_name(self):
|
||||
"""
|
||||
Get system model
|
||||
:return: float
|
||||
"""
|
||||
return self._model_name
|
||||
|
||||
@property
|
||||
def manufacturer(self):
|
||||
"""
|
||||
Get name of manufacturer
|
||||
:return: string
|
||||
"""
|
||||
return self._manufacturer
|
||||
|
||||
@property
|
||||
def nominal_capacity(self):
|
||||
"""
|
||||
Get the nominal capacity of the storage system in Jules
|
||||
:return: float
|
||||
"""
|
||||
return self._nominal_capacity
|
||||
|
||||
@property
|
||||
def losses_ratio(self):
|
||||
"""
|
||||
Get the losses-ratio of storage system in Jules lost / Jules stored
|
||||
:return: float
|
||||
"""
|
||||
return self._losses_ratio
|
||||
|
||||
def to_dictionary(self):
|
||||
"""Class content to dictionary"""
|
||||
raise NotImplementedError
|
@ -1,58 +1,33 @@
|
||||
"""
|
||||
Energy System catalog heat generation system
|
||||
Energy System catalog generation system
|
||||
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
||||
Copyright © 2023 Concordia CERC group
|
||||
Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca
|
||||
Code contributors: Saeed Ranjbar saeed.ranjbar@concordia.ca
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
from typing import Union
|
||||
from hub.catalog_factories.data_models.energy_systems.performance_curves import PerformanceCurves
|
||||
|
||||
|
||||
class GenerationSystem:
|
||||
"""
|
||||
Heat Generation system class
|
||||
Generation system class
|
||||
"""
|
||||
def __init__(self, system_id, name, system_type, fuel_type, source_types, heat_efficiency, cooling_efficiency,
|
||||
electricity_efficiency, source_temperature, source_mass_flow, storage, auxiliary_equipment):
|
||||
|
||||
def __init__(self, system_id, name, model_name, manufacturer, system_type, fuel_type, nominal_thermal_output,
|
||||
maximum_heat_output, minimum_heat_output, source_medium, supply_medium, heat_efficiency,
|
||||
nominal_cooling_output, maximum_cooling_output, minimum_cooling_output, cooling_efficiency,
|
||||
electricity_efficiency, source_temperature, source_mass_flow, nominal_electricity_output,
|
||||
maximum_heat_supply_temperature, minimum_heat_supply_temperature,
|
||||
maximum_cooling_supply_temperature, minimum_cooling_supply_temperature, heat_output_curve,
|
||||
heat_fuel_consumption_curve, heat_efficiency_curve, cooling_output_curve, cooling_fuel_consumption_curve,
|
||||
cooling_efficiency_curve):
|
||||
self._system_id = system_id
|
||||
self._name = name
|
||||
self._model_name = model_name
|
||||
self._manufacturer = manufacturer
|
||||
self._system_type = system_type
|
||||
self._type = system_type
|
||||
self._fuel_type = fuel_type
|
||||
self._nominal_thermal_output = nominal_thermal_output
|
||||
self._maximum_heat_output = maximum_heat_output
|
||||
self._minimum_heat_output = minimum_heat_output
|
||||
self._source_types = source_types
|
||||
self._heat_efficiency = heat_efficiency
|
||||
self._nominal_cooling_output = nominal_cooling_output
|
||||
self._maximum_cooling_output = maximum_cooling_output
|
||||
self._minimum_cooling_output = minimum_cooling_output
|
||||
self._cooling_efficiency = cooling_efficiency
|
||||
self._electricity_efficiency = electricity_efficiency
|
||||
self._nominal_electricity_output = nominal_electricity_output
|
||||
self._source_medium = source_medium
|
||||
self._source_temperature = source_temperature
|
||||
self._source_mass_flow = source_mass_flow
|
||||
self._supply_medium = supply_medium
|
||||
self._maximum_heat_supply_temperature = maximum_heat_supply_temperature
|
||||
self._minimum_heat_supply_temperature = minimum_heat_supply_temperature
|
||||
self._maximum_cooling_supply_temperature = maximum_cooling_supply_temperature
|
||||
self._minimum_cooling_supply_temperature = minimum_cooling_supply_temperature
|
||||
self._heat_output_curve = heat_output_curve
|
||||
self._heat_fuel_consumption_curve = heat_fuel_consumption_curve
|
||||
self._heat_efficiency_curve = heat_efficiency_curve
|
||||
self._cooling_output_curve = cooling_output_curve
|
||||
self._cooling_fuel_consumption_curve = cooling_fuel_consumption_curve
|
||||
self._cooling_efficiency_curve = cooling_efficiency_curve
|
||||
self._storage = storage
|
||||
self._auxiliary_equipment = auxiliary_equipment
|
||||
|
||||
@property
|
||||
def id(self):
|
||||
@ -71,76 +46,28 @@ class GenerationSystem:
|
||||
return self._name
|
||||
|
||||
@property
|
||||
def model_name(self):
|
||||
"""
|
||||
Get system id
|
||||
:return: float
|
||||
"""
|
||||
return self._model_name
|
||||
|
||||
@property
|
||||
def manufacturer(self):
|
||||
"""
|
||||
Get name
|
||||
:return: string
|
||||
"""
|
||||
return self._manufacturer
|
||||
|
||||
@property
|
||||
def system_type(self):
|
||||
def type(self):
|
||||
"""
|
||||
Get type
|
||||
:return: string
|
||||
"""
|
||||
return self._system_type
|
||||
return self._type
|
||||
|
||||
@property
|
||||
def fuel_type(self):
|
||||
"""
|
||||
Get fuel_type from [renewable, gas, diesel, electricity, wood, coal, biogas]
|
||||
Get fuel_type from [renewable, gas, diesel, electricity, wood, coal]
|
||||
:return: string
|
||||
"""
|
||||
return self._fuel_type
|
||||
|
||||
@property
|
||||
def nominal_thermal_output(self):
|
||||
def source_types(self):
|
||||
"""
|
||||
Get nominal_thermal_output of heat generation devices in kW
|
||||
:return: float
|
||||
"""
|
||||
return self._nominal_thermal_output
|
||||
|
||||
@property
|
||||
def maximum_heat_output(self):
|
||||
"""
|
||||
Get maximum heat output of heat generation devices in W
|
||||
:return: float
|
||||
"""
|
||||
return self._maximum_heat_output
|
||||
|
||||
@property
|
||||
def minimum_heat_output(self):
|
||||
"""
|
||||
Get minimum heat output of heat generation devices in W
|
||||
:return: float
|
||||
"""
|
||||
return self._minimum_heat_output
|
||||
|
||||
@property
|
||||
def source_medium(self):
|
||||
"""
|
||||
Get source_type from [air, water, ground, district_heating, grid, on_site_electricity]
|
||||
Get source_type from [air, water, geothermal, district_heating, grid, on_site_electricity]
|
||||
:return: [string]
|
||||
"""
|
||||
return self._source_medium
|
||||
|
||||
@property
|
||||
def supply_medium(self):
|
||||
"""
|
||||
Get the supply medium from ['air', 'water']
|
||||
:return: string
|
||||
"""
|
||||
return self._supply_medium
|
||||
return self._source_types
|
||||
|
||||
@property
|
||||
def heat_efficiency(self):
|
||||
@ -150,30 +77,6 @@ class GenerationSystem:
|
||||
"""
|
||||
return self._heat_efficiency
|
||||
|
||||
@property
|
||||
def nominal_cooling_output(self):
|
||||
"""
|
||||
Get nominal_thermal_output of heat generation devices in kW
|
||||
:return: float
|
||||
"""
|
||||
return self._nominal_cooling_output
|
||||
|
||||
@property
|
||||
def maximum_cooling_output(self):
|
||||
"""
|
||||
Get maximum heat output of heat generation devices in W
|
||||
:return: float
|
||||
"""
|
||||
return self._maximum_cooling_output
|
||||
|
||||
@property
|
||||
def minimum_cooling_output(self):
|
||||
"""
|
||||
Get minimum heat output of heat generation devices in W
|
||||
:return: float
|
||||
"""
|
||||
return self._minimum_cooling_output
|
||||
|
||||
@property
|
||||
def cooling_efficiency(self):
|
||||
"""
|
||||
@ -207,126 +110,38 @@ class GenerationSystem:
|
||||
return self._source_mass_flow
|
||||
|
||||
@property
|
||||
def nominal_electricity_output(self):
|
||||
def storage(self):
|
||||
"""
|
||||
Get nominal_power_output of electricity generation devices or inverters in kW
|
||||
:return: float
|
||||
Get boolean storage exists
|
||||
:return: bool
|
||||
"""
|
||||
return self._nominal_electricity_output
|
||||
return self._storage
|
||||
|
||||
@property
|
||||
def maximum_heat_supply_temperature(self):
|
||||
def auxiliary_equipment(self) -> Union[None, GenerationSystem]:
|
||||
"""
|
||||
Get the maximum heat supply temperature in degree Celsius
|
||||
:return: float
|
||||
Get auxiliary_equipment
|
||||
:return: GenerationSystem
|
||||
"""
|
||||
return self._minimum_heat_supply_temperature
|
||||
|
||||
@property
|
||||
def minimum_heat_supply_temperature(self):
|
||||
"""
|
||||
Get the minimum heat supply temperature in degree Celsius
|
||||
:return: float
|
||||
"""
|
||||
return self._minimum_heat_supply_temperature
|
||||
|
||||
@property
|
||||
def maximum_cooling_supply_temperature(self):
|
||||
"""
|
||||
Get the maximum cooling supply temperature in degree Celsius
|
||||
:return: float
|
||||
"""
|
||||
return self._maximum_cooling_supply_temperature
|
||||
|
||||
@property
|
||||
def minimum_cooling_supply_temperature(self):
|
||||
"""
|
||||
Get the minimum cooling supply temperature in degree Celsius
|
||||
:return: float
|
||||
"""
|
||||
return self._minimum_cooling_supply_temperature
|
||||
|
||||
@property
|
||||
def heat_output_curve(self) -> Union[None, PerformanceCurves]:
|
||||
"""
|
||||
Get the heat output curve of the heat generation device
|
||||
:return: PerformanceCurve
|
||||
"""
|
||||
return self._heat_output_curve
|
||||
|
||||
@property
|
||||
def heat_fuel_consumption_curve(self) -> Union[None, PerformanceCurves]:
|
||||
"""
|
||||
Get the heating fuel consumption curve of the heat generation device
|
||||
:return: PerformanceCurve
|
||||
"""
|
||||
return self._heat_fuel_consumption_curve
|
||||
|
||||
@property
|
||||
def heat_efficiency_curve(self) -> Union[None, PerformanceCurves]:
|
||||
"""
|
||||
Get the heating efficiency curve of the heat generation device
|
||||
:return: PerformanceCurve
|
||||
"""
|
||||
return self._heat_efficiency_curve
|
||||
|
||||
@property
|
||||
def cooling_output_curve(self) -> Union[None, PerformanceCurves]:
|
||||
"""
|
||||
Get the heat output curve of the heat generation device
|
||||
:return: PerformanceCurve
|
||||
"""
|
||||
return self._cooling_output_curve
|
||||
|
||||
@property
|
||||
def cooling_fuel_consumption_curve(self) -> Union[None, PerformanceCurves]:
|
||||
"""
|
||||
Get the heating fuel consumption curve of the heat generation device
|
||||
:return: PerformanceCurve
|
||||
"""
|
||||
return self._cooling_fuel_consumption_curve
|
||||
|
||||
@property
|
||||
def cooling_efficiency_curve(self) -> Union[None, PerformanceCurves]:
|
||||
"""
|
||||
Get the heating efficiency curve of the heat generation device
|
||||
:return: PerformanceCurve
|
||||
"""
|
||||
return self._cooling_efficiency_curve
|
||||
return self._auxiliary_equipment
|
||||
|
||||
def to_dictionary(self):
|
||||
"""Class content to dictionary"""
|
||||
content = {'Energy Generation component': {
|
||||
'id': self.id,
|
||||
_auxiliary_equipment = []
|
||||
if self.auxiliary_equipment is not None:
|
||||
_auxiliary_equipment = self.auxiliary_equipment.to_dictionary()
|
||||
content = {'Layer': {'id': self.id,
|
||||
'name': self.name,
|
||||
'model name': self.model_name,
|
||||
'manufacturer': self.manufacturer,
|
||||
'type': self.system_type,
|
||||
'type': self.type,
|
||||
'fuel type': self.fuel_type,
|
||||
'nominal thermal output [W]': self.nominal_thermal_output,
|
||||
'maximum heat output [W]': self.maximum_heat_output,
|
||||
'minimum heat output [W]': self.minimum_heat_output,
|
||||
'source medium': self.source_medium,
|
||||
'supply medium': self.supply_medium,
|
||||
'source types': self.source_types,
|
||||
'source temperature [Celsius]': self.source_temperature,
|
||||
'source mass flow [kg/s]': self.source_mass_flow,
|
||||
'heat efficiency': self.heat_efficiency,
|
||||
'nominal cooling output [W]': self.nominal_cooling_output,
|
||||
'maximum cooling output [W]': self.maximum_cooling_output,
|
||||
'minimum cooling output [W]': self.minimum_cooling_output,
|
||||
'cooling efficiency': self.cooling_efficiency,
|
||||
'electricity efficiency': self.electricity_efficiency,
|
||||
'nominal power output [W]': self.nominal_electricity_output,
|
||||
'maximum heating supply temperature [Celsius]': self.maximum_heat_supply_temperature,
|
||||
'minimum heating supply temperature [Celsius]': self.minimum_heat_supply_temperature,
|
||||
'maximum cooling supply temperature [Celsius]': self.maximum_cooling_supply_temperature,
|
||||
'minimum cooling supply temperature [Celsius]': self.minimum_cooling_supply_temperature,
|
||||
'heat output curve': self.heat_output_curve,
|
||||
'heat fuel consumption curve': self.heat_fuel_consumption_curve,
|
||||
'heat efficiency curve': self.heat_efficiency_curve,
|
||||
'cooling output curve': self.cooling_output_curve,
|
||||
'cooling fuel consumption curve': self.cooling_fuel_consumption_curve,
|
||||
'cooling efficiency curve': self.cooling_efficiency_curve
|
||||
'it has storage': self.storage,
|
||||
'auxiliary equipment': _auxiliary_equipment
|
||||
}
|
||||
}
|
||||
return content
|
||||
|
@ -1,72 +0,0 @@
|
||||
"""
|
||||
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
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
class PerformanceCurves:
|
||||
"""
|
||||
Parameter function class
|
||||
"""
|
||||
|
||||
def __init__(self, curve_type, dependant_variable, parameters, coefficients):
|
||||
self._curve_type = curve_type
|
||||
self._dependant_variable = dependant_variable
|
||||
self._parameters = parameters
|
||||
self._coefficients = coefficients
|
||||
|
||||
@property
|
||||
def curve_type(self):
|
||||
"""
|
||||
The type of the fit function from the following
|
||||
Linear =>>> y = a*x + b
|
||||
Exponential =>>> y = a*(b**x)
|
||||
Polynomial =>>> y = a*(x**2) + b*x + c
|
||||
Power =>>> y = a*(x**b)
|
||||
Second degree multivariable =>>> y = a*(x**2) + b*x + c*x*z + d*z + e*(z**2) + f
|
||||
|
||||
Get the type of function from ['linear', 'exponential', 'polynomial', 'power', 'second degree multivariable']
|
||||
:return: string
|
||||
"""
|
||||
return self._curve_type
|
||||
|
||||
@property
|
||||
def dependant_variable(self):
|
||||
"""
|
||||
y (e.g. COP in COP = a*source temperature**2 + b*source temperature + c*source temperature*supply temperature +
|
||||
d*supply temperature + e*supply temperature**2 + f)
|
||||
"""
|
||||
return self._dependant_variable
|
||||
|
||||
@property
|
||||
def parameters(self):
|
||||
"""
|
||||
Get the list of parameters involved in fitting process as ['x', 'z'] (e.g. [source temperature, supply temperature]
|
||||
in COP=)
|
||||
:return: string
|
||||
"""
|
||||
return self._parameters
|
||||
|
||||
@property
|
||||
def coefficients(self):
|
||||
"""
|
||||
Get the coefficients of the functions as list of ['a', 'b', 'c', 'd', 'e', 'f']
|
||||
:return: [coefficients]
|
||||
"""
|
||||
return self._coefficients
|
||||
|
||||
def to_dictionary(self):
|
||||
"""Class content to dictionary"""
|
||||
content = {'Parameter Function': {
|
||||
'curve type': self.curve_type,
|
||||
'dependant variable': self.dependant_variable,
|
||||
'parameter(s)': self.parameters,
|
||||
'coefficients': self.coefficients,
|
||||
}
|
||||
}
|
||||
return content
|
@ -1,131 +0,0 @@
|
||||
"""
|
||||
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
|
||||
"""
|
||||
|
||||
from hub.catalog_factories.data_models.energy_systems.generation_system import GenerationSystem
|
||||
|
||||
|
||||
class PvGenerationSystem(GenerationSystem):
|
||||
"""
|
||||
Electricity Generation system class
|
||||
"""
|
||||
|
||||
def __init__(self, system_id, name, model_name, manufacturer, electricity_efficiency,
|
||||
nominal_electricity_output, nominal_ambient_temperature, nominal_cell_temperature,
|
||||
nominal_radiation, standard_test_condition_cell_temperature, standard_test_condition_maximum_power,
|
||||
cell_temperature_coefficient, width, height):
|
||||
super().__init__(system_id=system_id, name=name, model_name=model_name,
|
||||
manufacturer=manufacturer, system_type='pv', fuel_type='renewable',
|
||||
nominal_thermal_output=None, maximum_heat_output=None,
|
||||
minimum_heat_output=None, source_medium=None,
|
||||
supply_medium=None, heat_efficiency=None, nominal_cooling_output=None,
|
||||
maximum_cooling_output=None, minimum_cooling_output=None,
|
||||
cooling_efficiency=None, electricity_efficiency=electricity_efficiency,
|
||||
source_temperature=None, source_mass_flow=None,
|
||||
nominal_electricity_output=nominal_electricity_output,
|
||||
maximum_heat_supply_temperature=None,
|
||||
minimum_heat_supply_temperature=None,
|
||||
maximum_cooling_supply_temperature=None,
|
||||
minimum_cooling_supply_temperature=None, heat_output_curve=None,
|
||||
heat_fuel_consumption_curve=None, heat_efficiency_curve=None,
|
||||
cooling_output_curve=None, cooling_fuel_consumption_curve=None,
|
||||
cooling_efficiency_curve=None)
|
||||
self._nominal_ambient_temperature = nominal_ambient_temperature
|
||||
self._nominal_cell_temperature = nominal_cell_temperature
|
||||
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
|
||||
|
||||
@property
|
||||
def nominal_ambient_temperature(self):
|
||||
"""
|
||||
Get nominal ambient temperature of PV panels in degree Celsius
|
||||
:return: float
|
||||
"""
|
||||
return self._nominal_ambient_temperature
|
||||
|
||||
@property
|
||||
def nominal_cell_temperature(self):
|
||||
"""
|
||||
Get nominal cell temperature of PV panels in degree Celsius
|
||||
:return: float
|
||||
"""
|
||||
return self._nominal_cell_temperature
|
||||
|
||||
@property
|
||||
def nominal_radiation(self):
|
||||
"""
|
||||
Get nominal radiation of PV panels
|
||||
:return: float
|
||||
"""
|
||||
return self._nominal_radiation
|
||||
|
||||
@property
|
||||
def standard_test_condition_cell_temperature(self):
|
||||
"""
|
||||
Get standard test condition cell temperature of PV panels in degree Celsius
|
||||
:return: float
|
||||
"""
|
||||
return self._standard_test_condition_cell_temperature
|
||||
|
||||
@property
|
||||
def standard_test_condition_maximum_power(self):
|
||||
"""
|
||||
Get standard test condition maximum power of PV panels in kW
|
||||
:return: float
|
||||
"""
|
||||
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):
|
||||
"""
|
||||
Get PV module width in m
|
||||
:return: float
|
||||
"""
|
||||
return self._width
|
||||
|
||||
@property
|
||||
def height(self):
|
||||
"""
|
||||
Get PV module height in m
|
||||
:return: float
|
||||
"""
|
||||
return self._height
|
||||
|
||||
def to_dictionary(self):
|
||||
"""Class content to dictionary"""
|
||||
content = {'Energy Generation component': {
|
||||
'id': self.id,
|
||||
'name': self.name,
|
||||
'model name': self.model_name,
|
||||
'manufacturer': self.manufacturer,
|
||||
'type': self.system_type,
|
||||
'fuel type': self.fuel_type,
|
||||
'electricity efficiency': self.electricity_efficiency,
|
||||
'nominal power output [kW]': self.nominal_electricity_output,
|
||||
'nominal ambient temperature [Celsius]': self.nominal_ambient_temperature,
|
||||
'nominal cell temperature [Celsius]': self.nominal_cell_temperature,
|
||||
'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,
|
||||
}
|
||||
}
|
||||
return content
|
@ -1,16 +1,13 @@
|
||||
"""
|
||||
Energy System catalog heat generation system
|
||||
Energy System catalog equipment
|
||||
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
||||
Copyright © 2023 Concordia CERC group
|
||||
Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca
|
||||
Code contributors: Saeed Ranjbar saeed.ranjbar@concordia.ca
|
||||
"""
|
||||
|
||||
from typing import Union, List
|
||||
from typing import Union
|
||||
|
||||
from hub.catalog_factories.data_models.energy_systems.generation_system import GenerationSystem
|
||||
from hub.catalog_factories.data_models.energy_systems.thermal_storage_system import ThermalStorageSystem
|
||||
from hub.catalog_factories.data_models.energy_systems.electrical_storage_system import ElectricalStorageSystem
|
||||
from hub.catalog_factories.data_models.energy_systems.distribution_system import DistributionSystem
|
||||
from hub.catalog_factories.data_models.energy_systems.emission_system import EmissionSystem
|
||||
|
||||
@ -19,25 +16,22 @@ class System:
|
||||
"""
|
||||
System class
|
||||
"""
|
||||
|
||||
def __init__(self,
|
||||
lod,
|
||||
system_id,
|
||||
name,
|
||||
demand_types,
|
||||
generation_systems,
|
||||
distribution_systems,
|
||||
emission_systems,
|
||||
energy_storage_systems):
|
||||
generation_system,
|
||||
distribution_system,
|
||||
emission_system):
|
||||
|
||||
self._lod = lod
|
||||
self._system_id = system_id
|
||||
self._name = name
|
||||
self._demand_types = demand_types
|
||||
self._distribution_systems = distribution_systems
|
||||
self._emission_systems = emission_systems
|
||||
self._generation_systems = generation_systems
|
||||
self._energy_storage_systems = energy_storage_systems
|
||||
# self._configuration = configuration
|
||||
self._generation_system = generation_system
|
||||
self._distribution_system = distribution_system
|
||||
self._emission_system = emission_system
|
||||
|
||||
@property
|
||||
def lod(self):
|
||||
@ -58,7 +52,7 @@ class System:
|
||||
@property
|
||||
def name(self):
|
||||
"""
|
||||
Get the system name
|
||||
Get name
|
||||
:return: string
|
||||
"""
|
||||
return self._name
|
||||
@ -66,63 +60,50 @@ class System:
|
||||
@property
|
||||
def demand_types(self):
|
||||
"""
|
||||
Get demand able to cover from ['heating', 'cooling', 'domestic_hot_water', 'electricity']
|
||||
Get demand able to cover from [heating, cooling, domestic_hot_water, electricity]
|
||||
:return: [string]
|
||||
"""
|
||||
return self._demand_types
|
||||
|
||||
@property
|
||||
def generation_systems(self) -> List[GenerationSystem]:
|
||||
def generation_system(self) -> GenerationSystem:
|
||||
"""
|
||||
Get generation systems
|
||||
:return: [GenerationSystem]
|
||||
Get generation system
|
||||
:return: GenerationSystem
|
||||
"""
|
||||
return self._generation_systems
|
||||
return self._generation_system
|
||||
|
||||
@property
|
||||
def distribution_systems(self) -> Union[None, List[DistributionSystem]]:
|
||||
def distribution_system(self) -> Union[None, DistributionSystem]:
|
||||
"""
|
||||
Get distribution systems
|
||||
:return: [DistributionSystem]
|
||||
Get distribution system
|
||||
:return: DistributionSystem
|
||||
"""
|
||||
return self._distribution_systems
|
||||
return self._distribution_system
|
||||
|
||||
@property
|
||||
def emission_systems(self) -> Union[None, List[EmissionSystem]]:
|
||||
def emission_system(self) -> Union[None, EmissionSystem]:
|
||||
"""
|
||||
Get emission systems
|
||||
:return: [EmissionSystem]
|
||||
Get emission system
|
||||
:return: EmissionSystem
|
||||
"""
|
||||
return self._emission_systems
|
||||
|
||||
@property
|
||||
def energy_storage_systems(self) -> Union[None, List[ThermalStorageSystem], List[ElectricalStorageSystem]]:
|
||||
"""
|
||||
Get energy storage systems
|
||||
:return: [EnergyStorageSystem]
|
||||
"""
|
||||
return self._energy_storage_systems
|
||||
return self._emission_system
|
||||
|
||||
def to_dictionary(self):
|
||||
"""Class content to dictionary"""
|
||||
_generation_systems = []
|
||||
for _generation in self.generation_systems:
|
||||
_generation_systems.append(_generation.to_dictionary())
|
||||
_distribution_systems = [_distribution.to_dictionary() for _distribution in
|
||||
self.distribution_systems] if self.distribution_systems is not None else None
|
||||
_emission_systems = [_emission.to_dictionary() for _emission in
|
||||
self.emission_systems] if self.emission_systems is not None else None
|
||||
_storage_systems = [_storage.to_dictionary() for _storage in
|
||||
self.energy_storage_systems] if self.energy_storage_systems is not None else None
|
||||
|
||||
content = {'system': {'id': self.id,
|
||||
_distribution_system = None
|
||||
if self.distribution_system is not None:
|
||||
_distribution_system = self.distribution_system.to_dictionary()
|
||||
_emission_system = None
|
||||
if self.emission_system is not None:
|
||||
_emission_system = self.emission_system.to_dictionary()
|
||||
content = {'Layer': {'id': self.id,
|
||||
'name': self.name,
|
||||
'level of detail': self.lod,
|
||||
'demand types': self.demand_types,
|
||||
'generation system(s)': _generation_systems,
|
||||
'distribution system(s)': _distribution_systems,
|
||||
'emission system(s)': _emission_systems,
|
||||
'energy storage system(s)': _storage_systems,
|
||||
'generation system': self.generation_system.to_dictionary(),
|
||||
'distribution system': _distribution_system,
|
||||
'emission system': _emission_system
|
||||
}
|
||||
}
|
||||
return content
|
||||
|
@ -1,89 +0,0 @@
|
||||
"""
|
||||
Energy System catalog thermal storage system
|
||||
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
||||
Copyright © 2023 Concordia CERC group
|
||||
Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca
|
||||
Code contributors: Saeed Ranjbar saeed.ranjbar@concordia.ca
|
||||
"""
|
||||
|
||||
from hub.catalog_factories.data_models.energy_systems.energy_storage_system import EnergyStorageSystem
|
||||
from hub.catalog_factories.data_models.construction.layer import Layer
|
||||
|
||||
|
||||
class ThermalStorageSystem(EnergyStorageSystem):
|
||||
""""
|
||||
Energy Storage System Class
|
||||
"""
|
||||
|
||||
def __init__(self, storage_id, name, model_name, manufacturer, storage_type, nominal_capacity, losses_ratio,
|
||||
volume, height, layers, maximum_operating_temperature):
|
||||
|
||||
super().__init__(storage_id, name, model_name, manufacturer, nominal_capacity, losses_ratio)
|
||||
self._storage_type = storage_type
|
||||
self._volume = volume
|
||||
self._height = height
|
||||
self._layers = layers
|
||||
self._maximum_operating_temperature = maximum_operating_temperature
|
||||
|
||||
@property
|
||||
def storage_type(self):
|
||||
"""
|
||||
Get storage type from ['thermal', 'sensible', 'latent']
|
||||
:return: string
|
||||
"""
|
||||
return self._storage_type
|
||||
|
||||
@property
|
||||
def volume(self):
|
||||
"""
|
||||
Get the physical volume of the storage system in cubic meters
|
||||
:return: float
|
||||
"""
|
||||
return self._volume
|
||||
|
||||
@property
|
||||
def height(self):
|
||||
"""
|
||||
Get the diameter of the storage system in meters
|
||||
:return: float
|
||||
"""
|
||||
return self._height
|
||||
|
||||
@property
|
||||
def layers(self) -> [Layer]:
|
||||
"""
|
||||
Get construction layers
|
||||
:return: [layer]
|
||||
"""
|
||||
return self._layers
|
||||
|
||||
@property
|
||||
def maximum_operating_temperature(self):
|
||||
"""
|
||||
Get maximum operating temperature of the storage system in degree Celsius
|
||||
:return: float
|
||||
"""
|
||||
return self._maximum_operating_temperature
|
||||
|
||||
def to_dictionary(self):
|
||||
"""Class content to dictionary"""
|
||||
_layers = None
|
||||
if self.layers is not None:
|
||||
_layers = []
|
||||
for _layer in self.layers:
|
||||
_layers.append(_layer.to_dictionary())
|
||||
content = {'Storage component': {
|
||||
'storage id': self.id,
|
||||
'name': self.name,
|
||||
'model name': self.model_name,
|
||||
'manufacturer': self.manufacturer,
|
||||
'storage type': self.storage_type,
|
||||
'nominal capacity [J]': self.nominal_capacity,
|
||||
'losses-ratio [J/J]': self.losses_ratio,
|
||||
'volume [m3]': self.volume,
|
||||
'height [m]': self.height,
|
||||
'layers': _layers,
|
||||
'maximum operating temperature [Celsius]': self.maximum_operating_temperature
|
||||
}
|
||||
}
|
||||
return content
|
@ -14,15 +14,12 @@ from hub.catalog_factories.data_models.energy_systems.generation_system import G
|
||||
from hub.catalog_factories.data_models.energy_systems.distribution_system import DistributionSystem
|
||||
from hub.catalog_factories.data_models.energy_systems.emission_system import EmissionSystem
|
||||
from hub.catalog_factories.data_models.energy_systems.archetype import Archetype
|
||||
from hub.catalog_factories.data_models.energy_systems.thermal_storage_system import ThermalStorageSystem
|
||||
from hub.catalog_factories.data_models.energy_systems.electrical_storage_system import ElectricalStorageSystem
|
||||
|
||||
|
||||
class MontrealCustomCatalog(Catalog):
|
||||
"""
|
||||
Montreal custom energy systems catalog class
|
||||
"""
|
||||
|
||||
def __init__(self, path):
|
||||
path = str(path / 'montreal_custom_systems.xml')
|
||||
with open(path, 'r', encoding='utf-8') as xml:
|
||||
@ -31,23 +28,21 @@ class MontrealCustomCatalog(Catalog):
|
||||
|
||||
self._lod = float(self._archetypes['catalog']['@lod'])
|
||||
|
||||
self._catalog_generation_equipments, self._catalog_storage_equipments = \
|
||||
self._load_generation_and_storage_equipments()
|
||||
self._catalog_generation_equipments = self._load_generation_equipments()
|
||||
self._catalog_distribution_equipments = self._load_distribution_equipments()
|
||||
self._catalog_emission_equipments = self._load_emission_equipments()
|
||||
self._catalog_systems = self._load_systems()
|
||||
self._catalog_archetypes = self._load_archetypes()
|
||||
|
||||
# store the full catalog data model in self._content
|
||||
self._content = Content(self._catalog_archetypes,
|
||||
self._catalog_systems,
|
||||
self._catalog_generation_equipments,
|
||||
self._catalog_distribution_equipments,
|
||||
self._catalog_emission_equipments,
|
||||
None)
|
||||
self._catalog_emission_equipments)
|
||||
|
||||
def _load_generation_and_storage_equipments(self):
|
||||
def _load_generation_equipments(self):
|
||||
_equipments = []
|
||||
_storages = []
|
||||
equipments = self._archetypes['catalog']['generation_equipments']['equipment']
|
||||
for equipment in equipments:
|
||||
equipment_id = float(equipment['@id'])
|
||||
@ -63,48 +58,22 @@ class MontrealCustomCatalog(Catalog):
|
||||
electricity_efficiency = None
|
||||
if 'electrical_efficiency' in equipment:
|
||||
electricity_efficiency = float(equipment['electrical_efficiency'])
|
||||
storage = literal_eval(equipment['storage'].capitalize())
|
||||
generation_system = GenerationSystem(equipment_id,
|
||||
name,
|
||||
None,
|
||||
None,
|
||||
equipment_type,
|
||||
fuel_type,
|
||||
None,
|
||||
None,
|
||||
None,
|
||||
None,
|
||||
None,
|
||||
heating_efficiency,
|
||||
None,
|
||||
None,
|
||||
None,
|
||||
cooling_efficiency,
|
||||
electricity_efficiency,
|
||||
None,
|
||||
None,
|
||||
None,
|
||||
None,
|
||||
None,
|
||||
None,
|
||||
None,
|
||||
None,
|
||||
None,
|
||||
None,
|
||||
None,
|
||||
None,
|
||||
storage,
|
||||
None)
|
||||
_equipments.append(generation_system)
|
||||
storage = literal_eval(equipment['storage'].capitalize())
|
||||
if storage:
|
||||
if equipment_type == 'electricity generator':
|
||||
storage_system = ElectricalStorageSystem(equipment_id, None, None, None, 'electrical', None, None, None, None,
|
||||
None, None, None)
|
||||
else:
|
||||
storage_system = ThermalStorageSystem(equipment_id, None, None, None, 'thermal', None, None, None, None, None,
|
||||
None)
|
||||
_storages.append(storage_system)
|
||||
|
||||
return _equipments, _storages
|
||||
_equipments.append(generation_system)
|
||||
return _equipments
|
||||
|
||||
def _load_distribution_equipments(self):
|
||||
_equipments = []
|
||||
@ -121,8 +90,7 @@ class MontrealCustomCatalog(Catalog):
|
||||
distribution_consumption_fix_flow = float(equipment['distribution_consumption_fix_flow']['#text']) / 100
|
||||
distribution_consumption_variable_flow = None
|
||||
if 'distribution_consumption_variable_flow' in equipment:
|
||||
distribution_consumption_variable_flow = float(
|
||||
equipment['distribution_consumption_variable_flow']['#text']) / 100
|
||||
distribution_consumption_variable_flow = float(equipment['distribution_consumption_variable_flow']['#text']) / 100
|
||||
|
||||
distribution_system = DistributionSystem(equipment_id,
|
||||
name,
|
||||
@ -162,33 +130,28 @@ class MontrealCustomCatalog(Catalog):
|
||||
name = system['name']
|
||||
demands = system['demands']['demand']
|
||||
generation_equipment = system['equipments']['generation_id']
|
||||
_generation_equipments = None
|
||||
_generation_equipment = None
|
||||
for equipment_archetype in self._catalog_generation_equipments:
|
||||
if int(equipment_archetype.id) == int(generation_equipment):
|
||||
_generation_equipments = [equipment_archetype]
|
||||
_storage_equipments = None
|
||||
for equipment_archetype in self._catalog_storage_equipments:
|
||||
if int(equipment_archetype.id) == int(generation_equipment):
|
||||
_storage_equipments = [equipment_archetype]
|
||||
_generation_equipment = equipment_archetype
|
||||
distribution_equipment = system['equipments']['distribution_id']
|
||||
_distribution_equipments = None
|
||||
_distribution_equipment = None
|
||||
for equipment_archetype in self._catalog_distribution_equipments:
|
||||
if int(equipment_archetype.id) == int(distribution_equipment):
|
||||
_distribution_equipments = [equipment_archetype]
|
||||
_distribution_equipment = equipment_archetype
|
||||
emission_equipment = system['equipments']['dissipation_id']
|
||||
_emission_equipments = None
|
||||
_emission_equipment = None
|
||||
for equipment_archetype in self._catalog_emission_equipments:
|
||||
if int(equipment_archetype.id) == int(emission_equipment):
|
||||
_emission_equipments = [equipment_archetype]
|
||||
_emission_equipment = equipment_archetype
|
||||
|
||||
_catalog_systems.append(System(self._lod,
|
||||
system_id,
|
||||
name,
|
||||
demands,
|
||||
_generation_equipments,
|
||||
_distribution_equipments,
|
||||
_emission_equipments,
|
||||
_storage_equipments))
|
||||
_generation_equipment,
|
||||
_distribution_equipment,
|
||||
_emission_equipment))
|
||||
return _catalog_systems
|
||||
|
||||
def _load_archetypes(self):
|
||||
|
@ -1,510 +0,0 @@
|
||||
"""
|
||||
North america energy system catalog
|
||||
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
||||
Copyright © 2022 Concordia CERC group
|
||||
Project Coder Saeed Ranjbar saeed.ranjbar@concordia.ca
|
||||
Code contributors: Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca
|
||||
"""
|
||||
|
||||
import xmltodict
|
||||
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.thermal_storage_system import ThermalStorageSystem
|
||||
from hub.catalog_factories.data_models.energy_systems.performance_curves import PerformanceCurves
|
||||
from hub.catalog_factories.data_models.energy_systems.archetype import Archetype
|
||||
from hub.catalog_factories.data_models.construction.material import Material
|
||||
from hub.catalog_factories.data_models.construction.layer import Layer
|
||||
|
||||
|
||||
class NorthAmericaEnergySystemCatalog(Catalog):
|
||||
"""
|
||||
North america energy system catalog class
|
||||
"""
|
||||
|
||||
def __init__(self, path):
|
||||
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', 'templateStorages'])
|
||||
self._generation_components = self._load_generation_components()
|
||||
self._storage_components = self._load_storage_components()
|
||||
self._systems = self._load_systems()
|
||||
self._system_archetypes = self._load_archetypes()
|
||||
self._content = Content(self._system_archetypes,
|
||||
self._systems,
|
||||
self._generation_components,
|
||||
None,
|
||||
None,
|
||||
self._storage_components)
|
||||
|
||||
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['@maximumHeatOutput'])
|
||||
boiler_minimum_heat_output = float(boiler['@minimumHeatOutput'])
|
||||
boiler_heat_efficiency = float(boiler['@nominalEfficiency'])
|
||||
|
||||
boiler_component = GenerationSystem(boiler_id,
|
||||
boiler_name,
|
||||
boiler_model_name,
|
||||
boiler_manufacturer,
|
||||
system_type,
|
||||
boiler_fuel_type,
|
||||
boiler_nominal_thermal_output,
|
||||
boiler_maximum_heat_output,
|
||||
boiler_minimum_heat_output,
|
||||
None,
|
||||
None,
|
||||
boiler_heat_efficiency,
|
||||
None,
|
||||
None,
|
||||
None,
|
||||
None,
|
||||
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_maximum_heat_output = float(heat_pump['@maximumHeatOutput'])
|
||||
heat_pump_minimum_heat_output = float(heat_pump['@minimumHeatOutput'])
|
||||
heat_pump_source_medium = heat_pump['@heatSource']
|
||||
heat_pump_supply_medium = heat_pump['@supply_medium']
|
||||
heat_pump_nominal_cop = float(heat_pump['@nominalCOP'])
|
||||
heat_pump_maximum_heat_supply_temperature = float(heat_pump['@maxHeatingSupTemperature'])
|
||||
heat_pump_minimum_heat_supply_temperature = float(heat_pump['@minHeatingSupTemperature'])
|
||||
heat_pump_maximum_cooling_supply_temperature = float(heat_pump['@maxCoolingSupTemperature'])
|
||||
heat_pump_minimum_cooling_supply_temperature = float(heat_pump['@minCoolingSupTemperature'])
|
||||
cop_curve_type = heat_pump['performance_curve']['@curve_type']
|
||||
dependant_variable = heat_pump['performance_curve']['dependant_variable']
|
||||
parameters = heat_pump['performance_curve']['parameters']
|
||||
coefficients = list(heat_pump['performance_curve']['coefficients'].values())
|
||||
cop_curve = PerformanceCurves(cop_curve_type, dependant_variable, parameters, coefficients)
|
||||
|
||||
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,
|
||||
heat_pump_maximum_heat_output,
|
||||
heat_pump_minimum_heat_output,
|
||||
heat_pump_source_medium,
|
||||
heat_pump_supply_medium,
|
||||
heat_pump_nominal_cop,
|
||||
None,
|
||||
None,
|
||||
None,
|
||||
None,
|
||||
None,
|
||||
None,
|
||||
None,
|
||||
None,
|
||||
heat_pump_maximum_heat_supply_temperature,
|
||||
heat_pump_minimum_heat_supply_temperature,
|
||||
heat_pump_maximum_cooling_supply_temperature,
|
||||
heat_pump_minimum_cooling_supply_temperature,
|
||||
None,
|
||||
None,
|
||||
cop_curve,
|
||||
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'])
|
||||
|
||||
pv_component = PvGenerationSystem(pv_id,
|
||||
pv_name,
|
||||
pv_model_name,
|
||||
pv_manufacturer,
|
||||
pv_electricity_efficiency,
|
||||
pv_nominal_electricity_output,
|
||||
nominal_ambient_temperature,
|
||||
nominal_cell_temperature,
|
||||
nominal_radiation,
|
||||
standard_test_condition_cell_temperature,
|
||||
standard_test_condition_maximum_power,
|
||||
cell_temperature_coefficient,
|
||||
width,
|
||||
height)
|
||||
generation_components.append(pv_component)
|
||||
for template in templates:
|
||||
system_id = template['@generation_id']
|
||||
system_name = template['@name']
|
||||
if "Boiler" in system_name:
|
||||
system_type = 'boiler'
|
||||
fuel_type = template['@fuel']
|
||||
heat_efficiency = float(template['@nominalEfficiency'])
|
||||
source_medium = None
|
||||
supply_medium = None
|
||||
boiler_template = GenerationSystem(system_id,
|
||||
system_name,
|
||||
None,
|
||||
None,
|
||||
system_type,
|
||||
fuel_type,
|
||||
None,
|
||||
None,
|
||||
None,
|
||||
source_medium,
|
||||
supply_medium,
|
||||
heat_efficiency,
|
||||
None,
|
||||
None,
|
||||
None,
|
||||
None,
|
||||
None,
|
||||
None,
|
||||
None,
|
||||
None,
|
||||
None,
|
||||
None,
|
||||
None,
|
||||
None,
|
||||
None,
|
||||
None,
|
||||
None,
|
||||
None,
|
||||
None,
|
||||
None)
|
||||
generation_components.append(boiler_template)
|
||||
elif "Heat Pump" in system_name:
|
||||
system_type = 'heat pump'
|
||||
fuel_type = template['@fuel']
|
||||
heat_efficiency = template['@nominalCOP']
|
||||
source_medium = template['@heatSource']
|
||||
supply_medium = template['@supply_medium']
|
||||
heat_pump_template = GenerationSystem(system_id,
|
||||
system_name,
|
||||
None,
|
||||
None,
|
||||
system_type,
|
||||
fuel_type,
|
||||
None,
|
||||
None,
|
||||
None,
|
||||
source_medium,
|
||||
supply_medium,
|
||||
heat_efficiency,
|
||||
None,
|
||||
None,
|
||||
None,
|
||||
None,
|
||||
None,
|
||||
None,
|
||||
None,
|
||||
None,
|
||||
None,
|
||||
None,
|
||||
None,
|
||||
None,
|
||||
None,
|
||||
None,
|
||||
None,
|
||||
None,
|
||||
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):
|
||||
storage_components = []
|
||||
thermal_storages = self._archetypes['EnergySystemCatalog']['energy_storage_components']['thermalStorages']
|
||||
template_storages = self._archetypes['EnergySystemCatalog']['energy_storage_components']['templateStorages']
|
||||
for tes in thermal_storages:
|
||||
storage_id = tes['@storage_id']
|
||||
name = tes['@name']
|
||||
model_name = tes['@modelName']
|
||||
manufacturer = tes['@manufacturer']
|
||||
storage_type = 'sensible'
|
||||
volume = tes['physical_characteristics']['@volume']
|
||||
height = tes['physical_characteristics']['@height']
|
||||
maximum_operating_temperature = tes['@maxTemp']
|
||||
materials = self._load_materials()
|
||||
insulation_material_id = tes['insulation']['@material_id']
|
||||
insulation_material = self._search_material(materials, insulation_material_id)
|
||||
material_id = tes['physical_characteristics']['@material_id']
|
||||
tank_material = self._search_material(materials, material_id)
|
||||
thickness = float(tes['insulation']['@insulationThickness']) / 100 # from cm to m
|
||||
insulation_layer = Layer(None, 'insulation', insulation_material, thickness)
|
||||
thickness = float(tes['physical_characteristics']['@tankThickness']) / 100 # from cm to m
|
||||
tank_layer = Layer(None, 'tank', tank_material, thickness)
|
||||
# the convention is from outside to inside
|
||||
layers = [insulation_layer, tank_layer]
|
||||
storage_component = ThermalStorageSystem(storage_id,
|
||||
name,
|
||||
model_name,
|
||||
manufacturer,
|
||||
storage_type,
|
||||
None,
|
||||
None,
|
||||
volume,
|
||||
height,
|
||||
layers,
|
||||
maximum_operating_temperature)
|
||||
storage_components.append(storage_component)
|
||||
|
||||
for template in template_storages:
|
||||
storage_id = template['@storage_id']
|
||||
name = template['@name']
|
||||
storage_type = 'sensible'
|
||||
maximum_temperature = template['@maxTemp']
|
||||
height = template['physical_characteristics']['@height']
|
||||
materials = self._load_materials()
|
||||
insulation_material_id = template['insulation']['@material_id']
|
||||
insulation_material = self._search_material(materials, insulation_material_id)
|
||||
material_id = template['physical_characteristics']['@material_id']
|
||||
tank_material = self._search_material(materials, material_id)
|
||||
thickness = float(template['insulation']['@insulationThickness']) / 100 # from cm to m
|
||||
insulation_layer = Layer(None, 'insulation', insulation_material, thickness)
|
||||
thickness = float(template['physical_characteristics']['@tankThickness']) / 100 # from cm to m
|
||||
tank_layer = Layer(None, 'tank', tank_material, thickness)
|
||||
# the convention is from outside to inside
|
||||
layers = [insulation_layer, tank_layer]
|
||||
storage_component = ThermalStorageSystem(storage_id,
|
||||
name,
|
||||
None,
|
||||
None,
|
||||
storage_type,
|
||||
None,
|
||||
None,
|
||||
None,
|
||||
height,
|
||||
layers,
|
||||
maximum_temperature)
|
||||
storage_components.append(storage_component)
|
||||
return storage_components
|
||||
|
||||
def _load_systems(self):
|
||||
_catalog_systems = []
|
||||
systems = self._archetypes['EnergySystemCatalog']['systems']['system']
|
||||
for system in systems:
|
||||
system_id = system['@id']
|
||||
name = system['name']
|
||||
demands = system['demands']['demand']
|
||||
generation_components = system['components']['generation_id']
|
||||
generation_systems = self._search_generation_equipment(self._load_generation_components(), generation_components)
|
||||
if 'storage_id' in system['components'].keys():
|
||||
storage_components = system['components']['storage_id']
|
||||
storage_systems = self._search_storage_equipment(self._load_storage_components(), storage_components)
|
||||
else:
|
||||
storage_systems = None
|
||||
energy_system = System(None,
|
||||
system_id,
|
||||
name,
|
||||
demands,
|
||||
generation_systems,
|
||||
None,
|
||||
None,
|
||||
storage_systems)
|
||||
_catalog_systems.append(energy_system)
|
||||
return _catalog_systems
|
||||
|
||||
def _load_archetypes(self):
|
||||
_system_archetypes = []
|
||||
system_clusters = self._archetypes['EnergySystemCatalog']['system_archetypes']['system_archetype']
|
||||
for system_cluster in system_clusters:
|
||||
name = system_cluster['name']
|
||||
systems = system_cluster['systems']['system_id']
|
||||
integer_system_ids = [int(item) for item in systems]
|
||||
_systems = []
|
||||
for system_archetype in self._systems:
|
||||
if int(system_archetype.id) in integer_system_ids:
|
||||
_systems.append(system_archetype)
|
||||
_system_archetypes.append(Archetype(None, name, _systems))
|
||||
return _system_archetypes
|
||||
|
||||
def _load_materials(self):
|
||||
materials = []
|
||||
_materials = self._archetypes['EnergySystemCatalog']['materials']['material']
|
||||
for _material in _materials:
|
||||
material_id = _material['@material_id']
|
||||
name = _material['@name']
|
||||
thermal_conductivity = _material['@thermalConductivity']
|
||||
material = Material(material_id,
|
||||
name,
|
||||
None,
|
||||
None,
|
||||
None,
|
||||
False,
|
||||
None,
|
||||
thermal_conductivity,
|
||||
None,
|
||||
None)
|
||||
materials.append(material)
|
||||
return materials
|
||||
|
||||
@staticmethod
|
||||
def _search_material(materials, material_id):
|
||||
_material = None
|
||||
for material in materials:
|
||||
if int(material.id) == int(material_id):
|
||||
_material = material
|
||||
return _material
|
||||
|
||||
if _material is None:
|
||||
raise ValueError(f'Material with the id = [{material_id}] not found in catalog ')
|
||||
|
||||
@staticmethod
|
||||
def _search_generation_equipment(generation_systems, generation_id):
|
||||
_generation_systems = []
|
||||
if type(generation_id) == list:
|
||||
integer_ids = [int(item) for item in generation_id]
|
||||
for generation in generation_systems:
|
||||
if int(generation.id) in integer_ids:
|
||||
_generation_systems.append(generation)
|
||||
else:
|
||||
integer_id = int(generation_id)
|
||||
for generation in generation_systems:
|
||||
if int(generation.id) == integer_id:
|
||||
_generation_systems.append(generation)
|
||||
|
||||
if len(_generation_systems) == 0:
|
||||
_generation_systems = None
|
||||
raise ValueError(f'The system with the following id is not found in catalog [{generation_id}]')
|
||||
return _generation_systems
|
||||
|
||||
@staticmethod
|
||||
def _search_storage_equipment(storage_systems, storage_id):
|
||||
_storage_systems = []
|
||||
for storage in storage_systems:
|
||||
if storage.id in storage_id:
|
||||
_storage_systems.append(storage)
|
||||
if len(_storage_systems) == 0:
|
||||
_storage_systems_systems = None
|
||||
raise ValueError(f'The system with the following id is not found in catalog [{storage_id}]')
|
||||
return _storage_systems
|
||||
|
||||
def names(self, category=None):
|
||||
"""
|
||||
Get the catalog elements names
|
||||
:parm: optional category filter
|
||||
"""
|
||||
if category is None:
|
||||
_names = {'archetypes': [], 'systems': [], 'generation_equipments': [], 'storage_equipments': []}
|
||||
for archetype in self._content.archetypes:
|
||||
_names['archetypes'].append(archetype.name)
|
||||
for system in self._content.systems:
|
||||
_names['systems'].append(system.name)
|
||||
for equipment in self._content.generation_equipments:
|
||||
_names['generation_equipments'].append(equipment.name)
|
||||
for equipment in self._content.storage_equipments:
|
||||
_names['storage_equipments'].append(equipment.name)
|
||||
else:
|
||||
_names = {category: []}
|
||||
if category.lower() == 'archetypes':
|
||||
for archetype in self._content.archetypes:
|
||||
_names[category].append(archetype.name)
|
||||
elif category.lower() == 'systems':
|
||||
for system in self._content.systems:
|
||||
_names[category].append(system.name)
|
||||
elif category.lower() == 'generation_equipments':
|
||||
for system in self._content.generation_equipments:
|
||||
_names[category].append(system.name)
|
||||
elif category.lower() == 'storage_equipments':
|
||||
for system in self._content.storage_equipments:
|
||||
_names[category].append(system.name)
|
||||
else:
|
||||
raise ValueError(f'Unknown category [{category}]')
|
||||
return _names
|
||||
|
||||
def entries(self, category=None):
|
||||
"""
|
||||
Get the catalog elements
|
||||
:parm: optional category filter
|
||||
"""
|
||||
if category is None:
|
||||
return self._content
|
||||
if category.lower() == 'archetypes':
|
||||
return self._content.archetypes
|
||||
if category.lower() == 'systems':
|
||||
return self._content.systems
|
||||
if category.lower() == 'generation_equipments':
|
||||
return self._content.generation_equipments
|
||||
if category.lower() == 'storage_equipments':
|
||||
return self._content.storage_equipments
|
||||
raise ValueError(f'Unknown category [{category}]')
|
||||
|
||||
def get_entry(self, name):
|
||||
"""
|
||||
Get one catalog element by names
|
||||
:parm: entry name
|
||||
"""
|
||||
for entry in self._content.archetypes:
|
||||
if entry.name.lower() == name.lower():
|
||||
return entry
|
||||
for entry in self._content.systems:
|
||||
if entry.name.lower() == name.lower():
|
||||
return entry
|
||||
for entry in self._content.generation_equipments:
|
||||
if entry.name.lower() == name.lower():
|
||||
return entry
|
||||
for entry in self._content.storage_equipments:
|
||||
if entry.name.lower() == name.lower():
|
||||
return entry
|
||||
raise IndexError(f"{name} doesn't exists in the catalog")
|
@ -9,7 +9,6 @@ from pathlib import Path
|
||||
from typing import TypeVar
|
||||
|
||||
from hub.catalog_factories.energy_systems.montreal_custom_catalog import MontrealCustomCatalog
|
||||
from hub.catalog_factories.energy_systems.north_america_energy_system_catalog import NorthAmericaEnergySystemCatalog
|
||||
from hub.helpers.utils import validate_import_export_type
|
||||
|
||||
Catalog = TypeVar('Catalog')
|
||||
@ -33,13 +32,6 @@ class EnergySystemsCatalogFactory:
|
||||
"""
|
||||
return MontrealCustomCatalog(self._path)
|
||||
|
||||
@property
|
||||
def _north_america(self):
|
||||
"""
|
||||
Retrieve North American catalog
|
||||
"""
|
||||
return NorthAmericaEnergySystemCatalog(self._path)
|
||||
|
||||
@property
|
||||
def catalog(self) -> Catalog:
|
||||
"""
|
||||
|
@ -60,9 +60,9 @@ class EnergySystem:
|
||||
self._demand_types = value
|
||||
|
||||
@property
|
||||
def generation_system(self) -> List[GenerationSystem]:
|
||||
def generation_system(self) -> GenerationSystem:
|
||||
"""
|
||||
Get generation systems
|
||||
Get generation system
|
||||
:return: GenerationSystem
|
||||
"""
|
||||
return self._generation_system
|
||||
|
@ -22,13 +22,6 @@ class GenerationSystem:
|
||||
self._storage_capacity = None
|
||||
self._generic_generation_system = None
|
||||
self._auxiliary_equipment = None
|
||||
self._model_name = None
|
||||
self._manufacturer = None
|
||||
self._maximum_heat_output = None
|
||||
self._minimum_heat_output = None
|
||||
self._maximum_cooling_output = None
|
||||
self._minimum_cooling_output = None
|
||||
|
||||
|
||||
@property
|
||||
def generic_generation_system(self) -> GenericGenerationSystem:
|
||||
|
@ -24,18 +24,6 @@ class GenericGenerationSystem:
|
||||
self._source_mass_flow = None
|
||||
self._storage = None
|
||||
self._auxiliary_equipment = None
|
||||
self._source_medium = None
|
||||
self._supply_medium = None
|
||||
self._maximum_heat_supply_temperature = None
|
||||
self._minimum_heat_supply_temperature = None
|
||||
self._maximum_cooling_supply_temperature = None
|
||||
self._minimum_cooling_supply_temperature = 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
|
||||
def type(self):
|
||||
@ -196,35 +184,3 @@ class GenericGenerationSystem:
|
||||
:return: GenerationSystem
|
||||
"""
|
||||
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
|
||||
def supply_medium(self):
|
||||
"""
|
||||
Get the supply medium from ['air', 'water']
|
||||
:return: string
|
||||
"""
|
||||
return self._supply_medium
|
||||
|
||||
@supply_medium.setter
|
||||
def supply_medium(self, value):
|
||||
"""
|
||||
Set the supply medium from ['air', 'water']
|
||||
:param value: string
|
||||
"""
|
||||
self._supply_medium = value
|
||||
|
@ -1,227 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<EnergySystemCatalog>
|
||||
<schemas_path>./schemas/</schemas_path>
|
||||
<medias>
|
||||
<media media_id="1" media_name="Water" density="981.0" heatCapacity="4180.0" evaporationTemperature="100.0"/>
|
||||
</medias>
|
||||
<energy_generation_components>
|
||||
<boilers generation_id="1" name="Natural-Gas Boiler" modelName="ALP080B" manufacturer="Alpine" installedThermalPower="21.0" minimumHeatOutput="4.7" maximumHeatOutput="23.5" modulationRange="0.88" nominalEfficiency="0.95" combi="true" fuel="natural gas"/>
|
||||
<boilers generation_id="2" name="Natural-Gas Boiler" modelName="ALP105B" manufacturer="Alpine" installedThermalPower="28.0" minimumHeatOutput="6.15" maximumHeatOutput="30.8" modulationRange="0.88" nominalEfficiency="0.95" combi="true" fuel="natural gas"/>
|
||||
<boilers generation_id="3" name="Natural-Gas Boiler" modelName="ALP150B" manufacturer="Alpine" installedThermalPower="40.0" minimumHeatOutput="8.8" maximumHeatOutput="44" modulationRange="0.88" nominalEfficiency="0.95" combi="true" fuel="natural gas"/>
|
||||
<boilers generation_id="4" name="Natural-Gas Boiler" modelName="ALP210B" manufacturer="Alpine" installedThermalPower="57.0" minimumHeatOutput="12.3" maximumHeatOutput="61.5" modulationRange="0.87" nominalEfficiency="0.95" combi="true" fuel="natural gas"/>
|
||||
<boilers generation_id="5" name="Natural-Gas Boiler" modelName="ALTAC-136" manufacturer="Alta" installedThermalPower="33.0" minimumHeatOutput="4.0" maximumHeatOutput="35.2" modulationRange="0.95" nominalEfficiency="0.95" combi="true" fuel="natural gas"/>
|
||||
<boilers generation_id="6" name="Natural-Gas Boiler" modelName="ALTA-120" manufacturer="Alta" installedThermalPower="33.0" minimumHeatOutput="4.0" maximumHeatOutput="35.2" modulationRange="0.95" nominalEfficiency="0.95" combi="false" fuel="natural gas"/>
|
||||
<boilers generation_id="7" name="Natural-Gas Boiler" modelName="ASPN-085" manufacturer="Aspen" installedThermalPower="23.15" minimumHeatOutput="2.5" maximumHeatOutput="25.0" modulationRange="0.97" nominalEfficiency="0.96" fuel="natural gas"/>
|
||||
<boilers generation_id="8" name="Natural-Gas Boiler" modelName="ASPN-110" manufacturer="Aspen" installedThermalPower="30.19" minimumHeatOutput="3.2" maximumHeatOutput="32.0" modulationRange="0.96" nominalEfficiency="0.96" fuel="natural gas"/>
|
||||
<boilers generation_id="9" name="Natural-Gas Boiler" modelName="ASPNC-155" manufacturer="Aspen" installedThermalPower="42.5" minimumHeatOutput="4.5" maximumHeatOutput="45.0" modulationRange="0.96" nominalEfficiency="0.95" combi="true" fuel="natural gas"/>
|
||||
<boilers generation_id="10" name="Natural-Gas Boiler" modelName="K2WTC-135B" manufacturer="K2" installedThermalPower="32.8" minimumHeatOutput="3.5" maximumHeatOutput="35.0" modulationRange="0.96" nominalEfficiency="0.95" combi="true" fuel="natural gas"/>
|
||||
<boilers generation_id="11" name="Natural-Gas Boiler" modelName="K2WTC-180B" manufacturer="K2" installedThermalPower="49.5" minimumHeatOutput="5.3" maximumHeatOutput="53.0" modulationRange="0.96" nominalEfficiency="0.95" combi="true" fuel="natural gas"/>
|
||||
<photovoltaicModules generation_id="12" name="Photovoltaic Module" 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 generation_id="13" name="Air-to-Water Heat Pump" 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" minimumHeatOutput="0" maximumHeatOutput="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">
|
||||
<performance_curve curve_type="second degree multivariable function">
|
||||
<dependant_variable>COP</dependant_variable>
|
||||
<parameters>source_temperature</parameters>
|
||||
<parameters>supply_temperature</parameters>
|
||||
<coefficients a="9.5E-4" b="0.177" c="-0.00242" d="-0.155" e="9.3E-4" f="8.044"/>
|
||||
</performance_curve>
|
||||
</heatPumps>
|
||||
<heatPumps generation_id="14" name="Air-to-Water Heat Pump" modelName="CMAA 70" 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="279.3" minimumHeatOutput="0" maximumHeatOutput="279.3" modulationRange="0.0" fuel="Electricity" heatSource="Air" nominalCOP="3.07" maxHeatingSupTemperature="55.0" minHeatingSupTemperature="6.0" maxCoolingSupTemperature="30.0" minCoolingSupTemperature="11.0" supply_medium="water">
|
||||
<performance_curve curve_type="second degree multivariable function">
|
||||
<dependant_variable>COP</dependant_variable>
|
||||
<parameters>source_temperature</parameters>
|
||||
<parameters>supply_temperature</parameters>
|
||||
<coefficients a="0.0011" b="0.207" c="-0.00292" d="-0.187" e="0.00121" f="8.95"/>
|
||||
</performance_curve>
|
||||
</heatPumps>
|
||||
<heatPumps generation_id="15" name="Air-to-Water Heat Pump" modelName="CMAA 140" 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="557" minimumHeatOutput="0" maximumHeatOutput="557" modulationRange="0.0" fuel="Electricity" heatSource="Air" nominalCOP="3.46" maxHeatingSupTemperature="55.0" minHeatingSupTemperature="6.0" maxCoolingSupTemperature="30.0" minCoolingSupTemperature="11.0" supply_medium="water">
|
||||
<performance_curve curve_type="second degree multivariable function">
|
||||
<dependant_variable>COP</dependant_variable>
|
||||
<parameters>source_temperature</parameters>
|
||||
<parameters>supply_temperature</parameters>
|
||||
<coefficients a="0.00109" b="0.209" c="-0.00291" d="-0.172" e="0.00102" f="8.95"/>
|
||||
</performance_curve>
|
||||
</heatPumps>
|
||||
<templateGenerationEquipments generation_id="16" name="template Natural-Gas Boiler" nominalEfficiency="0.90" fuel="natural gas"/>
|
||||
<templateGenerationEquipments generation_id="17" name="template Electric Boiler" nominalEfficiency="0.95" fuel="electricity"/>
|
||||
<templateGenerationEquipments generation_id="18" name="template Air-to-Water Heat Pump" fuel="Electricity" heatSource="Air" nominalCOP="3" supply_medium="water"/>
|
||||
<templateGenerationEquipments generation_id="19" name="template Groundwater-to-Water Heat Pump" fuel="Electricity" heatSource="Ground" 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"/>
|
||||
<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="2" name="Alta" country="USA" product="Natural Gas Boiler"/>
|
||||
<manufacturers manufacturer_id="3" name="Aspen" country="USA" product="Natural Gas Boiler"/>
|
||||
<manufacturers manufacturer_id="4" name="K2" country="USA" product="Natural Gas Boiler"/>
|
||||
<manufacturers manufacturer_id="5" name="TRANE" product="Air-to-Water Heat Pump"/>
|
||||
<manufacturers manufacturer_id="6" name="Canadian Solar" country="Canada" product="Photovoltaic Module"/>
|
||||
</energy_generation_components>
|
||||
<energy_storage_components>
|
||||
<thermalStorages storage_id="1" name="Hot Water Storage Tank" modelName="HF 200" manufacturer="reflex" maxTemp="95.0">
|
||||
<insulation material_id="1" insulationMaterial="Polyurethane" insulationThickness="90.0"/>
|
||||
<physical_characteristics material_id="2" tankThickness="0" height="1.5" tankMaterial="Steel" volume="0.5"/>
|
||||
<medium media_id="1" usesMedium="Water"/>
|
||||
</thermalStorages>
|
||||
<thermalStorages storage_id="2" name="Hot Water Storage Tank" modelName="HF 300" manufacturer="reflex" maxTemp="95.0">
|
||||
<insulation material_id="1" insulationMaterial="Polyurethane" insulationThickness="90.0"/>
|
||||
<physical_characteristics material_id="2" tankThickness="0" height="1.5" tankMaterial="Steel" volume="0.6"/>
|
||||
<medium media_id="1" usesMedium="Water"/>
|
||||
</thermalStorages>
|
||||
<thermalStorages storage_id="3" name="Hot Water Storage Tank" modelName="HF 500" manufacturer="reflex" maxTemp="95.0">
|
||||
<insulation material_id="1" insulationMaterial="Polyurethane" insulationThickness="90.0"/>
|
||||
<physical_characteristics material_id="2" tankThickness="0" height="1.5" tankMaterial="Steel" volume="0.5"/>
|
||||
<medium media_id="1" usesMedium="Water"/>
|
||||
</thermalStorages>
|
||||
<thermalStorages storage_id="4" name="Hot Water Storage Tank" modelName="HF 200" manufacturer="reflex" maxTemp="95.0">
|
||||
<insulation material_id="1" insulationMaterial="Polyurethane" insulationThickness="90.0"/>
|
||||
<physical_characteristics material_id="2" tankThickness="0" height="1.5" tankMaterial="Steel" volume="0.5"/>
|
||||
<medium media_id="1" usesMedium="Water"/>
|
||||
</thermalStorages>
|
||||
<thermalStorages storage_id="5" name="Hot Water Storage Tank" modelName="HF 200" manufacturer="reflex" maxTemp="95.0">
|
||||
<insulation material_id="1" insulationMaterial="Polyurethane" insulationThickness="90.0"/>
|
||||
<physical_characteristics material_id="2" tankThickness="0" height="1.5" tankMaterial="Steel" volume="0.5"/>
|
||||
<medium media_id="1" usesMedium="Water"/>
|
||||
</thermalStorages>
|
||||
<templateStorages storage_id="6" name="template Hot Water Storage Tank" maxTemp="95.0">
|
||||
<insulation material_id="1" insulationMaterial="Polyurethane" insulationThickness="90.0"/>
|
||||
<physical_characteristics material_id="2" tankThickness="0" height="1.5" tankMaterial="Steel"/>
|
||||
<medium media_id="1" usesMedium="Water"/>
|
||||
</templateStorages>
|
||||
<manufacturers manufacturer_id="1" name="reflex" product="Storage Tank"/>
|
||||
</energy_storage_components>
|
||||
<materials>
|
||||
<material material_id="1" name="Polyurethane" thermalConductivity="0.028"/>
|
||||
<material material_id="2" name="Steel" thermalConductivity="18.0"/>
|
||||
</materials>
|
||||
<systems>
|
||||
<system id="1">
|
||||
<name>Air Source Heat Pump with Natural Gas Boiler and thermal storage</name>
|
||||
<demands>
|
||||
<demand>heating</demand>
|
||||
<demand>domestic_hot_water</demand>
|
||||
</demands>
|
||||
<components>
|
||||
<generation_id>16</generation_id>
|
||||
<generation_id>18</generation_id>
|
||||
<storage_id>6</storage_id>
|
||||
</components>
|
||||
</system>
|
||||
<system id="2">
|
||||
<name>Air Source Heat Pump with Electrical Boiler and thermal storage</name>
|
||||
<demands>
|
||||
<demand>heating</demand>
|
||||
<demand>domestic_hot_water</demand>
|
||||
</demands>
|
||||
<components>
|
||||
<generation_id>17</generation_id>
|
||||
<generation_id>18</generation_id>
|
||||
<storage_id>6</storage_id>
|
||||
</components>
|
||||
</system>
|
||||
<system id="3">
|
||||
<name>Ground Source Heat Pump with Natural Gas Boiler and thermal storage</name>
|
||||
<demands>
|
||||
<demand>heating</demand>
|
||||
<demand>domestic_hot_water</demand>
|
||||
</demands>
|
||||
<components>
|
||||
<generation_id>16</generation_id>
|
||||
<generation_id>19</generation_id>
|
||||
<storage_id>6</storage_id>
|
||||
</components>
|
||||
</system>
|
||||
<system id="4">
|
||||
<name>Ground Source Heat Pump with Electrical Boiler and thermal storage</name>
|
||||
<demands>
|
||||
<demand>heating</demand>
|
||||
<demand>domestic_hot_water</demand>
|
||||
</demands>
|
||||
<components>
|
||||
<generation_id>17</generation_id>
|
||||
<generation_id>19</generation_id>
|
||||
<storage_id>6</storage_id>
|
||||
</components>
|
||||
</system>
|
||||
<system id="5">
|
||||
<name>Water Source Heat Pump with Natural Gas Boiler and thermal storage</name>
|
||||
<demands>
|
||||
<demand>heating</demand>
|
||||
<demand>domestic_hot_water</demand>
|
||||
</demands>
|
||||
<components>
|
||||
<generation_id>16</generation_id>
|
||||
<generation_id>20</generation_id>
|
||||
<storage_id>6</storage_id>
|
||||
</components>
|
||||
</system>
|
||||
<system id="6">
|
||||
<name>Water Source Heat Pump with Electrical Boiler and thermal storage</name>\
|
||||
<demands>
|
||||
<demand>heating</demand>
|
||||
<demand>domestic_hot_water</demand>
|
||||
</demands>
|
||||
<components>
|
||||
<generation_id>17</generation_id>
|
||||
<generation_id>20</generation_id>
|
||||
<storage_id>6</storage_id>
|
||||
</components>
|
||||
</system>
|
||||
<system id="7">
|
||||
<name>Photovoltaic System</name>
|
||||
<demands>
|
||||
<demand>electricity</demand>
|
||||
</demands>
|
||||
<components>
|
||||
<generation_id>21</generation_id>
|
||||
</components>
|
||||
</system>
|
||||
</systems>
|
||||
<system_archetypes>
|
||||
<system_archetype id="1">
|
||||
<name>PV+ASHP+GasBoiler+TES</name>
|
||||
<systems>
|
||||
<system_id>7</system_id>
|
||||
<system_id>1</system_id>
|
||||
</systems>
|
||||
</system_archetype>
|
||||
<system_archetype id="2">
|
||||
<name>PV+ASHP+ElectricBoiler+TES</name>
|
||||
<systems>
|
||||
<system_id>7</system_id>
|
||||
<system_id>2</system_id>
|
||||
</systems>
|
||||
</system_archetype>
|
||||
<system_archetype id="3">
|
||||
<name>PV+GSHP+GasBoiler+TES</name>
|
||||
<systems>
|
||||
<system_id>7</system_id>
|
||||
<system_id>3</system_id>
|
||||
</systems>
|
||||
</system_archetype>
|
||||
<system_archetype id="4">
|
||||
<name>PV+GSHP+ElectricBoiler+TES</name>
|
||||
<systems>
|
||||
<system_id>7</system_id>
|
||||
<system_id>4</system_id>
|
||||
</systems>
|
||||
</system_archetype>
|
||||
<system_archetype id="5">
|
||||
<name>PV+WSHP+GasBoiler+TES</name>
|
||||
<systems>
|
||||
<system_id>7</system_id>
|
||||
<system_id>5</system_id>
|
||||
</systems>
|
||||
</system_archetype>
|
||||
<system_archetype id="6">
|
||||
<name>PV+WSHP+ElectricBoiler+TES</name>
|
||||
<systems>
|
||||
<system_id>7</system_id>
|
||||
<system_id>6</system_id>
|
||||
</systems>
|
||||
</system_archetype>
|
||||
</system_archetypes>
|
||||
<energy_demands>
|
||||
<demand demand_id="1" name="heating"/>
|
||||
<demand demand_id="2" name="domesticHotWater"/>
|
||||
<demand demand_id="3" name="electricity"/>
|
||||
<demand demand_id="4" name="cooling"/>
|
||||
</energy_demands>
|
||||
</EnergySystemCatalog>
|
@ -92,7 +92,7 @@ class MontrealCustomEnergySystemParameters:
|
||||
_type]
|
||||
_fuel_type = Dictionaries().montreal_custom_fuel_to_hub_fuel[archetype_generation_equipment.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_types
|
||||
_generation_system.heat_efficiency = archetype_generation_equipment.heat_efficiency
|
||||
_generation_system.cooling_efficiency = archetype_generation_equipment.cooling_efficiency
|
||||
_generation_system.electricity_efficiency = archetype_generation_equipment.electricity_efficiency
|
||||
@ -104,7 +104,7 @@ class MontrealCustomEnergySystemParameters:
|
||||
energy_system.generation_system = _generation_system
|
||||
|
||||
_distribution_system = GenericDistributionSystem()
|
||||
archetype_distribution_equipment = system.distribution_systems
|
||||
archetype_distribution_equipment = system.distribution_system
|
||||
_distribution_system.type = archetype_distribution_equipment.type
|
||||
_distribution_system.supply_temperature = archetype_distribution_equipment.supply_temperature
|
||||
_distribution_system.distribution_consumption_fix_flow = \
|
||||
@ -139,10 +139,10 @@ class MontrealCustomEnergySystemParameters:
|
||||
|
||||
_building_distribution_system = DistributionSystem()
|
||||
_building_distribution_system.generic_distribution_system = \
|
||||
copy.deepcopy(_generic_building_energy_system.distribution_systems)
|
||||
copy.deepcopy(_generic_building_energy_system.distribution_system)
|
||||
_building_emission_system = EmissionSystem()
|
||||
_building_emission_system.generic_emission_system = \
|
||||
copy.deepcopy(_generic_building_energy_system.emission_systems)
|
||||
copy.deepcopy(_generic_building_energy_system.emission_system)
|
||||
_building_generation_system = GenerationSystem()
|
||||
_building_generation_system.generic_generation_system = \
|
||||
copy.deepcopy(_generic_building_energy_system.generation_system)
|
||||
|
@ -17,7 +17,8 @@ class GeometryFactory:
|
||||
GeometryFactory class
|
||||
"""
|
||||
def __init__(self, file_type,
|
||||
path,
|
||||
path=None,
|
||||
data_frame=None,
|
||||
aliases_field=None,
|
||||
height_field=None,
|
||||
year_of_construction_field=None,
|
||||
@ -26,6 +27,7 @@ class GeometryFactory:
|
||||
self._file_type = '_' + file_type.lower()
|
||||
validate_import_export_type(GeometryFactory, file_type)
|
||||
self._path = path
|
||||
self._data_frame = data_frame
|
||||
self._aliases_field = aliases_field
|
||||
self._height_field = height_field
|
||||
self._year_of_construction_field = year_of_construction_field
|
||||
|
@ -13,7 +13,6 @@ class TestSystemsCatalog(TestCase):
|
||||
|
||||
def test_montreal_custom_catalog(self):
|
||||
catalog = EnergySystemsCatalogFactory('montreal_custom').catalog
|
||||
|
||||
catalog_categories = catalog.names()
|
||||
archetypes = catalog.names('archetypes')
|
||||
self.assertEqual(23, len(archetypes['archetypes']))
|
||||
@ -33,13 +32,5 @@ class TestSystemsCatalog(TestCase):
|
||||
for value in catalog_categories[category]:
|
||||
catalog.get_entry(value)
|
||||
|
||||
print(catalog.entries())
|
||||
|
||||
with self.assertRaises(IndexError):
|
||||
catalog.get_entry('unknown')
|
||||
|
||||
def test_north_america_systems_catalog(self):
|
||||
catalog = EnergySystemsCatalogFactory('north_america').catalog
|
||||
print(catalog.entries())
|
||||
|
||||
|
||||
|
@ -90,11 +90,11 @@ class TestSystemsFactory(TestCase):
|
||||
|
||||
_building_distribution_system = DistributionSystem()
|
||||
_building_distribution_system.generic_distribution_system = (
|
||||
copy.deepcopy(_generic_building_energy_system.distribution_systems)
|
||||
copy.deepcopy(_generic_building_energy_system.distribution_system)
|
||||
)
|
||||
_building_emission_system = EmissionSystem()
|
||||
_building_emission_system.generic_emission_system = (
|
||||
copy.deepcopy(_generic_building_energy_system.emission_systems)
|
||||
copy.deepcopy(_generic_building_energy_system.emission_system)
|
||||
)
|
||||
_building_generation_system = GenerationSystem()
|
||||
_building_generation_system.generic_generation_system = (
|
||||
|
Loading…
Reference in New Issue
Block a user