Malign element

Moderators: cyao, michael_borland

Post Reply
wguo
Posts: 41
Joined: 13 Jun 2008, 12:54

Malign element

Post by wguo » 24 Apr 2009, 07:13

Michael,

I am using a malign element to offset the energy as following:

MA1: MALIGN,ON_PASS=0,dp=0.02

Then I compute close_orbit and beta functions, expecting that Elegant would give optical functions at the desired momentum offset.

If I set on_pass = 0, the beta functions are only slight different from that of on-momentum case. The close orbit seems correct.

if I change the on_pass to -1, the close orbit for dp=0.02 is the same as that in case 1, but beta functions are very different from case 1.

I am confused. Which number should I use?

Weiming

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

Re: Malign element

Post by michael_borland » 24 Apr 2009, 08:38

Weiming,

This is a somewhat confusing issue.

Basically, you shouldn't set ON_PASS to any value for this simulation. Leave it at the default value of -1. Elegant interprets this as meaning, for matrix and twiss parameter computations, that you want to simulate a beam that is permanently displaced to the given DP value, rather than just kicked. (It isn't really consistent, because if you track with this setting, then elegant will kick the beam every turn.)

Alternatively, you can use FORCE_MODIFY_MATRIX=1 to force elegant to change the revolution matrix to account for the offset, even when ON_PASS=0.

I've attached an example of how to do the simulation.

--Michael
Attachments
offMomentumTwiss.tgz
(2.12 KiB) Downloaded 593 times

wguo
Posts: 41
Joined: 13 Jun 2008, 12:54

Re: Malign element

Post by wguo » 24 Apr 2009, 08:56

Michael,

Nice example. Thanks!

Weiming

xhs05
Posts: 30
Joined: 29 Nov 2012, 21:43

Re: Malign element

Post by xhs05 » 19 Jan 2013, 12:02

Hi Michael,

Sometimes I'm still confusing on this element.

I notice that in the example "/PAR/dynamicAperture/parTrack.lte", you set 'on_pass=0, force_modify_matrix=1' to calculate the off-momentum DA.

But in the case "/PAR/chromTracking/parTrack.lte", you use the default value of 'on_pass' to calculate the off-momentum tunes and chromaticities.

I can't quite understand the different between this two cases. In my opinion, both cases require the same setting of the off-momentum particles.

Could you please explain it for me? Thanks a lot!

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

Re: Malign element

Post by michael_borland » 21 Jan 2013, 11:01

The essential difference between these two examples is that one involves mult-turn tracking and the other doesn't. When tracking many turns, one usually does not want the MALIGN element to act on the beam each turn. E.g., we don't want to give the beam an additional energy offset each turn. Hence, in this case we use ON_PASS=0 to specify that the energy kick occurs only on the zeroth pass through the system. However, when ELEGANT sees this, it assumes that this "transient" effect should not be included in optics calculations. The FORCE_MODIFY_MATRIX=1 setting tells elegant that, contrary to the default behavior, we do in fact want this kick (energy offset) to be included in the optics calculations.

If we are not tracking multiple turns, then we don't need to change ON_PASS from the default value of -1. Since that is the cause, we also don't need FORCE_MODIFY_MATRIX=1, because the matrix will be modified by default.

Hope that makes it more clear.

--Michael

xhs05
Posts: 30
Joined: 29 Nov 2012, 21:43

Re: Malign element

Post by xhs05 » 26 Jan 2013, 15:48

Michael,
Thank you! My understanding of this element becomes much better. But I found that it is still difficult for me to understand one of the Examples.

In /ElegantExamples/PAR/chromTracking/parTrack.lte, you define this element with the following line:
mal: malign
And then, track particles for 1024 turns to calculate the tune at different momentum.
It doesn't make sense to me because in this case, the ON_PASS=-1, which means that the particle will get an additional energy offset each turn. I run this example but I notice that the energy deviation of a particle doesn't change at all. But I believe the particle should get additional energy offset each turn, am I right?

While, in /ElegantExamplts/PAR/chromTracking2/parTrack.lte, this element is defined as follows:
mal: malign,on_pass=0,force_modify_matrix=1
I think this case agrees with your explanation on the usage of the element: MALIGN.

Haisheng Xu

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

Re: Malign element

Post by michael_borland » 26 Jan 2013, 16:58

Haisheng,

In /ElegantExamples/PAR/chromTracking/parTrack.lte, there's a RECIRC element (RC) in the beamline, right after the malign element. This element cases all upstream elements to be ignored except on the first pass. Basically, the beam recirculates back to the RC element rather than to the beginning of the beamline. If it wasn't for this element, then the beam would get an additional energy kick each turn.

--Michael

xhs05
Posts: 30
Joined: 29 Nov 2012, 21:43

Re: Malign element

Post by xhs05 » 28 Jan 2013, 09:27

Now I understand! :lol:

Appreciate your help greatly!

Haisheng Xu

Post Reply