# Presentation: 120677

## Overview of the IMPACT Parallel Beam Dynamics Code

- Ji Qiang and Robert Ryne
- SNS Mini-Workshop
- Oak Ridge, TN
- June 25-26, 2001

## Overview of IMPACT(Integrated Map and Particle Accelerator Tracking)

- Started as
- 3D parallel PIC code
- Split-operator based  with H = Hexternal +Hspace charge
- 3D space charge w/ 2 types of boundary conditions
- Linear maps for drifts, quads, rf gaps
- Maps computed “on the fly” by numerically integrating the equations for the linear transfer map
- based on well-established methods for computing maps
- generalization to high order straightforward
- transformations are symplectic by construction
- No need for Prome-like corrections for rf gap transformations
- Reference trajectory equations also computed “on the fly”

## Split-Operator Approach

## Philosopy

- Do not take tiny steps to push ~millions of particles
- Do take tiny steps to compute maps, then push particles with maps

## 2 Examples

- Early SNS room temperature linac design
- detailed simulation used superfish data from over 400 cavities
- very high resolution – up to 500 million particles
- Early CERN/SPL design
- particle arrival time with respect to SC cavity fields (“synchronous phase”) printed at maxima of accelerating gradient

## Design Energy  and Accelerating Gradient vs. Distance

**Design Energy  and Accelerating Gradient vs. Distance**

## “Synchronous” phase vs. distance

## Overview of IMPACT (continued)

- Features added in last 3 years
- 6 types of boundary conditions
- Field gradient errors, misalignment errors, rotation errors
- More flexibility in rf gap treatment (DTL, CCDTL, CCL, SC, overlapping fields)
- Nonlinear Lorentz force integrator
- Dipoles
- Dynamic load balance, restart function, many new diagnostics

## Auxiliary Programs

- 3D envelope code for matching, finding eigenmodes
- “theta” code: design code (sets cavity phases)
- Various modified versions of Marylie
- 3D space charge, rf gap, acceleration
- 3d envelope code

## Matching Across Different Section of SC Linac

## RMS matching: what can go wrong

## Successful 7 parameter match

## Inputs of IMPACT Code

- Global Numerical Parameters
- Initial Distribution Parameters:
- 6D Gaussian, 6D Waterbag, SemiGaussian, 3D KV,
-       6D Uniform, Read-In
- Global Beam Parameters
- External Beam Line Elements Parameters:
- Geometry parameters and numerical steps
- Field information: Er, Ez, Htheta on grid;
-       Discrete Ez on the axis, Fourier coefficients
-       of Ez on the axis
- Diagnostic Flags

## Outputs of IMPACT Code

- Position Dependent Quantities:
- Kinetic Energy, Maximum Radius, Particle Losses
- 1st, 2nd, 3rd, 4th moments of X, Px, Y, Py, Phase, and
-       Energy deviation
- Alpha and Normalized RMS Emittances
- 90%, 95% and 99% Radius and Emittances
- Snap Shots:
- 6D phase space particle output
- 3D charge density grid output
- X-Px, X-Y, X-Z, Y-Py, Z-Pz, Y-Z projections
- X, Y, R accumulated density profiles

## AccSimulator

- Communication

- Array

- Computation
- Domain

- AccDriver

- Field

- Lattice

- Beam

- Numeric Function

- Utility

- STL

- Constants

- InOut

- Object-Oriented Multi-Layer Framework for Accelerator Simulation

##                  Control Layer

- AccSimulator
- Module

- AccDriver
- Module

- InOut
- Module

- Inputor Class

- Outputor Class

- Driver Classes

- Simulator Classes

##                  Application Layer

- Computation
- DomainModule

- Field
- Module

- Lattice
- Module

- Beam
- Module

- Beam Line Element Classes

- Particle Bunch
-  Class

- Depositor
- Class

- Scalar and Vector Fields Classes

- Computation Domain Geometry
- Classes

- ......

##                  Function Layer

- Communication
- Module

- Numeric Function
- Module

- Utility
- Module

- Particle Manager
-  Class

- FFT
- Class

- Auxiliary Function Classes

- Field Manager
-  Class

- Matrix Operator
- Class

- ......

- ......

##                  Data Structure Layer

- Array
- Module

- STL
- Module

- Constants
- Module

- Array Classes

- Standard Template Library

- Numerical and Physical Constants
- Classes

## Two-Dimensional Domain Decomposition

- Y

- Z

- Guard Grid

- Boundary Grid

- Physical Boundary

- Z

- Y

## Two Particle Motion In Time Domain Code

-      With Only Space Charge (64x64x64)

## Comparison Between Z Code (Impact) and T Code    

- Comparison Between Z Code (Impact) and T Code
-       For a FODO Channel (1M and 64x64x64)