TWPL increasing integration steps creates bizare behaviour

Moderators: cyao, michael_borland

Post Reply
Seb_Wilkes
Posts: 15
Joined: 04 Mar 2022, 09:48

TWPL increasing integration steps creates bizare behaviour

Post by Seb_Wilkes » 29 Jul 2022, 12:53

Hello all,

Has anyone else got much experience with setting the integration step number for TWPL? At first I went for adapbtable step sizes, but elegant threw a warning. After that I went to a fixed step size and it went away.

However I wanted to know how many would be suitable. For one thing, beyond a certain number of turns the beam size grows considerably in an unphysical manner, so there is an operational ceiling. I wondered if perhaps it could be extended by increasing the integration step count.

I decided to do a convergence test for my run, and got the following graph:
number_of_steps_for_integration.jpeg
The files to replicate it are also included in the Zip folder, if you want to check the details for yourself.

To be clear, for the number of turns I have run here, using 25 and 250 integration steps the behaviour seems qualitiatively similar to the EVKICK element I have used in the past. To be honest, I'm open to advice if you think it is worth the bother of trying to 'accurately' model a stripline kicker? Though the underlying physics is different, the results seem kinda similar - and EVKICK at least is a well tested and symplectic method.
Attachments
stuff_for_forum.zip
(7.58 KiB) Downloaded 86 times

michael_borland
Posts: 1927
Joined: 19 May 2008, 09:33
Location: Argonne National Laboratory
Contact:

Re: TWPL increasing integration steps creates bizare behaviour

Post by michael_borland » 01 Aug 2022, 19:36

Seb,

I'm not sure what you want to simulate, but it seems you are simulating a sine-wave excitation of the beam. TWPL is not the element I'd choose for that. It's really intended for single-pass systems such as a deflector in a transport line. For a single-pass simulation, the results are pretty consistent for 25 through 25000 steps, thought they certainly don't show uniform convergence. The adapative bulirsch-stoer method shows uniform convergence. I don't remember why there's a warning that recommends using the non-adaptive integrator.

Having said all that, I'd suggest using RFDF for simulating sinusoidal excitation of the beam. Using modulate_elements means that the deflection is constant for the entire bunch, which may not be what you want. You can also use BUMPER if you provide a single-period sinusoidal input and give PERIODIC=1.

--Michael

Post Reply