# Boundary Condition at edges of simulation region

With the variable grid spacing employed in SEMITIP, the intent of the computation is that the potential goes to zero at the edges of the simulation region (i.e. at large distance away from central axis and/or large distance into the semiconductor). For doped, homogeneous semiconductors this is easily achieved, and even for undoped material this situation can also achieved so long as the grid spacing and/or number of grid points is sufficiently large. However, with the improvement in the computation of numerical derivatives for versions 6 and higher, the potentials extend further towards the boundaries than for previous versions, and thus the possibility of the potentials having nonnegligible values at the boundaries become more likely (primarily for undoped semiconductors).

Two common boundary conditions that are used in general for boundary value problems are the Dirichelet condition of zero value for the function (i.e. the potential in the present case) or the Von Neumann condition of zero value for the normal derivative of the function. For SEMITIP versions 1-5 the boundary condition applied in the program was actually slightly ill-defined, but that didn't really matter since the potential almost always fell off with increasing distance fast enough so that its value at the boundary was negligible. But for version 6, explicit treatment of the boundaries becomes more important. There is a variable in the semitip1.f, semitip2.f, or semitip3.f routines called IBC, whose value is set right at the top of the main routine. This value should be set to 0 for the Dirichelet conditions, or to 1 for the Von Neumann condition. By default the value is set to 0, in which case the potential at the final point that is one point further from the last point plotted is set to zero (the separation between this last+1 point and the last point is taken by the program to be equal to the separation between the last point and the last-1 point). The user can compare results with settings of IBC=0 or IBC=1 to set if the boundary is playing any role, and if so then the simulation region can be enlarged (again, this is an issue only for semiconductors with very low or zero doping).

The situation for an inhomogeneous semiconductor requires further explanation. For example, if a semiconductor is defined that is n-type for x>=0 and p-type for x<0, then the zero of potential corresponds to that deep inside the n-type material for x>>0 (i.e. far from the p-type material). For this inhomogeneous semiconductor, the potential should in principle not be zero for large x values with x<0 or x near 0. However, with the IBC=0 setting, the potential is forced to be zero at all the boundaries. This is not actually a problem in the computation, since the potentials all rise to their appropriate values within just one or a few grid points of the boundaries. However, asthetically it is preferable to obtain a solution in which the potentials are correct all the way up to and including the boundaries. This can be achieved simply by setting IBC=1. Thus, for this type of problem involving doped semiconductors (even with inhomogeneous doping), computations with IBC=1 will work just fine. But, for cases with undoped semiconductors, then setting IBC=1 can lead to situations (i.e. with small grids) in which the potential is seriously incorrect; for such cases an incorrect result would also be obtained using IBC=0, but the error is less severe in this latter case than the former. It is for this reason that a default value of 0 is used for IBC.