Tune difference between MADX and ELEGANT when we have decouping section?
Moderators: cyao, michael_borland
Tune difference between MADX and ELEGANT when we have decouping section?
Hi Micheal,
I find a tune difference in a collider ring lattice between MADX and ELEGANT.
The collider ring has two decoupling section. This cause a different tune output from the two CODE.
It is right?
Thank you.
Guohui
I find a tune difference in a collider ring lattice between MADX and ELEGANT.
The collider ring has two decoupling section. This cause a different tune output from the two CODE.
It is right?
Thank you.
Guohui
-
- Posts: 1951
- Joined: 19 May 2008, 09:33
- Location: Argonne National Laboratory
- Contact:
Re: Tune difference between MADX and ELEGANT when we have decouping section?
Guohui,
I would need to see the lattice file to comment. Can you upload it?
--Michael
I would need to see the lattice file to comment. Can you upload it?
--Michael
Re: Tune difference between MADX and ELEGANT when we have decouping section?
Michael,
I have email them to you.
Thank you.
Guohui
I have email them to you.
Thank you.
Guohui
michael_borland wrote: ↑14 Mar 2018, 16:25Guohui,
I would need to see the lattice file to comment. Can you upload it?
--Michael
-
- Posts: 1951
- Joined: 19 May 2008, 09:33
- Location: Argonne National Laboratory
- Contact:
Re: Tune difference between MADX and ELEGANT when we have decouping section?
Guohui,
The problem is that your lattice has x-y coupling, which twiss_output does not handle correctly. You can check the tunes by tracking, using the attached file. The result is postprocessed with sddsnaff, e.g.,
These results are much closer to those given by MADX.
There is a coupled_twiss_output command available, but it doesn't give the tunes and I couldn't get it to work for your lattice. We'll look at this further, since it should work.
--Michael
The problem is that your lattice has x-y coupling, which twiss_output does not handle correctly. You can check the tunes by tracking, using the attached file. The result is postprocessed with sddsnaff, e.g.,
Code: Select all
sddsnaff model.w1 -col=Pass -pair=Cx,Cxp -pair=Cy,Cyp -pipe=out -term=freq=1 | sddsprintout -pipe -col=*Freq*
Printout for SDDS file stdin
CxFrequency CyFrequency
------------------------------
2.196534e-01 1.601147e-01
There is a coupled_twiss_output command available, but it doesn't give the tunes and I couldn't get it to work for your lattice. We'll look at this further, since it should work.
--Michael
- Attachments
-
- DAcheckwithDetector.ele
- (701 Bytes) Downloaded 210 times
Re: Tune difference between MADX and ELEGANT when we have decouping section?
Hi Michael,
Thank you very much.
By the way, how did you calculate tune in $twiss_output? And are beta_x, alfa_x right in the output of $twiss_output?
Or in the output of $twiss_outputare, are beta_x, alfa_x right in decoupling section in the lattice, but wrong in the coupling section?
As you know, MADX usually use Beta11, Beta22, Beta12, and Beta21 in coupling section.
If we use a $twiss_outputare on a lattice with coupling section, is all the beta_x beta11? is all the beta_y beta22?
Best wishes
Guohui
Thank you very much.
By the way, how did you calculate tune in $twiss_output? And are beta_x, alfa_x right in the output of $twiss_output?
Or in the output of $twiss_outputare, are beta_x, alfa_x right in decoupling section in the lattice, but wrong in the coupling section?
As you know, MADX usually use Beta11, Beta22, Beta12, and Beta21 in coupling section.
If we use a $twiss_outputare on a lattice with coupling section, is all the beta_x beta11? is all the beta_y beta22?
Best wishes
Guohui
michael_borland wrote: ↑15 Mar 2018, 09:34Guohui,
The problem is that your lattice has x-y coupling, which twiss_output does not handle correctly. You can check the tunes by tracking, using the attached file. The result is postprocessed with sddsnaff, e.g.,These results are much closer to those given by MADX.Code: Select all
sddsnaff model.w1 -col=Pass -pair=Cx,Cxp -pair=Cy,Cyp -pipe=out -term=freq=1 | sddsprintout -pipe -col=*Freq* Printout for SDDS file stdin CxFrequency CyFrequency ------------------------------ 2.196534e-01 1.601147e-01
There is a coupled_twiss_output command available, but it doesn't give the tunes and I couldn't get it to work for your lattice. We'll look at this further, since it should work.
--Michael
-
- Posts: 1951
- Joined: 19 May 2008, 09:33
- Location: Argonne National Laboratory
- Contact:
Re: Tune difference between MADX and ELEGANT when we have decouping section?
Guohui,
&twiss_output assumes that the lattice is uncoupled. The beta functions etc. are computed from the 2x2 submatrices for the x and y planes. So stritly speaking they are not correct anywhere in the presence of coupling.
You can compute the coupled twiss parameters for the four modes using the following command
If you compare betax1 from this command from betax from &twiss_output, you'll see differences throughout the lattice.
Unfortunately, &coupled_twiss_output doesn't provide the tunes, but we will add that in the next release.
--Michael
&twiss_output assumes that the lattice is uncoupled. The beta functions etc. are computed from the 2x2 submatrices for the x and y planes. So stritly speaking they are not correct anywhere in the presence of coupling.
You can compute the coupled twiss parameters for the four modes using the following command
Code: Select all
&coupled_twiss_output
filename = %s.ctwi,
emittance_ratio = 1e-02,
emit_x = 1e-10,
sigma_dp = 1e-10,
calculate_3d_coupling = 1,
concat_order = 2,
&end
Unfortunately, &coupled_twiss_output doesn't provide the tunes, but we will add that in the next release.
--Michael
Re: Tune difference between MADX and ELEGANT when we have decouping section?
Thank you very much, Michael.
michael_borland wrote: ↑15 Mar 2018, 13:27Guohui,
&twiss_output assumes that the lattice is uncoupled. The beta functions etc. are computed from the 2x2 submatrices for the x and y planes. So stritly speaking they are not correct anywhere in the presence of coupling.
You can compute the coupled twiss parameters for the four modes using the following commandIf you compare betax1 from this command from betax from &twiss_output, you'll see differences throughout the lattice.Code: Select all
&coupled_twiss_output filename = %s.ctwi, emittance_ratio = 1e-02, emit_x = 1e-10, sigma_dp = 1e-10, calculate_3d_coupling = 1, concat_order = 2, &end
Unfortunately, &coupled_twiss_output doesn't provide the tunes, but we will add that in the next release.
--Michael
Re: Tune difference between MADX and ELEGANT when we have decouping section?
Hi Michael,
I add the your suggested lines of &coupled_twiss_output to the .ele file as attached.
But when I run it, it gives a
emittances_from_twiss_command was set but twiss calculations not seen
Thanks.
Guohui
I add the your suggested lines of &coupled_twiss_output to the .ele file as attached.
But when I run it, it gives a
emittances_from_twiss_command was set but twiss calculations not seen
Thanks.
Guohui
michael_borland wrote: ↑15 Mar 2018, 13:27Guohui,
&twiss_output assumes that the lattice is uncoupled. The beta functions etc. are computed from the 2x2 submatrices for the x and y planes. So stritly speaking they are not correct anywhere in the presence of coupling.
You can compute the coupled twiss parameters for the four modes using the following commandIf you compare betax1 from this command from betax from &twiss_output, you'll see differences throughout the lattice.Code: Select all
&coupled_twiss_output filename = %s.ctwi, emittance_ratio = 1e-02, emit_x = 1e-10, sigma_dp = 1e-10, calculate_3d_coupling = 1, concat_order = 2, &end
Unfortunately, &coupled_twiss_output doesn't provide the tunes, but we will add that in the next release.
--Michael
- Attachments
-
- DAkwithDetectortune.ele
- (883 Bytes) Downloaded 191 times
Re: Tune difference between MADX and ELEGANT when we have decouping section?
gwei wrote: ↑15 Mar 2018, 15:46Hi Michael,
I add the your suggested lines of &coupled_twiss_output to the .ele file as attached.
But when I run it, it gives a error information as follow.
emittances_from_twiss_command was set but twiss calculations not seen
Thanks.
Guohui
michael_borland wrote: ↑15 Mar 2018, 13:27Guohui,
&twiss_output assumes that the lattice is uncoupled. The beta functions etc. are computed from the 2x2 submatrices for the x and y planes. So stritly speaking they are not correct anywhere in the presence of coupling.
You can compute the coupled twiss parameters for the four modes using the following commandIf you compare betax1 from this command from betax from &twiss_output, you'll see differences throughout the lattice.Code: Select all
&coupled_twiss_output filename = %s.ctwi, emittance_ratio = 1e-02, emit_x = 1e-10, sigma_dp = 1e-10, calculate_3d_coupling = 1, concat_order = 2, &end
Unfortunately, &coupled_twiss_output doesn't provide the tunes, but we will add that in the next release.
--Michael
-
- Posts: 1951
- Joined: 19 May 2008, 09:33
- Location: Argonne National Laboratory
- Contact:
Re: Tune difference between MADX and ELEGANT when we have decouping section?
Guohui,
Sorry, my mistake. Add
to the &coupled_twiss_output command.
--Michael
Sorry, my mistake. Add
Code: Select all
emittances_from_twiss_command = 0
--Michael