emittance and CSR optimization

Moderators: cyao, michael_borland

Post Reply
jtobin
Posts: 47
Joined: 23 Jul 2008, 15:00

emittance and CSR optimization

Post by jtobin » 09 Feb 2012, 16:27

Dear elegant folks,
I have 3 deflecting cavities in a line (CAVON1CAVON,CAVON2). These three cavities are between two dogleg section. I want to use elegant for optimizing the phase and strength of these cavities such that it satisfies two conditions (i) difference between the outgoing emit x and incoming emit z is minimized (ideally should be zero) and (ii) difference between the outgoing emit z and incoming emit x is minimized (again, ideally difference should be zero) as this is an emittance exchanger. And both of this with CSR turned on.

The problem starts to become difficult if I turn on the CSR at the dipoles (four of them). So two questions:

(i) What is the optimization term that I use to do the above?
(What I am currently doing is in the attached but I do not know how to extract incoming emittance from a FITPOINT (MATCH1). Doing
MATCH1#1.enx el 3E11 pCentral * / - sqr gives me an error??? MATCH1 is a point just before the emittance exchanger and MATCH2 is a point after the exchanger. So I have hard coded it in for now. I am sure there is a "guru-like" solution.

(ii) More importantly, how do i speed up the optimization with CSR on? Any suggestions (other than reducing the BINS SIZE )? It takes me hours to run and program just hangs. I am bit suspicious that i may be doing something wrong. For instance, if I optimize the program with a single particle with CSR off and then use those values to run with CSR and say 10K particles, then the emittance numbers go crazy. Is there a smarter way of doing this? Thank you..

Since the CSR emittance growth is overestimated in elegant, I want to use elegant to get confidence on the upper limit.
regards,
Charles
Attachments
A0_Xchgr.lte
(5.14 KiB) Downloaded 150 times
A0_Xchgr.ele
(4.95 KiB) Downloaded 164 times

jtobin
Posts: 47
Joined: 23 Jul 2008, 15:00

Re: emittance and CSR optimization

Post by jtobin » 13 Feb 2012, 14:53

For some reason, MATCH#1.ex and MATCH#1.ecx works. But not MATCH#1.enx ? Is this not in the list of optimization variables ? It will be nice to have this.

-Charles

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

Re: emittance and CSR optimization

Post by michael_borland » 13 Feb 2012, 17:39

Charles,

For issue #1, there is no better way to do this at present because the interior fitpoints don't presently support all the fields that the final fitpoint supports. I'll put it on my to-do-list.

The best way to speed up the optimization with CSR is to use a parallel computer and Pelegant. Even a four- or eight-core computer would be an improvement. Barring that, try reducing the number of particles and bins to the bare minimum. You can also turn off unneeded output, which I've done. See attached modification of A0_Xchrgr.ele

I ran your simulation with 1000 particles. It converged pretty quickly (<15 mins). Using 10k particles as a follow-on optimization didn't seem to make a big difference. See attached file A0_Xchrgr1.ele

--Michael
Attachments
A0_Xchgr1.ele
Follow-on optimization with 10k particles.
(5.23 KiB) Downloaded 166 times
A0_Xchgr.ele
First optimization with 1k particles.
(5.14 KiB) Downloaded 156 times

Post Reply