Generating flattop beam distribution

Moderators: cyao, michael_borland

Post Reply
tchanwattana
Posts: 7
Joined: 28 Apr 2014, 05:33

Generating flattop beam distribution

Post by tchanwattana » 19 May 2014, 17:19

Dear elegant users,

I want to generate flattop longitudinal beam distribution with flattop duration 5fs, peak current 10kA, and energy spread 1%in order to use in genesis.
The code I used is as following.

&bunched_beam
one_randon_bunch=0
first_is_fiducial=0
n_particles_per_bunch=100000
emit_nx=1e-7
emit_ny=1e-7
sigma_s=4.327e-7
sigma_dp=0.01
eta_x=0e-2
enforce_rms_values[0]=1,1,1
distribution_type[0]="gaussian","gaussian","line"
distribution_cutoff[0]=5,5,5
&end

Is this the right way to generate flattop distribution in elegant? I am not sure because my result from genesis is not what I expected, and then I suspect that my beam distribution may have some mistakes.
And can I set "eta_x=1e-2" if I want the beam to has 1cm dispersion?

It would be great if anyone who has experiences in using flattop distribution can provide some suggestions.
Thank you in advance,
Thakonwat

michael_borland
Posts: 2006
Joined: 19 May 2008, 09:33
Location: Argonne National Laboratory
Contact:

Re: Generating flattop beam distribution

Post by michael_borland » 10 Jun 2014, 17:01

Thakonwat,

Sorry for the late response. The forum email is not working again.

1. You need to use distribution_type of "uniform" for the longitudinal plane in order to get a flat-top. The distribution will of course have random noise and might not be the best for input to GENESIS. You can use the BEAMFILE feature in GENESIS to specify the rms values of a series of slices. I think that's the preferred way.

2. You can indeed using eta_x = 1e-2 to enforce a dispersion of 1cm.

--Michael

tchanwattana
Posts: 7
Joined: 28 Apr 2014, 05:33

Re: Generating flattop beam distribution

Post by tchanwattana » 25 Jun 2014, 08:48

Thank you Michael,

I have tried using distribution_type of "uniform" but the distribution I have got is like using "uniform-ellipse" instead of flattop.
Could you suggest in more details on how to use distribution_type = "uniform"?

Thakonwat

michael_borland
Posts: 2006
Joined: 19 May 2008, 09:33
Location: Argonne National Laboratory
Contact:

Re: Generating flattop beam distribution

Post by michael_borland » 25 Jun 2014, 11:22

Thankowat,

Sorry, my mistake. You should use the "hard-edge" distribution type, not "uniform". "uniform" is simply short-hand for "uniform-ellipse".

Example attached.

Code: Select all

% elegant run.ele
% sddsplot -column=t,p run.bun -graph=sym,fill
run.png
--Michael
Attachments
lattice.lte
(25 Bytes) Downloaded 351 times
run.ele
(369 Bytes) Downloaded 417 times

Post Reply