Beamline is unstable when matched=1 is set in twiss_output

Moderators: cyao, michael_borland

Post Reply
WEI-HOU
Posts: 31
Joined: 01 Mar 2018, 08:20

Beamline is unstable when matched=1 is set in twiss_output

Post by WEI-HOU » 25 Jan 2024, 13:27

Hello,

I am using Elegant to optimize FODO lattice parameters for given drift, quad's lengths and phase advance.
However, I run into some problems where Elegant cannot find the periodic solution of my FODO lattice.

For example, this set of parameter works fine.

Code: Select all

elegant elegant.ele -macro=driftlength=4.24,quadlength=0.2,phaseadv=0.4
However, this set of parameters does not work, even though there's only 1-mm increases in drift spaces.

Code: Select all

elegant elegant.ele -macro=driftlength=4.241,quadlength=0.2,phaseadv=0.4

Code: Select all

************************** Summary of warnings ****************************
3 types of warnings were recorded:
5* twiss_output: beamline unstable for y plane.
4* twiss_output: beamline unstable for x plane.
1* optimize: Maximum number of passes reached in simplex optimization
*****************************************************************************
How can I solve this problem?
Thanks.
Attachments
test.zip
(1.07 KiB) Downloaded 137 times

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

Re: Beamline is unstable when matched=1 is set in twiss_output

Post by michael_borland » 25 Jan 2024, 15:30

You can include the drift length as a variable in the optimization and then add an optimization term to make it equal the desired value.

See attached file.

--Michael
Attachments
elegant.ele
(1.79 KiB) Downloaded 138 times

WEI-HOU
Posts: 31
Joined: 01 Mar 2018, 08:20

Re: Beamline is unstable when matched=1 is set in twiss_output

Post by WEI-HOU » 25 Jan 2024, 17:13

Hello Michael,

Unfortunately, it does not work when I am trying other parameters.
Is there an alternative to calculate the periodic solution?
Thanks.

Regards
Wei Hou

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

Re: Beamline is unstable when matched=1 is set in twiss_output

Post by michael_borland » 25 Jan 2024, 17:17

Wei Hou,

The basic problem is that a stable periodic solution will not always exist for arbitrary values of the cell parameters. You can set the quadrupole K1 values to something quite small (e.g., |K1|=0.001) to make it less likely that the initial conditions are unstable.

--Michael

Post Reply