-
Notifications
You must be signed in to change notification settings - Fork 1.1k
[Feature Preview] Shadow casting on and by flat surfaces #2106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Ready for preview @kandersolar , @AdamRJensen , @cwhanse , the rest of @pvlib/maintainers (I can't ping the team) Feel free to weight in whatever comes to your mind, but firstly focus on whether pvlib is a good place for this please. TIA. |
@mikofski , @adriesse , @markcampanelli would you like to weight in whether pvlib is a good place to include this? So I can determine if I should continue working on the code or not. Docs
|
My initial reaction is that it is probably a good basic functionality for the pvlib toolbox. I haven't looked under the hood, but maybe the PR can be split up a bit. Also details of OO interface could perhaps be debated. |
I am not in favor of building 3D lighting/shade calculators into pvlib-python. My reasons:
For these reasons, I think a new project (pvlib3d?) makes more sense than |
Seems like there is consensus on not including something like this here, so I'm closing this PR. |
docs/sphinx/source/reference
for API changes.docs/sphinx/source/whatsnew
for 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.Briefing
Objectives
Possibly there's only one I have achieved.
⚠️ Trigger warning for reviewers: crap unfinished code
General modifications this PR introduces
pvlib.spatial
module with two classes:FlatSurface
, can shade and can be shadedRectangularSurface
, inherits from above but allows for easy building of the common instanceWhat is pending
FlatSurface.plot()
methodFlatSurface.combine_2D_shades()
to avoid overlapping shades (make it the default in.get_2D_shades_from()
Long-term roadmap
Where & why I did not follow the references in some cases:
Slope-Aware Backtracking for Single-Axis Trackers - NREL
axis_tilt
Other information about the solution
Controversial features (like if there weren't already enough)
Status and discussion
You see, this is unfinished. I wouldn't allow myself to do this to you, but in one of the GSoC meetings I was hinted (fairly) that maybe this does not fit this repo. That maybe it does creating another repo under the pvlib organization. Maybe not even that.
And since there wasn't much conversation at #2069, opening this PR is partly to kickstart the discussion regarding that.
Regarding the model, the simulated plot:

Does not match the results for the Winter Solstice:

Docs
FlatSurface
: https://pvlib-python--2106.org.readthedocs.build/en/2106/reference/generated/pvlib.spatial.FlatSurface.htmlRectangularSurface
: https://pvlib-python--2106.org.readthedocs.build/en/2106/reference/generated/pvlib.spatial.RectangularSurface.html