Page 1 of 1

Parmela to Elegant beam

Posted: 13 Nov 2017, 09:15
by Aamna_Khan
Hello Michael,

Is there any way to change parmela output beam (x, xp , y, yp, phi, E) to elegant input beam (x, x', y, y', t, p) in elegant directly.

If I'm correct earlier there was something called parmela2elegant. But, now I'm not able to find it.

Additionaly, Is elegant safe option for 5 MeV particle tracking through RFCA (+25 MeV)?

Aamna

Re: Parmela to Elegant beam

Posted: 13 Nov 2017, 09:36
by michael_borland
Aamna,

I'm not aware of a parmela2elegant program. If the parmela output is ASCII, it shouldn't be hard to write a translation script. Since I don't use parmela, I'll need a file to work with, so please upload something if you can.

As for 5 MeV beam in RFCA, it should be reasonable good if you set N_KICKS large enough (vary it until it converges). The limitation is that RFCA only has an idealized sinusoidal standing wave longitudinal field. The TWLA (Traveling Wave Linear Accelerator) element would be a better choice.

--Michael

Re: Parmela to Elegant beam

Posted: 13 Nov 2017, 09:45
by Aamna_Khan
Thank you for your prompt reply.

Please find the attached input_beam.txt file from parmela.

Aamna

Re: Parmela to Elegant beam

Posted: 13 Nov 2017, 09:54
by michael_borland
Aamna,

Can you tell me the units of the columns? Also, is W the kinetic or total energy?

--Michael

Re: Parmela to Elegant beam

Posted: 13 Nov 2017, 09:58
by Aamna_Khan
Hi Michael,

x and y are in cm...xp and yp are dimensionless (px/p, py/p in parmela), phi is in degree.

W is kinetic energy.

/Aamna

Re: Parmela to Elegant beam

Posted: 13 Nov 2017, 10:16
by michael_borland
Aamna,

Try the attached parmela2sscript. It seemed to give reasonable results.

I'll add this to the distribution for the next release.

--Michael

Re: Parmela to Elegant beam

Posted: 13 Nov 2017, 11:20
by Aamna_Khan
Thank you Michael. In the mean time we did the same :).

PS: From last few days, whenever I tried to download something from elegant forum it is php instaed of zip or png file. To convert it into zip, I have to rename the file from .php to .zip. Is it something with server because I tried to download it on three different computers it's php?
/
Aamna

Re: Parmela to Elegant beam

Posted: 13 Nov 2017, 12:05
by michael_borland
Aamna,

I'm not sure what the reason for fhe file.php business might be. I'll ask someone who might know.

--Michael

Re: Parmela to Elegant beam

Posted: 15 Nov 2017, 09:03
by Aamna_Khan
Hi Michael,

During analyzation of twiss parametrs, I get to know that in parmela xp and yp are in [mrad]. Please correct it in parmela2elegant conversion before additing it to next release.

Aamna

Re: Parmela to Elegant beam

Posted: 16 Nov 2017, 23:27
by michael_borland
Aamna,

Thanks for the correction. The new version is attached and will be distributed with the next release.

--Michael