pvlib / twoaxistracking

twoaxistracking is a python package for simulating two-axis tracking solar collectors, particularly self-shading.
http://twoaxistracking.rtfd.io/
BSD 3-Clause "New" or "Revised" License
7 stars 3 forks source link

Calculate Z array and account for tracker height in shading #7

Closed AdamRJensen closed 2 years ago

AdamRJensen commented 2 years ago

This PR adds capabilities for the functions to take into account a field tilt.

Closes #4

Adds the two arguments

slope_azimuth : float
    Direction of normal to slope on horizontal [degrees]
slope_tilt : float
    Tilt of slope relative to horizontal [degrees]

to the generate_field_layout function, which now also returns a Z array, with the relative heights of the neighboring collectors relative to the reference collector.

The Z array is then passed on to the two_axis_shading_fraction function, which has been modified to take into account the difference in tracker heights. Specifically, the equation for the y0 shadow projection coordinate has been modified from:

CodeCogsEqn

to

CodeCogsEqn (3) where the relative_slope is the slope of the neighboring collector relative to the reference collector. The relative_slope is positive if the neighboring collector is higher (positive z-values) than the reference collector.

The below equations were previously suggested although incorrect: CodeCogsEqn (1) and CodeCogsEqn (2)

AdamRJensen commented 2 years ago

When accounting for a slope, it is necessary to also account for the horizon shading caused by the slope (hill):

The horizon angle can be calculated by: CodeCogsEqn (4)

The correct shading chart will then look like this: