Dear all,
I have to simulate a beam where, in the SDDS input file, there is a column indicating the weight (i.e. the charge if multiplied by e) of each row/ macro-particle. I am very new to elegant, and looking at the examples and the other requests on the forum I didn’t find how to consider this weight. Each of the output files does not have the weight column, and elegant is still considering each “macro-particle” with the same weight.
How can I take into account the weight column with elegant?
Thanks for the answer and best regards.
How to consider "macro-particle" weight
Moderators: cyao, michael_borland
How to consider "macro-particle" weight
- Attachments
-
- lattice_new.lte
- (447 Bytes) Downloaded 344 times
-
- elegant_data.ele
- (874 Bytes) Downloaded 348 times
-
- beam1_tail.sdds
- (692.92 KiB) Downloaded 315 times
-
- Posts: 1959
- Joined: 19 May 2008, 09:33
- Location: Argonne National Laboratory
- Contact:
Re: How to consider "macro-particle" weight
Unfortunately, elegant doesn't presently allow particle weighting. We simply vary the number of particles to indicate regions/bunches with higher or lower charge.
Support for variable weights is planned as a future project.
--Michael
Support for variable weights is planned as a future project.
--Michael
Re: How to consider "macro-particle" weight
Thanks for the answer, I will find another way to use them.
Re: How to consider "macro-particle" weight
Hi, I have a question about the same topic. To simulate the bunch in the previously attached file, where all the macroparticles have different charges, I tried to write an SDDS input file with one page for each macroparticle, giving another input file a list with the various charges. I followed the attached example varyCharge, which allows simulating beams with different charges but doing this for every macroparticle, and in the .ele file I specified, in sdds_beam, track_pages_separately = 0. I would like to know if it can be a solution to simulate a beam composed by macroparticles with different charges according to the capabilities of elegant and how it handles such an input.
Thank you in advance for the answer!
Thank you in advance for the answer!
- Attachments
-
- charge420.sdds
- (38.93 KiB) Downloaded 340 times
-
- beam420.sdds
- (163.1 KiB) Downloaded 308 times
Re: How to consider "macro-particle" weight
Here is the example vary Charge I followed and the .ele file.
- Attachments
-
- run420.ele
- (967 Bytes) Downloaded 321 times
-
- varyCharge.zip
- (16.64 MiB) Downloaded 317 times
-
- Posts: 1959
- Joined: 19 May 2008, 09:33
- Location: Argonne National Laboratory
- Contact:
Re: How to consider "macro-particle" weight
This is a workable approach if you only have one bunch at a time, since for each simulation step the macroparticles have the same charge.
--Michael
--Michael
Re: How to consider "macro-particle" weight
Yes, in this case, I have only one bunch at a time; thank you for the answer!