Hi,
Recently I'm trying to simulate ion effects. When I changed the field_calculation_method from 'gaussian' to 'bigaussian', I encountered a huge increase in execution time, maybe 10 times slower. I'm using ILMATRIX and only one interaction point per turn, and macro_ions=1, it is already very slow.
Is it that we need to accept this slowdown when using bigaussian method, or are there some settings to make it faster?
Many thanks,
Siwei
bigaussian method in ioneffects
Moderators: cyao, michael_borland
Re: bigaussian method in ioneffects
Hi Siwei,
There are several parameters that affect the speed of the bigaussian method; the most important are ion_histogram_max_bins and ion_bin_divisor (see https://ops.aps.anl.gov/manuals/elegant ... 520007.34). Unfortunately, for any reasonable choice of parameters, it will be much slower than the gaussian method.
I have found the gaussian method to work well, except for very strong instability. My recommendation is to start with that.
FYI, I am presently working on adding a Poisson solver to the code.
Joe
There are several parameters that affect the speed of the bigaussian method; the most important are ion_histogram_max_bins and ion_bin_divisor (see https://ops.aps.anl.gov/manuals/elegant ... 520007.34). Unfortunately, for any reasonable choice of parameters, it will be much slower than the gaussian method.
I have found the gaussian method to work well, except for very strong instability. My recommendation is to start with that.
FYI, I am presently working on adding a Poisson solver to the code.
Joe

 Posts: 17
 Joined: 27 Jun 2017, 07:28
Re: bigaussian method in ioneffects
Hi Joe,
Many thanks for the reply.
This is also what I observed in my simulation, I did a case with a strong vacuum pressure which leads to strong ion instability. I tested the same case with both 'gaussian' and 'bigaussian', and the 'gaussian' gives a stable result while 'bigaussian' gives an obvious emittance growth. Then I checked the histogram, and found the 'gaussian' fitting did give a much lower charge distribution and 'bigaussian' is neared to the real charge distribution.
So for the following studies I'll use 'gaussian' method for simulation of good vacuum pressure and 'bigaussian' for the strong vacuum pressure, but tracking with fewer turns.
Best regards,
Siwei
Many thanks for the reply.
This is also what I observed in my simulation, I did a case with a strong vacuum pressure which leads to strong ion instability. I tested the same case with both 'gaussian' and 'bigaussian', and the 'gaussian' gives a stable result while 'bigaussian' gives an obvious emittance growth. Then I checked the histogram, and found the 'gaussian' fitting did give a much lower charge distribution and 'bigaussian' is neared to the real charge distribution.
So for the following studies I'll use 'gaussian' method for simulation of good vacuum pressure and 'bigaussian' for the strong vacuum pressure, but tracking with fewer turns.
Best regards,
Siwei

 Posts: 17
 Joined: 27 Jun 2017, 07:28
Re: bigaussian method in ioneffects
Hi Joe,
It seems for my case, the bilorentzian fit gives a result that looks a little better than bigaussian. The charge distribution looks more like a concave curve but the bigaussian gives a more convex curve. And the gaussian fit feels underestimated the charge distribution.
Here are the three examples of the fitted charge distribution.
The Gaussian fit The biGaussian fit The biLorentzian fit
I tried one case with both methods. Up to now, the biLorentzian method has a similar speed as the bigaussian method and the ioneffects from bigaussian method seems a little stronger than that of the biLorentzian method.
Best regards,
Siwei
It seems for my case, the bilorentzian fit gives a result that looks a little better than bigaussian. The charge distribution looks more like a concave curve but the bigaussian gives a more convex curve. And the gaussian fit feels underestimated the charge distribution.
Here are the three examples of the fitted charge distribution.
The Gaussian fit The biGaussian fit The biLorentzian fit
I tried one case with both methods. Up to now, the biLorentzian method has a similar speed as the bigaussian method and the ioneffects from bigaussian method seems a little stronger than that of the biLorentzian method.
Best regards,
Siwei
Re: bigaussian method in ioneffects
Hi Siwei,
Interesting results!
The "gaussian" option doesn't actually do a fit, it just uses the total charge and sigma within a certain range of the beam centroid. You can increase this range by increasing the gaussian_ion_range parameter. You could also try the "gaussianfit" option, which tries to fit the whole distribution with a single Gaussian.
Best,
Joe
Interesting results!
The "gaussian" option doesn't actually do a fit, it just uses the total charge and sigma within a certain range of the beam centroid. You can increase this range by increasing the gaussian_ion_range parameter. You could also try the "gaussianfit" option, which tries to fit the whole distribution with a single Gaussian.
Best,
Joe