Implement ANTS-2D bifacial irradiance model#2740
Conversation
echedey-ls
left a comment
There was a problem hiding this comment.
Some first impressions; also, you may want to link to it in other bifacial "See also" sections.
cwhanse
left a comment
There was a problem hiding this comment.
I'm OK reviewing the whole PR, if we can do it in a sequence of smaller review bites.
Co-Authored-By: Cliff Hansen <5393711+cwhanse@users.noreply.github.com>
| surface_tilt : numeric | ||
| Surface tilt angle in degrees from horizontal, e.g., surface facing up | ||
| = 0, surface facing horizon = 90. [degree] | ||
| tracker_rotation : numeric |
There was a problem hiding this comment.
I'm not persuaded that tracker_rotation and surface_tilt are interchangeable. When axis_tilt is not 0 the rotation angle is not the same as the angle from horizontal. In this case, the 2D geometry being considered is in the plane perpendicular to the tracker rotation axis, not perpendicular to the ground. Does that matter?
Also, with tracker_rotation as the input, this public function relies on context outside the scope of the function: axis_tilt and axis_aximuth are needed to know what tracker_rotation is. If we need the input to be tracker_rotation then maybe consider making this function private.
There was a problem hiding this comment.
I'm not persuaded that
tracker_rotationandsurface_tiltare interchangeable. Whenaxis_tiltis not 0 the rotation angle is not the same as the angle from horizontal. In this case, the 2D geometry being considered is in the plane perpendicular to the tracker rotation axis, not perpendicular to the ground. Does that matter?
I think tracker_rotation is correct here:
- Adding
g0andg1(rather than implicitly hardcoding them as 0/1) means that we can't assume symmetry around the ground midpoint anymore. That means that we need to distinguish east- and west-facing rotations of the same tilt, so a signed quantity liketracker_rotationis needed. - The VF must be calculated from the ground's point of view. When
axis_tiltis nonzero, that means the ground surface is tilted too (the model assumes that the tracking axis is parallel to the ground surface). In the reference frame aligned with the ground,tracker_rotationis the requiredsurface_tiltanalog.
Also, with
tracker_rotationas the input, this public function relies on context outside the scope of the function:axis_tiltandaxis_azimuthare needed to know whattracker_rotationis. If we need the input to betracker_rotationthen maybe consider making this function private.
Yeah, I guess it is a little awkward. Making the function private seems a shame, since it's useful in other contexts. Would noting the geometric link between tracker_rotation, g0, and g1 be a sufficient alternative? g0 and g1 are documented using left and right, so maybe something like:
tracker_rotation : numeric
Tracker rotation angle. Positive rotations indicate raising the
row's right edge. [degree]
By the way, we are talking about vf_ground_sky_2d_integ, but the existing vf_ground_sky_2d signature has the same issue (tracker rotation input, but no axis tilt/azimuth): https://pvlib-python.readthedocs.io/en/stable/reference/generated/pvlib.bifacial.utils.vf_ground_sky_2d.html
There was a problem hiding this comment.
" (the model assumes that the tracking axis is parallel to the ground surface)"
This is a key assumption and constraint. I think users may assume that axis_tilt allows for a tracker to have its rotation axis elevated at one end relative to the ground surface.
There was a problem hiding this comment.
With this constraint, I agree that tracker_rotation and surface_tilt are interchangeable.
| ------- | ||
| fgnd_sky : numeric | ||
| Integration of view factor over the length between adjacent, interior | ||
| rows. Shape matches that of ``surface_tilt``. [unitless] |
There was a problem hiding this comment.
Replace surface_tilt or not, pending outcome of comment about tracker_rotation
Co-authored-by: Cliff Hansen <cwhanse@sandia.gov>
|
Is there a reason that |
Co-authored-by: Cliff Hansen <cwhanse@sandia.gov>
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! |
[ ] 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.