-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add mismatch.py and function to combine curves #1781
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
base: main
Are you sure you want to change the base?
Conversation
* adds function that combines curves (in series) * adds function that prepares inputs for combine_curves
Co-authored-by: Cliff Hansen <[email protected]>
Co-authored-by: Cliff Hansen <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just need to add two tests that raise the ValueErrors.
Co-authored-by: Cliff Hansen <[email protected]>
Co-authored-by: Cliff Hansen <[email protected]>
Co-authored-by: Cliff Hansen <[email protected]>
Co-authored-by: Cliff Hansen <[email protected]>
Co-authored-by: Cliff Hansen <[email protected]>
@pvlib/pvlib-maintainer would appreciate your look at this, when you can. |
Would it be possible to add a simple example to the documentation? |
@AdamRJensen I've added an example in docs/examples/iv-modeling, though I'm not sure that's the right place to put it. Let me know if I should move it somewhere else |
Thanks a lot @ajonesr ! You also need to move the whatsnew entry from v0.10.0 to v0.10.2. |
Sure thing! Just pushed those changes. |
I can do a review (sorry for the wait!) but I'm a little hesitant about the current approach this PR takes. To me, this code feels more like an application than it does reusable functions. For example, I wonder if these functions would make more sense as a gallery example page than functions in pvlib itself? |
@kandersolar I'm interested to hear your thoughts on different ways to organize this capability. I don't think a gallery example is enough here. We've heard several requests for capabilities native to pvlib to model mismatch. It is clear that pvmismatch, while useful, has some limits and is not going to be further developed. It seems reasonable to include functions in pvlib that one could use to get beyond the limits of pvmismatch. Curves are added by aligning current and summing the corresponding voltage. The functions in this PR meet one use case: I have diode equation parameters for the series-connected modules/cells and I want the string-level IV curve.I can see a second use case: I have non-aligned IV curves (measured perhaps) and want the string-level curve. These functions don't meet the measured-curve use case. I think separate function(s) that align the currents are useful, so that the function which adds curves is more reusable. We would want to align currents starting either from diode equation values ( Maybe |
I think my hesitation was centered around not being able to use the addition function with the existing methods for generating IV curves. It felt somewhat disconnected from the rest of pvlib. A function to align curves on one of the two dimensions would address that. The tight coupling of Series vs parallel connection is something else to consider when choosing names to leave room for future functionality. |
It could be a start though... |
Documenting an offline conversation about this PR. One concern is that the draft "I have diode model parameters and want a series-combined IV curve." The other use case is "I have IV curves and want to combine them in series" This second use case doesn't assume that the IV curves in hand are aligned to common currents, a job which We propose the following next steps:
|
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.Adds a function combine_curves that combines curves (in series) and a function that prepares inputs for combine_curves. This is part of the work to move some of the functionality of PVMismatch over to pvlib.