thin-gap vs fieldmap

https://www.dacm-logiciels.fr/tracewin
Chinakevin
Neophyte
Neophyte
Posts: 11
Joined: Tue 21 Apr 2026 12:04
Country:
China (cn)
China

thin-gap vs fieldmap

Post by Chinakevin »

I built a DTL accelerating cavity model in CST. First, I integrated the axial electric field along the beam direction within each accelerating cell to obtain the effective accelerating voltage of each cell. These voltages were then used in a TraceWin thin-gap model for beam dynamics simulations, and the results are generally consistent with expectations.

However, when I export the axial field distribution or the full 3D electromagnetic field from CST, convert it into the TraceWin field map format, and perform beam dynamics simulations using the FIELD_MAP element in TraceWin, the results become completely inconsistent with expectations and differ significantly from those obtained with the thin-gap model.

The TraceWin input files for both the thin-gap model and the field-map model are attached for comparison. I would greatly appreciate any suggestions or insights that could help identify the source of this discrepancy.
Attachments
thin-gap vs fieldmap.rar
(284.48 MiB) Downloaded 4 times
User avatar
FranceDidier
Administrator
Administrator
Posts: 1254
Joined: Wed 26 Aug 2020 14:40
Country:
France (fr)
France

Re: thin-gap vs fieldmap

Post by FranceDidier »

Dear Kevin,

It’s very difficult to pinpoint where your error lies. But for a start, the two simulations aren’t the same length – that’s odd!
Furthermore, the distances between the gaps don’t always seem to match up either (that’s just my felling).
Finally, I don’t know exactly how you’ve constructed the fields and, more importantly, the phases of your GAPs; it’s a time-varying RF field.
Ultimately, I can’t see where the error lies in your approach, but personally, I’d try to get the RF map working first before converting it to GAP. And perhaps start with just one or two gaps, and pay attention to the beam’s input phase in the transport in FIELD_MAP; you’ll probably need to set it to a value other than 0 to synchronise the RF with the beam’s phase.

Regards,

Didier
Chinakevin
Neophyte
Neophyte
Posts: 11
Joined: Tue 21 Apr 2026 12:04
Country:
China (cn)
China

Re: thin-gap vs fieldmap

Post by Chinakevin »

Regarding the difference in the total length between the two models, I would like to clarify the following:

In the FIELD_MAP model, I use the full electromagnetic field distribution exported from CST, so the total length corresponds to the actual physical length of the entire accelerating cavity, including both the accelerating gaps and the drift tube regions.

In contrast, in the thin-gap model, the accelerating gaps are treated as idealized zero-length elements, where the acceleration is applied instantaneously at a point. As a result, only the drift tube sections are represented with finite length (via DRIFT elements), while the gaps themselves do not contribute to the total length.

Therefore, the difference in total length between the two models mainly comes from the inherent difference in modeling approaches: the FIELD_MAP represents the full physical structure, whereas the thin-gap model only accounts for the drift spaces.
Chinakevin
Neophyte
Neophyte
Posts: 11
Joined: Tue 21 Apr 2026 12:04
Country:
China (cn)
China

Re: thin-gap vs fieldmap

Post by Chinakevin »

In addition, the structure I designed is an IH-DTL, where the lengths of each cell (including both drift tubes and accelerating gaps) are determined by the synchronous phase distribution. Therefore, the cell lengths are defined through beam dynamics considerations rather than independent geometric parameters.
User avatar
FranceDidier
Administrator
Administrator
Posts: 1254
Joined: Wed 26 Aug 2020 14:40
Country:
France (fr)
France

Re: thin-gap vs fieldmap

Post by FranceDidier »

OK, I’m not sure where you’re going wrong, but here’s a quick example of an IH-DTL accelerating correctly. I hope this helps.
HB_5gap_2204.zip
(4.72 MiB) Downloaded 6 times
Chinakevin
Neophyte
Neophyte
Posts: 11
Joined: Tue 21 Apr 2026 12:04
Country:
China (cn)
China

Re: thin-gap vs fieldmap

Post by Chinakevin »

I have a question regarding the geometrical length definition when using the thin-gap model in TraceWin.

Since the GAP element itself has no geometrical length, while in a real accelerating structure (e.g. a DTL) the accelerating gaps have a finite length, should the gap length be effectively included in the adjacent DRIFT sections in the thin-gap model in order to ensure that the distance between successive GAP centers matches the real structure (or the FIELD_MAP model)?

In other words, should the positions of the GAPs in the thin-gap model be defined by adjusting the DRIFT lengths so that the gap-to-gap distances are consistent with those in the actual structure?

Any clarification or recommendation would be greatly appreciated.
Chinakevin
Neophyte
Neophyte
Posts: 11
Joined: Tue 21 Apr 2026 12:04
Country:
China (cn)
China

Re: thin-gap vs fieldmap

Post by Chinakevin »

Thank you very much for your help and for providing the example file. This is very useful for me to compare with my own IH-DTL model and check where the problem may come from.
User avatar
FranceDidier
Administrator
Administrator
Posts: 1254
Joined: Wed 26 Aug 2020 14:40
Country:
France (fr)
France

Re: thin-gap vs fieldmap

Post by FranceDidier »

Yes, in practice, it is best to adjust the drifts so as to maintain the distances, particularly to be sure that the phases progress in the same way. Whether the gap is in the centre or not will ultimately have little impact. But having done this many times, I’ve found that in the end, when the synchronous phases and fields are properly maintained, the results are always very close indeed. The thin gap model is often quite sufficient as a first approximation.

Regards,

Didier
Chinakevin
Neophyte
Neophyte
Posts: 11
Joined: Tue 21 Apr 2026 12:04
Country:
China (cn)
China

Re: thin-gap vs fieldmap

Post by Chinakevin »

I have another question regarding the use of the thin-gap model in TraceWin.

When I modify the transit time factor (TTF) value in the GAP elements, I observe that the simulation results (such as beam energy and other beam dynamics parameters) do not change at all. It seems that the TTF has no effect in my case.
User avatar
FranceDidier
Administrator
Administrator
Posts: 1254
Joined: Wed 26 Aug 2020 14:40
Country:
France (fr)
France

Re: thin-gap vs fieldmap

Post by FranceDidier »

You must set all 4 parameters, β (Particle reduced velocity), T',T'' otherwise it will not take the value of T into account, (See "Transit time factor definition" in manual)
Post Reply