added pv and hp classes and modified surface to include pv_systems

This commit is contained in:
Pilar 2021-04-15 17:26:00 -04:00
parent e31fc59b8f
commit a7b7e6bb0d
3 changed files with 180 additions and 2 deletions

View File

@ -0,0 +1,46 @@
"""
heat_pump module defines a heat pump
SPDX - License - Identifier: LGPL - 3.0 - or -later
Copyright © 2020 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca
"""
class HeatPump:
"""
HeatPump class
"""
def __init__(self):
self._seasonal_mean_cop = None
self._seasonal_mean_coverage_factor = None
@property
def seasonal_mean_cop(self):
"""
Get seasonal mean COP (-)
:return: real
"""
return self._seasonal_mean_cop
@seasonal_mean_cop.setter
def seasonal_mean_cop(self, value):
"""
Get seasonal mean COP (-)
:param value: real
"""
self._seasonal_mean_cop = value
@property
def seasonal_mean_coverage_factor(self):
"""
Get percentage of demand covered by the hp (-)
:return: real
"""
return self._seasonal_mean_coverage_factor
@seasonal_mean_coverage_factor.setter
def seasonal_mean_coverage_factor(self, value):
"""
Set percentage of demand covered by the hp (-)
:return: real
"""
self._seasonal_mean_coverage_factor = value

View File

@ -0,0 +1,114 @@
"""
pv_system defines a pv system including all components: PV panels, transformer...
SPDX - License - Identifier: LGPL - 3.0 - or -later
Copyright © 2020 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca
"""
class PvSystem:
"""
PvSystem class
"""
def __init__(self):
self._modules_mean_seasonal_efficiency = None
self._total_area = None
self._module_area = None
self._number_of_modules = None
self._overall_system_performance_ratio = None
self._electricity_generation = None
@property
def modules_mean_seasonal_efficiency(self):
"""
Get mean modules efficiency (-)
:return: real
"""
return self._modules_mean_seasonal_efficiency
@modules_mean_seasonal_efficiency.setter
def modules_mean_seasonal_efficiency(self, value):
"""
Set mean modules efficiency (-)
:param value: real
"""
self._modules_mean_seasonal_efficiency = value
@property
def total_area(self):
"""
Get total modules area (m2)
:return: real
"""
return self._total_area
@total_area.setter
def total_area(self, value):
"""
Set total modules area (m2)
:param value: real
"""
self._total_area = value
@property
def module_area(self):
"""
Get module area (m2)
:return: real
"""
return self._module_area
@module_area.setter
def module_area(self, value):
"""
Set module area (m2)
:param value: real
"""
self._module_area = value
@property
def number_of_modules(self):
"""
Get number of modules
:return: int
"""
return self._number_of_modules
@number_of_modules.setter
def number_of_modules(self, value):
"""
Set number of modules
:param value: int
"""
self._number_of_modules = value
@property
def overall_system_performance_ratio(self):
"""
Get overall system performance ratio (-)
:return: real
"""
return self._overall_system_performance_ratio
@overall_system_performance_ratio.setter
def overall_system_performance_ratio(self, value):
"""
Set overall system performance ratio (-)
:param value: real
"""
self._overall_system_performance_ratio = value
@property
def electricity_generation(self):
"""
Get electricity generation (J)
:return: real
"""
return self._electricity_generation
@electricity_generation.setter
def electricity_generation(self, value):
"""
Set electricity generation (J)
:param value: real
"""
self._electricity_generation = value

View File

@ -9,6 +9,7 @@ from __future__ import annotations
import numpy as np import numpy as np
import uuid import uuid
from city_model_structure.attributes.polygon import Polygon from city_model_structure.attributes.polygon import Polygon
from city_model_structure.attributes.pv_system import PvSystem
class Surface: class Surface:
@ -31,7 +32,8 @@ class Surface:
self._global_irradiance = dict() self._global_irradiance = dict()
self._perimeter_polygon = perimeter_polygon self._perimeter_polygon = perimeter_polygon
self._holes_polygons = holes_polygons self._holes_polygons = holes_polygons
self._solid_polygons = solid_polygon self._solid_polygon = solid_polygon
self._pv_system_installed = None
@property @property
def name(self): def name(self):
@ -201,7 +203,7 @@ class Surface:
solid surface solid surface
:return: Polygon :return: Polygon
""" """
return self._solid_polygons return self._solid_polygon
@property @property
def holes_polygons(self) -> [Polygon]: def holes_polygons(self) -> [Polygon]:
@ -213,3 +215,19 @@ class Surface:
[Polygon] -> one or more holes in the surface [Polygon] -> one or more holes in the surface
""" """
return self._holes_polygons return self._holes_polygons
@property
def pv_system_installed(self) -> PvSystem:
"""
PV system installed on the surface
:return: PvSystem
"""
return self._pv_system_installed
@pv_system_installed.setter
def pv_system_installed(self, value):
"""
PV system installed on the surface
:param value: PvSystem
"""
self._pv_system_installed = value