added a post-process in idf to erase windows associated to adiabatic walls
This commit is contained in:
parent
17d4f3d8bc
commit
49b4ce5ef2
|
@ -32,7 +32,7 @@ class Idf:
|
|||
_MATERIAL_NOMASS = 'MATERIAL:NOMASS'
|
||||
_MATERIAL_ROOFVEGETATION = 'MATERIAL:ROOFVEGETATION'
|
||||
|
||||
_WINDOW = 'WINDOW'
|
||||
_WINDOW = 'FENESTRATIONSURFACE:DETAILED'
|
||||
_WINDOW_MATERIAL_SIMPLE = 'WINDOWMATERIAL:SIMPLEGLAZINGSYSTEM'
|
||||
_ROUGHNESS = 'MediumRough'
|
||||
_INFILTRATION = 'ZONEINFILTRATION:DESIGNFLOWRATE'
|
||||
|
@ -100,7 +100,6 @@ class Idf:
|
|||
self._adjacent_buildings = []
|
||||
self._export()
|
||||
|
||||
|
||||
@staticmethod
|
||||
def _matrix_to_list(points, lower_corner):
|
||||
lower_x = lower_corner[0]
|
||||
|
@ -428,6 +427,19 @@ class Idf:
|
|||
except IndexError:
|
||||
# seems to be a bug from geomeppy when surfaces cannot be intersected
|
||||
pass
|
||||
|
||||
# post-process to erase windows associated to adiabatic walls
|
||||
windows_list = []
|
||||
for window in self._idf.idfobjects[self._WINDOW]:
|
||||
found = False
|
||||
for surface in self._idf.idfobjects[self._SURFACE]:
|
||||
if window.Building_Surface_Name == surface.Name:
|
||||
found = True
|
||||
if not found:
|
||||
windows_list.append(window)
|
||||
for window in windows_list:
|
||||
self._idf.removeidfobject(window)
|
||||
|
||||
self._idf.saveas(str(self._output_file))
|
||||
return self._idf
|
||||
|
||||
|
|
|
@ -64,7 +64,7 @@ class GPandas:
|
|||
trimesh.repair.fill_holes(building_mesh)
|
||||
trimesh.repair.fix_winding(building_mesh)
|
||||
year_of_construction = int(bldg['year_built'])
|
||||
name = str(scene_index)
|
||||
name = bldg['name']
|
||||
lod = 1
|
||||
if year_of_construction > 2000:
|
||||
function = cte.RESIDENTIAL
|
||||
|
|
|
@ -65,9 +65,6 @@ class CityLayerTest(TestCase):
|
|||
city = GeometryFactory('gpandas', data_frame=buildings_df).city
|
||||
ConstructionFactory('nrel', city).enrich()
|
||||
UsageFactory('comnet', city).enrich()
|
||||
print(target_buildings, adjacent_buildings)
|
||||
for building in city.buildings:
|
||||
print(building.name)
|
||||
EnergyBuildingsExportsFactory('idf', city, output_path, target_buildings=target_buildings,
|
||||
adjacent_buildings=adjacent_buildings).export_debug()
|
||||
filepath = os.path.join(output_path, city.name + ".idf")
|
||||
|
|
Loading…
Reference in New Issue
Block a user