Skip to content

Commit ac6d9b8

Browse files
committed
update desoto variable names
1 parent 1c8223a commit ac6d9b8

File tree

2 files changed

+22
-23
lines changed

2 files changed

+22
-23
lines changed

pvlib/pvsystem.py

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -260,8 +260,8 @@ def physicaliam(K, L, n, aoi):
260260
return IAM
261261

262262

263-
def calcparams_desoto(S, temp_cell, alpha_isc, module_parameters, EgRef,
264-
dEgdT, M=1, Sref=1000, Tref=25):
263+
def calcparams_desoto(poa_global, temp_cell, alpha_isc, module_parameters,
264+
EgRef, dEgdT, M=1, irrad_ref=1000, temp_ref=25):
265265
'''
266266
Applies the temperature and irradiance corrections to
267267
inputs for singlediode.
@@ -275,7 +275,7 @@ def calcparams_desoto(S, temp_cell, alpha_isc, module_parameters, EgRef,
275275
276276
Parameters
277277
----------
278-
S : float or Series
278+
poa_global : float or Series
279279
The irradiance (in W/m^2) absorbed by the module.
280280
281281
temp_cell : float or Series
@@ -317,9 +317,7 @@ def calcparams_desoto(S, temp_cell, alpha_isc, module_parameters, EgRef,
317317
DataFrame of dEgdT values corresponding to each input condition (this
318318
may be useful if dEgdT is a function of temperature).
319319
320-
Other Parameters
321-
----------------
322-
M : float or DataFrame (optional, Default=1)
320+
M : float or Series (optional, default=1)
323321
An optional airmass modifier, if omitted, M is given a value of 1,
324322
which assumes absolute (pressure corrected) airmass = 1.5. In this
325323
code, M is equal to M/Mref as described in [1] (i.e. Mref is assumed
@@ -329,33 +327,33 @@ def calcparams_desoto(S, temp_cell, alpha_isc, module_parameters, EgRef,
329327
>>> M = np.polyval([-0.000126, 0.002816, -0.024459, 0.086257, 0.918093],
330328
... AMa) # doctest: +SKIP
331329
332-
M may be a DataFrame.
330+
M may be a Series.
333331
334-
Sref : float (optional, Default=1000)
335-
Optional reference irradiance in W/m^2. If omitted, a value of
336-
1000 is used.
332+
irrad_ref : float (optional, default=1000)
333+
Reference irradiance in W/m^2.
337334
338-
Tref : float (Optional, Default=25)
339-
Optional reference cell temperature in C. If omitted, a value of
340-
25 C is used.
335+
temp_ref : float (optional, default=25)
336+
Reference cell temperature in C.
341337
342338
Returns
343339
-------
344-
IL : float or DataFrame
340+
Tuple of the following results:
341+
342+
photocurrent : float or Series
345343
Light-generated current in amperes at irradiance=S and
346344
cell temperature=Tcell.
347345
348-
I0 : float or DataFrame
346+
saturation_current : float or Series
349347
Diode saturation curent in amperes at irradiance
350348
S and cell temperature Tcell.
351349
352-
Rs : float
350+
resistance_series : float
353351
Series resistance in ohms at irradiance S and cell temperature Tcell.
354352
355-
Rsh : float or DataFrame
353+
resistance_shunt : float or Series
356354
Shunt resistance in ohms at irradiance S and cell temperature Tcell.
357355
358-
nNsVth : float or DataFrame
356+
nNsVth : float or Series
359357
Modified diode ideality factor at irradiance S and cell temperature
360358
Tcell. Note that in source [1] nNsVth = a (equation 2). nNsVth is the
361359
product of the usual diode ideality factor (n), the number of
@@ -456,17 +454,17 @@ def calcparams_desoto(S, temp_cell, alpha_isc, module_parameters, EgRef,
456454
Rs_ref = module_parameters['R_s']
457455

458456
k = 8.617332478e-05
459-
Tref_K = Tref + 273.15
457+
Tref_K = temp_ref + 273.15
460458
Tcell_K = temp_cell + 273.15
461459

462460
E_g = EgRef * (1 + dEgdT*(Tcell_K - Tref_K))
463461

464462
nNsVth = a_ref * (Tcell_K / Tref_K)
465463

466-
IL = S / Sref * M * (IL_ref + alpha_isc * (Tcell_K - Tref_K))
464+
IL = poa_global/irrad_ref * M * (IL_ref + alpha_isc * (Tcell_K - Tref_K))
467465
I0 = ( I0_ref * ((Tcell_K / Tref_K) ** 3) *
468466
(np.exp(EgRef / (k*(Tref_K)) - (E_g / (k*(Tcell_K))))) )
469-
Rsh = Rsh_ref * (Sref / S)
467+
Rsh = Rsh_ref * (irrad_ref / poa_global)
470468
Rs = Rs_ref
471469

472470
return IL, I0, Rs, Rsh, nNsVth

pvlib/test/test_pvsystem.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def test_sapm():
114114

115115
def test_calcparams_desoto():
116116
cecmodule = sam_data['cecmod'].Example_Module
117-
pvsystem.calcparams_desoto(S=irrad_data.GHI,
117+
pvsystem.calcparams_desoto(irrad_data.GHI,
118118
temp_cell=25,
119119
alpha_isc=cecmodule['Alpha_sc'],
120120
module_parameters=cecmodule,
@@ -129,7 +129,8 @@ def test_i_from_v():
129129

130130
def test_singlediode_series():
131131
cecmodule = sam_data['cecmod'].Example_Module
132-
IL, I0, Rs, Rsh, nNsVth = pvsystem.calcparams_desoto(S=irrad_data.GHI,
132+
IL, I0, Rs, Rsh, nNsVth = pvsystem.calcparams_desoto(
133+
irrad_data.GHI,
133134
temp_cell=25,
134135
alpha_isc=cecmodule['Alpha_sc'],
135136
module_parameters=cecmodule,

0 commit comments

Comments
 (0)