Hi,
I am trying to simulate ion instabilities and would like to place ion elements within a periodic cell. Since the execution time with element-by-element tracking is long I was hoping to speed it up by splitting the ring into several ILMATRIX elements, but it seems ILMATRIX can only be used to split a ring at positions where the lattice is periodic. Is that the case? If so, is there some other way I could do it? I was looking at the EMATRIX element, but it doesn't seem to include non-linear effects in the same way as ILMATRIX.
Best regards,
Teresia
Fast tracking between non-periodic positions
Moderators: cyao, michael_borland
-
- Posts: 1933
- Joined: 19 May 2008, 09:33
- Location: Argonne National Laboratory
- Contact:
Re: Fast tracking between non-periodic positions
Teresia,
If you can compose your ring out of several non-periodic and at least one periodic segment, then there's a approach that may work:
I'll think about how I can improve the ILMATRIX element to allow more general cases, but that will take some time.
--Michael
If you can compose your ring out of several non-periodic and at least one periodic segment, then there's a approach that may work:
- Use EMATRIX for the non-periodic segments.
- Use ILMATRIX for the periodic segment. The tunes, momentum compaction, etc, should be for the periodic segment only. However, the chromaticities and tune shifts with amplitude should be for the entire ring (or 1/N of the ring if you have N periodic inserts).
I'll think about how I can improve the ILMATRIX element to allow more general cases, but that will take some time.
--Michael
Re: Fast tracking between non-periodic positions
Hi Michael,
Thank you. Those are very good ideas. I will try them and see which works best for our lattice.
In case it helps to make ILMATRIX more general, I think the equivalent to ILMATRIX in AT (fastring) can split the ring at any position, but the idea behind that element might be slightly different. I have tried to understand if there is any significant difference between ILMATRIX and fastring, but so far I haven't had time to benchmark the non-linear part, which I'm expecting might be were differences are if they exist. Anyway, if it is of any use there are now both a Matlab and Python version.
Matlab:
https://github.com/atcollab/at/blob/mas ... fastring.m
Python:
https://github.com/atcollab/at/blob/mas ... astring.py
and they both call the same passmethods:
Linear (including average energy loss and radiation damping):
https://github.com/atcollab/at/blob/mas ... ix66Pass.c
Non-linear:
https://github.com/atcollab/at/blob/mas ... ltaQPass.c
Quantum diffusion:
https://github.com/atcollab/at/blob/mas ... DiffPass.c
Best regards,
Teresia
Thank you. Those are very good ideas. I will try them and see which works best for our lattice.
In case it helps to make ILMATRIX more general, I think the equivalent to ILMATRIX in AT (fastring) can split the ring at any position, but the idea behind that element might be slightly different. I have tried to understand if there is any significant difference between ILMATRIX and fastring, but so far I haven't had time to benchmark the non-linear part, which I'm expecting might be were differences are if they exist. Anyway, if it is of any use there are now both a Matlab and Python version.
Matlab:
https://github.com/atcollab/at/blob/mas ... fastring.m
Python:
https://github.com/atcollab/at/blob/mas ... astring.py
and they both call the same passmethods:
Linear (including average energy loss and radiation damping):
https://github.com/atcollab/at/blob/mas ... ix66Pass.c
Non-linear:
https://github.com/atcollab/at/blob/mas ... ltaQPass.c
Quantum diffusion:
https://github.com/atcollab/at/blob/mas ... DiffPass.c
Best regards,
Teresia
-
- Posts: 1933
- Joined: 19 May 2008, 09:33
- Location: Argonne National Laboratory
- Contact:
Re: Fast tracking between non-periodic positions
Teresia,
Thanks, I'll have a look and see if I can make ILMATRIX more general.
--Michael
Thanks, I'll have a look and see if I can make ILMATRIX more general.
--Michael
-
- Posts: 1933
- Joined: 19 May 2008, 09:33
- Location: Argonne National Laboratory
- Contact:
Re: Fast tracking between non-periodic positions
Teresia,
If I read the MATLAB code correctly, it doesn't allow non-periodic positions. Like elegant, alphax and alphay can be nonzero, but the module has to be periodic.
I'll still think more about it.
--Michael
If I read the MATLAB code correctly, it doesn't allow non-periodic positions. Like elegant, alphax and alphay can be nonzero, but the module has to be periodic.
I'll still think more about it.
--Michael