200 kV gun GPT simulations Tee, shroom and sphere catohdes Gabriel Palacios gabrielp@jlab.org 08/02/18
Summary
Solidworks geometry modifications: No shield
Solidworks geometry modifications: Original
Solidworks geometry modifications: GTS with small anode
Solidworks geometry modifications: No shield
Solidworks geometry modifications: Original
Solidworks geometry modifications: GTS with small anode
Cathode-anode gap: The data for the following plots was taken along the cathode anode gap as a function of the height (on the photocathode surface) varying from -6mm to 6mm.
GPT Global particle tracker uses three files to run this simulation: The initial file (with extension *.ini) with general info about the particles The multiple run file (*.mr) that allows for parameter sweep The batch file (*.bat) that launches the code to obtain solution and converts the solution files to trajectories for plots
GPT: *.ini This is the main file that GPT uses to obtain a simulation, contains: Initial particle information Global components Accuracy Particle distribution Field maps Space charge switch and parameters
GPT: *.mr We use a multiple run file that contains: Switches for space charge and backwards moving particle removal (not used here) Particle Info Output settings Beamline Component Variables
GPT: *.bat The batch file uses the console to run GPT codes to obtain the results and plots, it contains three lines: The mr and gpt commands run the GPT solver with the *.ini file (combined with the multirun file) as targets and obtain the main solution file (*.gdf) Gdf2a converts the solution binary file to a “normal” text file Gdftrans uses the information in the solution file and converts it to particle trajectories
Braking the code Let us brake the codes in parts
Braking the code: *.ini Initial particle information E0 is the initial energy of particles in the distribution. MTE (mean transverse energy) is defined in the *.mr file as 0.130 [eV] Xyrms is defined in the *mr file as 0.32e-3 [m].
Braking the code: *.ini Global components maxTime is a variable that tells tout when to stop. tout “Writes the electromagnetic fields at the position of all particle coordinates at the given simulation time to the GPT outputfile. ” Zstop 0.5
Braking the code: *.ini Accuracy GBacc “Negative base 10 logarithm of the simulation accuracy for γβ . If not specified, 4 is assumed.” xacc Negative base 10 logarithm for the simulation accuracy for position. If not specified, 6 is assumed. It is rarely needed to change this value. Increasing GBacc usually increases the accuracy for the position simultaneously.
Braking the code: *.ini Particle distribution Nparticles 1000 Qbunch -12e-12 [C] Xyrms 0.32e-3 [m] If transU is 1, distribution is uniform, else Gaussian transverse laser If longU is 1, distribution is uniform, else Gaussian longitudinal laser Trms 50E-12 Bunch length Zcutoff 3
Braking the code: *.ini Particle distribution setrxydist(set,distribution) Set radial distribution in x - coordinate. setphidist(set,distribution) Set phi distribution. settdist(set,distribution) Set particle-release time distribution. settransform(ecs,set) Apply a coordinate transform on the particles in a set.
Braking the code: *.ini Particle distribution setGBxdist(set,distribution) Sets the momentum distribution in x-direction. setGBxemittance(set,emittance) Sets the emittance in x β x-space. Modifies: γβ x. These elements scale the transverse momentum coordinates linearly till the specified emittance is reached. dtmaxt(tstart,tend,dtmax) Enforce a maximum timestep within a specified interval.
Braking the code: *.ini Field maps map3D_E(ECS,mapfile.gdf,x,y,z,Ex,Ey,Ez,Efac) Reads a 3D rectangular field map for the electric field from the specified GDF file.
Braking the code: *.ini Space charge
Braking the code: *.ini Removed bits
Braking the code: *.ini Output tout(from,to,step,[CCSname]) Writes the electromagnetic fields at the position of all particle coordinates at the given simulation time to the GPT outputfile. dtout 0.5E-11 in seconds screen(ECS,at,[CCSname]) Writes particle coordinates when the particles pass through a nondestructive screen to the outputfile. Normally, GPT stops execution after the last tout or screen .
Braking the code: *.ini Bonus! Setxydistbmp
Braking the code: *.mr
Braking the code: *.mr Switches Sccalc Surface charge calculation Noback removes backwards movingparticles
Braking the code: *.mr Particle info
Braking the code: *.mr Output
Braking the code: *.mr Beam line components
Braking the code: *.bat
Braking the code: *.bat Line 1 Line2 Line 3 Line 4 Line 5 Line 6 The gpt command runs on the *.ini file and solves it using the conditions set in the *.mr file. This stores the general solution in the *.gdf file together with particle positions Line2 Converts the general solution binary file to a *.txt file to use with excel Line 3 Obtains the particle trajectories from the general solution and saves it to the trajectories_*.gdf file Line 4 Calculates the standard deviations from the general solution and stores them in the std_*.gdf Line 5 Calculates the normalized emittance and stores it in the nemi_*.gdf file Line 6 Converts the binary standard deviations into a *.txt file to use with excel Line 7 Converts the binary trajectories into a *.txt file to use with excel
Preliminary results
Preliminary results: Fields maps
Preliminary results: Fields maps
Preliminary results: Fields maps
Preliminary results: x vs y
Preliminary results: x vs y
Preliminary results: x vs y
Preliminary results: Trajectories
Preliminary results: Trajectories
Preliminary results: Normalized transverse emittance
Preliminary results: Normalized transverse emittance
Preliminary results: Normalized transverse emittance
Preliminary results: Normalized transverse emittance
Preliminary results: Normalized transverse emittance
Preliminary results: Normalized transverse emittance
Preliminary results: Normalized transverse emittance
Preliminary results: Normalized transverse emittance
Preliminary results: Normalized transverse emittance
Preliminary results: Normalized transverse emittance
Preliminary results: Normalized transverse emittance
Preliminary results: Normalized transverse emittance
Fin.