-
Notifications
You must be signed in to change notification settings - Fork 1.1k
[BUGFIX] Inconsistent naming of cross_axis_tilt
/ cross_axis_slope
#2543
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
base: main
Are you sure you want to change the base?
Changes from all commits
96697f1
8eebd5f
0aa8836
01d5c0b
e72ca32
08bcde4
6f9da5e
3ca225e
c74127c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -44,6 +44,20 @@ There is a convention on consistent variable names throughout the library: | |||||||||||||||||||||||||||||
bhi | ||||||||||||||||||||||||||||||
Beam/direct horizontal irradiance | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
cross_axis_tilt | ||||||||||||||||||||||||||||||
Cross-axis tilt angle [°]. | ||||||||||||||||||||||||||||||
Consider two parallel rows of modules at different height; | ||||||||||||||||||||||||||||||
``cross_axis_tilt`` is the angle formed by the line formed by the | ||||||||||||||||||||||||||||||
intersection between the slope containing the tracker axes and a plane | ||||||||||||||||||||||||||||||
perpendicular to the tracker axes, and the horizontal plane. | ||||||||||||||||||||||||||||||
Cross-axis tilt is measured by using a right-handed convention. | ||||||||||||||||||||||||||||||
For example, trackers with axis azimuth of 180 degrees (heading south) | ||||||||||||||||||||||||||||||
will have a negative cross-axis tilt if the tracker axes plane slopes | ||||||||||||||||||||||||||||||
down to the east and positive cross-axis tilt if the tracker axes plane | ||||||||||||||||||||||||||||||
slopes up to the east. | ||||||||||||||||||||||||||||||
Use :func:`~pvlib.tracking.calc_cross_axis_tilt` to calculate | ||||||||||||||||||||||||||||||
``cross_axis_tilt`` | ||||||||||||||||||||||||||||||
Comment on lines
+53
to
+59
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just a few style suggestions, mostly my personal preference. Feel free to take them all, cherry pick a few, or reject them all.
Suggested change
|
||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
dhi | ||||||||||||||||||||||||||||||
Diffuse horizontal irradiance | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
|
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
|
@@ -7,6 +7,8 @@ | |||
import pandas as pd | ||||
from pvlib.tools import sind, cosd | ||||
|
||||
from pvlib._deprecation import renamed_kwarg_warning | ||||
|
||||
|
||||
def ground_angle(surface_tilt, gcr, slant_height): | ||||
""" | ||||
|
@@ -344,6 +346,12 @@ def projected_solar_zenith_angle(solar_zenith, solar_azimuth, | |||
return theta_T | ||||
|
||||
|
||||
@renamed_kwarg_warning( | ||||
since="0.13.1", | ||||
old_param_name="cross_axis_slope", | ||||
new_param_name="cross_axis_tilt", | ||||
removal="0.15.0", | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
We usually don't specify a removal version as there's not standard timeline for when minor versions come out. If we really wanted to specify a removal, I think this should be in the form of a date, e.g., There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I never thought of that, but looks a promising idea There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm interested in what @wholmgren thinks of this? |
||||
) | ||||
def shaded_fraction1d( | ||||
solar_zenith, | ||||
solar_azimuth, | ||||
|
@@ -354,7 +362,7 @@ def shaded_fraction1d( | |||
pitch, | ||||
axis_tilt=0, | ||||
surface_to_axis_offset=0, | ||||
cross_axis_slope=0, | ||||
cross_axis_tilt=0, | ||||
shading_row_rotation=None, | ||||
): | ||||
r""" | ||||
|
@@ -397,10 +405,10 @@ def shaded_fraction1d( | |||
surface_to_axis_offset : numeric, default 0 | ||||
Distance between the rotating axis and the collector surface. | ||||
May be used to account for a torque tube offset. | ||||
cross_axis_slope : numeric, default 0 | ||||
Angle of the plane containing the rows' axes from | ||||
cross_axis_tilt : numeric, default 0 | ||||
Angle of the plane containing the rows' axes relative to | ||||
horizontal. Right-handed rotation with respect to the rows axes. | ||||
In degrees :math:`^{\circ}`. | ||||
See :term:`cross_axis_tilt`. In degrees :math:`^{\circ}`. | ||||
shading_row_rotation : numeric, optional | ||||
Right-handed rotation of the row casting the shadow, with respect | ||||
to the row axis. In degrees :math:`^{\circ}`. | ||||
|
@@ -430,7 +438,7 @@ def shaded_fraction1d( | |||
+------------------+----------------------------+ | | ||||
| :math:`\theta_2` | ``shaded_row_rotation`` | Degrees | | ||||
+------------------+----------------------------+ :math:`^{\circ}` | | ||||
| :math:`\beta_c` | ``cross_axis_slope`` | | | ||||
| :math:`\beta_c` | ``cross_axis_tilt`` | | | ||||
+------------------+----------------------------+---------------------+ | ||||
| :math:`p` | ``pitch`` | Any consistent | | ||||
+------------------+----------------------------+ length unit across | | ||||
|
@@ -452,7 +460,7 @@ def shaded_fraction1d( | |||
>>> 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) | ||||
... surface_to_axis_offset=0.05, cross_axis_tilt=0) | ||||
0.47755694708090535 | ||||
|
||||
**Fixed-tilt north-facing array on sloped terrain** | ||||
|
@@ -466,7 +474,7 @@ def shaded_fraction1d( | |||
>>> 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) | ||||
... surface_to_axis_offset=0.05, cross_axis_tilt=0) | ||||
0.793244836197256 | ||||
|
||||
**N-S single-axis tracker on sloped terrain** | ||||
|
@@ -478,7 +486,7 @@ def shaded_fraction1d( | |||
|
||||
>>> 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) | ||||
... surface_to_axis_offset=0.10, cross_axis_tilt=7) | ||||
0.8242176864434579 | ||||
|
||||
Note the previous example only is valid for the shaded fraction of the | ||||
|
@@ -493,7 +501,7 @@ def shaded_fraction1d( | |||
|
||||
>>> 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) | ||||
... surface_to_axis_offset=0.10, cross_axis_tilt=7) | ||||
0.018002567182254348 | ||||
|
||||
You must switch the input/output depending on the | ||||
|
@@ -528,7 +536,7 @@ def shaded_fraction1d( | |||
# calculate repeated elements | ||||
thetas_1_S_diff = shading_row_rotation - projected_solar_zenith | ||||
thetas_2_S_diff = shaded_row_rotation - projected_solar_zenith | ||||
thetaS_rotation_diff = projected_solar_zenith - cross_axis_slope | ||||
thetaS_rotation_diff = projected_solar_zenith - cross_axis_tilt | ||||
|
||||
cos_theta_2_S_diff_abs = np.abs(cosd(thetas_2_S_diff)) | ||||
|
||||
|
@@ -548,7 +556,7 @@ def shaded_fraction1d( | |||
/ collector_width | ||||
* cosd(thetaS_rotation_diff) | ||||
/ cos_theta_2_S_diff_abs | ||||
/ cosd(cross_axis_slope) | ||||
/ cosd(cross_axis_tilt) | ||||
) | ||||
) | ||||
|
||||
|
@@ -660,7 +668,7 @@ def direct_martinez( | |||
>>> solar_zenith=80, solar_azimuth=180, | ||||
>>> axis_azimuth=90, shaded_row_rotation=25, | ||||
>>> collector_width=0.5, pitch=1, surface_to_axis_offset=0, | ||||
>>> cross_axis_slope=5.711, shading_row_rotation=50) | ||||
>>> cross_axis_tilt=5.711, shading_row_rotation=50) | ||||
>>> # calculation of the number of shaded blocks | ||||
>>> shaded_blocks = np.ceil(total_blocks*shaded_fraction) | ||||
>>> # apply the Martinez power losses to the calculated shading | ||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we should go for this syntax given the current style guide and the rest of the nomenclature page