Click here for source and input/output files for Example 2
This example illustrates how the presence of a fixed charge on the surface dramatically affects the band bending. The charge is definied by modifying the RHOSURF routine by adding the statement
IF (X.GT.8.AND.X.LT.12.AND.Y.GT.8.AND.Y.LT.12) RHO=-2.E13In this way a region with total charge density of (4 nm)2 times -2.e13 cm-2 times the fundamental charge (1.6x1019 C) is defined on the surface (i.e. 16x0.2=3.2 electrons). The charge is centered on a point that is 10 nm in each of the x and y directions away from the central axis where the tip is located. Examing the potential, with the lateral cut taken at an azimuthal angle of 45°, yields:
One important point in defining areas of fixed charge on a surface (or regions of fixed charge in the bulk) is that the precise size of the grid can slightly affect the amount of charge. In the present example, we obtain 3.2 electrons only in the limit of a very fine grid. Each grid point that falls within the above specification of x and y between 8 and 12 will be counted as a valid grid point that possesses the specified charge density, but if the area associated with such grid points extends outside (or inside) of the specified x and y ranges for the fixed charge, then the total charge on the surface will be greater (or less) than 3.2 electrons. Of course, for charges that are far from the central axis, they can be extended over a substantial area so that this possible incompatibility between the area of the charge and the overlapping grid area is not a big problem. But, as the fixed charge approaches the tip, and if we want to model it as a point charge, then the area subtended by the charge necessarily becomes quite small. In that case, a rather fine grid might have to be employed within the program (perhaps even for the first iteration of the potential solution) in order to realistically find the solution for the potential.