Seongyeol,
Which mode are you using for CSRDRIFT? The recommended mode is Stupakov's mode, which is invoked by setting USE_STUPAKOV=1.
--Michael
Search found 2030 matches
- 17 Feb 2026, 13:50
- Forum: General
- Topic: Question regarding a setting of CSRDRIFT "length"
- Replies: 1
- Views: 243
- 15 Dec 2025, 18:57
- Forum: Optimization and Matching
- Topic: Wien filter
- Replies: 1
- Views: 7735
Re: Wien filter
Esraa,
There's no built-in way to do this in elegant. I used ChatGPT to write a python script that can be used with the SCRIPT element to insert a Wien filter into a beamline.
See the attached files.
--Michael
There's no built-in way to do this in elegant. I used ChatGPT to write a python script that can be used with the SCRIPT element to insert a Wien filter into a beamline.
See the attached files.
--Michael
- 15 Dec 2025, 16:22
- Forum: Linac Tracking
- Topic: Longitudinal behavior- Bendings_on/off
- Replies: 4
- Views: 49354
Re: Longitudinal behavior- Bendings_on/off
Samira, The bunch lengthening results from second order effects in the path length. E.g., in a drift space of length L, one has T522=T544=L^2/2. You can see this by plotting the T5?? elements from your matrix.sdds file. T5xxPlot.png Also, if you set the emittances to zero, you'll see that the bunch ...
- 14 Nov 2025, 18:31
- Forum: Ring Tracking
- Topic: space charge simulation in rings
- Replies: 11
- Views: 33136
Re: space charge simulation in rings
Chao, The "nonlinear" method in elegant is just Bassetti-Erskine, which I think is what you are using as well. The linear method is just the linear term of B-E. You can use longitudinal slicing in elegant for comparison with your code, since it does that as well. The particle_tune command uses NAFF ...
- 14 Nov 2025, 16:34
- Forum: Ring Tracking
- Topic: space charge simulation in rings
- Replies: 11
- Views: 33136
Re: space charge simulation in rings
Chao, This plot compares results with and without space charge, using 1ps longitudinal slices. Seems that space charge has a significant impact on the vertical plane. Since the runs don't take much time, I increased the number of particles to 10 million, but it's excessive. comparison.png --Michael
- 14 Nov 2025, 11:09
- Forum: Ring Tracking
- Topic: space charge simulation in rings
- Replies: 11
- Views: 33136
Re: space charge simulation in rings
Chao,
Here's what I get. No sign of the "noisy" behavior. I think this was a result of the above-mentioned bug in the older versions of the code.
--Michael
Here's what I get. No sign of the "noisy" behavior. I think this was a result of the above-mentioned bug in the older versions of the code.
--Michael
- 14 Nov 2025, 10:55
- Forum: Ring Tracking
- Topic: space charge simulation in rings
- Replies: 11
- Views: 33136
Re: space charge simulation in rings
Chao,
I'm running some tests now. I wonder if you using the latest version of elegant. In version 2025.2 we fixed several bugs related to space charge. In addition, we added longitudinal slicing.
--Michael
I'm running some tests now. I wonder if you using the latest version of elegant. In version 2025.2 we fixed several bugs related to space charge. In addition, we added longitudinal slicing.
--Michael
- 13 Nov 2025, 17:35
- Forum: Ring Tracking
- Topic: ramping with sextupoles
- Replies: 11
- Views: 108909
Re: ramping with sextupoles
Samira, I think the issue with the 3Hz ramp is that the quantum excitation rate is just not high enough to get the emittance and energy spread up to the equilibrium values in the time available. The beam goes through minimum emittance at t~=0.1s and then starts rising fairly slowly. Just as a check,...
- 13 Nov 2025, 10:27
- Forum: Ring Tracking
- Topic: space charge simulation in rings
- Replies: 11
- Views: 33136
Re: space charge simulation in rings
Chao, The problem is that the beam is not matched to the lattice at the injection point. You can fix this with sddsmatchtwiss train.sdds rematched.sdds -xplane=filename=lattice.twi -yplane=filename=lattice.twi mv train.sdds old-train.sdds mv rematched.sdds train.sdds where "lattice.twi" is a file wi...
- 12 Nov 2025, 18:29
- Forum: Ring Tracking
- Topic: space charge simulation in rings
- Replies: 11
- Views: 33136
Re: space charge simulation in rings
Chao,
I see that the emittance initially increases, then goes down. Can you check to see if particles are lost from the simulation?
--Michael
I see that the emittance initially increases, then goes down. Can you check to see if particles are lost from the simulation?
--Michael