Algorithms and Self-consistent Simulations of Beam-induced ...ALGORITHMS FOR SELF-CONSISTENT...

3
ALGORITHMS FOR SELF-CONSISTENT SIMULATIONS OF BEAM-INDUCED PLASMA IN MUON COOLING DEVICES R. Samulyak * , Stony Brook University, Stony Brook, NY and BNL, Upton, NY, USA K. Yu, Stony Brook University, Stony Brook, NY, M. Chung, A. Tollestrup, K. Yonehara, FNAL, Batavia, IL, R. D. Ryne, LBNL, Berkeley, CA, USA Abstract A code called SPACE for the simulation of beam- induced plasma in gas-filled RF cavities has been devel- oped. The core code uses the particle-in-cell (PIC) method for the Maxwell equations coupled to the dynamics of particles. In the SPACE code, the electromagnetic PIC methods are coupled with probabilistic treatment of atomic physics processes. The aim of the project is to demonstrate the feasibility of the RF cavity with muon collider beams. The most critical part is investigating how intense muon beams influence the plasma dynamics. Initial phase of sim- ulations demonstrating the plasma generation and its short time dynamics in the high pressure hydrogen filled RF test cell has been performed. INTRODUCTION A dense hydrogen gas filled RF cavity has been proposed for muon beam phase space cooling and acceleration. The aim of the simulation program is the development of math- ematical and numerical models and parallel software for the simulation of processes occurring in gas-filled RF cav- ities. An important issue in high-pressure gas filled cavity is a RF power loading due to beam-induced plasma [1]. Incident particle beam interacts with dense hydrogen gas and causes significant ionization level. Due to high fre- quency of collisions with neutrals, electrons reach equilib- rium within picosecond time scale and move with a slow drift velocity. The recombination processes occur on the millisecond time scale. In order to induce the three-body electron capture, electronegtive gas has been tested in the test cell. This is the most critical process in the final cool- ing stage and should be modeled accurately in simulations. Other important processes include the interaction between positive and negative ions and the interaction of the beam with wakefields. A parallel electromagnetic PIC code with atomic physics, called SPACE, has been developed at Stony Brook University / BNL. It implements new mathemati- cal models and numerical algorithms for the interaction of high-energy proton and muon beams with neutral gas and plasmas. NUMERICAL METHODS PIC method for Maxwell’s equations The system of Maxwells equations is discretized using the finite difference time domain (FDTD) method on a staggered mesh [2] that achieves second order accuracy in * [email protected] space and time. Electric charges are represented by dis- crete macroparticles coupled with electromagnetic fields by the action of Lorentz forces and electric currents. When one solves Maxwells equations analytically, solving two equations describing the Faraday and Ampere laws is suf- ficient as the equations expressing the Gauss law and the divergence-free constraint for the magnetic field are invari- ants of motion. The numerical method of Yee [2] for elec- tromagnetic fields in vacuum also preserves the divergence- free properties of the electric and magnetic fields. To deal with the last two equations in the presence of charges and currents, the rigorous charge conservation method was de- veloped within the PIC framework in [3]. The method calculates electric currents along computational grid edges by solving a geometrical problem of sweeping the com- putational mesh by finite volumes associated with each macroparticle. By using this method, we find first a set of initial conditions consistent with the Maxwell equations by either solving the Poisson problem for the electric potential or by a superposition of electric fields and changes created by each particle. Then only the first two Maxwell equa- tions and the Newton-Lorentz equation are solved numer- ically thus avoiding solving the Poisson problem at each time step. A schematic of processes computed at each time step is depicted in Figure 1. We would like to note that the conser- vative Leapfrog time discretization scheme for the Newton- Lorentz equations of particle motion becomes implicit. We use the Boris scheme for the time update [4], which is a modification of the Leapfrog scheme resulting in an ex- plicit and conservative scheme. We also implement mod- ifications of the Boris scheme proposed in [5] for dealing with rapidly accelerating particles for which the relativistic factor is not constant. For accurate simulations of electromagnetic fields in ge- ometrically complex structures, we have implemented the embedded boundary method [6] in a stand-alone Maxwell equation solver. The coupling of algorithms for complex boundaries with the main electromagnetic PIC code will be performed in the next phase. Code Structure and Properties The code is developed in C++ utilizing the advantages of Objected-Oriented Programming. The code is composed of three major parts. The first part, the FieldSolver class, contains FDTD solvers of the Maxwell equations. The sec- ond part, the ParticleMover class, contains solvers for the Newton-Lorentz equation. This class also includes various physics models describing particle interactions and trans- MOPBA06 Proceedings of PAC2013, Pasadena, CA USA ISBN 978-3-95450-138-0 186 Copyright c 2013 CC-BY-3.0 and by the respective authors 05 Beam Dynamics and Electromagnetic Fields D06 - Code Development and Simulation Techniques

Transcript of Algorithms and Self-consistent Simulations of Beam-induced ...ALGORITHMS FOR SELF-CONSISTENT...

Page 1: Algorithms and Self-consistent Simulations of Beam-induced ...ALGORITHMS FOR SELF-CONSISTENT SIMULATIONS OF BEAM-INDUCED PLASMA IN MUON COOLING DEVICES R. Samulyak , Stony Brook University,

ALGORITHMS FOR SELF-CONSISTENT SIMULATIONS OFBEAM-INDUCED PLASMA IN MUON COOLING DEVICES

R. Samulyak∗, Stony Brook University, Stony Brook, NY and BNL, Upton, NY, USAK. Yu, Stony Brook University, Stony Brook, NY, M. Chung, A. Tollestrup,K. Yonehara, FNAL, Batavia, IL, R. D. Ryne, LBNL, Berkeley, CA, USA

AbstractA code called SPACE for the simulation of beam-

induced plasma in gas-filled RF cavities has been devel-oped. The core code uses the particle-in-cell (PIC) methodfor the Maxwell equations coupled to the dynamics ofparticles. In the SPACE code, the electromagnetic PICmethods are coupled with probabilistic treatment of atomicphysics processes. The aim of the project is to demonstratethe feasibility of the RF cavity with muon collider beams.The most critical part is investigating how intense muonbeams influence the plasma dynamics. Initial phase of sim-ulations demonstrating the plasma generation and its shorttime dynamics in the high pressure hydrogen filled RF testcell has been performed.

INTRODUCTIONA dense hydrogen gas filled RF cavity has been proposed

for muon beam phase space cooling and acceleration. Theaim of the simulation program is the development of math-ematical and numerical models and parallel software forthe simulation of processes occurring in gas-filled RF cav-ities. An important issue in high-pressure gas filled cavityis a RF power loading due to beam-induced plasma [1].Incident particle beam interacts with dense hydrogen gasand causes significant ionization level. Due to high fre-quency of collisions with neutrals, electrons reach equilib-rium within picosecond time scale and move with a slowdrift velocity. The recombination processes occur on themillisecond time scale. In order to induce the three-bodyelectron capture, electronegtive gas has been tested in thetest cell. This is the most critical process in the final cool-ing stage and should be modeled accurately in simulations.Other important processes include the interaction betweenpositive and negative ions and the interaction of the beamwith wakefields. A parallel electromagnetic PIC code withatomic physics, called SPACE, has been developed at StonyBrook University / BNL. It implements new mathemati-cal models and numerical algorithms for the interaction ofhigh-energy proton and muon beams with neutral gas andplasmas.

NUMERICAL METHODSPIC method for Maxwell’s equations

The system of Maxwells equations is discretized usingthe finite difference time domain (FDTD) method on astaggered mesh [2] that achieves second order accuracy in

[email protected]

space and time. Electric charges are represented by dis-crete macroparticles coupled with electromagnetic fields bythe action of Lorentz forces and electric currents. Whenone solves Maxwells equations analytically, solving twoequations describing the Faraday and Ampere laws is suf-ficient as the equations expressing the Gauss law and thedivergence-free constraint for the magnetic field are invari-ants of motion. The numerical method of Yee [2] for elec-tromagnetic fields in vacuum also preserves the divergence-free properties of the electric and magnetic fields. To dealwith the last two equations in the presence of charges andcurrents, the rigorous charge conservation method was de-veloped within the PIC framework in [3]. The methodcalculates electric currents along computational grid edgesby solving a geometrical problem of sweeping the com-putational mesh by finite volumes associated with eachmacroparticle. By using this method, we find first a set ofinitial conditions consistent with the Maxwell equations byeither solving the Poisson problem for the electric potentialor by a superposition of electric fields and changes createdby each particle. Then only the first two Maxwell equa-tions and the Newton-Lorentz equation are solved numer-ically thus avoiding solving the Poisson problem at eachtime step.

A schematic of processes computed at each time step isdepicted in Figure 1. We would like to note that the conser-vative Leapfrog time discretization scheme for the Newton-Lorentz equations of particle motion becomes implicit. Weuse the Boris scheme for the time update [4], which is amodification of the Leapfrog scheme resulting in an ex-plicit and conservative scheme. We also implement mod-ifications of the Boris scheme proposed in [5] for dealingwith rapidly accelerating particles for which the relativisticfactor is not constant.

For accurate simulations of electromagnetic fields in ge-ometrically complex structures, we have implemented theembedded boundary method [6] in a stand-alone Maxwellequation solver. The coupling of algorithms for complexboundaries with the main electromagnetic PIC code willbe performed in the next phase.

Code Structure and PropertiesThe code is developed in C++ utilizing the advantages of

Objected-Oriented Programming. The code is composedof three major parts. The first part, the FieldSolver class,contains FDTD solvers of the Maxwell equations. The sec-ond part, the ParticleMover class, contains solvers for theNewton-Lorentz equation. This class also includes variousphysics models describing particle interactions and trans-

MOPBA06 Proceedings of PAC2013, Pasadena, CA USA

ISBN 978-3-95450-138-0

186Cop

yrig

htc ©

2013

CC

-BY-

3.0

and

byth

ere

spec

tive

auth

ors

05 Beam Dynamics and Electromagnetic Fields

D06 - Code Development and Simulation Techniques

Page 2: Algorithms and Self-consistent Simulations of Beam-induced ...ALGORITHMS FOR SELF-CONSISTENT SIMULATIONS OF BEAM-INDUCED PLASMA IN MUON COOLING DEVICES R. Samulyak , Stony Brook University,

Figure 1: Interaction of muons with plasma in cooling ab-sorbers. Negative (top) and positive (bottom) muons (reddots) interacting with ions (green) and electron (blue dots).Semi-transparent iso-surfaces represent electric field inten-sity.

formations by atomic physics processes. The code is ca-pable of tracking numerous particle species. Finally, thethird, TimeController class, controls the above classes andany miscellaneous classes such as classes performing thevisualization of electromagnetic fields and particle data.The visualization is done using the visualization softwarecalled VisIt developed at LLNL for the remote parallel vi-sualization on distributed memory supercomputers. Sincethe main classes of the code are connected via the interfaceclasses, the code can easily be extended by implementingadditional functions and physics models. For convenienceof a new problem setup, the initialization routines use XML(eXtensible Markup Language).

Parallelization MethodsThe electromagnetic PIC code is parallelized using a

hybrid MPI / tread programming for distributed memorymulticore supercomputers. The FieldSolver uses a three-dimensional domain decomposition for solving Maxwell’sequations. The ParticleMover uses a decomposition of par-ticles that is independent of the FieldSolver domain de-composition. Namely, particles in a parallel computingnode can be distributed in the whole computational domainwhereas Maxwell’s equations are solved in a local domainof a parallel computing node. As the distribution of par-ticles is usually very non-uniform in the space, such a de-composition maximizes the load balance.

In the electromagnetic-PIC code, computations per-formed by the ParticleMover are more time consumingcompared to computations by the FieldSolver. The de-scribed parallel decompositions minimizes the CPU com-puting time but requires a large amount of communica-tions between the FieldSolver and ParticleMover. We haveadopted ideas from the sparse matrix storage to minimizethe amount of communications and send field data to Parti-cleMover from only those computational cells that containmacroparticles.

Verification and ValidationThe electromagnetic PIC code has undergone a V&V

program and its accuracy and parallel scalability has been

Figure 2: Example of simulation using SPACE code. Inter-action of muons with preset plasma in cooling absorbers.Negative (top) and positive (bottom) muons (red dots) in-teracting with ions (green) and electron (blue dots). Semi-transparent iso-surfaces represent electric field intensity.

estimated. The FieldSolver has been verified using ana-lytical solution for electromagnetic fields in a rectangularcavity. The FieldSolver achieves the second order accu-racy and achieves close to linear weak scalability on thou-sands of processors. The embedded boundary solver hasalso been verified using analytical solutions for rectangu-lar cavities initialized under some angle to the computa-tional mesh. While the stair-case approximation of bound-aries results in a zero-order accuracy, the use of the embed-ded boundary method restores the accuracy to the order of1.4 1.5. The ParticleMover has been verified using spacecharge problems and problems with special distributions ofparticles.

ATOMIC PHYSICS EFFECTSIn this section, we describe the implementation of prob-

abilistic models for atomic physics processes in gases un-der the influence of high energy particles and high gradi-ent electromagnetic fields. As each macroparticle passesthrough the absorber, it ionizes the medium in real timeby creating electron - ion pairs. The motion of ions andelectrons is explicitly tracked, and their recombination andother atomic physics transformation are resolved as de-scribed below. The code supports the dynamics of multipleparticle species.

Consider a high-energy particle entering an absorbermedium. The energy loss of this particle by ionization canbe described by the Bethe-Bloch formula [7]

dE

ds= 4πNAr

2emec

2ρZ

A

(1

β2ln

2mec2γ2β2

I− 1− δ(β)

2β2

),

(1)where NA is the Avogadro number, ρ, A, and Z are thedensity, atomic weight and number of the absorbing mate-rial, and me and re are the mass and the classical radius ofthe electron. Numerically,

4πNAr2emec

2 = 0.3071MeV cm2/g.

The ionization constant I is approximately 16Z0.9eV, andδ is the density effect factor that arises from the screeningof remote electrons by close electrons and results in a re-duction of energy loss for higher energies.

Proceedings of PAC2013, Pasadena, CA USA MOPBA06

05 Beam Dynamics and Electromagnetic Fields

D06 - Code Development and Simulation Techniques

ISBN 978-3-95450-138-0

187 Cop

yrig

htc ©

2013

CC

-BY-

3.0

and

byth

ere

spec

tive

auth

ors

Page 3: Algorithms and Self-consistent Simulations of Beam-induced ...ALGORITHMS FOR SELF-CONSISTENT SIMULATIONS OF BEAM-INDUCED PLASMA IN MUON COOLING DEVICES R. Samulyak , Stony Brook University,

Implementation of Atomic Physics ProcessesWhile various atomic physics transformations are sup-

ported in the code, we currently resolve the following pro-cesses that are most essential for the problem of interest:

p+H2 → p+H+2 + e−, (2)

H+2 + 2H2 → H+

3 +H2 +H, (3)

H+3 + e− → 3H. (4)

The implementation using macroparticles is as follows.The energy loss of each proton macroparticle is calculatedby integration the Bethe-Bloch formula along the particletrajectory

∆E = Np

∫f(v)ds,

where f(v) denotes the right hand side of the Bethe-Blochformula and Np is the number of real protons representedby one macroparticle. At each time step,

(int)∆E

INH

of ion – electron pairs are created along the protonmacroparticle path by assigning them random direction ve-locities corresponding to their initial energy. Here NH

is the number of real H2 molecules represented by onemacroparticle. The initial time is recorded for each newion and electron macroparticles and they are then trackedin the code. (int) stands for the rounding-off to integer asonly integer number of ion-electron pairs can be created.The rounding-off error is saved and used in the next timestep to satisfy the energy balance.

When the macroparticle of H+2 propagates the distance

equal to the mean free path of the second atomic transfor-mation (2.3), it is transformed into theH+

3 ion. This simplyrequires changing the mass of the ion macroparticle and re-setting its internal time in the data structure. As there is noneed to track neutral particles, the molecule H2 and atomH in (2.3) are ignored. The error due to the fact that theatomic weight of neutrals in the left and right sides of (2.3)differ by one atomic mass is negligible in terms of changingproperties (density and pressure) inside of the RF cavity.

Finally, when the ion H+3 macroparticle propagates the

distance equal to the mean free path of the transformation(2.4), it captures the closest electron and neutralizes into3H . In the code, the corresponding H+

3 and e− macropar-ticles are simply eliminated from data structures.

The interaction of electrons and ions with neutrals ismodeled in the code using theory and available experimen-tal data. For instance, electrons equilibrate on the picosec-ond time scale due to high frequency collisions with neu-tral molecules. The experimental measurements [8] sug-gest that the electron drift velocity in the conditions of theHPRF experiment is very low, 2.9× 104 m/s.

Figure 3: Logarithm of the electric field magnitude [logV/m] in the longitudinal slice of HPRF test cell during thepropagation of the proton beam.

RESULTS AND DISCUSSIONWe have performed simulations of the entrance of 200

MeV proton beam into the HPRF test cell filled with thehydrogen gas with the density of 1021 1/cm3 at the pres-sure of 200 bar and the generation and short time scale dy-namics of plasma. Each proton generates on the order of1000 electron-ion pairs per 1 cm travel distance. Accel-erated by the external field, electrons and ions practicallyinstantaneously reach the equilibrium drift velocity definedby their collisions with neutral molecules. Unlike in simu-lations with preset initial distributions of positive and neg-ative charges in vacuum shown in Figure 2, the self con-sistent simulation of the plasma formation and evolution inhigh density gas demonstrates very weak wake fields in-duced by the proton pulse. The 2D distribution of the mag-nitude of the electric field is shown in Figure 3.

CONCLUSIONS AND FUTURE WORKWe have developed a parallel electromagnetic code

SPACE that combines the PIC method for particles withatomic physics. Simulations of the generation of plasmaby the 200 MeV proton beam in the hydrogen filled RFtest cell and the short time scale dynamics of plasma andinduced wake fields have been performed. Simulationsdemonstrated insignificant strength of wake fields. In thefuture, we will perform simulations involving electroneg-ative ions using the SPACE code. We will complete im-plementation of a multiscale approach in SPACE that al-lows simulations of both short (picosecond) and long (mi-crosecond) time scale processes in plasma, and concludeon plasma effects in a practical RF cavity.

REFERENCES[1] K. Yonehara et al., Proceedings of IPAC 2013, TUPFI059.

[2] K. Yee, IEEE Transactions on Antennas and Propagation, 14(3) (1966) 302-307.

[3] J. Villasenor and O. Buneman, Comput. Phys. Commun. 69(1992) 306-316.

[4] J. Boris, Proc. the 4th Conf. on Numerical Simulation of Plas-mas (Washington DC, NRL) (1971) pp 3.67.

[5] J. L. Vay, Physics of Plasmas, 15 (2008), 056701.

[6] S. Dey, R. Mittra, IEEE Microwave and Guided Wave Letters,7 (1997), 273-275.

[7] D. Neuffer, Nucl. Inst. & Methods in Phys. Research, A 532(2004), 26 - 31.

[8] J.J. Lowke, Aust. J. Phys., 16 (1962), No. 1.

MOPBA06 Proceedings of PAC2013, Pasadena, CA USA

ISBN 978-3-95450-138-0

188Cop

yrig

htc ©

2013

CC

-BY-

3.0

and

byth

ere

spec

tive

auth

ors

05 Beam Dynamics and Electromagnetic Fields

D06 - Code Development and Simulation Techniques