ORBIT: A Code for Collective Beam Dynamics in High-Intensity Rings J.A. Holmes*, V. Danilov*, J. Galambos*, A. Shishlo*, S. Cousineau®, W. Chou*, L. Michelottf, J.-R Ostiguy*, J. Wei& *Oak Ridge National Laboratory, Oak Ridge, TN 37831, USA @ Indiana University, Bloomington, IN 47405, USA # Fermi National Accelerator Laboratory, Batavia, IL 60510, USA & Brookhaven National Laboratory, Upton, NY, 11973, USA Abstract. We are developing a computer code, ORBIT, specifically for beam dynamics calculations in highintensity rings. Our approach allows detailed simulation of realistic accelerator problems. ORBIT is a particle-incell tracking code that transports bunches of interacting particles through a series of nodes representing elements, effects, or diagnostics that occur in the accelerator lattice. At present, ORBIT contains detailed models for strip-foil injection, including painting and foil scattering; rf focusing and acceleration; transport through various magnetic elements; longitudinal and transverse impedances; longitudinal, transverse, and three-dimensional space charge forces; collimation and limiting apertures; and the calculation of many useful diagnostic quantities. ORBIT is an object-oriented code, written in C++ and utilizing a scripting interface for the convenience of the user. Ongoing improvements include the addition of a library of accelerator maps, BEAMLINE/MXYZPTLK; the introduction of a treatment of magnet errors and fringe fields; the conversion of the scripting interface to the standard scripting language, Python; and the parallelization of the computations using MPI. The ORBIT code is an open source, powerful, and convenient tool for studying beam dynamics in high-intensity rings. INTRODUCTION High-intensity proton ring beams are characterized by low energy, high intensity, and low loss requirements. Satisfying the beam-loss requirements necessitates a detailed understanding of beam dynamics in this regime. At high intensity, collective effects due to space charge and wakefields strongly affect the beam behavior, and single particle models do not suffice. Also, because of the complexity of collective phenomena for bunched beams in high-intensity rings, a computational approach is productive for theoretical studies and indispensable in solving detailed design and engineering problems. Recognizing this, the SNS Accelerator Physics Group at ORNL, with help from colleagues at BNL, undertook the development of an object-oriented general-purpose code, ORBIT [1,2]. ORBIT began as a C++ rewrite of ACCSIM [3], developed under the SuperCode driver shell [4], but has since undergone extensive independent development, which will be described here. ORBIT is a particle tracking code in 6D phase space. Its basic classes are herds, which are groups of particles, and nodes, which operate on the herds. ORBIT has been designed to simulate real machines: it has detailed models for transport through various lattice elements; injection foil and painting; rf and acceleration; 2.5D and 3D space charge; longitudinal impedance and space charge; transverse impedance; apertures: collimation; and beam diagnostics. Present work on ORBIT focuses on the exploitation of some of the more recent and computationally demanding physics modules and on the enhancement of overall capabilities. With the completion of the transverse impedance, 3D space charge, and collimation routines, the physics for new classes of problems is available. However, meaningful calculations will require high performance computing techniques, such as the implementation of parallel computing. Also, because ORBIT has developed with an emphasis on collective effects, single particle transport models are still rudimentary. In order to assess losses to the accuracy demanded in recent and future high intensity rings, high order maps and a comprehensive treatment of magnet errors are necessary. Finally, although SuperCode is an innovative tool, it is neither standard nor supported. Comparable tools, based on the Python programming language, now are standard and present an attractive option. Consequently, we are now developing parallel algorithms for collective beam dynamics, including higher order single particle maps, creating magnet error routines, and planning to implement a new driver shell based on Python. We now describe the models in ORBIT. COMPLETED ORBIT MODELS The coordinate representation in ORBIT utilizes the usual accelerator expansion. The horizontal direction is CP642, High Intensity and High Brightness Hadron Beams: 20th ICFA Advanced Beam Dynamics Workshop on High Intensity and High Brightness Hadron Beams, edited by W. Chou, Y. Mori, D. Neuffer, and J.-F. Ostiguy 2002 American Institute of Physics 0-7354-0097-0 241 representedby by x,x , xx′, , the the vertical vertical direction direction by by yy ,, /, y′ , represented φ , and and andlongitudinal longitudinalphase phasespace spaceby bythe thephase phase angle angle (/>, and energy deviation, deviation, dE from aa specified specified closed closed orbit orbit dE, , from energy reference particle. particle. The The independent independent variable variable isis the the reference machinelocation locations. s. machine ORBITcan canconstruct construct lattices lattices by by reading reading output output files files ORBIT fromMAD MAD[5] [5]ororDIM DIMAD [6],by bydirect direct specification, specification, or or from AD [6], specifying aa uniform uniform focusing focusing channel. channel. Linear Linear byby specifying transport isis carried carried out out through through symplectic symplectic matrix matrix transport multiplication. Nonlinear elements can be evaluated in multiplication. Nonlinear elements can be evaluated in the thin lens approximation, and higher order single the thin lens approximation, and higher order single particle transport transport terms, terms, such such as as chromaticity, chromaticity, can can be be particle evaluatedusing usingsecond secondorder ordertransport transportmatrices. matrices. There There is is evaluated specificfacility facilityfor for the thetreatment treatment ofof errors errors or or fringe fringe nonospecific fields. Field Field errors errors inin straight straight lattice lattice elements elements can can be be fields. calculated in MAD and included in the MAD output. calculated in MAD and included in the MAD output. ORBIT can can inject inject particles particles turn-by-turn turn-by-turn or or utilize utilize aa ORBIT completedistribution distribution specified specified atat the the start. start. AA variety variety of of complete distributions can be generated internally. Any externally distributions can be generated internally. Any externally generateddistribution distributioncan canbe beimported. imported. Injection Injection painting painting generated treatedwith with user-defined user-defined time-dependent time-dependent closed closed orbit orbit isistreated bumps. ORBIT ORBIT contains contains an an injection injection foil foil model model that that bumps. keepstrack trackofoffoil foilhits hitsand andapplies appliestransverse transverse kicks kicks based based keeps multipleCoulomb Coulomb scattering. scattering. Particles Particles that that miss miss the the ononmultiple foil at injection are removed from the beam. foil at injection are removed from the beam. The RF RF cavity cavity model model provides provides longitudinal longitudinal kicks kicks The based on on aa specified specified time-dependent time-dependent waveform waveform with with based multiple harmonics. For nonaccelerating cases, the multiple harmonics. For nonaccelerating cases, the synchronousphase phaseisis assumed assumed toto be be zero, zero, and and only only the the synchronous harmonics and and time-dependent time-dependent voltages voltages need need to to be be harmonics specified. For Foraccelerating acceleratingcases, cases,the theharmonics, harmonics, voltages, voltages, specified. andtime-dependent time-dependentdipole dipolefields fieldsmust must be be specified. specified. The The and modeluses usesthis thisinformation informationtotocalculate calculate the the synchronous synchronous model phaseand andthe theresulting resultingkicks. kicks. The Thetransverse transversephase phase space space phase alsoadjusted adjustedtotoconserve conservenormalized normalizedemittance. emittance. isisalso The 2.5D 2.5D space space charge charge model model isis implemented implemented as as aa The seriesofofkicks kicks separated separated by by other other transport transport operations. operations. series Particles are are binned binned inin aa 2D 2D rectangular rectangular grid grid using using aa Particles secondorder orderdistribution distribution scheme. scheme. The The potential potential for for the the second distributedcharges chargesisisthen then solved solved on on the the transverse transverse grid grid distributed using aa fast fast FFT FFT solver. solver. Conducting Conducting wall wall (circular, (circular, using elliptical,ororrectangular rectangular beam beam pipe) pipe) boundary boundary conditions conditions elliptical, arethen thenimposed imposedusing using aa method method described described in in Ref. Ref. [7]. [7]. are Particle kicks kicks are are obtained obtained from from second second order order Particle interpolationofofthe thepotential, potential, completing completing what what might might be be interpolation calledaa"quasi-symplectic" “quasi-symplectic”evaluation. evaluation. Finally, Finally, the the kicks kicks called areweighted weightedby bythe thelocal locallongitudinal longitudinal density densityto to account account are forbunch bunchfactor factoreffects. effects. This This isis the the reason reason we we call call the the for model 2.5D. 2.5D. There There isis also also an an alternative alternative direct direct force force model (momentum-conserving) solver solver without without beam beam pipe pipe that that (momentum-conserving) usesaamethod methoddescribed describedininRef. Ref. [8]. [8]. uses Figure 1. 1. 3D 3D space Figure space charge charge benchmark benchmark for for triangular triangular charge distribution: distribution: a) charge a) tune tune shifts shifts vs. vs. position, position, b) b) longitudinal force force vs. vs. position. position. 2.5D longitudinal 2.5D and and 3D 3D results results agree agree with each each other other and and with with with analytic analytic calculations. calculations._______ The 3D 3D spacecharge spacecharge model model is The is aa simple simple generalization generalization of the 2.5D routine. Particles are of the 2.5D routine. Particles are distributed distributed to to aa 3D 3D rectangular grid using a second order scheme. Typically, rectangular grid using a second order scheme. Typically, for rings, rings, the longitudinal spacing greatly exceeds for exceeds the the transverse spacing. The potential is solved transverse solved as as aa 2D 2D problem using the distributed charges and problem and fast fast Fourier Fourier transforms on the transverse grid for transforms for each longitudinal longitudinal slice. Conducting wall boundary conditions slice. conditions (circular, (circular, elliptical, or rectangular beam pipe) elliptical, pipe) are are used used to to “tie "tie together” the transverse solutions into aa 3D together" 3D potential. potential. Particle kicks are obtained by interpolating the Particle the potentials potentials in 3D using a second order in order “quasi-symplectic” "quasi-symplectic" interpolation scheme. interpolation ORBIT treats longitudinal impedances impedances and/or and/or space space charge in a fashion similar to ESME [9]. charge [9]. The The longitudinal longitudinal impedance is represented as harmonics of impedance of the the fundamental fundamental ring frequency. Particles are binned longitudinally ring frequency. longitudinally and and the binned binned distribution is Fourier transformed. The the The space space charge contribution to the impedance is combined charge combined with with the external external impedance. The Fourier the Fourier transformed transformed distribution is multiplied by the impedance distribution impedance to to give give the the longitudinal kicks to the particles. For longitudinal For many many rings, rings, the the synchrotron period is much longer than than aa turn, turn, and and itit isis sufficient to evaluate the longitudinal impedance sufficient impedance and and space charge kicks once each turn. turn. More More frequent frequent evaluations may be required for evaluations for rings having having higher higher synchrotron frequencies. Transverse impedances are also treated Transverse treated as as localized localized nodes in ORBIT. The validity of this approach nodes approach requires requires the element element length to be short compared to the to the the betatron betatron oscillation wavelength. Otherwise, multiple oscillation multiple impedance impedance nodes are required. As with the longitudinal nodes longitudinal impedance, impedance, the transverse transverse impedance is represented by the by its its Fourier Fourier components, but now the appropriate frequencies are components, are the the betatron sidebands of the ring frequency harmonics. betatron harmonics. For For both impedance models, the formulation incorporates both incorporates velocities below the speed of light. Particle velocities Particle kicks kicks are are obtained by convolution of the beam current obtained current dipole dipole moment with the impedance. In evaluating moment evaluating the the beam beam current moment evolves evolves from from current it is assumed that the dipole moment the betatron oscillation. oscillation. the previous previous turn through a simple betatron 242 1-3 emittances at any point/node in the ring; histograms of emittances atat any the ring; histograms ofof emittances any point/node point/node theand ring; histograms particle distributions in x, y, inin phi, emittance; rms particle distributions in x, y, phi, and emittance; rms particle distributions in x, y, phi, and emittance; rms emittances or beam moments versus turn or versus emittances oror beam moments versus emittancesstatistical beam momentsof versus turn oror versus versus position; calculation beta turn functions; and position; calculation ofofcentroid. beta position; statistical statistical calculation beta functions; functions; and longitudinal harmonics of the beam Becauseand of longitudinal harmonics Because ofof longitudinal harmonicsof ofthe thebeam beamcentroid. centroid. Because the recent development of 3D models in ORBIT, we are the development ofof3D models ininORBIT, we the recent recent our development modelsmore ORBIT, weare extending diagnostics to3Dinclude functions ofare extending our diagnostics to include more functions ofof extending our diagnostics to include more functions longitudinal position. longitudinal longitudinalposition. position. ' m ONGOING DEVELOPMENTS ONGOING ONGOINGDEVELOPMENTS DEVELOPMENTS 1:1 Figure 2. Phase space coordinates for benchmark of Figure 2. impedance Phase space for calculation benchmark of Figure 2. Phase coordinates benchmarkfor of transverse model with analytic transverse impedance model with analytic calculation transverse impedance calculation for for pencil beam. pencil beam.__________________________ beam. pencil Circular, elliptical, rectangular, or racetrack apertures Circular, elliptical, or can racetrack racetrack apertures areCircular, defined inelliptical, ORBIT. rectangular, The apertures be set apertures either to are defined in ORBIT. can be tabulate set to are defined in apertures set either eitherthe to allow particles to pass The through and simply allow particles andthesimply tabulate the allow to the pass through tabulate the hits, orparticles to remove particles from beam and tabulate hits, or to tolocations. remove the particles from the beam and hits, or remove and tabulate tabulate the loss the loss loss locations. locations. the ORBIT contains a detailed collimation model. ORBIT shapes contains collimation model. ORBIT contains a detailed collimation model. Collimator include the aperture shapes, single or Collimator shapes include the aperture shapes, single Collimator single or or multiple edges at arbitrary angles, and also a rectangular multiple edges at that and beam also aawindows rectangular multiple edges arbitrary rectangular plate collimator can beangles, used for or plate collimator used for beam windows or plate can be windows or foils. collimator Physics that includes multiple Coulomb scattering, foils. Physics Coulomb foils. Physics includes multiple elastic Coulomb scattering, ionization energy loss, nuclear andscattering, inelastic ionization energy elastic inelastic ionization loss, nuclear inelastic scattering, energy and Rutherford scattering for and aand number of scattering, and Rutherford scattering a for number of scattering, Rutherford for number of materials. and Monte Carlo algorithms arefor used particle materials. Monte are used for particle materials. Monte Carlo algorithms for particle transport inside the collimator, and step sizes are carefully transport inside the collimator, and step sizes are carefully transport inside the carefully adjusted near collimator boundaries. adjusted near near collimator collimator boundaries. adjusted The present emphasis in ORBIT development is on The development isisonon The present presentofemphasis emphasis inORBIT ORBIT development improvement both in physics and computational improvement both improvementIn of of physics both physics physics and andarecomputational computational capabilities. the category, we significantly capabilities. InInthe physics category, we capabilities.the the physics category, weare aresignificantly significantly extending single particle transport model by extending transport extending the the single single particle transport model model byby interfacing ORBIT and particle the BEAMLINE/MXYZPTLK interfacing ORBIT interfacing ORBIT and the the BEAMLINE/MXYZPTLK BEAMLINE/MXYZPTLK library for maps and and tracking [10]. In addition, we are library for maps and tracking [10]. InInaddition, we library for maps and tracking [10]. addition, weare are including a comprehensive set of magnet error routines including comprehensive ofofmagnet error routines including comprehensive set magnet error routines and a hardaa edge fringe fieldset model. At this time, the and edge AtAtthis time, the and aa hard hard edge fringe fringe field field model. model.interface thishas time, the ORBIT - BEAMLINE/MXYZPTLK been ORBIT -- BEAMLINE/MXYZPTLK ORBITcompleted BEAMLINE/MXYZPTLK interfacehas hasbeen been partly with some options interface working, and the partly completed with some options partlywill completed with some optionsworking, working,and andthe the errors be included this summer. errors errorswill willbe beincluded includedthis thissummer. summer. The most urgent computational improvement to The computational improvement toto The most urgent computational improvement ORBIT ismost theurgent introduction of parallel processing ORBIT is the introduction of parallel processing ORBIT is the introduction of parallel processing algorithms. We are doing this using the MPI libraries, and algorithms. We are MPI libraries, and algorithms. We aredoing doingthis thisusing the MPI libraries, and at present the parallelization ofusing thethe 2.5D space charge atat present parallelization ofofthe space present the parallelization the 2.5D 2.5D spacecharge routines hasthe been carried out and parallel versions ofcharge the routines been out and parallel versions the routines has been carried carried out and parallel versionsofof the 3D spacehas charge routines are being developed. We 3D charge are developed. 3D space space near-term charge routines routines are being being developed. We anticipate completion of this work, to We be anticipate ofof this work, toto bebe anticipatebynear-term near-term completion this work, followed creation ofcompletion parallel versions of the diagnostic followed by creation of parallel versions of the diagnostic followed by creation of parallel versions of the diagnostic routines. routines. routines. In the slightly longer term, we plan to convert the In longer term, we In the the slightly longer term,shell weplan plantoSuperCode toconvert convertthe ORBIT userslightly interface and driver from tothe ORBIT and SuperCode toto ORBITuser user interface andofdriver driver shellfrom from SuperCode Python. Theinterface feasibility and shell methods for doing this Python. feasibility doing this Python. The feasibility of and and methods methods forbe doing this have beenThe examined, but of the work remainsfor to carried have have been been examined, examined,but butthe thework workremains remainstotobebecarried carried out. out. out. OPEN CODE OPEN OPENCODE CODE Finally, we emphasize that ORBIT is an open code. that isisananopen Finally, we emphasize emphasize thatORBIT ORBIT opencode. code. TheFinally, source we code can be obtained by downloading from The The source source code code can can be be obtained obtainedby bydownloading downloadingfrom from http://www.sns.gov//APGroup/Codes/Codes.htm and http://www.sns.gov//APGroup/Codes/Codes.htm and http://www. sns.a gov//APGroup/Codes/Codes .htmbuilding and there are also user manual, instructions for there also aa user there are are also useratmanual, manual, instructionsfor forbuilding building ORBIT, and examples that webinstructions site. ORBIT, ORBIT,and andexamples examplesatatthat thatweb website. site. ACKNOWLEDGMENTS ACKNOWLEDGMENTS ACKNOWLEDGMENTS We wish to thank our colleagues J. Beebe-Wang, M. We Beebe-Wang, We wish wish to tothank thankour our colleagues Beebe-Wang, Blaskiewicz, F. Jones, A. colleagues Luccio, N.J.J.Malitsky, and M. F.M. \ :-4D -3S *20 -1S 8 10 20 30 4i3 M 8Q Blaskiewicz, F.F.their Jones, A. N.N.Malitsky, and F.F. Blaskiewicz,for Jones, A. Luccio, Luccio, Malitsky, and MacLachlan advice and collaboration during the Emlttance (pi rom-wad) MacLachlan their MacLachlan for theiradvice adviceand andcollaboration collaborationduring duringthe the development offorORBIT. development of ORBIT. development of ORBIT. Figure SNS collimation collimation study: study: a)a) Figure 3. 3. Results from SNS SNS is managed by UT-Battelle, LLC, under contract particle scrapers, b) effects effects of Figure Resultsonfrom collimation study: of a) particle 3.impacts impacts beamSNS scrapers, b) SNS LLC, under SNSisismanaged managedby byUT-Battelle, UT-Battelle, LLC, undercontract contract DE-AC05-00OR22725 for the U.S. Department of collimation on emittance distribution. particle impacts on beam scrapers, b) effects of collimation distribution. DE-AC05-00OR22725 for Department ofof DE-AC05-OOOR22725 for the U.S. Department Energy. SNS is a partnership ofthe sixU.S. national laboratories: collimation on emittance distribution. Energy. ofofsix laboratories: Energy. SNS SNSisisaapartnership partnership sixnational national laboratories: Argonne, Brookhaven, Jefferson, Lawrence Berkeley, Los A list of useful diagnostics in ORBIT includes the Alamos, Oak Ridge.Jefferson, Argonne, Brookhaven, Argonne,and Brookhaven, Jefferson,Lawrence LawrenceBerkeley, Berkeley,Los Los A list ofdumps useful of diagnostics ORBIT includes following: particle incoordinates, tunes,theor Alamos, and Oak Ridge. Alamos, and Oak Ridge. A list ofdumps useful of diagnostics ORBIT includes following: particle in coordinates, tunes, the or following: dumps of particle coordinates, tunes, or 243 REFERENCES 1. J. Galambos, J. Holmes, D. Olsen, A. Luccio, and J. Beebe-Wang, ORBIT Users Manual, http://www.sns.gOv//APGroup/Codes/Codes.htm 2. J. Galambos, S. Danilov, D. Jeon, J. Holmes, D. Olsen, J. Beebe-Wang, and A. Luccio, in Proceedings of the 1999 Particle Accelerator Conference, (New York, 1999)3143. 3. F. Jones, Users' Guide to ACCSIM, TRIUMF Design Note, TRI-DN-90-17 (1990), http://www.triumf.ca/compserv/accsim.html 4. S. W. Haney, Using and Programming the SuperCode, http://www.sns.gov/APGroup/Codes/Codes.htm 5. H. Grote and F. Christoph Iselin, The Mad Program, Version 8.19, User's Reference Manual, CERN/SL/90-13, (Geneva, 1996). 244 6. See ftp://csftp.triumf.ca/pub/CompServ/dimad/ 7. F. W. Jones, in Proceedings of the 2000 European Particle Accelerator Conference, (Vienna, 2000) 1381. 8. R. W. Hockney and J. W. Eastwood, Computer Simulation Using Particles, Institute of Physics Publishing (Bristol: 1988). 9. J. A. MacLachlan, Longitudinal Phase Space Tracking with Space Charge and Wall Coupling Impedance, Fermi National Accelerator Laboratory, FN-446, (1987). 10.L. Michelotti, MXYZPTLK and BEAMLINE: C++ Objects for Beam Physics, AIP Conf. Proc. No. 255 (Proc. Advanced Beam Dynamics Workshop on Effects of Errors in Accelerators, Their Diagnosis and Correction, Corpus Christi, Texas, 1992).
© Copyright 2025 Paperzz