Implement ANTS-2D bifacial irradiance model#2740
Conversation
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>
|
I think the documentation for |
|
In |
| (``n_ground_segments``, ``len(tracker_rotation)``). [unitless] | ||
| model : str, default 'perez' | ||
| Irradiance model - can be one of 'isotropic', 'haydavies', 'perez', | ||
| or 'perez_driesse'. |
There was a problem hiding this comment.
| or 'perez_driesse'. | |
| or 'perez-driesse'. |
| or 'perez_driesse'. | ||
| dni_extra : numeric, optional | ||
| Extraterrestrial direct normal irradiance. Required when | ||
| ``model='haydavies'``, ``model='perez'``, or ``model='perez_driese'``. |
There was a problem hiding this comment.
| ``model='haydavies'``, ``model='perez'``, or ``model='perez_driese'``. | |
| ``model='haydavies'``, ``model='perez'``, or ``model='perez-driesse'``. |
There was a problem hiding this comment.
note that there was also a type here
| Computed from the datetime index of the inputs if not provided. [Wm⁻²] | ||
| airmass : numeric, optional | ||
| Relative airmass. Required when ``model='perez'`` or | ||
| ``model='perez_driese'``. Computed from ``solar_zenith`` if needed. |
There was a problem hiding this comment.
| ``model='perez_driese'``. Computed from ``solar_zenith`` if needed. | |
| ``model='perez-driesse'``. Computed from ``solar_zenith`` if needed. |
There was a problem hiding this comment.
note that there was also a type here
|
|
||
| # Section II.C.2 | ||
|
|
||
| if model in ['haydavies', 'perez', 'perez_driesse']: |
There was a problem hiding this comment.
| if model in ['haydavies', 'perez', 'perez_driesse']: | |
| if model in ['haydavies', 'perez', 'perez-driesse']: |
| diffuse_model_func = haydavies | ||
| extra_kwargs = {} | ||
|
|
||
| elif model in ['perez', 'perez_driesse']: |
There was a problem hiding this comment.
| elif model in ['perez', 'perez_driesse']: | |
| elif model in ['perez', 'perez-driesse']: |
|
|
||
| Notes | ||
| ----- | ||
| - ``model='perez_driesse'`` was not evaluated in [1]_ and is included |
There was a problem hiding this comment.
| - ``model='perez_driesse'`` was not evaluated in [1]_ and is included | |
| - ``model='perez-driesse'`` was not evaluated in [1]_ and is included |
|
|
||
| # preparation steps | ||
|
|
||
| if airmass is None and model in ['perez', 'perez_driesse']: |
There was a problem hiding this comment.
| if airmass is None and model in ['perez', 'perez_driesse']: | |
| if airmass is None and model in ['perez', 'perez-driesse']: |
| airmass = get_relative_airmass(solar_zenith) | ||
|
|
||
| if (dni_extra is None and | ||
| model in ['perez', 'perez_driesse', 'haydavies'] and |
There was a problem hiding this comment.
| model in ['perez', 'perez_driesse', 'haydavies'] and | |
| model in ['perez', 'perez-driesse', 'haydavies'] and |
|
Could it be worthwhile to return unshaded irradiance, e.g., I haven't fully thought through trade-offs and alternatives yet, but I thought it was worth bringing up. [1] Anderson, Kevin. 2020. Maximizing Yield with Improved Single-Axis Backtracking on Cross-Axis Slopes: Preprint. Golden, CO: National Renewable Energy Laboratory. NREL/CP-5K00-76023. https://www.nlr.gov/docs/fy20osti/76023.pdf [2] W. Hobbs, K. Anderson, M. Mikofski, and M. Ghiz, “An approach to modeling linear and non-linear self-shading losses with PVlib,” in PV Perform. Model. Collaborative Workshop, Sandia Nat. Lab., May 2024. [Online]. Available: https://www.sandia.gov/app/uploads/sites/243/dlm_uploads/2024/05/2024_PVPMC_hobbs_pvlib_self-shade.pdf |
[ ] 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.