OPTION, PSDUMPFREQ = 10; // 6d data written every 10th time step (h5). OPTION, STATDUMPFREQ = 1; // Beam Stats written every time step (stat). OPTION, BOUNDPDESTROYFQ=10; // Delete lost particles, if any out of 10 \sigma OPTION, VERSION=10900; Title, string="Simple Chicane"; Value,{OPALVERSION}; //---------------------------------------------------------------------------- //Global Parameters REAL rf_freq = 1.3e9; // RF frequency. (Hz) REAL n_particles = 1E4; // Number of particles in simulation. REAL beam_bunch_charge = 0.00; // Charge of bunch. (C) REAL EdeseV = 100e6; REAL Edes = EdeseV*1e-9; //initial energy in GeV REAL gamma = (Edes+EMASS)/EMASS; REAL beta = sqrt(1-(1/gamma^2)); REAL P0 = gamma*beta*EMASS; //inital z momentum value, {P0}; //---------------------------------------------------------------------------- //Fieldsolver configuration REAL MX = 8; REAL MY = 8; REAL MZ = 8; REAL BINS = 1; Bend1: RBend, ANGLE = 20.0*Pi / 180.0, E1 = 0.0, E2 = 20.0*Pi / 180.0, FMAPFN = "1DPROFILE1-DEFAULT", ELEMEDGE = 0.25, DESIGNENERGY = EdeseV*1e-6, L = 0.25, GAP = 0.02; Bend2: RBend, ANGLE = -20.0*Pi / 180.0, E1 = -20.0*Pi / 180.0, E2 = 0.0, FMAPFN = "1DPROFILE1-DEFAULT", ELEMEDGE = 0.80, DESIGNENERGY = EdeseV*1e-6, L = 0.25, GAP = 0.02; //---------------------------- beamline // chic: Line = (Bend1, Bend2, Bend3, Bend4); chic: Line = (Bend1, Bend2); FS_SC: Fieldsolver, FSTYPE = FFT, MX = MX, MY = MY, MT = MZ, PARFFTX = true, PARFFTY = true, PARFFTT = true, BCFFTX = open, BCFFTY = open, BCFFTT = open, BBOXINCR = 1, GREENSF = INTEGRATED; Dist: DISTRIBUTION, TYPE = GAUSS, SIGMAX = 0.001, SIGMAY = 0.003, SIGMAZ = 0.002, SIGMAPX = 0.0, SIGMAPY = 0.0, SIGMAPZ = 0.0, CUTOFFX = 2.0, CUTOFFY = 2.0, CUTOFFLONG = 4.0, OFFSETX = 0.00, OFFSETY = 0.00, OFFSETZ = 0.00, OFFSETPZ = P0; BEAM1: BEAM, PARTICLE = ELECTRON, pc = P0, NPART = n_particles, BFREQ = rf_freq, BCURRENT = beam_bunch_charge * rf_freq * 1E6, CHARGE = -1; TRACK, LINE = chic, BEAM = BEAM1, MAXSTEPS = 1000000, DT = 1e-12, ZSTOP=2.0; RUN, METHOD = "PARALLEL-T", BEAM = BEAM1, FIELDSOLVER = FS_SC, DISTRIBUTION = Dist; ENDTRACK;