Page 1 of 1

Static Errors in Bending magnets.

Posted: Wed 17 Nov 2021 02:58
by Bruce Yee
Dear Didier,

I want to simulate error in bending magnets. I applied in the next way:

ERROR_BEND_NCPL_STAT 1 1 0.45 0.45 0.12 0.12 0.12 0.8
EDGE 22.5 2000 250 0.45 2.8 250 1
BEND -45 2000 0 250 1
EDGE 22.5 2000 250 0.45 2.8 250 1

In the Windows Errors setup.

I use the option magnet_element
Error_setup.png
Error_setup.png (11.76 KiB) Viewed 3968 times
However, in the output file "Error_data" only the quadrupoles errors were written.
Error_data.png
Error_data.png (30.36 KiB) Viewed 3968 times
Could you confirm If I that is the correct one of implement bending errors?

Thanks for your help,

Bruce

Re: Static Errors in Bending magnets.

Posted: Wed 17 Nov 2021 19:00
by Didier
Dear Bruce,

No, your example doesn't work, because first parameter of ERROR_BEND_NCPL_STAT command. Replace '1' by '2' in order to reach at least BEND element.
Doing that 3 'BEND_ERROR...." should appear in error file corresponding to EDGE+BEND+EDGE

Regards,

Didier

Re: Static Errors in Bending magnets.

Posted: Thu 18 Nov 2021 08:45
by Bruce Yee
Dear Didier,

As always, thank you for your help.

Best regards,

Bruce

Re: Static Errors in Bending magnets.

Posted: Wed 24 Nov 2021 10:21
by Bruce Yee
Dear Didier,

I noticed when I applied error gradients in the bending magnets, something strange happened.

This is how I applied the error.

ERROR_BEND_NCPL_STAT 2 1 0.0 0.0 0. 0. 0. 0.8
EDGE 22.5 4500 250 0.45 2.8 250 1
BEND -45 4500 0 250 1
EDGE 22.5 4500 250 0.45 2.8 250 1

This is the error data file
Error_data.png
Error_data.png (20.26 KiB) Viewed 3945 times
I simulated this static case with two steps.
Error_tracewin.png
Error_tracewin.png (56.76 KiB) Viewed 3945 times
I plot the results vertical power density for the first step (Case A left) and the 2nd step (Case B right).
Envelope.png
Envelope.png (73.01 KiB) Viewed 3945 times
As you can see, the length of the second dipole is reduced for the cumulative in the first case. However, for the cumulative statistics of the second case is normal.
Do you have an idea why this happened?

Thanks for the help,

Bruce

Re: Static Errors in Bending magnets.

Posted: Wed 24 Nov 2021 19:18
by Didier
Dear Bruce,

Please could you give me your project file?

Regards,

Didier

Re: Static Errors in Bending magnets.

Posted: Thu 25 Nov 2021 09:53
by Bruce Yee
Dear Didier,

I sent you a simplified version of lattice where the error occurred.
BTL_TEST.zip
(371.34 KiB) Downloaded 206 times
I have to say that the error is intermittent (i.e., sometimes occurs and sometimes no). Thus, I included the output (most of them) for a case where the error appeared.

Thanks for your help and support.

Bruce

Re: Static Errors in Bending magnets.

Posted: Fri 26 Nov 2021 13:04
by Didier
Dear Bruce,

I'm lost. You BTL_Test files contains no dipole only cavities with field maps missing !

Regards,

Didier

Re: Static Errors in Bending magnets.

Posted: Sat 27 Nov 2021 05:32
by Bruce Yee
Dear Didier,

Thanks for your comments. I downloaded a check again the files.

This is a screenshot of the project.

Run.png
Run.png (56.2 KiB) Viewed 3919 times
According to my understanding, from the element 3 to 5 is the 1st dipole (Edge+Bend+Edge) and from 16 to 18 the 2nd dipole. (See the red marks)
No cavity is defined.
Similar the lattice.
Run2.png
Run2.png (71.05 KiB) Viewed 3919 times
.

Could you please tell me in which files did you see you the cavities?

Thanks for your help,

Bruce

Re: Static Errors in Bending magnets.

Posted: Mon 29 Nov 2021 09:55
by Didier
Dear Bruce,

I'm so sorry, probably I made an error opening wrong zip file. You're perfectly rigth I get now file including BEND. Now I run your exemple and I don't see error you have. I also try to inclde the number of stpe to 300 and that still work.

If you see a specific error, you will have to isolate it and send it to me. This will only be possible by freezing the random number key (main page -> "Froze random seed" so that you can clearly isolate the problematic run and the error set that make to the problem.

Regards,

Didier
bend.png
bend.png (20.99 KiB) Viewed 3910 times

Re: Static Errors in Bending magnets.

Posted: Wed 1 Dec 2021 10:52
by Bruce Yee
Dear Didier,

Thanks for your help.

I installed the new version of TraceWin and I did not see the error again. I will continue with the test.
I will let you know if I see the error again.

Best regards,

Bruce