Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix examples of shaded_fraction1d #2215

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions pvlib/shading.py
Original file line number Diff line number Diff line change
Expand Up @@ -449,11 +449,11 @@ def shaded_fraction1d(
Tilted row with a pitch of 3 m, a collector width of
2 m, and row rotations of 30°. In the morning.

>>> shaded_fraction1d(solar_zenith=80, solar_azimuth=104.5,
>>> shaded_fraction1d(solar_zenith=80, solar_azimuth=135,
... axis_azimuth=90, shaded_row_rotation=30, shading_row_rotation=30,
... collector_width=2, pitch=3, axis_tilt=0,
... surface_to_axis_offset=0.05, cross_axis_slope=0)
0.6827437712114521
0.47755694708090535

**Fixed-tilt north-facing array on sloped terrain**

Expand All @@ -463,11 +463,11 @@ def shaded_fraction1d(
10° slope, where their axis is on the most inclined
direction (zero cross-axis slope). Shaded in the morning.

>>> shaded_fraction1d(solar_zenith=65, solar_azimuth=75.5,
>>> shaded_fraction1d(solar_zenith=80, solar_azimuth=75.5,
... axis_azimuth=270, shaded_row_rotation=50, shading_row_rotation=30,
... collector_width=2.5, pitch=4, axis_tilt=10,
... surface_to_axis_offset=0.05, cross_axis_slope=0)
0.6975923460352351
0.793244836197256

**N-S single-axis tracker on sloped terrain**

Expand All @@ -476,10 +476,10 @@ def shaded_fraction1d(
in the morning. Terrain slope is 7° west-east (east-most
tracker is higher than the west-most tracker).

>>> shaded_fraction1d(solar_zenith=50, solar_azimuth=90, axis_azimuth=180,
>>> shaded_fraction1d(solar_zenith=80, solar_azimuth=90, axis_azimuth=180,
... shaded_row_rotation=-30, collector_width=1.4, pitch=3, axis_tilt=0,
... surface_to_axis_offset=0.10, cross_axis_slope=7)
0.5828961460616938
0.8242176864434579

Note the previous example only is valid for the shaded fraction of the
west-most tracker in the morning, and assuming it is the
Expand All @@ -491,10 +491,10 @@ def shaded_fraction1d(
tracker, you must input the corresponding ``shaded_row_rotation``
in the afternoon.

>>> shaded_fraction1d(solar_zenith=50, solar_azimuth=270, axis_azimuth=180,
>>> shaded_fraction1d(solar_zenith=80, solar_azimuth=270, axis_azimuth=180,
... shaded_row_rotation=30, collector_width=1.4, pitch=3, axis_tilt=0,
... surface_to_axis_offset=0.10, cross_axis_slope=7)
0.4399034444363955
0.018002567182254348

You must switch the input/output depending on the
sign of the projected solar zenith angle. See
Expand Down
Loading