Closed
Description
One cannot define resistance_series = 0
or resistance_shunt = numpy.inf
as "ideal" device parameters in pvlib.pvsystem.singlediode()
. See the error below for example.
Is this feature valued enough for me to make a PR that adds this capability?
Input:
import sys
print("Python version: %s.%s.%s" % sys.version_info[:3])
import numpy as np
print("Numpy version: " + np.version.version)
import scipy as sp
print("Scipy version: " + sp.version.version)
import pvlib
i_ph_A = 2.13643772
i_rs_A = 2.10905501e-05
n_mod_V = 9.91331584
r_s_Ohm = 3.63866316
r_s_Ohm = 0.
g_p_Mho = 2.45880685e-03
pvlib.pvsystem.singlediode(i_ph_A, i_rs_A, r_s_Ohm, 1./g_p_Mho, n_mod_V)
with output:
Python version: 3.6.1
Numpy version: 1.12.1
Scipy version: 0.19.0
/Users/markcampanelli/anaconda3/lib/python3.6/site-packages/pvlib/pvsystem.py:1943: RuntimeWarning: divide by zero encountered in true_divide
I = -V/(Rs + Rsh) - (nNsVth/Rs)*lambertwterm + Rsh*(IL + I0)/(Rs + Rsh)
/Users/markcampanelli/anaconda3/lib/python3.6/site-packages/pvlib/pvsystem.py:1943: RuntimeWarning: invalid value encountered in double_scalars
I = -V/(Rs + Rsh) - (nNsVth/Rs)*lambertwterm + Rsh*(IL + I0)/(Rs + Rsh)
Out[1]:
OrderedDict([('i_sc', nan),
('v_oc', 112.87971015555131),
('i_mp', nan),
('v_mp', 0.02227117920245893),
('p_mp', nan),
('i_x', nan),
('i_xx', nan)])