Skip to content

bifacial.utils.vf_ground_sky_2d interprets max_rows asymmetrically #1867

@kandersolar

Description

@kandersolar
Member

Describe the bug
vf_ground_sky_2d considers one fewer sky wedge on the right side of the central wedge than it does on the left side.

To Reproduce
I added a line print(next_edge) after here:

np.clip(next_edge, a_min=0., a_max=None, out=next_edge)

Then I ran _ = vf_ground_sky_2d(surface_tilt=0, gcr=0.5, x=0.5, pitch=1, height=1, max_rows=3) and got the printed text: [[[0.01598559 0.04556841 0.18086881 0.48507125 0.18086881 0.04556841]]].

Each value in that output describes the VF of a visible sky wedge. The inputs describe a symmetrical system, so the VFs should be symmetrical too, and they are, except one of them is missing... 0.485 for the wedge directly overhead, with three wedges to the left but only two to the right.

Expected behavior
I want the number of sky wedges considered in each direction to be equal.

Maybe this is a fencepost problem, and really what I want is effectively a max_wedges parameter instead of max_rows?

Activity

pasquierjb

pasquierjb commented on Oct 17, 2023

@pasquierjb

k goes from -max_rows to max_rows+1 so the symmetry is for x=0 which is indeed problematic if you intergrate betwen 0 and 1 for a small max_rows. However as max_rows is set to be high enough to neglect the horizon VF, not sure it will change a lot the results.

download (7)

Sar-thak-3

Sar-thak-3 commented on Jan 7, 2024

@Sar-thak-3

Hi @kandersolar, is this issue still open? I would love to contribute to this issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @pasquierjb@kandersolar@Sar-thak-3

        Issue actions

          `bifacial.utils.vf_ground_sky_2d` interprets `max_rows` asymmetrically · Issue #1867 · pvlib/pvlib-python