from NanoTCAD_ViDES import * from module_NR_silicene import * NR=NR_silicene(6,30.0); W=max(NR.y); # I create the grid xg=nonuniformgrid(array([-2.0,0.3,0,0.2,2.0,0.3])) yg=nonuniformgrid(array([-1.0,0.3,0,0.2,W,0.2,W+1.0,0.3])); grid=grid3D(xg,yg,NR.z,NR.x,NR.y,NR.z); savetxt("gridx.out",grid.gridx) savetxt("gridy.out",grid.gridy) savetxt("gridz.out",grid.gridz) NR.dE=0.001 # Now I define the gate regions top_gate=gate("hex",grid.xmax,grid.xmax,grid.ymin,grid.ymax,10.0,20.0) bottom_gate=gate("hex",grid.xmin,grid.xmin,grid.ymin,grid.ymax,10.0,20.0) # I take care of the solid Ox1=region("hex",grid.xmin,0,grid.ymin,grid.ymax,grid.zmin,grid.zmax); Ox1.eps=3.9; Ox2=region("hex",0,grid.xmax,grid.ymin,grid.ymax,grid.zmin,grid.zmax); Ox2.eps=3.9; p=interface3D(grid,top_gate,bottom_gate,Ox1,Ox2); dope_reservoir(grid,p,NR,0.001,array([grid.xmin,grid.xmax,grid.ymin,grid.ymax,grid.zmin,10.0])); dope_reservoir(grid,p,NR,0.001,array([grid.xmin,grid.xmax,grid.ymin,grid.ymax,20.0,grid.zmax])); solve_init(grid,p,NR) p.normpoisson=1e-1; p.normd=5e-3; Vgsmin=0.0; Vgsmax=1.0; Vgstep=0.05; Np=int(abs(Vgsmin-Vgsmax)/Vgstep)+1; vg=zeros(Np); current=zeros(Np); p.underel=0.1; counter=0; Vgs=Vgsmin; NR.mu1=-0.0; NR.mu2=-0.3; while (Vgs<=Vgsmax): top_gate.Ef=-Vgs; set_gate(p,top_gate); bottom_gate.Ef=-Vgs; set_gate(p,bottom_gate); p.normpoisson=1e-1; p.normd=5e-2; solve_self_consistent(grid,p,NR); vg[counter]=Vgs; current[counter]=NR.current(); # I save the output files string="./datiout/Phi%s.out" %Vgs; savetxt(string,p.Phi); string="./datiout/ncar%s.out" %Vgs; savetxt(string,p.free_charge); a=[NR.E,NR.T]; string="./datiout/T%s.out" %Vgs; savetxt(string,transpose(a)); string="./datiout/jayn%s.out" %Vgs; fp=open(string,"w"); string2="%s" %current[counter]; fp.write(string2); fp.close(); counter=counter+1; Vgs=Vgs+Vgstep; tempo=[vg,current] savetxt("./datiout/idvgs.out",transpose(tempo));