...
 
Commits (164)
This diff is collapsed.
This diff is collapsed.
......@@ -3,21 +3,21 @@ OPTION, STATDUMPFREQ = 10; // Beam Stats written every 10 time steps (stat).
OPTION, BOUNDPDESTROYFQ=10; // Delete lost particles, if any
OPTION, AUTOPHASE=4; // Autophase is on, and phase of max energy
// gain will be found automatically for cavities.
OPTION, VERSION=10600;
Title, string="AWA Photoinjector";
//----------------------------------------------------------------------------
//Global Parameters
rf_freq = 1.3e9; //RF frequency. (Hz)
n_particles = 1E4; //Number of particles in simulation.
beam_bunch_charge = 1e-9; //Charge of bunch. (C)
REAL rf_freq = 1.3e3; //RF frequency. (Hz)
REAL n_particles = 1E4; //Number of particles in simulation.
REAL beam_bunch_charge = 1e-9; //Charge of bunch. (C)
//Initial Momentum Calculation
Edes = 1.4e-9; //initial energy in GeV
gamma = (Edes+EMASS)/EMASS;
beta = sqrt(1-(1/gamma^2));
P0 = gamma*beta*EMASS; //inital z momentum
REAL Edes = 1.4e-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
//Printing initial energy and momentum to terminal output.
value , {Edes, P0};
......@@ -36,12 +36,12 @@ value , {Edes, P0};
// LAG: cavity phase (radians)
//
gun_inj_phase = 0.0; // Rf injection phase (in degrees) with restpect
// to max phase. i.e. 0.0 inj phase corresponds
REAL gun_inj_phase = 0.0; // Rf injection phase (in degrees) with restpect
// to max phase. i.e. 0.0 inj phase corresponds
// to running on crest (max energy).
GUN: RFCavity, L = 0.2927, VOLT = 60.0, ELEMEDGE = 0.0, TYPE = "STANDING",
FMAPFN = "DriveGun.T7", FREQ = 1300.0, LAG = (gun_inj_phase*Pi)/180.0;
FMAPFN = "DriveGun.T7", FREQ = 1300.0, LAG = (gun_inj_phase*Pi)/180.0;
//LAG (phase) is converted to radians
//----------------------------------------------------------------------------
......@@ -52,29 +52,29 @@ GUN: RFCavity, L = 0.2927, VOLT = 60.0, ELEMEDGE = 0.0, TYPE = "STANDING",
// KS: Solenoid strength (Rad/m)
// FMAPFM: Field file (string)
// Note: OPAL scales the field file based on the max magnetic
// field value in the file, not Bz on axis. The max field
// value is normalized to 1 [T], and scaled with KS.
// i.e. The max value in the BF_559 file = 0.162544398 [T].
// Note: OPAL scales the field file based on the max magnetic
// field value in the file, not Bz on axis. The max field
// value is normalized to 1 [T], and scaled with KS.
// i.e. The max value in the BF_559 file = 0.162544398 [T].
// Therefore, setting KS = 0.162544398 runs the magnet at max current.
KSBF = 0.162544398;
if (OPALVERSION>15000)
KSBF = KSBF/1.3528;
REAL KSBF = 0.162544398;
if (OPALVERSION>10500)
KSBF = KSBF/1.3528;
// Buck and Focusing Solenoid
BF: Solenoid, L = 0.5, ELEMEDGE=0.0, KS = KSBF,
FMAPFN = "BF_550.T7";
// Matching Solenoid
// Matching Solenoid
// Max value in the M_440 file = 1.973966
// Conversion from Current (I) to Scaling factor:
// Scaling Factor (KS) = (I / Imax) * 1.973966
// Where Imax for this Matching solenoid = 440 [A]
I = 273; //[A]
SF = (I/440)*1.973966;
if (OPALVERSION>15000)
REAL I = 273; //[A]
REAL SF = (I/440)*1.973966;
if (OPALVERSION>10500)
SF = SF/3.2306;
M: Solenoid, L = 0.5, ELEMEDGE=0.0, KS = SF,
......@@ -98,20 +98,20 @@ DRIVE: Line = (GS, DR1);
//----------------------------------------------------------------------------
// INITIAL DISTRIBUTION
//
// Flattop distribution.
// SIGMAX/Y: RMS radius of transverse beam size (Laser radius in m).
// Flattop distribution.
// SIGMAX/Y: RMS radius of transverse beam size (Laser radius in m).
// TRISE/FALL: Rise time/fall time in longitudinal direction (s).
// TPULSEFWHM: FWHM in longitudinal direction (s).
// CUTOFFLONG: Longitudinal cuttoff in units of sigma.
// NBIN: Number of energy bins to use during emission.
// DEBIN: Defines when to combine bins (Min energy difference in KeV).
// EMISSIONSTEPS: Number of steps during emssion.
// DEBIN: Defines when to combine bins (Min energy difference in KeV).
// EMISSIONSTEPS: Number of steps during emssion.
// Emission time step is adjusted to fit this number.
// EKIN: Kinetic energy of electrons at emission (eV).
// ELASER: Energy of laser (eV).
// W: Photocathode work functioin (eV).
// FE: Fermi energy of photocathode (eV).
// CATHTEMP: Operating temperature of photocathode (K).
// EKIN: Kinetic energy of electrons at emission (eV).
// ELASER: Energy of laser (eV).
// W: Photocathode work functioin (eV).
// FE: Fermi energy of photocathode (eV).
// CATHTEMP: Operating temperature of photocathode (K).
// Note, ELASER, W, FE, and CATHTEMP are used for the NONEQUIL emission model.
// These values are not necessary when using other models.
......@@ -123,57 +123,57 @@ DRIVE: Line = (GS, DR1);
Dist: DISTRIBUTION, DISTRIBUTION = FLATTOP,
SIGMAX = 0.00075,
SIGMAY = 0.00075,
TRISE = 6.0e-12,
TFALL = 6.0e-12,
TPULSEFWHM = 20.0e-12,
TRISE = 6.0e-12,
TFALL = 6.0e-12,
TPULSEFWHM = 20.0e-12,
CUTOFFLONG = 4.0,
NBIN = 9,
DEBIN = 1,
DEBIN = 1,
EMISSIONSTEPS = 100,
EMISSIONMODEL = ASTRA,
EKIN = 0.55,
EMITTED = True,
EKIN = 0.55,
EMITTED = True,
WRITETOFILE = True; //Saves the distribution to a text file
// Note on emission time step: FWHM pulse width divided by emission
// steps gives the time step for the emissions process.
// i.e 20.0e-12 / 100 gives a time step of 2e-13 (s) during emission.
// This is the not the same as the time step used in rest of the file.
// Note on emission time step: FWHM pulse width divided by emission
// steps gives the time step for the emissions process.
// i.e 20.0e-12 / 100 gives a time step of 2e-13 (s) during emission.
// This is the not the same as the time step used in rest of the file.
//----------------------------------------------------------------------------
// Define Field solvers
// The mesh sizes should be a factor of 2
// The mesh sizes should be a factor of 2
// for most efficient space charge calculation.
FS_SC: Fieldsolver, FSTYPE = FFT,
FS_SC: Fieldsolver, FSTYPE = FFT,
MX = 16, MY = 16, MT = 16, // SC grid size is 32^3
PARFFTX = false,
PARFFTY = false,
PARFFTX = false,
PARFFTY = false,
PARFFTT = true, // parallel in the z direction only
BCFFTX = open,
BCFFTY = open,
BCFFTX = open,
BCFFTY = open,
BCFFTT = open,
BBOXINCR = 1,
BBOXINCR = 1,
GREENSF = INTEGRATED;
//----------------------------------------------------------------------------
// Electron Beam Definition
BEAM1: BEAM, PARTICLE = ELECTRON, pc = P0, NPART = n_particles,
BFREQ = rf_freq,BCURRENT = beam_bunch_charge * rf_freq, CHARGE = -1;
BFREQ = rf_freq, BCURRENT = beam_bunch_charge * rf_freq * 1e6, CHARGE = -1;
//----------------------------------------------------------------------------
// Simulate the beamline using TRACK and RUN.
// Note, different time steps are set based on the z location in the beam line.
// In the case below, 1.0e-13 is used for 0.0 to 0.4 m,
// and 3.0e-12 is used from 0.4 to 5 m.
// In the case below, 1.0e-13 is used for 0.0 to 0.4 m,
// and 3.0e-12 is used from 0.4 to 5 m.
TRACK, LINE = DRIVE, BEAM = BEAM1, MAXSTEPS = 1900000,
TRACK, LINE = DRIVE, BEAM = BEAM1, MAXSTEPS = 1900000,
DT = {1.0e-13, 3.0e-12}, ZSTOP={0.4, 5.0};
RUN, METHOD = "PARALLEL-T", BEAM = BEAM1,
RUN, METHOD = "PARALLEL-T", BEAM = BEAM1,
FIELDSOLVER = FS_SC, DISTRIBUTION = Dist;
ENDTRACK;
Stop;
Quit;
Quit;
\ No newline at end of file
#!/bin/bash
mpirun -np 4 $OPAL_EXE_PATH/opal AWAGun-1.in 2>&1
mpirun -np 4 "$OPAL_EXE_PATH/opal" "$@" AWAGun-1.in --info 2 2>&1
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
44e4100df1753c1ffc89bbdd4c27bdfe AWAGun-1.out
7f245460565fa40909e08212e786239b AWAGun-1.out
99ac8f76bb7527e95c58b8d6e58c5670 AWAGun-1.stat
4ebdf0e34da87f0656d69186f330abbc AWAGun-1.stat
OPTION, ECHO=FALSE;
OPTION, PSDUMPFREQ=50;
OPTION, CSRDUMP=TRUE;
OPTION, VERSION=10600;
TITLE,string="OPAL Bunch Compressor 1 test, no space charge";
Edes=0.2479;
gamma=(Edes+EMASS)/EMASS;
beta=sqrt(1-(1/gamma^2));
gambet=gamma*beta;
P0 = gamma*beta*EMASS;
brho = (EMASS*1.0e9*gambet) / CLIGHT;
REAL Edes=0.2479;
REAL gamma=(Edes+EMASS)/EMASS;
REAL beta=sqrt(1-(1/gamma^2));
REAL gambet=gamma*beta;
REAL P0 = gamma*beta*EMASS;
REAL brho = (EMASS*1.0e9*gambet) / CLIGHT;
value,{gamma,brho,Edes,beta,gambet};
dt1 = 3.3355e-12;
dt2 = 5.0e-12;
cdt = dt2;
REAL dt1 = 3.3355e-12;
REAL dt2 = 5.0e-12;
REAL cdt = dt2;
// L: physical element lenght (real)
// KS: field scaling factor (real)
......@@ -54,17 +55,17 @@ F10BC_MB04: RBend, K0=0.1585,
l1: Line = (F10BC_MB01, F10BC_MB02, F10BC_MB03, F10BC_MB04);
qb=0.20e-9;
rf=1498.956e6;
v0=beta*CLIGHT;
T1s = 36.6e-12;
lz = T1s*v0;
REAL qb=0.20e-9;
REAL rf=1498.956e6;
REAL v0=beta*CLIGHT;
REAL T1s = 36.6e-12;
REAL lz = T1s*v0;
value,{v0,lz,qb,rf};
sigpx = sqrt((0.0028*1.0e-9/EMASS + 1.0)^2 - 1.0);
sigpy = sqrt((0.0028*1.0e-9/EMASS + 1.0)^2 - 1.0);
sigpz = sqrt((2.78803e-3/EMASS + 1.0)^2 - 1.0);
pzave = sqrt((248.14e-3/EMASS + 1.0)^2 - 1.0);
REAL sigpx = sqrt((0.0028*1.0e-9/EMASS + 1.0)^2 - 1.0);
REAL sigpy = sqrt((0.0028*1.0e-9/EMASS + 1.0)^2 - 1.0);
REAL sigpz = sqrt((2.78803e-3/EMASS + 1.0)^2 - 1.0);
REAL pzave = sqrt((248.14e-3/EMASS + 1.0)^2 - 1.0);
Dist1:DISTRIBUTION, DISTRIBUTION = gauss,
sigmax = 0.00018,
......@@ -86,12 +87,12 @@ Fs1:FIELDSOLVER, FSTYPE=FFT, MX=32, MY=32, MT=256,
BCFFTX=open, BCFFTY=open, BCFFTT=open,
BBOXINCR=1, GREENSF=INTEGRATED;
beam1: BEAM, PARTICLE=ELECTRON, pc=P0, NPART=1e4, BCURRENT=qb*rf, BFREQ=rf, CHARGE=-1;
beam1: BEAM, PARTICLE=ELECTRON, pc=P0, NPART=1e4, BCURRENT=qb*rf, BFREQ=rf * 1e-6, CHARGE=-1;
SELECT, Line=l1;
N1 = 402*dt1/cdt;
N2 = N1 + (400*dt1/cdt);
REAL N1 = 402*dt1/cdt;
REAL N2 = N1 + (400*dt1/cdt);
//TRACK,LINE=l1, BEAM=beam1, MAXSTEPS=N1+N1, DT=cdt;
TRACK,LINE=l1, BEAM=beam1, MAXSTEPS=N1+N2, DT=cdt;
......
#!/bin/bash
cd $REG_TEST_DIR
mpirun -np 1 $OPAL_EXE_PATH/opal BC1-1.in --commlib mpi --info 3 --warn 0 2>&1
mpirun -np 1 "$OPAL_EXE_PATH/opal" "$@" BC1-1.in --commlib mpi --info 3 --warn 0 2>&1
OPTION, ECHO=FALSE;
OPTION, PSDUMPFREQ=1000000;
OPTION, TELL=TRUE;
DT = 1.0E-10;
Edes = 0.102715;
gamma = (Edes+PMASS)/PMASS;
beta = sqrt(1-(1/gamma^2));
gambet = gamma*beta;
P0 = gamma*beta*PMASS;
brho = (PMASS*1.0e9*gambet) / CLIGHT;
NStep = 16.144190/(beta*CLIGHT*DT);
rf = 50.6328e6; //need to be confirmed
Qtot = 3562*1.6e-19;
OPTION, VERSION=10600;
REAL DT = 1.0E-10;
REAL Edes = 0.102715;
REAL gamma = (Edes+PMASS)/PMASS;
REAL beta = sqrt(1-(1/gamma^2));
REAL gambet = gamma*beta;
REAL P0 = gamma*beta*PMASS;
REAL brho = (PMASS*1.0e9*gambet) / CLIGHT;
REAL NStep = 16.144190/(beta*CLIGHT*DT);
REAL f = 50.6328e6; //need to be confirmed
REAL Qtot = 3562*1.6e-19;
VALUE,{gamma,brho,Edes,beta,gambet};
......@@ -24,7 +25,7 @@ CALL, "InDistr_LG2_100.opal";
FS1:FIELDSOLVER, FSTYPE=NONE, MX=64, MY=64, MT=64, PARFFTX=true, PARFFTY=true, PARFFTT=true, BCFFTX=open, BCFFTY=open, BCFFTT=open, BBOXINCR=1, GREENSF=STANDARD;
BEAM_4: BEAM, PARTICLE=PROTON, PC=P0, NPART=3520, BCURRENT=Qtot*f, BFREQ = rf, CHARGE=1;
BEAM_4: BEAM, PARTICLE=PROTON, PC=P0, NPART=3520, BCURRENT=Qtot*f, BFREQ = f * 1e-6, CHARGE=1;
SELECT, LINE=BEAMLINE_4;
......
#!/bin/bash
mpirun -np 1 $OPAL_EXE_PATH/opal BeamLine-1.in --commlib mpi --info 3 --warn 0 2>&1
mpirun -np 1 "$OPAL_EXE_PATH/opal" "$@" BeamLine-1.in --commlib mpi --info 3 --warn 0 2>&1
37db01e90f37d7daf7873d9fcd70bcff BeamLine-1.out
0636273374e7192bb4c279f35d2d5d9b BeamLine-1.out
333efa126f0d6f84e9dd22135fc07846 BeamLine-1.stat
e3587cac374950efc90ce32ccd1e9e53 BeamLine-1.stat
OPTION, ECHO=FALSE;
OPTION, PSDUMPFREQ=1000000;
OPTION, TELL=TRUE;
DT = 1.0E-10;
Edes = 0.102715;
gamma = (Edes+PMASS)/PMASS;
beta = sqrt(1-(1/gamma^2));
gambet = gamma*beta;
P0 = gamma*beta*PMASS;
brho = (PMASS*1.0e9*gambet) / CLIGHT;
NStep = 16.144190/(beta*CLIGHT*DT);
rf = 50.6328e6; //need to be confirmed
Qtot = 3562*1.6e-19;
OPTION, VERSION=10600;
REAL DT = 1.0E-10;
REAL Edes = 0.102715;
REAL gamma = (Edes+PMASS)/PMASS;
REAL beta = sqrt(1-(1/gamma^2));
REAL gambet = gamma*beta;
REAL P0 = gamma*beta*PMASS;
REAL brho = (PMASS*1.0e9*gambet) / CLIGHT;
REAL NStep = 16.144190/(beta*CLIGHT*DT);
REAL f = 50.6328e6; //need to be confirmed
REAL Qtot = 3562*1.6e-19;
VALUE,{gamma,brho,Edes,beta,gambet};
......@@ -25,7 +26,7 @@ FS1:FIELDSOLVER, FSTYPE=NONE, MX=64, MY=64, MT=64, PARFFTX=true, PARFFTY=true, P
BCFFTX=open, BCFFTY=open, BCFFTT=open, BBOXINCR=1, GREENSF=STANDARD;
BEAM_4: BEAM, PARTICLE=PROTON, PC=P0, NPART=1e4, BCURRENT=Qtot*f, BFREQ = rf, CHARGE=1;
BEAM_4: BEAM, PARTICLE=PROTON, PC=P0, NPART=1e4, BCURRENT=Qtot*f, BFREQ = f * 1e-6, CHARGE=1;
SELECT, LINE=BEAMLINE_4;
......
#!/bin/bash
mpirun -np 1 $OPAL_EXE_PATH/opal BeamLine-2.in --commlib mpi --info 3 --warn 0 2>&1
mpirun -np 1 "$OPAL_EXE_PATH/opal" "$@" BeamLine-2.in --commlib mpi --info 3 --warn 0 2>&1
......@@ -14,114 +14,114 @@
10000
10000
10000
9995
9981
9950
9938
9933
9928
9900
9852
9793
9738
9672
9589
9514
9428
9320
9236
9116
9019
8937
8918
8918
8918
8918
8918
8918
8918
8918
8917
8904
10000
9994
9974
9969
9966
9963
9947
9902
9854
9791
9717
9643
9561
9486
9376
9271
9165
9069
9001
8978
8973
8973
8973
8973
8973
8972
8972
8971
8956
8912
8879
8870
8869
8869
8869
8868
8868
8868
8868
8868
8868
8868
8868
8868
8868
8868
8868
8868
8868
8868
8829
8819
8819
8819
8819
8819
8819
8819
8819
8819
8819
8819
8819
8819
8819
8819
8819
8819
8819
8819
8819
8814
8781
8680
8490
8320
8159
8000
7914
8867
8855
8818
8696
8506
8341
8168
8012
7924
7900
7890
7878
7844
7799
7781
7779
7779
7779
7779
7779
7779
7779
7779
7779
7779
7779
7779
7779
7779
7779
7779
7779
7779
7779
7779
7779
7779
7779
7779
7779
7779
7779
7779
7779
7779
7779
7779
7779
7779
7779
7779
7779
7779
7779
7779
7779
7779
7779
7779
7779
7779
7779
7863
7830
7817
7813
7813
7813
7813
7813
7813
7813
7813
7813
7813
7813
7813
7813
7813
7813
7813
7813
7813
7813
7813
7813
7813
7813
7813
7813
7813
7813
7813
7813
7813
7813
7813
7813
7813
7813
7813
7813
7813
7813
7813
7813
7813
7813
7813
7813
7813
7813
58943bc928151e459c10f69832b7aeed BeamLine-2.lbal
afe02f42e4f92007b69825610c15eca6 BeamLine-2.lbal
1cec1623179bc86469f08322a0bd5a7b BeamLine-2.out
d9f4856de7465375e25a0ac49617a256 BeamLine-2.out
026dfbe21809251bc05ef22b04dfa1cd BeamLine-2.stat
4b969c5507a5ec70764a61712c0f8357 BeamLine-2.stat
......@@ -2,6 +2,7 @@ Option, ECHO=FALSE;
Option, INFO=FALSE;
Option, AUTOPHASE=0;
Option, CSRDUMP=TRUE;
OPTION, VERSION=10600;
Title, string="FEL ERL";
......@@ -10,18 +11,18 @@ Title, string="FEL ERL";
//
// Here we define some global simulation parameters.
RF_FREQUENCY = 100.0e6; // Reference frequency of problem (Hz).
RF_WAVELENGTH = CLIGHT / RF_FREQUENCY; // Reference wavelength (m).
REAL RF_FREQUENCY = 100.0e6; // Reference frequency of problem (Hz).
REAL RF_WAVELENGTH = CLIGHT / RF_FREQUENCY; // Reference wavelength (m).
Q_E = 1.60217653e-19; // Elementary charge (C).
E_MASS = 9.10938188e-31; // Mass of electron (kg).
REAL Q_E = 1.60217653e-19; // Elementary charge (C).
REAL E_MASS = 9.10938188e-31; // Mass of electron (kg).
BEAM_BUNCH_CHARGE = 1.0e-9; // Beam bunch charge (C).
NUMBER_OF_PARTICLES = 5000; // Number of particles in simulation
REAL BEAM_BUNCH_CHARGE = 1.0e-9; // Beam bunch charge (C).
REAL NUMBER_OF_PARTICLES = 5000; // Number of particles in simulation
PS_DUMP_FREQUENCY = 20; // How often (time steps) that the phase space of the beam is output.
STAT_DUMP_FREQUENCY = 1; // How often (time steps) beam statistical properties are output.
REAL PS_DUMP_FREQUENCY = 20; // How often (time steps) that the phase space of the beam is output.
REAL STAT_DUMP_FREQUENCY = 1; // How often (time steps) beam statistical properties are output.
value, {RF_FREQUENCY,
RF_WAVELENGTH,
......@@ -36,10 +37,10 @@ value, {RF_FREQUENCY,
// Time steps defined.
TIME_STEP_1 = 4.3734562802893905e-12; // Time step (s). We only need one for this simulation.
REAL TIME_STEP_1 = 4.3734562802893905e-12; // Time step (s). We only need one for this simulation.
value, {TIME_STEP_1};
//******************************************************************************************************************
// FIELD SOLVERS
//
......@@ -48,9 +49,9 @@ value, {TIME_STEP_1};
// First define the space charge (SC) mesh.
// Space charge mesh.
FS_SC1_X_BINS = 16; // Number of mesh bins in x direction for space charge field solver.
FS_SC1_Y_BINS = 16; // Number of mesh bins in y direction for space charge field solver.
FS_SC1_Z_BINS = 64; // Number of mesh bins in z direction for space charge field solver.
REAL FS_SC1_X_BINS = 16; // Number of mesh bins in x direction for space charge field solver.
REAL FS_SC1_Y_BINS = 16; // Number of mesh bins in y direction for space charge field solver.
REAL FS_SC1_Z_BINS = 64; // Number of mesh bins in z direction for space charge field solver.
value, {FS_SC1_X_BINS,
FS_SC1_Y_BINS,
......@@ -58,14 +59,14 @@ value, {FS_SC1_X_BINS,
// CSR.
CSR_ON = 1; // If greater than 0, use the CSR calculation in the bends.
REAL CSR_ON = 1; // If greater than 0, use the CSR calculation in the bends.
CSR_FFT_FREQ = -1; // Specifies the number of FFT frequencies to keep in FFT low pass filter.
REAL CSR_FFT_FREQ = -1; // Specifies the number of FFT frequencies to keep in FFT low pass filter.
// If less than zero the FFT filter is not used.
CSR_SG_NLEFT = 4; // Number of points to the left of the mesh point to use in Savitzky-Golay smoothing.
CSR_SG_NRIGHT = 4; // Number of points to the the right of the mesh point to use in Savitzky-Golay smoothing.
CSR_SG_POLYORDER = 4; // The polynomial order to use in Savitzky-Golay smoothing.
REAL CSR_SG_NLEFT = 4; // Number of points to the left of the mesh point to use in Savitzky-Golay smoothing.
REAL CSR_SG_NRIGHT = 4; // Number of points to the the right of the mesh point to use in Savitzky-Golay smoothing.
REAL CSR_SG_POLYORDER = 4; // The polynomial order to use in Savitzky-Golay smoothing.
value, {CSR_ON,
CSR_FFT_FREQ,
......@@ -81,7 +82,7 @@ value, {CSR_ON,
// Beam line offset. This is global shift of the entire line (m).
//===============================================================
global_shift = 1.0;
REAL global_shift = 1.0;
// Bend.
......@@ -91,16 +92,16 @@ global_shift = 1.0;
//================================================
// drift before bend (m).
drift_before_bend = 0.1;
REAL drift_before_bend = 0.1;
// Bend angle (radians).
bend_angle = 0.5235987755982988;
REAL bend_angle = 0.5235987755982988;
// Bend design energy (eV).
bend_energy = 7.0e6;
REAL bend_energy = 7.0e6;
// Bend length (m).
bend_length = 0.129409522551;
REAL bend_length = 0.129409522551;
value, {drift_before_bend,
......@@ -151,11 +152,11 @@ if (CSR_FFT_FREQ >= 1) {
FS_CSR_WAKE: Wake, TYPE = "1D-CSR",
FILTERS = {FFT_Filter,
SG_Filter};
SG_Filter};
} else {
FS_CSR_WAKE: Wake, TYPE = "1D-CSR",
FS_CSR_WAKE: Wake, TYPE = "1D-CSR",
FILTERS = {SG_Filter};
}
......@@ -227,8 +228,8 @@ Option, STATDUMPFREQ = STAT_DUMP_FREQUENCY;
//\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
// Here we define beam that will be transported.
//\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
beam1: BEAM, PARTICLE = ELECTRON, pc = P0, NPART = NUMBER_OF_PARTICLES, BFREQ = RF_FREQUENCY,
BCURRENT = BEAM_BUNCH_CHARGE * RF_FREQUENCY,
beam1: BEAM, PARTICLE = ELECTRON, pc = P0, NPART = NUMBER_OF_PARTICLES, BFREQ = RF_FREQUENCY * 1e-6,
BCURRENT = BEAM_BUNCH_CHARGE * RF_FREQUENCY,
CHARGE = -1;
......@@ -237,9 +238,9 @@ beam1: BEAM, PARTICLE = ELECTRON, pc = P0, NPART = NUMBER_OF_PARTICLES, BFREQ =
//\\\\\\\\\\\\\\\\
TRACK, LINE = inputBeamline, BEAM = beam1, MAXSTEPS = 2000, DT = TIME_STEP_1;
RUN, METHOD = "PARALLEL-T", BEAM = beam1, FIELDSOLVER = FS_SC1,
RUN, METHOD = "PARALLEL-T", BEAM = beam1, FIELDSOLVER = FS_SC1,
DISTRIBUTION = dist1;
ENDTRACK;
Stop;
Quit;
Quit;
\ No newline at end of file
#!/bin/bash
cd $REG_TEST_DIR
mpirun -np 1 $OPAL_EXE_PATH/opal CSRBendDrift.in --commlib mpi --info 3 --warn 0 2>&1
mpirun -np 1 "$OPAL_EXE_PATH/opal" "$@" CSRBendDrift.in --commlib mpi --info 3 --warn 0 2>&1
This source diff could not be displayed because it is too large. You can view the blob instead.
d486b8272a45768402ea1c91bbb974e1 CSRBendDrift.out
0165fc839f8aff66135109ade03e60d5 CSRBendDrift.out
01ec371aec567609dcbbe9b4498e9e8a CSRBendDrift.stat
37f5032ecab5f269d5540d9926aaa080 CSRBendDrift.stat
......@@ -9,11 +9,12 @@ OPTION, ECHO=TRUE; //ECHO Controls printing of an echo of input lines on the sta
OPTION, INFO=TRUE; //INFO If this option is turned off, OPAL suppresses all information messages.
OPTION, PSDUMPFREQ=10000; //Defines after how many time steps the phase space is dumped into the H5Part file. Default value is 10.
OPTION, AUTOPHASE = 1;
OPTION, VERSION=10600;
QB = 100e-12;
BFREQ = 1.3e9;
BCURRENT = QB*BFREQ;
REAL QB = 100e-12;
REAL BFREQ = 1.3e9;
REAL BCURRENT = QB*BFREQ;
call, file = "lat.opal";
......@@ -28,9 +29,9 @@ no_fieldsolver:FIELDSOLVER,
my_beam: BEAM,
PARTICLE=ELECTRON,
//pc = 10, // momentum per particle in GeV/c
NPART = 20, //number of test particles simulated
NPART = 27, //number of test particles simulated
BCURRENT = BCURRENT, // beam current in A
BFREQ = BFREQ;
BFREQ = BFREQ * 1e-6;
SELECT, LINE=lattice;
......
#!/bin/bash
mpirun -np 1 $OPAL_EXE_PATH/opal DCGun-Cornell-1.in --commlib mpi --info 3 --warn 0 2>&1
mpirun -np 1 "$OPAL_EXE_PATH/opal" "$@" DCGun-Cornell-1.in --commlib mpi --info 3 --warn 0 2>&1
......@@ -4,16 +4,16 @@
//-----------------
TITLE, STRING="DCGun-Cornell";
OPTION, ECHO=TRUE; //ECHO Controls printing of an echo of input lines on the standard error file.
OPTION, INFO=TRUE; //INFO If this option is turned off, OPAL suppresses all information messages.
OPTION, PSDUMPFREQ=10000; //Defines after how many time steps the phase space is dumped into the H5Part file. Default value is 10.
OPTION, AUTOPHASE = 1;
OPTION, VERSION=10600;
QB = 100e-12;
BFREQ = 1.3e9;
BCURRENT = QB*BFREQ;
REAL QB = 100e-12;
REAL BFREQ = 1.3e9;
REAL BCURRENT = QB*BFREQ;
call, file = "lat.opal";
......@@ -29,9 +29,9 @@ no_fieldsolver:FIELDSOLVER,
my_beam: BEAM,
PARTICLE=ELECTRON,
//pc = 10, // momentum per particle in GeV/c
NPART = 20, //number of test particles simulated
NPART = 27, //number of test particles simulated
BCURRENT = BCURRENT, // beam current in A
BFREQ = BFREQ;
BFREQ = BFREQ * 1e-6;
SELECT, LINE=lattice;
......
#!/bin/bash
mpirun -np 1 $OPAL_EXE_PATH/opal DCGun-Cornell-2.in --commlib mpi --info 3 --warn 0 2>&1
mpirun -np 1 "$OPAL_EXE_PATH/opal" "$@" DCGun-Cornell-2.in --commlib mpi --info 3 --warn 0 2>&1
OPTION, ECHO=FALSE;
OPTION, PSDUMPFREQ=10;
OPTION, VERSION=10600;
MINBINEMITTED = 1;
REAL MINBINEMITTED = 1;
TITLE,STRING="degrader-1";
Edes = 0.072;
gamma = (Edes+PMASS)/PMASS;
beta = sqrt(1-(1/gamma^2));
gambet = gamma*beta;
P0 = gamma*beta*PMASS;
brho = (PMASS*1.0e9*gambet) / CLIGHT;
rf = 50.6328e6; //need to be confirmed
REAL Edes = 0.072;
REAL gamma = (Edes+PMASS)/PMASS;
REAL beta = sqrt(1-(1/gamma^2));
REAL gambet = gamma*beta;
REAL P0 = gamma*beta*PMASS;
REAL brho = (PMASS*1.0e9*gambet) / CLIGHT;
REAL rf = 50.6328; //need to be confirmed
VALUE,{gamma,brho,Edes,beta,gambet};
DEGPHYS: SURFACEPHYSICS, TYPE="DEGRADER", MATERIAL="Graphite";
DEGPHYS: SURFACEPHYSICS, TYPE="DEGRADER", MATERIAL="Graphite", ENABLERUTHERFORD=true;
DEG1: DEGRADER, L=0.01, ELEMEDGE=0.02, OUTFN="DEG1.h5", SURFACEPHYSICS=DEGPHYS;
DEG1: DEGRADER, L=0.01, ELEMEDGE=0.02, SURFACEPHYSICS=DEGPHYS;
M0: Monitor, L=0.001, ELEMEDGE=0.010, OUTFN="M0.h5";
M1: Monitor, L=0.001, ELEMEDGE=0.035, OUTFN="M1.h5";
......@@ -27,12 +28,12 @@ DEGTEST: LINE=(M0,DEG1,M1);
D1: DISTRIBUTION, DISTRIBUTION=GAUSS,
SIGMAX= 5.0e-03, SIGMAPX=0.0, CORRX=0.0,
SIGMAY= 5.0e-03, SIGMAPY=0.0, CORRY=0.0,
T = 0.005, SIGMAT= 0.0005,
T = 0.005, SIGMAT= 0.0005,
SIGMAPT=0.0, CORRT=0.0, R61=0.0, INPUTMOUNITS=EV;
FS1:FIELDSOLVER, FSTYPE=NONE, MX=64, MY=64, MT=64,
FS1:FIELDSOLVER, FSTYPE=NONE, MX=64, MY=64, MT=64,
PARFFTX=true, PARFFTY=true, PARFFTT=true,
BCFFTX=open, BCFFTY=open, BCFFTT=open,
BCFFTX=open, BCFFTY=open, BCFFTT=open,
BBOXINCR=1, GREENSF=STANDARD;
BEAM1: BEAM, PARTICLE=PROTON, PC=P0, NPART=1E6, BCURRENT=2.0e-03, BFREQ=rf, CHARGE=1;
......@@ -43,4 +44,4 @@ TRACK, LINE=DEGTEST, BEAM=BEAM1, MAXSTEPS=230, DT=1.0e-12;
RUN, METHOD = "PARALLEL-T", BEAM=BEAM1, FIELDSOLVER=FS1, DISTRIBUTION=D1;
ENDTRACK;
STOP;
STOP;
\ No newline at end of file
#!/bin/bash
mpirun -np 4 $OPAL_EXE_PATH/opal Degrader-1.in --info 3 --warn 0 2>&1
mpirun -np 4 "$OPAL_EXE_PATH/opal" "$@" Degrader-1.in --info 3 --warn 0 2>&1
"Simple slab of carbon as degrader of a 72 MeV proton beam"
out "Ekin" last 1E-03
out "Ekin" last 1E-02
out "rms beam size" last 1E-04
out "rms emittance" last 1E-04
......@@ -12,14 +12,14 @@
251711 249251 249803 249235
251711 249251 249803 249235
251711 249251 249803 249235
211380 209328 209973 209210
26696 26630 26738 27042
558 619 607 670
81700 79779 82478 81679
251772 238260 242227 230729
300494 223378 272346 203712
270454 193007 312186 224302
272891 187145 319390 220531
275103 181469 326711 216684
293715 185933 317812 202512
298958 182042 321731 197243
211380 209328 209973 209209
26794 26751 26639 26920
1494 1500 1406 1443
93129 93077 111371 112332
227565 217092 272165 261463
279714 267289 230711 222245
287380 264090 232966 215538
294943 260756 235224 209055
299801 259226 235928 205024
294353 261761 234330 209537
289268 264063 232721 213929
ced37056158396d2b54ba6d38c77b175 Degrader-1.lbal
f255779b5e01d77b6976b2c635f758fe Degrader-1.lbal
This source diff could not be displayed because it is too large. You can view the blob instead.
dac3e9ef7dd5b21a53358950f3958e16 Degrader-1.out
c13812f4f1213b86d82decb70d2d424b Degrader-1.out
421a5d9002cf2097c65e6f4a9442dead Degrader-1.stat
093d9787ea772e6c452696740ad989df Degrader-1.stat
......@@ -3,26 +3,27 @@ OPTION, PSDUMPFREQ=1000;
OPTION, STATDUMPFREQ=1000;
OPTION, ENABLEHDF5 = FALSE;
OPTION, TELL=FALSE;
OPTION, VERSION=10600;
// OPAL Input forLA1line
TFast = 5e-11;
TSlow = 5e-12;
TDeg = 1e-12;
Edes = 0.249489;
gamma = (Edes+PMASS)/PMASS;
beta = sqrt(1-(1/gamma^2));
gambet = gamma*beta;
P0 = gamma*beta*PMASS;
brho = (PMASS*1.0e9*gambet) / CLIGHT;
REAL TFast = 5e-11;
REAL TSlow = 5e-12;
REAL TDeg = 1e-12;
REAL Edes = 0.249489;
REAL gamma = (Edes+PMASS)/PMASS;
REAL beta = sqrt(1-(1/gamma^2));
REAL gambet = gamma*beta;
REAL P0 = gamma*beta*PMASS;
REAL brho = (PMASS*1.0e9*gambet) / CLIGHT;
VALUE,{gamma,brho,Edes,beta,gambet};
rf = 50.6328e6;
NProt =50000.0;
REAL rf = 50.6328e6;
REAL NProt =50000.0;
OX = 0.1e-3;
KX = 0.343e-3;
OY = 0.1e-3;
KY = 0.29e-3;
REAL OX = 0.1e-3;
REAL KX = 0.343e-3;
REAL OY = 0.1e-3;
REAL KY = 0.29e-3;
DISTRIB1: DISTRIBUTION,
SIGMAX = 0.001861, SIGMAPX = 0.001485*gambet,
......@@ -37,7 +38,7 @@ DISTRIBUTION = GAUSS, INPUTMOUNITS = NONE;
UPAC: DRIFT, L=0, ELEMEDGE=0;
D1: DRIFT, L=0.3262, ELEMEDGE=0;
D1A: DRIFT, L=0.01, ELEMEDGE=0;
D1A: DRIFT, L=0.01, ELEMEDGE=0;
COMET: KICKER, HKICK=-0.00181235969188, VKICK=KY, L=0.3776, ELEMEDGE=0.01;
D2: DRIFT, L=0.0209, ELEMEDGE=0.3876;
MMAP1X: MONITOR, OUTFN="MMAP1X.h5", ELEMEDGE=0.4085;
......@@ -66,32 +67,32 @@ MMAP7X: MONITOR, OUTFN="MMAP7X.h5", ELEMEDGE=3.645;
MMAP8Y: MONITOR, OUTFN="MMAP8Y.h5", ELEMEDGE=3.645;
Titan1: DRIFT, L=0.000228, ELEMEDGE=3.645;
DEGPHYS_Air1 : SURFACEPHYSICS, TYPE="DEGRADER", MATERIAL="Air";
Air1: DEGRADER, L=0.069, ZSIZE= 0.069, OUTFN="Air1.h5", SURFACEPHYSICS=DEGPHYS_Air1 , ELEMEDGE=3.64523;
Air1: DEGRADER, L=0.069, SURFACEPHYSICS=DEGPHYS_Air1 , ELEMEDGE=3.64523;
D13: DRIFT, L=0.015772, ELEMEDGE=3.71423;
BMA1I: ECOLLIMATOR, XSIZE=0.005, YSIZE=0.005, L=0.002, ELEMEDGE=3.73;
D14: DRIFT, L=0.246, ELEMEDGE=3.732;
BMA1O: ECOLLIMATOR, XSIZE=0.00625, YSIZE=0.00625, L=0.002, ELEMEDGE=3.978;
D15: DRIFT, L=0.02, ELEMEDGE=3.98;
DEGPHYS_Wedge1 : SURFACEPHYSICS, TYPE="DEGRADER", MATERIAL="GraphiteR6710";
Wedge1: DEGRADER, L=0.0176057, ZSIZE= 0.0176057, OUTFN="Wedge1.h5", SURFACEPHYSICS=DEGPHYS_Wedge1 , ELEMEDGE=4;
Wedge1: DEGRADER, L=0.0176057, SURFACEPHYSICS=DEGPHYS_Wedge1 , ELEMEDGE=4;
Deg_D1: DRIFT, L=0.00589856, ELEMEDGE=4.01761;
DEGPHYS_Wedge2 : SURFACEPHYSICS, TYPE="DEGRADER", MATERIAL="GraphiteR6710";
Wedge2: DEGRADER, L=0.0352114, ZSIZE= 0.0352114, OUTFN="Wedge2.h5", SURFACEPHYSICS=DEGPHYS_Wedge2 , ELEMEDGE=4.0235;
Wedge2: DEGRADER, L=0.0352114, SURFACEPHYSICS=DEGPHYS_Wedge2 , ELEMEDGE=4.0235;
Deg_D2: DRIFT, L=0.00589856, ELEMEDGE=4.05872;
DEGPHYS_Wedge3 : SURFACEPHYSICS, TYPE="DEGRADER", MATERIAL="GraphiteR6710";
Wedge3: DEGRADER, L=0.0352114, ZSIZE= 0.0352114, OUTFN="Wedge3.h5", SURFACEPHYSICS=DEGPHYS_Wedge3 , ELEMEDGE=4.06461;
Wedge3: DEGRADER, L=0.0352114, SURFACEPHYSICS=DEGPHYS_Wedge3 , ELEMEDGE=4.06461;
Deg_D3: DRIFT, L=0.00589856, ELEMEDGE=4.09983;
DEGPHYS_Wedge4 : SURFACEPHYSICS, TYPE="DEGRADER", MATERIAL="GraphiteR6710";
Wedge4: DEGRADER, L=0.0352114, ZSIZE= 0.0352114, OUTFN="Wedge4.h5", SURFACEPHYSICS=DEGPHYS_Wedge4 , ELEMEDGE=4.10572;
Wedge4: DEGRADER, L=0.0352114, SURFACEPHYSICS=DEGPHYS_Wedge4 , ELEMEDGE=4.10572;
Deg_D4: DRIFT, L=0.00589856, ELEMEDGE=4.14094;
DEGPHYS_Wedge5 : SURFACEPHYSICS, TYPE="DEGRADER", MATERIAL="GraphiteR6710";
Wedge5: DEGRADER, L=0.0352114, ZSIZE= 0.0352114, OUTFN="Wedge5.h5", SURFACEPHYSICS=DEGPHYS_Wedge5 , ELEMEDGE=4.14683;
Wedge5: DEGRADER, L=0.0352114, SURFACEPHYSICS=DEGPHYS_Wedge5 , ELEMEDGE=4.14683;
Deg_D5: DRIFT, L=0.00589856, ELEMEDGE=4.18205;
DEGPHYS_Wedge6 : SURFACEPHYSICS, TYPE="DEGRADER", MATERIAL="GraphiteR6710";
Wedge6: DEGRADER, L=0.0190057, ZSIZE= 0.0190057, OUTFN="Wedge6.h5", SURFACEPHYSICS=DEGPHYS_Wedge6 , ELEMEDGE=4.18794;
Wedge6: DEGRADER, L=0.0190057, SURFACEPHYSICS=DEGPHYS_Wedge6 , ELEMEDGE=4.18794;
DEGPHYS_Single : SURFACEPHYSICS, TYPE="DEGRADER", MATERIAL="GraphiteR6710";
Wedge: DEGRADER, L=0.177457, ZSIZE=0.177457, OUTFN="Wedge.h5", SURFACEPHYSICS=DEGPHYS_Single , ELEMEDGE=4;
Wedge: DEGRADER, L=0.177457, SURFACEPHYSICS=DEGPHYS_Single , ELEMEDGE=4;
Alumina1: DRIFT, L=0.0003, ELEMEDGE=4.20555;
D16: DRIFT, L=0.00465, ELEMEDGE=4.20585;
......@@ -273,12 +274,12 @@ MMAP16Y,D34A,FMA1,D35,SMA3,D36,MMAHL02,D37,QMA8,QMA8_r0,D38,QMA9,QMA9_r0,D39,MMA
QMA10,QMA10_r0,D43,QMA11,QMA11_r0,D44,MMAP19X,MMAP20Y,D44a,SMA4,D44b,KFR3,MMAP21X,MMAP22Y,D45,KMA8,D46,D47,D49,MMAP25X,MMAP26Y);
FS1:FIELDSOLVER, FSTYPE=NONE, MX=64, MY=64, MT=64, PARFFTX=true, PARFFTY=false, PARFFTT=false, BCFFTX=open, BCFFTY=open, BCFFTT=open, BBOXINCR=1, GREENSF=STANDARD;
BEAM_A2: BEAM, PARTICLE=PROTON, PC=P0, NPART=NProt, BCURRENT=NProt*1.6e-19*rf, BFREQ=rf, CHARGE=1;
BEAM_A2: BEAM, PARTICLE=PROTON, PC=P0, NPART=NProt, BCURRENT=NProt*1.6e-19*rf, BFREQ=rf * 1e-6, CHARGE=1;
SELECT, LINE=BEAMLINE_A2;
TRACK, LINE=BEAMLINE_A2, BEAM=BEAM_A2,
TRACK, LINE=BEAMLINE_A2, BEAM=BEAM_A2,
MAXSTEPS={5E+8, 5E+8, 5E+8}, DT={TSlow,TDeg,TSlow}, ZSTOP={3.60, 4.60,20.2825};
RUN, METHOD = "PARALLEL-T", BEAM=BEAM_A2, FIELDSOLVER=FS1, DISTRIBUTION=DISTRIB1;
ENDTRACK;