Outputting preliminary potential and/or field information.

 

Data on potentials and/or fields can be put in the information box on the screen and also in the output data file (if the printing level is high enough), before the rays are traced. This data can be useful for later processing.    For outputting potential and field information after ray tracing, perhaps in the presence of space charge, see contour details.

 

Potential and field contours can of course be seen on the screen in the interactive stage, after the rays have been traced, and there is also an option (called ‘grid’) to put numerical data into the output file. These potentials and fields are obviously affected by any space-charges that are present.

 

Before ray tracing the user can ask for information on:

the electrostatic potential

the electrostatic field

the magnetic field (in CPO3D)

the magnetic vector potential A (in CPO3D).

 

The information can be for:

equally spaced points along a straight line

equally spaced points along an arc of a circle

a grid of equally spaced points, 2 or 3 dimensional (for CPO3D only)

a set of points specified in a user-supplied external file (see xmpl3d88).

 

This type of information can be requested any number of times.

 

Accuracy:

 

The user is asked to specify the required inaccuracy of the calculation. See the note on potential and field accuracy or the note on requesting inaccuracy.

 

The actual inaccuracies of the calculated potentials and fields will depend on the geometry, the choice of subdivisions for the electrodes, the total number of segments into which the electrodes are subdivided, and other factors. It is particularly important to have a high density of subdivisions in critical regions.

The inaccuracy that is chosen for the potential and field data is only a guide, and in any case the 'inaccuracy' cannot be clearly defined in general.

In regions very near to an electrode (more precisely, at points nearer to a segment than the width of the segment) there is a tendency for the inaccuracy to be worse than the requested value. The program uses a technique to improve the potentials in these circumstances, but this requires extra computing time. This technique for improvement can be disabled (and therefore time saved). See also notes on contour details and potentials, fields and contours near to boundaries.

To get a more quantitative value for the inaccuracy, use a simulation with a known solution.

To find what a result would be for an infinite value of the number (n) of segments, vary n and plot the result against 1/n or 1/n squared, and then extrapolate to 1/n = 0.

 

Output formats for points on a line, arc or grid:

When more than one coordinate is involved x is scanned the fastest and z the slowest. For example when the potential on a 3-dimensional grid is requested, for x coordinates x1, x2…, y coordinates y1, y2…, and z coordinates z1, z2…, then the ordering of the outpout is:

z1 y1 x1

z1 y1 x2

z1 y2 x1

z1 y2 x2

z2 y1 x1

z2 y1 x2

z2 y2 x1

z2 y2 x2

Field components are given in the order x, y, z, on a single line.

The number of significant figures in the output depends on the chosen inaccuracy level.

 

Formats for points read from a user-supplied file:

A valid line of the user-supplied file has 2 or 3 coordinates at the beginning, for cpo2d and cpo3d respectively (any later information on the line will not be read).

For each valid line the output data are written to the usual ‘ray output file’ and are given to 6 significant figures, starting with the coordinates and then giving (on the same line) either (1) the potential or (2) the field components and the total field.

This process stops when an invalid line is encountered (for example when the end of the file is reached).

See xmpl3d88 for an example.

 

The option to separate numbers by commas can be used.

 

 

Higher-order derivatives of the axial potential:

These are available in the option on lens properties.

 

 

For users who are editing or constructing an 'input data file' without the use of the data-builder -that is, pre-processor:

But Manual editing is certainly not recommended -it is a relic from the time when the databuilder was not available All users are strongly encouraged to use the databuilder, which always gives the correct formats and which has many options for which the formats are not described or easily deduced.

 

Enter two letters for CPO2D, three letters for CPO3D, each of which is 'y' or 'n' (for 'yes' and 'no') -for example 'y n'.

If all the letters are 'n' then the remaining lines in this block of data will not be read.

The 3 letters refer to the electrostatic potential, the electrostatic field and the magnetic field respectively. The magnetic vector potential A can be called by making the third letter Y.

 

On next 3 lines enter the coordinates of initial end of line, then the coordinates of final end of line, then the number of equally spaced points at which information is required. If you want a circular, rather than straight, line then put the letter 'c' in the 5th space of the third line, and follow this with the coordinates of the centre of the circle. The arc will be traced in the anti-clockwise direction. Finally, if you have requested potentials and/or electric fields, enter the required inaccuracy of the calculation.

If you want the program to calculate potentials or fields for a 2 or 3-dimensional grid of points, in CPO3D only:

(1) 2-dimensional grid in the xz plane, put 'x' in the 10th space of the 1st line for example 'n n y x'.

On the next line enter the numbers of grid points in the x and z directions.

On the next line enter the z coordinate of the origin of the grid (x = 0 at the origin), followed by the distance between the grid points (which is the same for both directions).

Finally, if you have requested potentials and/or electric fields, enter the required inaccuracy of the calculation.

(2) 3-dimensional grid, put 'g' in the 10th space of the 1st line for example 'n n y g'.

On the next line enter the numbers of grid points in the x, y and z directions.

On the next line enter the x, y and z coordinates of the origin of the grid, followed by the distance between the grid points (which is the same for all directions).

Finally, if you have requested potentials and/or electric fields, enter the required inaccuracy of the calculation.

The program will then put the potential or field information into the output data file, using a separate line for each grid point. If the output data is for magnetic fields it is in the correct format for re-use as input data using the user-supplied grid options.

 

Further potential or field information can be requested by entering further sets of the above data. Terminate with the line 'n n' (CPO2D) or ‘n n n’ (CPO3D).