Merge initial version for Catalogs as factories data sources

This commit is contained in:
Guille Gutierrez 2022-04-26 19:41:00 -04:00
parent b1e74daa48
commit d5565530c1
8 changed files with 16 additions and 29 deletions

View File

@ -18,7 +18,8 @@ nrel_to_function = {
'quick service restaurant': cte.QUICK_SERVICE_RESTAURANT,
'full service restaurant': cte.FULL_SERVICE_RESTAURANT,
'small hotel': cte.SMALL_HOTEL,
'large hotel': cte.LARGE_HOTEL
'large hotel': cte.LARGE_HOTEL,
'industry': cte.INDUSTRY
}
nrcan_to_function = {

View File

@ -116,7 +116,6 @@ class NrelCatalog(Catalog):
climate_zone = archetype['@climate_zone']
construction_period = reference_standard_to_construction_period[archetype['@reference_standard']]
average_storey_height = archetype['average_storey_height']['#text']
number_of_storeys = archetype['number_of_storeys']['#text']
thermal_capacity = archetype['thermal_capacity']['#text']
extra_loses_due_to_thermal_bridges = archetype['extra_loses_due_to_thermal_bridges']['#text']
indirect_heated_ratio = archetype['indirect_heated_ratio']['#text']
@ -151,7 +150,6 @@ class NrelCatalog(Catalog):
construction_period,
archetype_constructions,
average_storey_height,
number_of_storeys,
thermal_capacity,
extra_loses_due_to_thermal_bridges,
indirect_heated_ratio,

View File

@ -16,7 +16,6 @@ class Archetype:
construction_period,
constructions,
average_storey_height,
number_of_storeys,
thermal_capacity,
extra_loses_due_to_thermal_bridges,
indirect_heated_ratio,
@ -29,7 +28,6 @@ class Archetype:
self._construction_period = construction_period
self._constructions = constructions
self._average_storey_height = average_storey_height
self._number_of_storeys = number_of_storeys
self._thermal_capacity = thermal_capacity
self._extra_loses_due_to_thermal_bridges = extra_loses_due_to_thermal_bridges
self._indirect_heated_ratio = indirect_heated_ratio
@ -92,14 +90,6 @@ class Archetype:
"""
return self._average_storey_height
@property
def number_of_storeys(self):
"""
Get archetype number of storeys
:return: int
"""
return self._number_of_storeys
@property
def thermal_capacity(self):
"""

View File

@ -16,7 +16,6 @@
</construction>
</constructions>
<average_storey_height units="m">3.05</average_storey_height>
<number_of_storeys units="-">2</number_of_storeys>
<thermal_capacity units="kJ/K m2">130</thermal_capacity>
<extra_loses_due_to_thermal_bridges units="W/K m2">0.15</extra_loses_due_to_thermal_bridges>
<indirect_heated_ratio units="-">0.15</indirect_heated_ratio>
@ -173,7 +172,6 @@
</construction>
</constructions>
<average_storey_height units="m">6.1</average_storey_height>
<number_of_storeys units="-">1</number_of_storeys>
<thermal_capacity units="kJ/K m2">130</thermal_capacity>
<extra_loses_due_to_thermal_bridges units="W/K m2">0.15</extra_loses_due_to_thermal_bridges>
<indirect_heated_ratio units="-">0.15</indirect_heated_ratio>
@ -394,7 +392,6 @@
</construction>
</constructions>
<average_storey_height units="m">3.05</average_storey_height>
<number_of_storeys units="-">2</number_of_storeys>
<thermal_capacity units="kJ/K m2">130</thermal_capacity>
<extra_loses_due_to_thermal_bridges units="W/K m2">0.05</extra_loses_due_to_thermal_bridges>
<indirect_heated_ratio units="-">0.15</indirect_heated_ratio>
@ -549,7 +546,6 @@
</construction>
</constructions>
<average_storey_height units="m">6.1</average_storey_height>
<number_of_storeys units="-">1</number_of_storeys>
<thermal_capacity units="kJ/K m2">130</thermal_capacity>
<extra_loses_due_to_thermal_bridges units="W/K m2">0.05</extra_loses_due_to_thermal_bridges>
<indirect_heated_ratio units="-">0.15</indirect_heated_ratio>
@ -798,7 +794,7 @@
<infiltration_rate_for_ventilation_system_off units="ACH">0.50</infiltration_rate_for_ventilation_system_off>
<infiltration_rate_for_ventilation_system_on units="ACH">0</infiltration_rate_for_ventilation_system_on>
</archetype>
<archetype id="37" building_type="industrial" reference_standard="non_standard_dompark" climate_zone="ASHRAE_2004:4A">
<archetype id="37" building_type="industry" reference_standard="non_standard_dompark" climate_zone="ASHRAE_2004:4A">
<constructions>
<construction id="106" type="exterior wall" >
<window_ratio units="-">0.15</window_ratio>
@ -813,11 +809,11 @@
<window/>
</construction>
</constructions>
<average_storey_height units="m"></average_storey_height>
<thermal_capacity units="kJ/K m2"></thermal_capacity>
<extra_loses_due_to_thermal_bridges units="W/K m2"></extra_loses_due_to_thermal_bridges>
<indirect_heated_ratio units="-"></indirect_heated_ratio>
<infiltration_rate_for_ventilation_system_off units="ACH"></infiltration_rate_for_ventilation_system_off>
<infiltration_rate_for_ventilation_system_on units="ACH"></infiltration_rate_for_ventilation_system_on>
<average_storey_height units="m">3.05</average_storey_height>
<thermal_capacity units="kJ/K m2">90</thermal_capacity>
<extra_loses_due_to_thermal_bridges units="W/K m2">0.05</extra_loses_due_to_thermal_bridges>
<indirect_heated_ratio units="-">0.15</indirect_heated_ratio>
<infiltration_rate_for_ventilation_system_off units="ACH">0.10</infiltration_rate_for_ventilation_system_off>
<infiltration_rate_for_ventilation_system_on units="ACH">0</infiltration_rate_for_ventilation_system_on>
</archetype>
</archetypes>

View File

@ -716,7 +716,7 @@
</layer>
</layers>
</construction>
<construction id="102" type="ceiling" name="Project internal floor_Reversed">
<construction id="102" type="roof" name="Project internal floor_Reversed">
<layers>
<layer id="1" name="Layer 1">
<material>105</material>
@ -797,7 +797,7 @@
</layer>
</layers>
</construction>
<construction id="109" type="ceiling" name="Project internal floor_Rev">
<construction id="109" type="roof" name="Project internal floor_Rev">
<layers>
<layer id="1" name="Layer 1">
<material>105</material>

View File

@ -251,7 +251,8 @@ class GeometryHelper:
cte.QUICK_SERVICE_RESTAURANT: cte.RESTAURANT,
cte.FULL_SERVICE_RESTAURANT: cte.RESTAURANT,
cte.SMALL_HOTEL: cte.HOTEL,
cte.LARGE_HOTEL: cte.HOTEL
cte.LARGE_HOTEL: cte.HOTEL,
cte.INDUSTRY:cte.INDUSTRY
}
@staticmethod

View File

@ -25,7 +25,7 @@ class TestBuildings(TestCase):
self._example_path = (Path(__file__).parent / 'tests_data').resolve()
def test_doe_idf(self):
city_file = "../unittests/tests_data/C40_Final.gml"
city_file = "../unittests/tests_data/one_building_in_kelowna.gml"
output_path = Path('../unittests/tests_outputs/').resolve()
city = GeometryFactory('citygml', city_file).city
for building in city.buildings:
@ -34,7 +34,7 @@ class TestBuildings(TestCase):
UsageFactory('comnet', city).enrich()
ExportsFactory('idf', city, output_path).export()
self.assertEqual(10, len(city.buildings))
self.assertEqual(1, len(city.buildings))
for building in city.buildings:
for internal_zone in building.internal_zones:
self.assertTrue(len(internal_zone.usage_zones) > 0)

View File

@ -35,6 +35,7 @@ class TestSchedulesFactory(TestCase):
self.assertIsNotNone(_city, 'city is none')
for building in _city.buildings:
building.function = GeometryHelper.libs_function_from_hft(building.function)
building.year_of_construction = 2005
UsageFactory('hft', _city).enrich()
return _city