// OPAL input file for RFQ simulation from field map TITLE, STRING = "RFQ"; // General options OPTION, ECHO = true, // Echo the input file PSDUMPFREQ = 10, // How often to dump phase space to file VERSION = 20000; // Version 2.0.0 // Variables REAL CONST T0 = 50.0e-6; // Initial kinetic energy [GeV] (= 50 keV) REAL CONST m0 = 2*PMASS; // Rest mass [GeV] (Hydrogen 2+) REAL CONST E0 = m0 + T0; // Initial total energy [GeV] // Beamline elements Drift1: DRIFT, ELEMEDGE = 0, // Starting location [m] L = 1.8, // Length [m] APERTURE = "SQUARE(0.008, 1)"; // Aperture width [m], scaling factor // Beamline composition Line1: LINE = (Drift1); // List elements in beam line // Beam initialization Beam1: BEAM, PARTICLE = H2P, // Hydrogen 2+ ENERGY = E0, // Energy [GeV] NPART = 100000, // Number of macroparticles BCURRENT = 0, // Bunch current [A] BFREQ = 162.5; // Bunch frequency [MHz] Dist1: DISTRIBUTION, TYPE = FROMFILE, FNAME = "partcl.data"; // Solver settings Solver1: FIELDSOLVER, FSTYPE = FFT, // Fast Fourier Transform PARFFTX = TRUE, // Parallelization switches PARFFTY = TRUE, PARFFTT = FALSE, MX = 32, // Number of mesh points MY = 32, MT = 32, BCFFTX = OPEN, // Boundary conditions: BCFFTY = OPEN, // - only OPEN available for x, y BCFFTT = OPEN, // - OPEN or PERIODIC for t BBOXINCR = 1, // Enlarge bounding box by percentage GREENSF = STANDARD; // INTEGRATED or STANDARD // Run simulation SELECT, // Select a beamline for the simulation LINE = Line1; TRACK, // Enter tracking mode LINE = Line1, BEAM = Beam1, MAXSTEPS = 15000, // Maximal number of time steps DT = 1.0e-10, // Time step size [s] ZSTART = 0, // Starting z-position [m] ZSTOP = 1.9; // Final z-position [m] RUN, // Start the simulation METHOD = "PARALLEL-T", // PARALLEL-T, CYCLOTRON-T or STATISTICAL-ERRORS FIELDSOLVER = Solver1, BEAM = Beam1, DISTRIBUTION = Dist1; ENDTRACK; // Leave tracking mode STOP; // Quit OPAL when tracking is completed