bigaussian method in ion-effects

Moderators: cyao, michael_borland

Post Reply
Siwei_Wang
Posts: 17
Joined: 27 Jun 2017, 07:28

bigaussian method in ion-effects

Post by Siwei_Wang » 18 Oct 2022, 10:14

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 slow-down when using bigaussian method, or are there some settings to make it faster?

Many thanks,
Siwei

jcalvey
Posts: 16
Joined: 08 Jan 2021, 12:20

Re: bigaussian method in ion-effects

Post by jcalvey » 20 Oct 2022, 16:23

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

Siwei_Wang
Posts: 17
Joined: 27 Jun 2017, 07:28

Re: bigaussian method in ion-effects

Post by Siwei_Wang » 21 Oct 2022, 04:16

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

Siwei_Wang
Posts: 17
Joined: 27 Jun 2017, 07:28

Re: bigaussian method in ion-effects

Post by Siwei_Wang » 27 Oct 2022, 05:38

Hi Joe,

It seems for my case, the bi-lorentzian fit gives a result that looks a little better than bi-gaussian. 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.
gaussiandist.jpg
The Gaussian fit
bigaussiandist.jpg
The bi-Gaussian fit
bilorentz.jpg
The bi-Lorentzian fit

I tried one case with both methods. Up to now, the bi-Lorentzian method has a similar speed as the bi-gaussian method and the ion-effects from bi-gaussian method seems a little stronger than that of the bi-Lorentzian method.

Best regards,
Siwei

jcalvey
Posts: 16
Joined: 08 Jan 2021, 12:20

Re: bigaussian method in ion-effects

Post by jcalvey » 01 Nov 2022, 12:37

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

Post Reply