J-PARC Trace3D Upgrades Christopher K. Allen Los Alamos National Laboratory.

Slides:



Advertisements
Similar presentations
CS 450: COMPUTER GRAPHICS DRAWING ELLIPSES AND OTHER CURVES SPRING 2015 DR. MICHAEL J. REALE.
Advertisements

Lect.3 Modeling in The Time Domain Basil Hamed
IIAA GPMAD A beam dynamics code using Graphics Processing Units GPMAD (GPU Processed Methodical Accelerator Design) utilises Graphics Processing Units.
5/3/2015J-PARC1 Transverse Matching Using Transverse Profiles and Longitudinal Beam arrival Times.
Professor Walter W. Olson Department of Mechanical, Industrial and Manufacturing Engineering University of Toledo Lumped Parameter Systems.
SYSTEM ANALYSIS & DESIGN (DCT 2013)
Evan Walsh Mentors: Ivan Bazarov and David Sagan August 13, 2010.
© Janice Regan, CMPT 102, Sept CMPT 102 Introduction to Scientific Computer Programming The software development method algorithms.
Isoparametric Elements Element Stiffness Matrices
Similarity transformations  Suppose that we are given a ss model as in (1).  Now define state vector v(t) that is the same order of x(t), such that the.
Tutorial 12 Unconstrained optimization Conjugate gradients.
FALL 2004CENG 3511 Hashing Reference: Chapters: 11,12.
COMP322/S2000/L221 Relationship between part, camera, and robot (cont’d) the inverse perspective transformation which is dependent on the focal length.
Language Issues Misunderstimated? Sublimable? Hopefuller? "I know how hard it is for you to put food on your family.” "I know the human being and fish.
Properties of Logarithms
1 Chapter-01 Introduction to Computers and C++ Programming.
Ch 8.1 Numerical Methods: The Euler or Tangent Line Method
JCE A Java-based Commissioning Environment tool Hiroyuki Sako, JAEA Hiroshi Ikeda, Visible Information Center Inc. SAD Workshop.
Exercise problems for students taking the Programming Parallel Computers course. Janusz Kowalik Piotr Arlukowicz Tadeusz Puzniakowski Informatics Institute.
Introduction to Adaptive Digital Filters Algorithms
Algorithms for a large sparse nonlinear eigenvalue problem Yusaku Yamamoto Dept. of Computational Science & Engineering Nagoya University.
Simulation of direct space charge in Booster by using MAD program Y.Alexahin, N.Kazarinov.
1 Bunched-Beam RMS Envelope Simulation with Space Charge Christopher K. Allen Los Alamos National Laboratory.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Chapter 2.
CHRISTOPHER K. ALLEN, ORNL HIROYUKI SAKO, JAEA MASANORI IKEGAMI, KEK GUOBAO SHEN, JAEA HIROSHI IKEDA, VIC TOMOHIRO OHKAWA, JAEA AKIRA UENO, JAEA XAL Online.
Progress in identification of damping: Energy-based method with incomplete and noisy data Marco Prandina University of Liverpool.
Preparation for Calculus 1 Copyright © Cengage Learning. All rights reserved.
September Bound Computation for Adaptive Systems V&V Giampiero Campa September 2008 West Virginia University.
Linear algebra: matrix Eigen-value Problems Eng. Hassan S. Migdadi Part 1.
Summary of my work in September and my plan What I have done and my status –Finished programming and fixed some bugs of the preliminary version of the.
1 Complex Images k’k’ k”k” k0k0 -k0-k0 branch cut   k 0 pole C1C1 C0C0 from the Sommerfeld identity, the complex exponentials must be a function.
Colorado Center for Astrodynamics Research The University of Colorado 1 STATISTICAL ORBIT DETERMINATION ASEN 5070 LECTURE 11 9/16,18/09.
Exponential and Logarithmic Functions
The Software Development Process
1 EEE 431 Computational Methods in Electrodynamics Lecture 17 By Dr. Rasime Uyguroglu
Second Order Analysis In the previous classes we looked at a method that determines the load corresponding to a state of bifurcation equilibrium of a perfect.
1 Bunched-Beam Envelope Simulation with Space Charge within the SAD Environment Christopher K. Allen Los Alamos National Laboratory.
Comparison between simulations and measurements in the LHC with heavy ions T. Mertens, R. Bruce, J.M. Jowett, H. Damerau,F. Roncarolo.
13-1 Sequential File Processing Chapter Chapter Contents Overview of Sequential File Processing Sequential File Updating - Creating a New Master.
13- 1 Chapter 13.  Overview of Sequential File Processing  Sequential File Updating - Creating a New Master File  Validity Checking in Update Procedures.
1 P. Chu 1 Adapting XAL for LCLS EPICS Meeting, Vancouver Adapting XAL for LCLS Paul Chu - SLAC May 1, 2009.
Kazuro Furukawa, KEK, Sep Envelope Simulation with Space-charge SAD Workshop Beam Envelope Simulation with Space Charge in SAD Kazuro Furukawa.
Ch 8.2: Improvements on the Euler Method Consider the initial value problem y' = f (t, y), y(t 0 ) = y 0, with solution  (t). For many problems, Euler’s.
Lesson 3.4 Properties of Logarithms
By Verena Kain CERN BE-OP. In the next three lectures we will have a look at the different components of a synchrotron. Today: Controlling particle trajectories.
2/20/2016J-PARC1 Virtual Accelerator An Accelerator Simulator.
Lecture 4 - E. Wilson - 23 Oct 2014 –- Slide 1 Lecture 4 - Transverse Optics II ACCELERATOR PHYSICS MT 2014 E. J. N. Wilson.
Mark Rayner – Analysis SessionCM25, 4 November Beam characterization by the TOFs Mark Rayner The University of Oxford MICE CM25.
Nonlinear balanced model residualization via neural networks Juergen Hahn.
Lecture 4 - E. Wilson –- Slide 1 Lecture 4 - Transverse Optics II ACCELERATOR PHYSICS MT 2009 E. J. N. Wilson.
If A and B are both m × n matrices then the sum of A and B, denoted A + B, is a matrix obtained by adding corresponding elements of A and B. add these.
How to calculate a single cycle
Transfer Functions Convenient representation of a linear, dynamic model. A transfer function (TF) relates one input and one output: The following terminology.
Lecture 4 - Transverse Optics II
5 Exponential and Logarithmic Functions
Streaming & sampling.
THE METHOD OF LINES ANALYSIS OF ASYMMETRIC OPTICAL WAVEGUIDES Ary Syahriar.
Objective of This Course
Apply Properties of logarithms Lesson 4.5
CSE373: Data Structures & Algorithms Lecture 5: AVL Trees
Chapter 1 Introduction(1.1)
Lecture 4 - Transverse Optics II
Copyright © Cengage Learning. All rights reserved.
Applications of Integration
Lecture 4 - Transverse Optics II
Numerical Analysis Lecture 2.
Simulation of electron bunch trajectories through a Booster Cavity
Specialist Mathematics
Chapter 1 / Error in Numerical Method
Presentation transcript:

J-PARC Trace3D Upgrades Christopher K. Allen Los Alamos National Laboratory

Trace3D “Project”  Split the big FORTRAN file Each SUBROUTINE has file Project built using a Makefile (K. Furukawa) Version controlled (K. Furukawa)  Repository jkksv01.j-parc.jp:/jk/master/t3d_cka  Can reassemble back into the big FORTRAN file if desired

General Additions  Debugging and Data I/O Added output subroutines for debugging and recording Twiss parameters along beamline InputDump – stores input “deck” to disk (file “InputData.txt”) to check that data is being properly input TwissDump – stores Twiss parameters along beamline to disk file “TwissDump.txt”. Twiss parameters are stored during simulation since trajectory data is not kept in Trace3D memory.  Convenience Matrix Functions Multiply, scalar multiply, commutator Matrix exponent Matrix logarithm (E. Forest)

General Additions (cont.)  Steering Magnets Added steering magnets to the element library. Note that only the centroid tracking is affected by this element, it has no effect on the second- order moment dynamics. The type identifier is 19 (NT=19). The parameters is  x’,  y’

General Additions (cont.)  Arbitrarily Oriented Beam Ellipsoids To compute the electric self forces of the beam Trace3D performs a coordinate transform to “eigen-coordinates” of ellipsoid In the current version this transform fails when the beam is skewed arbitrarily off the design axis  That is, skewed in a direction other that one of the two transverse directions. This condition was fixed.

Choice of Elliptic Integral R D or Form Factor   For the space charge calculations you may switch between the use of the form factor and direct (numerical) evaluation of the elliptic integral. This feature is available using the input variable iFlgUseRd in the $DATA section of the Trace3D input file iFlgUseRd = 0: use form factor  (default) iFlgUseRd = 1: use elliptic integral R D

12345 s (s)(s) Form Factor vs. Elliptic Integral  Original Trace3D uses a “form factor”  in the self field calculations. The function  (s) is part of an analytic approximation to an elliptic integral R D, which is defined The form factor is defined

Form Factor vs. Elliptic Integral (cont.) The approximations for R D in terms of the form factor are then given as Where X, Y, and Z are the semi-axes of the beam ellipsoid and  = (X-Y)/2 is related to the eccentricity of the transverse ellipse

Comparison of Trace3D elliptic integral and form factor simulations SNS Version of Trace3D (form fac)

Adaptive Integration Stepping Approach Form a transfer matrix  (s;s 0 ) that includes space effects to second order (2 nd order accurate) Choose error tolerance  in the solution (~ to ) Use  (s;s 0 ) to propagate  in steps h whose length is determined adaptively to maintain 

Adaptive Stepping and Trace3D  Due to Trace3D “architecture” implementing adaptive stepping may require a major rewrite Brittle – dangerous  Implementation possible if it can be done in SUBROUTINE TRANS Compute log(  ) =  sA Compute exp(hA) May be too CPU intensive

XAL Architecture  XAL Architecture is modern Not coupled Easier to upgrade Easier to maintain  XAL Appl. Devel Hard part is setting up DB API is object oriented and documented (easy) New features are (relatively) easily installed

XAL Architecture – Sequence Diagram

Summary  Adding adaptive stepping to Trace3D may not be worth the effort Ability to implement it in TRANS Compute matrix logarithms and exponentials  Add space charge to SAD? Unknown effort – inexperienced with SAD  Add J-PARC features to XAL? Is XAL a player? Very familiar with XAL

4. Space Charge Algorithm (cont.) Assume that A and B are constant Then full transfer matrix  (s;s 0 ) = e (s-s 0 )(A+B)  For practical reasons, we are usually given  A and  B Beam optics provides  A (s) In ellipsoid coordinates  B (s) has simply form because B 2 = 0  B (s) = e sB = I + sB Define  ave (s) = ½[  A (s)  B (s) +  B (s)  A (s) ] By Taylor expanding  (s) = e s(A+B) we find  (s) =  ave (s) + O(s 3 ) That is,  ave (s) is a second-order accurate approximation of  (s)

4. Space Charge Algorithm (cont.)  We now have a stepping procedure which is second-order accurate in step length h.  Now consider the effects of “step doubling” Let  1 (s+2h) denote the result of taking one step of length 2h Let  2 (s+2h) denote the result of taking twos steps of length h  (h)   1 (s+2h) -  2 (s+2h) = 6ch 3 where the constant c = d  (s’)/ds for some s’  [s,s+2h]  Consider ratio of |  | for steps of differing lengths h 0 and h 1 h 1 = h 0 [|  1 |/ |  0 |] 1/3

4. Space Charge Algorithm (cont.) We use the formula h 1 = h 0 [|  1 |/ |  0 |] 1/3 as the basis for adaptive step sizing Given |  1 | = , a prescribed solution residual error we can tolerate For each iteration k Let |  0 | = |  1 (s k +2h) -  2 (s k +2h) |, the residual error Let h 0 = h k be the step size at iteration k Let h 1 = h k+1 be the step size at iteration k+1 h k+1 = h k [  /|  1 (s k +2h) -  2 (s k +2h) |] 1/3 where if h k+1 < h k, we must re-compute the k th step using the new steps size h k+1 to maintain the same solution accuracy