Skip to content

Lattice Geometry

David Sagan edited this page Sep 6, 2017 · 4 revisions

The parameter[geometry] parameter in a lattice file sets the lattice topology to:

  • open: For Twiss and reference orbit calculations Bmad uses the initial Twiss and orbit settings in the lattice for the beginning of the lattice and propagates them to the end of the lattice (like you would do for a linac).
  • closed: For Twiss and reference orbit calculations, Bmad calculates the periodic solution (like you would in a storage ring). Bmad will ignore Twiss and orbit settings.

Example:

parameter[p0c] = 1e9
parameter[geometry] = closed

d: drift, l = 2
q1: quad, l = 0.5, k1 = 1, superimpose
q2: quad, l = 0.5, k1 = -1, superimpose, offset = 1

lat: line = (d)
use, lat

Result:

Tao> show lat
      Values at End of Element:
 Index  name      key                       s       l    beta     phi    eta  orbit     beta     phi    eta  orbit    Track_State
                                                            a       a      a  x [mm]       b       b      b  y [mm]
     0  BEGINNING Beginning_Ele         0.000     ---    5.93   0.000   0.00   0.000    4.05   0.000   0.00   0.000   Alive
     1  Q1#2      Quadrupole            0.250   0.250    5.57   0.043   0.00   0.000    4.32   0.060   0.00   0.000   Alive
     2  D#1       Drift                 0.750   0.500    4.32   0.145   0.00   0.000    5.57   0.162   0.00   0.000   Alive
     3  Q2        Quadrupole            1.250   0.500    4.32   0.266   0.00   0.000    5.57   0.249   0.00   0.000   Alive
     4  D#2       Drift                 1.750   0.500    5.57   0.368   0.00   0.000    4.32   0.351   0.00   0.000   Alive
     5  Q1#1      Quadrupole            2.000   0.250    5.93   0.411   0.00   0.000    4.05   0.411   0.00   0.000   Alive
     6  END       Marker                2.000   0.000    5.93   0.411   0.00   0.000    4.05   0.411   0.00   0.000   Alive
Lord Elements:
     7  Q1        Quadrupole            0.250   0.500    5.57   0.043   0.00     ---    4.32   0.060   0.00     ---   Not_Set
 Index  name      key                       s       l    beta     phi    eta  orbit     beta     phi    eta  orbit    Track_State
                                                            a       a      a  x [mm]       b       b      b  y [mm]
      Values at End of Element:


Tao> show ele q1
 Element #                7
 Element Name: Q1
 Key: Quadrupole
 S_start, S:    1.750000,    0.250000
... etc...

Slave_status: Free
Lord_status:  Super_Lord
Slaves:
   Index   Name        Type
       5   Q1#1        Quadrupole
       1   Q1#2        Quadrupole

Notes:

  • Bmad does not demand that a closed lattice be closed in the sense that the global position at the end of the lattice be the same as the beginning.