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.