import numpy as np
import matplotlib.pyplot as plt
from DefectSimulation import defectSimu
example = defectSimu(Ndop = 1e14,doptype = 'n',temp = 300)
defect1 = {'type':'D','Et':0.,'sigma_e':1e-12,'sigma_h':1e-12,'Nt':1e12}
defect2 = {'type':'A','Et':0.,'sigma_e':1e-12,'sigma_h':1e-12,'Nt':1e12}
defect3 = {'type': 'DD','Nt': 1e12, 'Et': [-0.16,0.396], 'sigma_e': [1e-17, 1e-17], 'sigma_h': [1e-18, 1e-18]}
example.addDefect(defect1)
example.addDefect(defect2)
example.addDefect(defect3)
The current defect list can be shown with the function PrintDefectList
example.PrintDefectList()
The output should look like:
Defect No.0: {'type': 'D', 'Et': 0.0, 'sigma_e': 1e-12, 'sigma_h': 1e-12, 'Nt': 1000000000000.0}
Defect No.1: {'type': 'A', 'Et': 0.0, 'sigma_e': 1e-12, 'sigma_h': 1e-12, 'Nt': 1000000000000.0}
Defect No.2: {'type': 'DD', 'Nt': 1000000000000.0, 'Et': [-0.16, 0.396], 'sigma_e': [1e-17, 1e-17], 'sigma_h': [1e-18, 1e-18]}
You can also delete one or more of the defects using DelDefect
specify the defect index
example.DelDefect(0) ## This delete the defect with index 0 (so the defect 1)
example.PrintDefectList()
The output should like:
Defect No.0: {'type': 'A', 'Et': 0.0, 'sigma_e': 1e-12, 'sigma_h': 1e-12, 'Nt': 1000000000000.0}
Defect No.1: {'type': 'DD', 'Nt': 1000000000000.0, 'Et': [-0.16, 0.396], 'sigma_e': [1e-17, 1e-17], 'sigma_h': [1e-18, 1e-18]}
n0
, the hole concentration p0
and fraction of defect in each charge states f0list
are solvedprint(example.n0, example.p0, example.f0list, sep='\n')
The output should be:
9.89962077369e+13
947428.977266
[[ 9.99902181e-01 9.78186283e-05 0.00000000e+00]
[ 9.99911590e-01 2.00697999e-07 8.82097434e-05]]
The f0list is a numpy array with the dimension (no. of defect, 3). For each defect, the fraction of each charge states are listed in the 3 element array. Again the order is from the most negatively charged states to the most postively charged states. So:
SolveSS
, the excess minority carrier density nxc
needs to be defined, it can be one value or a list or an array of valuenlist, plist, flist = example.SolveSS(nxc=np.logspace(12,16,50))
The outputs are: the list of electron concentration, the list of hole concentration and the list of trap charge states distribution. The list of trap charge states distribution is an array with the dimension (no. of nxc, no. of defect, 3), it is similar to the f0list
described above.
A simple function calculateSSlifetime
can be used to calculate the steady state lifetime for minority carriers, majority carriers and apparent carriers. The photoconductance is also calculated (Actually the photoconductance times the thickness of sample).
dminorlist, tauminorlist, dmajlist, taumajorlist, dapplist, tauapplist, condlist = example.calculateSSlifetime(nlist, plist, flist)
plt.figure('Lifetime')
plt.plot(dminorlist,tauminorlist,label='Minority')
plt.plot(dmajlist,taumajorlist,label='Majority')
plt.plot(dapplist,tauapplist,label='Apparent')
plt.legend()
plt.loglog()
plt.xlabel('Excess carrier density [cm-3]')
plt.ylabel('Lifetime [s]')
You should get something like this:
6. Solve for Transient decay with SolveTransient
, the time list t
, inital electron concentration n_initial
, inital electron concentration p_initial
, inital trap charge state distribution list flist_initial
need to be defined, set the opt='decay'
t = np.linspace(0,1e-5,100000) ## You might need to play with the steps of time for convergency of the solver
nlist_t, plist_t, flist_t, gen = example.SolveTransient(t, n_initial=nlist[-1], p_initial=plist[-1], flist_initial=flist[-1], opt='decay')
## in this example, we use the steady state solution at nxc =1e16 cm-3 as the intial decay condition
The outputs are: the list of electron concentration, the list of hole concentration, the list of trap charge states distribution and the
list of generation rate (in this transient decay, it's a list of zeros)
A simple function calculateTranslifetime
can be used to calculate the steady state lifetime for minority carriers, majority carriers and apparent carriers. The photoconductance is also calculated (Actually the photoconductance times the thickness of sample).
dminorlist_t, tauminorlist_t, dmajlist_t, taumajorlist_t, dapplist_t, tauapplist_t, condlist_t = example.calculateTranslifetime(nlist_t, plist_t, t, gen)
plt.figure('Lifetime Transient Devay')
plt.plot(dminorlist_t,tauminorlist_t,label='Minority')
plt.plot(dmajlist_t,taumajorlist_t,label='Majority')
plt.plot(dapplist_t,tauapplist_t,label='Apparent')
plt.legend()
plt.loglog()
plt.xlabel('Excess carrier density [cm-3]')
plt.ylabel('Lifetime [s]')
plt.xlim([1e8,1e16])
You should get something like this:
7. Other functions for you to explore:
SolveTransient
, another parameter the generation rate fillG
needs to be defined, set the opt='fill'
. This can be used to simulate the carrier capture process of traps under a sharply switched on excitation.calculateChargeNeutrality
can be used to check the charge neutrality for given nlist
, plist
and flist
singlelevelSRH
and twolevelSRH
using analytical equations to calculate minority carrier lifetime for a single-level defect and a two-levels defect respectively. It should be noted that the analytical equations assumes Δn = ΔpcalculateRate
can be used to output the capture and emission rate from each defect level for given nlist
, plist
and flist
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。