Xmpl2d39, 39th 'example' data file for CPO2D

Illustration of the scattering option, scattering at a grid

 

39th 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. 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.

Warning: This information relates to 3D systems and so is not correct for 2D systems. In the absence of anything better we shall try to adapt this to the present cylindrical 2D symmetry, but this can only be approximate.

Warning: Scattering at a grid is a 3-dimensional effect and so the CPO2D programs are not suitable for simulating this. We ignore this in the present code.

 

The routine that defines the scattering function is in file sct2grid.cpp, which is supplied with the CPO2D package. It should be copied to scatter2.cpp and used to create scatter2.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 'sct2grid.dat'. This can be copied from the file sct2grid.dat that is supplied with

the CPO2D package.

The contents of sct2grid.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 sct2grid.cpp for more detailed information.