A curated list of open technology projects to sustain a stable climate, energy supply, biodiversity and natural resources.

solarpy

This package 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".
https://github.com/aqreed/solarpy

Category: Renewable Energy
Sub Category: Photovoltaics and Solar Energy

Keywords

beam-irradiance flight-simulation modeling photovoltaic python simulation solar-cells solar-energy sun-position

Last synced: about 14 hours ago
JSON representation

Repository metadata

Solar radiation model for flight dynamics. Based on Duffie & Beckman "Solar energy thermal processes" (1974)

README.md

Build Status
codecov.io
license
Binder

Description Python Solar Radiation model
Author aqreed [email protected]
Version 0.1.3
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

Example 1

Solar irradiance on the southern hemisphere on October 17, at sea-level 13.01UTC (plane pointing upwards)?

import numpy as np
from solarpy import irradiance_on_plane
from datetime import datetime

vnorm = np.array([0, 0, -1])  # plane pointing zenith
h = 0  # sea-level
date = datetime(2019, 10, 17, 13, 1)  # year, month, day, hour, minute
lat = -23.5  # southern hemisphere

irradiance_on_plane(vnorm, h, date, lat)

A dedicated Jupyter Notebook on beam irradiance can be found here.

Example 2

Power output (in W) of a solar panel with the following characteristics:

  • surface of 2.1 sqm
  • efficiency of 0.2
  • pointing upwards
  • in NYC
  • on December 25, at 16.15
from numpy import array
from solarpy import solar_panel
from datetime import datetime

panel = solar_panel(2.1, 0.2, id_name='NYC_xmas')  # surface, efficiency and name
panel.set_orientation(array([0, 0, -1]))  # upwards
panel.set_position(40.73, -73.93, 0)  # NYC latitude, longitude, altitude
panel.set_datetime(datetime(2019, 12, 25, 16, 15))  # Christmas Day!
panel.power()

Example 3

Solar declination on August 5?

from solarpy import declination
from datetime import datetime

date = datetime(2019, 8, 5)  # August 5

declination(date)

Please find more notebooks on the 'examples' folder that you can open locally, or just try Binder to launch online interactive Jupyter notebooks.


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, and its version v0.1 is available in PyPi. It can be installed using:

$ pip install solarpy

To install in development mode:

$ 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)


Owner metadata


GitHub Events

Total
Last Year

Committers metadata

Last synced: 6 days ago

Total Commits: 255
Total Committers: 1
Avg Commits per committer: 255.0
Development Distribution Score (DDS): 0.0

Commits in past year: 0
Committers in past year: 0
Avg Commits per committer in past year: 0.0
Development Distribution Score (DDS) in past year: 0.0

Name Email Commits
aqreed a****d@g****m 255

Committer domains:


Issue and Pull Request metadata

Last synced: 1 day ago

Total issues: 8
Total pull requests: 2
Average time to close issues: 6 days
Average time to close pull requests: N/A
Total issue authors: 3
Total pull request authors: 2
Average comments per issue: 1.13
Average comments per pull request: 0.0
Merged pull request: 0
Bot issues: 0
Bot pull requests: 0

Past year issues: 0
Past year pull requests: 1
Past year average time to close issues: N/A
Past year average time to close pull requests: N/A
Past year issue authors: 0
Past year pull request authors: 1
Past year average comments per issue: 0
Past year average comments per pull request: 0.0
Past year merged pull request: 0
Past year bot issues: 0
Past year bot pull requests: 0

More stats: https://issues.ecosyste.ms/repositories/lookup?url=https://github.com/aqreed/solarpy

Top Issue Authors

  • aqreed (6)
  • jaluebbe (1)
  • effizientest (1)

Top Pull Request Authors

  • 0xflotus (1)
  • ferdisdot (1)

Top Issue Labels

  • enhancement (6)
  • help wanted (4)

Top Pull Request Labels


Package metadata

pypi.org: solarpy

Solar radiation model based on Duffie & Beckman "Solar energy thermal processes" (1974)

  • Homepage: https://github.com/aqreed/solarpy
  • Documentation: https://solarpy.readthedocs.io/
  • Licenses: mit
  • Latest release: 0.1.3 (published over 5 years ago)
  • Last Synced: 2025-04-25T11:30:53.920Z (1 day ago)
  • Versions: 4
  • Dependent Packages: 1
  • Dependent Repositories: 2
  • Downloads: 3,817 Last month
  • Rankings:
    • Dependent packages count: 7.373%
    • Downloads: 8.748%
    • Average: 9.925%
    • Stargazers count: 10.169%
    • Forks count: 11.468%
    • Dependent repos count: 11.868%
  • Maintainers (1)

Dependencies

setup.py pypi
  • matplotlib *
  • numpy *

Score: 12.422654717342535