-
Notifications
You must be signed in to change notification settings - Fork 1.1k
ENH: calcparams_pvsyst should output d2mutau and vbi #516
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
Comments
How about supplementing each set of coefficients with a "source" identifier? Then downstream functions can decide whether the "source" is suitable for them. |
I'm thinking about writing a |
* related to pvlib#516, the use of cells_in_series here is problematic * to calculate arrays of different cells or modules with different parameters we use np.where(is_recomb, ..., ...) 3d0deb2 but what should cells_in_series be if d2mutau is zero? doesn't make physical sense for it to be zero, but None doesn't work with numbers * remove cells_in_series arg from bishop88 * remove last warning about setting cells_in_series correctly, move it to Notes, but worded differently in the context of setting NsVbi * replace voltage_builtin with NsVbi, default to np.inf * fix docstring parameter descriptions
…#504) * implementing pvsyst recombination loss current for CdTe and a:Si * closes #163 * add constant VOLTAGE_BUILTIN = 0.9 (V) to singlediode_methods.py * add arguments d2mutau=0, voltage_builtin=VOLTAGE_BUILTIN, and cells_in_series to calculate i_recomb and v_recomb * add check for d2mutau to calc i_recomb, v_recomb, and gradients * add terms to current and gradients * ENH: need to set grad_i_recomb if d2mutau not given * also set v_recomb to Inf, so that 1/v_recomb is always zero * but precalculate grad_2i_recomb only if d2mutau > 0, otherwise, use zero * ENH: fix need to multiply vbi by Ns, add test for recombination * WIP: ENH: TST: BUG: in test compare desoto vs. pvsyst * ENH: respond to comments * change order of bishop88 args: cells_in_series to be first before d2mutau and voltage_builtin * hardcode PVSYST_FS495 coefficients * don't compare pvsyst to desoto, instead compare pvsyst to fixed values at two conditions: reference and 888[W/m^2],55[degC] * rename test to be agnostic to module SKU * remove testing script if __name__ == '__main__': section, not for release * DOC: ENH: update bishop88 documentation for pvsyst thin-film recombination loss * DOC: ENH: update what's new * DOC: add utf-8 file encoding * DOC: ENH: BUG: minor doc fixes and formatting * need to indent bullets in warning * only need cells in series for PVSyst thin-film recombination loss * escape math latex twice inside docstrings without raw prefix, eg: \\tau without extra escape is a tab character, ha ha ha * in rst, italics is a single asterisk, not underscore, thats markdown * ENH: improve code style, fix d2mutau is array * expand module type abbrev. in warnings * also expand EG to For example, too terse * cells in series can be int _or_ `None` * since d2mutau and vbi are arrays, then ambiguous to test for zero, so use np.where to assign conditionally instead (in two places) * ENH: TST: use fixture instead of module-level dictionary for test * dangerous to use module-level dictionary inside test, b/c dictionary values could be changed inadvertently, but not a fixture * add fixture as argument in test * change parametrize to call fixture instead of module-level dictionary * ENH: replace voltage_builtin with NsVbi and remove cells_in_series * related to #516, the use of cells_in_series here is problematic * to calculate arrays of different cells or modules with different parameters we use np.where(is_recomb, ..., ...) 3d0deb2 but what should cells_in_series be if d2mutau is zero? doesn't make physical sense for it to be zero, but None doesn't work with numbers * remove cells_in_series arg from bishop88 * remove last warning about setting cells_in_series correctly, move it to Notes, but worded differently in the context of setting NsVbi * replace voltage_builtin with NsVbi, default to np.inf * fix docstring parameter descriptions
Problem
calcparams_desoto
withd2mutau
insinglediode
d2mutau
only for coefficients derived fromcalcparams_pvsyst
?cells_in_series
argument inbishop88
is redundant and inconsistent with the other argument with series cellsnNsVth
.Solution
As @cwhanse suggested, replace
voltage_builtin
withNsVbi
which is an output fromcalcparams_pvsyst
, andd2mutau
should also be passed throughcalcparams_pvsyst
in order to discourage users from using it with CEC or DeSoto models.Alternatives
Please suggest alternatives. One idea that was proposed originally was I think to lock in specific usage with the model, ie: have a separate
singlediode_desoto
andsinglediode_pvsyst
similar to thecalcparams_*
methods. Not sure how far down this needs to go, would it also apply tobishop88
?Additional context
this is an follow on to #504
The text was updated successfully, but these errors were encountered: