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
How to change the KQUAD from K1 to pole tip field?
Moderators: cyao, 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?
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
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
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"
The script analyzeMagnets, supplied with elegant, provides a more detailed example that might help.
--Michael