some changes in code to be reviewed by Saeed
This commit is contained in:
parent
43e5bb7310
commit
5d4813f2f6
|
@ -6,8 +6,6 @@ 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.construction.material import Material
|
||||
|
||||
|
||||
class DistributionSystem:
|
||||
"""
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
Energy System catalog heat 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
|
||||
Project Coder Saeed Ranjbar saeed.ranjbar@concordia.ca
|
||||
Code contributors: Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
|
|
@ -20,7 +20,7 @@ class GenerationSystem:
|
|||
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_heating_supply_temperature, minimum_heating_supply_temperature,
|
||||
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, storage, auxiliary_equipment):
|
||||
|
@ -33,19 +33,19 @@ class GenerationSystem:
|
|||
self._nominal_thermal_output = nominal_thermal_output
|
||||
self._maximum_heat_output = maximum_heat_output
|
||||
self._minimum_heat_output = minimum_heat_output
|
||||
self._source_medium = source_medium
|
||||
self._supply_medium = supply_medium
|
||||
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._nominal_electricity_output = nominal_electricity_output
|
||||
self._maximum_heating_supply_temperature = maximum_heating_supply_temperature
|
||||
self._minimum_heating_supply_temperature = minimum_heating_supply_temperature
|
||||
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
|
||||
|
@ -218,20 +218,20 @@ class GenerationSystem:
|
|||
return self._nominal_electricity_output
|
||||
|
||||
@property
|
||||
def maximum_heating_supply_temperature(self):
|
||||
def maximum_heat_supply_temperature(self):
|
||||
"""
|
||||
Get the maximum heating supply temperature in degree Celsius
|
||||
Get the maximum heat supply temperature in degree Celsius
|
||||
:return: float
|
||||
"""
|
||||
return self._minimum_heating_supply_temperature
|
||||
return self._minimum_heat_supply_temperature
|
||||
|
||||
@property
|
||||
def minimum_heating_supply_temperature(self):
|
||||
def minimum_heat_supply_temperature(self):
|
||||
"""
|
||||
Get the minimum heating supply temperature in degree Celsius
|
||||
Get the minimum heat supply temperature in degree Celsius
|
||||
:return: float
|
||||
"""
|
||||
return self._minimum_heating_supply_temperature
|
||||
return self._minimum_heat_supply_temperature
|
||||
|
||||
@property
|
||||
def maximum_cooling_supply_temperature(self):
|
||||
|
@ -339,8 +339,8 @@ class GenerationSystem:
|
|||
'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_heating_supply_temperature,
|
||||
'minimum heating supply temperature [Celsius]': self.minimum_heating_supply_temperature,
|
||||
'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,
|
||||
|
|
|
@ -2,14 +2,13 @@
|
|||
Energy System catalog heat 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
|
||||
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
|
||||
|
@ -28,17 +27,25 @@ class PerformanceCurves:
|
|||
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*y + d*y + e*(y**2) + f
|
||||
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 function(self):
|
||||
"""
|
||||
y (e.g. COP in COP = a*source temperature**2... )
|
||||
"""
|
||||
return self._function
|
||||
|
||||
@property
|
||||
def parameters(self):
|
||||
"""
|
||||
Get the list of parameters involved in fitting process as ['y', 'x', 'z']
|
||||
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
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
Energy System catalog heat 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
|
||||
Project Coder Saeed Ranjbar saeed.ranjbar@concordia.ca
|
||||
Code contributors: Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
@ -28,8 +28,8 @@ class PvGenerationSystem(GenerationSystem):
|
|||
cooling_efficiency=None, electricity_efficiency=electricity_efficiency,
|
||||
source_temperature=None, source_mass_flow=None,
|
||||
nominal_electricity_output=nominal_electricity_output,
|
||||
maximum_heating_supply_temperature=None,
|
||||
minimum_heating_supply_temperature=None,
|
||||
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,
|
||||
|
|
|
@ -36,6 +36,7 @@ class System:
|
|||
self._emission_system = emission_system
|
||||
self._generation_systems = generation_systems
|
||||
self._energy_storage_systems = energy_storage_systems
|
||||
self._configuration = configuration
|
||||
|
||||
@property
|
||||
def lod(self):
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
North america energy system catalog
|
||||
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
||||
Copyright © 2022 Concordia CERC group
|
||||
Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca
|
||||
Code contributors: Saeed Ranjbar saeed.ranjbar@concordia.ca
|
||||
Project Coder Saeed Ranjbar saeed.ranjbar@concordia.ca
|
||||
Code contributors: Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca
|
||||
"""
|
||||
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<?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>
|
||||
|
@ -129,7 +130,7 @@
|
|||
</components>
|
||||
</system>
|
||||
<system id="6">
|
||||
<name>Water Source Heat Pump with Electrical Boiler and thermal storage</name>
|
||||
<name>Water Source Heat Pump with Electrical Boiler and thermal storage</name>\
|
||||
<demands>
|
||||
<demand>heating</demand>
|
||||
<demand>domestic_hot_water</demand>
|
||||
|
@ -197,8 +198,7 @@
|
|||
<energy_demands>
|
||||
<demand demand_id="1" name="heating"/>
|
||||
<demand demand_id="2" name="domesticHotWater"/>
|
||||
<demand demand_id="3" name="electricity"/>
|
||||
<demand demand_id="3" name="electricity"/>
|
||||
<demand demand_id="4" name="cooling"/>
|
||||
</energy_demands>
|
||||
</EnergySystemCatalog>
|
||||
|
||||
|
|
|
@ -35,8 +35,8 @@ class TestSystemsCatalog(TestCase):
|
|||
with self.assertRaises(IndexError):
|
||||
catalog.get_entry('unknown')
|
||||
|
||||
# def test_north_america_systems_catalog(self):
|
||||
# catalog = EnergySystemsCatalogFactory('north_america').catalog
|
||||
def test_north_america_systems_catalog(self):
|
||||
catalog = EnergySystemsCatalogFactory('north_america').catalog
|
||||
|
||||
def test_montreal_catalog(self):
|
||||
catalog = EnergySystemsCatalogFactory('montreal_custom').catalog
|
||||
|
|
Loading…
Reference in New Issue
Block a user