Skip to main content

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

Project description

solarpy

Build Status codecov.io license

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.

Source Distribution

solarpy-0.1.tar.gz (7.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

solarpy-0.1-py3-none-any.whl (9.4 kB view details)

Uploaded Python 3

File details

Details for the file solarpy-0.1.tar.gz.

File metadata

  • Download URL: solarpy-0.1.tar.gz
  • Upload date:
  • Size: 7.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.18.4 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.8

File hashes

Hashes for solarpy-0.1.tar.gz
Algorithm Hash digest
SHA256 b7d86ad01bb03f81043ee4af41c5a0a51717189ee867a2a022996bb4ec3f6af4
MD5 13741fcbc7597e5c52321e31c6922d09
BLAKE2b-256 e222e999b9de6b130e37e5d0c30abda8d24a5e6d9539485906a765f2e6ee2b5f

See more details on using hashes here.

File details

Details for the file solarpy-0.1-py3-none-any.whl.

File metadata

  • Download URL: solarpy-0.1-py3-none-any.whl
  • Upload date:
  • Size: 9.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.18.4 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.8

File hashes

Hashes for solarpy-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 97ffaa66878283b8da7ff84e7e506dcc1f5af8ea3b1d3ef997193b20249a9b8b
MD5 c9c609481ffb1815f9231dfb8f3d4be1
BLAKE2b-256 0e90956ad37fe120d509b2d1ad2192fd615345b4663c4fe353c15a164d4799f0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page