VISUAL DESIGN TOOL FOR ELECTROSTATIC LENSES

Current research presents a visual-computational tool to design and investigate round electrostatic lenses in sense of analysis procedure. The finite elements methods is adopted to find the electrostatic potential in the lens region. Laplace’s equation is first replaced by a certain functional which physically represent the electric energy stored in the electric field. This functional is then minimized at each mesh point with respect to the nearest eight ones. This minimization process is proved to be entirely equivalent to solving Laplace’s equation. The requirement that the functional being minimized is then yields a set of nine point equations which inter relate the potentials at adjacent mesh points. Finally this set of equations is solved to find the electrostatic potential at each mesh point in the region of the lens under consideration. The procedure steps mention above are coded to program written in visual basic. Hence an interface tool for analyzing and designing electrostatic lenses has been built up. Designing results proved that the introduced tools has an excellent outputs in comparison with the others written in not visual programming languages. Furthermore it easier for researchers and designer to use such a tool over their counterpart ones.


INTRODUCTION
A great importance for the electron lenses design have been given since the earlier days of electron optics.Many computational tools are introduced to deals with such an issue, however, the computer package programs published by Munro in 1975 [1] may consider to be the first real one.Since that time several authors tried to improve this gadget concerning the usage [2] and accuracy [3], but the novel principles are remained with ought change.The main characteristics of all of these works are that they are coded to a conventional procedural programming languages generally the Fortran.
In parallel with development of the computer software and hardware several software packages which written in different visual interface programming language are presented.Indeed these tools make it easy to design and hence optimize the electron lenses concerning their own shape and function.For example one may mention the software argued in the literatures [4], [5], [6] and the companies MEBS company programs [7], Charged Particles Optics Company programs and SIMION company programs [8].
In fact most of these software are presented for commercial issues rather than that of scientific purposes So, the cost of any of these packages is too much expensive and may not serve the goals of researchers.Recently a computer aided design tool is introduced to manipulate magnetic lenses by [9].It can regarded to be a modification trial to the conventional counterpart.Present work also try to modify the conventional designing procedure and mainly concerns with electrostatic rather the magnetic lenses.

Solution of Laplace's Equation
Evolution of the first order properties and third order aberrations for any electrostatic lens requires the knowledge of the electrostatic potential distributions throughout the electrode region.Consider now this region is meshed into a grid in sense of finite elements method (FEM) as shown in figure 1.The aim, however, is to compute the potential at each mesh point.Indeed the idea of round electric lens has been considered in drawing this figure.Hence the plane r-z in represent the plane of symmetry and so the z-axis is the axis of rotational symmetry.In other word, the region ABCD represent a cross section of a cylinder of length AB≡CD and radius AC≡BD.Furthermore, entire region is divided into quadrilaterals, which in turn subdivide into small triangles usually named finite elements.The differential form of gauss's law usually given by the following form: Assuming the region ABCD is charge-free and keep in mind that the electric field is irrotational, i.e. curl E=0, equation ( 1) can be expressed in terms of a scalar function as follows: Actually the scalar function U is the correspondent electrostatic potential which needs to be compute throughout the region ABCD.It can be seen that equation ( 2) is simply Laplace's equation.So, to find U there must be a certain boundary conditions impose on the boundaries of the region ABCD like Dirichlet or Newman boundary conditions.
Unless the solution of equation ( 2) is unique under a specific boundary conditions, there will be a some variation in the potential such as .Multiply this equation by the variation  and making use the vector identity ∇ .( ) = ∇. +  .∇ , it converts to the following form: Where ∈  is the permittivity of free space.The integration of equation ( 3) over all of the volume enclosed by the surface whose its cross-section area is ABCD yield to: Application of the Gaussian theorem for the left-hand side of last equation gives: But for a prescript boundary conditions there will be no variation in the potential Ub and so equation ( 5) becomes: Equation ( 6) declare that either the volume integration for the function ∇ .∇  is vanishes throughout the volume V, or the function itself being null.The first probability can only be established by dividing the cylinder into two parts by a plane containing the axis-z, where first of them being held at (+U) and the remaining one at (-U).Actually this is unreliable situation in exciting round electrostatic lenses and there is no way to accept such a probability.Concerning with second consequence one directly observe that neither ∇  nor ∇  could be equal to zero.Because ∇  = 0 means there is no electric field in the region ABCD and hence there is no lens at all.Also,  is proposed initially to be exist, and one can't imagine that this variation is fixed throughout all of the region under consideration.Therefore the proposition that the function ∇ .∇  equal to zero most be rejected.
The careful inspection of equation ( 6) reveal that the two mathematical operators ∇ and  are differ in their actions and so they are independ on each other.So, the order of these operator can be exchanged without changing the scientific meaning of equation ( 6).Accordingly the quantity ∇ .∇  become equal to ∇ .∇  and both of them equal to 1 2  ∇  2 .Thus, equation ( 6) can be written as follows: Defiantly, the conclusion used above can be repeated again to exchange the order position between the integration and  operators.So equation ( 7) becomes as follows: Equivalently, equation ( 8) can be written in the following abbreviation symbolic form: Where F is the functional: Anyway, the physical interpretation of equation ( 6) become now understandable in a manner that, for a specific boundary conditions there is a certain potential distribution U which make the functional F minimum.So any variation of this functional with respect to this distribution U will vanishes.Mathematically this is equivalent to solving Laplace equation subjected to the same prescript boundary conditions.Strictly speaking for a well-defined Dirichlit or Newman boundary conditions, one no more needs to solve Laplace equation to compute the potential distribution that met these boundary conditions.Instead the functional F must be minimized for the same boundary conditions and then finding the potential distribution U that make F minimum.

Minimization
The same procedure that had been outlined by [10], and revised by [11], is used in this work to minimizing the function in equation ( 10).Accordingly by assuming the potential vary linearly a cross a finite element as in the form: U(r,z)=a1+a2z+a3r, the functional F will take the following forms: A u g u s t 1 5 , 2 0 1 4 The contribution from a general finite element, see figure 2, to the total value of the functional in equation ( 11) is: Where ra is the average value of radial distance at the center of the triangle, A is the area of the triangle, bi=rj-rk, ci=zk-zj and Ui is the potential value at the vertex i.
The boundary condition must be used now in order to continue with the minimization process.The minimization according to equation (8 or 9) requires the differentiation of the contribution in equation ( 12) with respect to changes in the mesh-point potential.So from equation ( 12) one get: Where n=i,k and m=i,k.the symbol Fnm is a 3×3 matrix given by the expression: +     ……….( 14) However, with aid of the last equation the coefficient of the matrix Fnm may calculated for every triangles of the finite element mesh.It's worth to mention that finite element (triangles) within the electrode most be excluded from the calculation because the electrode is itself an equipotentials surface.
When the boundary conditions are inserted the matrices Fnm becomes able to set up triangles equations inter relating the potential values at adjacent mesh points.For example let U0 be the potential value of an arbitrary mesh point 0 as shown in figure 2. The potential at the nearest adjacent points being (U1,U2,U3, U4, U5, U6, U7 and U8).The change in the functional Fnm with respect to U0 must be equal to zero according to the minimization condition, thus the contribution from the twelve triangles that U0 be one of their vertex potential must be minimized.i.e.

𝜕∆𝐹 𝜕 𝑈
By substitution of equation ( 13) into equation ( 15) one can get a nine point triangle equation of the form: Where each Pi coefficient is a specific collection of terms of Fnm .Eventually a nine-point formula is obtained for each nonaxial mesh point and a six-point formula for each axial-point.The resultant equations may be arranged in form of a band matrix which in turn can be solved by an appropriate numerical method.

Procedure Encoding
The algorithm described in last two sections has been coded to visual interfaces using the visual basic programming language, so as to provide an easier and flexible tool for analyzing an electric lens systems.Firstly, an assigned lens profile (usually a plot describe the lens system in r-z plane) is converted to data file represent the axial and radial coordinates of the assigned lens.Where each coordinates point is given a number that represent the number of segments between any neighbor points.Accordingly the r-z area is distributed into a grid of a small quadrant shapes.When the lens data file being input to the computer memory it will makes a further segmentations according to the given number for each coordinate point.Thereafter the computer starts to generate a finite elements (triangles) and follow an instructions appropriates to the steps mentioned in last two sections.Eventually, a nodal equation for each mesh point being set up and then arranged in form of matrix, where the Gaussian elimination and back ward substation is used to solve this system of equations to find the electrostatic potential at each mesh point.

HILGHGHT DESCRIBTION OF IMPLEMENTATION
Once the program being initiated, the first page appears as shown in figure 3.This page is optionally designed to illustrate the names of authors, theirs tilts and the name of the software that chosen to be 'Electrostatic Lens Design Software (ELDS)'.Pressing the return key makes the execution process leave this page to the second one which is shown in figure 4. The background of this page involve a text information represents the aim of ELDS software and a dialogue box ask user about whether the lens under consideration is symmetric or not.So when the type the lens is assigned in this step, say symmetric for example, user can no longer changed it to the other one, asymmetric in this example, unless the execution process is truncated and then it initiated again from the beginning.Indeed for a new lens design that specified by a user itself the command New must be selected, see figure.6b.Page of this command supply a user by the required designing tools.Where it provide keys for defining the axial and radial meshes for the lens under consideration.In addition the menu allows user to specifying the type of any part in the regarded region whether it being free space or electrode material.When the lens design is converted into input data file it become ready for analyses.Consequently, its graph, mesh, axial potential, mesh potential and equipotential surfaces can be deduced by selecting the appropriate commend for that process as shown in figure 5.

RESULTS
In fact, Munro's asymmetric lens is chosen to verify the results of (ELDS) program.Figure 7 shows the profile of the considered lens as it being plotted by (ELDS) using the Projection command from the Plot window.With aid of the command Mesh Points in the Plot window the meshes lines has distributed on this profile and the result is shown in figure.8.Indeed this distribution is done automatically by (ELDS) itself according the input values.The deduced axial electrostatic potential along the optical axis and the equipotential surfaces are plotted in figures 9 and 10 respectively.
Actually one may present many data and graphs concerns with the lens under consideration.To keep space, however, the results presented so far are just selected to make an objective verification for the (ELDS) program.The axial electrostatic potential deduced from (ELDS) software and its counterpart imported from the literature [1] are listed in table-1.Results of comparison reveals that an excellent accuracy could be obtain from the tool designed in the present work.

Fig 1 :
Fig 1: Mesh of the finite element method.

Fig
Fig 2a: An arbitrary finite element.

Fig 3 :Fig 4 :
Fig 3: First page of the ELDS that appears just it being starts execution process.

Fig 5 :Fig 6 :
Fig 5: a) The main menu of (ELDS) programs.b) FILE option.c) EDIT option.d) COMPUTE option.e) VIEW option.f) PLOT option.g) WINDOW option.

Fig 8 :
Fig 8: Distribution of axial and radial mesh lines for the profile appears in Fig 7.

Fig 9 :
Fig 9: Plot of the deduced axial electrostatic potential distribution.

Fig
Fig 10: The equipotential surfaces as it deduced from (ELDS) software.