qpv-research-group / ECoPV

1 stars 0 forks source link

[BUG] Reflectance is not included in calculation of dark current #2

Open phoebe-p opened 1 year ago

phoebe-p commented 1 year ago

In db_cell_calculation, the dark current/recombination current is currently calculated as:

        j01s[i] = (
            (pref / rad_eff)
            * (eg**2 + 2 * eg * (kbT) + 2 * (kbT) ** 2)
            * np.exp(-(eg) / (kbT))
        )

Which is the solution to the definite integral for J01 assuming no reflection and perfect absorption above the bandgap energy. This should be changed to included reflectance (and possibly non-perfect absorption if we want to consider more realistic cell calculations).

phoebe-p commented 1 year ago

Some quick tests show that introducing the numerical integral (either using the numpy trapz function or just by doing rectangular areas under the curve) is slower than the current analytical solution by about a factor of 300. Give the large difference, I think it is worth keeping the current method for the case that all the bandgaps are above the coloured wavelength range. It may also be worth just ignoring the effect on the dark current if the difference is negligible (the effect on current should be, but the effect on voltage might be more not negligible), but I haven't quantified this yet.

phoebe-p commented 1 year ago

For rectangular reflectance peaks (of height 1 or otherwise), we can also use the indefinite integral:

kT (2 (kT)**2+2 kT E +E**2) (-exp((qV-E)/k)) + constant

and evaluate this piecewise in the areas where R = 0. This should not be much slower than the current analytical solution for the full range of integration.