Commit 17213688 authored by Thomas Planche's avatar Thomas Planche

added layout plot made with zgoubi

parent 54e464ce
......@@ -26,11 +26,11 @@ RE=180.13967/100 #fitted RE (=RS) value in 'TOSCA'
#plot "mag1_center.plt" using ($10/100.*sin($22-pi/4.)+RE):($10/100.*cos($22-pi/4.)+dl) with p pt 1 lc 0 ps 1 title "magnet center",\
plot "ref_entrance.fai" u (-$10/100.):($14/100.) w l lt 2 lc 1 title "reference trajectory",\
"ref_mag1.plt" using ($10/100.*sin($22-pi/4.)+RE):($10/100.*cos($22-pi/4.)+dl) with l lt 2 lc 1 notitle,\
"ref_mid.fai" u (findFirst($14),($14-first)/100.+RE):($10/100.+RE+dl) w l lt 2 lc 1 notitle,\
"ref_mag2.plt" using ($10/100.*cos($22-pi/4.)+RE+mcl):(-$10/100.*sin($22-pi/4.)+dl) with l lt 2 lc 1 notitle,\
"ref_exit.fai" u ($10/100.+2*RE+mcl):(findFirst($14),-($14-first)/100.+dl) w l lt 2 lc 1 notitle,\
plot "ref_entrance.fai" u (-$10/100.):($14/100.) w l dt 2 lc 1 title "reference trajectory",\
"ref_mag1.plt" using ($10/100.*sin($22-pi/4.)+RE):($10/100.*cos($22-pi/4.)+dl) with l dt 2 lc 1 notitle,\
"ref_mid.fai" u (findFirst($14),($14-first)/100.+RE):($10/100.+RE+dl) w l dt 2 lc 1 notitle,\
"ref_mag2.plt" using ($10/100.*cos($22-pi/4.)+RE+mcl):(-$10/100.*sin($22-pi/4.)+dl) with l dt 2 lc 1 notitle,\
"ref_exit.fai" u ($10/100.+2*RE+mcl):(findFirst($14),-($14-first)/100.+dl) w l dt 2 lc 1 notitle,\
"a+60mrad_entrance.fai" u (-$10/100.):($14/100.) w l lt 1 lc 1 title "+/- 60 mrad",\
"a+60mrad_mag1.plt" using ($10/100.*sin($22-pi/4.)+RE):($10/100.*cos($22-pi/4.)+dl) with l lt 1 lc 1 notitle,\
"a+60mrad_mid.fai" u (findFirst($14),($14-first)/100.+RE):($10/100.+RE+dl) w l lt 1 lc 1 notitle,\
......@@ -41,13 +41,13 @@ plot "ref_entrance.fai" u (-$10/100.):($14/100.) w l lt 2 lc 1 title "reference
"a-60mrad_mid.fai" u (findFirst($14),($14-first)/100.+RE):($10/100.+RE+dl) w l lt 1 lc 1 notitle,\
"a-60mrad_mag2.plt" using ($10/100.*cos($22-pi/4.)+RE+mcl):(-$10/100.*sin($22-pi/4.)+dl) with l lt 1 lc 1 notitle,\
"a-60mrad_exit.fai" u ($10/100.+2*RE+mcl):(findFirst($14),-($14-first)/100.+dl) w l lt 1 lc 1 notitle,\
# "mdm100+_entrance.fai" u (-$10/100.):($14/100.) w l lt 1 lc 3 title "particle mass +1%",\
# "mdm100+_mag1.plt" using ($10/100.*sin($22-pi/4.)+RE):($10/100.*cos($22-pi/4.)+dl) with l lt 1 lc 3 notitle,\
# "mdm100+_mid.fai" u (findFirst($14),($14-first)/100.+RE):($10/100.+RE+dl) w l lt 1 lc 3 notitle,\
# "mdm100+_mag2.plt" using ($10/100.*cos($22-pi/4.)+RE+mcl):(-$10/100.*sin($22-pi/4.)+dl) with l lt 1 lc 3 notitle,\
# "mdm100+_exit.fai" u ($10/100.+2*RE+mcl):(findFirst($14),-($14-first)/100.+dl) w l lt 1 lc 3 notitle,\
# "mdm100-_entrance.fai" u (-$10/100.):($14/100.) w l lt 1 lc 3 notitle,\
# "mdm100-_mag1.plt" using ($10/100.*sin($22-pi/4.)+RE):($10/100.*cos($22-pi/4.)+dl) with l lt 1 lc 3 notitle,\
# "mdm100-_mid.fai" u (findFirst($14),($14-first)/100.+RE):($10/100.+RE+dl) w l lt 1 lc 3 notitle,\
# "mdm100-_mag2.plt" using ($10/100.*cos($22-pi/4.)+RE+mcl):(-$10/100.*sin($22-pi/4.)+dl) with l lt 1 lc 3 notitle,\
# "mdm100-_exit.fai" u ($10/100.+2*RE+mcl):(findFirst($14),-($14-first)/100.+dl) w l lt 1 lc 3 notitle,\
"mdm100+_entrance.fai" u (-$10/100.):($14/100.) w l lt 1 lc 2 title "particle mass +3%",\
"mdm100+_mag1.plt" using ($10/100.*sin($22-pi/4.)+RE):($10/100.*cos($22-pi/4.)+dl) with l lt 1 lc 2 notitle,\
"mdm100+_mid.fai" u (findFirst($14),($14-first)/100.+RE):($10/100.+RE+dl) w l lt 1 lc 2 notitle,\
"mdm100+_mag2.plt" using ($10/100.*cos($22-pi/4.)+RE+mcl):(-$10/100.*sin($22-pi/4.)+dl) with l lt 1 lc 2 notitle,\
"mdm100+_exit.fai" u ($10/100.+2*RE+mcl):(findFirst($14),-($14-first)/100.+dl) w l lt 1 lc 2 notitle,\
"mdm100-_entrance.fai" u (-$10/100.):($14/100.) w l lt 1 lc 2 notitle,\
"mdm100-_mag1.plt" using ($10/100.*sin($22-pi/4.)+RE):($10/100.*cos($22-pi/4.)+dl) with l lt 1 lc 2 notitle,\
"mdm100-_mid.fai" u (findFirst($14),($14-first)/100.+RE):($10/100.+RE+dl) w l lt 1 lc 2 notitle,\
"mdm100-_mag2.plt" using ($10/100.*cos($22-pi/4.)+RE+mcl):(-$10/100.*sin($22-pi/4.)+dl) with l lt 1 lc 2 notitle,\
"mdm100-_exit.fai" u ($10/100.+2*RE+mcl):(findFirst($14),-($14-first)/100.+dl) w l lt 1 lc 2 notitle,\
** HSR using TOSCA, FIT drift length
'OBJET'
546.198 !60 keV U1+ = 546.198, 554.660 for a 1% mass difference (for plotting)
546.198 !546.198, 554.660 for a 3% mass difference (for plotting)
2 !2: All the initial coordinates must be entered explicitly
1 1 !total number of particles; number of distinct momenta
0. 0.1 0. 0. 0. 1. ’o’ !Y; T; Z; P; S; D; 'marker'
......
No preview for this file type
No preview for this file type
......@@ -48,8 +48,18 @@
\maketitle
\tableofcontents
\section{Basic Layout}\label{sec:layout}
The optical system we consider in this tutorial is designed to separate rare isotopes with relative mass/charge differences of one part in 20\,000 in beams with transverse emittances of 3\,$\mu$m\footnote{Un-normalized emittance. Note that to achieve such resolution an energy spread of the order of 1\,eV or less is required.}~\cite{MARCHETTO2019, TRI-DN-16-09}.
\section{Toolbox}
All files used to prepare this tutorial are accessible on:\\
\href{https://gitlab.triumf.ca/beamphys/hrs}{https://gitlab.triumf.ca/beamphys/hrs} .\\
You can download {\tt zgoubi} source code from:\\
\href{https://sourceforge.net/projects/zgoubi}{https://sourceforge.net/projects/zgoubi} .\\
To download the development version you can also use the linux command:\\
svn checkout https://svn.code.sf.net/p/zgoubi/code/trunk zgoubi-code\\
The plots shown in this tutorial were produced using {\tt gnuplot}:\\
\href{http://www.gnuplot.info}{http://www.gnuplot.info}
\section{Optics Layout}\label{sec:layout}
The optical system we consider in this tutorial is designed to separate rare isotopes with relative mass/charge differences of one part in 20\,000, in beams with transverse emittances of 3\,$\mu$m\footnote{Un-normalized emittance. Note that to achieve such resolution with our system, an energy spread of less than 1\,eV is required.}~\cite{MARCHETTO2019, TRI-DN-16-09}.
As shown in~\cref{fig:marco-layout}, it is composed of:
\begin{itemize}
\item a source slit;
......@@ -63,6 +73,13 @@
\centering
\includegraphics*[width=1.0 \linewidth]{figure/marco}
\caption{TRIUMF high resolution separator basic layout (from source slit to image slit).}\label{fig:marco-layout}
\end{figure}
To illustrate the principle of mass separation, I show in~\cref{fig:layout} a few particle trajectories calculated using {\tt zgoubi}.
\begin{figure}[htb]
\centering
\includegraphics*[width=1.0 \linewidth]{figure/layout}
\caption{Trajectories of a few particles, from the source slit (left) to the image slit (right). To illustrate the principle of mass separation we use here a relative mass difference of 3 parts in 100.}\label{fig:layout}
\end{figure}\FloatBarrier
To achieve the desired resolving power, it is essential to compensate non-linear aberration. For this purpose an electrostatic multipole corrector is added halfway between the two dipoles. The detailed design of the most critical components -- the dipoles and the multipole corrector -- was accomplished using a 3D finite element code ({\tt OPERA}) and non-linear optics codes such as {\tt COSY-INFINITY} and {\tt zgoubi}. In this note I go through the steps of the design work done using {\tt zgoubi}.
......@@ -87,7 +104,6 @@
\begin{lstlisting}[label=list:OBJET]
zgoubi HRS tuto: DIPOLE !zgoubi requires input files to be given a title on line 1
'OBJET'
?? !BORO[kg.cm]: Brho of 60 keV 238U+ in kG.cm
2 !KOBJ=2: initial coordinates must be entered explicitly
......@@ -159,8 +175,8 @@
2 5 0. 0.2 !element #2; vary parameter #5 (BO); coupling switch; relative range
2 64 0. 0.2 !element #2; vary parameter #64 (RE); coupling switch; relative range
2 1e-8 100 !Number of constraints; Convergence threshold; maximum number of iterations
3 1 2 2 120.0 1. 0 !IC; Particle #; coordinate#=2 for Y;element #; wanted value; weigth ; 0
3 1 3 2 0.0 1. 0 !IC; Particle #; coordinate#=3 for T;element #; wanted value; weigth ; 0
3 1 2 2 120.0 1. 0 !IC; particle #;coordinate #2 (Y);element #; wanted value; weigth ; 0
3 1 3 2 0.0 1. 0 !IC; particle #;coordinate #3 (T);element #; wanted value; weigth ; 0
\end{lstlisting}
{\it Assignment: Find values {\tt B0}, and {\tt RE} from fit. Run {\tt zgoubi} with those fitted values and plot the resulting particle trajectory (from zgoubi.plt). You should get plots like in~\cref{fig:DIPOLEtraj}. }
\begin{figure}[htb]
......@@ -189,9 +205,9 @@
Let's replace our previous {\tt 'OBJECT'} definition by.
\begin{lstlisting}[label=list:OBJECT4]
'OBJET'
543.687 !BRHO of 60 keV 238U1+ in kG.cm
5 !5: generate 11 particles used to calculate transfer matrix ('MATRIX')
0.1 0.1 0.1 0.1 .1 .001 !'smalish' step size in Y; T; Z; P; S; D
543.687 !BRHO of 60 keV 238U1+ in kG.cm (answer of the first assigment ;-)
5 !5: generate 11 particles used to calculate transfer matrix ('MATRIX')
0.001 0.01 0.001 0.01 .1 .001 !'smalish' step size in Y; T; Z; P; S; D
0.0 0. 0. 0. 0. 1. !reference particle's Y; T; Z; P; S; D; 'marker'. Note: Brho=BORO*D
\end{lstlisting}
and add the {\tt 'MATRIX'} keyword right before the {\tt 'END'} statement:
......@@ -203,8 +219,8 @@
\begin{lstlisting}[label=list:FITedge]
'FIT'
1 !Number of physical parameters to be varied
3 36 -3.020 0.1 !element#; parameter#; inverse (minus sign) correlation; relative range
2 1e-11 100 !Number of constraints; Convergence threshold; maximum number of iterations
3 36 -3.020 0.1 !elem#3 (DIPOLE); para#36 (exit edge angle); -correlation (entrance edge); relative range
2 1e-11 100 !number of constraints; convergence threshold; maximum number of iterations
1 1 1 5 0.0 1. 0 !1:matrix; matrix element 1 1; element#; wanted; weigth ; 0
1 2 2 5 0.0 1. 0 !1:matrix; matrix element 2 2; element#; wanted; weigth ; 0
\end{lstlisting}
......@@ -241,7 +257,6 @@
A reasonable solution is:
\begin{lstlisting}
zgoubi HRS tuto: DIPOLE
'OBJET' 1
543.701 !BRHO 60 keV 238U1+ in kG.cm
3.01 !read from particles from a file
......
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