Correct catalog for infiltration area
This commit is contained in:
parent
2d0fd3eb0c
commit
2be27590d3
|
@ -113,6 +113,7 @@ class NrcanCatalog(Catalog):
|
|||
def _load_archetypes(self):
|
||||
_catalog_archetypes = []
|
||||
archetypes = self._archetypes['archetypes']
|
||||
|
||||
for archetype in archetypes:
|
||||
archetype_id = f'{archetype["function"]}_{archetype["period_of_construction"]}_{archetype["climate_zone"]}'
|
||||
function = archetype['function']
|
||||
|
@ -128,6 +129,12 @@ class NrcanCatalog(Catalog):
|
|||
infiltration_rate_for_ventilation_system_on = (
|
||||
archetype['infiltration_rate_for_ventilation_system_on'] / cte.HOUR_TO_SECONDS
|
||||
)
|
||||
infiltration_rate_area_for_ventilation_system_on = (
|
||||
archetype['infiltration_rate_area_for_ventilation_system_on']
|
||||
)
|
||||
infiltration_rate_area_for_ventilation_system_off = (
|
||||
archetype['infiltration_rate_area_for_ventilation_system_off']
|
||||
)
|
||||
|
||||
archetype_constructions = []
|
||||
for archetype_construction in archetype['constructions']:
|
||||
|
@ -165,7 +172,10 @@ class NrcanCatalog(Catalog):
|
|||
extra_loses_due_to_thermal_bridges,
|
||||
None,
|
||||
infiltration_rate_for_ventilation_system_off,
|
||||
infiltration_rate_for_ventilation_system_on))
|
||||
infiltration_rate_for_ventilation_system_on,
|
||||
infiltration_rate_area_for_ventilation_system_off,
|
||||
infiltration_rate_area_for_ventilation_system_on
|
||||
))
|
||||
return _catalog_archetypes
|
||||
|
||||
def names(self, category=None):
|
||||
|
|
|
@ -23,7 +23,9 @@ class Archetype:
|
|||
extra_loses_due_to_thermal_bridges,
|
||||
indirect_heated_ratio,
|
||||
infiltration_rate_for_ventilation_system_off,
|
||||
infiltration_rate_for_ventilation_system_on):
|
||||
infiltration_rate_for_ventilation_system_on,
|
||||
infiltration_rate_area_for_ventilation_system_off = 0,
|
||||
infiltration_rate_area_for_ventilation_system_on = 0):
|
||||
self._id = archetype_id
|
||||
self._name = name
|
||||
self._function = function
|
||||
|
@ -36,6 +38,8 @@ class Archetype:
|
|||
self._indirect_heated_ratio = indirect_heated_ratio
|
||||
self._infiltration_rate_for_ventilation_system_off = infiltration_rate_for_ventilation_system_off
|
||||
self._infiltration_rate_for_ventilation_system_on = infiltration_rate_for_ventilation_system_on
|
||||
self._infiltration_rate_area_for_ventilation_system_off = infiltration_rate_area_for_ventilation_system_off
|
||||
self._infiltration_rate_area_for_ventilation_system_on = infiltration_rate_area_for_ventilation_system_on
|
||||
|
||||
@property
|
||||
def id(self):
|
||||
|
@ -133,6 +137,23 @@ class Archetype:
|
|||
"""
|
||||
return self._infiltration_rate_for_ventilation_system_on
|
||||
|
||||
@property
|
||||
def infiltration_rate_area_for_ventilation_system_off(self):
|
||||
"""
|
||||
Get archetype infiltration rate area for ventilation system off
|
||||
:return: float
|
||||
"""
|
||||
return self._infiltration_rate_area_for_ventilation_system_off
|
||||
|
||||
@property
|
||||
def infiltration_rate_area_for_ventilation_system_on(self):
|
||||
"""
|
||||
Get archetype infiltration rate area for ventilation system on
|
||||
:return: float
|
||||
"""
|
||||
return self._infiltration_rate_area_for_ventilation_system_on
|
||||
|
||||
|
||||
def to_dictionary(self):
|
||||
"""Class content to dictionary"""
|
||||
_constructions = []
|
||||
|
@ -149,6 +170,8 @@ class Archetype:
|
|||
'indirect heated ratio': self.indirect_heated_ratio,
|
||||
'infiltration rate for ventilation off [1/s]': self.infiltration_rate_for_ventilation_system_off,
|
||||
'infiltration rate for ventilation on [1/s]': self.infiltration_rate_for_ventilation_system_on,
|
||||
'infiltration rate area for ventilation off': self.infiltration_rate_area_for_ventilation_system_off,
|
||||
'infiltration rate area for ventilation on': self.infiltration_rate_area_for_ventilation_system_on,
|
||||
'constructions': _constructions
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,8 +20,8 @@ class ThermalArchetype:
|
|||
self._indirect_heated_ratio = None
|
||||
self._infiltration_rate_for_ventilation_system_off = None
|
||||
self._infiltration_rate_for_ventilation_system_on = None
|
||||
self._infiltration_rate_area_for_ventilation_system_off = None
|
||||
self._infiltration_rate_area_for_ventilation_system_on = None
|
||||
self._infiltration_rate_area_for_ventilation_system_off = 0
|
||||
self._infiltration_rate_area_for_ventilation_system_on = 0
|
||||
|
||||
@property
|
||||
def constructions(self) -> [Construction]:
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -73,6 +73,4 @@ class EnergyBuildingsExportsFactory:
|
|||
Export the city given to the class using the given export type handler
|
||||
:return: None
|
||||
"""
|
||||
# return getattr(self, self._export_type, lambda: None)
|
||||
|
||||
return InselMonthlyEnergyBalance(self._city, self._path, self._custom_insel_block)
|
||||
return getattr(self, self._export_type, lambda: None)
|
||||
|
|
|
@ -58,7 +58,8 @@ class ConstructionHelper:
|
|||
'Boucherville': '6',
|
||||
'Mascouche': '6',
|
||||
'Saint-Leonard': '6',
|
||||
'La Prairie': '6'
|
||||
'La Prairie': '6',
|
||||
'Summerland': '6'
|
||||
}
|
||||
|
||||
_reference_city_to_israel_climate_zone = {
|
||||
|
|
|
@ -67,6 +67,8 @@ class NrcanPhysicsParameters:
|
|||
thermal_archetype.indirect_heated_ratio = 0
|
||||
thermal_archetype.infiltration_rate_for_ventilation_system_on = catalog_archetype.infiltration_rate_for_ventilation_system_on
|
||||
thermal_archetype.infiltration_rate_for_ventilation_system_off = catalog_archetype.infiltration_rate_for_ventilation_system_off
|
||||
thermal_archetype.infiltration_rate_area_for_ventilation_system_on = catalog_archetype.infiltration_rate_area_for_ventilation_system_on
|
||||
thermal_archetype.infiltration_rate_area_for_ventilation_system_off = catalog_archetype.infiltration_rate_area_for_ventilation_system_off
|
||||
_constructions = []
|
||||
for catalog_construction in catalog_archetype.constructions:
|
||||
construction = Construction()
|
||||
|
|
|
@ -69,6 +69,7 @@ class TestExports(TestCase):
|
|||
"""
|
||||
city = self._get_citygml('one_building_in_kelowna.gml')
|
||||
WeatherFactory('epw', city).enrich()
|
||||
ConstructionFactory('nrcan', city).enrich()
|
||||
for building in city.buildings:
|
||||
building.external_temperature[cte.MONTH] = MonthlyValues().\
|
||||
get_mean_values(building.external_temperature[cte.HOUR])
|
||||
|
|
Loading…
Reference in New Issue
Block a user