Skip to content

Commit e785292

Browse files
tracker -> row, param names, code and docs
Co-Authored-By: Kevin Anderson <[email protected]>
1 parent 6303583 commit e785292

File tree

2 files changed

+35
-33
lines changed

2 files changed

+35
-33
lines changed

pvlib/shading.py

Lines changed: 32 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -348,26 +348,26 @@ def shaded_fraction1d(
348348
solar_zenith,
349349
solar_azimuth,
350350
axis_azimuth,
351-
shaded_tracker_rotation,
351+
shaded_row_rotation,
352352
*,
353353
collector_width,
354354
pitch,
355355
axis_tilt=0,
356356
surface_to_axis_offset=0,
357357
cross_axis_slope=0,
358-
shading_tracker_rotation=None,
358+
shading_row_rotation=None,
359359
):
360360
r"""
361361
Shaded fraction in the vertical dimension of tilted rows, or perpendicular
362362
to the axis of horizontal rows.
363363
364-
If ``shading_tracker_rotation`` isn't provided, assumes both the shaded
364+
If ``shading_row_rotation`` isn't provided, assumes both the shaded
365365
row and the one blocking the direct beam
366366
share the same rotation and azimuth values.
367367
368368
.. warning::
369-
This function assumes the roles of the shaded and shading trackers are
370-
the same during all the day. If the trackers allow for different
369+
This function assumes the roles of the shaded and shading rows are
370+
the same during all the day. If the rows allow for different
371371
shading or shaded roles, e.g. a N-S single-axis tracker, you must
372372
switch the inputs depending on the sign of the projected solar zenith
373373
angle. See the Examples section below.
@@ -382,14 +382,16 @@ def shaded_fraction1d(
382382
Solar position azimuth, in degrees.
383383
axis_azimuth : numeric
384384
In degrees. North=0º, South=180º, East=90º, West=270º.
385-
shaded_tracker_rotation : numeric
386-
Right-handed rotation of the tracker receiving the shade, with respect
385+
This is the rotation axis of a tracker. Consider fixed-tilt arrays as
386+
a particular case of a tracker.
387+
shaded_row_rotation : numeric
388+
Right-handed rotation of the row receiving the shade, with respect
387389
to ``axis_azimuth``. In degrees :math:`^{\circ}`.
388390
collector_width : numeric
389-
Vertical length of a tilted tracker. The returned ``shaded_fraction``
391+
Vertical length of a tilted row. The returned ``shaded_fraction``
390392
is the ratio of the shadow over this value.
391393
pitch : numeric
392-
Axis-to-axis horizontal spacing of the trackers.
394+
Axis-to-axis horizontal spacing of the row.
393395
axis_tilt : numeric, default 0
394396
Tilt of the rows axis from horizontal. In degrees :math:`^{\circ}`.
395397
surface_to_axis_offset : numeric, default 0
@@ -398,8 +400,8 @@ def shaded_fraction1d(
398400
Angle of the plane containing the rows' axes from
399401
horizontal. Right-handed rotation with respect to ``axis_azimuth``.
400402
In degrees :math:`^{\circ}`.
401-
shading_tracker_rotation : numeric, optional
402-
Right-handed rotation of the tracker casting the shadow, with respect
403+
shading_row_rotation : numeric, optional
404+
Right-handed rotation of the row casting the shadow, with respect
403405
to ``axis_azimuth``. In degrees :math:`^{\circ}`.
404406
405407
Returns
@@ -416,17 +418,17 @@ def shaded_fraction1d(
416418
Parameters are defined as follow:
417419
418420
.. figure:: ../../_images/Anderson_Jensen_2024_Fig3.png
419-
:alt: Diagram showing the two trackers and the parameters of the model.
421+
:alt: Diagram showing the two rows and the parameters of the model.
420422
421423
Figure 3 of [1]_. See correspondence between this nomenclature and the
422424
function parameters in the table below.
423425
424426
+------------------+----------------------------+---------------------+
425427
| Symbol | Parameter | Units |
426428
+==================+============================+=====================+
427-
| :math:`\theta_1` |``shading_tracker_rotation``| |
429+
| :math:`\theta_1` | ``shading_row_rotation`` | |
428430
+------------------+----------------------------+ |
429-
| :math:`\theta_2` | ``shaded_tracker_rotation``| Degrees |
431+
| :math:`\theta_2` | ``shaded_row_rotation`` | Degrees |
430432
+------------------+----------------------------+ :math:`^{\circ}` |
431433
| :math:`\beta_c` | ``cross_axis_slope`` | |
432434
+------------------+----------------------------+---------------------+
@@ -448,9 +450,9 @@ def shaded_fraction1d(
448450
:math:`2m`, and row rotations of :math:`30^{\circ}`. In the morning.
449451
450452
>>> shaded_fraction1d(solar_zenith=80, solar_azimuth=104.5,
451-
... axis_azimuth=90, shaded_tracker_rotation=30,
452-
... shading_tracker_rotation=30, collector_width=2, pitch=3,
453-
... axis_tilt=0, surface_to_axis_offset=0.05, cross_axis_slope=0)
453+
... axis_azimuth=90, shaded_row_rotation=30, shading_row_rotation=30,
454+
... collector_width=2, pitch=3, axis_tilt=0,
455+
... surface_to_axis_offset=0.05, cross_axis_slope=0)
454456
0.6827437712114521
455457
456458
**Fixed-tilt north-facing array on sloped terrain**
@@ -462,9 +464,9 @@ def shaded_fraction1d(
462464
direction (zero cross-axis slope). Shaded in the morning.
463465
464466
>>> shaded_fraction1d(solar_zenith=65, solar_azimuth=75.5,
465-
... axis_azimuth=270, shaded_tracker_rotation=50,
466-
... shading_tracker_rotation=30, collector_width=2.5, pitch=4,
467-
... axis_tilt=10, surface_to_axis_offset=0.05, cross_axis_slope=0)
467+
... axis_azimuth=270, shaded_row_rotation=50, shading_row_rotation=30,
468+
... collector_width=2.5, pitch=4, axis_tilt=10,
469+
... surface_to_axis_offset=0.05, cross_axis_slope=0)
468470
0.6975923460352351
469471
470472
**N-S single-axis tracker on sloped terrain**
@@ -475,8 +477,8 @@ def shaded_fraction1d(
475477
tracker is higher than the west-most tracker).
476478
477479
>>> shaded_fraction1d(solar_zenith=50, solar_azimuth=90, axis_azimuth=180,
478-
... shaded_tracker_rotation=-30, collector_width=1.4, pitch=3,
479-
... axis_tilt=0, surface_to_axis_offset=0.10, cross_axis_slope=7)
480+
... shaded_row_rotation=-30, collector_width=1.4, pitch=3, axis_tilt=0,
481+
... surface_to_axis_offset=0.10, cross_axis_slope=7)
480482
0.5828961460616938
481483
482484
Note the previous example only is valid for the shaded fraction of the
@@ -486,12 +488,12 @@ def shaded_fraction1d(
486488
east-most tracker.
487489
488490
To calculate the shaded fraction for the east-most
489-
tracker, you must input the corresponding ``shaded_tracker_rotation``
491+
tracker, you must input the corresponding ``shaded_row_rotation``
490492
in the afternoon.
491493
492494
>>> shaded_fraction1d(solar_zenith=50, solar_azimuth=270, axis_azimuth=180,
493-
... shaded_tracker_rotation=30, collector_width=1.4, pitch=1,
494-
... axis_tilt=0, surface_to_axis_offset=0.10, cross_axis_slope=7)
495+
... shaded_row_rotation=30, collector_width=1.4, pitch=3, axis_tilt=0,
496+
... surface_to_axis_offset=0.10, cross_axis_slope=7)
495497
0.4399034444363955
496498
497499
You must switch the input/output depending on the
@@ -511,9 +513,9 @@ def shaded_fraction1d(
511513
"""
512514
# For nomenclature you may refer to [1].
513515

514-
# rotation of tracker casting the shadow defaults to shaded tracker's one
515-
if shading_tracker_rotation is None:
516-
shading_tracker_rotation = shaded_tracker_rotation
516+
# rotation of row casting the shadow defaults to shaded row's one
517+
if shading_row_rotation is None:
518+
shading_row_rotation = shaded_row_rotation
517519

518520
# projected solar zenith angle
519521
projected_solar_zenith = projected_solar_zenith_angle(
@@ -524,8 +526,8 @@ def shaded_fraction1d(
524526
)
525527

526528
# calculate repeated elements
527-
thetas_1_S_diff = shading_tracker_rotation - projected_solar_zenith
528-
thetas_2_S_diff = shaded_tracker_rotation - projected_solar_zenith
529+
thetas_1_S_diff = shading_row_rotation - projected_solar_zenith
530+
thetas_2_S_diff = shaded_row_rotation - projected_solar_zenith
529531
thetaS_rotation_diff = projected_solar_zenith - cross_axis_slope
530532

531533
cos_theta_2_S_diff_abs = np.abs(cosd(thetas_2_S_diff))

pvlib/tests/test_shading.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ def sf1d_premises_and_expected():
263263
/ (test_data["x_L"] - test_data["x_R"])
264264
)
265265
test_data["pitch"] = test_data["x_L"] - test_data["x_R"]
266-
# switch Left/Right trackers if needed to make the right one the shaded
266+
# switch Left/Right rows if needed to make the right one the shaded
267267
where_switch = test_data["theta_s"] >= 0
268268
test_data["theta_L"], test_data["theta_R"] = np.where(
269269
where_switch,
@@ -272,8 +272,8 @@ def sf1d_premises_and_expected():
272272
)
273273
test_data.rename(
274274
columns={
275-
"theta_L": "shading_tracker_rotation",
276-
"theta_R": "shaded_tracker_rotation",
275+
"theta_L": "shading_row_rotation",
276+
"theta_R": "shaded_row_rotation",
277277
"z_0": "surface_to_axis_offset",
278278
"l": "collector_width",
279279
"theta_s": "solar_zenith", # for the projected solar zenith angle

0 commit comments

Comments
 (0)