Solar radiation model based on Duffie & Beckman "Solar energy thermal processes" (1974)
Project description
solarpy
Description | Python Solar Radiation model |
Author | aqreed aqreed@protonmail.com |
Version | 0.1 |
Python Version | 3.6 |
Requires | Numpy, Matplotlib |
This packages aims to provide a reliable solar radiation model, mainly based on the work of Duffie, J.A., and Beckman, W. A., 1974, "Solar energy thermal processes".
The main purpose is to generate a solar beam irradiance (W/m2) prediction on:
- any plane, thanks to the calculation of the solar vector in NED (North East Down) coordinates, suitable for its use in flight dynamics simulations...
- any place of the earth, taking into account the solar time wrt the standard time, geometric altitude, the latitude influence on solar azimuth and solar altitude as well as sunset/sunrise time and hour angle, etc.
- any day of the year, taking into account the variations of the extraterrestrial radiation, the equation of time, the declination, etc., throughout the year
Solar irradiance on the southern hemisphere on October 17, at sea-level 13.01UTC (plane pointing upwards)?
from solarpy.radiation import irradiance_on_plane
from solarpy.utils import day_of_the_year
import numpy as np
vnorm = np.array([0, 0, -1]) # plane pointing zenith
h = 0 # sea-level
n = day_of_the_year(10, 17) # October 17
lat = -23.5 # southern hemisphere
hour, minute = 13, 1 # midday
irradiance_on_plane(vnorm, h, n, lat, hour, minute)
A dedicated Jupyter Notebook on beam irradiance can be found here.
Solar declination on August 5?
from solarpy.radiation import declination
from solarpy.utils import day_of_the_year
n = day_of_the_year(8, 5) # August 5
declination(n)
Please find more notebooks on the 'examples' folder.
NOTE: solarpy is under development and might change in the near future.
Dependencies
This package depends on Python, NumPy and Matplotlib and is usually tested on Linux with the following versions:
Python 3.6, NumPy 1.16, Matplotlib 3.0
Installation
solarpy has been written in Python3
$ git clone https://github.com/aqreed/solarpy.git
$ cd solarpy
$ pip install -e .
Testing
solarpy recommends py.test for running the test suite. Running from the top directory:
$ pytest
To test coverage (also from the top directory):
$ pytest --cov
Bug reporting
Please feel free to open an issue on GitHub!
License
MIT (see COPYING
)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.