Iterative subdivision of electrodes (also called adaptive segmentation)

 

The CPO programs usually automatically subdivides electrode sinto segments.  This note concerns a more advanced technique for automatically subdividing electrodes iteratively, in more than one stage, a process also known as adaptive segmentation.  The aim is to try to equalize the charges on all the segments, for example so that electrodes that carry a high surface charge density are subdivided more than others.  The process is usually combined with concentration of subdivisions (see below)

 

This option should be used with caution. It should not be used as a short-cut for subdividing electrodes.

 

It is usually better not to use this option. Instead control over the subdividing should be retained by doing it manually. Also see the end of this note.

 

Examples of the use of iterative subdivision are given in the CPO2D file xmpl2d06 and in the CPO3D files test3d06, test3d15 and xmpl3d04.

Notes on how to enter the required information are given in the CPO2D and CPO3D the relevant note.

 

The headings below are:

The usual aim.

The numbers to be specified.

What the program does.

Choice of the 'weight charge' factor w.

Occasions when the technique of iterative subdivision cannot be used.

Occasions when the technique of iterative subdivision should not be used.

Advanced options.


 

The usual aim.

The usual aim of iterative subdivision (that is, adaptive segmentation) is to create a high density of segments where the charge density is high. It has been found from experience (starting with the data for the book Electrostatic Lenses, by E Harting and F H Read, Elsevier, 1976) that this usually gives the most accurate results. This has been shown more quantitatively in a detailed study described in a recent paper (Improved extrapolation technique in the Boundary Element Method to find the capacitances of the unit square and cube, by F H Read, J. Computational Physics 133, 1-5, 1997, see reference list)

 

The numbers to be specified.

The user specifies the final number N of segments, the number S of steps to reach this number of segments, and the 'weight charge' factor w.

 

If fairly precise equalisation of the charges is required then N should be at least 3.

 

What the program does.

The program starts by using a small number of segments and low accuracy to calculate the charges on the segments, and then uses the formula

 number of subdivisions is proportional to charge^w

to establish a new set of segments. This is repeated in S steps, finishing with the total number of segments N and the accuracy requested by the user.

 

For example if the initial number of segments is 25, the final number is 500, the number of steps is 4 and the requested charge inaccuracy is 0.0001, then the numbers of segments and the inaccuracy levels used at the successive steps will be approximately:

 25        0.05

 68        0.033

 184        0.017

 500        0.0001

If the weight charge factor is 1.0 then at the completion of each stage the program would look at the charges on the segments and subdivide them in such a way that they will all carry approximately the same charge at the beginning of the next stage.

 

(In detail: The program changes the target number of segments logarithmically from the first to last step. The starting value of the inaccuracy is the lesser of 0.05 and 10**S where is the required final inaccuracy, except if there are only 2 iterations, when it is 100. The inaccuracy is changed linearly from the first to last step. When subdividing segments from one stage to the next triangles are subdivided by bisecting their longest sides and then if necessary repeating this procedure for the sub-triangles until the required total number of subdivisions of that triangle is reached, so giving a total number that is 2, 4, 8, 16 etc. When subdividing rectangles the longer sides are divided more than the shorter, to give sub-rectangles that are as square as possible. In going from one stage to the next the segments are all subdivided by up to the factor Nnew/Nold -for example 68/25 = 2.72 for the first stage above- but the actual number of subdivisions for each individual segment must be an integer and so usually the required number Nnew is not attained. If the ‘regular’ option is not activated (see the next heading) the program therefore starts again at the beginning of the list of segments, dividing each one further until the total number Nnew is reached, or nearly reached.)

 

Choice of the 'weight charge' factor w.

The value of w must be in the range from 0 to 3.

For the value 0, all the present segments are subdivided at each step by approximately the same amount.

For the value 1, the subdivision of each segment is proportional to the present charge on the segment, thus leading to the equalisation of charges referred to above, with all the final segments carrying approximately the same charge. This is the usual aim of the process of iterative subdivision (that is, adaptive segmentation).

A suitable value of w for general use is 1.0, although the 'over-weight' value 1.5 has also often found to be the best.

(For technical reasons, values of w less than 0.1 will be changed to 0.1, and then all the segments will still be subdivided at each step by approximately the same amount.)

 

Occasions when the technique of iterative subdivision cannot be used.

The technique of iterative subdivision (that is, adaptive segmentation) cannot be used

(a) if the 'inscribing correction' has been applied to any of the segments, in CPO3D, as explained in the relevant note and illustrated in figure 2.6 in the Users Guide.

(b)  if there is a plane of voltage antisymmetry and if any segment touches that plane,

(c) if any of the electrodes have been stretched -and see the illustrations in figures 2.2 and 2.3 in the Users Guide.

 

Occasions when the technique of iterative subdivision should not be used.

iterative subdivision (that is, adaptive segmentation) cannot always be relied upon to give an appropriate distribution of segment sizes. For example a system might include two apertured plates that have different voltages and are close together. The field between the plates then gives surface charges on their surfaces. The charge density is likely to be as large in the unimportant regions away from the apertures as it is in the important region near the apertures. The process of iterative subdivision will then 'waste' subdivisions in the unimportant regions.

Examples of this occur when the technique is used for double-aperture or double-slit lenses (see the CPO2D files xmpl2d02 and xmpl2d04, and the notes at the ends of those files) it tends to give segments that are not dense enough at the edges of the apertures or slits, and so the fields in these regions are not as accurate as they could be. In other words, iterative subdivision -that is, adaptive segmentation- optimises the fields in the whole system, sometimes at the expense of the fields in regions that are critical for the simulation in hand.

A way of overcoming this difficulty is to start with high numbers of segments in the critical regions (since iterative subdivision -that is, adaptive segmentation- cannot remove any of the initial segments).

 

 

For detailed notes on the total number of segments, concentration of subdivisions etc, see the relevant note.




Advanced options for iterative subdivision (adaptive segmentation)

 

These are accessed by /databuilder/segments/basic information/use adaptive segmentation/Help/advanced options/.

 

The 'exact' way of increasing the number of segments.

This applies only to CPO3D.

In the ‘regular’ way (non-exact) the program uses the given information to increase the number of subdivisions of each segment but because there are some restrictions (for example the number of subdivisions of a triangle can only be 2, 4, 8, 16, etc) the required total number is usually not attained. The resulting pattern of subdivisions is then usually fairly regular and acceptable. But in the ‘exact’ way the program goes through the list of segments again to try to get as near as possible to the required total number.

 

The option to decrease the aspect ratios for the segments.

This applies only to CPO3D.

The factor charge^w for each segment, defined for adaptive segmentation, is multiplied by the factor a_r^wt_aspect, where a_r is the aspect ratio of the segment and the weight wt_aspect is chosen by the user.

For rectangles a_r is the ratio of the longest to the shortest side, for triangles it is the ratio of the base to height, where the base is the longest side.

 

Note that when the option is activated it works in parallel with the option to subdivide according to the segment charges, which has a separate weighting factor. When this option is activated and wt_aspect is non-zero the program will give some priority to subdividing the segments that have the highest aspect ratios. To obtain the desired result the user should experiment with the three relevant parameters -the two weighting factors and the final number of segments.

An example is given in shap3d30.

 

Concentration of subdivisions.

Another available option is to 'concentrate' the subdivisions on particular electrodes. The option is triggered by making the 'weight charge' factor negative. After restoring the weight charge factor to a positive value the program will look for an extra line, on which should be two numbers -the number N of segments to be concentrated and the concentration factor f. The program will then make the first N segments f times more important during the following subdivision stages.

 

For example if you know that it is important that an end of a particular cylinder is critical for an accurate answer, and that the end should be subdivided more than the rest of the cylinder and more than other electrodes of the system, then enter that end as a separate electrode, and put this electrode as the first one to be specified in the data file. Then look at the number of segments into which it is initially subdivided (say 12) and guess an appropriate concentration factor (say 3), and enter these two numbers on the extra line. The program will then treat these 12 segments, and any further segments into which they are subdivided, as 3 times more important as the other segments of the system. An example is given in file xmpl3d04.dat.

 

Note that the segments selected for concentrated subdivision do not have to be confined to one electrode -they are simply the first N of the initial segments. Note also that care might be needed in identifying the relevant segments -for example if you use all the planes of reflection symmetry and ask for a sphere of 5 segments the program will (for various good reasons) change the number to 6, as can be seen by looking at the subdivisions on the screen fact (or inspecting the processed data output file).