pvconstants

This module contains configuration constants for PVMismatch, such as number of points in IV curve to calculate, flag to use parallel processing and parallel processing parameters. This module also contains some utility functions like npinterpx() and get_series_cells() are defined here too.

PVconstants

class pvmismatch.pvmismatch_lib.pvconstants.PVconstants(npts=101)

Class for configuration constants

Parameters:npts (int) – number of points in IV curve
E0 = 1000.0

[W/m^2] irradiance of 1 sun

Imod_negpts = None

array of points with decreasing spacing from 1 to just less than but not including zero

Imod_pts = None

array of points with increasing spacing from 0 to 1

T0 = 298.15

[K] reference temperature

calcParallel(I, V, Vmax, Vmin)

Calculate IV curve for cells and substrings in parallel.

Parameters:
  • I – currents [A]
  • V – voltages [V]
  • Vmax – max voltage limit, should be max Voc [V]
  • Vmin – min voltage limit, could be zero or Vrbd [V]
Type:

I: list, numpy.ndarray

Type:

V: list, numpy.ndarray

calcSeries(I, V, meanIsc, Imax)

Calculate IV curve for cells and substrings in series given current and voltage in increasing order by voltage, the average short circuit current and the max current at the breakdown voltage.

Parameters:
  • I – cell or substring currents [A]
  • V – cell or substring voltages [V]
  • meanIsc – average short circuit current [A]
  • Imax – maximum current [A]
Returns:

current [A] and voltage [V] of series

k = 1.38064852e-23

[kJ/mole/K] Boltzmann constant

negpts = None

array of points with increasing spacing from 1 to just less than but not including zero

npts

number of points in IV curves

pts = None

array of points with decreasing spacing from 0 to 1

q = 1.6021766208e-19

[Coloumbs] elementary charge

NumPy Extrapolating Interpolant

pvmismatch.pvmismatch_lib.pvconstants.npinterpx(x, xp, fp)

Numpy interpolation function with linear extrapolation.

Parameters:
  • x (array_like) – The x-coordinates of the interpolated values.
  • xp (1-D sequence of floats) – The x-coordinates of the data points, must be increasing.
  • fp (1-D sequence of floats) – The y-coordinates of the data points, same length as xp.
Returns:

y – The interpolated values, same shape as x.

Return type:

{float, ndarray}

Raises:

ValueError – If xp and fp have different length

Get Series Cells

pvmismatch.pvmismatch_lib.pvconstants.get_series_cells(cell_pos_column, prev_col=None)

Get the sequence of series cells between parallel crossties.

Parameters:
  • cell_pos_column – column in cell position pattern
  • prev_col – previous column in cell position pattern
Returns:

indices of series cells

Formulas

Vdiode

pvmismatch.pvmismatch_lib.pvconstants.Vdiode(Icell, Vcell, Rs)

Calculate Vdiode from current, voltage and series resistance.

Parameters:
  • Icell – cell current [A]
  • Vcell – cell voltage [V]
  • Rs – cell series resistance [\(\Omega\)]
Returns:

diode voltage [V]

Idiode

pvmismatch.pvmismatch_lib.pvconstants.Idiode(Isat, Vdiode, Vt, n)

Calculate diode current using Shockley diode model.

Parameters:
  • Isat – diode saturation current [A]
  • Vdiode – diode voltage [V]
  • Vt – thermal voltage [V]
  • n – diode ideality factor
Returns:

diode current

Note

Thermal voltage is defined as …

\[V_t = \frac {k_B * T} {q_e}\]

Ishunt

pvmismatch.pvmismatch_lib.pvconstants.Ishunt(Vdiode, Rsh)

Igen

pvmismatch.pvmismatch_lib.pvconstants.Igen(Aph, Ee, Isc0)