DA scan with vary_element

Moderators: cyao, michael_borland

Post Reply
Georgii
Posts: 3
Joined: 13 Apr 2017, 12:54

DA scan with vary_element

Post by Georgii » 27 Jul 2017, 07:51

Greetings!

Dear Michael and Cyao,

I am still a novice in Elegant and trying to make a scan of dynamic aperture with different values of octupole gradients.
The following error got me quite cornered: "run_setup and run_control must precede bunched_beam namelist", but they both do precede in my .ele file (attached). vary_element refers to external file with K3 values, other functions are as in quadScan example too.
In what sequence should these commands follow with find_aperture among them?

Best regards,
Georgii
Attachments
abr_lgb_koct_1.ele
(812 Bytes) Downloaded 543 times

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

Re: DA scan with vary_element

Post by michael_borland » 27 Jul 2017, 09:49

Georgii,

Here's a working example. Try

Code: Select all

mpiexec -np 20 Pelegant abr_lgb_koct_1.ele
sddsplot -col=x,y abr_lgb_koct_1.aper -split=page -graph=line,vary -order=spect
If you don't have 20 cores available, use a smaller number, or just run elegant.

--Michael
Attachments
example.zip
(12.67 KiB) Downloaded 566 times

Georgii
Posts: 3
Joined: 13 Apr 2017, 12:54

Re: DA scan with vary_element

Post by Georgii » 30 Jul 2017, 22:07

Dear Michael,

Thank you, the example is very useful!
I would like to scan over two KOCT families writing the integral DA area and max absolute x value into .sdds parameter file to see them as functions of two variables K3. Is there a way to extract these values with .ele file only?
And if not, how to make sddsxref follow the loop by vary_element?

Thanks a lot,
Georgii

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

Re: DA scan with vary_element

Post by michael_borland » 31 Jul 2017, 08:39

Georgii,

This is made a little more complicated by the fact that the find_aperture command doesn't write the 'final' output file, even if it is requested in the run_setup command. That means elegant doesn't save a record of the varied parameters. To get around that, one can use an enumeration file to provide the values of the parameters, then use that file with sddsxref to associate the variables with the results. An example is given in the attachment.

--Michael
Attachments
example2.zip
(98.71 KiB) Downloaded 587 times

Georgii
Posts: 3
Joined: 13 Apr 2017, 12:54

Re: DA scan with vary_element

Post by Georgii » 16 Aug 2017, 00:35

Dear Michael,

Thank you very much! Now I can set the intended calculation.

Best regards,
Georgii

Post Reply