- Notifications
You must be signed in to change notification settings - Fork 1.1k
Add gallery example for cross-axis slope backtracking #1077
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
13 commits Select commit Hold shift + click to select a range
f673ac5 Create plot_backtracking_sloped_terrain.py
kandersolar 64785ad Merge branch 'master' into cross_slope_example
kandersolar f84fb40 add angle convention images
kandersolar 0da0d0f whatsnew
kandersolar 6662505 Merge remote-tracking branch 'upstream/master' into cross_slope_example
kandersolar 9d24f61 Apply suggestions from code review
kandersolar 3b75bb3 new images
kandersolar fe20f01 Merge branch 'cross_slope_example' of https://github.com/kanderso-nre…
kandersolar e1b4650 reflow text for 80char limit
kandersolar 186232c text improvements
kandersolar 3320e19 truetrack -> true-track
kandersolar cbb8fd1 add comment per wholmgren's suggestion
kandersolar 5dd6d46 rename file
kandersolar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
add angle convention images
- Loading branch information
commit f84fb40b5c517e69023de5d5ffbf4dce1f08d72c
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
| | @@ -2,7 +2,7 @@ | |||||||
| Backtracking on sloped terrain | ||||||||
| ============================== | ||||||||
| | ||||||||
| Modeling backtracking for single-axis tracker arrays built on sloped terrain. | ||||||||
| Modeling backtracking for single-axis tracker arrays on sloped terrain. | ||||||||
| """ | ||||||||
| | ||||||||
| # %% | ||||||||
| | @@ -19,7 +19,59 @@ | |||||||
| # array geometry parameters and :py:func:`pvlib.tracking.singleaxis` to | ||||||||
| # calculate the backtracking angles. | ||||||||
| # | ||||||||
| # First, let's plot the simple case where the tracker axes are at right angles | ||||||||
| # Angle conventions | ||||||||
| # ----------------- | ||||||||
| # | ||||||||
| # First let's go over the sign conventions used for angles. In contrast to | ||||||||
| # fixed-tilt arrays, the convention for the azimuth angle of a single-axis | ||||||||
| # tracker array is along the tracker axis. Note that the axis azimuth is | ||||||||
kandersolar marked this conversation as resolved. Outdated Show resolved Hide resolved | ||||||||
| # a property of the array and is distinct from the azimuth of the panel | ||||||||
| # orientation, which changes based on tracker angle. | ||||||||
kandersolar marked this conversation as resolved. Outdated Show resolved Hide resolved | ||||||||
| # Because the tracker axis points in two directions, there are two choices for | ||||||||
| # the axis azimuth angle, and by convention (at least in the northern | ||||||||
| # hemisphere), the more southward angle is chosen: | ||||||||
| # | ||||||||
| # .. image:: ../_images/tracker_azimuth_angle_convention.png | ||||||||
cwhanse marked this conversation as resolved. Show resolved Hide resolved | ||||||||
| # :alt: Image showing the azimuth convention for single-axis tracker arrays. | ||||||||
| # :width: 500 | ||||||||
| # :align: center | ||||||||
| # | ||||||||
| # Note that, as with fixed-tilt arrays, the axis azimuth is determined as the | ||||||||
| # angle clockwise from north. | ||||||||
| # | ||||||||
| # Using the axis azimuth convention above, the sign convention for tracker | ||||||||
| # rotations is given by the | ||||||||
| # `right-hand rule <https://en.wikipedia.org/wiki/Right-hand_rule>`_. | ||||||||
| # Point the right hand thumb along the axis in the direction of the axis | ||||||||
| # azimuth and the fingers curl in the direction of positive rotation angle: | ||||||||
| # | ||||||||
| # .. image:: ../_images/tracker_rotation_angle_convention.png | ||||||||
cwhanse marked this conversation as resolved. Show resolved Hide resolved | ||||||||
| # :alt: Image showing the rotation sign convention for single-axis trackers. | ||||||||
| # :width: 500 | ||||||||
| # :align: center | ||||||||
| # | ||||||||
| # So for an array with ``axis_azimuth=180`` (tracker axis aligned perfectly | ||||||||
| # north-south), pointing the right-hand thumb along the axis azimuth has the | ||||||||
| # fingers curling towards the west, meaning rotations towards the west are | ||||||||
| # positive and rotations towards the east are negative. | ||||||||
| # | ||||||||
| # The sign convention for ground slope follows the same convention -- align | ||||||||
| # the right-hand thumb along the tracker axis in the direction of the axis | ||||||||
cwhanse marked this conversation as resolved. Show resolved Hide resolved | ||||||||
| # azimuth and the fingers curl towards positive angles. So in this example, | ||||||||
| # with the axis azimuth coming out of the page, an east-facing slope is a | ||||||||
| # negative rotation from horizontal: | ||||||||
kandersolar marked this conversation as resolved. Outdated Show resolved Hide resolved | ||||||||
| # | ||||||||
| # .. image:: ../_images/ground_slope_angle_convention.png | ||||||||
| # :alt: Image showing the ground slope sign convention. | ||||||||
| # :width: 500 | ||||||||
| # :align: center | ||||||||
| # | ||||||||
| | ||||||||
| # %% | ||||||||
| # Rotation curves | ||||||||
| # --------------- | ||||||||
| # | ||||||||
| # Now, let's plot the simple case where the tracker axes are at right angles | ||||||||
| # to the direction of the slope. In this case, the cross-axis tilt angle | ||||||||
| # is the same as the slope of the terrain and the tracker axis itself is | ||||||||
| # horizontal. | ||||||||
| | @@ -52,7 +104,7 @@ | |||||||
| cross_axis_tilt=cross_axis_tilt) | ||||||||
| | ||||||||
| backtracking_position = tracker_data['tracker_theta'].fillna(0) | ||||||||
| Member 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
| ||||||||
| label = r'$\beta_c$: {}°'.format(cross_axis_tilt) | ||||||||
| label = 'cross-axis tilt: {}°'.format(cross_axis_tilt) | ||||||||
| backtracking_position.plot(label=label, ax=ax) | ||||||||
| | ||||||||
| plt.legend() | ||||||||
| | @@ -64,11 +116,7 @@ | |||||||
| # For example, unlike the flat-terrain backtracking curve, the sloped-terrain | ||||||||
| # curves do not approach zero at the end of the day. Because of the vertical | ||||||||
| # offset between rows introduced by the sloped terrain, the trackers can be | ||||||||
| # slightly tilted without shading each other: | ||||||||
| # | ||||||||
| # TODO: RHR image | ||||||||
| # | ||||||||
| # TODO: talk about RHR | ||||||||
| # slightly tilted without shading each other. | ||||||||
| # | ||||||||
| # Now let's examine the general case where the terrain slope makes an | ||||||||
| # inconvenient angle to the tracker axes. For example, consider an array | ||||||||
| | @@ -87,10 +135,8 @@ | |||||||
| axis_tilt = tracking.calc_axis_tilt(slope_azimuth, slope_tilt, axis_azimuth) | ||||||||
| | ||||||||
| # calculate the cross-axis tilt: | ||||||||
| cross_axis_tilt = tracking.calc_cross_axis_tilt(slope_azimuth, | ||||||||
| slope_tilt, | ||||||||
| axis_azimuth, | ||||||||
| axis_tilt) | ||||||||
| cross_axis_tilt = tracking.calc_cross_axis_tilt(slope_azimuth, slope_tilt, | ||||||||
| axis_azimuth, axis_tilt) | ||||||||
| | ||||||||
| print('Axis tilt:', '{:0.01f}°'.format(axis_tilt)) | ||||||||
| print('Cross-axis tilt:', '{:0.01f}°'.format(cross_axis_tilt)) | ||||||||
| | ||||||||
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
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.
This reads like a module docstring but renders as regular text, so I think the rendered introduction is awkward.
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.
Agreed it's awkward in the rendered page. The reason for the strange wording is the docstring-style line is also used as the hover text for the thumbnail in the gallery listing, which has to be brief. Open to suggestions for text that works better in both contexts!
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.
Sounds like a gallery configuration problem. Let's ignore.