@@ -722,15 +722,13 @@ def _spectral_correction(array, pw):
722
722
)
723
723
724
724
def singlediode (self , photocurrent , saturation_current ,
725
- resistance_series , resistance_shunt , nNsVth ,
726
- ivcurve_pnts = None ):
725
+ resistance_series , resistance_shunt , nNsVth ):
727
726
"""Wrapper around the :py:func:`pvlib.pvsystem.singlediode` function.
728
727
729
728
See :py:func:`pvsystem.singlediode` for details
730
729
"""
731
730
return singlediode (photocurrent , saturation_current ,
732
- resistance_series , resistance_shunt , nNsVth ,
733
- ivcurve_pnts = ivcurve_pnts )
731
+ resistance_series , resistance_shunt , nNsVth )
734
732
735
733
def i_from_v (self , voltage , photocurrent , saturation_current ,
736
734
resistance_series , resistance_shunt , nNsVth ):
@@ -2352,8 +2350,7 @@ def sapm_effective_irradiance(poa_direct, poa_diffuse, airmass_absolute, aoi,
2352
2350
2353
2351
2354
2352
def singlediode (photocurrent , saturation_current , resistance_series ,
2355
- resistance_shunt , nNsVth , ivcurve_pnts = None ,
2356
- method = 'lambertw' ):
2353
+ resistance_shunt , nNsVth , method = 'lambertw' ):
2357
2354
r"""
2358
2355
Solve the single diode equation to obtain a photovoltaic IV curve.
2359
2356
@@ -2405,14 +2402,6 @@ def singlediode(photocurrent, saturation_current, resistance_series,
2405
2402
junction in Kelvin, and :math:`q` is the charge of an electron
2406
2403
(coulombs). ``0 < nNsVth``. [V]
2407
2404
2408
- ivcurve_pnts : int, optional
2409
- Number of points in the desired IV curve. If not specified or 0, no
2410
- points on the IV curves will be produced.
2411
-
2412
- .. deprecated:: 0.10.0
2413
- Use :py:func:`pvlib.pvsystem.v_from_i` and
2414
- :py:func:`pvlib.pvsystem.i_from_v` instead.
2415
-
2416
2405
method : str, default 'lambertw'
2417
2406
Determines the method used to calculate points on the IV curve. The
2418
2407
options are ``'lambertw'``, ``'newton'``, or ``'brentq'``.
@@ -2430,12 +2419,7 @@ def singlediode(photocurrent, saturation_current, resistance_series,
2430
2419
* i_x - current, in amperes, at ``v = 0.5*v_oc``.
2431
2420
* i_xx - current, in amperes, at ``v = 0.5*(v_oc+v_mp)``.
2432
2421
2433
- A dict is returned when the input parameters are scalars or
2434
- ``ivcurve_pnts > 0``. If ``ivcurve_pnts > 0``, the output dictionary
2435
- will also include the keys:
2436
-
2437
- * i - IV curve current in amperes.
2438
- * v - IV curve voltage in volts.
2422
+ A dict is returned when the input parameters are scalars.
2439
2423
2440
2424
See also
2441
2425
--------
@@ -2459,13 +2443,6 @@ def singlediode(photocurrent, saturation_current, resistance_series,
2459
2443
that guarantees convergence by bounding the voltage between zero and
2460
2444
open-circuit.
2461
2445
2462
- If the method is either ``'newton'`` or ``'brentq'`` and ``ivcurve_pnts``
2463
- are indicated, then :func:`pvlib.singlediode.bishop88` [4]_ is used to
2464
- calculate the points on the IV curve points at diode voltages from zero to
2465
- open-circuit voltage with a log spacing that gets closer as voltage
2466
- increases. If the method is ``'lambertw'`` then the calculated points on
2467
- the IV curve are linearly spaced.
2468
-
2469
2446
References
2470
2447
----------
2471
2448
.. [1] S.R. Wenham, M.A. Green, M.E. Watt, "Applied Photovoltaics" ISBN
@@ -2482,21 +2459,13 @@ def singlediode(photocurrent, saturation_current, resistance_series,
2482
2459
photovoltaic cell interconnection circuits" JW Bishop, Solar Cell (1988)
2483
2460
https://doi.org/10.1016/0379-6787(88)90059-2
2484
2461
"""
2485
- if ivcurve_pnts :
2486
- warn_deprecated ('0.10.0' , name = 'pvlib.pvsystem.singlediode' ,
2487
- alternative = ('pvlib.pvsystem.v_from_i and '
2488
- 'pvlib.pvsystem.i_from_v' ),
2489
- obj_type = 'parameter ivcurve_pnts' ,
2490
- removal = '0.11.0' )
2491
2462
args = (photocurrent , saturation_current , resistance_series ,
2492
2463
resistance_shunt , nNsVth ) # collect args
2493
2464
# Calculate points on the IV curve using the LambertW solution to the
2494
2465
# single diode equation
2495
2466
if method .lower () == 'lambertw' :
2496
- out = _singlediode ._lambertw (* args , ivcurve_pnts )
2467
+ out = _singlediode ._lambertw (* args )
2497
2468
points = out [:7 ]
2498
- if ivcurve_pnts :
2499
- ivcurve_i , ivcurve_v = out [7 :]
2500
2469
else :
2501
2470
# Calculate points on the IV curve using either 'newton' or 'brentq'
2502
2471
# methods. Voltages are determined by first solving the single diode
@@ -2518,21 +2487,10 @@ def singlediode(photocurrent, saturation_current, resistance_series,
2518
2487
)
2519
2488
points = i_sc , v_oc , i_mp , v_mp , p_mp , i_x , i_xx
2520
2489
2521
- # calculate the IV curve if requested using bishop88
2522
- if ivcurve_pnts :
2523
- vd = v_oc * (
2524
- (11.0 - np .logspace (np .log10 (11.0 ), 0.0 , ivcurve_pnts )) / 10.0
2525
- )
2526
- ivcurve_i , ivcurve_v , _ = _singlediode .bishop88 (vd , * args )
2527
-
2528
2490
columns = ('i_sc' , 'v_oc' , 'i_mp' , 'v_mp' , 'p_mp' , 'i_x' , 'i_xx' )
2529
2491
2530
- if all (map (np .isscalar , args )) or ivcurve_pnts :
2492
+ if all (map (np .isscalar , args )):
2531
2493
out = {c : p for c , p in zip (columns , points )}
2532
-
2533
- if ivcurve_pnts :
2534
- out .update (i = ivcurve_i , v = ivcurve_v )
2535
-
2536
2494
return out
2537
2495
2538
2496
points = np .atleast_1d (* points ) # convert scalars to 1d-arrays
0 commit comments