Page 1 of 1

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

Posted: 27 Dec 2022, 04:52
by Cai_Meng
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

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

Posted: 30 Jan 2023, 10:14
by michael_borland
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