# SolarEnergyPy
## SolarEnergyPy
SolarEnergyPy is for education purpose where one can have fundamental information of solar energy.
## Basic Information
- Solar constant.
- Solar position relative to a site on Earth in terms of lattitude, longitude and datetime.
- Instant solar radiation on outer edge of atmosphere as well as beam and diffusion on Earth.
- Spectral radiation map.
## Requirements
* [Python](http://www.python.org) 3
* Matplotlib is installed.
## Documentation
To be continued.
## Installation
```bash
pip install SolarEnergyPy
```
## Usage
```Python
from datetime import datetime
import pendulum
from SolarEnergyPy.solarPosition import solarPosition as sp
from SolarEnergyPy.solarRadiation import solarRadiation as sr
def solar_system_demo(longitude, latitude, dt):
solar_position = sp(longitude, latitude)
solar_radiation = sr()
solar_position.clocktime = dt
solar_radiation.clocktime = dt
print(f"Solar Position:{sp.site}")
print(f"Date-Time: {solar_position._datetime}")
print(f"Latitude: {solar_position.latitude}")
print(f"Longitude: {solar_position.longitude}")
print(f"Declination: {solar_position.declination}")
print(f"Solar Azimuth: {solar_position.solar_azimuth}")
print(f"Solar Zenith: {solar_position.zenith}")
print("\nSolar Radiation:")
beam, diffuse = solar_radiation.solar_radiation_at()
print(f"Beam Radiation: {beam} W/m^2")
print(f"Diffuse Radiation: {diffuse} W/m^2")
if __name__ == '__main__':
longitude = 112
latitude = 31
dt = pendulum.now('Asia/Shanghai')
solar_system_demo(longitude, latitude, dt)
```
## Update log
`0.0.4` fix some bugs
`0.0.3` Add some demos
`0.0.2` Fix some bugs and and add case demos
`0.0.1` SolarEnergyPy
## License
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
## Contact
heliqun@ustc.edu.cn
Raw data
{
"_id": null,
"home_page": "https://pypi.org/project/SolarEnergyPy/",
"name": "SolarEnergyPy",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "python, windows, mac, linux",
"author": "Liqun He",
"author_email": "heliqun@ustc.edu.cn",
"download_url": "https://files.pythonhosted.org/packages/91/42/ab59af51e6146c27821123f1d5c1a25568a920bcc40e492c17a2e577a836/SolarEnergyPy-0.0.4.tar.gz",
"platform": null,
"description": "# SolarEnergyPy\r\r\n\r\r\n## SolarEnergyPy\r\r\n\r\r\nSolarEnergyPy is for education purpose where one can have fundamental information of solar energy.\r\r\n\r\r\n## Basic Information\r\r\n- Solar constant.\r\r\n- Solar position relative to a site on Earth in terms of lattitude, longitude and datetime.\r\r\n- Instant solar radiation on outer edge of atmosphere as well as beam and diffusion on Earth.\r\r\n- Spectral radiation map.\r\r\n\r\r\n\r\r\n## Requirements\r\r\n\r\r\n* [Python](http://www.python.org) 3 \r\r\n* Matplotlib is installed.\r\r\n\r\r\n## Documentation\r\r\n\r\r\nTo be continued.\r\r\n\r\r\n## Installation\r\r\n```bash\r\r\npip install SolarEnergyPy\r\r\n```\r\r\n\r\r\n## Usage\r\r\n```Python\r\r\nfrom datetime import datetime\r\r\n\r\r\nimport pendulum\r\r\n\r\r\nfrom SolarEnergyPy.solarPosition import solarPosition as sp\r\r\n\r\r\nfrom SolarEnergyPy.solarRadiation import solarRadiation as sr\r\r\n\r\r\n\r\r\n\r\r\ndef solar_system_demo(longitude, latitude, dt):\r\r\n\r\r\n\r\r\n\r\r\n solar_position = sp(longitude, latitude)\r\r\n\r\r\n solar_radiation = sr()\r\r\n\r\r\n solar_position.clocktime = dt\r\r\n\r\r\n solar_radiation.clocktime = dt\r\r\n\r\r\n\r\r\n\r\r\n print(f\"Solar Position:{sp.site}\")\r\r\n\r\r\n print(f\"Date-Time: {solar_position._datetime}\")\r\r\n\r\r\n print(f\"Latitude: {solar_position.latitude}\")\r\r\n\r\r\n print(f\"Longitude: {solar_position.longitude}\")\r\r\n\r\r\n print(f\"Declination: {solar_position.declination}\")\r\r\n\r\r\n print(f\"Solar Azimuth: {solar_position.solar_azimuth}\")\r\r\n\r\r\n print(f\"Solar Zenith: {solar_position.zenith}\")\r\r\n\r\r\n\r\r\n\r\r\n print(\"\\nSolar Radiation:\")\r\r\n\r\r\n beam, diffuse = solar_radiation.solar_radiation_at()\r\r\n\r\r\n print(f\"Beam Radiation: {beam} W/m^2\")\r\r\n\r\r\n print(f\"Diffuse Radiation: {diffuse} W/m^2\")\r\r\n\r\r\n\r\r\n\r\r\nif __name__ == '__main__':\r\r\n\r\r\n longitude = 112\r\r\n\r\r\n latitude = 31\r\r\n\r\r\n dt = pendulum.now('Asia/Shanghai')\r\r\n\r\r\n solar_system_demo(longitude, latitude, dt)\r\r\n```\r\r\n\r\r\n## Update log\r\r\n`0.0.4` fix some bugs\r\r\n`0.0.3` Add some demos\r\r\n\r\r\n`0.0.2` Fix some bugs and and add case demos\r\r\n\r\r\n`0.0.1` SolarEnergyPy\r\r\n\r\r\n## License\r\r\n\r\r\n This program is free software: you can redistribute it and/or modify\r\r\n it under the terms of the GNU General Public License as published by\r\r\n the Free Software Foundation, either version 3 of the License, or\r\r\n (at your option) any later version.\r\r\n\r\r\n This program is distributed in the hope that it will be useful,\r\r\n but WITHOUT ANY WARRANTY; without even the implied warranty of\r\r\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r\r\n GNU General Public License for more details.\r\r\n\r\r\n You should have received a copy of the GNU General Public License\r\r\n along with this program. If not, see <http://www.gnu.org/licenses/>.\r\r\n\r\r\n## Contact\r\r\nheliqun@ustc.edu.cn\r\r\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A package for fundamental information of solar energy.",
"version": "0.0.4",
"project_urls": {
"Homepage": "https://pypi.org/project/SolarEnergyPy/"
},
"split_keywords": [
"python",
" windows",
" mac",
" linux"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "9142ab59af51e6146c27821123f1d5c1a25568a920bcc40e492c17a2e577a836",
"md5": "f075100c79db6efed3d7b4653903f86b",
"sha256": "24baa23c2be20a0dc8e8eb9ff17c93b593b671c4a57e5c3054ae39bd119ee9b7"
},
"downloads": -1,
"filename": "SolarEnergyPy-0.0.4.tar.gz",
"has_sig": false,
"md5_digest": "f075100c79db6efed3d7b4653903f86b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 65209,
"upload_time": "2024-11-29T15:32:46",
"upload_time_iso_8601": "2024-11-29T15:32:46.260417Z",
"url": "https://files.pythonhosted.org/packages/91/42/ab59af51e6146c27821123f1d5c1a25568a920bcc40e492c17a2e577a836/SolarEnergyPy-0.0.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-29 15:32:46",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "solarenergypy"
}