Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
64c1ef92ee
|
@ -310,6 +310,7 @@ class Building(CityObject):
|
|||
storeys = []
|
||||
surfaces_child_last_storey = []
|
||||
rest_surfaces = []
|
||||
|
||||
for i in range(0, number_of_storeys-1):
|
||||
name = 'storey_' + str(i)
|
||||
surfaces_child = []
|
||||
|
|
|
@ -144,4 +144,22 @@
|
|||
<infiltration_rate_for_ventilation_system_off units="ACH">0.3</infiltration_rate_for_ventilation_system_off>
|
||||
<infiltration_rate_for_ventilation_system_on units="ACH">0</infiltration_rate_for_ventilation_system_on>
|
||||
</archetype>
|
||||
<archetype id="9" building_type="office/workshop" periodOfConstruction="2011-2021">
|
||||
<constructions>
|
||||
<construction id="8" type="roof"/>
|
||||
<construction id="16" type="wall">
|
||||
<window_ratio units="-">0.13</window_ratio>
|
||||
<window>34</window>
|
||||
</construction>
|
||||
<construction id="24" type="basement_wall"/>
|
||||
<construction id="32" type="floor"/>
|
||||
</constructions>
|
||||
<average_storey_height units="m">3</average_storey_height>
|
||||
<number_of_storeys units="-">1</number_of_storeys>
|
||||
<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.3</infiltration_rate_for_ventilation_system_off>
|
||||
<infiltration_rate_for_ventilation_system_on units="ACH">0</infiltration_rate_for_ventilation_system_on>
|
||||
</archetype>
|
||||
</archetypes>
|
||||
|
|
|
@ -78,13 +78,13 @@ class Idf:
|
|||
Visible_Absorptance=layer.material.visible_absorptance
|
||||
)
|
||||
|
||||
def _add_occupancy_schedule(self, usage_zone):
|
||||
for schedule in self._idf.idfobjects[self._OCCUPANCY_HOURLY_SCHEDULE]:
|
||||
if schedule.Name == f'occupant schedules {usage_zone.usage}':
|
||||
def _add_schedule(self, usage_zone, schedule_type):
|
||||
for schedule in self._idf.idfobjects[schedule_type]:
|
||||
if schedule.Name == f'{schedule_type} schedules {usage_zone.usage}':
|
||||
return
|
||||
schedule_occupancy = self._idf.newidfobject(self._OCCUPANCY_HOURLY_SCHEDULE)
|
||||
schedule_occupancy.Name = f'occupant schedules {usage_zone.usage}'
|
||||
schedule_occupancy.Hour_1 = usage_zone.occupants.occupant_schedule[0]
|
||||
schedule_occupancy.Hour_1 = usage_zone.schedules[schedule_type] .occupants.occupant_schedule[0]
|
||||
schedule_occupancy.Hour_2 = usage_zone.occupants.occupant_schedule[1]
|
||||
schedule_occupancy.Hour_3 = usage_zone.occupants.occupant_schedule[2]
|
||||
schedule_occupancy.Hour_4 = usage_zone.occupants.occupant_schedule[3]
|
||||
|
@ -256,6 +256,14 @@ class Idf:
|
|||
points_list.append(point_tuple)
|
||||
return points_list
|
||||
|
||||
def _export(self, city, export_type="Surfaces"):
|
||||
for building in city.buildings:
|
||||
if export_type == "Surfaces":
|
||||
self._add_surfaces(building)
|
||||
else
|
||||
self._add_block(building)
|
||||
|
||||
|
||||
def _add_block(self, building):
|
||||
_points = self._matrix_to_2d_list(building.foot_print.coordinates)
|
||||
self._idf.add_block(name=building.name, coordinates=_points, height=building.max_height,
|
||||
|
@ -271,11 +279,11 @@ class Idf:
|
|||
for boundary in zone.bounded:
|
||||
self._add_construction(boundary)
|
||||
idf_surface = self.idf_surfaces[boundary.surface.type]
|
||||
wall = self._idf.newidfobject(self._SURFACE, Name=f'{building.name}-{boundary.surface.name}',
|
||||
surface = self._idf.newidfobject(self._SURFACE, Name=f'{building.name}-{boundary.surface.name}',
|
||||
Surface_Type=idf_surface, Zone_Name=zone_name,
|
||||
Construction_Name=boundary.construction_name)
|
||||
coordinates = self._matrix_to_list(boundary.surface.coordinates)
|
||||
wall.setcoords(coordinates)
|
||||
surface.setcoords(coordinates)
|
||||
index += 1
|
||||
self._add_heating_system(building)
|
||||
self._idf.intersect_match()
|
||||
|
|
|
@ -38,6 +38,7 @@ PRIMARY_SCHOOL = 'primary school'
|
|||
SECONDARY_SCHOOL = 'secondary school'
|
||||
OFFICE = 'office'
|
||||
LARGE_OFFICE = 'large office'
|
||||
OFFICE_WORKSHOP = 'office/workshop'
|
||||
|
||||
# usage
|
||||
INDUSTRY = 'industry'
|
||||
|
|
|
@ -72,7 +72,8 @@ class ConstructionHelper:
|
|||
cte.PRIMARY_SCHOOL: 'primary school',
|
||||
cte.SECONDARY_SCHOOL: 'secondary school',
|
||||
cte.OFFICE: 'office',
|
||||
cte.LARGE_OFFICE: 'large office'
|
||||
cte.LARGE_OFFICE: 'large office',
|
||||
cte.OFFICE_WORKSHOP: 'large office'
|
||||
}
|
||||
nrcan_function_default_value = 'residential'
|
||||
nrcan_window_types = [cte.WINDOW]
|
||||
|
|
3368
non_functional_tests/tests_data/C40_Final.gml
Normal file
3368
non_functional_tests/tests_data/C40_Final.gml
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user