Skip to content
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

Martinez shading factor #2070

Merged
merged 197 commits into from
Jun 21, 2024
Merged

Conversation

echedey-ls
Copy link
Contributor

@echedey-ls echedey-ls commented May 27, 2024

Addresses adding the shading model described in #2063, which divides the modules into blocks, i.e. groups of cells protected by bypass diodes. It is applied to the unshaded output power.

Tests have been made with the original paper data, that is not explicitly in the paper.

The most difficult part of this model is documenting the blocks IMO. Please have a look at it.

echedey-ls and others added 30 commits March 8, 2024 16:46
From NREL paper
Co-Authored-By: Kevin Anderson <57452607+kandersolar@users.noreply.github.com>
Co-Authored-By: Kevin Anderson <57452607+kandersolar@users.noreply.github.com>
Co-Authored-By: Kevin Anderson <57452607+kandersolar@users.noreply.github.com>
Co-Authored-By: Anton Driesse <9001027+adriesse@users.noreply.github.com>
Co-Authored-By: Will Holmgren <william.holmgren@gmail.com>
Co-Authored-By: Mark Mikofski <bwana.marko@yahoo.com>
Co-Authored-By: Cliff Hansen <5393711+cwhanse@users.noreply.github.com>
@echedey-ls echedey-ls marked this pull request as ready for review June 15, 2024 19:30
@echedey-ls
Copy link
Contributor Author

Ready for another review guys!! @kandersolar @cwhanse and everyone else ^.^

@kandersolar
Copy link
Member

I don't quite understand the need of three variables here

I wondered the same thing as I was typing it out :) I more intended to just list the variables in the equations. I'm not saying we should necessarily use that specific function signature (although I see my comment could easily be read that way).

I'm not familiar with pvlib widely using it.

Not widely used, but sometimes used. It is currently available from some transposition models (e.g. pvlib.irradiance.perez) and perhaps someday the rest as well (#1553).

Anyway yes I agree, dropping the poa_circumsolar probably makes sense. I suggest keeping poa_direct and mentioning in the docstring that it should be given the sum of direct+circumsolar.

pvlib/shading.py Outdated Show resolved Hide resolved
pvlib/shading.py Outdated Show resolved Hide resolved
docs/examples/shading/plot_martinez_shade_loss.py Outdated Show resolved Hide resolved
docs/examples/shading/plot_martinez_shade_loss.py Outdated Show resolved Hide resolved
docs/examples/shading/plot_martinez_shade_loss.py Outdated Show resolved Hide resolved
pvlib/tests/test_shading.py Show resolved Hide resolved
echedey-ls and others added 9 commits June 18, 2024 21:55
Co-Authored-By: Kevin Anderson <57452607+kandersolar@users.noreply.github.com>
Co-Authored-By: Kevin Anderson <57452607+kandersolar@users.noreply.github.com>
Co-Authored-By: Kevin Anderson <57452607+kandersolar@users.noreply.github.com>
Co-Authored-By: Ioannis Sifnaios <88548539+IoannisSifnaios@users.noreply.github.com>
Co-Authored-By: Kevin Anderson <57452607+kandersolar@users.noreply.github.com>
Co-Authored-By: Kevin Anderson <57452607+kandersolar@users.noreply.github.com>
Co-Authored-By: Kevin Anderson <57452607+kandersolar@users.noreply.github.com>
Co-Authored-By: Kevin Anderson <57452607+kandersolar@users.noreply.github.com>
Co-Authored-By: Kevin Anderson <57452607+kandersolar@users.noreply.github.com>
pvlib/shading.py Outdated Show resolved Hide resolved
pvlib/shading.py Outdated Show resolved Hide resolved
echedey-ls and others added 2 commits June 19, 2024 00:52
Co-authored-by: Cliff Hansen <cwhanse@sandia.gov>
@echedey-ls
Copy link
Contributor Author

Thank you very much for your reviews @kandersolar & @cwhanse ❣️

From my side, I think all comments have been addressed.

Copy link
Member

@AdamRJensen AdamRJensen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just minor details

pvlib/shading.py Outdated Show resolved Hide resolved
pvlib/shading.py Outdated
A shading losses power factor for non-monolithic Silicon
modules and arrays with an arbitrary number of bypass diodes.

This experimental model cancels a fraction of the direct and circumsolar
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand what "cancels" means in this context

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've changed the verb to "zeroes":

This experimental model zeroes a fraction of the direct and circumsolar

I may have not translated that correctly. I've seen "to zero" as a verb. Should I reword it to something along This experimental model decreases a fraction of the direct and circumsolar with each shaded block

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's use the word reduces

This experimental model reduces a fraction of the direct and circumsolar with each shaded block

pvlib/shading.py Outdated Show resolved Hide resolved
pvlib/shading.py Outdated Show resolved Hide resolved
pvlib/shading.py Outdated
**Blocks terminology:**

[1]_ defines a *block* as a group of solar cells protected by a bypass
diode. Also, a *block* is shaded when at least one of its cells is shaded.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If one of its cells is "partly" shaded or "completely" shaded?

Copy link
Contributor Author

@echedey-ls echedey-ls Jun 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A block is shaded when at least one of its cells is shaded. A first possibility is to consider that the power of a block is fully cancelled when the block is shaded.

The paper does not specify it, but from the original tests spreadsheet I confirm they are considered shaded if a minimal amount of shade impacts on them.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added partially to the docstring, thou maybe I shouldn't.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like it! Especially if you've confirmed with the spreadsheet

docs/examples/shading/plot_martinez_shade_loss.py Outdated Show resolved Hide resolved
docs/examples/shading/plot_martinez_shade_loss.py Outdated Show resolved Hide resolved
docs/examples/shading/plot_martinez_shade_loss.py Outdated Show resolved Hide resolved
docs/examples/shading/plot_martinez_shade_loss.py Outdated Show resolved Hide resolved
docs/examples/shading/plot_martinez_shade_loss.py Outdated Show resolved Hide resolved
echedey-ls and others added 4 commits June 20, 2024 20:13
Co-authored-by: Adam R. Jensen <39184289+AdamRJensen@users.noreply.github.com>
Co-Authored-By: Adam R. Jensen <39184289+AdamRJensen@users.noreply.github.com>
Co-Authored-By: Adam R. Jensen <39184289+AdamRJensen@users.noreply.github.com>
pvlib/shading.py Outdated Show resolved Hide resolved
Co-authored-by: Cliff Hansen <cwhanse@sandia.gov>
@kandersolar kandersolar merged commit 35599e7 into pvlib:main Jun 21, 2024
30 checks passed
@kandersolar
Copy link
Member

Great contribution @echedey-ls!

@echedey-ls echedey-ls deleted the martinez-shading-factor branch June 21, 2024 11:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement GSoC Contributions related to Google Summer of Code.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Shading model that takes into account the bypass diodes and layout of modules
6 participants