ColwynGulliford / lume-gpt

Apache License 2.0
3 stars 4 forks source link

Add rectmagnet element #8

Open ColwynGulliford opened 11 months ago

ColwynGulliford commented 11 months ago

Users would like an element for handling the GPT rectmanget element.

petr-lanl commented 11 months ago

Can this element be independent of the beam parameters? I would like a simple description of xstart, zstart, xend, zend, B0, gap. It could be also specified by its center, Lx, Lz and two xhat, yhat vectors for rotations but I personally do not need that.

ColwynGulliford commented 11 months ago

I'll need to take a look at the GPT manual for that element, but I agree it's best to make it independent of the beam parameters if possible.

ColwynGulliford commented 11 months ago

I looked into this and here are a few things:

  1. Using a rectmagnet with the Lattice designer will take a little extra work - the Lattice tools are really for making s-based lattice designs, where as GPT's rectmagnet object is more of a general 3d object. It can be made to work, but requires more work than I thought.

  2. In as s-based code you need a reference trajectory, and in order to make a reference particle follow that trajectory you need a reference momentum. One can of course simply set the field but even for the sectormagnet examples, the momentum there should be thought of as the reference momentum - which is often something that is known more easily than say, the B-field value.

petr-lanl commented 11 months ago

Thank you for looking into this. I appreciate that.

From: Colwyn Gulliford @.> Reply-To: ColwynGulliford/lume-gpt @.> Date: Friday, September 29, 2023 at 4:47 AM To: ColwynGulliford/lume-gpt @.> Cc: "Anisimov, Petr Mikhaylovich" @.>, Comment @.***> Subject: [EXTERNAL] Re: [ColwynGulliford/lume-gpt] Add rectmagnet element (Issue #8)

I looked into this and here are a few things:

  1. Using a rectmagnet with the Lattice designer will take a little extra work - the Lattice tools are really for making s-based lattice designs, where as GPT's rectmagnet object is more of a general 3d object. It can be made to work, but requires more work than I thought.
  2. In as s-based code you need a reference trajectory, and in order to make a reference particle follow that trajectory you need a reference momentum. One can of course simply set the field but even for the sectormagnet examples, the momentum there should be thought of as the reference momentum - which is often something that is known more easily than say, the B-field value.

— Reply to this email directly, view it on GitHubhttps://urldefense.com/v3/__https:/github.com/ColwynGulliford/lume-gpt/issues/8*issuecomment-1740692298__;Iw!!Bt8fGhp8LhKGRg!C2GW1LdvnClMyjmprEiLI9x34-lVKZUysTTzXmLvMv6SV1C7Blj23wVxXuGQzdrlCZ8m7PZuY58X6upXvx0_ug$, or unsubscribehttps://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/AQBNSIOLGTST3TWE4PUII3DX42RLXANCNFSM6AAAAAA5DIVMWE__;!!Bt8fGhp8LhKGRg!C2GW1LdvnClMyjmprEiLI9x34-lVKZUysTTzXmLvMv6SV1C7Blj23wVxXuGQzdrlCZ8m7PZuY58X6uoV2v9MMw$. You are receiving this because you commented.Message ID: @.***>