&OPTIMISE


overview

  The optimisation section contains the instructions which fall in the
  following categories:

  - optimisation of potential settings
  - modification of the cell structure
  - three dimensional charges
  - general purpose instructions

  ------------------------------------------------------------------------
  Optimisation of potential settings
  ------------------------------------------------------------------------
  DISPLAY                    Displays potential settings
  FACTOR                     Factorises the potential
  FORCES                     Computes the forces on the wires
  PRINT-CELL                 Prints the cell data
  RESTORE                    Restores the original settings after a SET
  SAVE                       Saves the potential settings
  SET                        Optimises potential settings

  ------------------------------------------------------------------------
  Modification of the cell structure
  ------------------------------------------------------------------------
  ADD                        Adds elements to the cell
  CHANGE-VOLTAGES            Modifies the wire potentials
  DELETE                     Deletes elements from the cell

  ------------------------------------------------------------------------
  Three dimensional charges
  ------------------------------------------------------------------------
  CHARGES                    Adds three dimensional charges to the cell
  DELETE-CHARGES             Removes three dimensional charges from the cell
  LIST-CHARGES               Lists the three dimensional charges

  ------------------------------------------------------------------------
  Adding a background field
  ------------------------------------------------------------------------
  BACKGROUND-FIELD           Adds a background field to the cell
  DELETE-FIELD-MAP           Deletes a background field map
  DELETE-BACKGROUND-FIELD    Removes the background field
  FIELD-MAP                  Reads a field map for use as background field
  READ-FIELD-MAP             Reads a binary field map as background field

  ------------------------------------------------------------------------
  General purpose instructions
  ------------------------------------------------------------------------
  AREA                       Changes the part of the cell that is considered
  DRIFT-AREA                 Sets the part of the cell where electrons drift
  GRID                       Changes the grid density
  OPTIONS                    Switches options off and on
  POINTS                     Sets the number of points on the track
  SELECT                     Selects active wires
  TRACK                      Sets the track

ADD

  This instruction adds one or more elements to the cell. You may
  in one go both add more than one wire, a wire and a plane etc.
  The coordinate system can not be changed by this instruction.
  The symbolic variables from the cell section can not be used.

  Format:

  ADD [PERIODICITY {X|Y|PHI} length] ...
      [PLANE {X|Y|R|PHI} coordinate ...
             [VOLTAGE voltage]] ...
      [WIRE TYPE type ...
            AT position ...
            [VOLTAGE voltage] ...
            [DIAMETER diam]]

Additional Information on:

  • length
  • coordinate
  • voltage
  • type
  • position
  • diameter

  • AREA

      Changes the plane over which the optimisation is carried out. Only
      relevant if optimisation by GRID has been selected.
    
      Please note that the AREA affected by this instruction is not the
      area in which electrons and ions are allowed to drift. The latter
      area, which is relevant when optimising the drift time, is set
      with the DRIFT-AREA command.
    
      Format:
    
      See &FIELD -> AREA
    

    BACKGROUND-FIELD

      Adds a background field to the field that results from the wires,
      the planes, dielectrics, 3-dimensional charges and field map.
    
      The background field is not checked for consistency between the
      field and potential, nor for compatibility with the boundary
      conditions. Such checks can be done in the field section using
      the CHECK instruction.
    
      You have to supply at least 3 formulae: potential, x- component
      and y-component of the electric field. You may in addition supply
      the z-component of the electric field. The latter defaults to 0.
    
      If the background field is to be derived from a field map, then
      the FIELD-MAP statement should precede the BACKGROUND-FIELD
      statement in the &OPTIMISE section. The background field map is
      kept across &OPTIMISE and &CELL sections, as long as the storage
      occupied by this field is not claimed by a main field map in the
      cell section. It is therefore not necessary to read a field map
      again to modify the dependence of the background field map on the
      field map.
    
      Format:
    
      BACKGROUND-FIELD ...
           VOLTAGE formula  EX formula  EY formula  [EZ formula]
    
      Example:
    
      background-field voltage=cos(2*x)*sin(2*y) ...
                     ex=     2*sin(2*x)*sin(2*y) ...
                     ey=    -2*cos(2*x)*cos(2*y)
    

    Additional Information on:

  • formula

  • CHANGE-VOLTAGES

      Changes the voltages on some of the wires.
    
      Format:
    
      CHANGE-VOLTAGES WIRE wire VOLTAGE voltage ...
    
      Example:
    
      CH-V     W 1 V 1000      W 2 V 3000
    
      Changes the voltage on wire 1 to 1000 V and on wire 2 to 3000 V.
    

    Additional Information on:

  • wire
  • voltage

  • CHARGES

      +-----------------------------------------------------------------+
      | The current version of Garfield only takes point charges into   |
      | account in a small number of configurations.                    |
      +-----------------------------------------------------------------+
    
      Adds three dimensional point charges to the cell. These charges
      are not taken into account for the charge calculation on the wires,
      they therefore should be seen as, temporary, space charges.
    
      Format:
    
      CHARGES
      x y z q
      x y z q
      ...
      (blank line)
    
      Example:
    
      CHARGES
      0 0 0 100
      1 1 1 200
    
      Places one space charge at (0,0,0) and one at (1,1,1). The first
      has a charge of 100 and the second a charge of 200. For the units
      see under 'charge'.
    

    Additional Information on:

  • position
  • charge

  • DELETE

      Not yet available, see ADD.
    

    DELETE-BACKGROUND-FIELD

      Removes the background field.
    
      Format:
    
      DELETE-BACKGROUND-FIELD
    
      Example:
    
      del-backgr
    

    DELETE-CHARGES

      Removes all three dimensional charges.
    
      Format:
    
      DELETE-CHARGES
    
      Example:
    
      DELETE-CHARGES
    

    DELETE-FIELD-MAP

      Deletes the field map.
    
      Format:
    
      DELETE-FIELD-MAP
    
      Example:
    
      DELETE-FIELD-MAP
    

    DISPLAY

      Prints the current potential settings.
    
      Format:
    
      DISPLAY
    

    DRIFT-AREA

      Changes the area in which electrons and ions are allowed to drift.
    
      Please note that this command does not define the plane over which
      optimisation is carried out. To change this plane, use AREA.
    
      Format:
    
      See &FIELD -> AREA
    

    FACTOR

      Prints the contributions to the field from each wire-potential
      separately. The contributions of a set of wires put together in a
      single group by SELECT, are summed if the GROUP option is selected.
    
      Format:
    
      FACTOR [GRID | WIRE | TRACK] ...
             [NOGROUP | GROUP]
    
      Example:
    
      FACTOR
    
      (All defaults, GRID and NOGROUP, are accepted.)
    

    FIELD-MAP

      In case the background field is too complex to compute analytically,
      it may still be possible to compute it with the help of finite
      element programs.
    
      When computing a background field due to additional charges, with
      finite element programs, all conductors should be set to 0 V. This
      ensures that the boundary conditions are respected when the basic
      field and the background field are superimposed.
    
      Also the &CELL section has a FIELD-MAP command. The field maps
      entered in the &CELL section serve as main field, i.e. the field
      map replaces the field due to wires and planes, file the field maps
      entered in the &OPTIMISE section are used for the computation of
      the background field. The two field maps share (for the moment) the
      same storage and can therefore not be used at the same time.
    
      Format and examples:
    
      See the FIELD-MAP command in the cell section.
    

    FORCES

      Computes the forces acting on a wire and the wire displacement
      that results from these forces.
    
      To obtain meaningful results, one should take care to supply,
      using the ROWS statement of the cell section, the wire length
      and the wire tension. If one is interested in the gravitational
      sag, then one should also enter the density of the wire material
      and the chamber orientation (GRAVITY statement).
    
      This instruction offer 2 levels of accuracy, called DETAILED
      and FAST - for further information, see the respective topics.
    
      The wires on which this instruction operates are those selected by
      the SELECT instruction. These wires do not necessarily have to be
      located within the current AREA. When one uses the ITERATE option
      to study collective wire motion, then it is crucial to SELECT all
      wires that are likely to move.
    
      Format:
    
      FORCES [PRINT-SAG | NOPRINT-SAG] ...
             [PLOT-SAG | NOPLOT-SAG] ...
             [NOKEEP-SAG | KEEP-SAG] ...
    
             [PRINT-FORCES | NOPRINT-FORCES] ...
             [PLOT-FORCES | NOPLOT-FORCES] ...
             [NOKEEP-FORCES | KEEP-FORCES] ...
    
             [DETAILED | FAST] ...
             [SCANNING-GRID nx ny] ...
             [SCANNING-AREA {LARGEST | FIRST-ORDER | ...
                             FIRST-ORDER-ENLARGED-BY fact | ...
                             xmin ymin xmax ymax}] ...
             [SHOTS nshot] ...
             [STEPS-PER-SHOT nstep] ...
             [INTERPOLATION-ORDER order] ...
             [NOEXTRAPOLATE | EXTRAPOLATE] ...
    
             [ITERATE [n_iter] | NOITERATE] ...
             [TOLERANCE distance] ...
             [UPDATE-SCALING-FACTOR factor] ...
             [OFFSET wire x_offset y_offset] ...
    
             [ELECTROSTATICS | NOELECTROSTATICS] ...
             [GRAVITY | NOGRAVITY]
    
      Example:
    
      select s
      forces detailed keep-sag
    
      The forces acting on the S wires will be calculated in
      detail and the sag profiles will be stored in global
      variables.
    
      Note:
    
      This computation benefits greatly from vector processors and
      matrix algebra libraries tuned to the hardware (e.g. ESSL).
    

    Additional Information on:

  • FAST
  • DETAILED
  • SCANNING-GRID
  • SCANNING-AREA
  • nshot
  • nstep
  • order
  • EXTRAPOLATE
  • ITERATE
  • TOLERANCE
  • UPDATE-SCALING-FACTOR
  • OFFSET
  • GRAVITY
  • ELECTROSTATICS
  • PRINT-SAG
  • PLOT-SAG
  • KEEP-SAG
  • PRINT-FORCES
  • PLOT-FORCES
  • KEEP-FORCES

  • GRID

      Sets the density of sampling points on the grid. This number is
      usually of the order of 25 for plots (field section) but 10 is
      more advisable for executing the SET instruction.
    
      The second arguments may be omitted in which case the first value
      will be used for both the x (or r) and the y (or phi) spacing.
    
      Format:
    
      GRID  number_of_steps_in_x  [number_of_steps_in_y]
    
      Example:
    
      GRID 5
    

    LIST-CHARGES

      Produces a list of the currently present three dimensional charges.
    
      Format:
    
      LIST-CHARGES
    
      Example:
    
      LIST-CHARGES
    

    OPTIONS

      No local options in this section.
    

    POINTS

      When optimisation by TRACK has been selected, it may be useful to
      play with the number of sampling points on the track.
    
      Format:
    
      POINTS  points_on_track
    
      Example:
    
      POINTS 50
    

    PRINT-CELL

      Produces a listing of the cell elements, like the one made at the end
      of the cell section if the CELL-PRINT option is in effect.
    
      Format:
    
      PRINT-CELL
    
      Example:
    
      PRINT-CELL
    

    READ-FIELD-MAP

      See the description in the &CELL section.
    

    RESTORE

      Restores a previously SAVEd set of potentials. The original potentials
      are restored if no reference number is given. The program tells you the
      reference number when you issue the SAVE instruction.
    
      Format:
    
      RESTORE [reference_number]
    
      Example:
    
      SAVE
      (program replies with the reference number 5; next you try:)
      SET V TO AVERAGE ON GRID
      DISPLAY
      (You notice you don't like the new settings and therefore ...)
      RESTORE 5
    

    SAVE

      Saves the current set of potentials. The program replies with a number
      you should remember because it's required for retrieval.
    
      Format:
    
      SAVE
    

    SELECT

      Selects and groups the wires which are handled in a special way. The
      argument consists of wire-codes and or wire-numbers. Put a pair of
      brackets around the codes and numbers of the wires that should go
      in one group.
    
      Format:
    
      SELECT wire_selection
    
      Example:
    
      SEL (1 S) 2 F
    
      (Put wire 1 together with all S wires in one group, make wire 2
      a group of its own and do the same for each of the F wires.)
    

    SET

      SET is the key instruction in the optimisation section. It varies
      the potential settings in an attempt to satisfy your criteria. The
      method used is that of repeated Householder steps minimising (in
      the Euclidean norm) the difference between the target and field
      function. Several conditions can cause the iteration to be stopped:
    
      * The user defined maximum number of iterations is reached,
      * The relative change in Euclidean distance between the target
        and field function (on the sampling points) drops below EPSILON,
      * The maximum distance (of all sampling points) between the
        target and field function becomes smaller than DISTANCE,
      * The functions cannot be brought closer together anymore by
        varying the potentials,
      * Variations of the potentials on two different wires causes
        identical effects.
    
      Only the potentials on the wires that have been SELECTed will be
      touched during the process. Wires that are put together in a group,
      are shifted collectively.
    
      Format:
    
      SET field_function ...
          TO {AVERAGE | target_function} ...
          [WEIGHT weight_function] ...
          [ON {TRACK | GRID | WIRE}] ...
          [DISTANCE distance] ...
          [EPSILON eps] ...
          [ITERATE-LIMIT iterlim] ...
          [PRINT | NOPRINT]
    
      Examples:
    
      SET V TO AVERAGE ON TRACK DIST 100
      SET E TO 1000 ON GRID DIST 1
    
      (The first example is an attempt to make V flat over a line, the
      second could be used to obtain a homogeneous drift field.)
    

    Additional Information on:

  • distance
  • eps
  • field_function
  • GRID
  • iterlim
  • PRINT
  • target_function
  • TRACK
  • weight_function
  • WIRES

  • TRACK

      Sets the track.
    
      Format:
    
      TRACK x_start y_start x_end y_end
    
      Example:
    
      TRACK 1 1 2 2
    

    Keyword index. Formatted on 10/11/98.