Implement ANTS-2D bifacial irradiance model#2740
Conversation
The only reason is that I did not think to include it in the reference paper, so including it here would be going beyond the reference. If no reviewers object to that in this case, I'd be fine adding it in (and maybe documenting it as an extension). |
That sounds great to me! |
| Projected solar zenith angle. [degrees] | ||
| gcr : numeric | ||
| Ground coverage ratio, which is the ratio of row slant length to row | ||
| spacing (pitch). [unitless] |
There was a problem hiding this comment.
Do we need to clarify here, that "row spacing" is a distance along the slanted ground, rather than the horizontal distance between row centers. I think that internal to ants2d gcr is the slanted distance, but for infinite sheds and other contexts, gcr is the horizontal distance.
There was a problem hiding this comment.
Edited: "...internal to ants2d gcr is the slanted distance..."
|
|
||
| def _shaded_fraction(tracker_rotation, phi, gcr, x0=0, x1=1): | ||
| """ | ||
| Calculate fraction (from the bottom) of row slant height that is shaded |
There was a problem hiding this comment.
If I follow the code in this function correctly, it is returning the fraction of the interval (x0, x1) that is shaded. I think that needs to be clear here at the function description.
cwhanse
left a comment
There was a problem hiding this comment.
Review of file ants2d.py. OK with file infinite_sheds.py.
Co-authored-by: Cliff Hansen <cwhanse@sandia.gov>
Co-authored-by: Cliff Hansen <cwhanse@sandia.gov>
Co-authored-by: Cliff Hansen <cwhanse@sandia.gov>
| assert 0 == ants2d._shaded_fraction(10, 20, 0.5) | ||
| assert 0 == ants2d._shaded_fraction(-10, -20, 0.5) | ||
|
|
||
| # sun behind the modules (AOI > 90) |
There was a problem hiding this comment.
Very minor nit: "sun behind the modules" I think I would comment this case as "module facing away from the sun" since the function being tested returns "fraction...shaded from direct irradiance by the row in front toward the sun." It is implied that _shaded_fraction is specific to one face of a module, which (in this case) is face pointed away from the sun.
[ ] Closes #xxxxdocs/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.@AdamRJensen, @cwhanse, and I have a paper describing a new bifacial irradiance model called ANTS-2D. It is similar to pvlib's
infinite_shedsmodel, but extended to allow:Details available open-access here: https://doi.org/10.1109/JPHOTOV.2026.3677506
This PR is rather large. To summarize:
g0andg1parameters to the view factor functions inpvlib.bifacial.utils. These are analogous tox0andx1invf_row_sky_2d_integand extend the functions to subset the ground surface.vf_ground_sky_2d_integto use Hottel's crossed-string rule instead of burdensome numerical integration. This makes thenpointsandvectorizeparameters unnecessary.pvlib.bifacial.utilsto be cleaner with the new calculations.pvlib.bifacial.infinite_shedsto accommodate theutilschangespvlib.bifacial.ant2d, which houses the model itself and uses the newutilsfunctionality.Let me know if it would help reviewers to split it up and review separate PRs, starting with
utils.