Presentation is loading. Please wait.

Presentation is loading. Please wait.

Computation of Taylor Maps and Applications to Accelerator Physics Six lectures with emphasis on examples and their computer implementations Etienne Forest.

Similar presentations


Presentation on theme: "Computation of Taylor Maps and Applications to Accelerator Physics Six lectures with emphasis on examples and their computer implementations Etienne Forest."— Presentation transcript:

1 Computation of Taylor Maps and Applications to Accelerator Physics Six lectures with emphasis on examples and their computer implementations Etienne Forest Soken Dai December 2004/January 2005

2 ► What is the original “DA” package? ► What does it do? Why is it useful? ► What is “Operator Overloading”? ► Taylor Polymorphism? ► “Lie/Differential Algebra”? ► Normal Forms? ► What is a integrator based code? ► What is a matrix based code i.e. Cosy-Infinity? ► What is the difference between polymorphism in a compile form (my stuff) and interpreted code (Cosy language)? ► And all these things, can I use in my own code? These are the questions which we will answer in the 6 lectures using examples as much as possible rather than theory! A TPSA Package Computes approximate Taylor maps Makes Taylor Code look ordinary Delays choice between Taylor and Real at execution time Vector fields of the theory: allow perturbation theory Various Canonical (i.e. special) forms of the map useful in periodic systems

3 Demystifying AD-DA Lecture 1 Automatic Differentiation (AD) is based on a Truncated Power Series Algebra (TPSA) not on a Differential Algebra (DA) DA which involves useful vector fields will be discussed in future lectures.

4 The Basic Questions of the first lecture: These questions are not hard unless couched in the abstract mathematical lingo Berz loves. Basic Questions for Lecture 1 What is the original TPSA (i.e. DA) package? What does it do? Why is it useful? What is “Operator Overloading”?

5 How do we cut through the nonsense? 1. Simple: we write a small fully functional toy TPSA package for this class! 2.Only 400 lines of code including the blanks! 3.Fully overloaded and fully automatic 4.Restricted to 2 variables and third order Of course, it is not Berz package and there are a lot of issues about overloading Berz’s package that can be neglected in the small example. The purpose here is to demystify these techniques and not to bother you with ultimately nearly irrelevant technicalities.

6 Look at TPSA through our toy TPSA Package ► A basic TPSA-package is a tool to expand what you compute on the computer in a Taylor Series in the variable you choose. ► In Optics and Accelerators, it permits the computations of maps for perturbative calculations and also sometimes simulations. ► Operator Overloading brings us closer to Automatic Differentiation rather than Computational Differentiation: the code that computes the Taylor expansion is almost identical to the code that computed the original quantity. Perturbative calculations : Transfer Matrix, Lattice functions (Twiss), tunes, damping, amplitude dependent tune shifts, aberrations in optical systems, resonance driving terms, synchrotron integrals, etc…It is here that differential operators and hence Lie/Differential algebras (DA) will come into play.

7 Before we start, why do we want Taylor series? Why we want Taylor Series: Example 1, shooting … Or perhaps accelerator physics? 卍 Download Toy TPSA and Gun/FODO cell application main program here! 卍here

8 One dimensional Quadrupole FODO Cells Example 2: 10 FODO Cells

9 TPSA-Addition/Subtraction

10 Multiplication

11 Inverse : Nilpotency comes in Nilpotency

12 Functions: Exponential Again one isolates the constant part to create a nilpotent  T

13 Ignore Nilpotency? Sometimes OK This is used in COSY-Infinity techniques where  T is a vector field acting a polynomial. For this reason, please reflect carefully why this series works! It is implemented as TPSA_EXP in the toy TPSA and N=n_tpsa_exp.

14 Conclusion ► ► We implemented a Truncated Series Algebra on the Computer. The original “ DA ” package of Berz is only that. ► ► For the mathematically oriented people, this TPS Algebra is simply a ring ( 環 ). ► ► The concept of Differential Algebra does not enter in TPSA. It is of no relevance at this stage.

15 ► Perturbation theory will be discussed from a very geometrical point of view: invariants, Twiss functions and nonlinear distortions. ► The geometrical picture will be translated into an operation derived from the Taylor map. ► My own FPP library will used. In these lectures I will emphasize the “ canned library ” aspect of FPP. We will not go into the mathematical details but just assume that the library does what it advertises. ► We will see that FPP manipulates Vector Fields associated to the Taylor map. These Vector Fields form a differential Lie algebra. But that is not too important: focus on the geometrical aspect please. ► Lecture number 2 will start with some very traditional computations and will end with an introduction to the Geometrical Point of View. ► 注意 Other mathematical objects in Berz ’ s lectures, such as Levi- Civita fields ( 体 ), non Archimedean fields, are interesting (but so is ancient Greek and classical Chinese), but really of virtually no relevance to our work. Do not get distracted. Future Lectures

16 Problem The function ArcSin(x) or asin(x) cannot be easily separated into a constant part and a nilpotent part. Can you find an algorithm to evaluate asin(x) when x is a polynomial? Program this algorithm using the Toy TPSA routines. Your algorithm should not be explicitly limited to cubic polynomials.


Download ppt "Computation of Taylor Maps and Applications to Accelerator Physics Six lectures with emphasis on examples and their computer implementations Etienne Forest."

Similar presentations


Ads by Google