In [1]:
%matplotlib inline
%load_ext autoreload
%autoreload 2
import numpy as np
import matplotlib.pyplot as plt
from pypvcell.solarcell import SQCell,MJCell,DBCell
from pypvcell.illumination import Illumination,load_blackbody
from pypvcell.photocurrent import gen_step_qe
Reference spectrum: Blackbody at 6000K
In [2]:
one_sun_ill=load_blackbody(T=6000,normalize_to=1000)
one_sun_ill.rsum()
Out[2]:
In [3]:
sq_cell = SQCell(eg=1.31, cell_T=300, n_c=1, n_s=1)
sq_cell.set_input_spectrum(input_spectrum=one_sun_ill)
print(sq_cell.get_eta())
In [4]:
s1 = SQCell(eg=1.88, cell_T=300, n_c=1, n_s=1)
s2 = SQCell(eg=0.98, cell_T=300, n_c=1, n_s=1)
mj=MJCell([s1,s2])
mj.set_input_spectrum(input_spectrum=one_sun_ill)
print(mj.get_eta())
print(mj.get_subcell_jsc())
In [5]:
#mechanical stack
mj=MJCell([s1,s2],connect='MS')
mj.set_input_spectrum(input_spectrum=one_sun_ill)
print(mj.get_eta())
print(mj.get_subcell_jsc())
In [6]:
s1 = SQCell(eg=2.26, cell_T=300, n_c=1, n_s=1)
s2 = SQCell(eg=1.44, cell_T=300, n_c=1, n_s=1)
s3 = SQCell(eg=0.82, cell_T=300, n_c=1, n_s=1)
mj=MJCell([s1,s2,s3],connect='2T')
mj.set_input_spectrum(input_spectrum=one_sun_ill)
print(mj.get_eta())
print(mj.get_subcell_jsc())
In [7]:
mj=MJCell([s1,s2,s3],connect='MS')
mj.set_input_spectrum(input_spectrum=one_sun_ill)
print(mj.get_eta())
print(mj.get_subcell_jsc())
In [8]:
input_ill=Illumination("AM1.5g",concentration=1)
top_eg=np.linspace(1.6,2,num=100) # Set up range of top cell band gaps
eta=np.zeros(100) # Initialize an array for storing efficiencies
jsc_ratio=np.zeros_like(eta)
si_cell=SQCell(eg=1.12,cell_T=293,n_c=3.5,n_s=3.5)
for i,teg in enumerate(top_eg):
#qe=gen_step_qe(teg,1)
#tc=DBCell(qe,rad_eta=1,T=293,n_c=3.5,n_s=1) # Set up top cell
tc=SQCell(eg=teg,cell_T=293,n_c=3.5,n_s=1)
mj=MJCell([tc, si_cell]) # Make multijunction cell by "streaming" the 1J cells
mj.set_input_spectrum(input_ill) # Set up the illumination
eta[i]=mj.get_eta() # Store the calculated efficiency in an array
jsc_a=mj.get_subcell_jsc()
jsc_ratio[i]=jsc_a[0]/jsc_a[1]
In [9]:
plt.plot(top_eg,eta)
plt.xlabel("band gap of top cell (eV)")
plt.ylabel("efficiency")
plt.savefig("sj_on_si.pdf")
In [10]:
top_eg[np.argmax(eta)]
Out[10]:
In [11]:
np.max(eta)
Out[11]:
In [ ]: