-
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 34 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,76 @@ 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 solar zenith angle is projected onto the plane whose normal vector is | ||||||
defined by ``axis_tilt`` and ``axis_azimuth``. The normal vector is in the | ||||||
direction of ``axis_azimuth`` (clockwise from north) and tilted from | ||||||
horizontal by ``axis_tilt``. See Figure 5 in [1]_: | ||||||
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. Does that mean the axis of tracker rotation is the surface normal vector we're talking about? 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. From Figure 5 caption:
I'm pretty sure it is. Do you think this line of text is worth to be added to the current caption? I didn't want to copy-paste the paper content. 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. How about:
Suggested change
That puts a picture in my mind! 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. That's more focused on tangible parts, I like it. Nonetheless, I'm a bit hesitant to change that since there is ongoing discussion regarding the tracking or fixed support nomenclature. And that suggests SAT. 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. No worries, I wasn't actually expecting this wording to be adopted. :) |
||||||
|
||||||
.. figure:: ../../_images/Anderson_Mikofski_2020_Fig5.jpg | ||||||
:alt: Wire diagram of coordinates systems to obtain the projected angle. | ||||||
:align: center | ||||||
:scale: 75 % | ||||||
echedey-ls marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
|
||||||
Fig. 5, [1]_: Solar coordinates projection onto tracker rotation plane. | ||||||
|
||||||
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); | ||||||
NREL/TP-5K00-76626, Jul. 2020. :doi:`10.2172/1660126`. | ||||||
""" | ||||||
# 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) | ||||||
) | ||||||
# Eq. (5); angle between sun's beam and surface | ||||||
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.