Closed laxmisubramanyam closed 4 months ago
Hi,
my main aim is to plot the evolution of beta_x and beta_y etc. of the electron beam as it propagates through the chicane and including the space-charge effect.
Thank you.
Hi,
it would be great if any help is provided to properly use space-charge effect in beam transportation. In the above test simulation do you think plot_opt_func(lat, tws, fig_name= 'first plot', legend=False)
is without space-charge and plot_opt_func(lat, tws_track, fig_name= 'second plot', legend=False)
is with space-charge effect ?
Hi, I did not run you script but what I see it following:
First plot - you just tracked the Twiss parameters through the lattice, so you plotted the linear optics of your beamline.
Second plot - You tracked the beam with space charge, and on each step, the get_envelop() function was called to calculate the Twiss parameters. So it is "Twiss parameters" with SC and second order effect. However, please note that in dispersive sections e.g. bunch compressor, twiss parameters are calculated not correctly due to dispersion if the beam non zero energy spread.
Third plot - does not make sense
Cheers, Sergey
Hi @sergey-tomin
Thanks for making things pretty clear. Maybe now I understand why the longitudinal dispersion (Dx) show a nice plot on the top of beta_x and beta_y evolution with plot_opt_func(lat, tws)
.
But Dx is always zero when I was trying to see the beta_x and beta_y evolution including the space-charge effect plot_opt_func(lat, tws_track)
.
Thanks a lot.
Best regards, Laxmi
yes exactly get_envelop calculates moments of beam distribution and Dx/Dy will be always zero. And Dx is actually transverse dispersion.
Hi,
I made some more progress in understanding how different functions work, however, I got confused at one point when I was making use of plot_opt_func.
I made one very small test case, and tried to make three figures (with plot_opt_func) at different stages of the simulation. But I could not completely understand what these plots means. Please, could you provide some help to understand what the three figures display in the test code below:
Could you please let me know what is the difference between:
tws, tws_track and tws_fin
in the above code.Thanks a lot. Laxmi