Page 1 of 1

simulation results from tracewin

Posted: Thu 17 Feb 2022 09:05
by shliu
Dear Didier,
I was a little confused when I used Tracewin to simulate the lattice.
I just added a drift of 1E-005 to the front of the Lattice, and the calculation result was different from that without the drift (see the attachment). I don't know the reason for the difference. Another problem, the same lattice, I run twice, alfa and beta results are different at the fourth decimal place, is this a floating point accuracy problem?

Thanks,
Shuhui

Re: simulation results from tracewin

Posted: Thu 17 Feb 2022 09:21
by Didier
Dear Shliu,

Please send me the project files for a simple example showing this issue because without any data it's complicated to help you. Perhaps just a little suggestion about intiial beam distribution. Are you sure that is it the same for each case (see "Froze ramdom seed" from "Main" page) ?

Regards,

Didier

Re: simulation results from tracewin

Posted: Thu 17 Feb 2022 10:52
by shliu
The attachment is my test file, thank you!

Re: simulation results from tracewin

Posted: Thu 17 Feb 2022 13:06
by Didier
Dear Shliu,

I cannot check you RFQ example because vane file is missing. Concerning test1 example, following my results
Anyway, let's focus on the simplest example to answer your question. Here, the observed differences in the beam parameters (see image), with and without the drift, are of the order of a few 10-6.

This small or negligible difference is due to two things, the length extension of course and the fact that because of this extra element you will have an extra kick of space charge. The result also depends on the number of space charge kicks applied to the length of your lattice (here 25 per metre) and unless you put in an infinite number of them, there will always be a small dependence on the number of kicks applied. It is a choice between accuracy and calculation time. If you use 26 kicks per metre for sapce-charge kick, you will also see a difference.
test1.png
test1.png (223.71 KiB) Viewed 2573 times
Regards,

Didier

Re: simulation results from tracewin

Posted: Sun 20 Feb 2022 02:33
by shliu
Yes,You are right that TWISS parameters are related to grid and calculation accuracy, but the result from RFQ I simulated is a quiet different, and I can also find the difference of beam phase space distribution. Of course, I can use the zero-length drift model to avoid this problem. Does the influence of such a short drift (1E-005) come from the difference in space charge calculation? Attached is my simulation file (including vane file), Could you please check it for me? Thank you so much!



Regards,
Shuhui

Re: simulation results from tracewin

Posted: Sun 20 Feb 2022 17:51
by Didier
Dear Shuhui,

In fact your beam parameters are dominated by some unaccelerated particles, remaining at about 20kV. In general if you don't exclude them the statistical calculations giving beam parameters like TWISS or emittance depend excessively on these particles far from the beam core. There are several solutions to exclude them (see below). I suggest you to use the first one, then you can see, the extra small drift has no influence anymore.

Regards,

Didier
emit_control.png
emit_control.png (12.77 KiB) Viewed 2564 times

emit_control2.png
emit_control2.png (16.47 KiB) Viewed 2564 times