xmpl3d50, 50th 'example' data file for CPO3D

Illustration of the user-supplied scattering option, scattering at a grid


50th example file, to illustrate the use of the scattering option for scattering at a grid, gauze or mesh.

This example file is available only in the 'special' scattering version of CPO2D or CPO2DS.


The geometry is that of the 3rd benchmark test. 100 rays start at z = -0.5, in a field-free region.


When the rays reach z = 0 they are scattered through random angles.

We use the information given in 'Defocusing of charged particle beams transmitted through meshes', by D L Williams, F H Read and N J Bowring, Nuclear Instruments and Methods, Section A, vol 363, (1995) 120-123.


The routine that defines the scattering function is in file sct3grid.cpp, which is supplied with the CPO3D package. It should be copied to scatter3.cpp and used to create scatter3.dll, as explained in Help.


This routine calls a data file which is named by the user in the databuilder. In the present example the name is 'sct3grid.dat'. This can be copied from the file sct3grid.dat that is supplied with the CPO3D package.

The contents of sct3grid.dat for the present example are (but with the comments removed, leaving only the numbers):

0 type of mesh, 1 = thin, 2 = thick, 3 = welded, 4 = woven, 0 = average

.95 transparency

.0001 repeat spacing, in m

1.E4 change in field , V/m

10. energy of particles, in eV


Please see sct3grid.cpp for more detailed information.