Don't see expected IBS effect

Moderators: cyao, michael_borland

Anisimov
Posts: 8
Joined: 03 Apr 2019, 09:48

Don't see expected IBS effect

Post by Anisimov » 26 Oct 2021, 14:25

Hello,

I am having an issue with IBSCATTER element in my beam line:

Code: Select all

q:    charge, total=1e-10
samp: sample, fraction=1

cav2_c:    rfcw, L=0.0526, CELL_LENGTH=0.0263, &
                N_KICKS=2, CHANGE_P0=1, &
                ...
cav_c:    rfcw, L=0.4997, CELL_LENGTH=0.0263, &
                N_KICKS=19, CHANGE_P0=1, &
                ...
cav_h:    rfcw, L=0.4471, CELL_LENGTH=0.008766666666666667, &
                N_KICKS=44, CHANGE_P0=1, &
                ...
ibs: ibscatter, nslice=1024, isring=0, bunched_beam_mode=0
sr: mark
lin2_c:    line = (cav2_c, sr, ibs)
lin_c:    line = (19*lin2_c)
lin_h:    line = (cav_h, sr, ibs)

linac: line = (q, samp, 6*lin_c, 6*lin_h)
that it does introduce any additional energy spread. Based on SLAC-TN-05-026 report by Z. Huang, the energy spread by the end of 9 meter section should be 3 keV for 100pC bunch with 54.487 nm normalized emittance, 478 um rms bunch length and 191um rms transverse size (see attached).

Here is my control file:

Code: Select all

&global_settings
 mpi_io_write_buffer_size = 100000 ! advice from Borland 100K
&end

&run_setup
 lattice = linac.lte,
 use_beamline = linac,
 expand_for = ibsTopGun_3p7M.sdds,
 always_change_p0 = 1,
 output = %s.out,
 final = %s.fin,
 sigma=%s.sig
&end
&twiss_output
 filename = %s.twi,
 matched = 0,
 beta_x=201.6875
 alpha_x=-14.78305
 eta_x=6.698627e-5
 etap_x=3.079309e-6
 beta_y=201.7416
 alpha_y=-14.78672
 eta_y=-1.900780e-4
 etap_y=-8.769033e-6
&end

&run_control
 n_steps = 1
&end

&sdds_beam
 input = ibsTopGun_3p7M.sdds,
 input_type = "elegant",
 sample_fraction = 1,
 !reuse_bunch = 1
&end
 
&track &end
Can anybody tell me why theory prediction does not match the calculations?

Thank you.
Petr
Attachments
IBS.png
energy spread growth.
IBS.png (3.1 KiB) Viewed 5985 times

Anisimov
Posts: 8
Joined: 03 Apr 2019, 09:48

Re: Don't see expected IBS effect

Post by Anisimov » 27 Oct 2021, 11:50

I am now convinced that IBSCATTER element is broken.

I have tried a simple 9 meter drift for 100 pC bunch at 150 MeV with IBSCATTER elements included at different separations.

A single IBSCATTER element at the end of 9 meter section gives the largest energy spread increase. Placing 10 IBSCATTER elements 0.9 meters apart gives almost zero energy spread increase at the end of 9 meter section.

The results should obviously match.

Best regards,
Petr

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

Re: Don't see expected IBS effect

Post by michael_borland » 27 Oct 2021, 13:58

Petr,

Can you upload the lattice file? The posting shows "..." for some element parameters.

--Michael

Anisimov
Posts: 8
Joined: 03 Apr 2019, 09:48

Re: Don't see expected IBS effect

Post by Anisimov » 27 Oct 2021, 15:59

Dear Michael,

I have sent you and Bob an email with all relevant files on October 10th. It has wakes and Genesis-like files of the distribution used with an output of sddsanalyzebeam command. Here I can share my simple example of the issue I am having in my calculations:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++
This is my Initial bunch in bunched_beam setup as reported by sddsanalyzebeam > sddsprintout
---------------------------------------------------------------------------------------------------------------------------
None 1.816780e-10 5.449000e-08 2.016800e+02 1.064423e-08 6.694000e-05 3.075000e-06 1.816447e-10
5.448000e-08 2.016800e+02 -1.833814e-09 6.694000e-05 3.075000e-06 1.914179e-04 9.491171e-07 1.914004e-04
9.490300e-07 1.593778e-12 1.330000e-05 2.999262e+02 2.119725e-17 1.816780e-10 5.449000e-08 2.016800e+02
1.084464e-08 1.816447e-10 5.448000e-08 2.016800e+02 -1.633361e-09 -9.120484e-23 3.664083e-08 -2.468128e-23
-1.933822e-18 9.008233e-13 -3.661087e-21 -5.138966e-11 -2.242103e-13 3.663410e-08 1.194478e-23 3.275190e-13
-2.191760e-15 3.331025e-19 9.006580e-13 -7.668854e-29 -2.700585e-19 -4.566588e-21 4.804431e-19 3.550373e-22
2.540129e-24 -2.658010e-15 1.184102e-14 5.439367e-16 1.184102e-14 5.439367e-16 1.643018e-30 1.768900e-10
1 2.999262e+02 -nan(ind) 370000 0 27280M

After a single IBS at 9 meter position, my relative energy spread increases from 1.33e-5 to 1.58e-5, which I can match to Zhirong’s formula (https://www.slac.stanford.edu/pubs/slac ... 05-026.pdf) if Coulomb Log=2.91, which corresponds to 10^-6 relative energy change cut-off in the core of the distribution.
---------------------------------------------------------------------------------------------------------------------------
None 1.816585e-10 5.448415e-08 2.020816e+02 -4.462516e-02 9.337132e-04 2.639978e-06 1.816254e-10
5.447422e-08 2.020816e+02 -4.462512e-02 3.390186e-04 1.755393e-06 1.915982e-04 9.490662e-07 1.915807e-04
9.489797e-07 1.593778e-12 1.582327e-05 2.999262e+02 2.521877e-17 1.816585e-10 5.448415e-08 2.020816e+02
-4.462516e-02 1.816254e-10 5.447422e-08 2.020816e+02 -4.462512e-02 1.706370e-18 3.670985e-08 5.559900e-20
8.106541e-12 9.007266e-13 1.352255e-17 -5.062892e-11 -2.439004e-13 3.670316e-08 4.396586e-19 3.077689e-13
-2.191619e-15 8.105056e-12 9.005624e-13 3.002094e-08 -3.111578e-19 -4.566588e-21 4.836385e-19 3.550371e-22
2.540129e-24 -1.034770e-14 2.337791e-13 6.609866e-16 8.488203e-14 4.395078e-16 5.958895e-22 2.503757e-10
1 2.999262e+02 1.000000e-10 370000 370000 27280M

After 10 IBS every 0.9 meters, my relative energy spread increases from 1.33e-5 to 1.378e-5. This is a noticeable suppression of IBS effect.
---------------------------------------------------------------------------------------------------------------------------
None 1.816742e-10 5.448886e-08 2.020816e+02 -4.462514e-02 2.394911e-04 3.482167e-06 1.816409e-10
5.447887e-08 2.020816e+02 -4.462514e-02 5.228564e-05 2.359051e-06 1.916064e-04 9.491071e-07 1.915889e-04
9.490202e-07 1.593778e-12 1.378099e-05 2.999262e+02 2.196384e-17 1.816742e-10 5.448886e-08 2.020816e+02
-4.462514e-02 1.816409e-10 5.447887e-08 2.020816e+02 -4.462514e-02 -3.146318e-19 3.671302e-08 -1.022313e-20
8.107238e-12 9.008044e-13 1.317555e-18 -5.063563e-11 -2.439292e-13 3.670629e-08 4.284058e-20 3.077881e-13
-2.191731e-15 8.105752e-12 9.006393e-13 3.002094e-08 -3.111578e-19 -4.566588e-21 4.836385e-19 3.550371e-22
2.540129e-24 7.386784e-15 4.548312e-14 6.613182e-16 9.929863e-15 4.480207e-16 7.966466e-23 1.899157e-10
1 2.999262e+02 1.000000e-10 370000 370000 27280M

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

I am modeling 120 MeV acceleration and have to insert IBSCATTER element every 5cm in order to have less than 5% energy gain. As a result my IBS energy spread does not grow as expected.

Thank you,
Petr

This is elegant 2020.3.0 Jul 30 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.
Parallelized by Y. Wang, H. Shang, and M. Borland.
Attachments
linac.lte
(269 Bytes) Downloaded 206 times
linac.ele
(1.28 KiB) Downloaded 197 times

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

Re: Don't see expected IBS effect

Post by michael_borland » 27 Oct 2021, 17:52

Petr,

I see the issue and I'm looking for the problem.

--Michael

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

Re: Don't see expected IBS effect

Post by michael_borland » 19 Nov 2021, 19:04

Petr,

These problems should be fixed in the latest release, from today.

--Michael

Anisimov
Posts: 8
Joined: 03 Apr 2019, 09:48

Re: Don't see expected IBS effect

Post by Anisimov » 24 Nov 2021, 14:02

Michael,

Thank you so much. I have managed to download the new version (I was getting download fail message for some reason) and run my test again (attached):
Long case: 9m drift + IBS
Short case: 0.9m drift + IBS section repeated 10 times
Ultra-short case: 0.09 drift + IBS section repeated 100 times

ElementName ex enx betax alphax etax etaxp ey
eny betay alphay etay etayp Sx Sxp Sy
Syp St Sdelta pAverage el ecx ecnx betacx
alphacx ecy ecny betacy alphacy Cx s11 Cxp
s12 s22 Cy s13 s23 s33 Cyp s14
s24 s34 s44 Ct s15 s25 s35 s45
s55 Cdelta s16 s26 s36 s46 s56 s66
Step pCentral Charge Particles IDSlotsPerBunch SVNVersion

1. Long case has slightly higher energy increase from 1.33e-5 than before:
---------------------------------------------------------------------------------------------------------------------------
None 1.816288e-10 5.447522e-08 2.020816e+02 -4.462513e-02 6.789236e-05 2.396930e-06 1.815954e-10
5.446523e-08 2.020816e+02 -4.462512e-02 -1.729083e-04 3.127024e-06 1.915825e-04 9.489884e-07 1.915649e-04
9.489013e-07 1.593778e-12 1.660033e-05 2.999262e+02 2.645724e-17 1.816288e-10 5.447522e-08 2.020816e+02
-4.462513e-02 1.815954e-10 5.446523e-08 2.020816e+02 -4.462512e-02 6.912929e-18 3.670384e-08 2.248056e-19
8.105208e-12 9.005790e-13 7.836298e-18 -5.062260e-11 -2.438627e-13 3.669710e-08 2.547718e-19 3.077130e-13
-2.191179e-15 8.103719e-12 9.004137e-13 3.002094e-08 -3.111579e-19 -4.566590e-21 4.836386e-19 3.550392e-22
2.540129e-24 -6.804189e-15 1.870916e-14 6.605243e-16 -4.764851e-14 8.617171e-16 -4.965630e-23 2.755710e-10
1 2.999262e+02 1.000000e-10 370000 370000 28198M

2. Short case has a similar increase to the long case 1.63e-5 vs 1.66e-5
---------------------------------------------------------------------------------------------------------------------------
None 1.816294e-10 5.447540e-08 2.020816e+02 -4.462514e-02 4.275811e-05 2.622403e-06 1.815960e-10
5.446541e-08 2.020816e+02 -4.462513e-02 -1.986046e-04 3.179483e-06 1.915828e-04 9.489900e-07 1.915652e-04
9.489029e-07 1.593778e-12 1.626227e-05 2.999262e+02 2.591845e-17 1.816294e-10 5.447540e-08 2.020816e+02
-4.462514e-02 1.815960e-10 5.446541e-08 2.020816e+02 -4.462513e-02 7.667758e-18 3.670396e-08 2.491367e-19
8.105235e-12 9.005819e-13 9.445336e-18 -5.062286e-11 -2.438629e-13 3.669722e-08 3.071498e-19 3.077141e-13
-2.191185e-15 8.103746e-12 9.004168e-13 3.002094e-08 -3.111579e-19 -4.566590e-21 4.836386e-19 3.550392e-22
2.540129e-24 -1.969483e-14 1.130787e-14 6.935243e-16 -5.252324e-14 8.408502e-16 -6.680676e-23 2.644613e-10
1 2.999262e+02 1.000000e-10 370000 370000 28198M

3. Ultra short case has a similar increase to the long case 1.62e-5 vs 1.66e-5
---------------------------------------------------------------------------------------------------------------------------
None 1.816294e-10 5.447542e-08 2.020816e+02 -4.462514e-02 3.961812e-05 2.637884e-06 1.815961e-10
5.446542e-08 2.020816e+02 -4.462513e-02 -2.007840e-04 3.183785e-06 1.915828e-04 9.489901e-07 1.915652e-04
9.489031e-07 1.593778e-12 1.623502e-05 2.999262e+02 2.587503e-17 1.816294e-10 5.447542e-08 2.020816e+02
-4.462514e-02 1.815961e-10 5.446542e-08 2.020816e+02 -4.462513e-02 7.715182e-18 3.670397e-08 2.507162e-19
8.105237e-12 9.005822e-13 9.569916e-18 -5.062288e-11 -2.438629e-13 3.669723e-08 3.111564e-19 3.077142e-13
-2.191185e-15 8.103749e-12 9.004170e-13 3.002094e-08 -3.111579e-19 -4.566590e-21 4.836386e-19 3.550392e-22
2.540129e-24 6.990565e-15 1.044239e-14 6.952829e-16 -5.292186e-14 8.391692e-16 -6.839679e-23 2.635760e-10
1 2.999262e+02 1.000000e-10 370000 370000 28198M


You can see that the two different cases of describing the drift result in different values for other parameters but these parameters should not change my results.

Thank you for the update!
Petr
Attachments
linac.ana
Short case result
(4.12 KiB) Downloaded 195 times
linac.lte
Short case lattice
(267 Bytes) Downloaded 200 times
linac.ele
Control file
(1.28 KiB) Downloaded 189 times

Anisimov
Posts: 8
Joined: 03 Apr 2019, 09:48

Re: Don't see expected IBS effect

Post by Anisimov » 24 Nov 2021, 17:32

Dear Michael,

I have compared the simulation results with Eq. 9 of Zhirong's paper and the new code produces result similar to the theoretical prediction if Coulomb Log=3.44, which corresponds to 1.6e-3 relative energy change cut-off in the core of the distribution! Thank you.

I however have an issue with the new code. It produces an empty output when I use the following lattice while it worked before.
Can you please check?

Petr
Attachments
linac.lte
(1.89 KiB) Downloaded 187 times

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

Re: Don't see expected IBS effect

Post by michael_borland » 08 Dec 2021, 10:46

Petr,

I didn't find a problem with your lattice file, but had to disable the wakes to make it run.

--Michael

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

Re: Don't see expected IBS effect

Post by michael_borland » 08 Dec 2021, 10:54

Petr,

I found another problem with the code when used with Pelegant. This can be avoided by setting PARALLEL_INTEGRATION=0 on the IBSCATTER elements. I'll fix this in the next release.

You can see the problem in the results of my convergence test, where I propagate a beam in a drift with varying numbers of IBS elements. The "Parallel1" case (PARALLEL_INTEGRATION=1) shows strange convergence behavior.
convergenceTest.png
--Michael
Attachments
lattice.lte
(529 Bytes) Downloaded 208 times
runTemplate.ele
(934 Bytes) Downloaded 184 times

Post Reply