Use Hottel's method for bifacial.utils.*_integ functions#1865
Draft
kandersolar wants to merge 12 commits intopvlib:mainfrom
Draft
Use Hottel's method for bifacial.utils.*_integ functions#1865kandersolar wants to merge 12 commits intopvlib:mainfrom
kandersolar wants to merge 12 commits intopvlib:mainfrom
Conversation
Member
|
FYI: there’s another pvlib issue with links to recent uses of Hottel’s crossed strings in the literature, one of the main advantages being its easy application for PV on slopes. One disadvantage may be that we lose view factor as a function of location on the ground which could be reused in Marion’s model. |
Member
Author
I don't see any reason not to retain the current |
the crossed-strings math assumed x0=0, x1=1. I am confident it could be extended to other endpoints, but reverting this for now.
echedey-ls
reviewed
Oct 15, 2024
| vf_actual = utils.vf_ground_sky_2d_integ(surface_tilt=60, **kwargs) | ||
| assert np.isclose(vf_expected, vf_actual) | ||
|
|
||
|
|
Member
There was a problem hiding this comment.
Suggested change
| def test_vf_ground_sky_2d_integ_deprecated(): | |
| @fail_on_pvlib_version(...) | |
| def test_vf_ground_sky_2d_integ_deprecated(): |
Let's make sure docs and code gets cleaned in the future? v0.12 or v0.13, whatever feels right. I would also add the future version to deprecate in the docs admonition.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
docs/sphinx/source/referencefor API changes.docs/sphinx/source/whatsnewfor all changes. Includes link to the GitHub Issue with:issue:`num`or this Pull Request with:pull:`num`. Includes contributor name and/or GitHub username (link with:ghuser:`user`).remote-data) and Milestone are assigned to the Pull Request and linked Issue.I realized that our integrated view factor calculations are equivalent to what is calculated using Hottel's crossed strings method. The calculations are straightforward, closed form, and much faster than numerical integration. Here is a speed comparison for the ground->sky view factor:
And since
vf_ground_sky_2d_integis the main bottleneck ininfinite_sheds.get_irradiance, runtime improves there by 1-2 orders of magnitude as well.PR is marked as draft while the code is a mess.