Hello, everyone
I want to use the command &insert_sceffects to inspect the tune shift by space charge effect, but an error occurred:
“error: bad initial parameter offset for element type SCMULT”
And the .ele and .lte files see attachment
How can I cure it?
Many thanks in advance
Hongjin
An error about insert_sceffects
Moderators: cyao, michael_borland
An error about insert_sceffects
- Attachments
-
- emittance_test1.lte
- (2.02 KiB) Downloaded 255 times
-
- emittance_test1.ele
- (1.27 KiB) Downloaded 243 times
-
- Posts: 1951
- Joined: 19 May 2008, 09:33
- Location: Argonne National Laboratory
- Contact:
Re: An error about insert_sceffects
Hongjin,
That is a source code error. Are you compiling from source or using an old version of elegant? If so, please update to the latest release and let us know the outcome.
--Michael
That is a source code error. Are you compiling from source or using an old version of elegant? If so, please update to the latest release and let us know the outcome.
--Michael
Re: An error about insert_sceffects
Hi, Michaelmichael_borland wrote: ↑30 Jul 2018, 09:13Hongjin,
That is a source code error. Are you compiling from source or using an old version of elegant? If so, please update to the latest release and let us know the outcome.
--Michael
Thank your reply firstly.
The error is resolved by replacing matched_to_cell by specified twiss arguments in &bunched_beam.
In the manual, the important notes"Some users use matched_to_cell in the bunched_beam command. This will erase SCMULT assignments along the beamline. In this case, issue another twiss_output command just before tracking." illustrate the reason, but I didn't noticed it at first.
But I find a tune difference in the ring lattice between ELEGANT and formula. I calculate the tune shift with space charge about -0.1 by formula,ELEGANT gives the growth of tune by 0.1. I think the result is wrong, but how to fix it?
Tune calculation:
'sddsregroup W1.sdds -pipe=out -newParameters=particleID -newColumns=Pass|sddsnaff -pipe -column=Pass -pair=x,xp -pair=y,yp -terminateSearch=frequencies=1|sddsprintout -pipe=in W1naff.csv -spreadsheet=csv -column=*'
&insert_sceffects disable = 0, tune map: &insert_sceffects disable = 1, tune map: The .lte and .ele files see in attachment:
- Attachments
-
- SC_test.zip
- (1.42 KiB) Downloaded 236 times
-
- Posts: 1951
- Joined: 19 May 2008, 09:33
- Location: Argonne National Laboratory
- Contact:
Re: An error about insert_sceffects
Hongjin,
This is another bug. The sign of the particle charge is included in the calculation, which it shouldn't be. Since I only tested it for electrons, I didn't see this. To work around the bug, please use
instead of the pre-defined option for "proton". (Basically, this switches to anti-protons, which have the same charge as electrons and thus works around the bug.) I tried this and obtain a negative tune change, but the magnitude is not as large as you expect. However, the particles seem to be unstable and reach quite large amplitudes, so I'm not sure how reliable the results are.
The bug will be fixed in the next release. Thanks for reporting it.
--Michael
This is another bug. The sign of the particle charge is included in the calculation, which it shouldn't be. Since I only tested it for electrons, I didn't see this. To work around the bug, please use
Code: Select all
&change_particle
name = "custom",
charge_ratio = 1,
mass_ratio = 1836.180638972992938
&end
The bug will be fixed in the next release. Thanks for reporting it.
--Michael
-
- Posts: 1951
- Joined: 19 May 2008, 09:33
- Location: Argonne National Laboratory
- Contact:
Re: An error about insert_sceffects
Hongjin,
I noticed another issue with this simulation. Because the emittance is so large, the integrator has accuracy issues that result in spurious non-conservation of the emittances. I don't have a solution for this at present other than using first-order matrix-based tracking, which is adequate if all you want to do is determine the tune spread.
--Michael
I noticed another issue with this simulation. Because the emittance is so large, the integrator has accuracy issues that result in spurious non-conservation of the emittances. I don't have a solution for this at present other than using first-order matrix-based tracking, which is adequate if all you want to do is determine the tune spread.
--Michael