Hi,
I'm running simulations on accelerating a double-bunch (longitudinal) structure through a linac. I have up to this point created my own "artificial" bunches by duplicating a simulated ASTRA file and changing the longitudinal phase space to correspond to the RF at different phases, resulting in a single input file with two separate bunches in it. So far so good.
What I now want to do is to change the charge in the individual bunches, and this turns out not to be so simple, at least for me. The way to do this for me is probably to make some extra duplications in one of the bunches (to increase the relative number of particles), but this is hard to do in a good way if the charge of one bunch is not an integer multiple of the charge in the other. I need to have both bunches in the same simulation because of wakefield effects and CSR, so I can't run them separately.
Therefore, I would like to know if there already is a way of changing the charge in parts of an input file or otherwise if this could maybe be introduced in an upcoming version of elegant. The possibility of specifying two different files in sdds_beam together with some relation between the bunch charges would be great.
Best regards
Jonas
Two different bunches as input
Moderators: cyao, michael_borland
-
- Posts: 1951
- Joined: 19 May 2008, 09:33
- Location: Argonne National Laboratory
- Contact:
Re: Two different bunches as input
Jonas,
The attached files demonstrate how to do this.
--Michael
The attached files demonstrate how to do this.
--Michael
- Attachments
-
- varyCharge.zip
- (16.64 MiB) Downloaded 402 times
Re: Two different bunches as input
Hi,
Thanks for the quick reply!
This looks very much like something I could use, but I don't think I understand how it works. When setting 'track_pages_separately = 1', doesn't the code track the bunches specified on the respective pages separately, i.e. one by one, or can they still influence each other via e.g. wakefields?
Best regards
Jonas
Thanks for the quick reply!
This looks very much like something I could use, but I don't think I understand how it works. When setting 'track_pages_separately = 1', doesn't the code track the bunches specified on the respective pages separately, i.e. one by one, or can they still influence each other via e.g. wakefields?
Best regards
Jonas
-
- Posts: 1951
- Joined: 19 May 2008, 09:33
- Location: Argonne National Laboratory
- Contact:
Re: Two different bunches as input
Jonas,
Sorry, I misunderstood what you are trying to do.
Unfortunately, during any single step, elegant assigns a single value of the charge to each macroparticle. The only way to do what you want is to vary the number of particles in the two bunches.
Addressing this limitation is on my list of things to do...
--Michael
Sorry, I misunderstood what you are trying to do.
Unfortunately, during any single step, elegant assigns a single value of the charge to each macroparticle. The only way to do what you want is to vary the number of particles in the two bunches.
Addressing this limitation is on my list of things to do...
--Michael
Re: Two different bunches as input
Hi,
All right, then I'll try to do this in as good a way as possible in my own script for now. Waiting with suspense for future versions
Thanks!
Best regards
Jonas
All right, then I'll try to do this in as good a way as possible in my own script for now. Waiting with suspense for future versions
Thanks!
Best regards
Jonas