pulsed beam generation

Moderators: cyao, michael_borland

Post Reply
gpark
Posts: 16
Joined: 07 Dec 2017, 13:15

pulsed beam generation

Post by gpark » 11 Mar 2021, 08:37

I am trying to simulate the pulsed beam injection into the ring in the ELEGANT.
The revolution period is about 13 us. We want to inject a series of bunch trains-consisting of only two bunches spaced by 2us-in an interval of 10ms. In the input file, how can I generate this pulsed beam structure? It looks like once I set the bunch frequency to be 1/(2 us) and step number to be 2, there is no option left to generate the next bunch train after 10ms. Any suggestion would be welcome.

Thanks,

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

Re: pulsed beam generation

Post by michael_borland » 25 Mar 2021, 11:33

Here's a script that can generate an arbitrary bunch pattern. You can use the generateBunch script first (it should be installed already if you have installed elegant).

The script accepts a pattern specification as described here

Code: Select all

usage: generateBunchTrain -input <bunch> {-patternFile <filename> | -patternString <string>} -rfFrequency <Hz> -output <filename>
 The input file should be generated by elegant's bunched_beam command or equivalent; it should contain only one bunch.
 The pattern file has two columns: BucketNumber (integer) and RelativeIntensity (a value (0,1]).
 The pattern string has the form: <n1>*<s1>*<i1> <n2>*<s2>*<i2> ... where <n1> is the number of 
 bunches, <s1> is the spacing in rf buckets, and <i1> is the relative intensity, etc.
 E.g., 5*1*1.0 5*1*0.0 5*2*1.0 specifies two 5-bunch trains separated by 5 empty buckets;
 the first train has single-bucket spacing, while the second has two-bucket spacing.
For example, to generate a 325MHz bunch train as follows
  • 5 bunches separated by 1 bucket with intensity=1.0
  • 10 empty buckets
  • 5 bunches separated by 1 bucket with intensity=1.0
  • 3 empty buckets
  • 10 bunches separated by 2 buckets with intensity=3.0
you would run

Code: Select all

generateBunch -output bunch.sdds -number 10000 -xplane 60e-9,5.2,0.0,0.0,0.0 -yplane 16e-9,2.4,0,0,0 -zplane 6e3,10e-3,0.12e-2
generateBunchTrain -input bunch.sdds -output train1.sdds -patternString "5*1*1.0 10*1*0 5*1*1.0 3*1*0 10*2*3.0" -rfFrequency 352e6
--Michael
Attachments
generateBunchTrain.zip
(1.42 KiB) Downloaded 182 times

gpark
Posts: 16
Joined: 07 Dec 2017, 13:15

Re: pulsed beam generation

Post by gpark » 30 Mar 2021, 14:46

Thanks for the reply.
I first tried to generate the bunch by using the command line you suggested:

generateBunch -output bunch.sdds -number 10000 -xplane 60e-9,5.2,0.0,0.0,0.0 -yplane 16e-9,2.4,0,0,0 -zplane 6e3,10e-3,0.12e-2

But the error message showed up

'generateBunch' is not recognized as an internal or external command, operable program or batch file

I checked the elegant folder and found the generateBunch file in there. I copied and pasted the 'generateBunchTrain' file into the elegant folder and tried

generateBunchTrain -input bunch.sdds -output train1.sdds -patternString "5*1*1.0 10*1*0 5*1*1.0 3*1*0 10*2*3.0" -rfFrequency 352e6

but I had the same error message. So I am a little puzzled why I am having these error messages. This is my first time running the script file. Could you let me know what is going on?
Thanks,
Gunn Tae

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

Re: pulsed beam generation

Post by michael_borland » 30 Mar 2021, 14:51

Gunn Tae,

What operating system are you using?

--Michael

gpark
Posts: 16
Joined: 07 Dec 2017, 13:15

Re: pulsed beam generation

Post by gpark » 30 Mar 2021, 15:09

I am using 64-bit Windows system.

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

Re: pulsed beam generation

Post by michael_borland » 30 Mar 2021, 15:15

Are you using cygwin, or a Window's shell?

Probably your search path is not set correctly.

--Michael

gpark
Posts: 16
Joined: 07 Dec 2017, 13:15

Re: pulsed beam generation

Post by gpark » 31 Mar 2021, 18:13

I use Window shell (command prompt). As an experiment, I moved two 'generate..' files to my working folder and tried 'generate..' command. Things still did not work. How do I set the correct search path (probably the first couple of lines in two 'generate...' files)?

Thanks,
Gunn Tae

Post Reply