Using ibsEmittance (fixing vertical)

Moderators: cyao, michael_borland

Post Reply
Seb_Wilkes
Posts: 15
Joined: 04 Mar 2022, 09:48

Using ibsEmittance (fixing vertical)

Post by Seb_Wilkes » 04 Apr 2023, 11:20

Hello everyone,

I hope this is a quick question! I am using ibsEmittance because I want to plot how the beam-dimensions vary with current. For the lattice I am dealing with, there is no coupling between the two planes (I.E. no skew quadrupoles), nor any vertical dispersion. If I supply the vertical emittance as

Code: Select all

 -emityInput=1e-12 
I get a really small value for the emittance. I know that it gets smaller, https://uspas.fnal.gov/materials/12MSU/ ... cture6.pdf, but this seems rather small. I try alternatively setting the coupling to something very small, like 0.0001 but still get small values.

Am I using ibsEmittance correctly? The value of the vertical emittance that I supply comes from the ring's natural emittance (from quantum excitations), so if the ibsEmittance calculator is using this very small value of the (ibs) vertical emittance, then how can we be sure that the horizontal emittance is accurate (they are mathematically coupled)? For this use-case, does it mean I would have to write my own solver? :?
Last edited by Seb_Wilkes on 07 Apr 2023, 02:32, edited 1 time in total.

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

Re: Using ibsEmittance

Post by michael_borland » 04 Apr 2023, 12:20

There's actually a bug in the implementation of emityInput; the fix will be distributed in the next release. However, you can get completely equivalent results using the -coupling parameter, since ibsEmittance translates emityInput and emitxInput (or the natural emittance) into a value for the "coupling" (which is really the emittance ratio).

In ibsEmittance, the two emittances are mathematically coupled via the imposition of the requirement that ey/ex=constant (the "coupling" value from the commandline).

The assumption of ibsEmittance is that all of the sychrotron-radiation-related diffusion in the vertical plane comes from coupling of horizontal-plane diffusion. If there really is no x-y coupling and no vertical dispersion, then the vertical emittance would be determined by IBS and the radiation recoil effect. That effect is very small, so in real rings we can neglect it because there is always some coupling and vertical emittance. The vertical emittance will still be very small, but the horizontal emittance and energy spread will be large because of the high IBS rate.

--Michael

Seb_Wilkes
Posts: 15
Joined: 04 Mar 2022, 09:48

Re: Using ibsEmittance

Post by Seb_Wilkes » 05 Apr 2023, 05:00

Thanks Michael, that's helpful clarification. I think it also helped to put things into context.

This is now risking turning into a feature request, but if I knew I would have a particular vertical emittance, then I could I not regard that as a constant in the horizontal emittance calculations?

I ask because for my situation, I am trying to look at the effects of an ideal ring with no vertical dispersion and no skew quadrupoles (therefore no coupling). Hence, as I know see, the vertical emittance (from IBS) would indeed be entirely negligable. But in reality we can be confident the vertical emittance will be greater than that. In fact, Diamond, for instance, plan to artifically increase their vertical emittance using a multibunch feedback system. In that case, particularly, the vertical emittance is a free parameter, but otherwise fixed within the equations.

If this is not something readily modifiable within the elegant ecosystem, I suspect I would just have to code up the equations, and the iterative solving routine, myself in python? It sounds like a lot of work! What are your thoughts on this? Dive into elegant; start from scratch in python; or not bother with either as it would not change the other IBS results much?

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

Re: Using ibsEmittance

Post by michael_borland » 05 Apr 2023, 10:51

It turns out that ibsEmittance almost does what you want, so it was easy to add this feature. The new version is attached, in case you build from source.

The new option is -fixEmity={0|1}. E.g.,

Code: Select all

ibsEmittance -emityInput=1e-15 -fixEmity=1 ...
--Michael
Attachments
ibsEmittance.c
(54.72 KiB) Downloaded 148 times

Seb_Wilkes
Posts: 15
Joined: 04 Mar 2022, 09:48

Re: Using ibsEmittance

Post by Seb_Wilkes » 07 Apr 2023, 02:31

Hi Michael,

Thanks for putting that together. I compiled it, but I just want to check something please. Without using the new fixEmity command, I just wanted to check that they were the same. Is the discrepancy related to the bug you mentioned about using -emityInput? (For context, 'oldRunScript' uses ibsEmittance that shipped with elegant 2019.1.1; the new one is the one you sent me)

Code: Select all

$ ./oldRunScript; ./newRunScript 
****
Input values:
emitxInput ($gp$rm) =  1.616545e-10  emityInput ($gp$rm) =  1.000000e-12  sigmaDeltaInput =      9.355127e-04

IBS-inflated values:
emitx ($gp$rm) =  1.090417e-10  emity ($gp$rm) =  1.090417e-10  sigmaDelta =      9.508862e-04  sigmaz (m) =      3.800854e-03

****
IBS-inflated values:
emitx (m) =   2.166084e-10  emity (m) =   1.339947e-12  sigmaDelta =  1.069316e-03  sigmaz (m) =  4.274238e-03

****
Comparing the results, it would seem that the latter makes more sense.

I plotted the difference between fixedEmit={1|0}, if you're curious:
ibs_graph.png
So I think that was indeed worth the modification (thanks again Michael).

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

Re: Using ibsEmittance (fixing vertical)

Post by michael_borland » 07 Apr 2023, 09:01

Yes, that's the bug you are seeing in the first set of results. It made the two emittances equal.

--Michael

Post Reply