Page 1 of 1

Splitting CSRCSBEND - propagate CSR computation

Posted: 23 Mar 2010, 04:59
by astecpete
Hi,

I'd like to be able to look at how emittances and pcentral change within a CSRCSBEND element. If i manually split the dipole (and turn off the edges internally) it seems to restart the csr computation at each element. In the manual it says that this happens for versions 19 and lower. i am using version 22.0.1.

Thanks

Pete (on behalf of Deepa!)

Re: Splitting CSRCSBEND - propagate CSR computation

Posted: 23 Mar 2010, 08:55
by michael_borland
Pete and Deepa,

In order to continue the computation through multiple dipole segments, the segments must have the same name. E.g., instead of defining each slice, use

BMslice: csrcsbend,l=0.1,angle=0.01,e1=0.1,e2=0.1,...
BM: line=(10*BMslice)

Elegant will see 10 BMslice elements in a row and automatically turn off interior edge effects.

If you instead define BM1, BM2, BM3, ..., BM10, then elegant doesn't understand that this is one bending magnet because the names are different.

Let me know if that doesn't fix the problem.

--Michael

Re: Splitting CSRCSBEND - propagate CSR computation

Posted: 23 Mar 2010, 09:44
by astecpete
Thanks Micheal,

Yes, that has helped somewhat. However we have a discrepancy in the calculated pCentral at the end of the dipole when comparing the split dipole with a single dipole. Deepa will send you the example files, would you mind taking a look?

Thanks

Pete & Deepa

Re: Splitting CSRCSBEND - propagate CSR computation

Posted: 23 Mar 2010, 10:01
by michael_borland
Pete and Deepa,

Sure, send it me and I'll have a look.

--Michael

Re: Splitting CSRCSBEND - propagate CSR computation

Posted: 23 Mar 2010, 11:34
by michael_borland
Pete and Deepa,

It turns out this is a bug. The problem is the interaction of CSRBEND and CSRDRIFT is not correct when the dipoles are split.

I'll post a solution under the Bugs forum for those who build from source. It will also be corrected in the next release.

--MIchael