Page 1 of 1

DA scan with vary_element

Posted: 27 Jul 2017, 07:51
by Georgii
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

Re: DA scan with vary_element

Posted: 27 Jul 2017, 09:49
by michael_borland
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

Re: DA scan with vary_element

Posted: 30 Jul 2017, 22:07
by Georgii
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

Re: DA scan with vary_element

Posted: 31 Jul 2017, 08:39
by michael_borland
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

Re: DA scan with vary_element

Posted: 16 Aug 2017, 00:35
by Georgii
Dear Michael,

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

Best regards,
Georgii