Semiconductor solver solves Poisson’s eqaution in 1D to calculate equilibrium potential inside semiconductor. Steady state solution calculation for 1D semiconductor is also implemented.
For more information, visit the project website.
''' input_solver - defines mesh and solves poisson eqaution ''' import numpy as np from input_solver import * T = 300 # K k = 11.8 Nc = 2.8e19 # /cm^3 Nv = 1.04e19 # /cm^3 Eg = 1.1 mu_n = 1000 # cm^2/V-s mu_p = 500 # cm^2/V-s tn = 1000 # us tp = 1000 # us affinity = 1 # eV params = [T,k,Nc,Nv,Eg,mu_n,mu_p,tn,tp,affinity]
''' Define doping profile Unit of x is microns. Unit of doping is per cubic centimeter ''' def doping(x): if(x<5): return -1e18 elif(x>=95): return 1e18 else: return 1e12 ''' Define node positions and mesh spacing about them as [node position,spacing] Length unit : microns ''' nodes = [[0,0.5],[5,0.01],[50,1],[95,0.01 ],[100,0.5]] ''' Define left and right boundary conditions as [contact_type,value] where value is potential offset for ohmic and schottky contacts and electric field for normal derivative boundary conditionsplotter.plot_1d(x,V,'Potential','volt') plotter.plot_1d(x,n,'Electron density','density',scale='logy') plotter.plot_1d(x,p,'Hole density','density',scale='logy') plotter.plot_1d(x,n+p,'Total carrier density','density',scale='logy') 'o' - ohmic 's' - schottky 'n' - normal electric field Potential unit - Volts Electric field unit - Volts/micron ''' boundary = [['o',0],['o',0]] mesh,Nd,V,n,p = solution_eq_1d(params,nodes,doping,boundary,geom='rect') plot_solution_1d(mesh,Nd,V,n,p,params,show=True)
contact = [['o',0],['o',0]] # set boundary condition at contacts. Unit of potential is volt def gen(x): # define carrier generation rate by physical process other than thermal generation (Unit : per cubic centimeter per second) return 0 bias = [-5,1] # Voltage bias sweep (Reverse bias and forward bias) to be applied on left end with respect to right end. Unit of voltage is volt mesh,Nd,solution_start,solution_end,V,J,J_left,J_right = solve_current(params,nodes,doping,contact,bias) plot_JV(V,J,params,show=False) plot_solution_both_ends(mesh,Nd,params,solution_start,solution_end,show=False)