xmpl3d84, 84th 'example' data file for CPO3D
Example of using imported potentials and fields
The 2D version is xmpl2d50.
The imported data in this example is produced by xmpl3d83.
The geometry is the same as xmpl3d83, except that the end disc at z = -5 has been removed and the following cylinder starts at z = -2 instead of -5. The ray starting point at z = -4 is therefore not shielded, which should cause the potential at z = -4 to be lowered by 0.2V, but has almost no effect on the potentials at z > 0.
However, the potential at the starting point is NOT lowered, because the 'import electrostatic potentials and fields' option is used. The file that holds the imported data is named as temp83a, which is the ray output data produced by xmpl3d83. These data cover the region x,y = 0 to 0.13, z = -4.05 to 0.
You must first run xmpl3d83 and then the output file temp83a.dat must be edited to remove the first few unwanted lines (see below).
If you look at a contour plot you will see that this region has the same field as xmpl3d83, not the field that has been modified by removing the shielding.
The rays are therefore essentially the same as in xmpl3d83 (although slightly less accurate here).
This option can be useful for modelling complicated or long systems.
The system can be split into 2 (or more) parts, preferably separated by field-free regions. The first part of the system is then modelled independently and the field in the region of the beam is saved for re-use. The second part of the system can then be modelled with some or all of the
first part omitted, but with the previously calculated fields imported.
Information about the 'importing potentials and fields' option:
The most important information is that CPO uses the imported data to calculate the potentials and fields at points that are inside the region covered by the data grid, but it uses the surface charges for all other points, INCLUDING POINTS THAT ARE NEAR TO ANY MISSING GRID POINTS if the grid is incomplete. CPO DOES NOT GIVE ANY WARNING MESSAGES when this happens.
IN GENERAL, THIS OPTION SHOULD NOT BE USED WHEN SPACE-CHARGE IS PRESENT, because the imported field is not changed during space-charge iterations.
For CPO3D the user-supplied data must have the form
spacingx spacingy spacingz
x1 y1 z1 V1 ex1 ey1 ez1
x2 y2 z2 V2 ex2 ey2 ez2
x3 y3 z3 V3 ex3 ey3 ez3
or the form
spacingx spacingy spacingz
x1 y1 z1 V1
x2 y2 z2 V2
x3 y3 z3 V3
CPO will determine which form has been used.
The values on each line must be separated by spaces.
The data lines can be in any order.
The maximum number of data lines is 100*maxseg (that is, 200K for 2K segments).
There must be a blank line at the end of the data.
The 'spacings' line can be the first line of the data file. If it is not the first line it must be preceeded by a line that starts with 'Spacings' or 'spacings'. This line is added automatically when CPO is used to provide a grid (using the option 'potentials and fields along a line or grid', which does not include the effects of space-charge).
Bilinear interpolation is used to calculate potentials and fields at points between grid points.
When the second form is used and when fields are required (as they are in ray tracing) then CPO uses the potentials to calculate the fields, by differentiation and bilinear interpolation. The fields obtained in this way are less accurate than those obtained when the first form is used.
When the 'mesh' method of ray tracing is used the spacings of the mesh do not have to be the same as the spacings of the imported data grid.
The 'zero total charge' option is switched off when potentials are imported.
Some other restrictions will appear in informative error messages if they are exceeded.