Page 1 of 1

Transverse impedance element

Posted: 18 Aug 2021, 18:36
by li.chao
Hi,

I am trying to use the ztransverse element to simulate the interaction between beam and transverse impedance.
would you mind explain me more about the data printed out with command
"wakes="%s.wake" in the %s.wake file?

Is the data Wx in file corresponds to wake potential obtained by Ifft(Zx(\omega) * \lambda(\omega) )?
And what is the <I_x> and <I_y> corresponding to ?

How the setting n_bins and max_n_bins are used in the code in simulation process?

your Chao

Re: Transverse impedance element

Posted: 20 Aug 2021, 16:11
by michael_borland
Chao,

The Wx and Wy columns in the wake file are not the wake potential (IFFT of the impedance) but the wake field (IFFT of impedance convolved with the time-dependent moment of the current).

The Ix and Iy columns are the time-dependent transverse current-weighted moments of the bunch. More specifically, Ix is a histogram of Qi/dt*xi for all the particles i, using either the user-specified number of bins (N_BINS) or the number of bins implied by the number of points in the impedance file. dt is the bin spacing, which is derived from the impedance file or else the user-supplied BIN_SIZE parameter.

--Michael

Re: Transverse impedance element

Posted: 22 Aug 2021, 17:55
by li.chao
Dear Michael

Thanks for your kindly reply. It is very clear.

However, I am doing a test with elegant to get the wake field with a resistive wall impedance.
The lattice is a very simple which is drift + Trans_imp + drift.

If you do not mind, would you please take a look at the script in attached files.
In the Sbatch.sh file you can see what did I do.
It is found that the "wakes="%s.wtdrw" command does not give me the results expected.
Did I do something wrong in with my elegant files.


Great thanks.

yours Chao

---------------------------------------------------------------------------------------
#!/bin/bash
N_MP=(1000 10000 100000 1000000)
N_MP=(1000)

ele_file=USSRTracking.ele

Nscan=${#N_MP[@]};

for ((i=0;i<$Nscan;i++))
do
ncharge=1
nMP=${N_MP[$i]}
charge=`rpnl $ncharge 1.e-10 \*`

echo $i $nMP
elegant $ele_file -macro=root=${nMP}_MP,qin=${charge},Nparticle=${nMP}

done


sddsplot -layout=1,2 -leg=filename -graph=l,v -scale=0,100e-12,0,0 \
-col=Deltat,'(Wy)' *.wtdrw -mode=y=normalize -end \
-col=Deltat,'(Iy)' *.wtdrw -mode=y=normalize -end #\
#-devices=png -output=power16_wydrw_0.09ps.png

sddsplot -layout=1,2 -leg=filename -graph=l,v -scale=0,100e-12,0,0 \
-col=Deltat,'(Wx)' *.wtdrw -mode=y=normalize -end \
-col=Deltat,'(Ix)' *.wtdrw -mode=y=normalize -end #\
#-devices=png -output=power16_wxdrw_0.09ps.png

Re: Transverse impedance element

Posted: 23 Aug 2021, 01:29
by michael_borland
Chao,

I'm not sure what you are expecting to see, but I wouldn't expect to see much because you are computing a transverse wake but your beam is centered on x=y=0. The only wake you'll see will be due to random offsets in <x> and <y> in the binning of the particle distribution.

Also, the frequency resolution of your impedance is very high, so you'll end up with a very long time span in the wake data, which may make the plots confusing.

Try adding some centroid offsets to you beam definition, e.g.,

Code: Select all

&bunched_beam
 ...
 centroid[0] = 1e-3
 centroid[2] = 1e-3
&end
When plotting, limit the time interval shown, e.g.,

Code: Select all

sddsplot -col=Deltat,Wx test1.wtdrw -filter=col,Deltat,0,1e-9
--Michael

Re: Transverse impedance element

Posted: 23 Aug 2021, 05:59
by li.chao
Dear Michael

It is very clear, I got that.

Thanks very much.

yours sincerely Chao

Re: Transverse impedance element

Posted: 24 Aug 2021, 07:50
by li.chao
Dear Michael,

Sorry to bother you again. I met another problem to print out the transverse wakefield.

As shown in the *.lte file, I am trying to print out the longitudinal and transverse wake field in files "wakes="%s.wzrw" and "wakes="%s.wtdrw".

Whereas I found only the longitudinal wake field data "wakes="%s.wzrw" can be printed out. There is not data file "wakes="%s.wtdrw" given out by the elegant.

Did I make mistakes in the transverse impedance print out settings?

your sincerely Chao

Re: Transverse impedance element

Posted: 30 Aug 2021, 11:43
by li.chao
michael_borland wrote:
23 Aug 2021, 01:29
Chao,

I'm not sure what you are expecting to see, but I wouldn't expect to see much because you are computing a transverse wake but your beam is centered on x=y=0. The only wake you'll see will be due to random offsets in <x> and <y> in the binning of the particle distribution.

Also, the frequency resolution of your impedance is very high, so you'll end up with a very long time span in the wake data, which may make the plots confusing.

Try adding some centroid offsets to you beam definition, e.g.,

Code: Select all

&bunched_beam
 ...
 centroid[0] = 1e-3
 centroid[2] = 1e-3
&end

When plotting, limit the time interval shown, e.g.,

Code: Select all

sddsplot -col=Deltat,Wx test1.wtdrw -filter=col,Deltat,0,1e-9
--Michael
Michael, by the way, how can I translate the wake potential data to the transverse momentum kick (for example in rad unit). Assume the beam is with <y> central offset?

Re: Transverse impedance element

Posted: 08 Sep 2021, 14:06
by michael_borland
li.chao wrote:
30 Aug 2021, 11:43
Michael, by the way, how can I translate the wake potential data to the transverse momentum kick (for example in rad unit). Assume the beam is with <y> central offset?
If you have a wakefield from the ZTRANSVERSE element with the drive exponent = 1, then you just divide the value in the Wx or Wy column by the beam energy in eV to get the kick (change in slope).

--Michael