def generate_from_gml(self): """Enriches lod1 or lod2 data from CityGML Adds Zones, BoundaryConditions, Material settings for walls and windows to the geometric representation of CityGML """ type_bldg_area = self.net_leased_area self.net_leased_area = 0.0 # create zones with their corresponding area, name and usage for key, value in self.zone_area_factors.items(): zone = ThermalZone(self) zone.area = type_bldg_area * value[0] zone.name = key use_cond = UseCond(zone) use_cond.load_use_conditions(value[1], data_class=self.parent.data) zone.use_conditions = use_cond zone.use_conditions.with_ahu = False zone.use_conditions.persons *= zone.area * 0.01 zone.use_conditions.machines *= zone.area * 0.01 for surface in self.gml_surfaces: if surface.surface_tilt is not None: if surface.surface_tilt == 90: outer_wall = OuterWall(zone) outer_wall.load_type_element( year=self.year_of_construction, construction=self.construction_type, data_class=self.parent.data) outer_wall.name = surface.name outer_wall.tilt = surface.surface_tilt outer_wall.orientation = surface.surface_orientation window = Window(zone) window.load_type_element(self.year_of_construction, "Kunststofffenster, " "Isolierverglasung", data_class=self.parent.data) window.name = "asd" + str(surface.surface_tilt) window.tilt = surface.surface_tilt window.orientation = surface.surface_orientation elif surface.surface_tilt == 0 and \ surface.surface_orientation == \ -2: outer_wall = GroundFloor(zone) outer_wall.load_type_element( year=self.year_of_construction, construction=self.construction_type, data_class=self.parent.data) outer_wall.name = surface.name outer_wall.tilt = surface.surface_tilt outer_wall.orientation = surface.surface_orientation else: outer_wall = Rooftop(zone) outer_wall.load_type_element( year=self.year_of_construction, construction=self.construction_type, data_class=self.parent.data) outer_wall.name = surface.name outer_wall.tilt = surface.surface_tilt outer_wall.orientation = surface.surface_orientation for key, value in self.inner_wall_names.items(): for zone in self.thermal_zones: inner_wall = InnerWall(zone) inner_wall.load_type_element( year=self.year_of_construction, construction=self.construction_type, data_class=self.parent.data) inner_wall.name = key inner_wall.tilt = value[0] inner_wall.orientation = value[1] if self.number_of_floors > 1: for key, value in self.ceiling_names.items(): for zone in self.thermal_zones: ceiling = Ceiling(zone) ceiling.load_type_element( year=self.year_of_construction, construction=self.construction_type, data_class=self.parent.data) ceiling.name = key ceiling.tilt = value[0] ceiling.orientation = value[1] for key, value in self.floor_names.items(): for zone in self.thermal_zones: floor = Floor(zone) floor.load_type_element( year=self.year_of_construction, construction=self.construction_type, data_class=self.parent.data) floor.name = key floor.tilt = value[0] floor.orientation = value[1] else: pass for surface in self.gml_surfaces: if surface.surface_tilt is not None: if surface.surface_tilt != 0 and surface.surface_orientation\ != -2 and surface.surface_orientation != -1: self.set_outer_wall_area( surface.surface_area * (1 - self.est_factor_win_area), surface.surface_orientation) else: self.set_outer_wall_area(surface.surface_area, surface.surface_orientation) for surface in self.gml_surfaces: if surface.surface_tilt != 0 and surface.surface_orientation != \ -2 and surface.surface_orientation != -1: self.set_window_area( surface.surface_area * self.est_factor_win_area, surface.surface_orientation) for zone in self.thermal_zones: zone.set_inner_wall_area() zone.set_volume_zone()
def generate_archetype(self): """Generates a SingleFamilyHouse archetype buildings With given values, this function generates an archetype building for Tabula Single Family House. """ self.thermal_zones = None self._check_year_of_construction() # help area for the correct building area setting while using typeBldgs type_bldg_area = self.net_leased_area self.net_leased_area = 0.0 for key, value in self.zone_area_factors.items(): zone = ThermalZone(parent=self) zone.name = key zone.area = type_bldg_area * value[0] use_cond = UseCond(parent=zone) use_cond.load_use_conditions(zone_usage=value[1]) zone.use_conditions = use_cond zone.use_conditions.with_ahu = False zone.use_conditions.persons *= zone.area * 0.01 zone.use_conditions.machines *= zone.area * 0.01 if self.facade_estimation_factors[self.building_age_group]['ow1'] != 0: for key, value in self._outer_wall_names_1.items(): for zone in self.thermal_zones: outer_wall = OuterWall(zone) outer_wall.load_type_element( year=self.year_of_construction, construction=self._construction_type_1, data_class=self.parent.data) outer_wall.name = key outer_wall.tilt = value[0] outer_wall.orientation = value[1] outer_wall.area = ((self.facade_estimation_factors[ self.building_age_group]['ow1'] * type_bldg_area) / len(self._outer_wall_names_1)) if self.facade_estimation_factors[self.building_age_group]['ow2'] != 0: for key, value in self._outer_wall_names_2.items(): for zone in self.thermal_zones: outer_wall = OuterWall(zone) outer_wall.load_type_element( year=self.year_of_construction, construction=self._construction_type_2, data_class=self.parent.data) outer_wall.name = key outer_wall.tilt = value[0] outer_wall.orientation = value[1] outer_wall.area = ((self.facade_estimation_factors[ self.building_age_group]['ow2'] * type_bldg_area) / len(self._outer_wall_names_2)) if self.facade_estimation_factors[ self.building_age_group]['win1'] != 0: for key, value in self.window_names_1.items(): for zone in self.thermal_zones: window = Window(zone) window.load_type_element( self.year_of_construction, construction=self._construction_type_1, data_class=self.parent.data) window.name = key window.tilt = value[0] window.orientation = value[1] window.area = ((self.facade_estimation_factors[ self.building_age_group]['win1'] * type_bldg_area) / len(self.window_names_1)) if self.facade_estimation_factors[ self.building_age_group]['win2'] != 0: for key, value in self.window_names_2.items(): for zone in self.thermal_zones: window = Window(zone) window.load_type_element( self.year_of_construction, construction=self._construction_type_2, data_class=self.parent.data) window.name = key window.tilt = value[0] window.orientation = value[1] window.area = ((self.facade_estimation_factors[ self.building_age_group]['win2'] * type_bldg_area) / len(self.window_names_2)) if self.facade_estimation_factors[self.building_age_group]['gf1'] != 0: for key, value in self.ground_floor_names_1.items(): for zone in self.thermal_zones: gf = GroundFloor(zone) gf.load_type_element( year=self.year_of_construction, construction=self._construction_type_1, data_class=self.parent.data) gf.name = key gf.tilt = value[0] gf.orientation = value[1] gf.area = ((self.facade_estimation_factors[ self.building_age_group]['gf1'] * type_bldg_area) / len(self.ground_floor_names_1)) if self.facade_estimation_factors[self.building_age_group]['gf2'] != 0: for key, value in self.ground_floor_names_2.items(): for zone in self.thermal_zones: gf = GroundFloor(zone) gf.load_type_element( year=self.year_of_construction, construction=self._construction_type_2, data_class=self.parent.data) gf.name = key gf.tilt = value[0] gf.orientation = value[1] gf.area = ((self.facade_estimation_factors[ self.building_age_group]['gf2'] * type_bldg_area) / len(self.ground_floor_names_2)) if self.facade_estimation_factors[self.building_age_group]['rt1'] != 0: for key, value in self.roof_names_1.items(): for zone in self.thermal_zones: rt = Rooftop(zone) rt.load_type_element( year=self.year_of_construction, construction=self._construction_type_1, data_class=self.parent.data) rt.name = key rt.tilt = value[0] rt.orientation = value[1] rt.area = ((self.facade_estimation_factors[ self.building_age_group]['rt1'] * type_bldg_area) / len(self.roof_names_1)) if self.facade_estimation_factors[self.building_age_group]['rt2'] != 0: for key, value in self.roof_names_2.items(): for zone in self.thermal_zones: rt = Rooftop(zone) rt.load_type_element( year=self.year_of_construction, construction=self._construction_type_2, data_class=self.parent.data) rt.name = key rt.tilt = value[0] rt.orientation = value[1] rt.area = ((self.facade_estimation_factors[ self.building_age_group]['rt2'] * type_bldg_area) / len(self.roof_names_2)) if self.facade_estimation_factors[ self.building_age_group]['door'] != 0: for key, value in self.door_names.items(): for zone in self.thermal_zones: door = Door(zone) door.load_type_element( year=self.year_of_construction, construction=self._construction_type_1, data_class=self.parent.data) door.name = key door.tilt = value[0] door.orientation = value[1] door.area = ((self.facade_estimation_factors[ self.building_age_group]['door'] * type_bldg_area) / len(self.door_names)) for key, value in self.inner_wall_names.items(): for zone in self.thermal_zones: inner_wall = InnerWall(zone) inner_wall.load_type_element(year=self.year_of_construction, construction="tabula_standard", data_class=self.parent.data) inner_wall.name = key inner_wall.tilt = value[0] inner_wall.orientation = value[1] if self.number_of_floors > 1: for key, value in self.ceiling_names.items(): for zone in self.thermal_zones: ceiling = Ceiling(zone) ceiling.load_type_element(year=self.year_of_construction, construction="tabula_standard", data_class=self.parent.data) ceiling.name = key ceiling.tilt = value[0] ceiling.orientation = value[1] for key, value in self.floor_names.items(): for zone in self.thermal_zones: floor = Floor(zone) floor.load_type_element(year=self.year_of_construction, construction="tabula_standard", data_class=self.parent.data) floor.name = key floor.tilt = value[0] floor.orientation = value[1] for zone in self.thermal_zones: zone.set_inner_wall_area() zone.set_volume_zone()
def generate_archetype(self): '''Generates an office building. With given values, this class generates a type building according to TEASER requirements. ''' #help area for the correct building area setting while using typeBldgs type_bldg_area = self.net_leased_area self.net_leased_area = 0.0 # create zones with their corresponding area, name and usage for key, value in self.zone_area_factors.items(): zone = ThermalZone(self) zone.area = type_bldg_area * value[0] zone.name = key use_cond = UseCond(zone) use_cond.load_use_conditions(value[1]) zone.use_conditions = use_cond zone.use_conditions.persons = zone.area * 0.01 * \ zone.use_conditions.persons zone.use_conditions.machines = zone.area * 0.01 * \ zone.use_conditions.machines # self.thermal_zones.append(zone) # statistical estimation of the facade self._est_outer_wall_area = self.est_factor_wall_area * \ type_bldg_area ** self.est_exponent_wall self._est_win_area = self.est_factor_win_area * \ type_bldg_area ** self.est_exponent_win self._est_roof_area = (type_bldg_area / self.number_of_floors) * \ self.gross_factor self._est_floor_area = (type_bldg_area / self.number_of_floors) * \ self.gross_factor # manipulation of wall according to facade design # (received from window_layout) self._est_facade_area = self._est_outer_wall_area + self._est_win_area if not self.window_layout == 0: self._est_outer_wall_area = self._est_facade_area * \ self.corr_factor_wall self._est_win_area = self._est_facade_area * self.corr_factor_win else: pass # set the facade area to the four orientations for key, value in self.outer_wall_names.items(): # North and South if value[1] == 0 or value[1] == 180: self.outer_area[value[1]] = self._est_outer_wall_area * \ (self._est_length / (2 * self._est_width + 2 * self._est_length)) # East and West elif value[1] == 90 or value[1] == 270: self.outer_area[value[1]] = self._est_outer_wall_area * \ (self._est_width / (2 * self._est_width + 2 * self._est_length)) for zone in self.thermal_zones: # create wall and set building elements outer_wall = OuterWall(zone) outer_wall.load_type_element(self.year_of_construction, self.construction_type) outer_wall.name = key outer_wall.tilt = value[0] outer_wall.orientation = value[1] for key, value in self.window_names.items(): if value[1] == 0 or value[1] == 180: self.window_area[value[1]] = self._est_win_area * \ (self._est_length / (2 * self._est_width + 2 * self._est_length)) elif value[1] == 90 or value[1] == 270: self.window_area[value[1]] = self._est_win_area * \ (self._est_width / (2 * self._est_width + 2 * self._est_length)) ''' There is no real classification for windows, so this is a bit hard code - will be fixed sometime. ''' for zone in self.thermal_zones: window = Window(zone) window.load_type_element( self.year_of_construction, "Kunststofffenster, Isolierverglasung") window.name = key window.tilt = value[0] window.orientation = value[1] for key, value in self.roof_names.items(): self.outer_area[value[1]] = self._est_roof_area for zone in self.thermal_zones: roof = Rooftop(zone) roof.load_type_element(self.year_of_construction, self.construction_type) roof.name = key roof.tilt = value[0] roof.orientation = value[1] # zone.outer_walls.append(roof) for key, value in self.ground_floor_names.items(): self.outer_area[value[1]] = self._est_floor_area for zone in self.thermal_zones: ground_floor = GroundFloor(zone) ground_floor.load_type_element(self.year_of_construction, self.construction_type) ground_floor.name = key ground_floor.tilt = value[0] ground_floor.orientation = value[1] # zone.outer_walls.append(ground_floor) for key, value in self.inner_wall_names.items(): for zone in self.thermal_zones: inner_wall = InnerWall(zone) inner_wall.load_type_element(self.year_of_construction, self.construction_type) inner_wall.name = key inner_wall.tilt = value[0] inner_wall.orientation = value[1] # zone.inner_walls.append(inner_wall) if self.number_of_floors > 1: for key, value in self.ceiling_names.items(): for zone in self.thermal_zones: ceiling = Ceiling(zone) ceiling.load_type_element(self.year_of_construction, self.construction_type) ceiling.name = key ceiling.tilt = value[0] ceiling.orientation = value[1] # zone.inner_walls.append(ceiling) for key, value in self.floor_names.items(): for zone in self.thermal_zones: floor = Floor(zone) floor.load_type_element(self.year_of_construction, self.construction_type) floor.name = key floor.tilt = value[0] floor.orientation = value[1] # zone.inner_walls.append(floor) else: pass for key, value in self.outer_area.items(): self.set_outer_wall_area(value, key) for key, value in self.window_area.items(): self.set_window_area(value, key) for zone in self.thermal_zones: zone.set_inner_wall_area() zone.set_volume_zone()
def generate_archetype(self): """Generates a SingleFamilyDwelling building. With given values, this class generates a archetype building for single family dwellings according to TEASER requirements """ # help area for the correct building area setting while using typeBldgs type_bldg_area = self.net_leased_area self.net_leased_area = 0.0 self._number_of_heated_floors = self._est_factor_heated_cellar + \ self.number_of_floors + self.est_living_area_factor \ * self._est_factor_heated_attic self._living_area_per_floor = type_bldg_area / \ self._number_of_heated_floors self._est_ground_floor_area = self.est_bottom_building_closure * \ self._living_area_per_floor self._est_roof_area = self.est_upper_building_closure * \ self._est_factor_dormer * self._est_area_per_floor * \ self._living_area_per_floor self._top_floor_area = self._est_area_per_roof * \ self._living_area_per_floor if self._est_roof_area == 0: self._est_roof_area = self._top_floor_area self._est_facade_area = self._est_facade_to_floor_area * \ self._living_area_per_floor + self._est_extra_floor_area self._est_win_area = self.est_factor_win_area * type_bldg_area self._est_cellar_wall_area = self.est_factor_cellar_area * \ self._est_factor_heated_cellar * self._est_facade_area self._est_outer_wall_area = (self._number_of_heated_floors * self._est_facade_area) - \ self._est_cellar_wall_area - \ self._est_win_area # self._est_factor_volume = type_bldg_area * 2.5 for key, value in self.zone_area_factors.items(): zone = ThermalZone(self) zone.name = key zone.area = type_bldg_area * value[0] use_cond = UseCond(zone) use_cond.load_use_conditions(value[1], data_class=self.parent.data) zone.use_conditions = use_cond zone.use_conditions.with_ahu = False zone.use_conditions.persons *= zone.area * 0.01 zone.use_conditions.machines *= zone.area * 0.01 for key, value in self.outer_wall_names.items(): # North and South if value[1] == 0 or value[1] == 180.0: self.outer_area[value[1]] = self._est_outer_wall_area / \ self.nr_of_orientation # East and West elif value[1] == 90 or value[1] == 270: self.outer_area[value[1]] = self._est_outer_wall_area / \ self.nr_of_orientation for zone in self.thermal_zones: # create wall and set building elements outer_wall = OuterWall(zone) outer_wall.load_type_element( year=self.year_of_construction, construction=self.construction_type, data_class=self.parent.data) outer_wall.name = key outer_wall.tilt = value[0] outer_wall.orientation = value[1] for key, value in self.window_names.items(): if value[1] == 0 or value[1] == 180: self.window_area[value[1]] = self._est_win_area / \ self.nr_of_orientation elif value[1] == 90 or value[1] == 270: self.window_area[value[1]] = self._est_win_area / \ self.nr_of_orientation ''' There is no real classification for windows, so this is a bit hard code - will be fixed sometime ''' for zone in self.thermal_zones: window = Window(zone) window.load_type_element(self.year_of_construction, "Kunststofffenster, " "Isolierverglasung", data_class=self.parent.data) window.name = key window.tilt = value[0] window.orientation = value[1] for key, value in self.roof_names.items(): self.outer_area[value[1]] = self._est_roof_area for zone in self.thermal_zones: roof = Rooftop(zone) roof.load_type_element(year=self.year_of_construction, construction=self.construction_type, data_class=self.parent.data) roof.name = key roof.tilt = value[0] roof.orientation = value[1] for key, value in self.ground_floor_names.items(): self.outer_area[value[1]] = self._est_ground_floor_area for zone in self.thermal_zones: ground_floor = GroundFloor(zone) ground_floor.load_type_element( year=self.year_of_construction, construction=self.construction_type, data_class=self.parent.data) ground_floor.name = key ground_floor.tilt = value[0] ground_floor.orientation = value[1] for key, value in self.inner_wall_names.items(): for zone in self.thermal_zones: inner_wall = InnerWall(zone) inner_wall.load_type_element( year=self.year_of_construction, construction=self.construction_type, data_class=self.parent.data) inner_wall.name = key inner_wall.tilt = value[0] inner_wall.orientation = value[1] # zone.inner_walls.append(inner_wall) if self.number_of_floors > 1: for key, value in self.ceiling_names.items(): for zone in self.thermal_zones: ceiling = Ceiling(zone) ceiling.load_type_element( year=self.year_of_construction, construction=self.construction_type, data_class=self.parent.data) ceiling.name = key ceiling.tilt = value[0] ceiling.orientation = value[1] # zone.inner_walls.append(ceiling) for key, value in self.floor_names.items(): for zone in self.thermal_zones: floor = Floor(zone) floor.load_type_element( year=self.year_of_construction, construction=self.construction_type, data_class=self.parent.data) floor.name = key floor.tilt = value[0] floor.orientation = value[1] # zone.inner_walls.append(floor) else: pass for key, value in self.outer_area.items(): self.set_outer_wall_area(value, key) for key, value in self.window_area.items(): self.set_window_area(value, key) for zone in self.thermal_zones: zone.set_inner_wall_area() zone.set_volume_zone()
def generate_archetype(self): """Generates a residential building. With given values, this class generates a type residential building according to TEASER requirements. """ # help area for the correct building area setting while using typeBldgs type_bldg_area = self.net_leased_area self.net_leased_area = 0.0 self._est_ground_floor_area = type_bldg_area / self.number_of_floors self._est_roof_area = type_bldg_area / self.number_of_floors self._est_win_area = self.est_factor_win_area * type_bldg_area * \ (1 - self._est_factor_neighbour / 4) self._est_outer_wall_area = (self.est_factor_facade_to_volume * type_bldg_area * self.height_of_floors - self._est_ground_floor_area - self._est_roof_area - self._est_win_area)*(1 - self._est_factor_neighbour / 4) for key, value in self.zone_area_factors.items(): zone = ThermalZone(self) zone.name = key zone.area = type_bldg_area * value[0] use_cond = UseCond(zone) use_cond.load_use_conditions(value[1]) zone.use_conditions = use_cond for key, value in self.outer_wall_names.items(): # North and South if value[1] == 0 or value[1] == 180.0: self.outer_area[value[1]] = self._est_outer_wall_area / \ self.nr_of_orientation # East and West elif value[1] == 90 or value[1] == 270: self.outer_area[value[1]] = self._est_outer_wall_area / \ self.nr_of_orientation for zone in self.thermal_zones: # create wall and set building elements outer_wall = OuterWall(zone) outer_wall.load_type_element(self.year_of_construction, self.construction_type) outer_wall.name = key outer_wall.tilt = value[0] outer_wall.orientation = value[1] for key, value in self.window_names.items(): if value[1] == 0 or value[1] == 180: self.window_area[value[1]] = self._est_win_area / \ self.nr_of_orientation elif value[1] == 90 or value[1] == 270: self.window_area[value[1]] = self._est_win_area / \ self.nr_of_orientation ''' There is no real classification for windows, so this is a bit hard code - will be fixed sometime ''' for zone in self.thermal_zones: window = Window(zone) window.load_type_element(self.year_of_construction, "Kunststofffenster, Isolierverglasung" ) window.name = key window.tilt = value[0] window.orientation = value[1] for key, value in self.roof_names.items(): self.outer_area[value[1]] = self._est_roof_area for zone in self.thermal_zones: roof = Rooftop(zone) roof.load_type_element(self.year_of_construction, self.construction_type) roof.name = key roof.tilt = value[0] roof.orientation = value[1] for key, value in self.ground_floor_names.items(): self.outer_area[value[1]] = self._est_ground_floor_area for zone in self.thermal_zones: ground_floor = GroundFloor(zone) ground_floor.load_type_element(self.year_of_construction, self.construction_type) ground_floor.name = key ground_floor.tilt = value[0] ground_floor.orientation = value[1] for key, value in self.inner_wall_names.items(): for zone in self.thermal_zones: inner_wall = InnerWall(zone) inner_wall.load_type_element(self.year_of_construction, self.construction_type) inner_wall.name = key inner_wall.tilt = value[0] inner_wall.orientation = value[1] # zone.inner_walls.append(inner_wall) if self.number_of_floors > 1: for key, value in self.ceiling_names.items(): for zone in self.thermal_zones: ceiling = Ceiling(zone) ceiling.load_type_element(self.year_of_construction, self.construction_type) ceiling.name = key ceiling.tilt = value[0] ceiling.orientation = value[1] # zone.inner_walls.append(ceiling) for key, value in self.floor_names.items(): for zone in self.thermal_zones: floor = Floor(zone) floor.load_type_element(self.year_of_construction, self.construction_type) floor.name = key floor.tilt = value[0] floor.orientation = value[1] # zone.inner_walls.append(floor) else: pass for key, value in self.outer_area.items(): self.set_outer_wall_area(value, key) for key, value in self.window_area.items(): self.set_window_area(value, key) for zone in self.thermal_zones: zone.set_inner_wall_area() zone.set_volume_zone()
def generate_from_gml(self): """enriches lod1 or lod2 data from citygml adds Zones, BoundaryConditions, Material settings for walls and windows to the geometric representation of CityGML number or height of floors need to be specified """ type_bldg_area = self.net_leased_area self.net_leased_area = 0.0 # create zones with their corresponding area, name and usage for key, value in self.zone_area_factors.items(): zone = ThermalZone(self) zone.area = type_bldg_area * value[0] zone.name = key use_cond = UseCond(zone) use_cond.load_use_conditions(value[1]) zone.use_conditions = use_cond zone.use_conditions.with_ahu = False zone.use_conditions.persons *= zone.area * 0.01 zone.use_conditions.machines *= zone.area * 0.01 for surface in self.gml_surfaces: if surface.surface_tilt == 90: outer_wall = OuterWall(zone) outer_wall.load_type_element(self.year_of_construction, self.construction_type) outer_wall.name = surface.name outer_wall.tilt = surface.surface_tilt outer_wall.orientation = surface.surface_orientation window = Window(zone) window.load_type_element(self.year_of_construction, "Kunststofffenster, Isolierverglasung") window.name = "asd"+str(surface.surface_tilt) window.tilt = surface.surface_tilt window.orientation = surface.surface_orientation elif surface.surface_tilt == 0 and surface.surface_orientation ==\ -2: outer_wall = GroundFloor(zone) outer_wall.load_type_element(self.year_of_construction, self.construction_type) outer_wall.name = surface.name outer_wall.tilt = surface.surface_tilt outer_wall.orientation = surface.surface_orientation else: outer_wall = Rooftop(zone) outer_wall.load_type_element(self.year_of_construction, self.construction_type) outer_wall.name = surface.name outer_wall.tilt = surface.surface_tilt outer_wall.orientation = surface.surface_orientation for key, value in self.inner_wall_names.items(): for zone in self.thermal_zones: inner_wall = InnerWall(zone) inner_wall.load_type_element(self.year_of_construction, self.construction_type) inner_wall.name = key inner_wall.tilt = value[0] inner_wall.orientation = value[1] if self.number_of_floors > 1: for key, value in self.ceiling_names.items(): for zone in self.thermal_zones: ceiling = Ceiling(zone) ceiling.load_type_element(self.year_of_construction, self.construction_type) ceiling.name = key ceiling.tilt = value[0] ceiling.orientation = value[1] for key, value in self.floor_names.items(): for zone in self.thermal_zones: floor = Floor(zone) floor.load_type_element(self.year_of_construction, self.construction_type) floor.name = key floor.tilt = value[0] floor.orientation = value[1] else: pass for surface in self.gml_surfaces: self.set_outer_wall_area(surface.surface_area * (1- self.est_factor_win_area), surface.surface_orientation) for surface in self.gml_surfaces: if surface.surface_tilt != 0 and surface.surface_orientation !=\ -2 and surface.surface_orientation != -1: self.set_window_area(surface.surface_area * self.est_factor_win_area, surface.surface_orientation) for zone in self.thermal_zones: zone.set_inner_wall_area() zone.set_volume_zone()
def generate_archetype(self): '''Generates a residential building. With given values, this class generates a type residential building according to TEASER requirements Berechnungsgrundlagen: IWU, "Kurzverfahren Energieprofil"; 2005. ''' #help area for the correct building area setting while using typeBldgs type_bldg_area = self.net_leased_area self.net_leased_area = 0.0 self._number_of_heated_floors = self._est_factor_heated_cellar + \ self.number_of_floors + self.est_living_area_factor\ *self._est_factor_heated_attic self._living_area_per_floor = type_bldg_area / \ self._number_of_heated_floors self._est_ground_floor_area = self.est_bottom_building_closure * \ self._living_area_per_floor self._est_roof_area = self.est_upper_building_closure * \ self._est_factor_dormer * self._est_area_per_floor * \ self._living_area_per_floor self._top_floor_area = self._est_area_per_roof * \ self._living_area_per_floor if self._est_roof_area == 0: self._est_roof_area = self._top_floor_area self._est_facade_area = self._est_facade_to_floor_area * \ self._living_area_per_floor + self._est_extra_floor_area self._est_win_area = self.est_factor_win_area * type_bldg_area self._est_cellar_wall_area = self.est_factor_cellar_area * \ self._est_factor_heated_cellar * self._est_facade_area self._est_outer_wall_area = (self._number_of_heated_floors * \ self._est_facade_area) - self._est_cellar_wall_area - \ self._est_win_area # self._est_factor_volume = type_bldg_area * 2.5 for key, value in self.zone_area_factors.items(): zone = ThermalZone(self) zone.name = key zone.area = type_bldg_area * value[0] use_cond = UseCond(zone) use_cond.load_use_conditions(value[1]) zone.use_conditions = use_cond for key, value in self.outer_wall_names.items(): # North and South if value[1] == 0 or value[1] == 180.0: self.outer_area[value[1]] = self._est_outer_wall_area / \ self.nr_of_orientation # East and West elif value[1] == 90 or value[1] == 270: self.outer_area[value[1]] = self._est_outer_wall_area / \ self.nr_of_orientation for zone in self.thermal_zones: # create wall and set building elements outer_wall = OuterWall(zone) outer_wall.load_type_element(self.year_of_construction, self.construction_type) outer_wall.name = key outer_wall.tilt = value[0] outer_wall.orientation = value[1] for key, value in self.window_names.items(): if value[1] == 0 or value[1] == 180: self.window_area[value[1]] = self._est_win_area / \ self.nr_of_orientation elif value[1] == 90 or value[1] == 270: self.window_area[value[1]] = self._est_win_area / \ self.nr_of_orientation ''' There is no real classification for windows, so this is a bit hard code - will be fixed sometime ''' for zone in self.thermal_zones: window = Window(zone) window.load_type_element(self.year_of_construction, "Kunststofffenster, Isolierverglasung") window.name = key window.tilt = value[0] window.orientation = value[1] for key, value in self.roof_names.items(): self.outer_area[value[1]] = self._est_roof_area for zone in self.thermal_zones: roof = Rooftop(zone) roof.load_type_element(self.year_of_construction, \ self.construction_type) roof.name = key roof.tilt = value[0] roof.orientation = value[1] for key, value in self.ground_floor_names.items(): self.outer_area[value[1]] = self._est_ground_floor_area for zone in self.thermal_zones: ground_floor = GroundFloor(zone) ground_floor.load_type_element(self.year_of_construction, \ self.construction_type) ground_floor.name = key ground_floor.tilt = value[0] ground_floor.orientation = value[1] for key, value in self.inner_wall_names.items(): for zone in self.thermal_zones: inner_wall = InnerWall(zone) inner_wall.load_type_element(self.year_of_construction, self.construction_type) inner_wall.name = key inner_wall.tilt = value[0] inner_wall.orientation = value[1] # zone.inner_walls.append(inner_wall) if self.number_of_floors > 1: for key, value in self.ceiling_names.items(): for zone in self.thermal_zones: ceiling = Ceiling(zone) ceiling.load_type_element(self.year_of_construction, self.construction_type) ceiling.name = key ceiling.tilt = value[0] ceiling.orientation = value[1] # zone.inner_walls.append(ceiling) for key, value in self.floor_names.items(): for zone in self.thermal_zones: floor = Floor(zone) floor.load_type_element(self.year_of_construction, self.construction_type) floor.name = key floor.tilt = value[0] floor.orientation = value[1] # zone.inner_walls.append(floor) else: pass for key, value in self.outer_area.items(): self.set_outer_wall_area(value, key) for key, value in self.window_area.items(): self.set_window_area(value, key) for zone in self.thermal_zones: zone.set_inner_wall_area() zone.set_volume_zone()
def generate_archetype(self): '''Generates an office building. With given values, this class generates a type building according to TEASER requirements. ''' #help area for the correct building area setting while using typeBldgs type_bldg_area = self.net_leased_area self.net_leased_area = 0.0 # create zones with their corresponding area, name and usage for key, value in self.zone_area_factors.items(): zone = ThermalZone(self) zone.area = type_bldg_area * value[0] zone.name = key use_cond = UseCond(zone) use_cond.load_use_conditions(value[1], data_class=self.parent.data) zone.use_conditions = use_cond zone.use_conditions.persons = zone.area * 0.01 * \ zone.use_conditions.persons zone.use_conditions.machines = zone.area * 0.01 * \ zone.use_conditions.machines # self.thermal_zones.append(zone) # statistical estimation of the facade self._est_outer_wall_area = self.est_factor_wall_area * \ type_bldg_area ** self.est_exponent_wall self._est_win_area = self.est_factor_win_area * \ type_bldg_area ** self.est_exponent_win self._est_roof_area = (type_bldg_area / self.number_of_floors) * \ self.gross_factor self._est_floor_area = (type_bldg_area / self.number_of_floors) * \ self.gross_factor # manipulation of wall according to facade design # (received from window_layout) self._est_facade_area = self._est_outer_wall_area + self._est_win_area if not self.window_layout == 0: self._est_outer_wall_area = self._est_facade_area * \ self.corr_factor_wall self._est_win_area = self._est_facade_area * self.corr_factor_win else: pass # set the facade area to the four orientations for key, value in self.outer_wall_names.items(): # North and South if value[1] == 0 or value[1] == 180: self.outer_area[value[1]] = self._est_outer_wall_area * \ (self._est_length / (2 * self._est_width + 2 * self._est_length)) # East and West elif value[1] == 90 or value[1] == 270: self.outer_area[value[1]] = self._est_outer_wall_area * \ (self._est_width / (2 * self._est_width + 2 * self._est_length)) for zone in self.thermal_zones: # create wall and set building elements outer_wall = OuterWall(zone) outer_wall.load_type_element( year=self.year_of_construction, construction=self.construction_type, data_class=self.parent.data) outer_wall.name = key outer_wall.tilt = value[0] outer_wall.orientation = value[1] for key, value in self.window_names.items(): if value[1] == 0 or value[1] == 180: self.window_area[value[1]] = self._est_win_area * \ (self._est_length / (2 * self._est_width + 2 * self._est_length)) elif value[1] == 90 or value[1] == 270: self.window_area[value[1]] = self._est_win_area * \ (self._est_width / (2 * self._est_width + 2 * self._est_length)) ''' There is no real classification for windows, so this is a bit hard code - will be fixed sometime. ''' for zone in self.thermal_zones: window = Window(zone) window.load_type_element(self.year_of_construction, "Kunststofffenster, Isolierverglasung", data_class=self.parent.data) window.name = key window.tilt = value[0] window.orientation = value[1] for key, value in self.roof_names.items(): self.outer_area[value[1]] = self._est_roof_area for zone in self.thermal_zones: roof = Rooftop(zone) roof.load_type_element( year=self.year_of_construction, construction=self.construction_type, data_class=self.parent.data) roof.name = key roof.tilt = value[0] roof.orientation = value[1] # zone.outer_walls.append(roof) for key, value in self.ground_floor_names.items(): self.outer_area[value[1]] = self._est_floor_area for zone in self.thermal_zones: ground_floor = GroundFloor(zone) ground_floor.load_type_element( year=self.year_of_construction, construction=self.construction_type, data_class=self.parent.data) ground_floor.name = key ground_floor.tilt = value[0] ground_floor.orientation = value[1] # zone.outer_walls.append(ground_floor) for key, value in self.inner_wall_names.items(): for zone in self.thermal_zones: inner_wall = InnerWall(zone) inner_wall.load_type_element( year=self.year_of_construction, construction=self.construction_type, data_class=self.parent.data) inner_wall.name = key inner_wall.tilt = value[0] inner_wall.orientation = value[1] # zone.inner_walls.append(inner_wall) if self.number_of_floors > 1: for key, value in self.ceiling_names.items(): for zone in self.thermal_zones: ceiling = Ceiling(zone) ceiling.load_type_element( year=self.year_of_construction, construction=self.construction_type, data_class=self.parent.data) ceiling.name = key ceiling.tilt = value[0] ceiling.orientation = value[1] # zone.inner_walls.append(ceiling) for key, value in self.floor_names.items(): for zone in self.thermal_zones: floor = Floor(zone) floor.load_type_element( year=self.year_of_construction, construction=self.construction_type, data_class=self.parent.data) floor.name = key floor.tilt = value[0] floor.orientation = value[1] # zone.inner_walls.append(floor) else: pass for key, value in self.outer_area.items(): self.set_outer_wall_area(value, key) for key, value in self.window_area.items(): self.set_window_area(value, key) for zone in self.thermal_zones: zone.set_inner_wall_area() zone.set_volume_zone()
def generate_archetype(self): """Generates a residential building. With given values, this class generates a type residential building according to TEASER requirements. """ # help area for the correct building area setting while using typeBldgs type_bldg_area = self.net_leased_area self.net_leased_area = 0.0 self._est_ground_floor_area = type_bldg_area / self.number_of_floors self._est_roof_area = type_bldg_area / self.number_of_floors self._est_win_area = self.est_factor_win_area * type_bldg_area * \ (1 - self._est_factor_neighbour / 4) self._est_outer_wall_area = (self.est_factor_facade_to_volume * type_bldg_area * self.height_of_floors - self._est_ground_floor_area - self._est_roof_area - self._est_win_area) *\ (1 - self._est_factor_neighbour / 4) for key, value in self.zone_area_factors.items(): zone = ThermalZone(self) zone.name = key zone.area = type_bldg_area * value[0] use_cond = UseCond(zone) use_cond.load_use_conditions(value[1]) zone.use_conditions = use_cond for key, value in self.outer_wall_names.items(): # North and South if value[1] == 0 or value[1] == 180.0: self.outer_area[value[1]] = self._est_outer_wall_area / \ self.nr_of_orientation # East and West elif value[1] == 90 or value[1] == 270: self.outer_area[value[1]] = self._est_outer_wall_area / \ self.nr_of_orientation for zone in self.thermal_zones: # create wall and set building elements outer_wall = OuterWall(zone) outer_wall.load_type_element(self.year_of_construction, self.construction_type) outer_wall.name = key outer_wall.tilt = value[0] outer_wall.orientation = value[1] for key, value in self.window_names.items(): if value[1] == 0 or value[1] == 180: self.window_area[value[1]] = self._est_win_area / \ self.nr_of_orientation elif value[1] == 90 or value[1] == 270: self.window_area[value[1]] = self._est_win_area / \ self.nr_of_orientation ''' There is no real classification for windows, so this is a bit hard code - will be fixed sometime ''' for zone in self.thermal_zones: window = Window(zone) window.load_type_element( self.year_of_construction, "Kunststofffenster, Isolierverglasung") window.name = key window.tilt = value[0] window.orientation = value[1] for key, value in self.roof_names.items(): self.outer_area[value[1]] = self._est_roof_area for zone in self.thermal_zones: roof = Rooftop(zone) roof.load_type_element(self.year_of_construction, self.construction_type) roof.name = key roof.tilt = value[0] roof.orientation = value[1] for key, value in self.ground_floor_names.items(): self.outer_area[value[1]] = self._est_ground_floor_area for zone in self.thermal_zones: ground_floor = GroundFloor(zone) ground_floor.load_type_element(self.year_of_construction, self.construction_type) ground_floor.name = key ground_floor.tilt = value[0] ground_floor.orientation = value[1] for key, value in self.inner_wall_names.items(): for zone in self.thermal_zones: inner_wall = InnerWall(zone) inner_wall.load_type_element(self.year_of_construction, self.construction_type) inner_wall.name = key inner_wall.tilt = value[0] inner_wall.orientation = value[1] # zone.inner_walls.append(inner_wall) if self.number_of_floors > 1: for key, value in self.ceiling_names.items(): for zone in self.thermal_zones: ceiling = Ceiling(zone) ceiling.load_type_element(self.year_of_construction, self.construction_type) ceiling.name = key ceiling.tilt = value[0] ceiling.orientation = value[1] # zone.inner_walls.append(ceiling) for key, value in self.floor_names.items(): for zone in self.thermal_zones: floor = Floor(zone) floor.load_type_element(self.year_of_construction, self.construction_type) floor.name = key floor.tilt = value[0] floor.orientation = value[1] # zone.inner_walls.append(floor) else: pass for key, value in self.outer_area.items(): self.set_outer_wall_area(value, key) for key, value in self.window_area.items(): self.set_window_area(value, key) for zone in self.thermal_zones: zone.set_inner_wall_area() zone.set_volume_zone()