Skip to content

Commit 063abf8

Browse files
committed
stickler, doc edits
1 parent d362d7b commit 063abf8

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

benchmarks/benchmarks/singlediode.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,9 @@ def setup(self, base_params, nsamples):
2828
self.io = 10**(-9 + 3. * rng(nsamples)) # 1e-9 to 1e-6 A
2929
self.rs = 5 * rng(nsamples) + 0.05 # 0.05 to 5.05 Ohm
3030
self.rsh = 10**(2 + 2 * rng(nsamples)) # 100 to 10000 Ohm
31-
self.n = 1 + 0.7 * rng(nsamples) # 1.0 to 1.7
32-
self.nNsVth = 72 * self.n * 0.025 # 72 cells in series, roughly 25C Tcell
31+
self.n = 1 + 0.7 * rng(nsamples) # 1.0 to 1.7
32+
# 72 cells in series, roughly 25C Tcell
33+
self.nNsVth = 72 * self.n * 0.025
3334
self.params = (self.il, self.io, self.rs, self.rsh, self.nNsVth)
3435

3536
def bishop88(self):

docs/sphinx/source/user_guide/singlediode.rst

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ where
2525
* :math:`n` is the diode (ideality) factor (unitless)
2626
* :math:`Ns` is the number of cells in series. Cells are assumed to be identical.
2727
* :math:`V_{th}` is the thermal voltage at each cell's junction, given by :math:`V_{th} = \frac{k}{q} T_K`,
28-
where :math:`k` is the Boltzmann constant (J/K), :math:`q` is the elementary charge (Couloumb) and :math:`T_k`
29-
is the cell temperature in K.
28+
where :math:`k` is the Boltzmann constant (J/K), :math:`q` is the elementary charge (Couloumb) and :math:`T_k`
29+
is the cell temperature in K.
3030

3131

3232
pvlib-python supports two ways to solve the single diode equation:
@@ -98,20 +98,17 @@ Differentiating :math:`V = V(I)` with respect to current, and applying the ident
9898

9999
.. math::
100100
101-
\frac{dV}{dI}\Bigr|_{I=I_{mp}} = -\left(R_s + \frac{R_{sh}}{1 + W\left( psi \right)} \right)\Bigr|_{I=I_{mp}}
101+
\frac{dV}{dI}\Bigr|_{I=I_{mp}} = -\left(R_s + \frac{R_{sh}}{1 + W\left( \psi \right)} \right)\Bigr|_{I=I_{mp}}
102102
103103
Combining the two expressions for :math:`\frac{dV}{dI}\Bigr|_{I=I_{mp}}` and rearranging yields
104104

105105
.. math::
106106
107-
\frac{\left(I_L + I_0 - I\right) R_sh - I R_s - n Ns V_th W\left( \psi \right)}{R_s + \frac{R_{sh}}{1 + W\left( psi \right)}}\Bigr|_{I=I_{mp}} - I_{mp} = 0.
107+
\frac{\left(I_L + I_0 - I\right) R_{sh} - I R_s - n Ns V_th W\left( \psi \right)}{R_s + \frac{R_{sh}}{1 + W\left( \psi \right)}}\Bigr|_{I=I_{mp}} - I_{mp} = 0.
108108
109109
The above equation is solved for :math:`I_{mp}` using Newton's method, and then :math:`V_{mp} = V \left( I_{mp} \right)` is computed.
110110

111111

112-
`Wikipedia: Theory of Solar Cells
113-
<https://en.wikipedia.org/wiki/Theory_of_solar_cells>`_,
114-
115112
Bishop's Algorithm
116113
------------------
117114
The function :func:`pvlib.singlediode.bishop88` uses an explicit solution [4]

0 commit comments

Comments
 (0)