cogenda / pyEDA

A python framework for EDA applications.
http://www.cogenda.com
34 stars 16 forks source link

heterojunctions #3

Open johnjoo1 opened 11 years ago

johnjoo1 commented 11 years ago

Has anyone had problems adapting the 'diode' script to function with heterojunctions? I edited the DDEqns.py file to include more materials.

When I try making a p-Cu2O/n-ZnO junction, the program determines an unrealistically high voltage for the Cu2O.

Here are the two materials that I added to DDEqns.py:


class Cu2OMaterial(object):
    def __init__(self):
        self.eps = 6.3*Unit.eps0
        self.affinity = 3.2*Unit.V
        self.Eg = 2.0*Unit.V
        kb = 1.3806503e-23
        T = 298.18
        hbar = 1.054571596e-34
        m_e=9.10938188*10**-31 #kg
        mh=.58*m_e #"Thin film deposition of Cu2O and application for solar cells"
        me=.99*m_e #Biccari thesis
        self.Nv=2.*(mh*kb*T/(2.*np.pi*hbar**2))**(3./2. )#m**-3
        self.Nc=2.*(me*kb*T/(2.*np.pi*hbar**2))**(3./2.) #m**-3
        self.ni = sqrt(self.Nc*self.Nv*exp(-self.Eg/(kb*T/1.602e-19))) * 1./100.**3.*pow(Unit.cm, -3.0)  
        self.mun = 100*Unit.cm*Unit.cm/Unit.V/Unit.s
        self.mup = 90*Unit.cm*Unit.cm/Unit.V/Unit.s
        self.tau = 1e-7*Unit.s

class ZnOMaterial(object):
    def __init__(self):
        self.eps = 9.0*Unit.eps0 #Sze
        self.affinity = 4.2*Unit.V
        self.Eg = 3.3*Unit.V
        kb = 1.3806503e-23
        T = 298.18
        hbar = 1.054571596e-34
        m_e=9.10938188*10**-31 #kg
        mh=.59*m_e #"Zinc Oxide Nanostructures: Synthesis and Properties" Zhiyong Fan and Jia G. Lu
        me=.27*m_e #Sze
        self.Nv=2.*(mh*kb*T/(2.*np.pi*hbar**2))**(3./2. )#m**-3
        self.Nc=2.*(me*kb*T/(2.*np.pi*hbar**2))**(3./2.) #m**-3
        self.ni = sqrt(self.Nc*self.Nv*exp(-self.Eg/(kb*T/1.602e-19))) * 1./100.**3.*pow(Unit.cm, -3.0)
        self.mun = 200*Unit.cm*Unit.cm/Unit.V/Unit.s #"Zinc Oxide Nanostructures: Synthesis and Properties" Zhiyong Fan and Jia G. Lu
        self.mup = 30*Unit.cm*Unit.cm/Unit.V/Unit.s #"Zinc Oxide Nanostructures: Synthesis and Properties" Zhiyong Fan and Jia G. Lu
        self.tau = 1e-7*Unit.s
johnjoo1 commented 11 years ago

I think the problem must be due to the very low values of ni (intrinsic carrier concentration) for ZnO and Cu2O compared to Silicon's ni, 1.45e10 cm^-3.

cogenda commented 11 years ago
  1. Please check through pyEDA.Device.PhysUnit, change s from 1e6 to 1e12 may help convergence. Actually 1e12 is the standard scaling factor in our commercial simulator.
  2. Yes you are right, for wide bandgap materials, ni is too low, and the minority carrier density is even lower (1e-10 or lower). Unless you use 128bit floating point number, it's quite impossible to reach that precision.

Possible solution:

1. switch to single-carrier equation, e.g. solve for electron, and ignore hole

  1. artificially increase ni in the recombination rate calculation to ~ 1e10 range. You will get higher than normal minority carrier concentration, but that shouldn't affect your terminal current.

shenchen

On 2012-11-14 03:29, johnjoo1 wrote:

I think the problem must be due to the very low values of ni (intrinsic carrier concentration) for ZnO and Cu2O compared to Silicon's ni, 1.45e10 cm^-3.

Reply to this email directly or view it on GitHub [1].

Links:

[1] https://github.com/cogenda/pyEDA/issues/3#issuecomment-10339423

johnjoo1 commented 11 years ago

When I was using the ni for ZnO and Cu2O, I was getting convergence and simply getting unrealistic band bending.
I had altered the way that the minority carrier concentration was found to avoid the log(0) error for calculating: n=0.5_(C+math.sqrt(C_C+4_ni_ni)), when C was negative.

I tried two methods.

  1. Using a Taylor approximation: n = 0.5_(C + math.sqrt(C_C) + 4_ni_ni/(2_abs(C)) - (4_ni2)2/(8_abs(C)3) + (4_ni2)3/(16_abs(C)5) + 5_(4_ni2)4/(128_abs(C)**7).

and 2. Calculating p and converting to n using ni: n = ni*ni/p


I artificially changed the ni in the Rsrh calculation to the same as Si (1.45e10). That seemed to fix the unrealistic band bending. I am now getting approximately the same band bending that results from other simulations (AFORS HET), although it looks much more curved at the junction than I expect. Also, I am now have convergence issues and getting warning messages:"warning: (almost) singular matrix! (estimated cond. number: 4.17e+12)"

Changing s in pyEDA.Device.PhysUnit from 1e6 to 1e12 did not seem to have any effect.


I am not really sure what you mean by switching to a single carrier equation. I am simulating a p-n junction, so it seems like I will always have a problem with one of the carriers having a very small carrier density. Also, the equation for phi already only depends on n, the electron carrier density.

Also, thanks for the really rapid response and for the pyEDA release!