Use Hottel's method for bifacial.utils.*_integ functions#1865
Use Hottel's method for bifacial.utils.*_integ functions#1865kandersolar wants to merge 12 commits intopvlib:mainfrom
Conversation
|
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. |
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.
| vf_actual = utils.vf_ground_sky_2d_integ(surface_tilt=60, **kwargs) | ||
| assert np.isclose(vf_expected, vf_actual) | ||
|
|
||
|
|
There was a problem hiding this comment.
| 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.
|
Closing as redundant with #2740 |
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.