Strange dispersion calculation

Moderators: cyao, michael_borland

Post Reply
Marcello
Posts: 19
Joined: 28 Jan 2015, 10:05

Strange dispersion calculation

Post by Marcello » 26 Feb 2015, 09:20

Dear all,
I'm trying to close the dispersion in a dogleg using Elegant.
The problem is that the whole behavior of the "etax" parameter found in the *.twi file changes if I change the end of the line.
To explain better the problem i want to show you the data I'm talking about, I use two different lines:

L1: LINE=(D1, Q1, D2, Q2, D3, Q3, D4, B1, D5, Q4, D6, Q5, D7, Q6, D8, B2, D9, Q7, D10, Q8, D11, Q9, D12, Q10, D13, B3, D14, Q11, D15, Q12, D16, Q13, D17, B4, D18)
L2: LINE=(L1, Q14, D19, Q15, D20, Q16)

As you can see L2 is the first line plus a quadrupole triplet in the end. The really strange thing is that after the tracking I obtain different initial value of the etax parameter.

This is the L1 dispersion:
DispL1.png
DispL1.png (5.64 KiB) Viewed 3137 times
and this is the L2 dispersion:
DispL2.png
DispL2.png (5.99 KiB) Viewed 3137 times
these are the values of the parameter in different positions
Data.png
I really can't see where is my mistake, can you help me please?

Marcello

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

Re: Strange dispersion calculation

Post by michael_borland » 26 Feb 2015, 09:32

Marcello,

I would need to have the .ele file in order to diagnose this.

--Michael

Marcello
Posts: 19
Joined: 28 Jan 2015, 10:05

Re: Strange dispersion calculation

Post by Marcello » 27 Feb 2015, 07:06

Dear Michael,
Thanks again for your support.
Dogleg.ele
(795 Bytes) Downloaded 182 times
Marcello

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

Re: Strange dispersion calculation

Post by michael_borland » 27 Feb 2015, 13:37

Marcello,

One problem may be that you are using periodic lattice function calculations in &twiss_output, since this is the default. I suggest turning this off by setting matched=0 in &twiss_output.

--Michael

Marcello
Posts: 19
Joined: 28 Jan 2015, 10:05

Re: Strange dispersion calculation

Post by Marcello » 05 Mar 2015, 10:56

Michael,

Thank you very much for your suggestion, with this flag I can finally start the optimization!
Unfortunately I'm facing a new strange behavior of the optimization process now:
I used both "simplex" and "randomwalk" method to minimize the final beam emittances, the program now is able to compute these values and changes the parameters of my quads in order to do that.
The problem is that when the final value is reached it says:

"error: run_setup, run_control, and beam definition must precede track namelist
Program trace-back:"

Than Elegant stops before writing the sdds "*.twi" file and the new precious beamline one.
The strange fact is that the position of the track namelist is correct.

Thanks a lot again for your attantion,
sorry for all these problems

Marcello

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

Re: Strange dispersion calculation

Post by michael_borland » 05 Mar 2015, 11:32

Marcello,

I'll need to see the .ele file to diagnose this. The file you uploaded above doesn't contain the optimization commands.

--Michael

Marcello
Posts: 19
Joined: 28 Jan 2015, 10:05

Re: Strange dispersion calculation

Post by Marcello » 06 Mar 2015, 05:08

Michael, thanks a lot.

This is the file you are looking for:
Dogleg.ele
(3.01 KiB) Downloaded 177 times
M.

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

Re: Strange dispersion calculation

Post by michael_borland » 06 Mar 2015, 09:17

Marcello,

The problem here is that &optimize is a "major action command," as described in section 7.3 of the manual. That means that, once it is completed, the problem space is wiped clean. To run any subsequent commands, you need to start over with a new &run_setup command etc. Sorry that the manual doesn't make this clear.

I modified your file, see attached, but couldn't test it since I don't have the .lte file.

--Michael
Attachments
Dogleg.ele
(3.85 KiB) Downloaded 179 times

Marcello
Posts: 19
Joined: 28 Jan 2015, 10:05

Re: Strange dispersion calculation

Post by Marcello » 09 Mar 2015, 04:41

Michael,

thanks a lot for your help!

Best regards,
M.

Post Reply