Page 1 of 1

haissinski: Solution did not converge

Posted: 19 Nov 2009, 04:48
by arusanov
Hi,

I'm trying to run haissinski with the attached twiss file:

> haissinski tps79h2wake.twi tps79h2wake.hai \
-model=Zn=0.36 \
-bunchCurrent=0.667 \
-outputLastStepOnly \
-RF=Voltage=3.5e6,harmonic=864 \
-superPeriods=24 \
-energy=3 \
-integrationParameters=deltaTime=1.0e-12,points=1.0e-6,startTime=1.0e11,iterations=1000
> sddsprintout tps79h2wake.hai -param=Convergence

and always get this output:

Printout for SDDS file tps79h2wake.hai
Convergence = Solution did not converge

I'm not sure about integration parameters I've used, they may be not optimal. Could you please advise on suitable integration parameters.

Thank you,
Andriy

Re: haissinski: Solution did not converge

Posted: 19 Nov 2009, 10:45
by michael_borland
Andriy,

Sorry that those parameters are not very easy to set. I always have to look them up myself. Here's my suggested command:

haissinski tps79h2wake.twi tps79h2wake.hai -model=Zn=0.36 -bunchCurrent=0.667e-3 \
-outputLastStepOnly -RF=Voltage=3.5e6,harmonic=864 -energy=3 \
-integration=deltaTime=1e-13,points=4000,fraction=0.01,iterations=1000,tolerance=1e-4

Note that I removed the superperiods=24 argument because your .twi file contains the whole lattice. Also, the bunch current should be given in Amps, whereas I think you assumed mA. I choose the deltaTime parameter as roughly bunchLength/c/100. Otherwise I always use the values above, so I should probably update the defaults in the program.

By the way, the GUI script elegantRingAnalysis will run haissinski and some other programs.

--Michael

Re: haissinski: Solution did not converge

Posted: 19 Nov 2009, 19:39
by arusanov
Thank you very much for the quick reply.

Now the solution converges. I will certainly try elegentRingAnalysis soon.

Re: haissinski: Solution did not converge

Posted: 03 Dec 2009, 06:24
by arusanov
If I try to specify wake function, haissinski produces "Segmentation fault".

haissinski tps79h2wake.twi tps79h2wake.hai -wakeFunction="wake.sdds",tColumn="t",wColumn="Wneg" -bunchCurrent=0.667e-3 -outputLastStepOnly -RF=Voltage=3.5e6,harmonic=864 -energy=3 -integration=deltaTime=1e-13,points=4000,fraction=0.01,iterations=1000,tolerance=1e-4
Segmentation fault

I've traced the source code and have found that this error comes from the function call:

scanItemList(&dummyFlags, scanned.list+1, &scanned.n_items, 0,
"tColumn", SDDS_STRING, tCol, 1, 0,
"wColumn", SDDS_STRING, wCol, 1, 0,
NULL)

Is there something wrong in my input? Thank you.
tps79h2wake.twi has been posted above.

Re: haissinski: Solution did not converge

Posted: 03 Dec 2009, 09:52
by michael_borland
Andriy,

Thanks for reporting this bug.

As far as I can tell, the developer of haissinski never tested the wake feature, since it had a few argument parsing bugs. I corrected these and did some basic tests. It appears to give valid results, but you may wish to devise your own tests.

The corrected code is attached.

--Michael

Re: haissinski: Solution did not converge

Posted: 09 Dec 2009, 04:25
by arusanov
Thank you very much, haissinski works fine now.