Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some fixes in PvModel and test #689

Merged
merged 45 commits into from
Feb 3, 2025
Merged

Conversation

SimonHuette
Copy link
Contributor

@SimonHuette SimonHuette commented Dec 20, 2023

resolves #688

I will try to optimize the beam radiation for times close to sunrise or sunset. I will adjust the case distinction of omega1 and omega2, also allowing for smaller intervalls between them. This will be balanced out by multiplying the power with the time difference between omega2 and omega1, thus not creating very high peaks in power outputs in the morning (or evening).
Also, I removed the condition Theta_G < 90°, since that should only result in a negative value of r, which is already accounted for, making it unneccessary.

Please let me know what you think!

EDIT SP: Fix PvModelIT after #1089 is merged

@SimonHuette SimonHuette added the code quality Code readability or efficiency is improved label Dec 20, 2023
@SimonHuette SimonHuette added this to the Version 4.0 milestone Dec 20, 2023
@SimonHuette SimonHuette self-assigned this Dec 20, 2023
@sebastian-peter sebastian-peter self-requested a review February 23, 2024 08:42
# Conflicts:
#	src/main/scala/edu/ie3/simona/model/participant/PvModel.scala
Copy link
Member

@sebastian-peter sebastian-peter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also have two more points regarding documentation (readthedocs):

The link to source for Iqbal.1983 has become invalid. Could you find a new link here (could just be a link to the respective page of the publisher, if nothing else is available)? Also please check all other links.

Also related to literature: Could you also indicate page numbers for each source? This has already been done for some sources, but is missing for others. It can speed up understanding the model a bit.

@sebastian-peter sebastian-peter marked this pull request as ready for review January 27, 2025 16:00
@sebastian-peter
Copy link
Member

I just finally finalized this PR, have a look if you like @jo-bao @danielfeismann @staudtMarius

Copy link
Member

@danielfeismann danielfeismann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot to both of you for working this out and double check this!

I have some minor suggestions and pushed myself some little changes. Please have a look @sebastian-peter - just ideas, I don't insinst on them.

docs/readthedocs/models/pv_model.md Outdated Show resolved Hide resolved
docs/readthedocs/models/pv_model.md Outdated Show resolved Hide resolved
docs/readthedocs/models/pv_model.md Outdated Show resolved Hide resolved
@sebastian-peter
Copy link
Member

In terms of functionality, only the calculation of diffuse radiation on the sloped surface (the cloud index in particular) is adapted.

grafik

On the back of an envelope, these are the changes to be expected:

Using the beam radiation on a normal surface instead of on a horizontal surface increases the beam radiation in the morning and evening (when the zenith angle theta_z is large, and thus 1/cos(theta_z) is large as well). In total, this increases epsilon in some cases in the morning and evening (compared to before).

The cubic theta_z in the numerator and denominator is now done on angles in degrees, thus drastically increasing, especially for large theta_z (again, in the morning and evening). Beforehand, the term 5.535 \cdot 10^{-6} \cdot \theta_z^3 was largely insignificant, because angles in radians were pretty much canceled out by 10^{-6}. Now, the term approximates a value of 4 for theta_z = 90° (morning/evening), which then decreases epsilon values in the morning and evening (compared to before).

In total, the changes work in opposite directions, partly cancelling each other out in some cases, while leading to different results in other cases (e.g. for intense diffuse radiation in the morning/evening).

@sebastian-peter
Copy link
Member

grafik

The largest difference for PvModelIT is this day, where still similar maximum values are reached.

Copy link
Member

@danielfeismann danielfeismann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing these issues!

@sebastian-peter sebastian-peter merged commit c586ab5 into dev Feb 3, 2025
4 checks passed
@sebastian-peter sebastian-peter deleted the sh/#688-rewrite-pv-model branch February 3, 2025 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code quality Code readability or efficiency is improved
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rewrite function in PV Model
3 participants