Dear Didier,
I am trying to simulate the transport of a long bunch. I encounter some problems with periodic boundary conditions.
According to the TraceWin instructions: “When the bunch is not short compared to the intra-bunches distance, effect of neighbor bunches are taken into account and particles out of +/- 180° are temporary “moved” into the bunch (with 360° jumps) by the SC routine to estimate their contribution to the SC and calculate the SC they fill.”
So when the particle goes beyond the period, it will enter again from the other end of the period . But the instructions don't mention about the interactions between neighbor bunches. For a long bunch, if a particle is near +/- 180°, will it be effected by the space charge forces from its neighbor bunches? As far as I known, Tracewin uses PICNIC as its inner field solver,but classical PICNIC just calcuates interforce between marco-particles in the bunch.
does Tracewin consider the interaction between neighbor bunches? For example, when I calculate the transport of a long bunch, or a more extreme example, when I calculate the transport of a DC beam, can Tracewin handle periodic boundary effects?
Best regards
Asking for periodic boundary conditions in TraceWin
Re: Asking for periodic boundary conditions in TraceWin
Dear QiXinimp,
When the beam bunch is longer than 180° (based on a RMS calculation), PICNIC does 2 things:
- It puts temporary (just for the SC calculation) each particle that is out of +/-180° main window by -/+360° until it comes back to the main window,
- It adds neighboor bunchs on each side (+/- 360°) of the main window with the same distribution.
- It calculates the SC force in the main windows produced by main windows and in neighboor windows.
- it applies the force on each particle according to its position in the main windows.
In these conditions, when the beam is continuous, the longitudinal field at the frontier of the main window is also zero as it is produced by the charge in the main window and in the neighboor window, which compensate each others.
I hope it is clear.
Best regards.
Nicolas.
When the beam bunch is longer than 180° (based on a RMS calculation), PICNIC does 2 things:
- It puts temporary (just for the SC calculation) each particle that is out of +/-180° main window by -/+360° until it comes back to the main window,
- It adds neighboor bunchs on each side (+/- 360°) of the main window with the same distribution.
- It calculates the SC force in the main windows produced by main windows and in neighboor windows.
- it applies the force on each particle according to its position in the main windows.
In these conditions, when the beam is continuous, the longitudinal field at the frontier of the main window is also zero as it is produced by the charge in the main window and in the neighboor window, which compensate each others.
I hope it is clear.
Best regards.
Nicolas.
Re: Asking for periodic boundary conditions in TraceWin
Thank you. I fully understand! It is so kind of you, Nicolas. 
Re: Asking for periodic boundary conditions in TraceWin
My pleasure.
Have fun with beam dynamics !
Have fun with beam dynamics !
Re: Asking for periodic boundary conditions in TraceWin
Dear Nicolas,
Related to this topic, I simulated a 30-keV DC proton beam in a 400m drift.
First, with a beam current of 4 mA, as shown next: My question is the head-tail dispersion, as it is DC beam, I was expecting did not see that border effects due to the periodic conditions.
Best regards,
Bruce
Related to this topic, I simulated a 30-keV DC proton beam in a 400m drift.
First, with a beam current of 4 mA, as shown next: My question is the head-tail dispersion, as it is DC beam, I was expecting did not see that border effects due to the periodic conditions.
Best regards,
Bruce
Re: Asking for periodic boundary conditions in TraceWin
Dear Bruce,
You are right.
TraceWin (and PICNIC) are natively written for bunched beam.
The way we "simulate" cw beam (as described before) is a little bit tricky (not perfect) and then can produce unexpected effets on beam border. (~-180° and ~+180°).
The effect shown here is small (<1% (30eV) and has probably no impact on the beam transportresults.
Did you observe correlation between these particles and their position in transverse phase-space ?
For example, by selecting particles in (phase-energy) phase-space and observing their position in transverse phase-space ?
It is possible that, at the start of the simulation, there is hidden correlation between energy and transverse distribution :
- Example 1 : 2 particles with the same kinetic energy but different angles have the same total speed, but different longitudinal speed. This can also contribute to beam elongation.
- Example 2 : 2 particles with the same kinetic energy at different radius don't have the same potential energy (and then total energy) because of space-charge potential. In they transverse oscillation, they are deccelerated or accelerated depending on their transverse position.
If you want to minimize the numerical effect, I believe that you can try to change :
- the number of mesh cells (especially in longitudinal direction),
- the number of particles,
- the RF frequency in order to elongate a little bit the "bunch" length (@176MHz and 30 keV, your proton beam is 1.36 cm long, which can be too short with respect to its transverse size.
Personnaly, I believe that the thrid case is probably the most efficient (for example 44 MHz and doubling the number of cells in longitudinal direction).
If I remember well, I believe also that you can desactivate the calculation of longitudinal space-charge force by choosing 0 in the number of longitudinal meshes. You can also use this option to check that the calculation result is good enough with respect to what you are expecting.
I hope it helps you to investigate your issues.
Best regards.
Nicolas.
You are right.
TraceWin (and PICNIC) are natively written for bunched beam.
The way we "simulate" cw beam (as described before) is a little bit tricky (not perfect) and then can produce unexpected effets on beam border. (~-180° and ~+180°).
The effect shown here is small (<1% (30eV) and has probably no impact on the beam transportresults.
Did you observe correlation between these particles and their position in transverse phase-space ?
For example, by selecting particles in (phase-energy) phase-space and observing their position in transverse phase-space ?
It is possible that, at the start of the simulation, there is hidden correlation between energy and transverse distribution :
- Example 1 : 2 particles with the same kinetic energy but different angles have the same total speed, but different longitudinal speed. This can also contribute to beam elongation.
- Example 2 : 2 particles with the same kinetic energy at different radius don't have the same potential energy (and then total energy) because of space-charge potential. In they transverse oscillation, they are deccelerated or accelerated depending on their transverse position.
If you want to minimize the numerical effect, I believe that you can try to change :
- the number of mesh cells (especially in longitudinal direction),
- the number of particles,
- the RF frequency in order to elongate a little bit the "bunch" length (@176MHz and 30 keV, your proton beam is 1.36 cm long, which can be too short with respect to its transverse size.
Personnaly, I believe that the thrid case is probably the most efficient (for example 44 MHz and doubling the number of cells in longitudinal direction).
If I remember well, I believe also that you can desactivate the calculation of longitudinal space-charge force by choosing 0 in the number of longitudinal meshes. You can also use this option to check that the calculation result is good enough with respect to what you are expecting.
I hope it helps you to investigate your issues.
Best regards.
Nicolas.


