Frozen model in lscdrift

Moderators: cyao, michael_borland

Post Reply
Biaobin
Posts: 29
Joined: 17 Feb 2017, 09:03

Frozen model in lscdrift

Post by Biaobin » 26 Sep 2018, 20:00

Hi,

I am doing simulations about three-stage microbunching instability study. I used a simple model {drift1,BC1,drift2,BC2,drift3,BC3} (where all three BC are EMATRIX elements to only introduce r56, no compression) to benchmark my theory equations.

When I am using beam energy as 1GeV, they agree well with each other (the peak position with larger difference),
Gain_1GeV.png
But for 100MeV case, much larger difference can be seen. I want to make sure the difference is coming from r56 in drift section which was not considered in my theory calculations.
Gain_100MeV.png
So I want to modify the source code to make sure particle longitudinal position doesn't change in the drift. I tried to search the source code to find where I should make the modification, but it seems not quite easy. Could you do me a favor telling me which source file I should go into ?

Best Regards,
Biaobin

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

Re: Frozen model in lscdrift

Post by michael_borland » 01 Oct 2018, 15:46

Biaobin,

If you use DRIFT elements, just set ORDER=1. That will ensure that there is no longitudinal motion since those terms (T511 and T533) are all second order.

If using EDRIFT, just switch to DRIFT with ORDER=1.

--Michael

Biaobin
Posts: 29
Joined: 17 Feb 2017, 09:03

Re: Frozen model in lscdrift

Post by Biaobin » 01 Oct 2018, 17:33

Hi Michael,

I used LSCDRIFT element to introduce energy modulation, then followed EMATRIX to give r56. So the Lattice actually is simply {LSCDRIFT, EMATRIX, LSCDRIFT, EMATRIX, LSCDRIFT, EMATRIX}. What should I do with LSCDRIFT to turn off longitudinal motion ?

Thanks,
Biaobin

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

Re: Frozen model in lscdrift

Post by michael_borland » 02 Oct 2018, 09:11

Biaobin,

If you want to turn off longitudinal motion in LSCDRIFT, you'll need to modify lsc.c. Look for the line

Code: Select all

part[ib][4] += length*sqrt(1+sqr(part[ib][1])+sqr(part[ib][3]));
and change it to

Code: Select all

part[ib][4] += length;
This will turn off the dependence of path-length on x' and y'.

There is still a term due to the velocity modulation originating in energy modulation. There is no practical way to remove this term, but for relativistic beams it may be negligible.

--Michael

Biaobin
Posts: 29
Joined: 17 Feb 2017, 09:03

Re: Frozen model in lscdrift

Post by Biaobin » 02 Oct 2018, 12:56

Hi Michael,

Yes, I noticed the line in lsc.c you showed me, so I basically made the initial particle distribution with xp=yp=0 in the simulations (also for constant beam radius making theory calculations for LSC impedance easier), so there are no position changes due to xp and yp.

According to the simulation results I showed with 100MeV and 1GeV, it seems that the gain for a lattice layout which consists of three Bunch Compressors is quite sensitive to r56 in the drift section due to the velocity modulation originating in energy modulation. That's the reason I want to turn off the particle position changes due to energy-velocity-position dependence in the drift.

Actually I have successfully modified the simple_rfca.c to longitudinal-frozen and linear-chirp model in RFCW element. But for LSCDRIFT, I tried but failed finding the place to make such modifications. It seems not in lsc.c file.

Best Regards,
Biaobin

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

Re: Frozen model in lscdrift

Post by michael_borland » 05 Oct 2018, 12:47

Biaobin,

The velocity effect is applied in the routine add_to_particle_energy() in simple_rfca.c, so if you changed this for the RFCA element, it should be covered.

--Michael

Post Reply