wiki:DistributionTranches

distribution in slices

The procedure is the following :

for each particle a z coordinate is randomly set (gaussian; proportinnal to sigma_z). This particle is put in the slice, whose rank j id calculated following :

      j = floor(z/dz + nS/2 + 1) 

dz being the z step ; nS the number of slices. The slices are numberd from 1 to infinity.

dz = 2.cut_z/n_z

One can get the diagnostics :

PARTICLE_BEAM::warning:: rms_distribution : no particles in slice

or

No charge in slice flag1 = ... flag2= ...

which indicates that defined slices have no particles. It may happen, for example, when one takes cut_z too large : extremity slices have no particles. It may also happen when n_z is too large, so the particles may be dispatched in slices, leaving somme slices empty. For the longitudinal shape of the beam is supposed for now to be gaussian, a good value for cut_z seems to be 3.35*sigma_z. This value is adopted as default value, also used in the automatic_grid_sizing = 1 option.

Remarks :


  • The number of slices is necessary for initializing particles data structures which are supposed to be set, when calculating automatically cut_x, cut_y, n_x, n_y. That is why n_z can not be automatically calculated and must be given by the user so as sigma_z.
  • The particles are generated randomly from a gaussian shape. So, if a particle is generated with a z coordinate out of the range (-cut_z, +cut), this particle is rejected. This procedure explains the fact that the number of effective particle is often less than the number of particles declared by the keyword n_m.
Last modified 16 years ago Last modified on Jul 15, 2008, 12:09:54 PM