예제 #1
0
    def test_match_idf_surfaces(self, base_idf):
        # type: (IDF) -> None
        idf = base_idf
        intersect_idf_surfaces(idf)
        match_idf_surfaces(idf)
        inside_walls = [
            obj
            for obj in idf.idfobjects["BUILDINGSURFACE:DETAILED"]
            if obj.Outside_Boundary_Condition == "surface"
        ]
        assert inside_walls
        for w in inside_walls:
            assert w.Outside_Boundary_Condition_Object != ""

        outside_walls = [
            obj
            for obj in idf.idfobjects["BUILDINGSURFACE:DETAILED"]
            if obj.Outside_Boundary_Condition == "outdoors"
        ]
        assert outside_walls
        for w in outside_walls:
            assert w.Outside_Boundary_Condition_Object == ""

        floors = idf.getsurfaces("floor")
        assert floors
        for f in floors:
            assert f.Outside_Boundary_Condition == "ground"
            assert f.Outside_Boundary_Condition_Object == ""
예제 #2
0
 def test_set_wwr(self, base_idf):
     # type: () -> None
     idf = base_idf
     intersect_idf_surfaces(idf)
     match_idf_surfaces(idf)
     wwr = 0.25
     set_wwr(idf, wwr)
     windows = idf.idfobjects['FENESTRATIONSURFACE:DETAILED']
     assert len(windows) == 8
     for window in windows:
         wall = idf.getobject('BUILDINGSURFACE:DETAILED',
                              window.Building_Surface_Name)
         assert almostequal(window.area, wall.area * wwr, 3)
예제 #3
0
    def test_intersect_idf_surfaces(self):
        # type: () -> None
        idf = self.idf
        starting = len(idf.idfobjects['BUILDINGSURFACE:DETAILED'])
        intersect_idf_surfaces(idf)
        ending = len(idf.idfobjects['BUILDINGSURFACE:DETAILED'])
        assert starting == 12
        assert ending == 14

        for name in [
                'z1_WALL_0002_1', 'z1_WALL_0002_2', 'z2_WALL_0004_1',
                'z2_WALL_0004_2'
        ]:
            obj = idf.getobject('BUILDINGSURFACE:DETAILED', name)
            assert obj
예제 #4
0
 def test_intersect_idf_surfaces(self):
     # type: () -> None
     idf = self.idf
     starting = len(idf.idfobjects['BUILDINGSURFACE:DETAILED'])
     intersect_idf_surfaces(idf)
     idf.set_default_constructions()
     ending = len(idf.idfobjects['BUILDINGSURFACE:DETAILED'])
     assert starting == 12
     assert ending == 14
     for name in [
             'z1 Roof 0001_1', 'z1 Roof 0001_2', 'z1 Roof 0001_3',
             'z2 Floor 0001_1'
     ]:
         obj = idf.getobject('BUILDINGSURFACE:DETAILED', name)
         assert obj
예제 #5
0
    def test_intersect_idf_surfaces(self, base_idf):
        # type: (IDF) -> None
        idf = base_idf
        starting = len(idf.idfobjects["BUILDINGSURFACE:DETAILED"])
        intersect_idf_surfaces(idf)
        ending = len(idf.idfobjects["BUILDINGSURFACE:DETAILED"])
        assert starting == 12
        assert ending == 14

        for name in [
            "z1_WALL_0002_1",
            "z1_WALL_0002_2",
            "z2_WALL_0004_1",
            "z2_WALL_0004_2",
        ]:
            obj = idf.getobject("BUILDINGSURFACE:DETAILED", name)
            assert obj
예제 #6
0
 def test_intersect_idf_surfaces(self, ring_idf):
     # type: (IDF) -> None
     idf = ring_idf
     starting = len(idf.idfobjects["BUILDINGSURFACE:DETAILED"])
     intersect_idf_surfaces(idf)
     idf.set_default_constructions()
     ending = len(idf.idfobjects["BUILDINGSURFACE:DETAILED"])
     assert starting == 12
     assert ending == 14
     for name in [
         "z1 Roof 0001_1",
         "z1 Roof 0001_2",
         "z1 Roof 0001_3",
         "z2 Floor 0001_1",
     ]:
         obj = idf.getobject("BUILDINGSURFACE:DETAILED", name)
         assert obj
예제 #7
0
    def test_match_idf_surfaces(self):
        # type: () -> None
        idf = self.idf
        intersect_idf_surfaces(idf)
        match_idf_surfaces(idf)
        inside_wall = idf.getobject('BUILDINGSURFACE:DETAILED',
                                    'z1_WALL_0002_1')
        assert inside_wall.Outside_Boundary_Condition == 'surface'
        assert inside_wall.Outside_Boundary_Condition_Object == 'z2_WALL_0004_1'

        outside_wall = idf.getobject('BUILDINGSURFACE:DETAILED',
                                     'z1_WALL_0002_2')
        assert outside_wall.Outside_Boundary_Condition == 'outdoors'
        assert outside_wall.Outside_Boundary_Condition_Object == ''

        ground = idf.getobject('BUILDINGSURFACE:DETAILED', 'z1_FLOOR')
        assert ground.Outside_Boundary_Condition == 'ground'
        assert ground.Outside_Boundary_Condition_Object == ''