Home
user`s manual (r585)
Contents
1. and p need to be advanced to the next layer in all the others can be expressed in terms of and p within the layer The initial conditions for 18 21 are 1 and pr 0 The necessary boundary conditions are py 0 De Tmax 0 By 0 BAT mee 0 0 22 Equations 18 21 are solved with the predictor corrector scheme 1V N Khudik and K V Lotov Jon channels produced by ultrarelativistic electron beams in a magnetized plasma Plasma Physics Reports v 25 1999 N 2 p 149 159 In the plane geometry the solved equations are OKY Op Op NpyBo o py Noy N E By4 y N 1 i bop 28 DE Ea Tap da S ga 1 p2 p 0 DE Np Np Bo Op Op z z a 2 Ba E ES Y B ZEI B N 24 p 20 Ox DB y p ae ag toe ee OB Np _ jp ON Ps Npe Nosh N pyBo 25 ar o r oro or 9 92 gt OB OB 0 max 0 E 0 Ez Tmax 0 A 0 26 Py 0 Py Tmax 0 Tmax ala orkess 26 3 3 Beam model The beam is modeled by macro particles Each beam macro particle is characterized by its longitudinal posi tion transverse position r or a three components of momentum pp charge q and mass m Equations of motion for the macro particles are dry dE dpe 2 g a Po ap br ae UE La HE x Bl 27 de qa a 2 qb Ub Ub pepe 27 These equations are solved with the modified Euler s method midpoint method The fields acting on the macro particle ar
2. Additional command line options can be provided after the executable name e Options option value overwrite options used in the main configuration file lcode cfg e Directives filename ext include other files containing configuration options e Special options interrupt the normal process of parsing command line parameters and terminate execution of the program with the following actions help or usage outputs a brief description of all possible configuration options dump or dump config outputs the already read values of configuration options to console To save the output to a file config cfg execute lcode exe dump config gt config cfg Windows or lcode dump config gt config cfg UNIX dump defconfig outputs the the configuration file with default values of options to console To save it to a file default cfg execute lcode exe dump defconfig gt default cfg Windows or lcode dump defconfig gt default cfg UNIX dump docconfig outputs the the configuration file with default values of options but in a more detailed format To save it to a file docconfig cfg execute lcode exe dump docconfig gt docconfig cfg Windows or lcode dump docconfig gt docconfig cfg UNIX If an option occurs several times in configuration files or command line then the later value is used The order of reading the values is the following 1 Initially all options have the default hard coded values the ones
3. a angle between the particle momentum and z axis beam angle scale daxx EE histogram output accel multichoice Output of histograms for accelerated particles only The same as histogram output but only beam macro particles with z momentum greater than output reference energy are taken into account Available options corresponding output quantities keys de termining histogram intervals and corresponding file names are t transverse momentum Por Or Ph beam pr scale dR EE z longitudinal momentum pz beam pz scale AZ FE M angular or y momentum My or Pey beam a m scale Cd EE a angle between the particle momentum and z axis beam angle scale Ao EE histogram type choice y Mode of the histogram output y or pictures Pictures only n or data Data files only F or both Both pictures and data files histogram bins integer 300 Number of histogram bins lt 3000 Nbins beam angle scale float 0 1 Axis size for the histogram of beam angular distribution The axis is from zero to this value 5 6 5 Trajectories of plasma particles These diagnostics visualizes trajectories of plasma macro particles in the simulation window either as the picture pp x png Fig 8b or as the data file pls where is the time The diagnostics works for kinetic plasma models only Each line of the data file contains 9 values correspond
4. 11 dark red points 0 or Xu transverse displacement of the beam dS 12 dark grey line Y V integral thermal energy flux Sf 13 dark grey line y integral total energy flux SEB 14 dark grey line Ww integral electromagnetic energy flux pri 15 dark blue line Dir OY Pix Taux off axis r or z momentum of plasma ions pf 16 violet line Pip OY Piy Taux off axis y or y momentum of plasma ions Ef 17 magenta line E or Ey Taux off axis y or y component of the electric field f xi type choice n Output mode for the functions of y or pictures Only pictures u png and v png are created Y or numbers Only data files ux swp and v swp are created F or both Both pictures and data files are created n or n No output of this kind axis radius float 0 Position of the probe line 1 rax auxiliary radius float 1 Position of the probe line 2 faux Two transverse positions at which functions of are output Both are measured from the geometrical axis in cylindrical geometry or middle of the simulation window in plane geometry It makes sense to put Tax 0 only if the beam goes off axis in plane geometry or if the plasma density is too noisy at the geometrical axis in cylindrical geometry The following parameters Xm determine the size of the vertical axis when drawing functions of Fig 7
5. In the plane geometry Apfoc is the addition to z momentum and the distance between the parti cle and the midplane of the simulation window is used instead of rp foc period float 100 Period of the external focusing tr foc strength float 0 01 Strength of the external focusing F 5 2 1 Newly generated beams The following beam options determine parameters of newly generated particle beams or rigid beams If the beam is allowed to evolve by rigid beam and the files beamfile bit and beamfile bin are present in the working folder then the beam state is imported from beamfile bin the time is read from beamfile bit and these options are ignored beam particles in layer integer 200 Number of beam particles in the layer lt 100000 N A beam slice which has the current Ibo and length Ag contains Np macro particles Beam slices with lower currents have correspondingly fewer macro particles beam profile string xishape cos length 1 Initial distribution of beam particles The name of the file that specifies the initial distribution of beam particles in 6d phase space or the initial beam distribution itself as a multiline description enclosed in triple quotes If the value consists of a single line without spaces or equal signs it is interpreted as a filename to read the beam distribution from otherwise the value itself is considered the beam distribution description The format of beam distribution is describe
6. mc fad Sec 6 1 rshape we m2c fi Sec 6 1 eshape 1 me Focusing strength mus F Strength of the external beam focusing Sec 5 2 foc strength Dimensionless qi Charge of i th plasma macro particle Sec 3 1 A Normalization factor for calculation of plasma currents and charge densities Sec 3 1 Unit vector in z direction Sec 3 2 N Quantity used by the fluid solver instead of the electron density Sec 3 2 y Relativistic factor of a plasma particle or of a fluid element Sec 3 2 N Number of grid steps in the transverse direction Sec 5 1 r step l Number of twofold reductions of the time step for a low energy beam particle Sec 5 2 beam substepping energy No Number of beam macro particles in the slice of current Iso Sec 5 2 1 beam particles in layer Das Maximum sub stepping depth allowed for the kinetic plasma model 0 4 Sec 5 4 1 substepping depth Asub Sensitivity of the substepping trigger Sec 5 4 1 substepping sensivity dy Fraction of beam particles to output Sec 5 5 write beam particles Ndraw Fraction of the simulation window to be drawn as the full window Sec 5 6 1 Nmr Number of grid points to be merged transversely into a single pixel on colored maps Sec 5 6 1 colormaps merging r Nme Number of grid points to be merged longitudinally into a single pixel on colored maps Sec 5 6 1 colormaps merging z Nay r Rate of data smoothing in transverse direction Sec 5 6 1 colormaps smoothin
7. or t Linear rise of the current I E LaLvo 0 ls T or T Linear decrease of the current I Lalvo 1 9 ls T or Y Constant current Lalvo h or half cos Rising half period of the shifted cosine Ia 0 5 Ia Igo 1 cos m 15 b or b Decreasing half period of the shifted cosine I 0 5 Ia Igo 1 cos r 1 II o g or g Decreasing part of Gaussian function with o 1 6 Ip 0 5 Ia Too exp 18 09 12 radius float 1 Radius of the beam segment 0 energy float 1000 Basic longitudinal momentum of beam particles poo vshift float 0 Transverse displacement of the segment used in plane geometry only xo 24 rshape choice g Initial distribution of beam particles in the transverse phase space Available options g or gaussian Random distribution with the probability density fir Ee exp ri Pin Pio axisymmetric beam LAYb Por Poy 2r0202p 20 2a2p y 1 xp x0 Dis Poy fi 2b Pox Poy exp plane geometry tte 217 3 20 ag Dio 207 205 Pio Here ay is the angular spread of the beam slice and x is measured from the central plane ry or regular The distribution with the same probability density as for gaussian but with a regular distribution of beam particles f or flattop Random distribution of particles with the flat
8. 5 6 5 21 glocf dat 5 5 15 xxx m swp 5 6 1 16 gmaxf dat 5 5 15 eeee4W swp 5 6 1 16 hystog dat 5 6 4 20 d swp 5 6 4 20 n1 dat 5 5 15 f1 sup 5 7 27 tt dat 5 5 15 partic swp 5 5 15 7 xe det 5 6 6 16 pl swp 5 7 26 meto det 5 6 6 19 tb swp 5 7 26 meter det 5 6 6 19 u SWp 5 6 2 19 xix e det 5 6 6 22 mito SWD 5 6 2 19 7 7 Temporary files Files aver swp digcol swp digcol2 swp bfile swp info swp 7 swp are temporary files and are always deleted in normal regimes 27
9. Sec 5 4 1 plasma profile Ltrap Path limit for trapped plasma particles Sec 5 4 1 trapped path limit si Check points for diagnosing beam survival i 1 6 Sec 5 5 output survival xi X40 Transverse displacement of the beam slice Sec 5 5 output beam slices Ry Xb Radius or half width of the beam slice Sec 5 5 output beam slices Emittance of the beam slice Sec 5 5 output beam slices Erom Eto Left and right boundaries of the subwindow Sec 5 6 1 subwindow xi from Tfrom Tto Bottom and top boundaries of the subwindow Sec 5 6 1 subwindow xi from Tax Taux Two transverse coordinates to output functions of at Sec 5 6 2 axis radius ls Length of the beam segment Sec 6 1 length E Distance to beginning of the beam segment Sec 6 1 xishape Es coordinate the segment begins at s lt 0 Sec 6 1 xishape Or Transverse size of the beam segment Sec 6 1 xishape Ox Length parameter for the Gaussian beam segment Sec 6 1 xishape o Transverse displacement of the segment Sec 6 1 vshift Velocities c y Velocity of a plasma macro particle or of an electron fluid element Sec 3 1 Sec 3 2 vi Velocity of i th plasma macro particle Sec 3 1 Ub Velocity of a beam macro particle Sec 3 3 Momenta me p Momentum of a plasma macro particle or of an electron fluid element Sec 3 1 Sec 3 2 Db Momentum of a beam particle not of a heavy macro particle Sec 3 3 AP foc Extra momentum gained by a beam particle due to extern
10. ee pe Or DE 3 10 2 OBZ 7 op Er Bo p jz a n ar Ie Ej B 4 Here we neglect the components j r and jp of the beam current and put jp pp since beam particles are assumed to move mostly in z direction To provide stability of the algorithm we solve in finite differences instead of 3 the following equations 010 _ Opt pv jr y 010 _ Ojo o ES Or o Ei ween ae By 5 where E and B are some predictions for fields E and B These equations are obtained by differentiation of 3 and substitution of 4 into the result Subtraction of the fields with or without the tildes from both sides of the equalities does not produce a big error if the predictions are close to final fields The boundary conditions for equations 4 5 are those of a perfectly conducting tube of the radius rmax max 0 B 0 B 0 Ez Tmax Br Tmax 0 2nrB dr nr Bo 6 0 where Bo is an external longitudinal magnetic field if any the presence of this field does not change the axial symmetry of the system Each plasma macro particle is characterized by 7 quantities transverse coordinate r three components of the momentum Ppr Py and pz mass M charge q and ordinal number Parameters of plasma macro particles are initialized ahead of the beam at 0 and then advanced slice by slice according to equations dp _ d dt q bg dr vr Sa Pp d dt d E E rx 8 de q 1 ME
11. fields are calculated second time the earlier found average radial fields are used as E and B Also special efforts are made to suppress a small scale of the grid step size plasma density noise The algorithm allows easy shortening of the step in the regions of a fine field structure The shortening is made automatically if the plasma current density j exceeds some threshold value In the plane geometry instead of equations 4 5 we solve 0 Ez _ Opt po je By O 5 Ox Es Ox OE Es Ox Bz o Ba 9 E By OE OB O E By z3 a jr y Ey Bz 2 Su 1 Ae pj oe i Da dy y dE j 10 The last equation is used only at x 0 9 max to find the integration constant for By The boundary conditions in the plane case are E 0 Bz 0 EPs Br Tmax 0 f B dx TmaxBo 11 3 2 Fluid plasma model In the fluid approximation the plasma is characterized by the density ne and momentum p of the electron component Plasma ions are the immobile background of the density n 1 Motion of the electron fluid is governed by the equation Op gt gt On 0v 9 E ox Bl 12 which together with 1 and j ned p l nm P y 1 vV1 P 13 forms the complete set of equations This set has two constants of motion The first one was derived by Khudik and Lotov B rotp n Bo v 14 where Bo is the unperturbed longitudinal magnetic field ahead of the beam The second one is w
12. in the histogram form either as a picture d png Or as a data file d swp where 7 shows the content and is the time If a macro particle falls outside the chosen histogram interval the particle is ignored Vertical size of the pictures in pixels is determined by beam picture height Fig 8a The picture height in physical units equals the highest column To retain the normalization the line of 3 values is appended to file hystog dat each time a histogram picture is produced These values are 1 Time 2 Histogram type second character of the filename 3 Height of the highest column The data files for histograms have 2 columns 20 1 Number of the cell 2 Number of macro particles in this cell Nbins pixels Emax AE Nme pixels pixels hig pixels Mdraw max n Ar Nm Mdraw max Units v Pb ref Emax E 0 a Ym b Figure 8 Exemplary histogram of beam longitudinal momentum a and trajectories of plasma particles in the blowout regime b histogram output multichoice Output of various beam properties in the histogram form Available options corresponding output quantities keys determining histogram intervals and correspond ing file names are T transverse momentum pp Or Ph beam pr scale Cairns EE z longitudinal momentum p z beam pz scale dz xx P28 M angular or y momentum M or Pey beam a m scale dmx EE
13. scale of beam evolution is much longer than the period of plasma wave Various details of LCODE and underlying physics are described in the following papers e K V Lotov Simulation of ultrarelativistic beam dynamics in plasma wake field accelerator Phys Plasmas 5 1998 p 785 791 The fluid plasma model e K V Lotov Fine wakefield structure in the blowout regime of plasma wakefield accelerators Phys Rev ST Accel Beams 6 2003 p 061301 The beam model and the kinetic plasma model e K V Lotov Blowout regimes of plasma wakefield acceleration Phys Rev E 69 2004 p 046405 Energy fluxes in the co propagating window e K V Lotov V I Maslov I N Onishchenko and E N Svistun Resonant excitation of plasma wakefields by a non resonant train of short electron bunches Plasma Phys Control Fusion 52 2010 p 065009 Discussion on applicability of quasi static codes to simulations of long beams e K V Lotov A Sosedkin E Mesyats Simulation of Self modulating Particle Beams in Plasma Wakefield Accelerators Proceedings of IPAC2013 Shanghai China p 1238 1240 Upgrade of the kinetic plasma solver which was necessary for simulations of long beams 2 Notation and units of measure We use cylindrical coordinates r p for the axisymmetric geometry and Cartesian coordinates x y for the plane geometry The beam propagates in positive direction The code works with dimensionless quantities Uni
14. the measure of beam plasma energy exchange Tmax Joz E 27r dr 32 0 ow _ DE 2K V Lotov Blowout regimes of plasma wakefield acceleration Phys Rev E v 69 2004 N 4 p 046405 Thus the drive beam puts energy to some point of the simulation window and then this energy flows backward or transversely until it exits the window or gets taken by a witness beam The difference between Y and Wy can serve as a measure of the lost energy which cannot be retrieved by the accelerated beam In the absence of beams and nearby walls the derivative OY must be zero this can be used as a good test of precision for simulations The total energy density and fluid energy density are defined in the straightforward way E B B E B B ES Gie Mae Hea 2 2 ne y 1 33 correspondingly summation is over plasma particles the unit volume 4 Running the code To run LCODE execute the file 1code exe Windows or lcode UNIX execute with lcode in the folder where the necessary input files are located Possible optional input files are 1code cfg the default configuration file Sec 5 beamfile bin the beam state file Sec 7 1 beamfile bit the continuation run indicator Sec 7 2 plasma bin the plasma state file Sec 7 3 fields bin the fields state file Sec 7 4 arbitrarily named other configuration files Sec 6 the beam constructor file see beam profile
15. the run by the dot so that the run can be continued without data loss save plasma y n n Saving the plasma state The plasma state at the end of the simulation window is saved to files p1 swp plasma particles and fl x swp electric and magnetic fields Formats of the files are the same as those of plasma bin and fields bin Sec 7 3 7 4 Option works for kinetic plasma models only Independently on this key in regimes with plasma continuation the final plasma state is saved to plasma bin and fields bin on reaching the time limit tmax or after manual interruption of the run by the dot so that the run can be continued without data loss The run can be resumed from any saved time by changing the content of beamfile bit to renaming tb swp to beamfile bin and if necessary renaming pl swp to plasma bin and fl swp to fields bin Any changes in code options e g changes of diagnostics will take effect on the resumed run 5 8 Logging preferences log stdout level choice d Verbosity level for printing messages log file level choice w Verbosity level for logging to a file 699 999 299 e or error Output error messages only w or warning Output error and warning messages 99 or info Output error warning and info messages 2 d or debug Output error warning info and debug messages Dp pi 7 699
16. to the midplane x rmax 2 is used instead of r plasma width float 2 Main parameter of initial plasma density distributions rp plasma width 2 float 1 Auxiliary parameter of initial plasma density distributions pa plasma density 2 float 0 5 Auxiliary parameter of initial plasma density distributions np2 n r Mp2 ed 0 p2 Ip max 0 max 2 6 max a r b Figure 4 Illustration of possible plasma profiles in axisymmetric a and plane b geometries plasma temperature float 0 Initial temperature of mobile plasma particles in units of mc 13 ion model choice y Model of plasma ions Y or mobile Half of plasma macro particles are single charged mobile ions initially located at the same positions as plasma electrons y or background Ions are immobile background charge n or absent No ions plasma electrons are initially at rest ion mass float 1836 Ion mass in units of the electron mass for mobile ions substepping depth integer 3 Maximum sub stepping depth allowed 0 4 Dss Substepping is usually needed for strongly nonlinear wakefields when some plasma particles are close to trapping If necessary the longitudinal grid step can be automatically reduced up to 10 times with respect to the basic xi step substepping sensivity float 0 2 Sensitivity of substepping trigger Asub If the longitudinal current density j is so high that the prod
17. 1 Transverse coordinate of the macro particle r or x counted from the bottom of the simulation window 2 First component of the transverse momentum p or p of the macro particle not of a single electron or ion It equals the particle velocity times relativistic factor times mass of the macro particle 3 Second component of the transverse momentum pp or py of the macro particle 4 Longitudinal momentum pz of the macro particle 5 Mass of the macro particle For uniform electrons of the unit density i e of the density no the mass is just the cross section corresponding to this macro particle it is a ring in the cylindrical geometry or a rectangle in the plane geometry For heavier particles the mass is correspondingly greater 6 Charge of the macro particle It is the mass times the real charge to mass ratio for particles of this sort When the run is normally terminated or interrupted in the regimes of a long plasma the final parameters of all macro particles are automatically saved to plasma bin If the run is then continued the initial plasma 26 parameters are taken from plasma bin The same happens if a new run is started with an arbitrary initial plasma profile 7 4 fields bin File fields bin contains information about the fields and plasma currents Each line in fields bin corresponds to a grid point Number of lines is N 1 number of grid steps plus one Each line
18. 3999 1 log filename string Icode log Name of the file to log to log file clean y n y Remove empty log file If enabled then empty log files are automatically removed at the end of the run if any save config y n y Enable saving config to a file save config filename string Icode runas cfg Name of the file to save the current config to This config includes the final version of all parameters including those set by command line switches This may become useful in later debugging for exact replication of the execution process and especially after config recovery as it reflects the automatic changes introduced by the recovery process 6 Initial beam shape There are two ways to define the initial distribution of beam particles in the six dimensional phase space The first way is to specify all necessary parameters for each beam macro particle For this information about the macro particles must be written to the binary file beamfile bin by an external program The initial time must be written to the text file beamfile bit The code will read this information as the initial state of the beam The second way is to specify macroscopic parameters for individual beam segments A segment is a beam piece of variable length ls The segments follow one by one starting from the beginning of the simulation window at 0 A description of a segment has the format 23 parameteri valuel parameter2 value2 p
19. Er first transverse component of the electric field E or Ez entres w EE Ef second transverse component of the electric field EK or Ey ef rtor w Ez z component of the electric field E ezo w EB Phi wakefield potential iseees w EE Bf w or y component of the magnetic field B or By Coge w E Bz perturbation of the longitudinal magnetic field B Bo bz x gt w T pr first transverse component of the electron momentum Per Or Pex proves w Sap pf second transverse component of the electron momentum Pey OT Pey pf w ap pz z component of the electron momentum pez pace w EE pri first transverse component of the ion momentum Pir Or Pix irar w E pfi second transverse component of the ion momentum Pip OF Piy ibero w com pzi z component of the ion momentum Piz izr w EB nb charge density of particle beams pp abi w EB ne perturbation of the plasma electron density ne 1 nes w EB ni perturbation of the plasma ion density n 1 ni tee w E Sf z component of the total energy flux density e f d S sb w EE Sr r component of the total e f d S artes w E dS z component of the thermal e f d S Spz sao w 20 Sf2 r weighted z component of the total e f d 27rr S Qe w EE Sr2 r weighted r component of the total e f d 2arS 2ra
20. Ffrom E to 3 from cells b c Figure 5 Physical and pixel sizes of the full window colored map a and subwindow colored map b elementary smoothing procedure c colormaps merging r integer 1 Merging in r grid points Nmr colormaps merging z integer 1 Merging in grid points Nme These numbers control output of one average value from several grid points Fig 5a Values from the specified number of grid points Nmr in r and Nme in are added together and divided by the number of points NmrNme This procedure is made after the passage of the whole simulation window when all the values are written to an auxiliary file The subwindow output is not affected by these options colormaps smoothing r integer 0 Averaging in r times Nay r colormaps smoothing z integer 0 Averaging in z times Nay Smoothing out data arrays prepared for drawning as color maps The elementary smoothing procedure consists in delivering 1 4 of the value per adjacent cell Fig 5c The procedure is repeated Nay times in r direction and Nav times in direction Smoothing is made after merging of grid points if any palette choice d Colormap palette default greyscale hue bluewhitered Coloring method used to display values of functions on r plane Fig 6 d or default Distinctly colored palette g or greyscale Greyscale palette h or hue Hue equidistant palette b or bluewhite
21. LCODE user manual K V Lotov A P Sosedkin July 14 2015 branches stable r584 Contents 1 Overview 2 Notation and units of measure 3 Underlying physics 3 1 Kinetiesplasma model inca ele Be Bae Rene ee eee Sete eee ae ass 3 21 Fluid plasma model 24 Si 4a 4 a4n5 as Paw ees Sa deed Peco wee sles eae s 3 3 Beam model Teta aa e a a ee ek A ee 3 4 Energy fluxes and energy densities e 4 Running the code 5 Configuration file Orly Simulation areas tk dol hk de eS Ee ee Pe ee el A beh eg 5 2 Particle beams 2 9 2 2000 2 8 Gee Fa Sh A ee PE ee oh See eo eS 5 2 1 Newly generated beams m nese tdt a ai AAA Gd Qo GP WP ee a ee a 5 3 Laser beams ece a fee ee a a ae ee a Ea ee a ee pA Plhsmas aot oe OSs Be ie A eg Sei oe ae a 2 A Ok fe NE oie hh Se et 5 4 1 Options specific to particle plasma models o 0000000 eee 5 4 2 Option specific to the fluid plasma model o a 5 5 Every time step diagnostics 5 6 Periodical diagnostics eo e RRA a o a ee ee 561 Colored MAPS vic ey A OE AA AA DAA A ele ADA y 5 6 2 Functions of 6 5 4 3 a a a EE a A A A a ee 5 6 3 Beam particle information as pictures e 5 6 4 Beam information as histograms 0 0 0 0 a 5 6 5 Trajectories of plasma particles ooa e 5 6 6 Detailed substepped plasma response osooso Dut DAVIN GeTUM Stale Da Gee train cores a Beles Moe Ide ae er ge Reg ete aes es el ee Bk 5 8 Logging preferen
22. RA 7 If a particle hits the wall at r rmax it is returned to the simulation area to some near wall location with zero momentum Plasma current and charge density are obtained by summation over plasma macro particles lying within a given radial interval IAN AY i i 1 Uzi 8 1 Uzi where A is a normalization factor The denominator in 8 appears since the contribution of a particle tube to density and current depends on the macro particle speed in the simulation window Calculation of plasma response of plasma response oO window layer b trajectory of a plasma particle i in simulation Edi beam propagation Figure 2 Calculation of plasma response in the quasi static approximation The plasma response is calculated layer by layer towards the decreasing from right to left in Fig 2 As far as for calculation of fields we need derivatives of currents the following predictor corrector scheme is used We first move plasma particles from layer a to layer b by the fields of the layer a then calculate currents in layer b then calculate all fields in layer b then move plasma particles from layer a to layer b by average fields of layers a and b then again calculate currents and fields in layer b then again move plasma particles from layer a to layer b by the average fields When the fields are calculated first time the radial fields from the previous layer are taken as E and B When the
23. The axis is 19 0 Xm for fixed sign quantities Xm Xm for sign changing quantities For ion and electron densities the axis type depends on Xm if Xm gt 1 then 0 Xm the absolute value of the density is drawn if Xm lt 1 then Xm Xm the density perturbation is drawn E scale float 1 Most of the fields Er Ef Ez Ez2 Ez Bf Fr Phi scale float 1 Wakefield potential Phi Bz scale float 1 Longitudinal magnetic field Bz Bz2 electron momenta scale float 1 Electron momenta pr pf pz ion momenta scale float 1 Ion momenta pri pfi pzi beam radius scale float 5 Beam width and displacement rb nb scale float 1 Charge density of particle beams nb nb2 ne scale float 2 Density of plasma electrons ne ni scale float 1 Density of plasma ions ni flux scale float 1 Integral energy fluxes dS Sf SEB energy scale float 1 Energies per unit length dW Wf emittance scale float 5 Beam emittance emitt 5 6 3 Beam particle information as pictures These keys control output of beam portraits in various parameter spaces The selected beam macro particles are drawn as cyan dots in pictures png where shows the content and is the time output beam particles multichoice A list of beam projections to b
24. al focusing Sec 5 2 focusing De Momentum of a plasma electron Sec 5 6 1 colormaps full Di Momentum of a plasma ion Sec 5 6 1 colormaps full Pb ref Reference value for displaying beam momentum Sec 5 6 4 output reference energy Poo Basic longitudinal momentum of beam particles in the segment Sec 6 1 energy Pa Auxiliary value of the longitudinal momentum for the beam segment Sec 6 1 espread Angular momentum mC Wy Mb Angular momentum of a beam particle Sec 7 1 Masses m M Mass of a plasma macro particle Sec 3 1 Mb Mass of a beam particle Sec 3 3 Number densities no Ne Density of plasma electrons Sec 3 2 Sec 5 6 1 colormaps full ni Density of plasma ions Sec 3 2 Sec 5 6 1 colormaps full n r Initial transverse profile of the plasma density Sec 5 4 1 plasma profile Np2 A parameter for some plasma density profiles Sec 5 4 1 plasma profile Charge densities eno p Charge density of the plasma Sec 3 1 Pb Charge density of the beam Sec 3 1 Sec 5 6 1 colormaps full Current densities echo j Total current density of plasma particles Sec 3 1 Jo Current density of the beam Sec 3 1 Charges e q Charge of a plasma macro particle Sec 3 1 db Charge of a beam particle Sec 3 3 Currents mc e Iro Base beam current Sec 5 2 beam current l Current of the beam slice Sec 6 1 xishape Fields Eo mcwp e E Electric field in the plasma Sec 3 1 B Magne
25. arameterN valueN If a parameter definition not followed by comma then it is considered as the last one in the description of this segment A description must contain at least one parameter defined Segment descriptions follow one by one in beam profile or in a separate file which beam profile refers to Numerical parameters can be specified in scientific notation like 1e6 and postfixed with PI or Pi which acts like multiplication by 3 1415926 If a parameter is not explicitly defined in the segment description then it is assigned the default value The initial default values are given in the following description To modify default values for all subsequent segments a special line prefixed with default can be used This line has the same syntax as segment descriptions but does not define any segment and only changes the default values of some parameters Re definition of default values can be made several times 6 1 Segment parameters length float 2PI Length of the segment ls ampl float 0 5 Maximum current in the segment Iq Maximum current for this segment in units of beam current Iyo xishape choice c Dependence of the beam current on the longitudinal coordinate Iy In the following variants the formulae are applicable in the interval ls gt 9 gt 0 where d s and the segment starts at s lt 0 c or cos Shifted cosine shape 0 5 Ig Ip9 1 cos 276 1 t
26. ces i dos cos eia de E a a eae e a a a a a a a a bha 6 Initial beam shape 6 1 Segment parameters v ot a EAA Ee A ea a AE ee Aa Bs 6 2 Example ofa beam profile mss gop ao aie a d e BA al aa a ee ee ee ae 7 Format of other input and output files TA be amifile Dil cda a a ee a AOE AS A ee ee eee a aE 2 bearitle Bit tote evans Gite ieee eh Sak Re Read a el athe ton a ae le Ae ae o gt PlASMAS DINGS Sd den A 4 Poe eR ds ate ae ele Mee eA Ala amp bie le e et Ao fields DIM a i ts it BAILS ack Gees A eet ele e eke eee be ey A ee am ee 76 Diagnostics Ales di ack se ek ee BED Geshe Goh YARNS SEE ee ele Sas fet Lemporaryles me na te iss tte O ar foe de te atte Pe Paces Gils Pa Bow 1 Overview LCODE is a freely distributed code for simulations of particle beam driven plasma wakefield acceleration The code is 2 dimensional 2d3v with both plane and axisymmetric geometries possible In the code the simulation window moves with the light velocity and the quasi static approximation is used for calculating plasma response The beams are modeled by fully relativistic macro particles The plasma is modeled either by macro particles kinetic solver or as the electron fluid fluid solver Transversely inhomogeneous plasmas hot plasmas non neutral plasmas and mobile ions are possible with the kinetic solver The code is furnished with extensive diagnosing tools which include the possibility of in flight graphical presentation of th
27. charge density of the beam Ez 4 green line E Tax on axis z component of the electric field Ez 5 white line Eaz average longitudinal electric field acting on the beam slice Ba 6 dark red line Bz Tax Bo on axis z component of the magnetic field Phi 7 yellow line D Tax on axis wakefield potential pz 8 dark green line Dez Tax on axis z momentum of plasma electrons emitt 9 green points emittance of the beam slice dW 10 dark grey line dWint thermal energy per unit length WP 11 dark grey line Wint total energy per unit length ni 12 white line NilTax on axis density of plasma ions pzi 13 dark green line pPiz rax on axis z momentum of plasma ions Second group v k EE nb 2 blue line Po Taux off axis charge density of the beam Er 3 cyan line E or Ex Taux off axis transverse electric field Ez 4 green line Ez Tanx off axis longitudinal electric field BP 5 brown line By or By Taux off axis y or y component of the magnetic field Bz2 6 dark red line B Taux Bo off axis z component of the magnetic field Fr 7 yellow line average focusing force Paur Pax Taux Tax pr 8 dark blue line Per OY Pex Taux off axis r or z momentum of plasma electrons pf 9 violet line Pep OF Pey Taux off axis y or y momentum of plasma electrons rb 10 red points Ry or Xp radius width of the beam
28. contains 8 values Er Ey Ez By Bz Pr Py Pz for cylindrical geometry and fluid plasma model Ez Ey Ez By Bz pz Py pz for plane geometry and fluid plasma model Er Ey Ez By Bz jr Jp jz Tor cylindrical geometry and kinetic plasma model Ez Ey Ez By Bz jz jy jz Tor plane geometry and kinetic plasma model Here pa are components of the electron momentum ja are components of the total current density When the run is normally terminated or interrupted in the regimes of a long plasma the final fields are automatically saved to fields bin For kinetic plasma models the run can be then continued with the initial fields taken from plasma bin The same happens if a new run is started with an arbitrary initial plasma profile 7 5 r det This file contains auxiliary information for subwindow diagnostics Sec 5 6 1 5 6 6 If any sub window diag nostics is on then 3 values are written not appended to file fx x x x det where is the time 1 Transverse grid step 2 Lower boundary of the sub window 3 Number of steps inside the sub window 7 6 Diagnostics files These files are generated by diagnostic tools described in corresponding sections of the manual and their format is explained on the following pages File name Section Page File name Section Page beamlost dat 5 5 15 captured pls 5 5 14 elocf dat 5 5 15 s pls 5 6 6 21 emaxf dat 5 5 15 pls
29. corresponds to the current through c w in the third dimension Also the unit current for beam macro particles rigid beam y n n Switch for evolution of the beam y or yes A rigid not evolving in time distribution of the beam current n or no The beam is modeled by macro particles 11 beam substepping energy float 2 Substepping energy for the beam Wss The threshold of reducing the time step for beam particles For each beam particle the minimal integer l is found that meets the condition 27 1 pp gt Wes and the reduced time step At at 2 is then determined Plasma fields are calculated with periodicity At and each beam particle is propagating in these fields with its own time step At This feature is particularly useful if low energy beam particles are present in the system which otherwise would require undesirable reduction of the main time step At focusing choice n External focusing for the beam n or no No focusing or cosine Cosine varying focusing force Each beam particle located at radius r at each time step gets the extra radial momentum Ap foc F srpAt cos 27t tr T or rectangular Piecewise constant focusing force Each beam particle located at radius rp at each time step gets the extra radial momentum APfoc Frat where is chosen if the fractional part of t tp 0 25 is less than 0 5 and is chosen otherwise
30. d in Sec 6 beam tune charge y n n Tuning the charge of beam particles to match the beam profile better n or no All beam particles are equally charged Only the absolute value of the charge can be different Consequently the beam current can have only discrete values and therefore slightly differs from the specified value y or yes The charge of particles in each beam slice is slightly modified to better match the specified beam profile This option lowers the shot noise produced by the beam rng seed integer 1 Random generator seed An integer number initiating the generator of random numbers Different seeds generate different statistical ensembles for the beam 5 3 Laser beams laser choice n Enable laser beams Option is under construction 12 5 4 Plasma plasma model choice P Plasma model P or fluid The fluid model It is the fastest one but works only for the initially uniform plasma with immobile ions Neither wave breaking nor near wall plasma perturbations are allowed p or particles Obsolete kinetic model P or newparticles New kinetic model described in Sec 3 1 magnetic field float 0 Variation amplitude for the external longitudinal magnetic field B70 For zero B o the code runs faster since some equations which are identically zeros are not solved magnetic field type choice c Time dependence of the external magnetic field seen by
31. d more precisely than those of the field extrema The latter are found as multiples of the grid step A output beam survival y n n Output of the number of survived beam particles output survival xi string 2 4 6 8 10 12 Check points for diagnosing beam survival 6 negative values separated by commas in the descending order s i 1 6 If enabled then a line of 7 values is appended to file n1 dat at each time step 1 Time t 2 7 Number of survived beam macro particles with gt amp The information is written by one value immediately after passing s output beam slices y n n Output of beam characteristics at selected cross sections output slices xi string 2 4 6 8 10 12 Cross sections for diagnosing beam properties 6 negative values separated by commas in the descending order If the diagnostics is enabled characteristics of 6 beam slices are appended to files tt dat where is a cross section number 1 6 When the slice is passed 6 values are appended to the corresponding file 1 Time t On axis electric field E at this Emittance e of the slice Beam transverse displacement X 0 is nonzero only in the plane geometry Beam radius Ry or half width Xp Number of beam macro particles in this layer Ao WD write beam particles y n n Output of individual characteristics of beam particles If the diagnostics is enabled then the following information abo
32. e drawn Beam macro particles can be output on the following planes in the following files t r amp plane real space p png pr por E plane transverse momentum r png pz poz plane longitudinal phase space z x png M Mp plane angular momentum m png draw each integer 20 Fraction of beam macro particles to be drawn Dy A beam macro particle is drawn if its ordinal number is a multiple of Dp beam picture height integer 300 Height of figures in pixels hag This number determines the vertical size of f xi graphs histograms and beam portraits except the real space portrait The latter has the same height as colored maps equal to Naraw max AT Nmr output reference energy float 1000 Reference value for displaying beam momentum Ph ref The following parameters Ym determine the size of the vertical axis for corresponding beam portraits beam pr scale float 100 Axis is Ym Ym for r momentum of beam particles pr beam a m scale float 100 Axis is 0 Ym for the angular momentum of beam particles M beam pz scale float 2000 Axis for z momentum of beam particles pz The latter axis depends on the ratio between Ym and output reference energy pp ref If Ym gt Pb rer the axis is 0 Ym otherwise it is pp ref Ym Po ref Ym 5 6 4 Beam information as histograms These keys control output of beam characteristics
33. e fluid model to work beyond the applicability area Reasonable values are between 0 and 0 01 5 5 Every time step diagnostics If activated these diagnostics work at each main time step At indication line format choice 1 Format of the on screen progress indication 1 or eachdt One line each time step time total number of survived beam macro particles maximum and minimum electric field E on the axis 2 or eachdxi One line each step time E on axis total energy flux Y number of beam macro particles in this layer number of sub steps in within the last step Location of the axis is determined by axis radius After finishing a time step just before draw ing pictures the word finished is printed output Ez minmax y n n Write absolute extrema of the on axis E into emaxf dat output Phi minmax y n n Write absolute extrema of the on axis into gmaxf dat output Ez local y n n Write local extrema of the on axis E into elocf dat 14 output Phi local y n n Write local extrema of the on axis into glocf dat If enabled a line of 5 values is appended to the corresponding file immediately after an extremum is found 1 Current time t 2 The maximum value of the quantity 3 coordinate of this maximum 4 The minimum value of the quantity earlier found in case of local extrema 5 coordinate of this minimum Locations of the potential extrema are calculate
34. e linearly interpolated to the predicted macro particle location at the half time step If a particle has a small longitudinal momentum and thus a high frequency of betatron oscillations then the time step for this particle is automatically reduced With no external magnetic field By 0 the angular momentum of beam particles must conserve so the azimuthal component of the momentum p is not changed according to 27 but reconstructed from the condition rppy const 3 4 Energy fluxes and energy densities In the presence of beams there appears energy flows in the co moving window These flows are composed by the energy flow in the laboratory frame and the energy transfer due to motion of the window We can write the perturbation to the dimensionless flux density of the electromagnetic energy gt E B B2 PA BR Cae Bx Bl 28 and the total energy flux density in the co moving window S Se Soy 1 0 ez 29 where the summation is carried out over plasma particles in the unit volume For the fluid plasma model the energy flux density is Sp Se nely 10 30 The difference of the two Sas f is the measure of the energy carried in the form of a thermal motion of plasma particles Integrating 28 30 across the simulation window gives us the energy fluxes against the z axis Y Sez 27r dr Y S 2rr dr Up f Sp 27r dr 31 0 0 0 It is easy to check that the total energy flux is
35. e results The essence of the quasi static approximation is illustrated by Figure 1 When we calculate the plasma response the beam is considered as a rigid not evolving in time distribution of charges and currents which propagates with the speed of light c The fields generated by this beam depend on the longitudinal coordinate z and time t only in combination z ct and can be found layer by layer starting from the beam head Since the beam is not changing all particles started from some transverse position ro copy the motion of each other and their parameters transverse coordinate and momenta can be found as functions of Thus a plasma macroparticle in the quasi static model is not a big particle but a particle tube i e a group of real particles started from a given radius with a given initial momentum This greatly reduces the memory required for storing plasma particles simulation window perfectly conducting walls i r ee eat ve i o Z fee dea om Po 7 o e A a O o A A PP a unperturbed plasma before the beam b Figure 1 Geometry of the problem a and trajectory of a plasma particle in the simulation window b The calculated fields are then used to modify the beam For highly relativistic beams the time step At for beam particles can be made large which speeds up simulations several orders of magnitude The quasi static approximation is thus useful if and only if the time
36. ell known and comes from conservation of the generalized momentum D V pz 15 where is the wakefield potential 09 O E Er By 16 ot e Or It is convenient to use the quantity N ne 1 vz instead of the electron density ne and explicitly use the continuity equation which takes the form ON _10rNp 1 0 ror ty The final set of solved equations is in the order of solving 09 Op 0Pz Np Bo 10 009 ON iS LB p eean Veta 18 DE EA Taa OF ts 0109 NPo __p ON 14 po p DE Np 19 Or r Or P Bb ar fe 20 i r p N p Bo OP 10 B E B gt BN 20 4 0 r Or ee ac 20 010 N Ojo N m OrNp Np E N p Bo Bo z H E 21 arr r r Pear 21 br r p2 p2 Equations 18 are the first equation of 16 the y component of 14 combined with 15 and the first equation of 4 Equations 19 are the z component of 14 differentiated with respect to r and combined with the third equation of 4 the definition of 15 with the relativistic factor taken from 13 and the second equation of 4 Equations 20 are the last equation of 4 the r component of 14 and the z component of 14 To obtain equation 21 we differentiate the z component of the first equation in 1 with respect to r use the expression 19 for OE Or and exclude derivatives of N 9 and p with the help of 17 and 18 In equations 18 21 only two quantities
37. error message and terminates 2 the program was stopped manually with the dot key 3 the program was interrupted manually with the escape key The option values are validated after reading If some values are invalid then the program attempts an automatic config recovery which consists of resetting the invalid values to the hardcoded defaults This action is indicated by warning messages An example of a config recovery session is invalid histogram bins 0 Must be positive and lt 300 was reset to default 300 config recovered Error filling config invalid config some defaults used The config is still valid though Trying to use a recovered config If the recovery has been completed successfully the program attempts execution with the recovered config The final possibly recovered configuration values at the start of computations are written to 1code runas cfg to ease the diagnostics see save config save config filename 5 Configuration file The configuration file is a text file containing the list of options in the form option value or option value The order of options is of no importance If an option is specifies several times the later value is used Several options may coexist on the same line of the file if they are separated by semicolons Semicolons may be omitted in several cases but it is strongly recommended not to rely on that The configuration file can contain comments or empty lines which are ign
38. erwise Ar is automatically increased xi step float 0 05 Longitudinal grid step A time limit float 200 5 Time limit for the run tmax To insure against round off accumulation put here a somewhat greater value than the last time moment you wish to calculate time step float 25 Main time step for the beam At continuation choice n Mode of plasma continuation Fig 3 n or no Evolution of the beam Every time step the beam enters an unperturbed plasma of a prescribed profile y or beam Evolution of the beam sequence Every time step except the first one the beam enters the perturbed plasma the plasma state is taken from the end of the previous simulation window Does not work for the fluid plasma model Y or longplasma Evolution of the plasma A long beam creates the wake and long term behavior of this wake is followed by the sequence of simulation windows In this mode only a rigid beam can extend to several simulation windows Does not work for the fluid plasma model Latter two regimes need At Emax otherwise At is automatically corrected t y tn simulation windows y At E z ct max Figure 3 Illustration of continuation modes 5 2 Particle beams beam current float 0 1 Base beam current in 17 kA Ibo The common multiplier in units of mc e 17kA for dimensionless beam currents specified in beam profile In the plane geometry
39. g r Nave Rate of data smoothing in longitudinal direction Sec 5 6 1 colormaps smoothing r Xm Ym Substitutes for axis dimensions Sec 5 6 2 Sec 5 6 3 D Fraction of beam macro particles to be drawn Sec 5 6 3 draw each hfg Height of various pictures in pixels Sec 5 6 3 beam picture height Nbins Number of histogram bins Sec 5 6 4 histogram bins Ain Minimum relativistic factor for the plasma particle to be drawn Sec 5 6 5 trajectories min energy Cstep Color step for visualization of particle energies Sec 5 6 5 trajectories energy step Neol Ordinal number of a color in the palette Sec 5 6 5 trajectories energy step Qb Angular spread of the beam slice Sec 6 angshape Qo Maximum angular spread in the segment Sec 6 angspread La Maximum current in the beam segment Sec 6 1 ampl Throughout the manual the following highlighting conventions are used filename ext names of various files small typewriter font in parentheses command opt execution commands typewriter font option configuration option boldface 3 Underlying physics 3 1 Kinetic plasma model The equations solved for the fields are Maxwell equations which in the dimensionless variables take the form ot OE OB An rot B j je rot E _ div E p p div B 0 1 Ot Ot Under the quasi static assumption o o o Fa gt 2 Oz t oE equations 1 result in 10 Ez 10 OB Pr Eye Er AE 7 B Rope
40. he interval fi Pez pro Pa if poo gt Poz gt Pa f Pez 0 otherwise T or linear Linear energy growth from pa to peo filz Poz poo 6 ls pa 1 SE ls be ian G distributi e7 Pox Peo 2pa g or gaussian Gaussian distribution fi poz Jan N or N N monoenergetic fractions N is a digit 2 9 N 1 fez Y poz pi Pi Da i 0 1 N 1 peo Pa m q float 1 Absolute value of mass to charge ratio compared to the electron 25 6 2 Example of a beam profile default angspread 3e 3 energy 2000 xishape cos ampl 1 length 6PI xishape len ampl 0 length 1e6 The first line redefines the default values for two options The second line defines the beam segment of the length 67 current 0 5 Iy9 1 cos 3 and Gaussian transverse distribution hardcoded default value with o 1 hardcoded default value and a 0 003 hardcoded default dependence new default value All particle in the segment have the same longitudinal momentum hardcoded default distribution that equals 2000 new default value Particles are either electrons or positrons depending on the sign of Igo The second line defines the space extending from 6m to 1000000 6r with zero current and thus no particles 7 Format of other input and output files 7 1 beamfile bin This file contains information about beam macro particles
41. in the binary form For each particle 8 values are are written 8 bytes each type double These values are 1 Longitudinal position amp Transverse position r cylindrical geometry or x plane geometry Longitudinal momentum pbz Transverse momentum pp cylindrical geometry or Por plane geometry Angular momentum M cylindrical geometry or third momentum component pp plane geometry Absolute value of the charge to mass ratio compared to electron Charge carried by the macro particle The charge unit is A mc 2e 8 Ordinal number of the macro particle As follows from the data format the actual beam density depends on the longitudinal grid step xi step If the beam generated with some A is used in a continuation run with different A then the beam density seen by the code will differ from the original one by the ratio of grid steps The reason is that different number of macro particles add together to form the total beam current in each particular grid layer PS EDO The last macro particle in beamfile bin always has 100000 0 and serves as the end of file sign 7 2 beamfile bit Contains the current time a decimal number in the text form and serves as the indicator of the continuation mode If this file is present the code tries to continue a previous run 7 3 plasma bin File plasma bin contains information about plasma macro particles one line for one macro particle It has 6 columns
42. ing to one position of one macro particle 1 Current coordinate 2 Number of the macro particle 3 Transverse coordinate r or x 4 6 r p and z components of the particle momentum 21 7 Mass of the macro particle 8 Charge to mass ratio 9 Relativistic factor trajectories draw choice n Output mode for trajectories of plasma particles n or n No output y or y Picture mode Trajectories of chosen plasma macro particles on r plane are shown by dotted lines with a specified interval in between dots The dot color represents the gamma factor y of the particle Sizes of the picture are the same as for full window colored maps Y or Y Data mode Information about chosen macro particles is written to the data file with a specified interval in between successive outputs F or F Both picture and data file trajectories each integer 10 Fraction of plasma macro particles to output A trajectory of a plasma macro particle can be drawn or written if the ordinal number of the macro particle is a multiple of this number trajectories spacing integer 10 Spacing in for consecutive output of macro particle parameters This interval is measured in units of the grid step A trajectories min energy float 1 Minimum relativistic factor y for the particle to be drawn ymin Particles with smaller relativistic factors are ignored This is useful if you want to exc
43. lude weakly perturbed plasma regions from the output trajectories energy step float 0 5 Color step for visualization of particle energies step The dot color in pictures is determined by Noo y Ymin Cstep The order of colors is the same as for the default palette of colored maps 5 6 6 Detailed substepped plasma response These keys control output of various plasma characteristics at a reduced step substepping output depth integer 4 Substepping depth for the output 0 4 How deep sub stepping in is included into the following output substepping output map y n n Substepped output of functions of r If this option is enabled then quantities chosen in colormaps subwindow are also output with a reduced step into data files named x x x xx det where is the two character quantity abbreviation and is the time The subwindow for the output is the same as for subwindow colored maps No merging or smoothing of values is made If this diagnostics is on the file xix det is also created which has the same number of lines as data files and contains corresponding values of one value per line substepping output f xi y n n Substepped output of functions of If enabled then quantities chosen in f xi are also output with a reduced step into data files named wexxxx det and vxx x x x det where is the time The file format is the same as for u swp Or v sw
44. on the viewing software ni step float 0 01 Density of plasma ions ni flux step float 0 01 Components of energy flux densities Sf Sr dS SEB r corrected flux step float 0 01 r corrected energy flux densities Sf2 Sr2 dS2 energy step float 0 01 Energy densities Wf dW 18 5 6 2 Functions of These keys control output of various quantities as functions of either in the form of a graph or in the form of a data array The graphs are plotted in files named ur png or v png by different colors where x x is the time of output Fig 7 Data arrays are named ux swp and v swp Each line in the data array correspond to certain and contains 13 uxx x x x swp or 17 v swp columns First columns in the files are values of others are output quantities If a quantity is not chosen for output zero value is written in its place f x1 multichoice Ez nb2 Ez2 dS Sf SEB A list of quantities to output as functions of The quantities can be listed in an arbitrary order There are two groups of quanti ties which differ by files of output Indicated in braces are the column number in the data array x x x x swp the color of the graph in xx x x x png the style of the graph First group Curt EE ne 2 grey line Ne Tax on axis density of plasma electrons nb 3 blue line Po Tax on axis
45. ored by the program but improve visual readability of the file Comments begin with and extend to the end of line In this section configuration options are described like this option type default value brief description Detailed description if necessary Possible types of options are choice a value from a predefined set float a floating point number may be in scientific notation string a string multiple characters Strings with spaces semicolons or hash signs must be enclosed in double quotes multiline strings must be enclosed in triple double quotes multichoice multiple values from the predefined set separated with commas 10 y n yes or no Brief forms y and n are also possible The following is the list of options grouped by purpose The options present in 1code runas cfg but not described here are under development 5 1 Simulation area geometry choice c The geometry of the problem or axisymmetric Axisymmetric cylindrical geometry p or plane Plane 2d Cartesian geometry window width float 5 Transverse size of the simulation window max The radius in the cylindrical geometry or the full width in the plane geometry window length float 15 Length of the simulation window Emax r step float 0 05 Transverse grid step Ar The number of grid steps in the transverse direction N must not be too large N rmax Ar lt 10000 Oth
46. p substepping output particles y n n Substepped output of plasma particles If enabled information about plasma macro particles is written to data file at each step or sub step of the depth specified by substepping output depth Particle filtering criteria imposed by trajectories each and trajectories min energy are applicable substepping output particles area choice f Area for substepped output of plasma particles n or no The output window is the same as for colored maps Particle parameters are written to file x pls where is the time y or yes The output window is the same as subwindow for colored maps Particle parameters are written to file s pls where is the time The file format is the same as for pls 22 5 7 Saving run state The following options control periodical savings of the run state saving period float 1000 Time interval between run saves The run is saved if the time t differs from a multiple of the saving period by less then At 2 Saving is made after completion of the cycle and drawing all pictures save beam y n n Saving the beam state The state of the beam is saved in binary file tb swp The format of the file is the same as that of beamfile bin Option works for non rigid beams only Independently on this key the beam state is also saved to beamfile bin on reaching the time limit tmax or after manual interruption of
47. red Blue white red palette Each palette has 8 distinct colors for positive values of quantities and 7 colors for negative values One color is reserved for regions of zero density at plasma density maps black for default and greyscale palettes pure magenta for hue and pure blue for bluewhitered The following parameters color steps set up a correspondence between the increment of a quantity and color change on the picture E step float 0 1 Components of the electric field Er Ef Ez Phi step float 0 1 Wakefield potential Phi Bf step float 0 1 Transverse magnetic field Bf Bz step float 0 1 Longitudinal magnetic field Bz electron momenta step float 0 1 Electron momenta pr pf pz ion momenta step float 0 1 Ion momenta pri pfi pzi nb step float 0 1 Charge density of particle beams nb ne step float 0 1 Density of plasma electrons ne 17 default AAA be hue bluewhitered Figure 6 Examples of colormap palettes Emax A amp Nm pixels 3 sign changing quantity o hfig pixels fixed sign quantity e Emax E 0 Figure 7 Physical and pixel sizes of the figures showing functions of and colors used for displaying output quantities in the first group top and second group bottom The exact appearance of colors in the manual may depend
48. specified as default in this manual Sec 5 2 The main configuration file lcode cfg if present with all the files included The file is read from the beginning to the end with the included files if any 3 The command line options processed left to right if provided with the included files if any Here are some examples of using command line options 1code Executes LCODE with the values read from lcode cfg if present UNIX lcode exe filename cfg beam tune charge y The same as above but also reads values from filename cfg and explicitly defines the beam tune charge option Windows lcode exe filenamel cfg filename2 cfg dump First reads values from lcode cfg if available then reads values from filenamel cfg and filename2 cfg then prints the resulting set of values to the screen Simulations are not started Win dows If the program is running in the terminal mode its execution can be controlled by pressing some keys at the terminal gt comma pause the execution before the next time step can be used repeatedly to pause after each time step gt dot stop the execution after finishing the time step the run can be resumed afterwards gt space pause the execution immediately esc escape terminate the execution immediately any key resume the paused execution The exit codes are O execution ends successfully 1 execution fails the program prints an
49. t time particle was in the simulation window The file format is the same as for partic swp 15 5 6 Periodical diagnostics These diagnostics are periodically triggered with the time interval given by output period float 100 Time periodicity of detailed output Atout If Atout lt At then each time step is diagnosed The first time step is always diagnosed 5 6 1 Colored maps These keys control output of various quantities as functions of r and either in the form of a colored map or in the form of a data array The colored maps are produced as separate files named w png where 7 stands for two character quantity abbreviation is the time of output and the optional suffix w denotes subwindow output Data arrays have the same naming abbreviations but different extension 7 m w swp Suffix m stands for full window output suffix w denotes subwindow output In the data files one row is for one layer or sub layer Columns correspond to different transverse coordinates colormaps full multichoice A list of quantities to output in the full window colormaps subwindow multichoice A list of quantities to output in the subwindow Full window means the drawn portion of the whole simulation window the area of size Emax X TmaxMdraw Subwindow size and location are controlled manually Output of the following quantities is possible
50. the beam c or constant Always By Bo T or random Bo is a random value between 0 and Bp for each time step p or periodic Bo By cos 27t tz magnetic field period float 200 Period of magnetic field oscillations tp Used only with the periodic external magnetic field 5 4 1 Options specific to particle plasma models These options have effect only if plasma model is a kinetic one plasma particles number int 1000 Number of plasma macro particles lt 40000 All plasma electrons are modeled by this number of macro particles Mobile ions if chosen are modeled by the same number of heavier macro particles in this case this number must be lt 20000 plasma profile choice 1 The initial transverse profile of the plasma density Fig 4 T or uniform Uniform 1 up to the walls 2 or stepwise Uniform 1 up to rp zero at r gt Tp 3 or gaussian Gaussian n r exp r 2r3 zero at r gt 6rp obtained by variation of macro particles weights 4 or arbitrary Arbitrary with particle parameters imported from plasma bin and initial fields from fields bin 5 or channel Zero up to rp uniform 1 at r gt rp 6 or sub channel Constant np2 up to rp2 then linear growth from np2 to 1 between rp2 and rp then 1 at r gt rp obtained by variation of macro particles weights For the plane geometry the distance
51. tic field in the plasma Sec 3 1 E B Auxiliary fields used in the kinetic plasma solver Sec 3 1 Bo External longitudinal magnetic field Sec 3 1 Sec 5 4 magnetic field type Bu Variation amplitude for the external magnetic field Sec 5 4 magnetic field Eaz Average longitudinal electric field acting on the beam slice Sec 5 6 2 f xi Potential me e p Wakefield potential Sec 3 2 Energies mc Win Kinetic energy of a plasma electron Sec 3 1 Wss Substepping energy for the beam Sec 5 2 beam substepping energy Energy flux densities nomc 5 Total energy flux density Sec 3 4 Sec 5 6 1 colormaps full S Collective energy flux density Sec 3 4 Sec 5 6 1 colormaps full Se Electromagnetic energy flux density Sec 3 4 Sec 5 6 1 colormaps full Energy fluxes Nome we wv Total energy flux along the simulation window Sec 3 4 Sec 5 6 2 xi Yy Collective energy flux along the simulation window Sec 3 4 Sec 5 6 2 f xi Pe Electromagnetic energy flux along the simulation window Sec 3 4 Sec 5 6 2 f xi Energy densities nome W Total energy density Sec 3 4 Sec 5 6 1 colormaps full W Collective energy density Sec 3 4 Sec 5 6 1 colormaps full Linear energy densities nome Jw Wint Linear density of the total energy Sec 3 4 Sec 5 6 2 f xi dWint Difference between total and collective linear energy densities Sec 3 4 Sec 5 6 2 xi Distribution functions fa Sec 6 1 rshape Ww
52. top probability density in the 4 dimensional phase space 22 2 r at Pro 1 ap zo p Yi Poy faa b Yo Poa Poy gt z z gt MH E lt 1 and AT lt l z y n2020 pio g2 02 a2 faa Xb Yb Pox Poy 0 otherwise in which one spatial coordinate is ignored for each particle x T 5 To 4 Y Por B a R Pop did Ad Eli p ignored axisymmetric Tb Tb yp ignored plane angspread float le 5 Maximum angular spread in the segment ao angshape choice 1 Dependence of the angular spread on the longitudinal coordinate a In the following variants the formulae are applicable in the interval ls gt 6 gt 0 where 0 and the segment starts at lt 0 or cos Shifted cosine ap 0 5 ao 1 cos 2710 1 t or t Linear rise abl ao 0 Is T or T Linear decrease al ag 1 SE 1 T or Y Constant arl ag h or half cos Rising half period of the shifted cosine b or b Decreasing half period of the shifted cosine abl g or g Decreasing part of Gaussian function espread float 0 Auxiliary value of the longitudinal momentum Pa eshape choice m Longitudinal momentum distribution of beam particles fi pez Available options m or monoenergetic Monoenergetic Fi Dz O Poz peo u or uniform Uniform over t
53. ts of measure depend on some basic plasma density no It is recommended to use the initial unperturbed plasma density as no All times are in units of wp 1 where Wp 4anoe m is the electron plasma frequency e is the elementary charge and m is the electron mass All distances are in units of c w The unit velocity is c The notation used and units of measure for various quantities are given in Table 1 Table 1 Notation units of measure and places of first appearance or definition for various quantities Notation Quantity amp place of definition Unit Times we t Time in general Sec 1 or propagation time for the beam At Main time step for the beam Sec 1 Sec 5 1 time step At Reduced time step for the beam Sec 5 1 beam substepping energy Tmax Time limit for the run Sec 5 1 time limit tr Period of the external beam focusing Sec 5 2 foc period tp Oscillation period for the external magnetic field Sec 5 4 magnetic field period Atout Periodicity of the detailed output Sec 5 6 output period Lengths C Wp E The co moving coordinate Sec 1 AE Longitudinal grid step Sec 3 1 Sec 5 1 xi step Th Tb Tb amp Coordinates of a beam macro particle Sec 3 3 Contax Length of the simulation window Sec 5 1 window length Ar Transverse grid step Sec 5 1 r step Taz Transverse size of the simulation window Sec 5 1 window width Tp Tp2 Width parameters for some plasma density profiles
54. uct of j and step exceeds Asub at some point then the step is automatically divided by 10 if allowed by substepping depth Reverse action increasing the step is taken when j gets small again trapped path limit float 0 Path limit for trapped plasma particles Ltrap With this option it is possible to treat trapping of plasma particles by the wakefield to the extent allowed by the quasi static approximation The charge of a macro particle is put to zero when the time spent by this macro particle in the simulation window exceeds Ltrap With this trick we obtain the correct plasma state and fields at the distance Ltrap from the beam entrance to the plasma even if some plasma particles get trapped by the wakefield It is necessary to put Ltrap gt max otherwise the result will have no physical meaning Zero value of Ltrap switches this option off For every trapped macro particle 10 values are appended to file captured p1s one particle per line 1 Time 2 Number of the macro particle which contains information on its initial position 3 Final coordinate 4 Final transverse coordinate 5 7 Final r y and z components of the particle momentum 8 Mass of the macro particle 9 Charge to mass ratio 10 Relativistic factor 5 4 2 Option specific to the fluid plasma model viscosity float 0 Artificial viscosity Artificial viscosity is used for suppressing high frequency numerical noises or forcing th
55. ut selected beam particles is appended to file partic swp at every time step one line 9 values per particle 1 Time t Longitudinal coordinate Transverse coordinate rz or Xp Longitudinal momentum pbz Transverse momentum pp OF Pox Angular momentum Mp or third component of the momentum poy Charge to mass ratio absolute value Current carried by the particle 9 Ordinal number The same particle characteristics can be also extracted from beamfile bin CONno BP Wd write beam particles each integer 1000 Fraction of beam particles to output dp A beam particle is selected for output if its ordinal number is a multiple of dp write beam particles from float 0 Right limit write beam particles to float 10 Left limit Only beam particles located between these two non positive values are selected for output write beam particles q m from float 0 Lower limit for filtering beam particles by their q m ratio write beam particles q m to float 0 Upper limit for filtering beam particles by their q m ratio The interval of charge to mass ratios in which particles are written to partic swp Equal values of these parameters disable filtering output lost particles y n n Output of lost particles to beamlost dat If enabled then beam particles which exit the simulation window are kept in file beamlost dat One line of 9 values is written for each particle These values correspond to the las
56. w BE dS2 r weighted z component of the thermal e f d 2ar S Sf Zoro w ee Wf total energy density W wi eee w e dW thermal energy density W W wd w 22 SEB z component of the electromagnetic e f d Sez seres w EE If a quantity is undefined like electron momentum at points of zero electron density then zero is output at this point colormaps type choice y Controls whether functions of r are output as data files or as pictures n or numbers Only data files y or pictures Only pictures F or both Both pictures and data files drawn portion float 1 Fraction of the simulation window to be referred as the full window Ndraw A number between 0 and 1 Fig 5a Used to exclude uninteresting near wall regions from the output subwindow xi from float 5 Right boundary of the subwindow from subwindow xi to float 10 Left boundary of the subwindow to subwindow r from float 0 Bottom boundary of the subwindow from subwindow r to float 3 Top boundary of the subwindow fto Four parameters controlling the size and position of the subwindow Fig 5b 16 axisymmetric plane Emax AE Nm pixels A Smag 1 draw A draw max p 1 draw max Ar Nur F Xx pixels y Tmax 1 draw 0 j Emax E a i a from Es AE pixels value before Fto Tfrom Ar O pixels l after
Download Pdf Manuals
Related Search
Related Contents
BRIESE LIGHT 取扱説明書 【6kw リモート用】 Silicon Graphics® 1600SW Manual Caida de Cortina - Oracle Documentation Samsung Galaxy A5 Uživatelská přiručka Manuale di installazione e manutenzione Elettrovalvola a 5/3 Gear Head KB5850W Copyright © All rights reserved.
Failed to retrieve file