Coupled motion between ions & e-beam simulation using ion_effects

Moderators: cyao, michael_borland

Post Reply
tiansk
Posts: 39
Joined: 16 Mar 2012, 22:01

Coupled motion between ions & e-beam simulation using ion_effects

Post by tiansk » 22 Sep 2021, 20:40

Hi
I am using the elegantExamples(ionEffects1)to simulate the coupled motion between ions & e-beam. In the aps.lte file,there are two transfer models for fast tracking: RING_ILM10 and RING_ILM_NOSR, so there are 10 and 1 ion production points corresponding to the complete ring respectively.When I analyzed the vertical emittance of the e-beam,the two models give very different results as shown in the attachment,I'm not sure what's wrong?I have another question,How many macro ions are appropriate?In the exanple ion1.ele file,the macro_ions = 1.

Best regards,

Tiansk
Attachments
APSRing.zip
(4.93 MiB) Downloaded 106 times
IonPiont10_ey.png
IonPiont10_ey.png (5.69 KiB) Viewed 1220 times
IonPiont1_ey.png
IonPiont1_ey.png (4.65 KiB) Viewed 1220 times

Teresia
Posts: 30
Joined: 04 Oct 2018, 08:42

Re: Coupled motion between ions & e-beam simulation using ion_effects

Post by Teresia » 24 Sep 2021, 08:41

Hi,

In my experience when using the ion_effects your results will be very different depending on the number of interaction points you use. You need to define a sufficent number to give you a good approximation of the lattice. I have used the analytic trapping condition to see how the trapping is expected to change over the lattice and then chosen points that give a good approximation of the behaviour. Especially I think it's important to include the points where the largest trapping is expected. For my lattice I have over 90 interaction points, but the simulations are very resource demanding so in the end the number of points likely has to be a compromise with the execution time.

I have also tried different number of macroions, but so far not seen any significant differences between using 1 or more. That can however be because I so far only have used the Gaussian model for the ion distribution and I have around 900 bunches in my machine so the ion density builds up very fast. Ideally I would like to use at least 100, but sometimes that gives me problem with both memory and execution time. I have sometimes used the ion_span to limit the range when the ions are considered lost, which has helped a bit so I would suggest to do some tests with that to be able to run with more interaction points.

Best regards,

Teresia

tiansk
Posts: 39
Joined: 16 Mar 2012, 22:01

Re: Coupled motion between ions & e-beam simulation using ion_effects

Post by tiansk » 25 Sep 2021, 21:08

Hi, Teresia:

Thank you for your replies. I couldn't agree more with what you said: the trapping condition depends on beam size(beta function) that changed over the lattice, so the interaction points for simulation must be chosen carefully.

But in my case, the beta function at the 10 and 1 interaction points is same, meanwhile the vacuum gas data is also exactly the same. So it is not well understood that different number of interaction points can lead to such a large difference in beam parameters.

Best regards,

Tiansk

jcalvey
Posts: 16
Joined: 08 Jan 2021, 12:20

Re: Coupled motion between ions & e-beam simulation using ion_effects

Post by jcalvey » 15 Oct 2021, 12:02

Hi Tiansk,

Sorry for the slow reply, I just now saw this post.

I would not recommend using RING_ILM_NOSR. It was used for testing purposes, but won't give you accurate results. I'm not sure what the minimum number of interaction points required is to get a good result, but it's definitely more than one. Also, the NOSR means there is no synchrotron radiation.

The most important thing when choosing ion interaction points is that different parts of the lattice should be sampled. I have had success modeling the APS with just 11 IPs, spaced evenly around the ring, so they sample different parts of the 40 sector lattice. Of course this does require element-by-element tracking.

You may be able to get away with macro_ions=1. Recall that this is the number of macroparticles generated per ion species, per bunch passage, at each IP, so it adds up quickly. For Teresia's example with 900 bunches, with 5 ion species, that is 4500 ion macroparticles per turn at each IP.

Hope this helps,
Joe

tiansk
Posts: 39
Joined: 16 Mar 2012, 22:01

Re: Coupled motion between ions & e-beam simulation using ion_effects

Post by tiansk » 18 Oct 2021, 02:38

Hi Joe,
Thank you for your replies. I have not yet catch on the simulation of the ion_effect. I now see the example 'ionEffects1' is an old version, the ion_effect has been updated several versions. Could you upload an ion_effect example of the new version? I still have a few questions:
1.Do I have to turn on synchrotron radiation for ion_effect simulation?
2.For macro_ions=1 and Teresia's example with 900 bunches, with 5 ion species, that is 4500 ion macroparticles per turn at each IP. If In the gasMix.sdds file, one of the five gases has zero pressure, the number of macroparticles generated per bunch passage, at each IP is 4 or 5?


Best regards,

Tiansk

jcalvey
Posts: 16
Joined: 08 Jan 2021, 12:20

Re: Coupled motion between ions & e-beam simulation using ion_effects

Post by jcalvey » 19 Oct 2021, 19:26

You are right that the ionEffects1 example is old. I will work on making a new one when I have a chance. To answer your questions:
1. No, you don't have to.
2. I believe in this case it would generate a macroparticle with zero charge (but which would still receive beam kicks). I should probably add a few lines of code to prevent this, to avoid wasting cpu cycles.

-Joe

Post Reply