transverse gradient undulator
Moderators: cyao, michael_borland
transverse gradient undulator
Dear all,
I would like to simulate a transverse gradient undulator using elegant. Is there any suggestions?
-Charles
I would like to simulate a transverse gradient undulator using elegant. Is there any suggestions?
-Charles
-
- Posts: 1951
- Joined: 19 May 2008, 09:33
- Location: Argonne National Laboratory
- Contact:
Re: transverse gradient undulator
Charles,
The best way is to use the script makeWigglerFromBends (distributed with elegant).
--Michael
The best way is to use the script makeWigglerFromBends (distributed with elegant).
--Michael
Re: transverse gradient undulator
Dear Michael,michael_borland wrote:Charles,
The best way is to use the script makeWigglerFromBends (distributed with elegant).
--Michael
Is there any example to illustrate the script makeWigglerFromBends?
I have tried to used FTABLE and BMXYZ to do tracking for a wiggler with transverse gradient, they work very well. But I think they are not symplectic. If we use makeWigglerFromBends to do symplectic tracking, the sextupole and octupole components could differ with transverse position. Is there any better way?
Thanks in advance!
Ji
-
- Posts: 1951
- Joined: 19 May 2008, 09:33
- Location: Argonne National Laboratory
- Contact:
Re: transverse gradient undulator
Ji,
There are several symplectic alternatives to using a string of CSBEND elements.
There are several symplectic alternatives to using a string of CSBEND elements.
- CWIGGLER --- this works from a set of field harmonics. It's symplectic, but slow.
- GFWIGGLER --- this uses a generating-function method. It's also symplectic, and much faster than CWIGGLER, though less accurate.
- BGGEXP --- this uses a generalized gradient expansion in cylindrical coordinates. It has a symplectic integration mode. It's easier to set up than CWIGGLER and GFWIGGLER, and intermediate in speed.
- UKICKMAP --- this uses a kickmap, which is very fast. The kickmap can be generated by the magnet modeling program, or by elegant from tracking through a CWIGGLER or BGGEXP element.
Re: transverse gradient undulator
Dear Michael,michael_borland wrote:Ji,
There are several symplectic alternatives to using a string of CSBEND elements.--Michael
- CWIGGLER --- this works from a set of field harmonics. It's symplectic, but slow.
- GFWIGGLER --- this uses a generating-function method. It's also symplectic, and much faster than CWIGGLER, though less accurate.
- BGGEXP --- this uses a generalized gradient expansion in cylindrical coordinates. It has a symplectic integration mode. It's easier to set up than CWIGGLER and GFWIGGLER, and intermediate in speed.
- UKICKMAP --- this uses a kickmap, which is very fast. The kickmap can be generated by the magnet modeling program, or by elegant from tracking through a CWIGGLER or BGGEXP element.
BGGEXP was tried as you suggested.
When I used the command: computeGeneralizedGradients -input field.sdds -output out.ggrad -mainHarmonic 3 -nHarmonics 5, it showed the error message:
Error (sddsprocess): one or more rpn definitions files do not exist
while executing
"exec sddsconvert $root.fft -pipe=out -keeppages=[join $pageList ,] \
| sddsprocess -pipe \
"-define=col,BmRz,ImagFFTBr chs" \
"-define=par..."
(file "/usr/bin/computeGeneralizedGradients" line 48)
And defn.rpn has been set as suggested. What is wrong here?
Ji
- Attachments
-
- field.sdds
- (2.8 MiB) Downloaded 467 times
-
- Posts: 1951
- Joined: 19 May 2008, 09:33
- Location: Argonne National Laboratory
- Contact:
Re: transverse gradient undulator
Ji,
Yes, there's a problem with the way the script is written. It expects a special extra rpn definitions file to be in the working directory. If you copy the attached file to your working directory, it should work.
--Michael
Yes, there's a problem with the way the script is written. It expects a special extra rpn definitions file to be in the working directory. If you copy the attached file to your working directory, it should work.
--Michael
-
- Posts: 1951
- Joined: 19 May 2008, 09:33
- Location: Argonne National Laboratory
- Contact:
Re: transverse gradient undulator
Here's a zip version to prevent the virus scanner from removing it.
Unzip to get alpha.rpn.
--Michael
Unzip to get alpha.rpn.
--Michael
- Attachments
-
- alpha.zip
- (269 Bytes) Downloaded 485 times
Re: transverse gradient undulator
Michael,
Thanks! It works with the alpha.rpn.
But there are still errors:
computeGeneralizedGradients -input field.sdds -output GG -mainHarmonic 4 -nHarmonics 5
warning: (z, Bz) does not appear in GG.ref
1 of 1 datanames absent from file GG.ref
warning: no datanames in request found for file GG.ref
Warning: not all y quantities have the same units
And the plot attached is also wird: the range of z should be from 0 to 2.3 m, I don't know why there is negative part.
Ji
Thanks! It works with the alpha.rpn.
But there are still errors:
computeGeneralizedGradients -input field.sdds -output GG -mainHarmonic 4 -nHarmonics 5
warning: (z, Bz) does not appear in GG.ref
1 of 1 datanames absent from file GG.ref
warning: no datanames in request found for file GG.ref
Warning: not all y quantities have the same units
And the plot attached is also wird: the range of z should be from 0 to 2.3 m, I don't know why there is negative part.
Ji
-
- Posts: 1951
- Joined: 19 May 2008, 09:33
- Location: Argonne National Laboratory
- Contact:
Re: transverse gradient undulator
Ji,
I noticed a few problems: (1) You have multiple values of R. You should only have data for a single radius, e.g., 10mm. (2) You don't have many points in z; much finer spacing is recommended.
I'm putting together an example that may help. I might also need to modify the script to do this case, which we haven't done ourselves.
--Michael
I noticed a few problems: (1) You have multiple values of R. You should only have data for a single radius, e.g., 10mm. (2) You don't have many points in z; much finer spacing is recommended.
I'm putting together an example that may help. I might also need to modify the script to do this case, which we haven't done ourselves.
--Michael
Re: transverse gradient undulator
Michael,
Thanks a lot, that would be very helpful.
I use single R and much small intervals in z (stepsize 0.00023m), and it shows the same error message.So I am looking forward to the example.
Ji
Thanks a lot, that would be very helpful.
I use single R and much small intervals in z (stepsize 0.00023m), and it shows the same error message.So I am looking forward to the example.
Ji