-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Projected zenith convenience function #1904
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
Changes from 29 commits
1e412ce
e4a95a3
54878db
b79ebe6
c3c0e56
5d4a2b4
9ae5fa3
f17379d
af3d27c
d36841a
19995e1
770e037
29bcef9
61c2e3b
935cfd4
965b0b4
346d060
085d017
79b5f4f
dc1035a
88cbfc0
1afec94
4b2c0e5
4612442
6372cb7
3c9392b
93998d8
337f7f1
0923109
6955f71
939b241
b0d6f66
3df2e71
428852c
64c97c7
aed85a3
5d37fb3
38c2d4d
23aaa2a
2c0fa51
5b49706
1a68390
58d853f
2ba4cf7
8325c37
f2fcc88
069688e
c249224
f6c245f
b52f51d
96ce603
ff42463
1c28e7f
cd346e9
796c7a9
761750c
2be29f2
8beef55
5e2be60
3c5308b
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 |
---|---|---|
|
@@ -232,3 +232,84 @@ def sky_diffuse_passias(masking_angle): | |
Available at https://www.nrel.gov/docs/fy18osti/67399.pdf | ||
""" | ||
return 1 - cosd(masking_angle/2)**2 | ||
|
||
|
||
def projected_solar_zenith_angle(axis_tilt, axis_azimuth, | ||
solar_zenith, solar_azimuth): | ||
r""" | ||
Calculate projected solar zenith angle in degrees. | ||
echedey-ls marked this conversation as resolved.
Show resolved
Hide resolved
|
||
This is the solar zenith angle projected onto the tracker rotation plane or | ||
the plane defined by its normal vector and the azimuth. | ||
echedey-ls marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
Computing said value is common in track and shadow algorithms. | ||
See [1]_ [2]_ [3]_. | ||
echedey-ls marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
Parameters | ||
---------- | ||
axis_tilt : numeric | ||
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. For a general purpose function, would 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. There's a comment up there from @kandersolar asking for changes from I'll request reviews for the current reviewers hoping they also give some insight regarding this. Anyway, if you are sure of it, I change it without no problems. 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. Is the issue that I'm inclined (pun intended) to keep the term Perhaps a good compromise is to clarify that point in the parameter description/Notes? 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 feel like these two terms refer to pure maths, and mapping those words to concise real-world systems is a bit counter-productive due to the variability. Is there some generic -maths- term we can use for a general description of this, a projection? Like Just to weight in some more options outside of the current frame:
I don't dislike this possibility if we don't agree on anything else eventually, but we are overcomplicating the docs IMHO. BTW, I'm +1 for the 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 admit to suffering from tunnel vision for trackers, but in my view How about:
Similar for
|
||
Axis tilt angle in degrees. From horizontal plane to array plane. | ||
axis_azimuth : numeric | ||
Axis azimuth angle in degrees. | ||
North = 0°; East = 90°; South = 180°; West = 270° | ||
solar_zenith : numeric | ||
Sun's apparent zenith in degrees. | ||
solar_azimuth : numeric | ||
Sun's azimuth in degrees. | ||
|
||
Returns | ||
------- | ||
Projected_solar_zenith : numeric | ||
In degrees. | ||
|
||
References | ||
---------- | ||
.. [1] K. Anderson and M. Mikofski, 'Slope-Aware Backtracking for | ||
Single-Axis Trackers', National Renewable Energy Lab. (NREL), Golden, | ||
CO (United States); Det Norske Veritas Group, Oslo (Norway), | ||
NREL/TP-5K00-76626, Jul. 2020. :doi:`10.2172/1660126`. | ||
echedey-ls marked this conversation as resolved.
Show resolved
Hide resolved
|
||
.. [2] W. F. Marion and A. P. Dobos, 'Rotation Angle for the Optimum | ||
Tracking of One-Axis Trackers', National Renewable Energy Lab. (NREL), | ||
Golden, CO (United States), NREL/TP-6A20-58891, Jul. 2013. | ||
:doi:`10.2172/1089596`. | ||
.. [3] E. Lorenzo, L. Narvarte, and J. Muñoz, 'Tracking and back-tracking', | ||
Progress in Photovoltaics: Research and Applications, vol. 19, no. 6, | ||
pp. 747-753, 2011, :doi:`10.1002/pip.1085`. | ||
echedey-ls marked this conversation as resolved.
Show resolved
Hide resolved
|
||
""" | ||
# Assume the tracker reference frame is right-handed. Positive y-axis is | ||
# oriented along tracking axis; from north, the y-axis is rotated clockwise | ||
# by the axis azimuth and tilted from horizontal by the axis tilt. The | ||
# positive x-axis is 90 deg clockwise from the y-axis and parallel to | ||
# horizontal (e.g., if the y-axis is south, the x-axis is west); the | ||
# positive z-axis is normal to the x and y axes, pointed upward. | ||
|
||
# Since elevation = 90 - zenith, sin(90-x) = cos(x) & cos(90-x) = sin(x): | ||
# Notation from [1], modified to use zenith instead of elevation | ||
# cos(elevation) = sin(zenith) and sin(elevation) = cos(zenith) | ||
# Avoid recalculating these values | ||
sind_solar_zenith = sind(solar_zenith) | ||
cosd_axis_azimuth = cosd(axis_azimuth) | ||
sind_axis_azimuth = sind(axis_azimuth) | ||
sind_axis_tilt = sind(axis_tilt) | ||
|
||
# Sun's x, y, z coords | ||
sx = sind_solar_zenith * sind(solar_azimuth) | ||
sy = sind_solar_zenith * cosd(solar_azimuth) | ||
sz = cosd(solar_zenith) | ||
# Eq. (4); sx', sz' values from sun coordinates projected onto surface | ||
sx_prime = sx * cosd_axis_azimuth - sy * sind_axis_azimuth | ||
sz_prime = ( | ||
sx * sind_axis_azimuth * sind_axis_tilt | ||
+ sy * sind_axis_tilt * cosd_axis_azimuth | ||
+ sz * cosd(axis_tilt) | ||
) | ||
# The ideal tracking angle wid is the rotation to place the sun position | ||
# vector (xp, yp, zp) in the (x, z) plane, which is normal to the panel and | ||
# contains the axis of rotation. wid = 0 indicates that the panel is | ||
# horizontal. Here, our convention is that a clockwise rotation is | ||
# positive, to view rotation angles in the same frame of reference as | ||
# azimuth. For example, for a system with tracking axis oriented south, a | ||
# rotation toward the east is negative, and a rotation to the west is | ||
# positive. This is a right-handed rotation around the tracker y-axis. | ||
# Eq. (5); angle between sun's beam and surface | ||
echedey-ls marked this conversation as resolved.
Show resolved
Hide resolved
|
||
theta_T = np.degrees(np.arctan2(sx_prime, sz_prime)) | ||
return theta_T |
Uh oh!
There was an error while loading. Please reload this page.