Problem with varying the focusing strengh of a radial focusing element

Moderators: michael_borland, soliday

Post Reply
meisal
Posts: 3
Joined: 31 May 2017, 07:47

Problem with varying the focusing strengh of a radial focusing element

Post by meisal » 02 Jun 2017, 04:29

Dear all,

I'm a new user to elegant (version 33.0.3).
I'm using elegant to simulate a simple beamline with two drifts and a plasma lens in between. As plasma lens I use the quad / kquad element with the option RADIAL=1 to get the same focusing in x and y. To design my lens I need to vary the geometric strengh K1 of the quad. Here starts my problem.

If I vary the strengh K1 of the quad with RADIAL=1 the simulation crashes. This happens for the vary_element command as well as for the optimization_variable command. With RADIAL=0 everything runs normally.

I attached some example files to demonstrate the problem. The code should work as it is and crashes when changing to a radial focusing quad.

Thanks in advance for any hint,
Martin
Attachments
APL.lte
(631 Bytes) Downloaded 513 times
APL.ele
(1.42 KiB) Downloaded 521 times

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

Re: Problem with varying the focusing strengh of a radial focusing element

Post by michael_borland » 12 Jun 2017, 14:26

Martin,

There is a bug in the radially-focusing quadrupole implementation when the order is greater than 3. If you set default_order=2 in the &run_setup command, it should run.

I'll track down the bug for the next release.

--Michael

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

Re: Problem with varying the focusing strengh of a radial focusing element

Post by michael_borland » 12 Jun 2017, 17:00

Martin,

This bug has been fixed. The fix will be included with the next release, which should be out in the next few weeks.

Thanks for reporting the bug.

--Michael

meisal
Posts: 3
Joined: 31 May 2017, 07:47

Re: Problem with varying the focusing strengh of a radial focusing element

Post by meisal » 13 Jun 2017, 06:57

Micheal,

thanks for your reply. It works with default_order=2 but I do not understand the consequences of this option.

Until now I have seen it as a symmetrical problem and worked with RADIAL=0. Then I looked only at the x-plane where the beam is focusing. My goal is to scan the emittance of a beam from a plasma wakefield acceleration. For that I am using sddsemitproc.

A typical geometrical emittance in my case is of the order E-8 (m rad). When recontructing the emittance I see differences between default_order=2 and default_order=3. A emittance of E-9 (m rad) is recontucted the same in both cases whereas a emittance of E-7 (m rad) is recontructed correct with default_order=2 and about four times larger in default_order=3. In this case the waist of the scan is wider and shifted.

I simulated it without an energy spread. Is there a reason for the emittance growth in the default_order setting? What difference is between default_order=2 and default_order=3? Or is there a correlation between the focusing x-plane and the defocusing y-plane?

Best wishes,
Martin

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

Re: Problem with varying the focusing strengh of a radial focusing element

Post by michael_borland » 13 Jun 2017, 12:07

Martin,

Setting default_order=2 instead of 3 means that the transport matrix is only second order. So any terms that depend higher powers of x, x', y, y', and delta are dropped. If the beam is large or has large divergence at the lens, this could matter. The emittance measurement with a quad scan depends on the assumption that the transport is linear. If there are differences when you increase the order, then this appears not be be a valid assumption in your case.

Do you see similar results if you set RADIAL=0?

--Michael

meisal
Posts: 3
Joined: 31 May 2017, 07:47

Re: Problem with varying the focusing strengh of a radial focusing element

Post by meisal » 14 Jun 2017, 04:49

Micheal,

I only see this results with RADIAL=0 and default_order greater than 2. I can not run the simultion with RADIAL=1 and default_order=3 because of the bug.

Until now I thought I could use RADIAL=0 and look at the x-plane independently from the y-plane, because it is a symmetrical problem. So that I do a quad scan with one quad and only measure the emittance in x. In the y-plane the beam is defocused and a emittance scan in y is not possible. But in this case I see a correlation between the x- and y-plane with default_order=3. The final emittance in x depends on the emittance I select for y.

I do not understand where the correlation between x and y with default_order=3 come from. I think default_order=2 should be good for me and then I can use RADIAL=1.

Thanks for your help,
Martin

Post Reply