Page 1 of 1

beam size match

Posted: 25 Dec 2015, 09:45
by QJohn
Hi, Michael, I have four quadrupoles in my beam line. If I want to constraint the beam size <2mm at last of the beamline by adjusting the four quadrupoles' strength. How to express the rpn equation? Thank you very much!

Re: beam size match

Posted: 06 Jan 2016, 18:14
by michael_borland
You would use

Code: Select all

&optimization_term
term = "Sx .002 1e-5 segt"
&end
&optimization_term
term = "Sy .002 1e-5 segt"
&end
See the manual page for the optimization_setup command for information about the "segt" function.

--Michael

Re: beam size match

Posted: 06 Jan 2016, 18:17
by michael_borland
This assumes you are doing the optimization using particle tracking, which isn't generally necessary. The best method is to match the beta functions. Check out the betaMatching example in the elegant examples file.

--Michael