Skip to content

Commit

Permalink
Fix bug in parameter omega
Browse files Browse the repository at this point in the history
Fixed bug by changing the parameter omega from ``7.15 * 1e-5`` to ``7.2722 * 1e-5`` in numerical integration.
I also updated test cases to reflect new parameter values.
It is ready to publish new version 1.5.8
  • Loading branch information
aaghamohammadi committed Sep 24, 2024
1 parent e6edd39 commit 326d196
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 7 deletions.
10 changes: 10 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
Changelog
=========

Version 1.5.8
-------------
Release date: 2024-09-24

Fixed
^^^^^
- Changed the parameter :math:`\Omega` from ``7.15 * 1e-5`` to ``7.2722 * 1e-5``



Version 1.5.6
-------------

Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = pysolorie
version = 1.5.7
version = 1.5.8
description = Orientation Analysis of Solar Panel
long_description = file: README.md
long_description_content_type = text/markdown
Expand Down
4 changes: 2 additions & 2 deletions src/pysolorie/numerical_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class IrradiationCalculator:
"""

OMEGA = 7.15 * 1e-5
OMEGA = 7.2722 * 1e-5

def __init__(
self, climate_type: str, observer_altitude: int, observer_latitude: float
Expand Down Expand Up @@ -130,7 +130,7 @@ def calculate_direct_irradiation(
solar energy received per unit area per second
on day number :math:`n` of the year
| - :math:`\Omega` = ``7.15 * 1e-5``
| - :math:`\Omega` = ``7.2722 * 1e-5``
| - :math:`\theta` is incidence angle, the angle between the position vector
of the sun and the normal vector to the solar panel.
Expand Down
8 changes: 4 additions & 4 deletions tests/test_numerical_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,31 +31,31 @@
35.6892,
172,
45.0,
20.3026, # Tehran Summer, day_of_year=172 (June 21)
19.961, # Tehran Summer, day_of_year=172 (June 21)
),
(
"MIDLATITUDE WINTER",
1200,
35.6892,
355,
45.0,
19.436, # Tehran Winter, day_of_year=355 (Dec 21)
19.110, # Tehran Winter, day_of_year=355 (Dec 21)
),
(
"TROPICAL",
26,
3.5952,
100,
45.0,
13.224, # Medan, day_of_year=100 (April 10)
13.003, # Medan, day_of_year=100 (April 10)
),
(
"SUBARCTIC SUMMER",
132,
64.84361,
200,
45.0,
21.371, # Fairbanks Summer, day_of_year=200 (July 19)
21.012, # Fairbanks Summer, day_of_year=200 (July 19)
),
(
"SUBARCTIC SUMMER",
Expand Down

0 comments on commit 326d196

Please sign in to comment.