Page 1 of 1

Minimizing maximum beam size in a lattice

Posted: 28 Nov 2013, 08:34
by libov
Michael,

I'd like to optimize the lattice in such a way that the maximum beam size along the whole lattice is not exceeding a certain value.
Just minimising beta function won't work (I'm dealing with beams having large energy spread) so I really need access to beam size from tracking.

Is there a built-in possibility to do this? I mean, something similar to what one can do with the beta function (i.e. max.betax will find a maximum of betax in the whole lattice)

One less convenient option I see is to use several MARK element along the lattice and to use Sx or Sy at each occurence in optimization_term.

Before doing that I thought it's a good idea to ask you whether there is an easier way.

Thanks in advance for your time!

Slava

Re: Minimizing maximum beam size in a lattice

Posted: 30 Nov 2013, 11:57
by michael_borland
Slava,

Unfortunately, there are no statistics for beam sizes, so using MARK elements is the only possibility for now. There are some things you can do to make this easy:

Use &insert_elements to add many markers with the same name:

Code: Select all

&insert_elements
        name = *
        element_def = "M1: MARK,FITPOINT=1"
&end
This will insert a marker named "M1" after every element.

Then, use the following command to add the optimization terms

Code: Select all

&optimization_term
  term = "M1#@.Sx sqr", 
  field_string = @, 
  field_initial_value = 1, field_final_value = 1000, field_interval = 1
&end
This will create optimization terms for Sx^2 at 1000 M1 elements, starting from occurrence 1.

--Michael