Skip to content

set_wwr() using wwr_map does not work correctly #294

@AGeissler

Description

@AGeissler

Trying to add two windows to a simple block using idf.set_wwr(wwr=0, wwr_map={180: 0.3, 270: 0.3}) only adds one window in the 180° surface. Changing lines 161 ff. in recipes.py seems to fix this.

old code:

        if not wwr:
            return
        coords = window_vertices_given_wall(wall, wwr)
        window = idf.newidfobject(
            "FENESTRATIONSURFACE:DETAILED",
            Name="%s window" % wall.Name,
            Surface_Type="Window",
            Construction_Name=construction or "",
            Building_Surface_Name=wall.Name,
            View_Factor_to_Ground="autocalculate",  # from the surface angle
        )
        window.setcoords(coords, ggr)

new code:

        if wwr:
            coords = window_vertices_given_wall(wall, wwr)
            window = idf.newidfobject(
                "FENESTRATIONSURFACE:DETAILED",
                Name="%s window" % wall.Name,
                Surface_Type="Window",
                Construction_Name=construction or "",
                Building_Surface_Name=wall.Name,
                View_Factor_to_Ground="autocalculate",  # from the surface angle
            )
            window.setcoords(coords, ggr)

I.e. not returning as soon as a non-referenced wall is hit.

Maybe this could be included in the code? I haven't done excessive tests, however, the change seems logical based on the code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions