@@ -94,14 +94,17 @@ def bishop88(diode_voltage, photocurrent, saturation_current,
9494 nNsVth : numeric
9595 product of thermal voltage ``Vth`` [V], diode ideality factor ``n``,
9696 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].
105108 gradients : bool
106109 False returns only I, V, and P. True also returns gradients
107110
@@ -116,8 +119,8 @@ def bishop88(diode_voltage, photocurrent, saturation_current,
116119 Notes
117120 -----
118121 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}`
121124 should account for all junctions. For example: tandem and triple junction
122125 cells would have builtin voltages of 1.8[V] and 2.7[V] respectively, based
123126 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,
173176
174177def bishop88_i_from_v (voltage , photocurrent , saturation_current ,
175178 resistance_series , resistance_shunt , nNsVth ,
176- method = 'newton' ):
179+ d2mutau = 0 , NsVbi = np . Inf , method = 'newton' ):
177180 """
178181 Find current given any voltage.
179182
@@ -192,6 +195,17 @@ def bishop88_i_from_v(voltage, photocurrent, saturation_current,
192195 nNsVth : numeric
193196 product of diode ideality factor (n), number of series cells (Ns), and
194197 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].
195209 method : str
196210 one of two optional search methods: either ``'brentq'``, a reliable and
197211 bounded method or ``'newton'`` which is the default.
@@ -203,7 +217,7 @@ def bishop88_i_from_v(voltage, photocurrent, saturation_current,
203217 """
204218 # collect args
205219 args = (photocurrent , saturation_current , resistance_series ,
206- resistance_shunt , nNsVth )
220+ resistance_shunt , nNsVth , d2mutau , NsVbi )
207221
208222 def fv (x , v , * a ):
209223 # calculate voltage residual given diode voltage "x"
@@ -216,8 +230,9 @@ def fv(x, v, *a):
216230 # brentq only works with scalar inputs, so we need a set up function
217231 # and np.vectorize to repeatedly call the optimizer with the right
218232 # 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 ))
221236
222237 vd_from_brent_vectorized = np .vectorize (vd_from_brent )
223238 vd = vd_from_brent_vectorized (voc_est , voltage , * args )
@@ -235,7 +250,7 @@ def vd_from_brent(voc, v, iph, isat, rs, rsh, gamma):
235250
236251def bishop88_v_from_i (current , photocurrent , saturation_current ,
237252 resistance_series , resistance_shunt , nNsVth ,
238- method = 'newton' ):
253+ d2mutau = 0 , NsVbi = np . Inf , method = 'newton' ):
239254 """
240255 Find voltage given any current.
241256
@@ -254,6 +269,17 @@ def bishop88_v_from_i(current, photocurrent, saturation_current,
254269 nNsVth : numeric
255270 product of diode ideality factor (n), number of series cells (Ns), and
256271 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].
257283 method : str
258284 one of two optional search methods: either ``'brentq'``, a reliable and
259285 bounded method or ``'newton'`` which is the default.
@@ -265,7 +291,7 @@ def bishop88_v_from_i(current, photocurrent, saturation_current,
265291 """
266292 # collect args
267293 args = (photocurrent , saturation_current , resistance_series ,
268- resistance_shunt , nNsVth )
294+ resistance_shunt , nNsVth , d2mutau , NsVbi )
269295 # first bound the search using voc
270296 voc_est = estimate_voc (photocurrent , saturation_current , nNsVth )
271297
@@ -277,8 +303,9 @@ def fi(x, i, *a):
277303 # brentq only works with scalar inputs, so we need a set up function
278304 # and np.vectorize to repeatedly call the optimizer with the right
279305 # 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 ))
282309
283310 vd_from_brent_vectorized = np .vectorize (vd_from_brent )
284311 vd = vd_from_brent_vectorized (voc_est , current , * args )
@@ -295,7 +322,8 @@ def vd_from_brent(voc, i, iph, isat, rs, rsh, gamma):
295322
296323
297324def 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' ):
299327 """
300328 Find max power point.
301329
@@ -312,6 +340,17 @@ def bishop88_mpp(photocurrent, saturation_current, resistance_series,
312340 nNsVth : numeric
313341 product of diode ideality factor (n), number of series cells (Ns), and
314342 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].
315354 method : str
316355 one of two optional search methods: either ``'brentq'``, a reliable and
317356 bounded method or ``'newton'`` which is the default.
@@ -324,7 +363,7 @@ def bishop88_mpp(photocurrent, saturation_current, resistance_series,
324363 """
325364 # collect args
326365 args = (photocurrent , saturation_current , resistance_series ,
327- resistance_shunt , nNsVth )
366+ resistance_shunt , nNsVth , d2mutau , NsVbi )
328367 # first bound the search using voc
329368 voc_est = estimate_voc (photocurrent , saturation_current , nNsVth )
330369
@@ -334,8 +373,9 @@ def fmpp(x, *a):
334373 if method .lower () == 'brentq' :
335374 # break out arguments for numpy.vectorize to handle broadcasting
336375 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 ))
339379 )
340380 vd = vec_fun (voc_est , * args )
341381 elif method .lower () == 'newton' :
0 commit comments