-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add analytical azimuth method to solarposition.py. #349
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 1 commit
52cfb3b
5395164
4e56576
c0698d4
e3c7530
9c2b89b
b6d6fb9
d1b38b5
2c346c4
3728f15
31bf30d
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 |
---|---|---|
|
@@ -1052,6 +1052,50 @@ def declination_cooper69(dayofyear): | |
return np.deg2rad(23.45 * np.sin(day_angle + (2.0 * np.pi / 365.0) * 285.0)) | ||
|
||
|
||
def solar_azimuth_analytical(latitude, hour_angle, declination, zenith): | ||
""" | ||
Analytical expression of solar azimuth angle based on spherical | ||
trigonometry. | ||
|
||
Parameters | ||
---------- | ||
latitude : numeric | ||
Latitude of location in radians. | ||
hour_angle : numeric | ||
Hour angle in the local solar time in radians. | ||
declination : numeric | ||
Declination of the sun in radians. | ||
zenith : numeric | ||
Solar zenith angle in radians. | ||
|
||
Returns | ||
------- | ||
azimuth : numeric | ||
Solar azimuth angle in radians. | ||
|
||
References | ||
---------- | ||
[1] J. A. Duffie and W. A. Beckman, "Solar Engineering of Thermal | ||
Processes, 3rd Edition" pp. 14, J. Wiley and Sons, New York (2006) | ||
|
||
[2] J. H. Seinfeld and S. N. Pandis, "Atmospheric Chemistry and Physics" | ||
p. 132, J. Wiley (1998) | ||
|
||
`Wikipedia: Solar Azimuth Angle <https://en.wikipedia.org/wiki/Solar_azimuth_angle>`_ | ||
|
||
`PVCDROM: Azimuth Angle <http://www.pveducation.org/pvcdrom/2-properties-sunlight/azimuth-angle>`_ | ||
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. same here |
||
|
||
See Also | ||
-------- | ||
declination_spencer71 | ||
declination_cooper69 | ||
hour_angle | ||
solar_zenith_analytical | ||
""" | ||
return np.sign(hour_angle) * np.abs(np.arccos((np.cos(zenith) * np.sin( | ||
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. @veronicaguo and @wholmgren sorry for super late review, and just a tiny nitpick, but I don't think
Therefore, it will never return a negative number, so no need for absolute value. |
||
latitude) - np.sin(declination)) / (np.sin(zenith) * np.cos(latitude)))) | ||
|
||
|
||
def solar_zenith_analytical(latitude, hour_angle, declination): | ||
""" | ||
Analytical expression of solar zenith angle based on spherical trigonometry. | ||
|
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.
reference needs a number