THE CODE COSY COSY INFINITY is a code for the simulation, analysis and design of particle optical systems Since the rst ocial version in 1989, a total

Similar documents
Verified High-Order Inversion of Functional Dependencies and Interval Newton Methods

Spin Tracking with COSY INFINITY and its Benchmarking

The Quantum Harmonic Oscillator Stephen Webb

The Michigan State University M.Sc. and Ph.D. On-line Degree Programs in Beam Physics

APPLIED MATHEMATICS ADVANCED LEVEL

Distance Education in Beam Physics Béla Erdélyi, Jens Hoefkens, Kyoko Makino, Martin Berz

Damping Wigglers in PETRA III

TESLA Report

State of Stress at Point

CALIBRATION OF A ROBUST 2 DOF PATH MONITORING TOOL FOR INDUSTRIAL ROBOTS AND MACHINE TOOLS BASED ON PARALLEL KINEMATICS

Mathematical Modeling and Engineering Problem Solving

Application. Outline. 3-1 Polynomial Functions 3-2 Finding Rational Zeros of. Polynomial. 3-3 Approximating Real Zeros of.

Introduction to the Finite Element Method

Modeling, Computers, and Error Analysis Mathematical Modeling and Engineering Problem-Solving

In mathematics, there are four attainment targets: using and applying mathematics; number and algebra; shape, space and measures, and handling data.

A Short Introduction to Computer Graphics

Georgia Department of Education Kathy Cox, State Superintendent of Schools 7/19/2005 All Rights Reserved 1

Finite Element Formulation for Plates - Handout 3 -

NEW YORK STATE TEACHER CERTIFICATION EXAMINATIONS

Numerical Analysis. Professor Donna Calhoun. Fall 2013 Math 465/565. Office : MG241A Office Hours : Wednesday 10:00-12:00 and 1:00-3:00

Chapter 4 One Dimensional Kinematics

Nonlinear Algebraic Equations. Lectures INF2320 p. 1/88

STUDY OF THE TRANSVERSE BEAM EMITTANCE OF THE BERN MEDICAL CYCLOTRON

Physics 2B. Lecture 29B

Lecture 9: Geometric map transformations. Cartographic Transformations

Dynamic Eigenvalues for Scalar Linear Time-Varying Systems

The four [10,5,4] binary codes

Essential Mathematics for Computer Graphics fast

An Overview of the Finite Element Analysis

6. Define log(z) so that π < I log(z) π. Discuss the identities e log(z) = z and log(e w ) = w.

PCHS ALGEBRA PLACEMENT TEST

Awareness of lifetime physical and mental wellness Physical Education Included in a degree or certificate program: Yes No Noncredit Category:

Understanding Poles and Zeros

Optical modeling of finite element surface displacements using commercial software

An On-Line Algorithm for Checkpoint Placement

The Lindsey-Fox Algorithm for Factoring Polynomials

MA 323 Geometric Modelling Course Notes: Day 02 Model Construction Problem

Point Lattices in Computer Graphics and Visualization how signal processing may help computer graphics

Integration of a fin experiment into the undergraduate heat transfer laboratory

RARITAN VALLEY COMMUNITY COLLEGE COURSE OUTLINE. CISY 103 Computer Concepts and Programming

Figure 1.1 Vector A and Vector F

The BBP Algorithm for Pi

THEORETICAL MECHANICS

4.3 Lagrange Approximation

AC : MATHEMATICAL MODELING AND SIMULATION US- ING LABVIEW AND LABVIEW MATHSCRIPT

Introduction to Logistic Regression

Calculation of Eigenmodes in Superconducting Cavities

2. Spin Chemistry and the Vector Model

PROBLEM SET. Practice Problems for Exam #1. Math 2350, Fall Sept. 30, 2004 ANSWERS

Lecture Notes to Accompany. Scientific Computing An Introductory Survey. by Michael T. Heath. Chapter 10

ECE 516: System Control Engineering

The accurate calibration of all detectors is crucial for the subsequent data

Appendix 3 IB Diploma Programme Course Outlines

Inner Product Spaces

DISTANCE DEGREE PROGRAM CURRICULUM NOTE:

VARIANCE REDUCTION TECHNIQUES FOR IMPLICIT MONTE CARLO SIMULATIONS

The Matrix Elements of a 3 3 Orthogonal Matrix Revisited

5 Systems of Equations

Magnetism. d. gives the direction of the force on a charge moving in a magnetic field. b. results in negative charges moving. clockwise.

Degree Reduction of Interval SB Curves

Numerical Analysis An Introduction

Permanent Magnet Materials

Force/position control of a robotic system for transcranial magnetic stimulation

Vector and Matrix Norms

Conceptual: 1, 3, 5, 6, 8, 16, 18, 19. Problems: 4, 6, 8, 11, 16, 20, 23, 27, 34, 41, 45, 56, 60, 65. Conceptual Questions

Current Standard: Mathematical Concepts and Applications Shape, Space, and Measurement- Primary

Designing Efficient Software for Solving Delay Differential Equations. C.A.H. Paul. Numerical Analysis Report No Oct 2000

HPC enabling of OpenFOAM R for CFD applications

Introduction to Netlogo: A Newton s Law of Gravity Simulation

Some Comments on the Derivative of a Vector with applications to angular momentum and curvature. E. L. Lady (October 18, 2000)

8. Linear least-squares

Dynamics. Basilio Bona. DAUIN-Politecnico di Torino. Basilio Bona (DAUIN-Politecnico di Torino) Dynamics / 30

OpenFOAM Optimization Tools

CONTRIBUTIONS TO THE AUTOMATIC CONTROL OF AERIAL VEHICLES

Numerical Methods for Differential Equations

Vector has a magnitude and a direction. Scalar has a magnitude

R 60 DoMC-01 rev.1 Additional requirements from the United States. Accuracy class III L. Revision number Date of the revision Nature of the revision

MATH10040 Chapter 2: Prime and relatively prime numbers

Bachelors of Computer Application Programming Principle & Algorithm (BCA-S102T)

Assessment Plan for Learning Outcomes for BA/BS in Physics

Energy, Work, and Power

Vertical orbit-excursion fixed field alternating gradient accelerators (V-FFAGs) and 3D cyclotrons

Outline Servo Control

Spacecraft Dynamics and Control. An Introduction

How High a Degree is High Enough for High Order Finite Elements?

On computer algebra-aided stability analysis of dierence schemes generated by means of Gr obner bases

Many algorithms, particularly divide and conquer algorithms, have time complexities which are naturally

Opto-Mechanical I/F for ANSYS

Intersection of a Line and a Convex. Hull of Points Cloud

Bachelor of Games and Virtual Worlds (Programming) Subject and Course Summaries

November 16, Interpolation, Extrapolation & Polynomial Approximation

Programme Specification (Undergraduate) Date amended: 27 February 2012

Differential Relations for Fluid Flow. Acceleration field of a fluid. The differential equation of mass conservation

Lectures 5-6: Taylor Series

We can display an object on a monitor screen in three different computer-model forms: Wireframe model Surface Model Solid model

3. Interpolation. Closing the Gaps of Discretization... Beyond Polynomials

Lecture L3 - Vectors, Matrices and Coordinate Transformations

Exact shape-reconstruction by one-step linearization in electrical impedance tomography

Volumetric Meshes for Real Time Medical Simulations

Event display for the International Linear Collider Summer student report

Transcription:

COSY INFINITY Version 7 Kyoko Makino and Martin Berz Department of Physics and Astronomy and National Superconducting Cyclotron Laboratory Michigan State University, East Lansing, MI 48824 Abstract An overview over the features of version 7 of the code COSY IN- FINITY is given Currently distributed to about 160 registered users, the code allows the computation and manipulation of maps of arbitrary order for arbitrary arrangements of elds Besides the conventional analysis tools including various techniques for symplectic tracking, normal form methods, hardware and reconstructive aberration correction, and achromat design, several new features are presented These include ecient methods to treat fringe eld, a variety of methods to directly use measured eld data for the computation of maps, as well as the computation and analysis of spin dynamics Furthermore, we give references regarding the practical use of the new remainder dierential algebraic methods, which among other things allow fully rigorous estimates of stability times of nonlinear repetitive motion INTRODUCTION This paper provides background of the code COSY INFINITY and its language, and examples of some of the new features in COSY INFINITY [1] These new features include the SYSCA fast fringe eld methods [2{5], the computation of maps from arbitrary measured elds, the computation and analysis of spin dynamics [6,7] which is getting more important due to the increasing number of studies connected to the acceleration of polarized particles, as well as the tools used for the design of fth order achromats [8{10], and the new remainder dierential algebraic method [11{14] Besides these features based on new techniques, there are also a variety of other new tools of a more technical nature These are connected to standard problems of accelerator design, to interactive graphics, as well as to several improvements of existing tools A good overview over the key features of the code can be found in the extensive demo that is part of the COSY shipment Information about COSY can also be obtained at wwwbeamtheorynsclmsuedu/cosy

THE CODE COSY COSY INFINITY is a code for the simulation, analysis and design of particle optical systems Since the rst ocial version in 1989, a total of seven releases with an increasing number of features have been provided, and currently there are a total of about 160 registered users as shown in Figure 1 COSY is based on dierential algebraic methods, which are described in detail elsewhere [15{17], and which lately have been widely used also in most of the other newly emerging codes For the sake of portability, the code is based on standard FORTRAN 77, which is still the most widespread language on the computers used for accelerator design and simulation Since the code employs its own programming language which is object oriented and has the avor of PASCAL, COSY's programmers and users are free from FORTRAN The COSY language has very simple syntax which makes programming easy, and its elements are as follows: BEGIN ; END ; { Begins and ends program } INCLUDE ; SAVE ; { Includes and saves compiled code } VARIABLE ; { Declares a local variable } Numbe r o f COSY Pr o c e dur e s Numbe r o f Re g i s t e r e d Us e r s 2 0 0 1 5 0 1 5 0 1 0 0 1 0 0 5 0 5 0 0 Ye a r 0 Ye a r 1 9 8 9 1 9 9 1 1 9 9 3 1 9 9 5 1 9 8 9 1 9 9 1 1 9 9 3 1 9 9 5 Na t i o na l i t y o f I ns t i t ut i o ns Le g e nd : USA Ge r ma ny Rus s i a Ca na da J a pa n o t he r s c ur r e nt a s o f 1 9 9 6 FIGURE 1 Some statistics about COSY INFINITY (picture generated with COSY's graphics environment and part of the COSY Demo)

PROCEDURE ; ENDPROCEDURE ; { Declares a local procedure } FUNCTION ; ENDFUNCTION ; { Declares a local function } < assignments > ; { Sets value of variable } < procedure calls > ; { Calls previously defined procedure } IF ; ENDIF ; { Executed once if argument is true } WHILE ; ENDWHILE ; { Executed while argument is true } LOOP ; ENDLOOP ; { Stepping argument } FIT ; ENDFIT ; { varying arguments to fit conditions } Except for the last one, the ow control statements are rather standard The unique FIT block is used for ecient utilization of COSY's various optimizers The ENDFIT statement contains the number of the optimizer to be used and the objective quantities, as well as the tolerance and the maximum number of iterations allowed The statements in the block are executed over and over again, where for each pass the optimization algorithm changes the values of the variables listed in the FIT statement and attempts to minimize the objective quantity The compiler for this language comprises about 6,000 of the approximately 25,000 lines of COSY's FORTRAN code It has a completely rigorous syntax and error analysis and is comparable in speed to other compilers The compiled code is stored in a binary le, which can either be saved for inclusion in later code or executed directly The object oriented features of the code allow a direct use of the dierential algebraic operations contained in the 16,000 line DA package THE FAST FRINGE FIELD CALCULATION COSY has several options to take account of the fringe eld One is to compute the exact fringe eld through DA integration of the equations of motion In this case, the accuracy is limited only by the accuracy of the numerical integrator, which is adjusted via automatic step size control While this method provides a very detailed fringe-eld calculation, the computational expense becomes quite high One of the other approaches to compute fringe- eld in COSY is the SYSCA method It is based on a combination of geometric scaling in TRANSPORT coordinates and symplectic rigidity scaling [2{5] It uses parameter dependent symplectic representations of fringe-eld maps stored on les to approximate the fringe eld via symplectic scaling This method computes fringe elds with a very high accuracy, yet its computational expense is two or three orders of magnitude less than direct integration and in the same terrain as that of main eld only calculation While the reference le can be produced by a user in COSY according to the detailed shape of the fringe elds at hand, one standard reference le comes as part of the COSY shipment The SYSCA fringe-eld mode is especially helpful in the nal design stages of a realistic system after approximate parameters of the

elements have been obtained by neglecting fringe elds or with other rough fringe-eld calculation THE MEASURED FIELD DATA ELEMENT One of new elements in COSY INFINITY, the measured eld data element, allows the computation of the map of any magnetic eld supplied by midplane measured data The measured data has to be supplied at equi-distant grid points in cartesian coordinates The necessary interpolation method has to guarantee the dierentiability to t with the dierential algebraic computation Because of this, the evaluation of the eld strength in the element in COSY is done by Gaussian interpolation, which is a powerful special case of a wavelet transform: B y (x; z) = X ix;iz BY(i x ; i z ) 1 " S exp? (x? x i x ) 2? (z? # z iz) 2 ; 2 4x 2 S 2 4z 2 S 2 where BY(i x ; i z ) are the supplied measured data Since the gaussian function falls o quickly, the time consuming summation over all the gaussians can be replaced by the summation of only the neighboring gaussians, which is in the vein of other wavelet transforms and greatly improves eciency The method is used extensively in the simulation of the S800 Spectrograph at NSCL/MSU [18], construction of which has just been completed, as well as the various spectrographs at CEBAF SPIN DYNAMICS In version 7, features to analyze spin motion have been added in COSY [6,7] The classical equation of motion for spin has the form d~s dt = ~w ~s; for details, see [7] The solution is a linear orthogonal transformation depending on orbital variables, thus ~s f = ^A(~z) ~si ; where ^A(~z) 2 SO(3): The motion of a particle with spin can be described as a nine dimensional motion, neglecting spin-orbit coupling, as! 0 = F ~ (~z; ~s; s) = ~z ~s! ~f(~z; s) ^W (~z; s) ~s

! ~zf = M(~z ~s ~ i ; ~s i ; s) = f! M(~z i ; s) ^A(~z i ; s) ~s : To reduce dimensionality and utilize linearity, it is advantageous to set up the equation of motion for ^A: Insertion yields the equation of motion for the 3 3 spin matrix depending on only the six orbital variables: ^A 0 (~z; s) = ^W (~z; s) ^A(~z; s): The COSY spin features have been used extensively at DESY and a variety of other places OTHER FEATURES A recent application of COSY was the design of higher order achromats, and recently some extensive work connected to fth order achromats has been done [8{10] The new remainder dierential algebraic (RDA) method combines the rigor of interval computations and a reduction of blow-up due to its use of Taylor polynomials For the purposes of beam physics, it allows the determination of rigorous bounds for the remainder term of Taylor maps, and combined with methods to determine approximate invariants of the motion, it can be used for guaranteed estimates of stability times in circular accelerators [11{14] REFERENCES 1 Berz, M, COSY INFINITY Version 7 reference manual Technical Report MSUCL-977revised, National Superconducting Cyclotron Laboratory, Michigan State University, East Lansing, MI 48824 (1996) 2 Hostatter, G, and Berz, M, Ecient computation of fringe elds using symplectic scaling In Third Computational Accelerator Physics Conference, AIP Conference Proceedings 297, 467 (1993) 3 Hostatter, G, and Berz, M, Accurate and fast computaton of high{order fringe eld maps via symplectic scaling Nuclear Instruments and Methods, 352 (1994) 4 Hostatter, G H, Rigorous bounds on survival times in circular accelerators and ecient computation of fringe{eld transfer maps PhD thesis, Michigan State University, East Lansing, Michigan, USA (1994) also DESY 94-242 5 Hostatter, G H, and Berz, M, Symplectic scaling of transfer maps including fringe elds Physical Review E, 54 (1996) 6 Berz, M, Dierential algebraic description and analysis of spin dynamics In Proceedings, SPIN94, in press

7 Balandin, V, and Berz, M, Computation and analysis of spin dynamics, these proceedings 8 Wan, W, and Berz, M, Design of a th order achromat Nuclear Instruments and Methods, 352 (1994) 9 Wan, W, Theory and Applications of Arbitrary-Order Achromats PhD thesis, Michigan State University, East Lansing, Michigan, USA (1995) also MSUCL-976 10 Wan, W, and Berz, M, Analytical theory of arbitrary order achromats Physical Review E, 54, 2870 (1996) 11 Berz, M, and Hostatter, G, Computation and application of Taylor polynomials with interval remainder bounds Interval Computations, submitted, (1994) 12 Berz, M, and Hostatter, G, Exact estimates of the long term stability of weakly nonlinear systems applied to the design of large storage rings Interval Computations, 2, 68-89 (1994) 13 Makino, K, and Berz, M, Remainder dierential algebras and their applications In Berz, M, Bischof, C, Corliss, G, and Griewank, A, editors, Computational Dierentiation: Techniques, Applications, and Tools SIAM, Philadelphia, Penn (1996) 14 Berz, M, Dierential algebras with remainder and rigorous proofs of long-term stability, these proceedings 15 Berz, M, High-order computation and normal form analysis of repetitive systems In Month, M, editor, Physics of Particle Accelerators, AIP 249, 456, American Institute of Physics (1991) 16 Berz, M, Arbitrary order description of arbitrary particle optical systems Nuclear Instruments and Methods, A298, 426 (1990) 17 Berz, M, Dierential algebraic description of beam dynamics to very high orders Particle Accelerators, 24, 109 (1989) 18 Berz, M, Joh, K, Nolen, J A, Sherrill, B M, and Zeller, A F, Reconstructive correction of aberrations in nuclear particle spectrographs Physical Review C, 47,2, 537 (1993)