Commit 2502a46d authored by kraus's avatar kraus

prefixing all real variables for the remaining tests

parent 2d847887
......@@ -6,15 +6,15 @@ Option, VERSION=10900;
Title, string="Phase 1 of PSI FEL 250 Injector with CTF3 RF Photoinjector";
FINSB01_RACC_phi = 0;
FINSB02_RACC_phi = 0;
REAL FINSB01_RACC_phi = 0;
REAL FINSB02_RACC_phi = 0;
REPARTFREQ = 100;
MINSTEPFORREBIN = 600;
REAL REPARTFREQ = 100;
REAL MINSTEPFORREBIN = 600;
QB = 0.2e-9;
BF = 2998.0;
BC = QB*BF;
REAL QB = 0.2e-9;
REAL BF = 2998.0;
REAL BC = QB*BF;
// Begin: CTF3 /////////////////////////////////////////////////////////////////////////////////////////////////
......
......@@ -6,15 +6,15 @@ Option, VERSION=10900;
Title, string="Phase 1 of PSI FEL 250 Injector with CTF3 RF Photoinjector";
FINSB01_RACC_phi = 0;
FINSB02_RACC_phi = 0;
REAL FINSB01_RACC_phi = 0;
REAL FINSB02_RACC_phi = 0;
REPARTFREQ = 100;
MINSTEPFORREBIN = 600;
REAL REPARTFREQ = 100;
REAL MINSTEPFORREBIN = 600;
QB = 0.2e-9;
BF = 2998.0;
BC = QB*BF;
REAL QB = 0.2e-9;
REAL BF = 2998.0;
REAL BC = QB*BF;
// Begin: CTF3 /////////////////////////////////////////////////////////////////////////////////////////////////
......
......@@ -6,15 +6,15 @@ Option, VERSION=10900;
Title, string="Phase 1 of PSI FEL 250 Injector with CTF3 RF Photoinjector";
FINSB01_RACC_phi = 0;
FINSB02_RACC_phi = 0;
REAL FINSB01_RACC_phi = 0;
REAL FINSB02_RACC_phi = 0;
REPARTFREQ = 100;
MINSTEPFORREBIN = 600;
REAL REPARTFREQ = 100;
REAL MINSTEPFORREBIN = 600;
QB = 0.2e-9;
BF = 2998.0;
BC = QB*BF;
REAL QB = 0.2e-9;
REAL BF = 2998.0;
REAL BC = QB*BF;
// Begin: CTF3 /////////////////////////////////////////////////////////////////////////////////////////////////
......
......@@ -6,15 +6,15 @@ Option, VERSION=10900;
Title, string="Phase 1 of PSI FEL 250 Injector with CTF3 RF Photoinjector";
FINSB01_RACC_phi = 0;
FINSB02_RACC_phi = 0;
REAL FINSB01_RACC_phi = 0;
REAL FINSB02_RACC_phi = 0;
REPARTFREQ = 100;
MINSTEPFORREBIN = 600;
REAL REPARTFREQ = 100;
REAL MINSTEPFORREBIN = 600;
QB = 0.2e-9;
BF = 2998.0;
BC = QB*BF;
REAL QB = 0.2e-9;
REAL BF = 2998.0;
REAL BC = QB*BF;
// Begin: CTF3 /////////////////////////////////////////////////////////////////////////////////////////////////
......
FINSS_RGUN_phi= 2.22368; // E= 6.63134 (MeV)
FINSB01_RACC_phi= -0.313154; // E= 36.1093 (MeV)
FINSB02_RACC_phi= 5.835; // E= 67.2898 (MeV)
REAL FINSS_RGUN_phi= 2.22368; // E= 6.63134 (MeV)
REAL FINSB01_RACC_phi= -0.313154; // E= 36.1093 (MeV)
REAL FINSB02_RACC_phi= 5.835; // E= 67.2898 (MeV)
\ No newline at end of file
......@@ -5,13 +5,13 @@ Option, VERSION=10900;
Title, string="SwissFEL Injector, Phase 1 (Feb. 2010)";
FINSS_RGUN_phi= 0;
FINSB01_RACC_phi= 0;
FINSB02_RACC_phi= 0;
REAL FINSS_RGUN_phi= 0;
REAL FINSB01_RACC_phi= 0;
REAL FINSB02_RACC_phi= 0;
call, "FinPhase1.phases";
REPARTFREQ= 100;
REAL REPARTFREQ= 100;
value,{FINSS_RGUN_phi, FINSB01_RACC_phi, FINSB02_RACC_phi, REPARTFREQ};
......@@ -45,18 +45,18 @@ Dist1:DISTRIBUTION, TYPE = "GUNGAUSSFLATTOPTH",
DEBIN = 80,
NBIN = 101 , INPUTMOUNITS=EV;
MINSTEPFORREBIN = 1000;
REAL MINSTEPFORREBIN = 1000;
Fs1:FIELDSOLVER, FSTYPE=FFT, MX=16, MY=16, MT=32,
PARFFTX=true, PARFFTY=true, PARFFTT=true,
BCFFTX=open, BCFFTY=open, BCFFTT=open,
BBOXINCR=1, GREENSF=INTEGRATED;
qb=0.2e-9;
bfreq=2998.0;
bcurrent=qb*bfreq;
Edes=0.63;
gamma=(Edes+EMASS)/EMASS;
REAL qb=0.2e-9;
REAL bfreq=2998.0;
REAL bcurrent=qb*bfreq;
REAL Edes=0.63;
REAL gamma=(Edes+EMASS)/EMASS;
beam1: BEAM, PARTICLE=ELECTRON, GAMMA=gamma, pc=P0, NSLICE=101, BFREQ=bfreq, BCURRENT=bcurrent, CHARGE=-1;
......
FINSS_RGUN_phi= 2.22368; // E= 6.63134 (MeV)
FINSB01_RACC_phi= -0.313154; // E= 36.1093 (MeV)
FINSB02_RACC_phi= 5.835; // E= 67.2898 (MeV)
REAL FINSS_RGUN_phi= 2.22368; // E= 6.63134 (MeV)
REAL FINSB01_RACC_phi= -0.313154; // E= 36.1093 (MeV)
REAL FINSB02_RACC_phi= 5.835; // E= 67.2898 (MeV)
\ No newline at end of file
......@@ -5,9 +5,9 @@ Option, VERSION=10900;
Title, string="SwissFEL Injector, Phase 1 (Feb. 2010)";
FINSS_RGUN_phi= 0;
FINSB01_RACC_phi= 0;
FINSB02_RACC_phi= 0;
REAL FINSS_RGUN_phi= 0;
REAL FINSB01_RACC_phi= 0;
REAL FINSB02_RACC_phi= 0;
call, "FinPhase1.phases";
......@@ -44,18 +44,18 @@ Dist1:DISTRIBUTION, TYPE = "GUNGAUSSFLATTOPTH",
DEBIN = 80,
NBIN = 101 , INPUTMOUNITS=EV;
MINSTEPFORREBIN = 1000;
REAL MINSTEPFORREBIN = 1000;
Fs1:FIELDSOLVER, FSTYPE=FFT, MX=16, MY=16, MT=32,
PARFFTX=true, PARFFTY=true, PARFFTT=true,
BCFFTX=open, BCFFTY=open, BCFFTT=open,
BBOXINCR=1, GREENSF=INTEGRATED;
qb=0.2e-9;
bfreq=2998.0;
bcurrent=qb*bfreq;
Edes=0.63;
gamma=(Edes+EMASS)/EMASS;
REAL qb=0.2e-9;
REAL bfreq=2998.0;
REAL bcurrent=qb*bfreq;
REAL Edes=0.63;
REAL gamma=(Edes+EMASS)/EMASS;
beam1: BEAM, PARTICLE=ELECTRON, GAMMA=gamma, pc=P0, NSLICE=101, BFREQ=bfreq, BCURRENT=bcurrent, CHARGE=-1;
......
......@@ -12,29 +12,29 @@ Option, VERSION=10900;
Title,string="OPAL-cycl: the first turn acceleration in PSI 590MeV Ring";
Edes=.072;
gamma=(Edes+PMASS)/PMASS;
beta=sqrt(1-(1/gamma^2));
gambet=gamma*beta;
P0 = gamma*beta*PMASS;
brho = (PMASS*1.0e9*gambet) / CLIGHT;
REAL Edes=.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;
//value,{gamma,brho,Edes,beta,gambet};
phi01=139.4281;
phi02=phi01+180.0;
phi04=phi01;
phi05=phi01+180.0;
phi03=phi01+10.0;
REAL phi01=139.4281;
REAL phi02=phi01+180.0;
REAL phi04=phi01;
REAL phi05=phi01+180.0;
REAL phi03=phi01+10.0;
volt1st=0.9;
volt3rd=0.9*4.0*0.112;
REAL volt1st=0.9;
REAL volt3rd=0.9*4.0*0.112;
turns = 1;
nstep=2000;
REAL turns = 1;
REAL nstep=2000;
frequency=50.650;
frequency3=3.0*frequency;
REAL frequency=50.650;
REAL frequency3=3.0*frequency;
ring: Cyclotron, TYPE="RING", CYHARMON=6, PHIINIT=0.0,
PRINIT=-0.000174, RINIT=2130.0, SYMMETRY=8.0, RFFREQ=frequency,
......
......@@ -13,29 +13,29 @@ Option, VERSION=10900;
Title,string="OPAL-cycl: the first turn acceleration in PSI 590MeV Ring";
Edes=.072;
gamma=(Edes+PMASS)/PMASS;
beta=sqrt(1-(1/gamma^2));
gambet=gamma*beta;
P0 = gamma*beta*PMASS;
brho = (PMASS*1.0e9*gambet) / CLIGHT;
REAL Edes=.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;
//value,{gamma,brho,Edes,beta,gambet};
phi01=139.4281;
phi02=phi01+180.0;
phi04=phi01;
phi05=phi01+180.0;
phi03=phi01+10.0;
REAL phi01=139.4281;
REAL phi02=phi01+180.0;
REAL phi04=phi01;
REAL phi05=phi01+180.0;
REAL phi03=phi01+10.0;
volt1st=0.9;
volt3rd=0.9*4.0*0.112;
REAL volt1st=0.9;
REAL volt3rd=0.9*4.0*0.112;
turns = 1;
nstep=200;
REAL turns = 1;
REAL nstep=200;
frequency=50.650;
frequency3=3.0*frequency;
REAL frequency=50.650;
REAL frequency3=3.0*frequency;
ring: Cyclotron, TYPE="RING", CYHARMON=6, PHIINIT=0.0,
PRINIT=-0.000174, RINIT=2130.0, SYMMETRY=8.0, RFFREQ=frequency,
......
......@@ -10,29 +10,29 @@ Option, VERSION=10900;
Title,string="OPAL-cycl: test matched distribution PSI Ring";
Edes=.580;
gamma=(Edes+PMASS)/PMASS;
beta=sqrt(1-(1/gamma^2));
gambet=gamma*beta;
P0 = gamma*beta*PMASS;
brho = (PMASS*1.0e9*gambet) / CLIGHT;
REAL Edes=.580;
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};
phi01=139.4281;
phi02=phi01+180.0;
phi04=phi01;
phi05=phi01+180.0;
phi03=phi01+10.0;
REAL phi01=139.4281;
REAL phi02=phi01+180.0;
REAL phi04=phi01;
REAL phi05=phi01+180.0;
REAL phi03=phi01+10.0;
volt1st=0.9;
volt3rd=0.9*4.0*0.112;
REAL volt1st=0.9;
REAL volt3rd=0.9*4.0*0.112;
turns = 0;
nstep = 0;
REAL turns = 0;
REAL nstep = 0;
frequency=50.650;
frequency3=3.0*frequency;
REAL frequency=50.650;
REAL frequency3=3.0*frequency;
ring: Cyclotron, TYPE="RING", CYHARMON=6, PHIINIT=0.0, PRINIT=-0.000174, RINIT=2130.0,
SYMMETRY=8.0, RFFREQ=frequency,
......
......@@ -8,20 +8,20 @@ OPTION, ECHO = FALSE,
Option, VERSION=10900;
// Some local variables
Ekin = 59940*1e-9; // eV -> GeV
H2mass = 1.876634889; // GeV/c^2
Etot = Ekin+H2mass;
gamma = Etot/H2mass; // Dimless
beta = sqrt(1-(1/gamma^2)); // Dimless
gambet = gamma*beta; // Dimless
P0 = gambet*H2mass; // GeV/c
brho = (H2mass*1.0e9*gambet)/CLIGHT;
RF_FREQ = 8.2 * 1e6; // Hz (6th harmonic = 49.2 MHz)
harmonic = 6;
REAL Ekin = 59940*1e-9; // eV -> GeV
REAL H2mass = 1.876634889; // GeV/c^2
REAL Etot = Ekin+H2mass;
REAL gamma = Etot/H2mass; // Dimless
REAL beta = sqrt(1-(1/gamma^2)); // Dimless
REAL gambet = gamma*beta; // Dimless
REAL P0 = gambet*H2mass; // GeV/c
REAL brho = (H2mass*1.0e9*gambet)/CLIGHT;
REAL RF_FREQ = 8.2 * 1e6; // Hz (6th harmonic = 49.2 MHz)
REAL harmonic = 6;
value,{Ekin, beta, gamma, brho, P0};
// Input variables from data file
CURRENT = 30e-1; // Beam current in A (0.01 - 0.05)
REAL CURRENT = 30e-1; // Beam current in A (0.01 - 0.05)
// Available Geometry Files
// Geometry File 1: "Pipe_1m_10cm.h5"
......
......@@ -13,18 +13,18 @@ Title, string="SBend Test";
//
// Here we define some global simulation parameters.
RF_FREQUENCY = 700.0e6; // Reference frequency of problem (Hz).
RF_WAVELENGTH = CLIGHT / RF_FREQUENCY; // Reference wavelength (m).
REAL RF_FREQUENCY = 700.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 = 0.0e-15; // Beam bunch charge (C).
NUMBER_OF_PARTICLES = 10000; // Number of particles in simulation
REAL BEAM_BUNCH_CHARGE = 0.0e-15; // Beam bunch charge (C).
REAL NUMBER_OF_PARTICLES = 10000; // Number of particles in simulation
PS_DUMP_FREQUENCY = 1000; // How often (time steps) that the phase space of the beam is output.
STAT_DUMP_FREQUENCY = 10; // How often (time steps) beam statistical properties are output.
REAL PS_DUMP_FREQUENCY = 1000; // How often (time steps) that the phase space of the beam is output.
REAL STAT_DUMP_FREQUENCY = 10; // How often (time steps) beam statistical properties are output.
value, {RF_FREQUENCY,
RF_WAVELENGTH,
......@@ -40,7 +40,7 @@ value, {RF_FREQUENCY,
// Time steps defined.
//\\\\\\\\\\\\\\\\\\\\
TIME_STEP_1 = 2.0 * 1.0e-12; // Time step (s). We only need one for this simulation.
REAL TIME_STEP_1 = 2.0 * 1.0e-12; // Time step (s). We only need one for this simulation.
value, {TIME_STEP_1};
......@@ -59,9 +59,9 @@ value, {TIME_STEP_1};
// First define the space charge (SC) mesh.
// Space charge mesh.
FS_SC1_X_BINS = 8; // Number of mesh bins in x direction for space charge field solver.
FS_SC1_Y_BINS = 8; // Number of mesh bins in y direction for space charge field solver.
FS_SC1_Z_BINS = 8; // Number of mesh bins in z direction for space charge field solver.
REAL FS_SC1_X_BINS = 8; // Number of mesh bins in x direction for space charge field solver.
REAL FS_SC1_Y_BINS = 8; // Number of mesh bins in y direction for space charge field solver.
REAL FS_SC1_Z_BINS = 8; // Number of mesh bins in z direction for space charge field solver.
value, {FS_SC1_X_BINS,
FS_SC1_Y_BINS,
......@@ -83,7 +83,7 @@ value, {FS_SC1_X_BINS,
// Beam line offset. This is global shift of the entire line (m).
//===============================================================
global_shift = 1.0;
REAL global_shift = 1.0;
// Bend.
......@@ -93,34 +93,34 @@ global_shift = 1.0;
//================================================
// Drift before bend (m).
drift_before_bend = 0.25;
REAL drift_before_bend = 0.25;
// Drift after bend (m).
drift_after_bend = 0.5;
REAL drift_after_bend = 0.5;
// Bend angle (degrees).
bend_angle = 30.0;
REAL bend_angle = 30.0;
// Bend rotation about z axis (degrees).
bend_rotation = 0.0;
REAL bend_rotation = 0.0;
// Bend entrance angle (degrees).
bend_e1 = 0.0;
REAL bend_e1 = 0.0;
// Bend exit angle (degrees).
bend_e2 = 0.0;
REAL bend_e2 = 0.0;
// Bend gradient index (m^-1).
bend_gradient = 0.0;
REAL bend_gradient = 0.0;
// Bend design energy (MeV).
bend_energy = 7.0;
REAL bend_energy = 7.0;
// Bend length (m).
bend_chord_length = 0.129409522551;
REAL bend_chord_length = 0.129409522551;
// Bend gap (m).
bend_gap = 0.02;
REAL bend_gap = 0.02;
value, {drift_before_bend,
......@@ -196,7 +196,7 @@ Bend: SBend, ANGLE = bend_angle * Pi / 180.0,
// Calculate position of end of Bend.
bend_end = global_shift + drift_before_bend + bend_chord_length + drift_after_bend;
REAL bend_end = global_shift + drift_before_bend + bend_chord_length + drift_after_bend;
value, {bend_end};
......@@ -255,7 +255,7 @@ if (NUMBER_OF_PARTICLES == 10000) {
//
// Here we start simulation.
MINSTEPFORREBIN = 750;
REAL MINSTEPFORREBIN = 750;
Option, PSDUMPFREQ = PS_DUMP_FREQUENCY;
Option, STATDUMPFREQ = STAT_DUMP_FREQUENCY;
......
#!/bin/bash
cd $REG_TEST_DIR
mpirun -np 1 $OPAL_EXE_PATH/opal SBend-Simple-Test-1.in --commlib mpi --info 3 --warn 0 2>&1
......@@ -13,18 +13,18 @@ Title, string="SBend Test";
//
// Here we define some global simulation parameters.
RF_FREQUENCY = 700.0e6; // Reference frequency of problem (Hz).
RF_WAVELENGTH = CLIGHT / RF_FREQUENCY; // Reference wavelength (m).
REAL RF_FREQUENCY = 700.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 = 0.0e-15; // Beam bunch charge (C).
NUMBER_OF_PARTICLES = 10000; // Number of particles in simulation
REAL BEAM_BUNCH_CHARGE = 0.0e-15; // Beam bunch charge (C).
REAL NUMBER_OF_PARTICLES = 10000; // Number of particles in simulation
PS_DUMP_FREQUENCY = 1000; // How often (time steps) that the phase space of the beam is output.
STAT_DUMP_FREQUENCY = 10; // How often (time steps) beam statistical properties are output.
REAL PS_DUMP_FREQUENCY = 1000; // How often (time steps) that the phase space of the beam is output.
REAL STAT_DUMP_FREQUENCY = 10; // How often (time steps) beam statistical properties are output.
value, {RF_FREQUENCY,
RF_WAVELENGTH,
......@@ -40,7 +40,7 @@ value, {RF_FREQUENCY,
// Time steps defined.
//\\\\\\\\\\\\\\\\\\\\
TIME_STEP_1 = 2.0 * 1.0e-12; // Time step (s). We only need one for this simulation.
REAL TIME_STEP_1 = 2.0 * 1.0e-12; // Time step (s). We only need one for this simulation.
value, {TIME_STEP_1};
......@@ -59,9 +59,9 @@ value, {TIME_STEP_1};
// First define the space charge (SC) mesh.
// Space charge mesh.
FS_SC1_X_BINS = 8; // Number of mesh bins in x direction for space charge field solver.
FS_SC1_Y_BINS = 8; // Number of mesh bins in y direction for space charge field solver.
FS_SC1_Z_BINS = 8; // Number of mesh bins in z direction for space charge field solver.
REAL FS_SC1_X_BINS = 8; // Number of mesh bins in x direction for space charge field solver.
REAL FS_SC1_Y_BINS = 8; // Number of mesh bins in y direction for space charge field solver.
REAL FS_SC1_Z_BINS = 8; // Number of mesh bins in z direction for space charge field solver.
value, {FS_SC1_X_BINS,
FS_SC1_Y_BINS,
......@@ -83,7 +83,7 @@ value, {FS_SC1_X_BINS,
// Beam line offset. This is global shift of the entire line (m).
//===============================================================
global_shift = 1.0;
REAL global_shift = 1.0;
// Bend.
......@@ -93,34 +93,34 @@ global_shift = 1.0;
//================================================
// Drift before bend (m).
drift_before_bend = 0.25;
REAL drift_before_bend = 0.25;
// Drift after bend (m).
drift_after_bend = 0.5;
REAL drift_after_bend = 0.5;
// Bend angle (degrees).
bend_angle = 45.0;
REAL bend_angle = 45.0;
// Bend rotation about z axis (degrees).
bend_rotation = 0.0;
REAL bend_rotation = 0.0;
// Bend entrance angle (degrees).
bend_e1 = -10.0;
REAL bend_e1 = -10.0;
// Bend exit angle (degrees).
bend_e2 = 15.0;
REAL bend_e2 = 15.0;
// Bend gradient index (m^-1).
bend_gradient = 0.0;
REAL bend_gradient = 0.0;
// Bend design energy (MeV).
bend_energy = 7.0;
REAL bend_energy = 7.0;
// Bend length (m).
bend_chord_length = 0.76536686473;
REAL bend_chord_length = 0.76536686473;
// Bend gap (m).
bend_gap = 0.02;
REAL bend_gap = 0.02;
value, {drift_before_bend,
......@@ -195,7 +195,7 @@ Bend: SBend, ANGLE = bend_angle * Pi / 180.0,
// Calculate position of end of Bend.
bend_end = global_shift + drift_before_bend + bend_chord_length + drift_after_bend;
REAL bend_end = global_shift + drift_before_bend + bend_chord_length + drift_after_bend;
value, {bend_end};
......@@ -254,7 +254,7 @@ if (NUMBER_OF_PARTICLES == 10000) {
//
// Here we start simulation.
MINSTEPFORREBIN = 750;
REAL MINSTEPFORREBIN = 750;
Option, PSDUMPFREQ = PS_DUMP_FREQUENCY;
Option, STATDUMPFREQ = STAT_DUMP_FREQUENCY;
......
#!/bin/bash
cd $REG_TEST_DIR
mpirun -np 1 $OPAL_EXE_PATH/opal SBend-Simple-Test-2.in --commlib mpi --info 3 --warn 0 2>&1
......@@ -13,18 +13,18 @@ Title, string="SBend Test";
//
// Here we define some global simulation parameters.
RF_FREQUENCY = 700.0e6; // Reference frequency of problem (Hz).
RF_WAVELENGTH = CLIGHT / RF_FREQUENCY; // Reference wavelength (m).
REAL RF_FREQUENCY = 700.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 = 0.0e-15; // Beam bunch charge (C).
NUMBER_OF_PARTICLES = 10000; // Number of particles in simulation
REAL BEAM_BUNCH_CHARGE = 0.0e-15; // Beam bunch charge (C).
REAL NUMBER_OF_PARTICLES = 10000; // Number of particles in simulation
PS_DUMP_FREQUENCY = 1000; // How often (time steps) that the phase space of the beam is output.
STAT_DUMP_FREQUENCY = 10; // How often (time steps) beam statistical properties are output.
REAL PS_DUMP_FREQUENCY = 1000; // How often (time steps) that the phase space of the beam is output.
REAL STAT_DUMP_FREQUENCY = 10; // How often (time steps) beam statistical properties are output.
value, {RF_FREQUENCY,
RF_WAVELENGTH,
......@@ -40,7 +40,7 @@ value, {RF_FREQUENCY,
// Time steps defined.
//\\\\\\\\\\\\\\\\\\\\
TIME_STEP_1 = 2.0 * 1.0e-12; // Time step (s). We only need one for this simulation.
REAL TIME_STEP_1 = 2.0 * 1.0e-12; // Time step (s). We only need one for this simulation.
value, {TIME_STEP_1};
......@@ -59,9 +59,9 @@ value, {TIME_STEP_1};
// First define the space charge (SC) mesh.
// Space charge mesh.
FS_SC1_X_BINS = 8; // Number of mesh bins in x direction for space charge field solver.
FS_SC1_Y_BINS = 8; // Number of mesh bins in y direction for space charge field solver.
FS_SC1_Z_BINS = 8; // Number of mesh bins in z direction for space charge field solver.
REAL FS_SC1_X_BINS = 8; // Number of mesh bins in x direction for space charge field solver.
REAL FS_SC1_Y_BINS = 8; // Number of mesh bins in y direction for space charge field solver.
REAL FS_SC1_Z_BINS = 8; // Number of mesh bins in z direction for space charge field solver.
value, {FS_SC1_X_BINS,
FS_SC1_Y_BINS,
......@@ -83,7 +83,7 @@ value, {FS_SC1_X_BINS,
// Beam line offset. This is global shift of the entire line (m).
//===============================================================
global_shift = 1.0;
REAL global_shift = 1.0;
// Bend.
......@@ -93,36 +93,36 @@ global_shift = 1.0;
//================================================
// Drift before bend (m).
drift_before_bend = 0.25;
REAL drift_before_bend = 0.25;
// Drift after bend (m).
drift_after_bend = 0.5;
REAL drift_after_bend = 0.5;
// Bend angle (degrees).
bend_angle = 45.0;
REAL bend_angle = 45.0;
// Bend rotation about z axis (degrees).
bend_rotation = 90.0;
REAL bend_rotation = 90.0;
// Bend entrance angle (degrees).
bend_e1 = 22.5;
//bend_e1 = 0.0;
REAL bend_e1 = 22.5;
//REAL bend_e1 = 0.0;
// Bend exit angle (degrees).
bend_e2 = 22.5;
//bend_e2 = 0.0;
REAL bend_e2 = 22.5;