Longitudinal phase trajectories

Moderators: cyao, michael_borland

Post Reply
A.V.Bogomyagkov
Posts: 18
Joined: 29 Jan 2021, 14:07

Longitudinal phase trajectories

Post by A.V.Bogomyagkov » 31 Jan 2021, 23:46

Hello,
My name is Anton.

I am starting to use Elegant and as the first step I want to compare tracking results of Elegant and MADX.
Here are a lattice file, elegant script and a plot of phase trajectories for two particles.

I understand the calculated horizontal phase trajectories, damping is visible, but longitudinal trajectories are mystery.
Cdelta versus dCt should have been a closed curve (an ellipse), but it is not. I found several topics on forum and I think I did everything what was advised.
Am I using the wrong coordinates (Cdelta,dCt) for longitudinal motion? What variables should I use?

Here is the version of elegant

Code: Select all

This is elegant 2020.5, Dec 11 2020, by M. Borland, J. Calvey, M. Carla', N. Carmignani, M. Ehrlichman, L. Emery, W. Guo, R. Lindberg, V. Sajaev, R. Soliday, Y.-P. Sun, C.-X. Wang, Y. Wang, Y. Wu, and A. Xiao.
=====================================================================================
Thanks for using elegant.  Please cite the following reference in your publications:
  M. Borland, "elegant: A Flexible SDDS-Compliant Code for Accelerator Simulation,"
  Advanced Photon Source LS-287, September 2000.
If you use a modified version, please indicate this in all publications.
=====================================================================================

The second question is about pelegant.
On windows 10 I run pelegant like

Code: Select all

 mpiexec -n 16 pelegant run-track.ele 
The program runs, twiss is calculated but %s.w1 file is not created.
I have a 16 core machine. What is the right way of running pelegant on windows 10.


Thank you,
Anton
Attachments
tracking.png
run-track.ele
(1.5 KiB) Downloaded 301 times
ctau_2021.01.25-09.15.04.lte
(35.94 KiB) Downloaded 283 times

duanz
Posts: 51
Joined: 30 May 2009, 01:50

Re: Longitudinal phase trajectories

Post by duanz » 01 Feb 2021, 19:38

Hi Anton,

Regarding your first question, you can plot Cdelta vs. Ct to get the ellipse (spirally inward due to radiation damping) you expected. This is because you set "CHANGE_T=1" of the RF element, according to the manual, the time coordinates of the particles is modified to subtract off NTrf , where Ttf is the rf period and N = ⌊t∕Ttf + 0.5. Instead, if you set "CHANGE_T=0", then plottingg Cdelta vs dCt would get want you wanted.

Best,

Zhe

A.V.Bogomyagkov
Posts: 18
Joined: 29 Jan 2021, 14:07

Re: Longitudinal phase trajectories

Post by A.V.Bogomyagkov » 02 Feb 2021, 04:01

Thank you Zhe.

So, if I use "centroid" mode of watch element and CHANGE_T=0 of RFCA then plotting Cdelta versus Ct does give me an ellipse. I tried it and it works.

Code: Select all

 
 w1: watch,filename="results/ct_ring.w1",mode="centroid"
RF: RFCA, L=0.01, VOLT=3.4e6, phase=180, FREQ=3.505013298676E8, CHANGE_T=0
I do not understand the mode "coordinates" of watch element. After running elegant with this mode the %s.w1 file contains columns

Code: Select all

8 columns of data:
NAME            UNITS           SYMBOL          FORMAT          TYPE    FIELD  DESCRIPTION
                                                                        LENGTH
x               m               NULL            NULL            double  0       NULL
xp              NULL            NULL            NULL            double  0       NULL
y               m               NULL            NULL            double  0       NULL
yp              NULL            NULL            NULL            double  0       NULL
t               s               NULL            NULL            double  0       NULL
p               m$be$nc         NULL            NULL            double  0       NULL
dt              s               NULL            NULL            double  0       NULL
particleID      NULL            NULL            NULL            long    0       NULL
The column p is $\beta\gamma$ of the particle and t is in seconds, and there are no coordinates Cdelta and Ct.
If I want phase-space trajectories of individual particles which mode do I use?

Another question is related to pelegant.
I want to simulate phase-space trajectories of 1024 particles.
I simply tried in windows power shell

Code: Select all

mpiexec -n 16 pelegant run-track.ele 
but %s.w1 file is not created. Is there a way to do it?

Respectfully,
Anton

duanz
Posts: 51
Joined: 30 May 2009, 01:50

Re: Longitudinal phase trajectories

Post by duanz » 02 Feb 2021, 04:18

Hi Anton,

If you want phase-space trajectories of individual particles, it is better to use the "coordinates" mode, using "CHANGE_T=0", now t is the absolute accumulated time when a particle arrives at the WATCH element, and dt is the particle's arrival time at the WATCH element, relative to the reference/fiducial particle. You then need to postprocess the result to obtain delta = "p / pCentral - 1", for example you could execute the following command to generate a new file including a column delta. In this way you could plot dt vs delta.

sddsprocess results/ct_ring.w1 results/ct_ring.w1_new -define=col,delta,"p pCentral / 1 -"

Regarding your second question, I'm not a Windows user so I'm sorry you might need to wait for others' suggestions.


Best,

Zhe

A.V.Bogomyagkov
Posts: 18
Joined: 29 Jan 2021, 14:07

Re: Longitudinal phase trajectories

Post by A.V.Bogomyagkov » 02 Feb 2021, 04:50

Thank you, Zhe.

Post Reply