@@ -74,8 +74,8 @@ def bishop88(diode_voltage, photocurrent, saturation_current,
74
74
75
75
.. warning::
76
76
* Do not use ``d2mutau`` with CEC coefficients.
77
- * Usage of ``d2mutau`` with PVSyst coefficients is required for CdTe and
78
- a:Si modules.
77
+ * Usage of ``d2mutau`` with PVSyst coefficients is required for cadmium-
78
+ telluride (CdTe) and amorphous-silicon ( a:Si) PV modules only .
79
79
* For PVSyst CdTe and a:Si modules, the ``cells_in_series`` parameter
80
80
must only account for a single parallel sub-string if the module has
81
81
cells in parallel greater than 1.
@@ -95,7 +95,7 @@ def bishop88(diode_voltage, photocurrent, saturation_current,
95
95
nNsVth : numeric
96
96
product of thermal voltage ``Vth`` [V], diode ideality factor ``n``,
97
97
and number of series cells ``Ns``
98
- cells_in_series : int
98
+ cells_in_series : None or int
99
99
number of cells in series per parallel module sub-string, only required
100
100
for PVSyst thin-film recombination loss, if unset default is ``None``
101
101
which raises ``TypeError`` if ``d2mutau`` is set.
@@ -123,9 +123,9 @@ def bishop88(diode_voltage, photocurrent, saturation_current,
123
123
The PVSyst thin-film recombination losses parameters ``d2mutau`` and
124
124
``voltage_builtin`` are only applied to cadmium-telluride (CdTe) and
125
125
amorphous-silicon (a:Si) PV modules, [2]_, [3]_. The builtin voltage should
126
- account for all junctions. *EG* : tandem and triple junction cell would have
127
- builtin voltages of 1.8[V] and 2.7[V] respectively, based on the default of
128
- 0.9[V] for a single junction.
126
+ account for all junctions. For example : tandem and triple junction cell
127
+ would have builtin voltages of 1.8[V] and 2.7[V] respectively, based on the
128
+ default of 0.9[V] for a single junction.
129
129
130
130
References
131
131
----------
@@ -143,11 +143,12 @@ def bishop88(diode_voltage, photocurrent, saturation_current,
143
143
2010
144
144
:doi:`10.4229/25thEUPVSEC2010-4BV.1.114`
145
145
"""
146
- # check if need to calculate recombination loss current
147
- i_recomb , v_recomb = 0 , np .inf
148
- if d2mutau > 0 :
149
- v_recomb = voltage_builtin * cells_in_series - diode_voltage
150
- i_recomb = photocurrent * d2mutau / v_recomb
146
+ # calculate recombination loss current where d2mutau > 0
147
+ is_recomb = d2mutau > 0 # True where there is thin-film recombination loss
148
+ v_recomb = np .where (is_recomb ,
149
+ voltage_builtin * cells_in_series - diode_voltage ,
150
+ np .inf )
151
+ i_recomb = np .where (is_recomb , photocurrent * d2mutau / v_recomb , 0 )
151
152
# calculate temporary values to simplify calculations
152
153
v_star = diode_voltage / nNsVth # non-dimensional diode voltage
153
154
g_sh = 1.0 / resistance_shunt # conductance
@@ -156,11 +157,9 @@ def bishop88(diode_voltage, photocurrent, saturation_current,
156
157
v = diode_voltage - i * resistance_series
157
158
retval = (i , v , i * v )
158
159
if gradients :
159
- # check again if need to calculate recombination loss current gradients
160
- grad_i_recomb = grad_2i_recomb = 0
161
- if d2mutau > 0 :
162
- grad_i_recomb = i_recomb / v_recomb
163
- grad_2i_recomb = 2 * grad_i_recomb / v_recomb
160
+ # calculate recombination loss current gradients where d2mutau > 0
161
+ grad_i_recomb = np .where (is_recomb , i_recomb / v_recomb , 0 )
162
+ grad_2i_recomb = np .where (is_recomb , 2 * grad_i_recomb / v_recomb , 0 )
164
163
g_diode = saturation_current * np .exp (v_star ) / nNsVth # conductance
165
164
grad_i = - g_diode - g_sh - grad_i_recomb # di/dvd
166
165
grad_v = 1.0 - grad_i * resistance_series # dv/dvd
0 commit comments