@@ -94,14 +94,17 @@ def bishop88(diode_voltage, photocurrent, saturation_current,
94
94
nNsVth : numeric
95
95
product of thermal voltage ``Vth`` [V], diode ideality factor ``n``,
96
96
and number of series cells ``Ns``
97
- d2mutau : numeric
98
- PVSyst thin-film recombination parameter that is the ratio of thickness
99
- of the intrinsic layer squared :math:`d^2` and the diffusion length of
100
- charge carriers :math:`\\ mu \\ tau`, in volts [V], defaults to 0[V]
101
- NsVbi : numeric
102
- PVSyst thin-film recombination parameter that is the product of the PV
103
- module number of series cells ``Ns`` and the builtin voltage ``Vbi`` of
104
- the intrinsic layer, in volts [V], defaults to ``np.inf``
97
+ d2mutau : numeric, default 0
98
+ PVsyst parameter for cadmium-telluride (CdTe) and amorphous-silicon
99
+ (a-Si) modules that accounts for recombination current in the
100
+ intrinsic layer. The value is the ratio of intrinsic layer thickness
101
+ squared :math:`d^2` to the diffusion length of charge carriers
102
+ :math:`\\ mu \\ tau`. [V]
103
+ NsVbi : numeric, default np.inf
104
+ PVsyst parameter for cadmium-telluride (CdTe) and amorphous-silicon
105
+ (a-Si) modules that is the product of the PV module number of series
106
+ cells ``Ns`` and the builtin voltage ``Vbi`` of the intrinsic layer.
107
+ [V].
105
108
gradients : bool
106
109
False returns only I, V, and P. True also returns gradients
107
110
@@ -116,8 +119,8 @@ def bishop88(diode_voltage, photocurrent, saturation_current,
116
119
Notes
117
120
-----
118
121
The PVSyst thin-film recombination losses parameters ``d2mutau`` and
119
- ``NsVbi`` are only applied to cadmium-telluride (CdTe) and amorphous-
120
- silicon (a: Si) PV modules, [2]_, [3]_. The builtin voltage :math:`V_{bi}`
122
+ ``NsVbi`` should only be applied to cadmium-telluride (CdTe) and amorphous-
123
+ silicon (a- Si) PV modules, [2]_, [3]_. The builtin voltage :math:`V_{bi}`
121
124
should account for all junctions. For example: tandem and triple junction
122
125
cells would have builtin voltages of 1.8[V] and 2.7[V] respectively, based
123
126
on the default of 0.9[V] for a single junction. The parameter ``NsVbi``
@@ -173,7 +176,7 @@ def bishop88(diode_voltage, photocurrent, saturation_current,
173
176
174
177
def bishop88_i_from_v (voltage , photocurrent , saturation_current ,
175
178
resistance_series , resistance_shunt , nNsVth ,
176
- method = 'newton' ):
179
+ d2mutau = 0 , NsVbi = np . Inf , method = 'newton' ):
177
180
"""
178
181
Find current given any voltage.
179
182
@@ -192,6 +195,17 @@ def bishop88_i_from_v(voltage, photocurrent, saturation_current,
192
195
nNsVth : numeric
193
196
product of diode ideality factor (n), number of series cells (Ns), and
194
197
thermal voltage (Vth = k_b * T / q_e) in volts [V]
198
+ d2mutau : numeric, default 0
199
+ PVsyst parameter for cadmium-telluride (CdTe) and amorphous-silicon
200
+ (a-Si) modules that accounts for recombination current in the
201
+ intrinsic layer. The value is the ratio of intrinsic layer thickness
202
+ squared :math:`d^2` to the diffusion length of charge carriers
203
+ :math:`\\ mu \\ tau`. [V]
204
+ NsVbi : numeric, default np.inf
205
+ PVsyst parameter for cadmium-telluride (CdTe) and amorphous-silicon
206
+ (a-Si) modules that is the product of the PV module number of series
207
+ cells ``Ns`` and the builtin voltage ``Vbi`` of the intrinsic layer.
208
+ [V].
195
209
method : str
196
210
one of two optional search methods: either ``'brentq'``, a reliable and
197
211
bounded method or ``'newton'`` which is the default.
@@ -203,7 +217,7 @@ def bishop88_i_from_v(voltage, photocurrent, saturation_current,
203
217
"""
204
218
# collect args
205
219
args = (photocurrent , saturation_current , resistance_series ,
206
- resistance_shunt , nNsVth )
220
+ resistance_shunt , nNsVth , d2mutau , NsVbi )
207
221
208
222
def fv (x , v , * a ):
209
223
# calculate voltage residual given diode voltage "x"
@@ -216,8 +230,9 @@ def fv(x, v, *a):
216
230
# brentq only works with scalar inputs, so we need a set up function
217
231
# and np.vectorize to repeatedly call the optimizer with the right
218
232
# arguments for possible array input
219
- def vd_from_brent (voc , v , iph , isat , rs , rsh , gamma ):
220
- return brentq (fv , 0.0 , voc , args = (v , iph , isat , rs , rsh , gamma ))
233
+ def vd_from_brent (voc , v , iph , isat , rs , rsh , gamma , d2mutau , NsVbi ):
234
+ return brentq (fv , 0.0 , voc ,
235
+ args = (v , iph , isat , rs , rsh , gamma , d2mutau , NsVbi ))
221
236
222
237
vd_from_brent_vectorized = np .vectorize (vd_from_brent )
223
238
vd = vd_from_brent_vectorized (voc_est , voltage , * args )
@@ -235,7 +250,7 @@ def vd_from_brent(voc, v, iph, isat, rs, rsh, gamma):
235
250
236
251
def bishop88_v_from_i (current , photocurrent , saturation_current ,
237
252
resistance_series , resistance_shunt , nNsVth ,
238
- method = 'newton' ):
253
+ d2mutau = 0 , NsVbi = np . Inf , method = 'newton' ):
239
254
"""
240
255
Find voltage given any current.
241
256
@@ -254,6 +269,17 @@ def bishop88_v_from_i(current, photocurrent, saturation_current,
254
269
nNsVth : numeric
255
270
product of diode ideality factor (n), number of series cells (Ns), and
256
271
thermal voltage (Vth = k_b * T / q_e) in volts [V]
272
+ d2mutau : numeric, default 0
273
+ PVsyst parameter for cadmium-telluride (CdTe) and amorphous-silicon
274
+ (a-Si) modules that accounts for recombination current in the
275
+ intrinsic layer. The value is the ratio of intrinsic layer thickness
276
+ squared :math:`d^2` to the diffusion length of charge carriers
277
+ :math:`\\ mu \\ tau`. [V]
278
+ NsVbi : numeric, default np.inf
279
+ PVsyst parameter for cadmium-telluride (CdTe) and amorphous-silicon
280
+ (a-Si) modules that is the product of the PV module number of series
281
+ cells ``Ns`` and the builtin voltage ``Vbi`` of the intrinsic layer.
282
+ [V].
257
283
method : str
258
284
one of two optional search methods: either ``'brentq'``, a reliable and
259
285
bounded method or ``'newton'`` which is the default.
@@ -265,7 +291,7 @@ def bishop88_v_from_i(current, photocurrent, saturation_current,
265
291
"""
266
292
# collect args
267
293
args = (photocurrent , saturation_current , resistance_series ,
268
- resistance_shunt , nNsVth )
294
+ resistance_shunt , nNsVth , d2mutau , NsVbi )
269
295
# first bound the search using voc
270
296
voc_est = estimate_voc (photocurrent , saturation_current , nNsVth )
271
297
@@ -277,8 +303,9 @@ def fi(x, i, *a):
277
303
# brentq only works with scalar inputs, so we need a set up function
278
304
# and np.vectorize to repeatedly call the optimizer with the right
279
305
# arguments for possible array input
280
- def vd_from_brent (voc , i , iph , isat , rs , rsh , gamma ):
281
- return brentq (fi , 0.0 , voc , args = (i , iph , isat , rs , rsh , gamma ))
306
+ def vd_from_brent (voc , i , iph , isat , rs , rsh , gamma , d2mutau , NsVbi ):
307
+ return brentq (fi , 0.0 , voc ,
308
+ args = (i , iph , isat , rs , rsh , gamma , d2mutau , NsVbi ))
282
309
283
310
vd_from_brent_vectorized = np .vectorize (vd_from_brent )
284
311
vd = vd_from_brent_vectorized (voc_est , current , * args )
@@ -295,7 +322,8 @@ def vd_from_brent(voc, i, iph, isat, rs, rsh, gamma):
295
322
296
323
297
324
def bishop88_mpp (photocurrent , saturation_current , resistance_series ,
298
- resistance_shunt , nNsVth , method = 'newton' ):
325
+ resistance_shunt , nNsVth , d2mutau = 0 , NsVbi = np .Inf ,
326
+ method = 'newton' ):
299
327
"""
300
328
Find max power point.
301
329
@@ -312,6 +340,17 @@ def bishop88_mpp(photocurrent, saturation_current, resistance_series,
312
340
nNsVth : numeric
313
341
product of diode ideality factor (n), number of series cells (Ns), and
314
342
thermal voltage (Vth = k_b * T / q_e) in volts [V]
343
+ d2mutau : numeric, default 0
344
+ PVsyst parameter for cadmium-telluride (CdTe) and amorphous-silicon
345
+ (a-Si) modules that accounts for recombination current in the
346
+ intrinsic layer. The value is the ratio of intrinsic layer thickness
347
+ squared :math:`d^2` to the diffusion length of charge carriers
348
+ :math:`\\ mu \\ tau`. [V]
349
+ NsVbi : numeric, default np.inf
350
+ PVsyst parameter for cadmium-telluride (CdTe) and amorphous-silicon
351
+ (a-Si) modules that is the product of the PV module number of series
352
+ cells ``Ns`` and the builtin voltage ``Vbi`` of the intrinsic layer.
353
+ [V].
315
354
method : str
316
355
one of two optional search methods: either ``'brentq'``, a reliable and
317
356
bounded method or ``'newton'`` which is the default.
@@ -324,7 +363,7 @@ def bishop88_mpp(photocurrent, saturation_current, resistance_series,
324
363
"""
325
364
# collect args
326
365
args = (photocurrent , saturation_current , resistance_series ,
327
- resistance_shunt , nNsVth )
366
+ resistance_shunt , nNsVth , d2mutau , NsVbi )
328
367
# first bound the search using voc
329
368
voc_est = estimate_voc (photocurrent , saturation_current , nNsVth )
330
369
@@ -334,8 +373,9 @@ def fmpp(x, *a):
334
373
if method .lower () == 'brentq' :
335
374
# break out arguments for numpy.vectorize to handle broadcasting
336
375
vec_fun = np .vectorize (
337
- lambda voc , iph , isat , rs , rsh , gamma :
338
- brentq (fmpp , 0.0 , voc , args = (iph , isat , rs , rsh , gamma ))
376
+ lambda voc , iph , isat , rs , rsh , gamma , d2mutau , NsVbi :
377
+ brentq (fmpp , 0.0 , voc ,
378
+ args = (iph , isat , rs , rsh , gamma , d2mutau , NsVbi ))
339
379
)
340
380
vd = vec_fun (voc_est , * args )
341
381
elif method .lower () == 'newton' :
0 commit comments