How to change the KQUAD from K1 to pole tip field?

Moderators: cyao, michael_borland

Post Reply
Cai_Meng
Posts: 18
Joined: 19 Jun 2017, 08:01

How to change the KQUAD from K1 to pole tip field?

Post by Cai_Meng » 27 Dec 2022, 04:52

Dear Elegant experts,

In accelerator design with beam energy changing, the K1 setting of quadrupole is very convenient for matching, but sometimes we need to fix the pole tip field of the quadrupole magnet. If we want to change the K1 value to the pole tip field after matching with K1, we can calculate it using K1, bore radius and magnetic rigidity, but it is troublesome. Is there a more convenient way to convert lattice from quadrupole K1 to pole tip field?

Thank you very much!
Best regards,
Cai

michael_borland
Posts: 1959
Joined: 19 May 2008, 09:33
Location: Argonne National Laboratory
Contact:

Re: How to change the KQUAD from K1 to pole tip field?

Post by michael_borland » 30 Jan 2023, 10:14

Cai,

If you want to compute the pole-tip field after the fact, you can use data in the parameter file (obtained via the parameters field in run_setup) as in

Code: Select all

sddsprocess run.param run.Btip -match=column,ElementParameter=K1 \
     -define=parameter,H,"<energyInGeV> 1e9 * c_mks /",units=T*m \
     -define=col,Btip,"ParameterValue H * <boreRadiusInMeters>  *,units=T"
where you need to replace <energyInGeV> and <boreRadiusInMeters> with your values.

The script analyzeMagnets, supplied with elegant, provides a more detailed example that might help.

--Michael

Post Reply