Page 1 of 1

permanent quadrupole

Posted: 12 Jul 2017, 09:21
by Philippe Piot
Hello,
I am simulating a linac with many quadrupole electromagnets but some sections have permanent-magnet quadrupoles (PMQs). In some instance I vary the beamline energy (by loading different sddsbeam and automatically reseting pCentral to the right energy). I was wondering is there is a way to accordingly scale the k1 of the PMQs to reflec the fact that for these magnet the field gradient is constant (so k1 changes as I vary the beam energy). I guess I am after an option that locally (when the beam crosses the PMQ) sets the pcentral to scale appropriately the k1 to keep the PMQ field gradient constant. Right now I do this by hand. Thank you, -- Philippe.

Re: permanent quadrupole

Posted: 17 Jul 2017, 20:23
by michael_borland
Philippe,

It might help to use the KQUAD element, which has the ability to set the gradient based on the pole tip field (B) and bore radius (BORE). If BORE is non-zero, this overrides the K1 parameter.

--Michael

Re: permanent quadrupole

Posted: 26 Jul 2017, 08:02
by Philippe Piot
Michael,
Thank you for your answer. I did try the KQUAD element but I am puzzled by its behaviour. For instance if I have only KQUAD' elements in my beamline I would expect the pCentral not to affect anything in the results while the po associated to an initial "sddsbeam" to change the focusing properties. I observe the inverse: in order to affect the focusing strength of the KQUAD I need to alter the pCentral while changing the initial bunch momentum via po does not affect the focusing. I am attaching simplified files. Thank you very much. -- Philippe.

Re: permanent quadrupole

Posted: 27 Jul 2017, 08:15
by michael_borland
Philippe,

This is the expected behavior. Elegant always expands about the momentum given in the &run_setup namelist. The Po parameter in bunched_beam is only there as a way of defining a beam with a different average momentum.

The more fundamental reason this doesn't work as you expected is that elegant tracks with delta=(p-pCentral)/pCentral as the energy coordinate. So it has to convert B/BORE to K1 using pCentral before it starts tracking.

--Michael

Re: permanent quadrupole

Posted: 27 Jul 2017, 15:29
by Philippe Piot
HI Michael,
Thank you. This makes sense. What I am trying to do is explore chromatic effects in a linac which incorporates electromagnet and permanent quadrupoles. The way I usually perform such a study is to fit my lattice (electromagnet only) for a given pCentral and then track a beam with different off-nominal energies. If I do this, I see an effect from the electromagnet change in focusing strength (the k1 being scaled appropriately) but not from the PMQs. It seems to me that to perform such a study I would have to rescale by hand the PMQs (to make sure the beam see the same field gradient as its energy is changed). Do I understand correctly and/or is there a smarter way to do what I am trying to do? Thank you, -- Philippe.

Re: permanent quadrupole

Posted: 31 Jul 2017, 10:20
by michael_borland
Philippe,

I put together an example that I think does what you want. Please give it a try.

--Michael