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),
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.
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
Frozen model in lscdrift
Moderators: cyao, michael_borland
-
- Posts: 1933
- Joined: 19 May 2008, 09:33
- Location: Argonne National Laboratory
- Contact:
Re: Frozen model in lscdrift
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
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
Re: Frozen model in lscdrift
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
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
-
- Posts: 1933
- Joined: 19 May 2008, 09:33
- Location: Argonne National Laboratory
- Contact:
Re: Frozen model in lscdrift
Biaobin,
If you want to turn off longitudinal motion in LSCDRIFT, you'll need to modify lsc.c. Look for the line
and change it to
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
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]));
Code: Select all
part[ib][4] += length;
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
Re: Frozen model in lscdrift
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
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
-
- Posts: 1933
- Joined: 19 May 2008, 09:33
- Location: Argonne National Laboratory
- Contact:
Re: Frozen model in lscdrift
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
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