Lost particles during tracking

Moderators: cyao, michael_borland

Post Reply
imartin
Posts: 12
Joined: 09 Mar 2010, 10:53

Lost particles during tracking

Post by imartin » 05 Dec 2013, 07:43

Dear all,

I am trying to do some tracking to determine the dynamic aperture and frequency map of a ring with physical apertures included. This works well either using the basic &track command with a WATCH element, or with &frequency_map. However, I am also trying to work out what happens to particles that are lost, and in particular the x and y coordinates of the lost particles and the longitudinal position / final element in order to determine which aperture(s) are limiting the acceptance and will be the primary loss points.

Is there a way to do this in elegant? I notice that when using the watch element, the output file has parameters 's' and 'previous element', but they always seem to read '0' and 'NaN' respectively.

many thanks,
Ian

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

Re: Lost particles during tracking

Post by michael_borland » 05 Dec 2013, 08:58

Ian,

For basic tracking, lost particles will be logged to a special file if you give the filename in the &run_setup command:

Code: Select all

&run_setup
...
 losses = %s.los
...
&end
For local momentum aperture (&momentum_aperture command), the output file contains the coordinates at the time of loss for the lowest-amplitude unstable particle for each element.

--Michael

imartin
Posts: 12
Joined: 09 Mar 2010, 10:53

Re: Lost particles during tracking

Post by imartin » 06 Dec 2013, 10:46

Thanks Michael,

That's exactly what I was after. However, when I load in the results, I'm seeing something I didn't expect. If I select the initial coordinates of the particles that are lost, it looks as though the beam is being displaced when it is tracked. The initial coordinates go from 0 to 10 mm vertically, but the particles that survive are those centred around 5 mm vertically (see figure).

These are the commands I am using:

&run_setup
lattice = lowalphaVMXv9.lte,
use_beamline = VMXW,
default_order = 3,
concat_order = 0,
p_central_mev = 3e3,
losses = %s.lost
&end

&twiss_output
filename = %s.twi,
radiation_integrals = 1,
matched = 1,
output_at_each_step = 0,
concat_order = 3
&end

&aperture_input
input = chambre_no_i05_1DDBA_cell2.sdds,
periodic=0,
persistent=0,
disable=0,
&end

&run_control
n_steps = 1,
n_indices = 0,
n_passes = 156
reset_rf_for_each_step = 1
first_is_fiducial = 0
restrict_fiducialization = 0
&end

&sdds_beam
input = input_coords.sdds,
input_type = "elegant",
sample_interval = 1,
reuse_bunch = 0,
&end

&track
center_on_orbit=1,
center_momentum_also=1,
offset_by_orbit=0,
offset_momentum_also=0
&end

Should I be setting something differently? I tried changing centre_on_orbit to 0, but no particles survived.

best regards,
Ian
Attachments
lostparticles.png
lostparticles.png (5.62 KiB) Viewed 5656 times

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

Re: Lost particles during tracking

Post by michael_borland » 06 Dec 2013, 11:34

Ian,

This is certainly strange. Since you don't actually compute the closed orbit, it shouldn't matter. I suggest trying
* Use &rf_setup command to set the rf cavity frequency. If it is slightly off, odd things can happen.
* Use the &closed_orbit command to compute and check the closed orbit. Is it distorted for some reason?

--Michael

imartin
Posts: 12
Joined: 09 Mar 2010, 10:53

Re: Lost particles during tracking

Post by imartin » 06 Dec 2013, 12:06

Michael,

I tried computing the closed orbit, and it looks fine (0 in the vertical, 1E-11 in the horizontal). This is with start_from_centroid=0 and start_from_dp_centroid=0. If I set them to 1, then the calculation fails to converge.

The ring I'm using does not include an RF cavity as I am trying to do 4D tracking - is this likely to cause issues? Also, the ring has negative momentum compaction - would that be a problem?

thanks,
Ian

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

Re: Lost particles during tracking

Post by michael_borland » 06 Dec 2013, 18:08

Ian,

If you don't have an rf cavity, SREFFECTS, or synchrotron radiation turn on anywhere, then negative alpha shouldn't matter.

I'm not sure what else to suggest other than "send me the files."

--Michael

Xavier Nuel
Posts: 12
Joined: 15 Apr 2013, 07:49
Location: Synchrotron Soleil (France)

Re: Lost particles during tracking

Post by Xavier Nuel » 17 Nov 2014, 13:07

Dear all,

I have more or less the same problem as our colleague Ian.

I put the dimensions of my vacuum chamber to compute the DA using MAXAMP element (see the lattice file attached) and the particles become lost at 12 mm.

VCHAMBER: MAXAMP,X_MAX=0.035,Y_MAX=0.0125
MHU640: MAXAMP,X_MAX=0.028,Y_MAX=0.007
SDM1: MAXAMP,X_MAX=0.021,Y_MAX=0.005
SDC1T: MAXAMP,X_MAX=0.025,Y_MAX=0.0125

When I check what happens at this location I see that the particles becomes lost in a place where the dimensions of my physical apertures seem to be ok (see figures) and with a number of turn very small. In particular it's very strange because it seems that the particle is lost in the vertical plane with an amplitude tinny compared with the vertical physical aperture.

Do you have any idea of what is going on? Is it due to the mode of the watch used? In my case I used mode=centroid to make the diagnostics.

I have attached the scripts used to compute the diagnostics of this case:
1) The lattice *lte
2) ChromaTrack.ele to compute tracking at the amplitude of 12 mm where the particles becomes lost. I am also using 4D tracking.

Thank you in advance.
Have a good day
Xavier
Attachments
lost_particle_y.png
Lost particle at vertical plane
lost_particle_y.png (5.15 KiB) Viewed 5599 times
ChromaTrack.ele
(2.48 KiB) Downloaded 267 times
SOLEIL_nominal_lattice2013_vchamber.lte
(19.12 KiB) Downloaded 262 times

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

Re: Lost particles during tracking

Post by michael_borland » 17 Nov 2014, 14:24

Xavier,

The problem appears to be that when elegant rotates KSEXT and KQUAD elements, it rotates the aperture as well. This is obviously not the right thing to do in all cases (or even in most cases).

You can work around this by bracketing your rotated sextupoles with MAXAMP elements, as in

Code: Select all

QT0: KSEXT, L= 0.0,  K2=   0.0, TILT = 0.7854    SYNCH_RAD=0,ISR=0
QTAP: MAXAMP,X_MAX=1,Y_MAX=1
QT:line=(VCHAMBER,QTAP,QT0,QTAP,VCHAMBER)
This sequence ensures that things work correctly even if the QT element is part of a reflected beamline. Please let me know if this doesn't solve the problem

--Michael

Xavier Nuel
Posts: 12
Joined: 15 Apr 2013, 07:49
Location: Synchrotron Soleil (France)

Re: Lost particles during tracking

Post by Xavier Nuel » 18 Nov 2014, 06:36

Hi Michael,

Your answer solves the problem. The problem is fixed.

Thank you very much for your fast reply.
Have a good day

Xavier

Post Reply