I'm not sure why you are getting any NULL/zero values here. Can you post the exact command you are using for makeBunchTrainWF, and your fill file?tiansk wrote:When I use multi-bunch train beam fillings, the column Sy & Sx in the ebeam file are 1 for NULL bucket, so :
Beam ion interaction using IONEFFECTS element
Moderators: cyao, michael_borland
Re: Beam ion interaction using IONEFFECTS element
Re: Beam ion interaction using IONEFFECTS element
Use these commands to plot the total charge in the ring, bunch-by-bunch:Saroj wrote:Can you please suggest me how to plot the ion density since begining.
sddsprocess ion1.ionDens -pipe=out -define=col,cPass,Pass, -define=col,cs,s | sddscombine -pipe -merge -overWrite | sddsbreak -pipe -changeOf=cPass | sddssort -pipe -col=Bunch | sddsbreak -pipe -changeOf=Bunch | sddsprocess -pipe=in ion1.ionDens.bunch -process=t,first,t0 -process=qIons,sum,qTot
sddsplot -grap=sym ion1.ionDens.bunch -param=t0,qTot
Re: Beam ion interaction using IONEFFECTS element
Hi,Joe:jcalvey wrote: ↑09 Dec 2021, 13:53I'm not sure why you are getting any NULL/zero values here. Can you post the exact command you are using for makeBunchTrainWF, and your fill file?tiansk wrote:When I use multi-bunch train beam fillings, the column Sy & Sx in the ebeam file are 1 for NULL bucket, so :
I may not have articulated my problem clearly,my question is that in the eBeam file,the column Sy & Sx in the ebeam are 1[m].so when I used the command:
sddsprocess ion1.ebeam ion1.ebeam.break -redefine=col,ampy,"Cy abs Sy /" -redefine=col,ampx,"Cx abs Sx /"
sddsprocess ion1.ebeam.break -process=ampy,max,ampyMax -redefine=param,iPass,Pass -process=ampx,max,ampxMax \
-process=ampx,rms,ampxRms -process=ampy,rms,ampyRms -process=Sy,rms,SyRms -process=Sx,rms,SxRms
sddsplot ion1.ebeam.break -param=iPass,ampyMax
sddsplot ion1.ebeam.break -param=iPass,SyRms
The image shows the beam reaching a size of nearly 1 [m].
PS:The beam filling pattern mode I just used is:0,12,24,36,......
I've used commands to get rid of unreasonable values: sddsprocess -filter=col,Sx,0,1e-4 ..... like that.
I have recently come across a new problem:
The script I used to generate the bunch train string is generateBunchTrain like:
generateBunchTrain -input makeBunch.out -output train1.sdds -patternString "63*12*1.0" -rfFrequency 166.6003e+06
generateBunchTrain -input bunch.sdds -output train2.sdds -patternString "63*12*1.0" -rfFrequency 166.6003e+06
while the makeBunch.out file was output by makeBunch.ele that in the ionEffects1 elegantExamples,I only change the twiss parameter and emittance,sigma_s,sigma_dp.
the bunch.sdds file was output by generateBunch script like:
filename='bunch.sdds'
number=1000
emitx=2.299882e-11
betax=8.175595265258400e+00
alphax=0
etax=-1.174409542493647e-06
etaxp=0
emity=2.299920e-11
betay=4.997205764112015e+00
alphay=0
etay=0
etayp=0
MeV=6e3
sigmaS=4.995083257770271e-03
sigmaDelta=1.013008570660093e-03
generateBunch -output $filename -number $number \
-xplane $emitx,$betax,$alphax,$etax,$etaxp \
-yplane $emity,$betay,$alphay,$etay,$etayp \
-zplane $MeV,$sigmaS,$sigmaDelta
I use sddsanalyzebeam command to analyse the two files(makeBunch.out & bunch.sdds),the emittance,twiss parameter are much the same.But I used the train1.sdds abd train2.sdds for ion_effect tracking respectively,the vertical amplitudes given are not quite consistent (You can check the attachment train1.bmp & train2.bmp).
With Regards
Tiansk
- Attachments
-
- 63_makeBunch_1.zip
- (6.89 MiB) Downloaded 410 times
-
- mpl.png (6.02 KiB) Viewed 7913 times
Re: Beam ion interaction using IONEFFECTS element
Tiansk,
Looking through your files, it's not clear to me why train1 and train2 gave different results. If you compare the rms amplitude (ampyRms), does that also look different?
-Joe
Looking through your files, it's not clear to me why train1 and train2 gave different results. If you compare the rms amplitude (ampyRms), does that also look different?
-Joe
Re: Beam ion interaction using IONEFFECTS element
Hi,
I have discovered the same problem for fill patterns with several gaps and I wonder if there might be a bug related to the particleIDs? Previously I created the input beam externally where I just continously increased the particleIDs, but lately I have changed this to skip over particleIDs for empty buckets instead to easier be able to remember which IDs that belong to which filled bucket. If I have understood correctly that is what the new script that comes with Elegant to generate arbitrary fill patterns also does.
I however discovered that I got completely different ion density using the two methods. For the case where I skip over empty buckets they are recorded by ion_effects as having 0 particles, Sx and Sy = 1 and t = 0 and I wonder if this might cause a problem?
Below is the average line density I get for the exact same simulation with the same input beam except the two different methods for assigning particleIDs. The t coordinate is the same for the particles in both cases, so it doesn't feel correct to me to get different results just because of how the particleIDs have been assigned since the fill pattern is exactly the same?
Continous numbering:
Skip empty buckets:
Best regards,
Teresia
I have discovered the same problem for fill patterns with several gaps and I wonder if there might be a bug related to the particleIDs? Previously I created the input beam externally where I just continously increased the particleIDs, but lately I have changed this to skip over particleIDs for empty buckets instead to easier be able to remember which IDs that belong to which filled bucket. If I have understood correctly that is what the new script that comes with Elegant to generate arbitrary fill patterns also does.
I however discovered that I got completely different ion density using the two methods. For the case where I skip over empty buckets they are recorded by ion_effects as having 0 particles, Sx and Sy = 1 and t = 0 and I wonder if this might cause a problem?
Below is the average line density I get for the exact same simulation with the same input beam except the two different methods for assigning particleIDs. The t coordinate is the same for the particles in both cases, so it doesn't feel correct to me to get different results just because of how the particleIDs have been assigned since the fill pattern is exactly the same?
Continous numbering:
Skip empty buckets:
Best regards,
Teresia
Re: Beam ion interaction using IONEFFECTS element
Teresia and Tiansk,
Try downloading the script and following the instructions from my post on December 3rd. It works a bit differently than the one you have.
Teresia, I suspect you are correct that it is related to the particleID.
-Joe
Try downloading the script and following the instructions from my post on December 3rd. It works a bit differently than the one you have.
Teresia, I suspect you are correct that it is related to the particleID.
-Joe
Re: Beam ion interaction using IONEFFECTS element
All,
I've updated the ionEffects example that comes with elegant; see attached. It's actually 3 examples: with ILMATRIX tracking, element-by-element tracking, and using an arbitrary bunch pattern as input. I think it should cover most of the questions people have asked here. Hope it helps!
-Joe
I've updated the ionEffects example that comes with elegant; see attached. It's actually 3 examples: with ILMATRIX tracking, element-by-element tracking, and using an arbitrary bunch pattern as input. I think it should cover most of the questions people have asked here. Hope it helps!
-Joe
- Attachments
-
- ionEffects_example_new.zip
- (37.91 KiB) Downloaded 395 times