Commit 66489077 authored by frey_m's avatar frey_m

Add PSI-Ring single particle tracking test

parent 4d50c7ca
......@@ -384,6 +384,18 @@ RegressionTests/results/
RingCyclotronMatched/RingCyclotronMatched.stat
RingCyclotronMatched/data/
RingCyclotronMatched/timing.dat
RingCyclotronSingleParticle/RingCyclotronSingleParticle-Angle0.dat
RingCyclotronSingleParticle/RingCyclotronSingleParticle-Angle1.dat
RingCyclotronSingleParticle/RingCyclotronSingleParticle-Angle2.dat
RingCyclotronSingleParticle/RingCyclotronSingleParticle-RT.o
RingCyclotronSingleParticle/RingCyclotronSingleParticle-afterEachTurn.dat
RingCyclotronSingleParticle/RingCyclotronSingleParticle-trackOrbit.dat
RingCyclotronSingleParticle/RingCyclotronSingleParticle.h5
RingCyclotronSingleParticle/RingCyclotronSingleParticle.lbal
RingCyclotronSingleParticle/RingCyclotronSingleParticle.out
RingCyclotronSingleParticle/RingCyclotronSingleParticle.stat
RingCyclotronSingleParticle/timing.dat
RingCyclotronSingleParticle/data/
SAAMG-Test-1/SAAMG-Test-1-RT.o
SAAMG-Test-1/SAAMG-Test-1.h5
SAAMG-Test-1/SAAMG-Test-1.lbal
......
21
0.0e+00 0.63013 1.08
5.0e-02 0.68626 1.08
1.0e-01 0.73857 1.00
1.5e-01 0.78677 9.20e-1
2.0e-01 0.83060 8.30e-1
2.5e-01 0.86979 7.35e-1
3.0e-01 0.90416 6.36e-1
3.5e-01 0.93349 5.34e-1
4.0e-01 0.95762 4.29e-1
4.5e-01 0.97643 3.21e-1
5.0e-01 0.98981 2.12e-1
5.5e-01 0.99766 1.01e-1
6.0e-01 0.99998 -9.31e-3
6.5e-01 0.99673 -1.20e-1
7.0e-01 0.98793 -2.30e-1
7.5e-01 0.97363 -3.40e-1
8.0e-01 0.95393 -4.47e-1
8.5e-01 0.92891 -5.52e-1
9.0e-01 0.89871 -6.53e-1
9.5e-01 0.86352 -7.51e-1
1.0e+00 0.82354 -7.51e-1
\ No newline at end of file
21
0.0e+00 0.109737 2.91
5.0e-02 0.258532 2.91
1.0e-01 0.401421 2.76
1.5e-01 0.535168 2.55
2.0e-01 0.656550 2.27
2.5e-01 0.762840 1.95
3.0e-01 0.851785 1.58
3.5e-01 0.921153 1.17
4.0e-01 0.969231 7.40e-1
4.5e-01 0.995244 2.92e-1
5.0e-01 0.998514 -1.65e-1
5.5e-01 0.978652 -6.20e-1
6.0e-01 0.936425 -1.05
6.5e-01 0.872880 -1.47
7.0e-01 0.789161 -1.85
7.5e-01 0.687305 -2.19
8.0e-01 0.569821 -2.48
8.5e-01 0.439238 -2.71
9.0e-01 0.298508 -2.88
9.5e-01 0.150978 -2.98
1.0e+00 0.222050 -2.98
\ No newline at end of file
Option, ECHO=FALSE;
Option, PSDUMPFREQ=100000;
Option, SPTDUMPFREQ = 10;
Option, PSDUMPEACHTURN=false;
Option, PSDUMPLOCALFRAME=FALSE;
Option, REPARTFREQ=20;
Option, ECHO=FALSE;
Option, STATDUMPFREQ=1;
Option, CZERO=FALSE;
Option, TELL=TRUE;
Option, VERSION=10900;
Title,string="OPAL-cycl: the first 10 turns acceleration in PSI 590MeV Ring using 1 particle";
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};
REAL phi01=139.4281;
REAL phi02=phi01+180.0;
REAL phi04=phi01;
REAL phi05=phi01+180.0;
REAL phi03=phi01+10.0;
REAL volt1st=0.9;
REAL volt3rd=0.9*4.0*0.112;
REAL turns = 10;
REAL nstep=250;
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,
FMAPFN="s03av.nar";
rf0: RFCavity, VOLT=volt1st, FMAPFN="Cav1.dat", TYPE="SINGLEGAP",
FREQ=frequency, RMIN = 1900.0, RMAX = 4500.0, ANGLE=35.0, PDIS = 416.0,
GAPWIDTH = 220.0, PHI0=phi01;
rf1: RFCavity, VOLT=volt1st, FMAPFN="Cav1.dat", TYPE="SINGLEGAP",
FREQ=frequency, RMIN = 1900.0, RMAX = 4500.0, ANGLE=125.0, PDIS = 416.0,
GAPWIDTH = 220.0, PHI0=phi02;
rf2: RFCavity, VOLT=volt3rd, FMAPFN="Cav3.dat", TYPE="SINGLEGAP",
FREQ=frequency3,RMIN = 1900.0, RMAX = 4500.0, ANGLE=170.0, PDIS = 452.0,
GAPWIDTH = 250.0, PHI0=phi03;
rf3: RFCavity, VOLT=volt1st, FMAPFN="Cav1.dat", TYPE="SINGLEGAP",
FREQ=frequency, RMIN = 1900.0, RMAX = 4500.0, ANGLE=215.0, PDIS = 416.0,
GAPWIDTH = 220.0, PHI0=phi04;
rf4: RFCavity, VOLT=volt1st, FMAPFN="Cav1.dat", TYPE="SINGLEGAP",
FREQ=frequency, RMIN = 1900.0, RMAX = 4500.0, ANGLE=305.0, PDIS = 416.0,
GAPWIDTH = 220.0, PHI0=phi05;
l1: Line = (ring,rf0,rf1,rf2,rf3,rf4);
Dist1:DISTRIBUTION, TYPE=FROMFILE, FNAME = "single-particle.dat";
Fs1:FIELDSOLVER, FSTYPE=NONE, MX=32, MY=32, MT=16,
PARFFTX=true, PARFFTY=true, PARFFTT=true,
BCFFTX=open, BCFFTY=open, BCFFTT=open, BBOXINCR=2;
beam1: BEAM, PARTICLE=PROTON, pc=P0, SPACECHARGE=false, NPART=1, BCURRENT=1.0E-3, CHARGE=1.0, BFREQ= frequency;
Select, Line=l1;
TRACK,LINE=l1, BEAM=beam1, MAXSTEPS=nstep*turns, STEPSPERTURN=nstep,TIMEINTEGRATOR="RK-4";
run, method = "CYCLOTRON-T", beam=beam1, fieldsolver=Fs1, distribution=Dist1;
endtrack;
Stop;
#!/bin/bash
mpirun -np 1 $OPAL_EXE_PATH/opal RingCyclotronSingleParticle.in --info 3 --warn 0 2>&1
"Ten turns RK-4 single particle tracking in PSI Ring"
stat "max_x" last 1E-12
stat "max_y" last 1E-12
stat "max_s" last 1E-12
stat "energy" last 1E-12
\ No newline at end of file
#!/bin/bash
#$ -cwd
#$ -j y
#$ -pe orte 1
#$ -N RingCyclotronSingleParticle-RT
#$ -v LD_LIBRARY_PATH,OPAL_EXE_PATH,OPENMPI,REG_TEST_DIR
MACHINE_FILE=$TMPDIR/machinefile
awk '/^merlin/ {print $1" slots="$2}' $PE_HOSTFILE > $MACHINE_FILE
cp $MACHINE_FILE machinefile.last
cd $REG_TEST_DIR
OPAL="$OPAL_EXE_PATH/opal RingCyclotronSingleParticle.in --commlib mpi --info 3 --warn 0 2>&1"
CMD="$OPENMPI/bin/mpirun -x LD_LIBRARY_PATH -machinefile $MACHINE_FILE -np $NSLOTS $OPAL "
$CMD
# r [mm] beta_r*gamma theta [mm] beta_theta*gamma z [mm] beta_z*gamma
#Turn number = 2, Time = 1.18460020e+02 [ns]
2.15797067e+00 1.94040583e-03 -1.08332208e-01 4.05842529e-01 8.15092686e-04 9.43936409e-05
#Turn number = 3, Time = 2.36920039e+02 [ns]
2.18770008e+00 9.72073128e-04 7.20735435e-03 4.12488884e-01 5.24988021e-04 1.43556440e-04
#Turn number = 4, Time = 3.55380059e+02 [ns]
2.21854701e+00 -8.74044916e-04 2.14692044e-01 4.19132975e-01 2.49014001e-04 1.66705352e-04
#Turn number = 5, Time = 4.73840079e+02 [ns]
2.24976188e+00 -2.00512020e-03 3.37133186e-01 4.25775275e-01 -4.95832540e-05 1.73394234e-04
#Turn number = 6, Time = 5.92300099e+02 [ns]
2.28003140e+00 -3.05359143e-03 4.25821215e-01 4.32416405e-01 -3.85081457e-04 1.63301885e-04
#Turn number = 7, Time = 7.10760118e+02 [ns]
2.31058156e+00 -4.06093915e-03 5.39019723e-01 4.39052419e-01 -6.84608385e-04 1.32518572e-04
#Turn number = 8, Time = 8.29220138e+02 [ns]
2.33928432e+00 -4.74393618e-03 6.10103109e-01 4.45686493e-01 -8.80260006e-04 8.46356076e-05
#Turn number = 9, Time = 9.47206318e+02 [ns]
2.36578202e+00 1.04206097e-02 -6.96289031e-01 4.52224522e-01 -9.58890268e-04 2.32448686e-05
#Turn number = 10, Time = 1.06566634e+03 [ns]
2.39342053e+00 9.75584026e-03 -5.60777292e-01 4.58863878e-01 -8.76795581e-04 -4.49898682e-05
#Turn number = 11, Time = 1.18412636e+03 [ns]
2.42137834e+00 9.55293284e-03 -4.47945783e-01 4.65482138e-01 -6.45406138e-04 -1.08748452e-04
# r [mm] beta_r*gamma theta [mm] beta_theta*gamma z [mm] beta_z*gamma
#Turn number = 1, Time = 7.58144126e+00 [ns]
2.04188089e+00 4.41981614e-03 2.30458834e+01 3.99179092e-01 9.10579264e-04 -5.95770977e-05
#Turn number = 2, Time = 1.26041461e+02 [ns]
2.06936240e+00 4.37824795e-03 2.29383909e+01 4.05823753e-01 9.35456125e-04 3.94472559e-05
#Turn number = 3, Time = 2.44501481e+02 [ns]
2.09865685e+00 5.46652925e-03 2.30616570e+01 4.12454031e-01 7.71831238e-04 1.04009171e-04
#Turn number = 4, Time = 3.62487660e+02 [ns]
2.12892485e+00 -3.19855983e-03 2.17882267e+01 4.19121930e-01 5.49186711e-04 1.44082501e-04
#Turn number = 5, Time = 4.80947680e+02 [ns]
2.15895601e+00 -2.62730990e-03 2.19005339e+01 4.25772154e-01 2.85337027e-04 1.68857632e-04
#Turn number = 6, Time = 5.99407700e+02 [ns]
2.18749453e+00 -2.53643331e-03 2.19863310e+01 4.32420007e-01 -5.18301571e-05 1.75016671e-04
#Turn number = 7, Time = 7.17867720e+02 [ns]
2.21650356e+00 -2.28397787e-03 2.20917276e+01 4.39065531e-01 -4.00500168e-04 1.55084928e-04
#Turn number = 8, Time = 8.36327739e+02 [ns]
2.24344628e+00 -2.39825154e-03 2.21693287e+01 4.45705570e-01 -6.84915382e-04 1.12653869e-04
#Turn number = 9, Time = 9.54787759e+02 [ns]
2.26926739e+00 -1.67867503e-03 2.23028062e+01 4.52341749e-01 -8.81996715e-04 5.09910541e-05
#Turn number = 10, Time = 1.07324778e+03 [ns]
2.29626329e+00 -6.43935750e-04 2.24512239e+01 4.58967439e-01 -9.46289917e-04 -2.13983275e-05
# r [mm] beta_r*gamma theta [mm] beta_theta*gamma z [mm] beta_z*gamma
# r [mm] beta_r*gamma theta [mm] beta_theta*gamma z [mm] beta_z*gamma
#Turn number = 1, Time = 1.46890424e+01 [ns]
2.13272526e+00 3.97275247e-03 4.46656524e+01 4.00893305e-01 7.63697946e-04 -1.05369780e-04
#Turn number = 2, Time = 1.33149062e+02 [ns]
2.16221999e+00 5.44263032e-03 4.45716205e+01 4.07527157e-01 9.70703100e-04 -2.17248216e-05
#Turn number = 3, Time = 2.51609082e+02 [ns]
2.19279761e+00 4.29497166e-03 4.46851188e+01 4.14191805e-01 9.30489680e-04 4.17722700e-05
#Turn number = 4, Time = 3.70069102e+02 [ns]
2.22495014e+00 2.67488943e-03 4.48604170e+01 4.20857905e-01 8.08389975e-04 8.99200693e-05
#Turn number = 5, Time = 4.88529121e+02 [ns]
2.25599693e+00 1.60362945e-03 4.49543808e+01 4.27516958e-01 6.06461094e-04 1.29576977e-04
#Turn number = 6, Time = 6.06989141e+02 [ns]
2.28504653e+00 6.10209974e-04 4.50406647e+01 4.34172018e-01 3.01793868e-04 1.60716639e-04
#Turn number = 7, Time = 7.25449161e+02 [ns]
2.31482647e+00 -2.66959232e-04 4.51373458e+01 4.40821550e-01 -6.07809517e-05 1.74500690e-04
#Turn number = 8, Time = 8.43909181e+02 [ns]
2.34228127e+00 -9.62793926e-04 4.52279980e+01 4.47464055e-01 -4.04848142e-04 1.65826394e-04
#Turn number = 9, Time = 9.62369200e+02 [ns]
2.36943619e+00 -1.92224287e-03 4.53740537e+01 4.54095639e-01 -7.03758813e-04 1.33546810e-04
#Turn number = 10, Time = 1.08082922e+03 [ns]
2.39832425e+00 -2.60228275e-03 4.55165504e+01 4.60717961e-01 -9.00092969e-04 8.00254819e-05
#Turn number = 2, Time = 1.17986180e+02 [ns]
2.15673054e+00 1.68951183e-02 -1.52651733e+00 4.05495349e-01 8.02526321e-04 9.65052498e-05
#Turn number = 3, Time = 2.36446199e+02 [ns]
2.18658238e+00 1.60445752e-02 -1.41133365e+00 4.12177869e-01 5.06067133e-04 1.44581287e-04
#Turn number = 4, Time = 3.54906219e+02 [ns]
2.21766467e+00 1.43398332e-02 -1.20335233e+00 4.18888510e-01 2.27155434e-04 1.66972197e-04
#Turn number = 5, Time = 4.73366239e+02 [ns]
2.24901893e+00 1.33716664e-02 -1.08003968e+00 4.25569976e-01 -7.22434463e-05 1.73357718e-04
#Turn number = 6, Time = 5.91826259e+02 [ns]
2.27941621e+00 1.24888620e-02 -9.90951865e-01 4.32246805e-01 -4.06365946e-04 1.63178596e-04
#Turn number = 7, Time = 7.10286278e+02 [ns]
2.31008731e+00 1.16591282e-02 -8.77044240e-01 4.38916374e-01 -7.01850107e-04 1.32584534e-04
#Turn number = 8, Time = 8.28746298e+02 [ns]
2.33886840e+00 1.11534001e-02 -8.06247483e-01 4.45572168e-01 -8.91268006e-04 8.50450101e-05
#Turn number = 9, Time = 9.47206318e+02 [ns]
2.36578202e+00 1.04206097e-02 -6.96289031e-01 4.52224522e-01 -9.58890268e-04 2.32448686e-05
#Turn number = 10, Time = 1.06566634e+03 [ns]
2.39342053e+00 9.75584026e-03 -5.60777292e-01 4.58863878e-01 -8.76795581e-04 -4.49898682e-05
#Turn number = 11, Time = 1.18412636e+03 [ns]
2.42137834e+00 9.55293284e-03 -4.47945783e-01 4.65482138e-01 -6.45406138e-04 -1.08748452e-04
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment