Injection optimization

Moderators: cyao, michael_borland

Post Reply
Saroj_Jena
Posts: 13
Joined: 16 Nov 2020, 08:34

Injection optimization

Post by Saroj_Jena » 18 Nov 2020, 07:18

I want to optimize the pulsed sextupole magnet (PSM) kicker strength for the injection process. I tried it after going through the example file of APS, but the input for the optimization part, I didn't understand it properly or my input file has error. I am using pelegant version 2019.1.1. please find the files as attachment and help me out. I am tracking 5000 particles, but for any strength of PSM, it shows only ~ 70-80 particles remaining after 10 turns. However for the strength of 150 -180 m^-2, and at the same location of PSM in the lattice (2nd straight section), it works fine in accelerator toolbox (AT). I want to estimate the tolerances of injected elements for this injection scheme using ELEGANT , looking into its versatility.


Thanks and Regards
Saroj Jena
Attachments
psminjection.rar
(4.38 KiB) Downloaded 212 times

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

Re: Injection optimization

Post by michael_borland » 25 Nov 2020, 15:18

Saroj,

Passes are counted starting at zero, so try setting FIRE_ON_PASS=0 on the MBUMPER element.

--Michael

Saroj_Jena
Posts: 13
Joined: 16 Nov 2020, 08:34

Re: Injection optimization

Post by Saroj_Jena » 27 Nov 2020, 04:02

Thanks Michael,
After setting FIRE_ON_PASS=0, the injection tracking works fine. By hit and trial method I found a best sextupole strength of 360 1/m2. However, while I do an optimization run, it gives the output: optimum strength equals to initial guess only. Where I am doing mistake, can you please help me out. I am attaching the output screenshot and relevant input files. Also, how can I plot the phase space data for each turn separately with different color or mark. The command "sddsplot psminjection.w1 -column=x,xp -graph=dot" gives a plot of every turn data together in which I can't distinguish each turn phase space.


Thanks and regards
Saroj Jena
Attachments
optimize output.png
psminjection.rar
(4.51 KiB) Downloaded 213 times

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

Re: Injection optimization

Post by michael_borland » 28 Nov 2020, 23:19

Saroj,

I made a number of modifications to your files. Please see attached. There are some comments added to the files to explain what I did. The script 'runScript' will run the whole thing, but it assumes you have 18 cores available so you may need to edit it.

One issue is that there's a bug in the parallel version in that the Transmission quantity used by the optimizer isn't correct. I used nLost instead, which gives the number of lost particles.

For plotting, you need to split the file into pages in order to get different colors, e.g.,

Code: Select all

sddsplot -split=page -graph=dot,vary -col=x,xp filename.sdds
There's an example in the runScript file.

--Michael
Attachments
2020-11-27.zip
(6.78 KiB) Downloaded 247 times

Saroj_Jena
Posts: 13
Joined: 16 Nov 2020, 08:34

Re: Injection optimization

Post by Saroj_Jena » 01 Dec 2020, 23:10

Thanks Michael for quick reply. I could understand many things from the comment lines..
However, the suggested nLost in optimization routine is giving error. please find the screenshot of the error message.

With best Regards
Saroj Jena
Attachments
optimization output.png

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

Re: Injection optimization

Post by michael_borland » 03 Dec 2020, 10:58

Saroj Jena,

Can you verify that you are using the latest version of elegant (2020.4)?

--Michael

Saroj_Jena
Posts: 13
Joined: 16 Nov 2020, 08:34

Re: Injection optimization

Post by Saroj_Jena » 06 Dec 2020, 23:15

Actually I was using elegant version 2019.1.1, in which it was giving error. Now I used latest version 2020.4 in which the optimization using nLost is working fine.

Thanks and regards
Saroj Jena

Post Reply