FinalTechnicalReportPhaseI & DOEAward&: !DE$SC0004388!/67531/metadc829515/...II.Phase&Igoals:!...
Transcript of FinalTechnicalReportPhaseI & DOEAward&: !DE$SC0004388!/67531/metadc829515/...II.Phase&Igoals:!...
Final Technical Report Phase I DOE Award #: DE-‐SC0004388 Recipient: TechSource, Inc. Project Title: “Improvements to Simulation Codes for Electron Cloud Generation in Long-‐Bunch, High-‐Intensity Proton Accumulator Rings” Principal Investigator: Dr. Robert J. Macek, TechSource, Inc., and guest scientist at the Los Alamos National Laboratory Collaborator: Dr. Lawrence J. Rybarcyk, Los Alamos National Laboratory
1
I. Executive Summary:
Low energy electrons (often referred to as "electron clouds") in the beam chambers of high intensity accelerators and storage rings can limit their performance. They can limit intensity by causing instabilities, unacceptable pressure increases or increases in beam size. For these reasons, electron cloud effects are a very active topic of research in the accelerator community. For example, a fast beam instability has long been observed at the Los Alamos high intensity Proton Storage Ring (PSR), the proton driver for the spallation neutron source at Los Alamos. The preponderance of evidence shows that the PSR instability is an electron cloud induced instability but detailed understanding of the dominant source(s) of the electron cloud driving the instability are among the unresolved issues. Better understanding of this instability and the electron cloud driving it will not only benefit PSR but will benefit numerous accelerator facilities world wide where electron cloud effects are an established concern or a significant technical risk.
Reliable simulations of electron cloud generation in PSR and similar machines would be a most valuable tool for improving our understanding of its origin, the parameters that affect it and how it might be controlled. Such tools would provide cost-‐effective methods for designing mitigation measures and evaluating them before going to the expense of fabrication and experimental testing in an operating accelerator facility.
In this project we have developed and tested several significant improvements to a widely used electron cloud simulation code, POSINST. In our version, LANLPOSINST V6, we have add several important features including the capability to model a multi-‐element section of the ring consisting of two quadrupole magnets with 3-‐dimensional magnetic fields, dipole magnet end fields, several drift spaces and various electron cloud diagnostics. Improvements were also added to the modeling of the initial primary or “seed” electrons from proton beam losses. One important conclusion from benchmarking these improvements was the need to include “seed” electrons produced from secondary particles resulting from the primary proton beam losses.
2
II. Phase I goals:
The technical objectives and tasks of Phase I at the start of the Project are listed in items 1) through 4) below.
1. Develop, implement, and test software/code changes to the PSR version of POSINST, now designated as LANLPosinstV6, and related post-processing tools that:
a) Add the capability to simulate EC generation in a section of a ring (e.g. a section of PSR or SNS) that contains multiple beam transports elements including dipoles, quadrupole magnets, drifts, electrostatic longitudinal barriers (also known as electron mirrors), and electron cloud diagnostics. Include a user friendly, streamlined input and problem specification capability.
b) Improve the algorithms for generation of seed electrons born at the wall from beam losses to better account for the correlated (z, phi) distribution of losses, and variation of seed electrons per lost proton from variations in the grazing angle of lost protons. Specific input parameters to the code for the PSR application would be obtained in item 2) below.
c) Add the capability to incorporate a measured sequence of longitudinal proton beam pulse profiles.
d) Provide user-‐friendly post-‐processing tools and/or scripts to extract and display the output results of interest especially those needed for comparison with experimental data.
2. Develop and test new codes and/or Matlab scripts for post processing beam loss
output from ORBIT and other beam loss codes to produce an improved model of primary or “seed” electrons born at the beam duct walls from beam losses.
3. Benchmark the improved codes and simulation tools using relevant data and various experimental results from PSR.
4. Investigate the feasibility of various options and approaches for additional upgrades to the LANLPosinstV6 code to include:
a) Closed orbit offsets of the proton beam. A key issue is efficient and effective algorithms for computing the space charge fields of beams not centered in the beam duct. Implementation would be a task for a future project.
b) Seed electrons generated by secondary emission from the stripper foil along with those resulting from the electron stripped from the incoming H-‐ beam (aptly named convoy electrons) and their interaction with the duct walls or special electron beam catchers.
c) Capability for simulating the effect of a variety of proposals for suppression of EC generations such as electrostatic clearing fields and the idea to use a high-‐transmission, biased conductive screen to shield the duct walls from the electric field of the beam and at the same time suppress secondary emission from incident electrons striking the chamber walls.
3
III. Project activities and accomplishments compared to goals: 1. Task 1 (code changes) activities and accomplishments
About 45% of the Phase I effort was devoted to objective 1 and tasks 1.a through 1.d.
All of these were successfully developed, implemented, and tested. The LANLPosinstV6 code, developed for the MAC OSX operating system, now has the capability to model a multi-‐element section of the ring to include two quadrupole magnets with 3D field models or hard edge quads, two linearized dipole end fields, two longitudinal electro-‐static barriers, two sweeping electrodes, two vertical corrector magnets, two coaxial electron suppressor grids, and multiple slots in the chamber wall. In addition, the variation in horizontal and vertical beam sizes as function of z are now included. The input parameter file format has been streamlined and simplified and is much more user friendly, which results in significantly reduced errors in setting up the desired simulation model.
The generation of seed electrons (from beam losses) in the code was modified in Phase I to use a 2-‐D table for the z and phi distribution of beam losses. The table is a user input file. The existing treatment of the time structure for the seed electrons still assumes that they are proportional to the instantaneous line density of the beam and was not changed.
Prior versions of the code used a single longitudinal beam profile that was repeated for each turn. In Phase I, the code was modified to allow use of a sequence of different beam profiles (usually a measured sequence) that can also have variable intensity.
Numerous MATLAB® scripts were developed or improved for post processing various output files of LANLPosinstV6 to generate additional results and graphical displays of simulation results. Scripts for movies of electron motion in various regions of the simulations were developed and are most helpful in visualizing the dynamics of EC generation. See Figure 1 and 2 for examples of results using these scripts to post process simulation output files. Scripts to analyze and display various aspects of the wall collisions were also developed or improved. Generation of the signal in an electron diagnostic is based on post processing wall collision data at the entrance of the device using scripts developed in this project.
2. Task 2 (seed electron simulation) activities and accomplishments
Reliable estimates for the seed electron distributions are essential for accurate
simulations of EC generation in PSR and long bunch proton rings, as we have pointed out several times. The input files that the user supplies for the z, phi distribution of beam losses have in the past been based on very simplified assumptions or hypotheses. In the beginning, for lack of better information, a uniform distribution of the beam loss was assumed. Often phi distributions of losses related to the transverse beam ellipse were used.
In Phase I, our approach [task 2 above] was to simulate the losses in the particle tracking code ORBIT using a good optics model of PSR and include foil scattering, space charge, the programmed bumps for injection painting, and numerous apertures in most of the ring elements. The results of these simulations showed that most of the losses occurred in the quads where the beta functions were largest. No losses were found in the drift spaces except for some near the entrance of the quads. Very few losses occurred in the
4
dipoles except near the stripper foil and for a limiting aperture near the extraction magnets. The losses in the quads were in a ±10 degree band at phi = ±90 for vertically focusing quads, and phi = 0 and 180 for horizontally focusing quads and with grazing angles of a few milliradians or less. As such, the grazing angles are small enough that the number of seed electrons per lost proton has saturated according to the results published in Thieberger et al, Phys Rev A 61, 042901 (2000).
Simulations of EC generation were made using the LANLPosinstV6 code with seed electrons from the Orbit losses as described above in a PSR quadrupole and compared with the same losses on the pole tips. Seed electrons were uniformly distributed in narrow ±10-‐degree band on the horizontal or vertical axes and ±10 cm along the longitudinal axis. These resulted in ~10 to 15 times fewer electrons in the multipacting process for each seed electron compared with each seed electron located in the same size band on the pipe near the quad pole tip (phi = ± 45 and ± 135). See Figure 1 and 2 below and the paragraph between them for more explanation of the Figures. These results demonstrate the importance of any beam losses near the quad pole tips and motivates the tasks for a future project that deals with other loss mechanisms (e.g. H0*(n) excited states or secondary products from primary beam losses) not included in the Phase I work.
Figure 1. Snapshot of one frame from a LANLPosinstV6 simulation of EC generation using a uniform seed electron distribution in a narrow band (phi = 90±10 degree, z=±10 cm) on the vertical y-‐axis. The various plots in both Figures 1 and 2 are explained in the paragraph that follows this caption. Note that the number of seed electrons here is that same as in Figure 2.
5
In both Figures 1 and 2, the graphic on the left plots the electron spatial coordinates (at the beam time of the snapshot) with color of the dot related to the total electron velocity as indicated by the color bar; m is the number of macro electrons in the plot. The top right graph shows the beam intensity (red) and electron line density (green) as a function of time from the start of the 1st turn. The time of the snapshot is shown in blue. The bottom right hand section has two graphs: the left graph is a plot of the electron Z coordinate and longitudinal velocity (Vz) while the right plot shows the electron line density (ldens) as function of Z. The Z coordinates of effective edges of quadrupole are shown as the dashed blue lines.
Figure 2. Snapshot of one frame from a LANLPosinstV6 simulation of EC generation using a uniform seed electron distribution in a narrow band (phi = 45±10 degree, z=±10 cm) on the pole tip region of the quadrupole. Note that the numbers of seed electrons are the same as in Figure 1.
The Z vs Vz plot in the lower right of Figure 2 shows numerous electrons with high Vz (up to 3 x 107 m/s, or 10% of the speed of light) in the drift space (Z<0) in front of the quad. These were ejected from the quadrupole by the strong ExB drift when the beam pulse is present and best seen in the animation.
Given the high multipacting gain for seed electrons born at the quad pole tips and the lack of beam losses on the pole tips from ORBIT simulations, it became important to estimate the seed electrons that would be generated by secondary particles produced by the primary beam losses at the beam pipe. We examined several codes -‐ MCNPX, the collimator module for ORBIT, and G4beamline -‐ that might be used for such estimates.
6
MCNPX generates the needed secondary particles and tracks them in material objects but does not track them using EM fields. The ORBIT collimator module has the necessary nuclear cascades but does not work inside a quadrupole field. G4beamline generates all secondary particles and can track them in matter and EM fields. It was tried with an input beam given by the coordinates of the protons lost in ORBIT projected back to 0.5 m before the quadrupole. Preliminary results indicated that numerous secondary particles would strike the quad pole tip region of the beam pipe and thus generate seed electrons. Further studies using G4beamline were beyond the scope of Phase I.
3. Task 3 (benchmarking) activities and accomplishments
Several benchmarking activities, task 3 above, were undertaken in Phase I and more
were proposed for Phase II (not awarded). There is a wealth of experimental data from PSR that can be used to benchmark EC simulations. This includes EC signals collected over the years from EC diagnostics in various drift spaces and the electron sweeping diagnostic in a quadrupole in section 4 of PSR as functions of numerous adjustable beam parameters such as beam intensity, beam emittance, closed-‐orbit offsets, etc. There are also results from experiments using electron mirrors in the drift space of section 4 to which demonstrate the influence of electrons ejected from the quadrupole during the passage of a beam pulse. Benchmarking quadrupole simulations from previous versions of the LANLPOSINST, before the modifications introduced in the current project, assumed rather uniform phi distributions of seed electrons in the quadrupole. These gave reasonable agreement on EC signal pulse shape, timing with respect to the trailing edge of the proton beam pulse and rough agreement on electron energy spectra from diagnostics with an adjustable repeller voltage. See R. Macek, PRSTAB 11, 010101 (2008) and references therein.
One of the motivations for the additional improvements to LANLPOSINST undertaken in the present project was to simulate the results of an experiment in 2007 which incorporated 2 pulsed electrons mirrors as shown in the layout of Figure 3. The relevant diagnostic signals for the experiment are shown in Figure 4 below. Simulations using seed electrons proportional to the ORBIT losses in narrow bands on the coordinate axes did not reproduce the experimental results very well. Better agreement required using a component of seed electrons near the quad poletips in order to be consistent with the experimental results for the ES41Y signal shown in Figure 4. Note that pulsing the ES41Y sweep electrode reduces this signal and reduces it even more when the mirrors are both pulsed. This is further evidence that seed electrons ejected from both quadrupoles seed most of the drift space EC signal. However, the simulations still do not reproduce the large buildup of EC in the quadrupole diagnostic (ES43Q) when the mirrors in the drift space are energized to -‐2 kV. This remains a significant unresolved issue. Is there some physics still missing in the EC simulation models? The benchmarking simulations also reveal significant mixing and intermingling of electrons ejected from the quads and those trapped in the linearized end fields of near by dipoles. However, we have no direct experimental results to test this.
7
Figure 3. Schematic layout of section 4 of PSR showing dipoles, quadrupole magnets, electron mirrors and two EC sweeping diagnostics, labeled ES41Y and ES43Q. ES43Q is inside the downstream quadrupole magnet.
Figure 4. Simultaneous signals, from the experiment (2007) using pulsed electron mirrors and a pulsed sweep electrode, provide evidence for electrons ejected from nearby quadrupoles. ES43Q is the diagnostic in the quadrupole and ES41Y is the diagnostic in the adjacent drift space. Electron mirrors are placed upstream and downstream of ES41Y but between the quadrupoles as illustrated in Figure 3. The large suppression of the drift space signal (ES41Y) when the electron mirrors are pulsed occurs because the mirrors prevent electrons ejected from the quadrupole magnets from reaching the drift space diagnostic. Also note the large signal increase in the quadrupole diagnostic (ES43Q) when the mirrors are pulsed to -‐2kV. 4. Task 4 (feasibility studies) activities and accomplishments
The feasibility of certain additional options for code improvement was examined (task 4 above). Adding closed-‐orbit offsets of the proton beam (task 4.a) was explored. A key issue is efficient and effective algorithms for computing the space charge fields of beams
Slide 30Operated by Los Alamos National Security, LLC for NNSA
U N C L A S S I F I E D9/12/2008
RJM_HB2008
Dipole Dipole
QuadrupoleQuadrupole with ES43Q
ES41YRFA
Electron Mirror II
Beam
Electron Mirror I
8
not centered in the beam duct. The effort was estimated to take several months and further work was not undertaken in Phase I.
We examined the feasibility of incorporating seed electrons generated by secondary emission from the stripper foil along with those resulting from the electrons stripped from the incoming H-‐ beam (aptly named convoy electrons) and their interaction with the duct walls or special electron beam catchers (task 4.b above). These can be added in future projects as separate routines with minimal impact on the rest of the code.
The feasibility of adding the capability to simulate effects of two concepts (task 4.c above) for suppression EC generation was studied. These were electrostatic clearing electrodes and a coaxial electron suppressor screen. The concept for the latter is sketched in Figure 5. It would use a high transmission, biased conductive screen to shield the chamber surface from the E field of the beam and at the same time suppress secondary emission from the incident electrons striking the chamber wall. In Phase I, a simplified model of the coaxial electron suppressor screen was incorporated in LANLPosinstV6. Simulation results of its use in a quadrupole with an applied voltage of -‐250V on a 3mm gap between screen and wall gave an encouraging order of magnitude suppression of EC generation for the worst case of seed electrons generated near the quadrupole pole tips.
Figure 5. Sketch of biased screen and EM shield (aka coaxial electron suppressor
screen). For clearing electrodes, LANLPosinstV6 now has a capability to incorporate 2D
electrostatic fields of electrodes that subtend an azimuthal segment of the beam pipe. It has been used successfully to model the sweeping electrode in a drift space electron diagnostic. The E fields that it generates are close to those of a clearing electrode stood off from the beam pipe by short insulators and would be suitable for simulating their effect on EC generation. Use of this capability was proposed for Phase II (unfunded) to evaluate the effectiveness of clearing fields for suppressing EC generation through simulations that include the full compliment of seed electron sources in the drift spaces, quadrupoles and dipole end fields of section 4 and 0 of PSR.
9
IV. Products developed under award activities: 1. Software modifications: LANLPOSINST, Version 6.0 modified in collaboration with Dr. Lawrence Rybarcyk, LANL, AOT-ABS under LANL contract number FIA-10-035, a Non-Federal Entities Work-for-Others Agreement. The modifications are described in Project Activities section above. The intellectual property and licensing rights reside with the Los Alamos National Security, LLC. Some documentation and instructions for using the code modifications were written. 2. Various MATLAB® and IGOR scripts for post-processing LANLPOSINST V6 output files to do further analysis, compute quantities that can be compared with experimental results such the time profiles and energy spectra of signals from EC diagnostics in the quadrupole and drift spaces; generate graphical results such EC animations and quantities that give further insight into the EC dynamics; study variation of results with respect to input parameters for additional testing of EC hypotheses. 3. ORBIT models of PSR (for various experimental setups) used for simulation of beam losses that can be post-processed to generate the seed electron distributions needed as input to EC simulations in LANLPOSINST V6. The post-processing includes MATLAB® scripts to generate seed electron distributions from the ORBIT loss distributions. 4. A preliminary model of PSR sections 4 and 5 was developed for the G4beamline code to post-process ORBIT loss output and track secondary particles produced by primary beam losses in quadrupoles. The first results were described in the previous section on Project Activities. 5. A Phase II SBIR proposal document Application Number 95649B10-II submitted to the DOE SBIR on April 19, 2011. Not selected for an award.
10
V. LANLPosinstV6.4 Code Information & Documentation
The main features, assumptions, calculation methods and algorithms are summarized in the Introduction of the User Guide (Notes for running LANLPosinstV6.4 under Mac OSX) starting on the next page. Validation and bench marking activities are discussed in Section III.3.
11
Notes for running LANLPosinstV6.4 under Mac OSX. L. Rybarcyk (4/8/2011) (updated 5/5/11) Introduction POSINST [1][2] is a code for studying the interaction of particle beams and electron cloud in beamlines. The code has been used to study electron cloud in the Proton Storage Ring (PSR) located at the Los Alamos Neutron Science (LANSCE) facility at Los Alamos [3]. The LANLPosinst version of the code is built upon the POSINST12 version, which was written by Miguel Furman & Mauro Pivi. POSINST12 gives one the ability to study the proton beam and electron cloud interactions in a transverse slice in some beamline element, e.g. drift space, quadrupole magnet, etc. In the LANLPosinst version we have extended the code to allow one to incorporate typical beamline elements used in the PSR as well as allow the user to model a complete section of the PSR (with some approximation). The code currently does not have a full 3D model of space-‐charge for the electron cloud, but rather a series of non-‐interacting 2D slices. It also uses a Runge-‐Kutta integrator. Currently can handle 2x106 macroparticles. Electrons that move outside the region of interest defined by zlimits of the problem are killed. Here is a list of features available in the LANLPosinstV6.4.1
• Beamline components o Quadrupole magnet
§ 2D § 3D hardedge § 3D w fringe fields described by Enge expansion coefficients
o linearized end field of PSR-‐like dipoles o vertical correctors o electrostatic mirror – longitudinal – field array from R-‐Z Poisson calc o electrostatic sweeper – transverse
§ 2D hard edge § 3D field array from “E&M Studio” for a 150 deg angular size
device, with pulsing capability o coaxial electrostatic electron suppressor
• Field diagnostics o Samples field in x, y, z at t=0
• Beam diagnostics o electron detector – sieve pattern
• Problem definition o SLENGTH ranges in z from Zmin to Zmax with n slices o Proton beam transverse size vs. z for proton beam space charge calc o Proton beam loss (for producing seed electrons) includes 2d
correlated or uncorrelated map o Proton beam-‐pulse sequence with multiple bunch shape definition
12
Input file format by line # (any line in the input file beginning with “!” is a comment) see below for a definition of the terms
1. Title 2. subdirectory name w/o leading “/” for Auxiliary files 3. random-‐number-‐seed 4. ibtype, xnpnom, beamem 5. iden1, iden2 6. beamsig.dat 7. icerff 8. ishape 9. filekick 10. fillpatt 11. circ, nharm 12. ach, bch, hch, ichsh 13. ek0phel, eksigphel, sigyphel, pangphel, refleff 14. photpbppm, queffp, dilution 15. temperature, ek0ionel, esigionel, crossect, pressure 16. ek0plel, eksigplel, idisplel, pangplel 17. plossratepbppm, plelyield 18. number-‐of-‐macroparticles 19. matsurf 20. E0tspk, dtspk, powts 21. tpart1, tpart2, …, tpart6 22. enpar (multiple parameters) 23. pnpar (multiple parameters) 24. P1einf, P1epk, E0epk, E0w, powe, epar1, epar2, sige 25. Ecr, P1rinf, qr, rpar1, rpar2, pr 26. dtotpk, pangsec 27. strvolt, strwidth, strgap 28. dek 29. dtres, dek0, ek0top 30. winx1, winx2, winy1, winy2 31. ctrx, ctry 32. ibbk 33. ispch, npbsccntr, mecsccntr 34. gridszx, gridszy, zscmin, zscmax, ngrz 35. nsteps 36. dtchk 37. inst 38. idis 39. nout1, nout2, dtdis 40. ibbb 41. ihisxy (if ihisxy<>0 than next two lines required) 42. nbinsx, nbinsy 43. xplot1, xplot2, yplot1, yplot2
13
44. idumpphsp 45. irepst 46. irelk 47. iwcoll 48. iwcorr 49. iprob 50. icull 51. ievol 52. icpu 53. iim
54. Ezpb 55. restore-‐flag, save-‐flag 56. Definition of PSR Section 4 begins here
These instructions are based upon those provided Miguel Furman for use with the original POSINST code. I have modified/augmented as necessary to reflect changes that have been incorporated into the LANLPosinst version of the code. One must consult M. Furman references on secondary electron emission model for information regarding those parameters. ibptype: beam particle type: =1: proton =2: antiproton =3: positron =4: electron =5: mu-‐plus =6: mu-‐minus =7: Au79+ =8: Pb82+ =0: other (need to specify particle charge and mass) *** iden1: transverse proton beam density: *** iden2: transverse electron cloud density: =0: point charge =1: Gaussian (elliptical or round) =3: flat density =4: parabolic (rho=2*(1-‐(x/ach)^2-‐(y/bch)^2) (elliptical or round) (recommendation iden1=1, iden2=0 for PSR) ***icerrf: algorithm for computation of the complex error function =1: table interpolation to 4th order =2: Pade approximation (Talman via Ziemann) =3: IMSL library function CERFE(z) (recommendation: use icerrf=1)
14
ishape: longitudinal bunch density profile: =0: read from external file (must specify current vs. time) =1: Gaussian shape (sigz must be specified) =2: beta-‐function shape (fwhmt must be specified) circ: circumference [m] nharm: harmonic number islice: bunch slicing in longitudinal dimension: =1: equal-‐spacing =2: equal-‐weight (recommendation: use islice=1) *** nobjtype: type of object being simulated: (in LANLPosinstV6.4 this is internally set to 4 i.e. PSR section 4) =1: field-‐free =2: dipole bending magnet (must specify vertical B field) =3: solenoidal magnet (must specify longitudinal B field) =4: PSR section 4 elements ichsh: chamber cross-‐section shape parameter: =1: elliptical (ach, bch = ellipse semi-‐axes) =2: rectangular (ach, bch = rectangle’s half-‐width and half-‐height, respectively) *** matsurf: chamber surface material: =-‐1: perfect electron reflector (unphysical, but may be revealing) =0: perfect electron absorber (unphysical, but may be revealing) =1: generic metal (must specify secondary electron parameters) (recommendation: use matsurf=1) idisplel: transverse generation of beam-‐particles-‐loss electrons: =1: generate plosselectrons uniformly around the chamber (excluding the antechamber) =2, generate plosselectrons around the chamber such that the vertical walls are weighted by sigx, the horizontal by sigy. =3: user supplied, uncorrelated z-‐phi ploss distribution, filenames=plosszdist.dat and plossadist.dat for z and , respectively and are located in Auxfile directory =4: user supplied, correlated z-‐phi ploss distribution, filename=plzadist.dat and is located in Auxfile directory ibbk: primary electron creation switch: =0: seed electrons created at rest (unphysical, but may be revealing) =1: seed electrons created normally (physically correct option) (recommendation: use ibbk=1)
15
*** ispch: electron-‐cloud space-‐charge computation: =0: no space-‐charge =1: compute grid fields and apply kick at every step (Pivi method) =2: compute grid fields and apply kick at every step (Blaskiewicz method) (generic case is ispch=1; option 2 is much faster but is inly rigourously correct for azimuthally symmetric electron cloud density) inst: coherent dipole instability studies =0: no =1: yes (must specify nbdisp, iwxy and disp) idis: output macroparticle phase-‐space distribution =0: no =1: yes (must specify nout1, nout2) (note: option 1 can generate a lot of output) ibbb: instantaneous (step-‐by-‐step) electron density x-‐y histograms =0: no =1: 1D histograms =2: 2D histograms (note: option 1, and more so option 2, can generate a lot of output. If ibbb /=0, must specify other stuff) ihisxy: time-‐averaged electron density x-‐y histrograms =0: no =1: 1D projections of the density distribution =2: 1D and 2D energy and density distributions (note: if ihisxy /=0, must specify other stuff) idmpphsp: dump macroelectron phase space to disk file at end of run =0: no =1: yes (recommendation: use idumpphsp=0) irepst: report intra-‐bunch statistics (runstatsn.dat files): =0: no (report only for those time steps when bunch current=0) =1: yes (report at every step) (recommendation: use irepst=1) irelk: electron relativistic kinematics: =0: nonrelativistic kinematics =1: relativistic kinematics iwcoll: save every electron-‐wall collision data? (file wallcoll.dat) =0: no =1: yes
16
(note: option 1 can create a lot of output, but is necessary if you want to post-‐process electron-‐wall collisions) iwcorr: integrated energy-‐angle and energy-‐time correlation plots (xxxcorr.dat files) =0: no =1: yes (requires iwcoll=1; must specify other stuff) iprob: algorithm for the probability for generating secondary electrons: =1: Poisson, per incident electron =2: binomial, per incident electron =3: Poisson, per penetrated electron =4: binomial, per penetrated electron (recommendation: use iprob=4) icull: cull the macro-‐electron phase space one in a while: =0: no =1: yes (must specify other stuff) (irecommendation: use icull=0) ievol: primary electron generation: =0: generate seed electrons from all bunch passages (physical case) =1: generate seed electrons only from the first bunch, and artificially suppress seed electron generation from all successive bunches (unphysical but revealing) (recommendation: use ievol=0) icpu: compute and print out cpu time usage by certain subroutines =0: no =1: yes (must edit the program to include timing calls) (recommendation: use icpu=0) iim: image fields from the beam and electron cloud: =0: no (unphysical but faster) =1: yes (physical but slower) (recommedation: use iim=1) beamsig.dat: filename of x, y beamsize vs z. located in Auxfile directory filekick: filename of beam kick data, located in Auxfile directory fillpatt: filename of fill pattern data. located in Auxfile directory npbsccntr: used to apply proton beam space-‐charge kick every 1 of npbsccntr time steps. mecsccntr: used to apply ecloud space charge kick every 1 of mecsccntr time steps.
17
gridszx: space-‐charge grid size in x-‐direction [m] gridszy: space-‐charge grid size in y-‐direction [m] zscmin: z-‐location of lower-‐limit of problem and space-‐charge region [m] zscmax: z-‐location of upper-‐limit of problem and space-‐charge region [m] ngrz: number of equal length slices to divide z region into. 1<=ngrz<=50 Ezpb: effective Ez component of proton beam space charge field [V/m] restore: flag for restoring electron phase space coordinate saved from previous run 0=: no 1=: yes – read from file ‘ephsspc_in.bin’ save: flag for saving electron phase space coordinates at end of run 0=: no 1=: yes – write to file ‘ephsspc_out.bin’ -‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐ Other significant differences with previous versions or POSINST (included here for completeness): *** (1) The parameter xnpnom (nominal number of particles per bunch) must be >=0. You can choose negatively-‐charged beams by appropriate selection of ibptype. *** (2) If you specify a peak SEY value (dtotpk) that is different from the default value (which results from the input parameters Pleinf, Plepk, Plrinf and dtspk will be rescaled by the *same* common factor dtotpk/(default value). In previous versions, only dtspk was rescaled (while keeping Pleinf, Plepk and Plrinf fixed at their input values) in order for the SEY to attain its designated peak value dtotpk. (3) If nobjtype>1, the B field can be >0 or <0. For a dipole (nobjtype=2), B>0 means pointing upward. For a solenoidal field (nobjtype=2), B>0 means in the same direction the beam is moving. (4) The previous file RUNPAR.DAT is now called RUNPAR.SUM. (5) The previous files STATNENERG.DAT and STATSCOLL.DAT have been augmented and are now called RUNSTATSn.dat, where n=1,2,…,6. (6) An output data file contains plotable data if an only if its file type is “.dat” (7) The Posinst12 postprocessor is the same as Posinst12 itself, except you have to recompile it with modepos=2. If you compile with modepos=0, Posinst12 will process the input file(s) and then stop. This option is convenient if you want to check the existence of all required input files, and compatibility of switches. The normal operating mode is modepos=1.
18
*** (8) The parameter sigyphel * must* be >0. If you want the photelectrons to be generate uniformly around the chamber cross-‐section surface, specify the “effective photon reflectivity” parameter refleff to be 1. If you want the photoelectrons to be generated at the right edge of the chamber, choose refleff=0. Values of refleff in between 0 and 1 will give you a weighted mixture of localized and distributed photoelectrons. (9) The phase space of the macroelectrons is now represented by (x, y, z, bx, by, bz, chm) where (x, y, z) is the position in meters, (bx, by, bz) is velocity/c (dimensionless), and chm is the macroparticle charge (=number of particles per macroparticle). Presently, chm is the same for all macroparticles, so it doesn’t really serve any purpose; but I put it there anyway for a future upgrade in which chm will vary from macroparticle to macroparticle. *** (10) The variable sigyplel has disappeared because it doesn’t seem very physical. The “ploss electrons” are either produced uniformly around the cross section of the chamber(idisplel=1), or are produced preferentially on the horizontal “sides” of the chamber (if the beam is flat), proportionally to the beam aspect ration (idisplel=2). (11) The chamber cross-‐section shape can be elliptical (ichsh=1) or rectabgular (ichsh=2). (12) The bunch population is allowed to fluctuate from bunch to bunch. This is controlled by the fill FILLPATT: the 2nd column (rhp) is now a real variable instead of an integer, defined to be the ratio of the actual bunch charge to the nominal charge xnpnorm (this latter is entered in the input file). As before, the FILLPATT data is terminated with a negative entry in the 2nd column. (13) POSINST12 does not require a “ring model”. You only specify the length and B-‐field (if any) of the object you are simulating. All results from POSINST pertain to this section of the ring and nothing else. In particular, the wake field obtained will be the contribution from this section only to the wake field of the entire ring. To obtain this latter, you have to superpose all such contributions from all elements in the ring (assuming the superposition is valid – see Chao “Instabilities” for the validity conditions). *** (14) The variable plossrate no longer exists. Instead, you must specify the particle loss rate per beam particle per meter of beam traversal (plossratepbppm) in addition to the electron yield per proton-‐wall collision (plelyield). Fror the PSR, the old value for plossrate was 4x10-‐6 number of lost protons per beam proton per turn). Thus the corresponding value of plossratepbppm is plossrate/circ=4x10-‐6/90=4.444x10-‐8 [m-‐1).
19
Description of New Features in LANLPosinstV6.4.1 BEAMLINE ELEMENTS The following is a description of the input line format for each beamline component implemented in the code. You are allowed a maximum of 4 of each type of element in the input file. For each element the input line begins with the letter ‘E’, then a two-‐character designator and a 6-‐character label. This precedes the actual parameter specifications on the input line. Here is a list of the beamline element types and there parameters (I've added fictitious labels for clarity). The parameters a spelled out with units where appropriate a) an infinitely long quadrupole magnet E Q2 'SRQ201' Gradient(T/m) X0(m) Y0(m) b) a hard-‐edged quad magnet E QH 'SRQF41' Grad(T/m), Zcen(m), Zlen(m), X0(m), Y0(m), Dia(m), c) a 3d quad magnet w/ fringe fields from Enge expansion coeff(a1-‐a6) E Q3 'SRQU41' Grad(T/m), Zcen(m), Zlen(m), X0(m), Y0(m), Dia(m), a1, a2, a3, a4, a5, a6, d) a coaxial electrostatic electron suppresor E CX 'SQCX00' Vgap(V), Zlolim(m), Zuplim(m), InnerRad(m), OuterRad(m), e) the linearized end field of a Horizontal bending magnet E LB 'SRBM41' Zlolim(m), dZ(m), dB(T), Rotation-‐Angle(deg) f) a longitudinal electrostatic mirror WITH Poisson T7 map file E MF 'FullMIRROR1V1.T7' E MI 'SRMI01' Vmirror(V), Zcen(m), Ton(s), Toff(s) note: the MF line must precede the first MI line. You may add a second mirror with just the addition of an MI line. Both mirrors use the same T7 map file. g) a hard-‐edge vertical corrector magnet E VC 'SRVC87' B(T), Zcen(m), Zlen(m) h) a 2d (R-‐Z) electrostatic sweeper E S2 'SRS201' Vswpr(V), Angular-‐size(deg), Central-‐angle(deg), Radius(m), Zlolim(m), Zuplim(m), Ton(s), Toff(s), Emax(V/m) i) a 3d (x,y,z) electrostatic sweeper with a 150 deg angular size created from Mafia model E SF 'sweeper_h_phi150_mc_e.dat' E S3 'SRS399' Vswpr(V), Central_angle(deg), Zcen(m), n-‐start-‐pulse, m-‐pulses, t1, t2
20
note: The use of n,m,t1 and t2 are the same as in the previous versions if n-‐start-‐pulse.LT.0 then (!this more is good for keeping sweeper voltage applied over several turns) m ignored, can be any integer t1 is the absolute start time of sweeper voltage t2 is the absolute stop time of sweeper voltage else if n-‐start-‐pulse .GE. 0 then (good for repetitive pulses n-‐start-‐pulse is the first pulse(where 0 is the first turn) where sweeper voltage is ON m-‐pulses is total number of sequential pulses during which sweeper voltage is applied t1 is the start time of sweeper voltage in seconds (wrt start of a turn) t2 is the duration of sweeper pulse in seconds BEAMLINE DIAGNOSTIC The diagnostic feature allow one to add lines which will sample B & E fields along z at specific time and writes output to a file. One can add up to 4 of these lines in the input file anywhere after the restore/save input line. The input line begins with letter ‘D’, followed by the two character designator. The label input is 6 characters in length and will be used as the filename for the field data. a) E&M field profile diagnostic D FP 'filnam' dz X0 Y0 t BEAM DETECTOR The beam detector is presently implemented as an electron detector with a sieve-‐like aperture. It is considered a black-‐hole detector, i.e. once the electron goes in, no secondaries are created. That is, the position coordinates of the seed electron are produced. If the seed electron is inside a detector slot then then current seed is thrown out. The loop then begins again with the calculation of a new seed. The input line begins with the letter ‘P’, followed by a two-‐character designator, then a 6-‐character label, then the parameter list. The input line must be given on the next line P BH label alf0, dalf, nalf, falf, zlo, zup, nz, fz where alf0 is the central angle of the slot, 0 to 360 deg dalf is the slot width, 0 to 360 deg, 0=> no slot nalf is the number of equal segments to divide the width by, 0=> no slot falf is the fractional width of slot open in angle zlo is lower limit of slot along z, meters zup is upper limit " nz is the number of equal seqments to divide the length by, 0=> no slot
21
fz is the fractional length of slot opening in z. AUXILIARY FILES needed to run LANLPosinstV6.4.1 plzadist.dat This file contains the correlated ploss distribution by z-‐bin, each of which is divided into phi bins. Add a blank line to the end of the list. Z1lowerlimit Z1upperlimit Weight NphiBins Phi-‐1-‐lowerlimit Weight Phi-‐2-‐lowerlimit Weight … Phi-‐n-‐lowerlimit Weight Z2-‐lowerlimit Z2-‐upperlimit Weight NphiBins Phi-‐1-‐lowerlimit Weight Phi-‐2-‐lowerlimit Weight … Phi-‐n-‐lowerlimit Weight . . . Zlast-‐lowerlimit Zlast-‐upperlimit Weight NphiBins Phi-‐1-‐lowerlimit Weight Phi-‐2-‐lowerlimit Weight … Phi-‐n-‐lowerlimit Weight plossadist.dat This file contains the relative weight for each angle bin over 360 degrees over 1 degree steps (this is fixed in the code). Add a blank line to end of list. 0, weight1 1, weight2 . . . 359, weight-‐bin-‐359 plosszdist.dat This file contains the relative weight for each z-‐bin, which is specified by the relative location within SLENGTH. Max number of bins is 100. Add a blank line to end of list. 0.00, weight 0.05, weight .
22
. 0.95, weight fillkick This input file describes the proton beam bunch vs time. In this version of the code the derivative of the kicks pattern is used to estimate the Ez component of the proton beam's electric field. The derivative of the 'kicks' pattern is supplied by the user and incorporated into the 'kicks' file as a third column of numbers (labeled diff). The distribution should be normalized to a max value of 1. The ‘Ezpb’ line of the LANLPosinst input file contains the Ez scale factor V/m to applied to the derivative distribution. The fillkick input file is as follows: PSR wall current measurements; proton beam energy=1.735e9 eV "original data from WC41c, 7/1/08, resampled by Bob, 9999 kicks" this file obtained from WC41ave32 701c 7/1/07. diff added 5/20/8 "time [s]; curr=bunch current [arb. units], normalized to sum(curr)=1" k time_a curr_a diff 1 3.00530053E-11 4.47581383E-03 3.76499059E-11 2 6.01060106E-11 4.91895303E-03 -1.24312279E-08 3 9.01590159E-11 5.36170341E-03 -2.72813682E-08 . . . 9998 3.00469947E-07 1.58186877E-04 -1.29749424E-02 9999 3.00500000E-07 7.53671327E-05 -6.09226559E-03 fillpatt You may now provide different kick files for each turn. a) The FILLPAT file must be modified to include a THIRD COLUMN which contains a numeric index, e.g. 1, which will be appended onto the name of the kick file and preceded by a '-‐', to produce the filename it will read, i.e. kickfile-‐1, kickfile-‐2, kickfile-‐3 and so on. The SECOND COLUMN in the FILLPAT file contains the relative intensity of the bunch wrt the intensity specified in the input file as the number of protons in the bunch. Here a sample FILLPAT file that contains 3 bunches of relative intensity 1, 2 and 4 and are represented by kick files, kicks-‐1, kicks-‐2 and kicks-‐3.
23
PSR 3 bunch passages, -‐1 is used to specify the last bucket in the run. PSR nbkt, rbp index 0, 1.000000 1 1, 2.000000 2 2, 4.000000 3 3, -‐1.000000 0. b) The LANLPosinstV6.1 input file also requires changes. You must specify the generic name, i.e. without the hyphen and index number, of the kick file. The program with then read the FILLPAT file and determine what index should be appended to the generic kick file name along with a hyphen to open and read the kick. All kick files must start with the same generic name and end with the hyphen plus index number. These kick files must be located in the Auxiliary files directory. beamsig.dat Contains the following information about the transverse size of the proton beam at zlocation along the beamline. ‘idens’ must be set to 1 to use beamsig.dat The format of the file is the following comment npts z(1),xsig(1),ysig(1) z(2),xsig(2),ysig(2) . . . . . . . . . z(npts),xsig(npts),ysig(npts)
24
Additional information
Appendix I has some scanned images of instructions from Miguel Furman (Feb 6, 2004) for setting up and using his version, Posinst12. These notes have additional useful information on some of the parameters still in use in LANLPosinstV6. Also included are some notes for modifications we added in 2006 for “sieve” style detector slots and the electric field from a sweeping electrode. Instructions for running LANLPosinst on Mac OSX
1. Create a directory that will contain your input file as described above. 2. Within it create an “Auxil_file” subdirectory within which you will place the
beamsig, filekick, fillpatt, Mirror-‐T7, plosszdist.dat, plzadist.dat an 3D sweeper field files,
3. Execute command a. LANLPosinstV6.4.1 <inputfilename if executable is in your path else b. ./LANLPosinstV6.4.1 <inputfilename if executable is in this directory.
25
Compiling LANLPosinstV6.4.1 The following files are required to build the code. In addition the IMSL Math and Stat library and the Unix library are required. LANLPosinstV6.4.1.f90 beamline.f95 bldiag_fp.f95 blelem_base.f95 blelem_cx.f95 blelem_lb.f95 blelem_mi.f95 blelem_q2.f95 blelem_qe.f95 blelem_qh.f95 blelem_s2.f95 blelem_s3.f95 blelem_vc.f95 blpdet_bh.f95 date_time_cpu_PC.f95 detectors.f95 diagnostics.f95 machine_name_long_PC.f90 math_constants.f95 mkdep_F95 platform.f95 precision.f95 upcase.f95 vectors.f95 The code was built for MacOSX using the Absoft Fortran 95 compiler V11 with the following switches: 64-‐bit code, Snow Leopard 10.6, Optimize=Advanced, Speed Math=2, StackSize=8MB, Auto-‐Parallelization, Auto-‐detect Host Architecture, Round to nearest , Fixed-‐Format source file with 132 character line length, Default Integer size=Integer*4, Static storage, External Names=lower-‐case with suffix=_, Common Block Names=Upper-‐case, Variable Names=UpperCase, Option Packages=UnixLibrary & IMSL library.
26
References [1] M. A. Furman and G. R. Lambertson, in Proceedings of the International Workshop on Multibunch Instabilities in Future Electron and Positron Accelerators MBI97 (KEK, Tsukuba, Japan, 1997), KEK Proceedings 97-‐17, edited by Y. H. Chin, p. 170. [2] M. A. Furman and M. T. F. Pivi, PRSTAB, Vol. 5, Issue 12, 0124404 (2003). [3] M.T.F. Pivi, and M.A. Furman, PRSTAB, Vol. 6, Issue 3, 0324301 (2003).
27
Appendix I. Notes on Posinst12 and early modifications at LANL Posinst12 Instructions Below are scanned images of instruction from Miguel Furman. First page is instructions for compiling and setting up the executable code from his version 12. The four pages afterward describe various switches and input file variables. The last page (6) gives some description of the features Larry added for “sieve” style detector slots and electric field from sweeping electrode.
Page 1
28
Page 2
29
Page 3
30
Page 4
31
Page 5
32
For the latest PC version we have added sieve style detector slots that act as black holes i.e., they absorb the electrons hitting them and generate no secondaries. Its parameters are in the second to last input line. We have also added a 2D electron sweeping electrode and its input parameters are in the last line. Details and an example of the input lines follow. For the slots: 0. 90. 9 0.5 0.2 0.7 5 0.5 alf0, dalf, nalf, falf, zlo, zup, nz, fz where alf0 is the central angle of the slot, 0 to 360 deg dalf is the slot width, 0 to 360 deg, 0=> no slot nalf is the number of equal segments to divide the width by, 0=> no slot falf is the fractional width of slot open in angle zlo is lower limit of slot along z, meters zup is upper limit " nz is the number of equal seqments to divide the length by, 0=> no slot fz is the fractional length of slot opening in z For the case above the slot is centered about 0 deg with a width of 90deg It is divided into 9 equal segments of 10 deg and each opening occupies 0.5 or 5 degrees. The slot goes from z of 0.2 to 0.7 meters and is divided into 5 equal segments with each opening occupying 0.5 of that length or 0.05 m. For the sweeping electrode: The last input line should have: electrode voltage(V), angular width of electrode(deg), central angle of electrode(deg), on-‐time(s), off-‐time(s), Emax (V/m) Page 6
33