Skip to content

PTC_TWISS A_ Initialization

Piotr edited this page Aug 20, 2018 · 15 revisions

Initialization is done in subroutine initmap that is contained in subroutine ptc_twiss

The A_ map is inside variable A_script_probe as its field A_script_probe%x . A_script_probe is of of type probe_8 and it is defined in the scope of subroutine ptc_twiss

There are 2 use cases

  1. Transfer lines with provided initial parameters:
    1. Initialisation with Twiss parameters (beta, alpha and dispersion)
    2. A_ linear coefficients are read from a table, enabled with option initial_ascript_manual=true
    3. option initial_matrix_manual=true
    4. option initial_matrix_table=true
    5. option initial_moments_manual=true
    6. option initial_map_manual=true
  2. Closed solution of rings

Transfer lines with provided initial parameters

  1. Initialisation with Twiss parameters (beta and alpha) It is activated when betx and bety passed to ptc_twiss are bigger than zero and all the options initial_* are false.

    It is implemented in subroutine readinitialtwiss.

    • It reads the arguments passed to ptc_twiss

      • Orbit
      • For transverse planes beta, alpha, dispersion
      • For longitudinal beta and alpha
    • Beta and alpha is scaled with the reference momentum

       do i=1,c_%nd
         be(i)= beta(i)/(1_dp+orbit(5))
         al(i)=alpha(i)/(1_dp+orbit(5))
      enddo
  • Orbit is put as constant part of the map
      A_script_probe%x=orbit
  • The polynomials for each of transverse variables are built as follows
      do i=1,c_%nd
         A_script_probe%x(2*i-1)= orbit(2*i-1) +
            sqrt(be(i)) * morph((one.mono.(2*i-1))    )
         A_script_probe%x(2*i)  = orbit(2*i)   +
           (one/sqrt(be(i)) * (morph(  (one.mono.(2*i)) )-(al(i)) * morph((one.mono.(2*i-1)))))
      enddo

Closed solution of rings

To obtain a closed solution an identity map is tracked. In 6D case it is made of 6 polynomials. Each polynomial has the form

MAP(n) = Vn_closedorbit + 1*Vn

The map is tracked around the layout. The resulting map is normalized with