Copyright, Supriyo Datta: All codes included herein. It is planned to make soft copies of these codes available through my website and also through the nanohub where they can be executed without installation using a web browser.
Chapter 1
% Fig.1.1.1
clear all%Constants (all MKS, except energy which is in eV)hbar=1.055e-34;q=1.602e-19;eps0=8.854E-12;epsr=4;m=0.25*9.11e-31;%Effective massI0=q*q/hbar;%ParametersW=1e-6;L=10e-9;t=1.5e-9;%W=Width,L=Length of active region,t=oxide thicknessCg=epsr*eps0*W*L/t;Cs=0.05*Cg;Cd=0.05*Cg;CE=Cg+Cs+Cd;U0=q/CE;alphag=Cg/CE,alphad=Cd/CE%alphag=1;alphad=0.5;U0=0.25;kT=0.025;mu=0;ep=0.2;v=1e5;%Escape velocityg1=hbar*v/(q*L);g2=g1;g=g1+g2;%g1=0.005;g2=0.005;g=g1+g2;%Energy gridNE=501;E=linspace(-1,1,NE);dE=E(2)-E(1);D0=m*q*W*L/(pi*hbar*hbar);% Step Density of states per eVD=D0*[zeros(1,251) ones(1,250)];%D=(2*g/(2*pi))./((E. 2)+((g/2) 2));% Lorentzian Density of states per eV%D=D./(dE*sum(D));%Normalizing to one%Reference number of electronsf0=1./(1+exp((E+ep-mu)./kT));N0=2*dE*sum(D.*f0);ns=N0/(L*W*1e4),%/cm 2%BiasIV=61;VV=linspace(0,0.6,IV);for iV=1:IVVg=0.5;Vd=VV(iV);%Vd=0.5;Vg=VV(iV);mu1=mu;mu2=mu1-Vd;UL=-(alphag*Vg)-(alphad*Vd);U=0;%Self-consistent fielddU=1;while dU>1e-6f1=1./(1+exp((E+UL+U+ep-mu1)./kT));f2=1./(1+exp((E+UL+U+ep-mu2)./kT));N(iV)=dE*sum(D.*((f1.*g1/g)+(f2.*g2/g)));Unew=U0*(N(iV)-N0);dU=abs(U-Unew);U=U+0.1*(Unew-U);endI(iV)=dE*I0*(sum(D.*(f1-f2)))*g1*g2/g;endhold onh=plot(VV,I,'b');set(h,'linewidth',[2.0])set(gca,'Fontsize',[25])xlabel(' Voltage (V) --->')ylabel(' Current (A) ---> ')grid on % Fig.1.1.3
clear allE=linspace(-.25,.25,501);dE=E(2)-E(1);kT=0.025;Ef=0;V=0;mu1=Ef+(V/2);mu2=Ef-(V/2);f1=1./(1+exp((E-mu1)./kT));f2=1./(1+exp((E-mu2)./kT));%dE*(sum(f1-f2))/Vhold onh=plot(f1,E,'g');set(h,'linewidth',[2.0])set(gca,'Fontsize',[25])xlabel(' Fermi function --->')ylabel(' E - mu (eV) ---> ')grid on % Fig.1.3.3, 1.5.1
clear allE=linspace(-.5,.5,50001);dE=E(2)-E(1);gam=0.05;D=(gam/(2*pi))./((E.^2)+((gam/2)^2));%D=(gam/(2*pi))./(((E-0.25).^2)+((gam/2)^2));%Use for Fig.1.5.2%D=D+((gam/(2*pi))./(((E+0.25).^2)+((gam/2)^2)));%Use for Fig.1.5.2dE*sum(D)hold onh=plot(D,E,'g'); <a name="1099"></a><a name="IDX-345"></a>set(h,'linewidth',[2.0])set(gca,'Fontsize',[25])xlabel(' D (E) --->')ylabel(' E (eV) ---> ')grid on % Fig.1.4.6
clear all%Constants (all MKS, except energy which is in eV)hbar=1.055e-34;q=1.602e-19;I0=q*q/hbar;%ParametersU0=0.025;kT=0.025;mu=0;ep=0.2;g1=0.005;g2=0.005;g=g1+g2;alphag=1;alphad=0.5;%Energy gridNE=501;E=linspace(-1,1,NE);dE=E(2)-E(1);D=(g/(2*pi))./((E.^2)+((g/2)^2));% Lorentzian Density of states per eVD=D./(dE*sum(D));%Normalizing to one%BiasIV=101;VV=linspace(0,1,IV);for iV=1:IVVg=0;Vd=VV(iV);%Vd=0;Vg=VV(iV);mu1=mu;mu2=mu1-Vd;UL=-(alphag*Vg)-(alphad*Vd);U=0;%Self-consistent fielddU=1;while dU>1e-6f1=1./(1+exp((E+ep+UL+U-mu1)./kT));f2=1./(1+exp((E+ep+UL+U-mu2)./kT));N(iV)=dE*sum(D.*((f1.*g1/g)+(f2.*g2/g)));Unew=U0*N(iV);dU=abs(U-Unew);U=U+0.1*(Unew-U);endI(iV)=dE*I0*(sum(D.*(f1-f2)))*(g1*g2/g);endhold onh=plot(VV,N,'b');%h=plot(VV,I,'b');set(h,'linewidth',[2.0])set(gca,'Fontsize',[25])xlabel(' Voltage(V)--->')%ylabel(' Current(A)---> ')ylabel('Number of electrons ---> ')grid on % Fig.E.1.3
clear all%Constants (all MKS, except energy which is in eV)hbar=1.055e-34;q=1.602e-19;I0=q*q/hbar;%ParametersU0=0.025;kT1=0.026;kT2=0.025;ep=0.2;g1=0.005;g2=0.005;g=g1+g2;alphag=1;alphad=0.5;%Energy gridNE=501;E=linspace(-1,1,NE);dE=E(2)-E(1);g1=0.005*(E+abs(E))./(E+E+1e-6);% zero for negative Eg2=0.005*ones(1,NE);g1=g2;g=g1+g2;%BiasIV=101;VV=linspace(-0.25,0.25,IV);for iV=1:IVmu1=ep+VV(iV);mu2=mu1;f1=1./(1+exp((E-mu1)./kT1));f2=1./(1+exp((E-mu2)./kT2));D=(g./(2*pi))./(((E-ep).^2)+((g./2).^2));D=D./(dE*sum(D));I(iV)=dE*2*I0*(sum(D.*(f1-f2).*g1.*g2./g));endhold on%h=plot(VV,N/2,'b');%Part (a)h=plot(VV,I,'b');set(h,'linewidth',[2.0])set(gca,'Fontsize',[25])xlabel(' Voltage(V)--->')ylabel(' Current (A)---> ')%ylabel(' Number of electrons ---> ')grid on % Fig.E.1.4
clear all%Constants (all MKS, except energy which is in eV)hbar=1.055e-34;q=1.602e-19;I0=q*q/hbar;%ParametersU0=0.025;kT=0.025;mu=0;ep=0.2;N0=0;g1=0.005;g2=0.005;g=g1+g2;alphag=1;alphad=0.5;%Energy gridNE=501;E=linspace(-1,1,NE);dE=E(2)-E(1); <a name="1101"></a><a name="IDX-347"></a>g1=0.005*(E+abs(E))./(E+E+1e-6);% zero for negative Eg2=0.005*ones(1,NE);g=g1+g2;%BiasIV=101;VV=linspace(-.6,.6,IV);for iV=1:IVVg=0;Vd=VV(iV);%Vd=0;Vg=VV(iV);mu1=mu;mu2=mu1-Vd;UL=-(alphag*Vg)-(alphad*Vd);U=0;%Self-consistent fielddU=1;while dU>1e-6f1=1./(1+exp((E-mu1)./kT));f2=1./(1+exp((E-mu2)./kT));D=(g./(2*pi))./(((E-ep-UL-U).^2)+((g./2).^2));D=D./(dE*sum(D));N(iV)=dE*2*sum(D.*((f1.*g1./g)+(f2.*g2./g)));Unew=U0*(N(iV)-N0);dU=abs(U-Unew);U=U+0.1*(Unew-U);endI(iV)=dE*2*I0*(sum(D.*(f1-f2).*g1.*g2./g));endhold on%h=plot(VV,N/2,'b');%Part (a)h=plot(VV,I,'b');set(h,'linewidth',[2.0])set(gca,'Fontsize',[25])xlabel(' Voltage (V) ---> ')ylabel(' Current (A) ---> ')%ylabel(' Number of electrons ---> ')grid on