Particles fly off to huge trajectories - any ideas?

Moderators: cyao, michael_borland

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

Particles fly off to huge trajectories - any ideas?

Post by Seb_Wilkes » 08 Jun 2022, 05:13

Hello everyone,

I've been running some runs where I externally drive a bunch using EVKICK. Most runs are fine, but sometimes I'll see a run where there is a really big jump in the Y-size. I presume with confidence this is numerical? (No Touschek elements etc; this is just a standard synchrotron lattice using SYNCH_RAD, ISR=1 and a CAV element).

To be clear what happens, I plotted the result in Y-plane of phase-space. It seems most of the bunch behaves entirely fine, except for one particle which shot out to mm of orbit! Naturally, if I remove any outliers (IE: particles over 3 STDs away from the mean) I get a normal behaving pattern. What is more unusual is that this effect happens within one turn! The other colours on the graph refer to some other runs. The orange one is one that behaves just fine. The green one has a similar problem, but the extent to which particles shoot off is far less - but still noticeable when looking at the aggregate statistics.
Example_graph_zoom.jpg
Example_graph.jpg
I should say that while I'm running quite sparse particle runs (but with full tracking) this doesn't stop the point that certain particles have extremely unusual behaviour.

Is there a way to ensure this doesn't happen? How much can we trust the simulations if I just remove outliers?

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

Re: Particles fly off to huge trajectories - any ideas?

Post by michael_borland » 01 Jul 2022, 16:17

It's hard to give advice without having your input files. Can you post them?

--Michael

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

Re: Particles fly off to huge trajectories - any ideas?

Post by Seb_Wilkes » 05 Aug 2022, 09:49

Hello everyone.

Sorry Michael, I now understand that is the 'done' thing.

Allow me to be more thorough. Since those simulations were performed, I have done a great deal more. That effect is still an ever present risk. In fact I created a simple 'cleaning' script that goes through my phase space and ignores (for the whole simulation) any particle that deviates further than (say) 3.5 STDs from the mean. The crazy part is that almost every single simulation fails in at least one particle.

Now, I appreciate I am not running that many particles. However since a lot of my work relies on aggegrate statistics, like the mean or the standard deviation, these quantities tend to be quite robust. Hence even most simulations, at least to my eye, behave as one would expect when I calculate the aggegate quantities. Whenever I've ran a data point again, but seeded differently with respect to both bunch creation and stochastic effects, the results always agree very well (which indicates convergence). That's all I want to get out the way first.

My work involves trying to excite the beam across different frequencies. Please see my picture below (taken from a recent conference poster).
poster_pic.png

I have a 'movie' script, which I applied to the following - you can see what is happening in the phase space. The two movies, A and B attached, correspond to the following two graphs, respectively.
A.png
B.png
(sorry I'll need another forum post to place the files)
Last edited by Seb_Wilkes on 05 Aug 2022, 09:57, edited 1 time in total.

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

Re: Particles fly off to huge trajectories - any ideas?

Post by Seb_Wilkes » 05 Aug 2022, 09:54

See attachments for movies and for elegant script.

The 'offending' frequencies were 143806 Hz (A) and 146006 Hz (B).
Attachments
elegant_files.zip
(7.83 KiB) Downloaded 12 times
Y_plane_phase_space_movies.zip
(27.09 MiB) Downloaded 12 times

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

Re: Particles fly off to huge trajectories - any ideas?

Post by michael_borland » 19 Sep 2022, 13:14

Looking at your files, I don't see any obvious problems.

A few things to try:
  • More particles, to see if it is something real or just statistics.
  • Reduce the sigma span of the random number generator used for synchrotron radiation, e.g.,

    Code: Select all

    &global_settings
    	SR_gaussian_limit = 2
    &end
    
I suspect that there is something real here that perhaps gets noticed from time to time because of poor statistics. That is, you only see as an anomaly because one particle out of 400 gets unlucky very occasionally; if you had more particles, you might see a distribution of particles that includes large amplitudes. The results with more particles might not have the same rms statistics as a smaller set of particles with a pre-statistics cutoff.

--Michael

Post Reply