Optimizing the quadrupole strengths

Moderators: cyao, michael_borland

fabioluneli
Posts: 26
Joined: 10 Feb 2022, 08:08

Re: Optimizing the quadrupole strengths

Post by fabioluneli » 19 Jan 2023, 20:37

Dear Michael and Neeraj,

I imagine that my question is going to be pretty basic. But i am reading about this kind of focusing, and i have a doubt about the script used. I understood that Neeraj said that the main objective was to focus the beam on 40cm from the second quad. On the script, in any moment were described this depth of 40cm?

Thank you!!

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

Re: Optimizing the quadrupole strengths

Post by michael_borland » 06 Feb 2023, 18:31

The 40-cm depth is defined by the D2 element, which defines the drift space between the last quadrupole and the end of the beamline.

--Michael

fabioluneli
Posts: 26
Joined: 10 Feb 2022, 08:08

Re: Optimizing the quadrupole strengths

Post by fabioluneli » 06 Feb 2023, 20:35

Hi Michael!

Now i understood the lattice! Thank you!

But, one doubt about the &twiss_output part on transport.ele file. I am trying to understand how that the twiss parameters alpha and beta were generated. Those values that appear were generated by &twiss_output, right? I say this because i created a &twiss_output file, expecting that the output returned me this twiss parameters, and then i will use on this "transport.ele file", but it didn't work. Could you confirm if the path/sequence of steps is correct?

Thank you again!!

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

Re: Optimizing the quadrupole strengths

Post by michael_borland » 07 Feb 2023, 15:29

The problem is that the tracking.ele file isn't constructed correctly to generate the .twi file. See the attachment for a file that should work.

(Basically, requesting a twiss output file during an optimization isn't supported. It has to be done after the optimization in a second sequence.)

--Michael
Attachments
transport.ele
(3.29 KiB) Downloaded 116 times

fabioluneli
Posts: 26
Joined: 10 Feb 2022, 08:08

Re: Optimizing the quadrupole strengths

Post by fabioluneli » 08 Feb 2023, 19:33

Perheaps i am having the wrong idea about how this twiss parameters work on simulation. I thought that this parameteres on the twiss_output part on transport.ele:

beta_x = 0.2,
alpha_x = 0.20412,
beta_y = 0.23308,
alpha_y = 0.10050

...were being generated by the twiss_output command? But if not, how can i determine this parameters to use as initial values?


Thank you!!

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

Re: Optimizing the quadrupole strengths

Post by michael_borland » 09 Feb 2023, 09:31

There are various ways to determine the initial twiss parameters. For example, sometimes there is an upstream transport line or segment of a ring that defines them. Sometimes we use the twiss parameters appropriate to a particle beam that we expect to be delivered to our system. In other cases, the system is required to be periodic.

Can you describe what's upstream of the system you are optimizing?

--Michael

fabioluneli
Posts: 26
Joined: 10 Feb 2022, 08:08

Re: Optimizing the quadrupole strengths

Post by fabioluneli » 10 Feb 2023, 12:49

Hi,

I am trying to optmize the focusing strength of six magnetic quadrupoles (or three fodo cell's), to focus a beam of electrons in a particular depth.

About the transport line, i have used it on lattice.lte on run_setup command. I created this lattice file made of 6 quads with 7 drift spaces. And i used it on run_setup command, then i used twiss_output action on sequence, suposing it will give me the twiss parameters. But this is wrong, right?

Thank you!!

fabioluneli
Posts: 26
Joined: 10 Feb 2022, 08:08

Re: Optimizing the quadrupole strengths

Post by fabioluneli » 20 Feb 2023, 15:14

Hi! Just to remember about the post! I was having some problem to post, i do not know if was the system, but now it is working i guess.

Thank you!

fabioluneli
Posts: 26
Joined: 10 Feb 2022, 08:08

Re: Optimizing the quadrupole strengths

Post by fabioluneli » 15 Mar 2023, 22:25

Hi,

I managed to understand how the twiss parameters are used on a beam line. But i am having this problem: "no expansion for entity D6". Do you know if it is some problem of sctructure?

I will attach the transport.lte file which has the structure of my beam line and the transport.ele file which i used to give me the twiss parameters.

Thank you!
Attachments
transport.lte
(454 Bytes) Downloaded 24 times
transport.ele
(507 Bytes) Downloaded 23 times

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

Re: Optimizing the quadrupole strengths

Post by michael_borland » 27 Mar 2023, 10:56

Note in the message that elegant is looking for an entity named "D6);"

Code: Select all

no expansion for entity D6);
known elements are:
              D0,              D1,              D2,              D3,              D4,              D5,
              D6,              Q1,              Q2,              Q3,              Q4,              Q5,
              Q6,
The problem is the use of a semi-colon at the end of the beamline definition. Elegant doesn't need semi-colons to end lines, and including them can cause problems. If you remove all the semi-colons, it will work.

--Michael

Post Reply