Compare commits

..

42 Commits

Author SHA1 Message Date
ee875859e8 work started on generation_system.py and generic_generation_system.py 2023-09-18 15:44:52 -04:00
73dffdc367 Merge branch 'systems_catalog_improvement' into energy_plus_result_factory
# Conflicts:
#	.gitignore
2023-09-14 12:34:50 -04:00
c072527dc6 small changes to pv_generation_system.py 2023-08-29 14:03:30 -04:00
56c84ad399 solved bugs in adapting montreal_custom_catalog.py to new catalog data 2023-08-29 13:29:51 -04:00
a5f70f4720 erased forgotten not needed print 2023-08-29 13:12:56 -04:00
b7c2bbae96 removed last two values in generationSystems as they are not used anymore 2023-08-29 13:02:28 -04:00
8763523d3b added S to some lists, updated montreal_custom_catalog.py to new catalog classes and removed __future__ from those classes that didn't need it 2023-08-29 12:50:49 -04:00
7810f8f91d extracted storage type from abstract class 2023-08-29 12:34:04 -04:00
d4b424357d added to_dictionary to abstract class 2023-08-29 12:31:06 -04:00
8dbeeaafa1 changed some units in electrical storage 2023-08-29 12:29:11 -04:00
c77b2254f1 separated storage class in three, one abstract 2023-08-29 12:26:19 -04:00
b1d42ee00b Merge remote-tracking branch 'origin/systems_catalog_improvement' into systems_catalog_improvement
# Conflicts:
#	hub/catalog_factories/data_models/energy_systems/electrical_storage_system.py
#	hub/catalog_factories/data_models/energy_systems/energy_storage_system.py
#	hub/catalog_factories/data_models/energy_systems/thermal_storage_system.py
2023-08-29 12:25:04 -04:00
6ac63adaaf separated storage class in three, one abstract 2023-08-29 12:22:06 -04:00
644b1c9346 energy_storage_system.py is modified and inherited by thermal_storage_system.py and electrical_storage_system.py 2023-08-29 11:45:02 -04:00
24a670755a performance_curves.py is fixed
material_name is replaced with material_id in north_america_energy_system_catalog.py
The unused variables are fixed.
The code is modified to accommodate the reorganization Pilar did in generation_systems
The system.py is modified to be able to accommodate more than one distribution or emission system
2023-08-28 18:37:55 -04:00
5d4813f2f6 some changes in code to be reviewed by Saeed 2023-08-28 10:18:18 -04:00
43e5bb7310 nothing is changed 2023-08-25 10:22:46 -04:00
fe0a2d3003 north_america_energy_system_catalog.py is completed and all the bugs have been resolved. 2023-08-24 15:09:17 -04:00
3deb63b14a north_america_energy_system_catalog.py is completed
montreal_custom_catalog.py is fixed
2023-08-23 17:09:55 -04:00
9b0bdf2b7e load_generation and load_storage in north_america_energy_system_catalog.py is completed 2023-08-22 19:09:35 -04:00
072d2a6d9d modifications done to the xml file and north_america_energy_system_catalog.py 2023-08-21 17:41:12 -04:00
72b5ff1040 north_america_components.xml is modified
The montreal_custom_catalog.py is modified
2023-08-18 18:22:10 -04:00
e20a700deb emission_system.py is rolled back to original
performance_curves.py is imported in generation_system.py
The order of arguments in pv_generation_system.py is fixed
Modulation range is replaced with maximum and minimum heat output in generation_system.py
maximum,minimum, and nominal cooling output are also added to generation_system.py
2023-08-17 18:48:48 -04:00
0528aa0718 started to work on systems 2023-08-16 20:07:24 -04:00
923b1fe267 generation components are all added to north_america_energy_system_catalog.py
pv_generation_system.py is modified
Tools4CitiesESMF.xml is modified
2023-08-16 19:33:18 -04:00
32a40f17a6 fixing pv problem 2023-08-16 16:28:20 -04:00
e91e61741e add generation and config 2023-08-16 15:58:49 -04:00
16618fb54a started north america energy system catalog importer. NOT WORKING 2023-08-15 16:27:05 -04:00
21ca1e1e28 modified energy_storage_system.py and energy_system_catalog.py generation_system.py
The xml data is modified
2023-08-15 14:49:17 -04:00
ccdc7a454d small changes to performance_curves.py and distribution_system.py
created the montreal_custom_catalog_new.py
uploaded my xml file
2023-08-14 20:26:37 -04:00
3feecac15d cogeneration ratio was removed from generation_system.py
pv_generation_system.py is completed by adding an inheritance from the GenerationSystem class
parameter_function.py is renamed to performance_curves.py and an attribute to get the list of target parameters is added to it
system.py is modified by adding energy storage, performance curves, pv to it
2023-08-14 20:00:17 -04:00
acd7ad2266 distribution_system.py is modified 2023-08-13 22:53:43 -04:00
6ce82c52de Class parameter_function.py is created 2023-08-13 21:17:03 -04:00
d6ee3d6e6b All the attributes related to the material and insulation of the tank are substituted with one attribute called "layers" 2023-08-13 20:44:14 -04:00
231e4a17f2 All the attributes related to the material and insulation of the tank are substituted with one attribute called "layers" 2023-08-13 20:43:05 -04:00
012076492f Merge remote-tracking branch 'origin/systems_catalog_improvement' into systems_catalog_improvement 2023-08-13 10:27:00 -04:00
61d4c012dc Renamed the electricity_generation_system.py to pv_generation_system.py and modified the heating_generation_system to generation_system.py to account for all the generation systems. 2023-08-13 10:26:36 -04:00
1b3a128f33 added .gitignore to always ignore .idea 2023-08-11 10:18:33 -04:00
fde6f0f751 Few modifications were mafe to heat_generation_system.py and electricity_generation_system.py classes.
A new class named energy_storage_system.py is created to represent different possible energy storage systems in energy systems.
2023-08-10 20:55:35 -04:00
9034c3375e The generation_system.py is renamed to heat_generation_system.py and the attributes and decorators are modified to encapsulate all the needed attributes for boilers and heat pumps.
Another class named electricity_generation_system.py is created to add the attributes and decorators of PV, inverter, and maybe wind turbines in future. The system.py is also modified accordingly
2023-08-09 19:32:01 -04:00
2b95173dfc starting updates in system catalog 2023-08-09 12:02:16 -04:00
7f5cde8175 starting updates in system catalog 2023-08-09 11:25:56 -04:00
22 changed files with 1626 additions and 121 deletions

13
.gitignore vendored
View File

@ -1,12 +1 @@
!.gitignore .idea
**/venv/
.idea/
/development_tests/
/data/energy_systems/heat_pumps/*.csv
/data/energy_systems/heat_pumps/*.insel
.DS_Store
**/.env
**/hub/logs/
**/__pycache__/
**/.idea/

View File

@ -3,6 +3,7 @@ Energy System catalog archetype
SPDX - License - Identifier: LGPL - 3.0 - or -later SPDX - License - Identifier: LGPL - 3.0 - or -later
Copyright © 2023 Concordia CERC group Copyright © 2023 Concordia CERC group
Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca
Code contributors: Saeed Ranjbar saeed.ranjbar@concordia.ca
""" """
from typing import List from typing import List
@ -55,3 +56,5 @@ class Archetype:
} }
} }
return content return content

View File

@ -10,12 +10,13 @@ class Content:
""" """
Content class Content class
""" """
def __init__(self, archetypes, systems, generations, distributions, emissions): def __init__(self, archetypes, systems, generations, distributions, emissions, storages):
self._archetypes = archetypes self._archetypes = archetypes
self._systems = systems self._systems = systems
self._generations = generations self._generations = generations
self._distributions = distributions self._distributions = distributions
self._emissions = emissions self._emissions = emissions
self._storages = storages
@property @property
def archetypes(self): def archetypes(self):
@ -52,6 +53,13 @@ class Content:
""" """
return self._emissions return self._emissions
@property
def storage_equipments(self):
"""
All storage equipments in the catalog
"""
return self._storages
def to_dictionary(self): def to_dictionary(self):
"""Class content to dictionary""" """Class content to dictionary"""
_archetypes = [] _archetypes = []

View File

@ -3,6 +3,7 @@ Energy System catalog distribution system
SPDX - License - Identifier: LGPL - 3.0 - or -later SPDX - License - Identifier: LGPL - 3.0 - or -later
Copyright © 2023 Concordia CERC group Copyright © 2023 Concordia CERC group
Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca
Code contributors: Saeed Ranjbar saeed.ranjbar@concordia.ca
""" """

View File

@ -0,0 +1,93 @@
"""
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

View File

@ -0,0 +1,75 @@
"""
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

View File

@ -1,33 +1,58 @@
""" """
Energy System catalog generation system Energy System catalog heat generation system
SPDX - License - Identifier: LGPL - 3.0 - or -later SPDX - License - Identifier: LGPL - 3.0 - or -later
Copyright © 2023 Concordia CERC group Copyright © 2023 Concordia CERC group
Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca 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 typing import Union
from hub.catalog_factories.data_models.energy_systems.performance_curves import PerformanceCurves
class GenerationSystem: class GenerationSystem:
""" """
Generation system class Heat 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._system_id = system_id
self._name = name self._name = name
self._type = system_type self._model_name = model_name
self._manufacturer = manufacturer
self._system_type = system_type
self._fuel_type = fuel_type self._fuel_type = fuel_type
self._source_types = source_types self._nominal_thermal_output = nominal_thermal_output
self._maximum_heat_output = maximum_heat_output
self._minimum_heat_output = minimum_heat_output
self._heat_efficiency = heat_efficiency 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._cooling_efficiency = cooling_efficiency
self._electricity_efficiency = electricity_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_temperature = source_temperature
self._source_mass_flow = source_mass_flow self._source_mass_flow = source_mass_flow
self._storage = storage self._supply_medium = supply_medium
self._auxiliary_equipment = auxiliary_equipment 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
@property @property
def id(self): def id(self):
@ -46,28 +71,76 @@ class GenerationSystem:
return self._name return self._name
@property @property
def type(self): 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):
""" """
Get type Get type
:return: string :return: string
""" """
return self._type return self._system_type
@property @property
def fuel_type(self): def fuel_type(self):
""" """
Get fuel_type from [renewable, gas, diesel, electricity, wood, coal] Get fuel_type from [renewable, gas, diesel, electricity, wood, coal, biogas]
:return: string :return: string
""" """
return self._fuel_type return self._fuel_type
@property @property
def source_types(self): def nominal_thermal_output(self):
""" """
Get source_type from [air, water, geothermal, district_heating, grid, on_site_electricity] 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]
:return: [string] :return: [string]
""" """
return self._source_types return self._source_medium
@property
def supply_medium(self):
"""
Get the supply medium from ['air', 'water']
:return: string
"""
return self._supply_medium
@property @property
def heat_efficiency(self): def heat_efficiency(self):
@ -77,6 +150,30 @@ class GenerationSystem:
""" """
return self._heat_efficiency 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 @property
def cooling_efficiency(self): def cooling_efficiency(self):
""" """
@ -110,38 +207,126 @@ class GenerationSystem:
return self._source_mass_flow return self._source_mass_flow
@property @property
def storage(self): def nominal_electricity_output(self):
""" """
Get boolean storage exists Get nominal_power_output of electricity generation devices or inverters in kW
:return: bool :return: float
""" """
return self._storage return self._nominal_electricity_output
@property @property
def auxiliary_equipment(self) -> Union[None, GenerationSystem]: def maximum_heat_supply_temperature(self):
""" """
Get auxiliary_equipment Get the maximum heat supply temperature in degree Celsius
:return: GenerationSystem :return: float
""" """
return self._auxiliary_equipment 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
def to_dictionary(self): def to_dictionary(self):
"""Class content to dictionary""" """Class content to dictionary"""
_auxiliary_equipment = [] content = {'Energy Generation component': {
if self.auxiliary_equipment is not None: 'id': self.id,
_auxiliary_equipment = self.auxiliary_equipment.to_dictionary() 'name': self.name,
content = {'Layer': {'id': self.id, 'model name': self.model_name,
'name': self.name, 'manufacturer': self.manufacturer,
'type': self.type, 'type': self.system_type,
'fuel type': self.fuel_type, 'fuel type': self.fuel_type,
'source types': self.source_types, 'nominal thermal output [W]': self.nominal_thermal_output,
'source temperature [Celsius]': self.source_temperature, 'maximum heat output [W]': self.maximum_heat_output,
'source mass flow [kg/s]': self.source_mass_flow, 'minimum heat output [W]': self.minimum_heat_output,
'heat efficiency': self.heat_efficiency, 'source medium': self.source_medium,
'cooling efficiency': self.cooling_efficiency, 'supply medium': self.supply_medium,
'electricity efficiency': self.electricity_efficiency, 'source temperature [Celsius]': self.source_temperature,
'it has storage': self.storage, 'source mass flow [kg/s]': self.source_mass_flow,
'auxiliary equipment': _auxiliary_equipment '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
}
}
return content return content

View File

@ -0,0 +1,72 @@
"""
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

View File

@ -0,0 +1,131 @@
"""
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

View File

@ -1,13 +1,16 @@
""" """
Energy System catalog equipment Energy System catalog heat generation system
SPDX - License - Identifier: LGPL - 3.0 - or -later SPDX - License - Identifier: LGPL - 3.0 - or -later
Copyright © 2023 Concordia CERC group Copyright © 2023 Concordia CERC group
Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca
Code contributors: Saeed Ranjbar saeed.ranjbar@concordia.ca
""" """
from typing import Union from typing import Union, List
from hub.catalog_factories.data_models.energy_systems.generation_system import GenerationSystem from hub.catalog_factories.data_models.energy_systems.generation_system import GenerationSystem
from hub.catalog_factories.data_models.energy_systems.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.distribution_system import DistributionSystem
from hub.catalog_factories.data_models.energy_systems.emission_system import EmissionSystem from hub.catalog_factories.data_models.energy_systems.emission_system import EmissionSystem
@ -16,22 +19,25 @@ class System:
""" """
System class System class
""" """
def __init__(self, def __init__(self,
lod, lod,
system_id, system_id,
name, name,
demand_types, demand_types,
generation_system, generation_systems,
distribution_system, distribution_systems,
emission_system): emission_systems,
energy_storage_systems):
self._lod = lod self._lod = lod
self._system_id = system_id self._system_id = system_id
self._name = name self._name = name
self._demand_types = demand_types self._demand_types = demand_types
self._generation_system = generation_system self._distribution_systems = distribution_systems
self._distribution_system = distribution_system self._emission_systems = emission_systems
self._emission_system = emission_system self._generation_systems = generation_systems
self._energy_storage_systems = energy_storage_systems
# self._configuration = configuration
@property @property
def lod(self): def lod(self):
@ -52,7 +58,7 @@ class System:
@property @property
def name(self): def name(self):
""" """
Get name Get the system name
:return: string :return: string
""" """
return self._name return self._name
@ -60,50 +66,63 @@ class System:
@property @property
def demand_types(self): 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: [string]
""" """
return self._demand_types return self._demand_types
@property @property
def generation_system(self) -> GenerationSystem: def generation_systems(self) -> List[GenerationSystem]:
""" """
Get generation system Get generation systems
:return: GenerationSystem :return: [GenerationSystem]
""" """
return self._generation_system return self._generation_systems
@property @property
def distribution_system(self) -> Union[None, DistributionSystem]: def distribution_systems(self) -> Union[None, List[DistributionSystem]]:
""" """
Get distribution system Get distribution systems
:return: DistributionSystem :return: [DistributionSystem]
""" """
return self._distribution_system return self._distribution_systems
@property @property
def emission_system(self) -> Union[None, EmissionSystem]: def emission_systems(self) -> Union[None, List[EmissionSystem]]:
""" """
Get emission system Get emission systems
:return: EmissionSystem :return: [EmissionSystem]
""" """
return self._emission_system 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
def to_dictionary(self): def to_dictionary(self):
"""Class content to dictionary""" """Class content to dictionary"""
_distribution_system = None _generation_systems = []
if self.distribution_system is not None: for _generation in self.generation_systems:
_distribution_system = self.distribution_system.to_dictionary() _generation_systems.append(_generation.to_dictionary())
_emission_system = None _distribution_systems = [_distribution.to_dictionary() for _distribution in
if self.emission_system is not None: self.distribution_systems] if self.distribution_systems is not None else None
_emission_system = self.emission_system.to_dictionary() _emission_systems = [_emission.to_dictionary() for _emission in
content = {'Layer': {'id': self.id, self.emission_systems] if self.emission_systems is not None else None
'name': self.name, _storage_systems = [_storage.to_dictionary() for _storage in
'level of detail': self.lod, self.energy_storage_systems] if self.energy_storage_systems is not None else None
'demand types': self.demand_types,
'generation system': self.generation_system.to_dictionary(), content = {'system': {'id': self.id,
'distribution system': _distribution_system, 'name': self.name,
'emission system': _emission_system '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,
}
} }
return content return content

View File

@ -0,0 +1,89 @@
"""
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

View File

@ -14,12 +14,15 @@ 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.distribution_system import DistributionSystem
from hub.catalog_factories.data_models.energy_systems.emission_system import EmissionSystem 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.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): class MontrealCustomCatalog(Catalog):
""" """
Montreal custom energy systems catalog class Montreal custom energy systems catalog class
""" """
def __init__(self, path): def __init__(self, path):
path = str(path / 'montreal_custom_systems.xml') path = str(path / 'montreal_custom_systems.xml')
with open(path, 'r', encoding='utf-8') as xml: with open(path, 'r', encoding='utf-8') as xml:
@ -28,21 +31,23 @@ class MontrealCustomCatalog(Catalog):
self._lod = float(self._archetypes['catalog']['@lod']) self._lod = float(self._archetypes['catalog']['@lod'])
self._catalog_generation_equipments = self._load_generation_equipments() self._catalog_generation_equipments, self._catalog_storage_equipments = \
self._load_generation_and_storage_equipments()
self._catalog_distribution_equipments = self._load_distribution_equipments() self._catalog_distribution_equipments = self._load_distribution_equipments()
self._catalog_emission_equipments = self._load_emission_equipments() self._catalog_emission_equipments = self._load_emission_equipments()
self._catalog_systems = self._load_systems() self._catalog_systems = self._load_systems()
self._catalog_archetypes = self._load_archetypes() self._catalog_archetypes = self._load_archetypes()
# store the full catalog data model in self._content # store the full catalog data model in self._content
self._content = Content(self._catalog_archetypes, self._content = Content(self._catalog_archetypes,
self._catalog_systems, self._catalog_systems,
self._catalog_generation_equipments, self._catalog_generation_equipments,
self._catalog_distribution_equipments, self._catalog_distribution_equipments,
self._catalog_emission_equipments) self._catalog_emission_equipments,
None)
def _load_generation_equipments(self): def _load_generation_and_storage_equipments(self):
_equipments = [] _equipments = []
_storages = []
equipments = self._archetypes['catalog']['generation_equipments']['equipment'] equipments = self._archetypes['catalog']['generation_equipments']['equipment']
for equipment in equipments: for equipment in equipments:
equipment_id = float(equipment['@id']) equipment_id = float(equipment['@id'])
@ -58,22 +63,48 @@ class MontrealCustomCatalog(Catalog):
electricity_efficiency = None electricity_efficiency = None
if 'electrical_efficiency' in equipment: if 'electrical_efficiency' in equipment:
electricity_efficiency = float(equipment['electrical_efficiency']) electricity_efficiency = float(equipment['electrical_efficiency'])
storage = literal_eval(equipment['storage'].capitalize())
generation_system = GenerationSystem(equipment_id, generation_system = GenerationSystem(equipment_id,
name, name,
None,
None,
equipment_type, equipment_type,
fuel_type, fuel_type,
None, None,
None,
None,
None,
None,
heating_efficiency, heating_efficiency,
None,
None,
None,
cooling_efficiency, cooling_efficiency,
electricity_efficiency, electricity_efficiency,
None, None,
None, None,
storage, None,
None,
None,
None,
None,
None,
None,
None,
None,
None,
None) None)
_equipments.append(generation_system) _equipments.append(generation_system)
return _equipments 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
def _load_distribution_equipments(self): def _load_distribution_equipments(self):
_equipments = [] _equipments = []
@ -90,7 +121,8 @@ class MontrealCustomCatalog(Catalog):
distribution_consumption_fix_flow = float(equipment['distribution_consumption_fix_flow']['#text']) / 100 distribution_consumption_fix_flow = float(equipment['distribution_consumption_fix_flow']['#text']) / 100
distribution_consumption_variable_flow = None distribution_consumption_variable_flow = None
if 'distribution_consumption_variable_flow' in equipment: 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, distribution_system = DistributionSystem(equipment_id,
name, name,
@ -130,28 +162,33 @@ class MontrealCustomCatalog(Catalog):
name = system['name'] name = system['name']
demands = system['demands']['demand'] demands = system['demands']['demand']
generation_equipment = system['equipments']['generation_id'] generation_equipment = system['equipments']['generation_id']
_generation_equipment = None _generation_equipments = None
for equipment_archetype in self._catalog_generation_equipments: for equipment_archetype in self._catalog_generation_equipments:
if int(equipment_archetype.id) == int(generation_equipment): if int(equipment_archetype.id) == int(generation_equipment):
_generation_equipment = equipment_archetype _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]
distribution_equipment = system['equipments']['distribution_id'] distribution_equipment = system['equipments']['distribution_id']
_distribution_equipment = None _distribution_equipments = None
for equipment_archetype in self._catalog_distribution_equipments: for equipment_archetype in self._catalog_distribution_equipments:
if int(equipment_archetype.id) == int(distribution_equipment): if int(equipment_archetype.id) == int(distribution_equipment):
_distribution_equipment = equipment_archetype _distribution_equipments = [equipment_archetype]
emission_equipment = system['equipments']['dissipation_id'] emission_equipment = system['equipments']['dissipation_id']
_emission_equipment = None _emission_equipments = None
for equipment_archetype in self._catalog_emission_equipments: for equipment_archetype in self._catalog_emission_equipments:
if int(equipment_archetype.id) == int(emission_equipment): if int(equipment_archetype.id) == int(emission_equipment):
_emission_equipment = equipment_archetype _emission_equipments = [equipment_archetype]
_catalog_systems.append(System(self._lod, _catalog_systems.append(System(self._lod,
system_id, system_id,
name, name,
demands, demands,
_generation_equipment, _generation_equipments,
_distribution_equipment, _distribution_equipments,
_emission_equipment)) _emission_equipments,
_storage_equipments))
return _catalog_systems return _catalog_systems
def _load_archetypes(self): def _load_archetypes(self):
@ -175,7 +212,7 @@ class MontrealCustomCatalog(Catalog):
""" """
if category is None: if category is None:
_names = {'archetypes': [], 'systems': [], 'generation_equipments': [], 'distribution_equipments': [], _names = {'archetypes': [], 'systems': [], 'generation_equipments': [], 'distribution_equipments': [],
'emission_equipments':[]} 'emission_equipments': []}
for archetype in self._content.archetypes: for archetype in self._content.archetypes:
_names['archetypes'].append(archetype.name) _names['archetypes'].append(archetype.name)
for system in self._content.systems: for system in self._content.systems:
@ -246,4 +283,4 @@ class MontrealCustomCatalog(Catalog):
for entry in self._content.emission_equipments: for entry in self._content.emission_equipments:
if entry.name.lower() == name.lower(): if entry.name.lower() == name.lower():
return entry return entry
raise IndexError(f"{name} doesn't exists in the catalog") raise IndexError(f"{name} doesn't exists in the catalog")

View File

@ -0,0 +1,510 @@
"""
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")

View File

@ -9,6 +9,7 @@ from pathlib import Path
from typing import TypeVar from typing import TypeVar
from hub.catalog_factories.energy_systems.montreal_custom_catalog import MontrealCustomCatalog 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 from hub.helpers.utils import validate_import_export_type
Catalog = TypeVar('Catalog') Catalog = TypeVar('Catalog')
@ -32,6 +33,13 @@ class EnergySystemsCatalogFactory:
""" """
return MontrealCustomCatalog(self._path) return MontrealCustomCatalog(self._path)
@property
def _north_america(self):
"""
Retrieve North American catalog
"""
return NorthAmericaEnergySystemCatalog(self._path)
@property @property
def catalog(self) -> Catalog: def catalog(self) -> Catalog:
""" """

View File

@ -60,9 +60,9 @@ class EnergySystem:
self._demand_types = value self._demand_types = value
@property @property
def generation_system(self) -> GenerationSystem: def generation_system(self) -> List[GenerationSystem]:
""" """
Get generation system Get generation systems
:return: GenerationSystem :return: GenerationSystem
""" """
return self._generation_system return self._generation_system

View File

@ -22,6 +22,13 @@ class GenerationSystem:
self._storage_capacity = None self._storage_capacity = None
self._generic_generation_system = None self._generic_generation_system = None
self._auxiliary_equipment = 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 @property
def generic_generation_system(self) -> GenericGenerationSystem: def generic_generation_system(self) -> GenericGenerationSystem:

View File

@ -24,6 +24,18 @@ class GenericGenerationSystem:
self._source_mass_flow = None self._source_mass_flow = None
self._storage = None self._storage = None
self._auxiliary_equipment = None self._auxiliary_equipment = None
self._source_medium = None
self._supply_medium = None
self._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 @property
def type(self): def type(self):
@ -184,3 +196,35 @@ class GenericGenerationSystem:
:return: GenerationSystem :return: GenerationSystem
""" """
self._auxiliary_equipment = value self._auxiliary_equipment = value
@property
def source_medium(self):
"""
Get the source medium [air, water, ground, district_heating, grid, on_site_electricity]
:return: string
"""
return self._source_medium
@source_medium.setter
def source_medium(self, value):
"""
Set the source medium [air, water, ground, district_heating, grid, on_site_electricity]
:param value: string
"""
self._source_medium = value
@property
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

View File

@ -0,0 +1,227 @@
<?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>

View File

@ -92,7 +92,7 @@ class MontrealCustomEnergySystemParameters:
_type] _type]
_fuel_type = Dictionaries().montreal_custom_fuel_to_hub_fuel[archetype_generation_equipment.fuel_type] _fuel_type = Dictionaries().montreal_custom_fuel_to_hub_fuel[archetype_generation_equipment.fuel_type]
_generation_system.fuel_type = _fuel_type _generation_system.fuel_type = _fuel_type
_generation_system.source_types = archetype_generation_equipment.source_types _generation_system.source_types = archetype_generation_equipment.source_medium
_generation_system.heat_efficiency = archetype_generation_equipment.heat_efficiency _generation_system.heat_efficiency = archetype_generation_equipment.heat_efficiency
_generation_system.cooling_efficiency = archetype_generation_equipment.cooling_efficiency _generation_system.cooling_efficiency = archetype_generation_equipment.cooling_efficiency
_generation_system.electricity_efficiency = archetype_generation_equipment.electricity_efficiency _generation_system.electricity_efficiency = archetype_generation_equipment.electricity_efficiency
@ -104,7 +104,7 @@ class MontrealCustomEnergySystemParameters:
energy_system.generation_system = _generation_system energy_system.generation_system = _generation_system
_distribution_system = GenericDistributionSystem() _distribution_system = GenericDistributionSystem()
archetype_distribution_equipment = system.distribution_system archetype_distribution_equipment = system.distribution_systems
_distribution_system.type = archetype_distribution_equipment.type _distribution_system.type = archetype_distribution_equipment.type
_distribution_system.supply_temperature = archetype_distribution_equipment.supply_temperature _distribution_system.supply_temperature = archetype_distribution_equipment.supply_temperature
_distribution_system.distribution_consumption_fix_flow = \ _distribution_system.distribution_consumption_fix_flow = \
@ -139,10 +139,10 @@ class MontrealCustomEnergySystemParameters:
_building_distribution_system = DistributionSystem() _building_distribution_system = DistributionSystem()
_building_distribution_system.generic_distribution_system = \ _building_distribution_system.generic_distribution_system = \
copy.deepcopy(_generic_building_energy_system.distribution_system) copy.deepcopy(_generic_building_energy_system.distribution_systems)
_building_emission_system = EmissionSystem() _building_emission_system = EmissionSystem()
_building_emission_system.generic_emission_system = \ _building_emission_system.generic_emission_system = \
copy.deepcopy(_generic_building_energy_system.emission_system) copy.deepcopy(_generic_building_energy_system.emission_systems)
_building_generation_system = GenerationSystem() _building_generation_system = GenerationSystem()
_building_generation_system.generic_generation_system = \ _building_generation_system.generic_generation_system = \
copy.deepcopy(_generic_building_energy_system.generation_system) copy.deepcopy(_generic_building_energy_system.generation_system)

View File

@ -17,8 +17,7 @@ class GeometryFactory:
GeometryFactory class GeometryFactory class
""" """
def __init__(self, file_type, def __init__(self, file_type,
path=None, path,
data_frame=None,
aliases_field=None, aliases_field=None,
height_field=None, height_field=None,
year_of_construction_field=None, year_of_construction_field=None,
@ -27,7 +26,6 @@ class GeometryFactory:
self._file_type = '_' + file_type.lower() self._file_type = '_' + file_type.lower()
validate_import_export_type(GeometryFactory, file_type) validate_import_export_type(GeometryFactory, file_type)
self._path = path self._path = path
self._data_frame = data_frame
self._aliases_field = aliases_field self._aliases_field = aliases_field
self._height_field = height_field self._height_field = height_field
self._year_of_construction_field = year_of_construction_field self._year_of_construction_field = year_of_construction_field

View File

@ -13,6 +13,7 @@ class TestSystemsCatalog(TestCase):
def test_montreal_custom_catalog(self): def test_montreal_custom_catalog(self):
catalog = EnergySystemsCatalogFactory('montreal_custom').catalog catalog = EnergySystemsCatalogFactory('montreal_custom').catalog
catalog_categories = catalog.names() catalog_categories = catalog.names()
archetypes = catalog.names('archetypes') archetypes = catalog.names('archetypes')
self.assertEqual(23, len(archetypes['archetypes'])) self.assertEqual(23, len(archetypes['archetypes']))
@ -32,5 +33,13 @@ class TestSystemsCatalog(TestCase):
for value in catalog_categories[category]: for value in catalog_categories[category]:
catalog.get_entry(value) catalog.get_entry(value)
print(catalog.entries())
with self.assertRaises(IndexError): with self.assertRaises(IndexError):
catalog.get_entry('unknown') catalog.get_entry('unknown')
def test_north_america_systems_catalog(self):
catalog = EnergySystemsCatalogFactory('north_america').catalog
print(catalog.entries())

View File

@ -90,11 +90,11 @@ class TestSystemsFactory(TestCase):
_building_distribution_system = DistributionSystem() _building_distribution_system = DistributionSystem()
_building_distribution_system.generic_distribution_system = ( _building_distribution_system.generic_distribution_system = (
copy.deepcopy(_generic_building_energy_system.distribution_system) copy.deepcopy(_generic_building_energy_system.distribution_systems)
) )
_building_emission_system = EmissionSystem() _building_emission_system = EmissionSystem()
_building_emission_system.generic_emission_system = ( _building_emission_system.generic_emission_system = (
copy.deepcopy(_generic_building_energy_system.emission_system) copy.deepcopy(_generic_building_energy_system.emission_systems)
) )
_building_generation_system = GenerationSystem() _building_generation_system = GenerationSystem()
_building_generation_system.generic_generation_system = ( _building_generation_system.generic_generation_system = (