Notes on TRACK Distributions J.F Ostiguy/ APC ostiguy@fnal.gov - - PowerPoint PPT Presentation

notes on track distributions
SMART_READER_LITE
LIVE PREVIEW

Notes on TRACK Distributions J.F Ostiguy/ APC ostiguy@fnal.gov - - PowerPoint PPT Presentation

Notes on TRACK Distributions J.F Ostiguy/ APC ostiguy@fnal.gov Ostiguy - Notes on TRACK Distributions Motivation For the purpose of comparison between codes, we often need to either translate an existing particle distribution to TRACK


slide-1
SLIDE 1

Ostiguy - Notes on TRACK Distributions

Notes on TRACK Distributions

J.F Ostiguy/ APC

  • stiguy@fnal.gov
slide-2
SLIDE 2

Ostiguy - Notes on TRACK Distributions

Motivation

  • For the purpose of comparison between codes, we often

need to either translate an existing particle distribution to TRACK or to generate a custom one.

  • Partran predicts a decaying asymmetric centroid oscillation at

the beginning of SSR0, even when the beam is matched.

  • JP reported large amplitude (9 deg) z centroid oscillations

with a distribution translated from TRACK to Partran format.

  • We need to make sure that the distributions are generated

correctly so as to perform valid comparisons.

slide-3
SLIDE 3

Ostiguy - Notes on TRACK Distributions

TRACK Distribution Format (This is all the documentation !)

if (iwrite_dis.eq.1) then

  • pen(1, file='read_dis.dat', status='unknown', access='SEQUENTIAL',form='UNFORMATTED')

write(1) Wtmp,nqtot write(1) (npat(ird),ird=1,nqtot) write(1) (qq (ird),ird=1,nqtot) do iq = 1,nqtot do i = 0,npat(iq) write(1) x(i,iq) , xx(i,iq) , y(i,iq) , yy (i,iq), & csi(i,iq)/harm0, bb (i,iq) , spin(i,iq) enddo enddo close(1) endif c Wtmp kinetic energy in keV/u c nqtot no of species present c npat(i) no particles of species i c x(i,iq) cm c xx(i,iq) rad c y(i,iq) cm c yy(i,iq) cm c csi(i,iq) rad c bb(i,iq) relative velocity ( beta in version < 1.38; beta*gamma v >= 1.38 ) c spin(i,iq) 1.0d0 if particle is within acceptance, -1.0d0 otherwise

Note: the loop is over nqtot(i) + 1 particles

slide-4
SLIDE 4

Ostiguy - Notes on TRACK Distributions

“Synchronous” and “Central” Particle

  • I contacted B. Mustapha at Argonne.

According to him:

  • the synchronous (reference particle) is generated

internally and is not part of the tracked distribution.

  • The first particle in the file is the so-called “central”
  • particle. This particle should have its state

coordinates set to 0.0, except for the momentum. This first particle, dubbed “central” particle is not the synchronous (reference) particle.

slide-5
SLIDE 5

Ostiguy - Notes on TRACK Distributions

An Additional Check

  • A water-bag distribution was created using TRACK internal

distribution generation facility and saved immediately, i.e without propagating it through any element.

  • The saved distribution file (read_dis.out) is meant to be readable by

the code as an input distribution. The file contains the states of N+1 particles, even though npat(1)=N was originally specified in track.dat. An additional particle, the first particle appearing in the distribution file does indeed have its state coordinates all set to 0.0, except for the normalized momentum which is set to a value corresponding to the kinetic energy appearing in the distribution file header.

slide-6
SLIDE 6

Ostiguy - Notes on TRACK Distributions

Notes on TRACK usage

  • Track v39 can use either binary or ascii distributions.
  • For binary distribution: each write statement produces a fortran RECORD
  • For ascii each write statement produces

an ascii string terminated by a newline delineator.

  • Undocumented: In track.dat : iread_dis=1, iwrite_dis=1 for binary

iread_dis=2, iwrite_dis=2 for ascii

  • For a distribution containing N particles, an additional (“central”) particle should be

added as the first particle)

  • The state coordinates of the central particle should be all 0.0, except for

beta*gamma, which should be consistent with the value of W in the header.

  • The synchronous particle initial state is generated internally, from the kinetic energy

specified in the header, expressed in keV/u.

slide-7
SLIDE 7

Ostiguy - Notes on TRACK Distributions

Input Kinetic Energy

u = unified atomic mass unit Definition: 1 u = mu = 1/12 m(12C) 1 u = 931.494 028(23) MeV/c**2 For H- ion: proton mass = 938.272 013 MeV/c**2 = 1.00727 u electron mass = 0.511 MeV/c**2 = 5.49 e-4 u Total = 1.00837u An H- ion with E_K= 2.5 MeV has an initial energy of 2.5 MeV /1.00837u = 2.4792 MeV/u In TRACK, energy is specified is keV/u. Although the difference between the numerical values in keV and keV/u is small, the distinction can become rather important, for reasons that will become clear in what follows.

slide-8
SLIDE 8

Ostiguy - Notes on TRACK Distributions

Header From the Problematic ASCII

Distribution used by JP

2.516999999926007100e+03 1 1000000 1.000000e+00

  • 1.298103947192430500e-01 -7.299060816876590300e-04 -1.457228325307369200e-01 -6.416626274585723900e-03 -1.332739852351644 300e-01 +7.314632075502276700e-02

…..

I do not know where the values in the header came from … generated by a program … or added by hand ? The kinetic value is wrong. It looks like it was perhaps (mistakenly)

  • btained from k. energy * [proton mass in u]

2.5 * 1.00727 = 2.518 ??? The distribution used by JP was translated directly from Partran. The contents of the TRACK header is not generated by Partran.

slide-9
SLIDE 9

Ostiguy - Notes on TRACK Distributions

Effect of Using the Wrong Energy in Header

  • Correct value 2.4792
  • 2.518, represents an error of ~1.57 %

A 2.5 MeV, gamma ~ 1 so this is a 1.5% relative difference between the centroid and reference particle velocities. A 2.5 MeV H- advances by (1/beta*c)*f *360 ~ 5000 degrees / m The error in <phi>-phi_s will be ~ dβ/β * 5000 = 75 deg / m In our lattice, distance to 1st cavity is ~ 20 cm => ~15 deg error

slide-10
SLIDE 10

Ostiguy - Notes on TRACK Distributions

A Test with TRACK …

100 particles, using old baseline lattice frontend With distribution translated from PARTRAN, Using W=2.4792 (correct) With the same distribution translated from PARTRAN, But using W=2.518 (wrong) in header

Note asymmetric oscillation, consistent with PARTRAN

slide-11
SLIDE 11

Ostiguy - Notes on TRACK Distributions

TRACK, Wrong Energy in Distribution Header ( Close Up) First Cavity

slide-12
SLIDE 12

Ostiguy - Notes on TRACK Distributions

TRACK vs PARTRAN … near 1st Cavity (Correct Distribution)

First Cavity. Zc < 0.1 deg

slide-13
SLIDE 13

Ostiguy - Notes on TRACK Distributions

What Happens If the “Central” Particle is Not Properly Set ?

With distribution translated from PARTRAN, Using W=2.4792 (correct) With a distribution translated from PARTRAN, Using W=2.4792 (correct) Central particle is random. The “central” particle seems to be used as a quick way to approximately track the position of the centroid. I suspect it be used to save time when computing sc kicks (effect with should be tested). In absence of SC, it seems to have no effect.

slide-14
SLIDE 14

Ostiguy - Notes on TRACK Distributions

TRACK vs PARTRAN

  • PARTRAN. Centroid oscillation

amplitude is ~ 2 deg TRACK Centroid oscillation amplitude is ~ 2 deg This centroid oscillation is not a statistical effect. It is believed to be due to finite rf curvature over the bunch length.

slide-15
SLIDE 15

Ostiguy - Notes on TRACK Distributions

TRACK vs PARTRAN with SC ON ( I = 10ma) The predicted amplitude with SC on is larger with PARTRAN (factor ~ 2) … This should be investigated futher.

slide-16
SLIDE 16

Ostiguy - Notes on TRACK Distributions

CONCLUSION

  • When the distribution is generated internally by TRACK, setting WIN=2.5 MeV instead of the

correct value, (2.7492 in this case) has little noticible effect, because both the distribution centroid and synchronous particle remain consistent.

  • When the distribution is generated externally (e.g. with PARTRAN) it is imperative for the value
  • f the kinetic energy that appears in the header to be consistent with that of the distribution

average, otherwise the reference particle, the rf cavity input phases etc … will be in error.

  • PARTRAN and TRACK are in excellent agreement with SC off. There

is a remaining discrepancy with SC ON that should be investigated further.