Skip to content

Commit d924446

Browse files
Mark Campanelliwholmgren
Mark Campanelli
authored andcommitted
Support ideal PV devices (#324) (#340)
* Add draft i_from_v_alt function with tests * Better comments and more explicit typing * Use transform from shunt resistance to shunt conductance * Add v_from_i_alt() with initial tests and use np.where * Use test fixtures * Add @requires_scipy to test fixtures * More current_sum_at_diode_node() tests and using fixture * Naming, documentation, and formatting * Deprecate replaced functions and flake8 * Add release documentation and flake8 again * Replace deprecated function usages and update test_singlediode_series_ivcurve * Conform to existing API * Run flake8 * Implement some code quality suggestions * Remove extraneous print statements * Better docstrings * Fix parameter ranges in docstrings * Add test that overflows lambertw arg * Add test for mixed solution types logic * Use broadcast_arrays for cleaner code * One more simplification * Better use of broadcast_arrays
1 parent 5e59ec3 commit d924446

File tree

7 files changed

+478
-140
lines changed

7 files changed

+478
-140
lines changed

docs/sphinx/source/api.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,10 +201,10 @@ Functions relevant for the single diode model.
201201
.. autosummary::
202202
:toctree: generated/
203203

204-
pvsystem.singlediode
205204
pvsystem.calcparams_desoto
206-
pvsystem.v_from_i
207205
pvsystem.i_from_v
206+
pvsystem.singlediode
207+
pvsystem.v_from_i
208208

209209
SAPM model
210210
----------

docs/sphinx/source/whatsnew/v0.5.1.rst

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,35 @@ Bug fixes
1616
Enhancements
1717
~~~~~~~~~~~~
1818
* Improve clearsky.lookup_linke_turbidity speed. (:issue:`368`)
19+
* Ideal devices supported in single diode model, e.g.,
20+
resistance_series = 0 and/or resistance_shunt = numpy.inf (:issue:`340`)
21+
* `pvsystem.v_from_i` and `pvsystem.i_from_v` computations for near ideal
22+
devices are more numerically stable. However, very, very near ideal
23+
resistance_series and/or resistance_shunt may still cause issues with the
24+
implicit solver (:issue:`340`)
25+
26+
API Changes
27+
~~~~~~~~~~~
28+
* `pvsystem.v_from_i` and `pvsystem.i_from_v` functions now accept
29+
resistance_series = 0 and/or resistance_shunt = numpy.inf as inputs
30+
(:issue:`340`)
1931

2032
Documentation
2133
~~~~~~~~~~~~~
2234
* Doc string of modelchain.basic_chain was updated to describe args
2335
more accurately
36+
* Doc strings of `singlediode`, `pvsystem.v_from_i`, and `pvsystem.i_from_v`
37+
were updated to describe acceptable input arg ranges
2438

2539
Testing
2640
~~~~~~~
2741
* Changed test for clearsky.haurwitz to operate on zenith angles
42+
* Significant new test cases added for `pvsystem.v_from_i` and
43+
`pvsystem.i_from_v` (:issue:`340`)
2844

2945
Contributors
3046
~~~~~~~~~~~~
3147
* Cliff Hansen
3248
* KonstantinTr
3349
* Will Holmgren
50+
* Mark Campanelli

pvlib/atmosphere.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ def first_solar_spectral_correction(pw, airmass_absolute, module_type=None,
380380
The module used to calculate the spectral correction
381381
coefficients corresponds to the Mult-crystalline silicon
382382
Manufacturer 2 Model C from [3]_. Spectral Response (SR) of CIGS
383-
and a-Si modules used to derive coefficients can be found in [4]_
383+
and a-Si modules used to derive coefficients can be found in [4]_
384384
385385
coefficients : None or array-like, default None
386386
allows for entry of user defined spectral correction

0 commit comments

Comments
 (0)