Skip to main content

Orientation Analysis of Solar Panel

Project description

pysolorie

Quality Checks Publish CodeQL GitHub License PyPI - Downloads Documentation Status PyPI - Version PyPI - Format PyPI - Status codecov pre-commit code style: black DOI

SonarCloud

pysolorie stands for Python Solar Orientation Analysis of Solar Panel. It is a Python library designed to help you analyze the orientation of solar panels.

How can one maximize the solar irradiation energy received by a solar panel?

Features

pysolorie is a library designed to help you find this optimal orientation. Its features include, but are not limited to:

  • Finding the optimal tilt angle for a fixed solar panel, assuming a clear-sky condition.
  • Plotting the optimal tilt angle over a range of days.
  • Plotting the daily direct irradiation energy over a range of days.
  • Generating a CSV, JSON, or XML report detailing the optimal tilt angle over a range of days.
  • Calculating the sunrise and sunset hour angles for a specific day.
  • Utilizing Hottel's model to quantify clear-sky conditions and estimate the atmospheric transmission of clear-sky beam radiation.
  • Calculating the solar zenith angle.
  • Calculating the solar time.
  • Calculating solar declination and hour angle.

How to Install pysolorie

pysolorie requires Python 3.9 or higher.

The easiest way to install pysolorie is from PyPI.

python3 -m pip install pysolorie

Example Usage

With the pysolorie package, you can plot the optimal orientation of a solar panel given the climate type, altitude, and latitude of the location. For instance, the following code plots the optimal orientation for each day of the year for the city of Tehran. For more examples, please refer to the Getting started section of our documentation. The full API Reference is also available on our website.

from pathlib import Path
from pysolorie import IrradiationCalculator, Plotter

# Instantiate a Plotter object from the pysolorie library
plotter = Plotter()

# Instantiate an IrradiationCalculator object for the city of Tehran
irradiation_calculator = IrradiationCalculator(
    climate_type="MIDLATITUDE SUMMER",
    observer_altitude=1200,
    observer_latitude=35.6892
)


# Use the plotter to plot the optimal orientation of a solar panel for each day of the year
plotter.plot_optimal_orientation(
    irradiation_calculator,
    from_day=1,
    to_day=365,
    path=Path("results.svg"),
    plot_kwargs={
        "xlabel": "Day",
        "ylabel": "Beta (degrees)",
        "title": "Optimal Solar Panel Orientation",
    },
    savefig_kwargs={"dpi": 300},
)

This figure, generated by the example code, illustrates the optimal orientation of a solar panel for each day of the year in Tehran. The x-axis represents the day of the year, while the y-axis represents the optimal angle (Beta) in degrees. As can be seen, the optimal angle varies throughout the year, highlighting the importance of adjusting the orientation of the solar panel to maximize the energy received.

Documentation

You can find the complete documentation for pysolorie at our Read the Docs page.

Contributing

We welcome contributions to pysolorie! If you're interested in contributing, please take a look at our contribution guidelines for detailed information on how you can help.

Thank you for considering contributing to pysolorie!

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

pysolorie-1.5.8.tar.gz (22.4 kB view details)

Uploaded Source

Built Distribution

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

pysolorie-1.5.8-py3-none-any.whl (23.8 kB view details)

Uploaded Python 3

File details

Details for the file pysolorie-1.5.8.tar.gz.

File metadata

  • Download URL: pysolorie-1.5.8.tar.gz
  • Upload date:
  • Size: 22.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for pysolorie-1.5.8.tar.gz
Algorithm Hash digest
SHA256 99461fa26b4cb123b2073168163120c624c9d4f16fcbfc9f4de335cd8a5bae59
MD5 004774633d37cfd58fb0ef4873cf8943
BLAKE2b-256 a0e894f59d2b0d3eb40475f35270fb5d6c752e1991006569623cd49b07bb9733

See more details on using hashes here.

File details

Details for the file pysolorie-1.5.8-py3-none-any.whl.

File metadata

  • Download URL: pysolorie-1.5.8-py3-none-any.whl
  • Upload date:
  • Size: 23.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for pysolorie-1.5.8-py3-none-any.whl
Algorithm Hash digest
SHA256 43344c3273bc5203420ee0b540ead2a2fcf8b6761cf35de5c110264d6ed0bc76
MD5 52cace0905b90a4625445530a076c6a7
BLAKE2b-256 52b7f77afe35e57e69e8bc8e96a6e7cc6ea9a8e8e3faee167d5ef8f12cc77756

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