replace diff(p)(erential)

parent 809b2b50
 ... @@ -12,9 +12,9 @@ In \textit{OPAL-t} the elements are implemented as external fields that are read ... @@ -12,9 +12,9 @@ In \textit{OPAL-t} the elements are implemented as external fields that are read \end{equation} \end{equation} To maximize the energy gain we have to take the derivative with respect to the lag, $\varphi$ and set the result to zero: To maximize the energy gain we have to take the derivative with respect to the lag, $\varphi$ and set the result to zero: \begin{multline} \begin{multline} \differential{\Delta E(\varphi,r)}{\varphi} = -\int_{z_\text{begin}}^{z_\text{end}} (1 + \omega \diffp{t(z,\varphi)}{\varphi}) \sin(\omega t(z,\varphi) + \varphi) E_z(z,r)\\ \mathrm{d}{\Delta E(\varphi,r)}{\varphi} = -\int_{z_\text{begin}}^{z_\text{end}} (1 + \omega \frac{\partial t(z,\varphi)}{\partial \varphi}) \sin(\omega t(z,\varphi) + \varphi) E_z(z,r)\\ = -\cos(\varphi) \int_{z_\text{begin}}^{z_\text{end}} (1 + \omega \diffp{t(z,\varphi)}{\varphi}) \sin(\omega t(z,\varphi)) E_z(z,r) dz \\ = -\cos(\varphi) \int_{z_\text{begin}}^{z_\text{end}} (1 + \omega \frac{\partial t(z,\varphi)}{\partial \varphi}) \sin(\omega t(z,\varphi)) E_z(z,r) dz \\ -\sin(\varphi) \int_{z_\text{begin}}^{z_\text{end}} (1 + \omega \diffp{t(z,\varphi)}{\varphi}) \cos(\omega t(z,\varphi)) E_z(z,r) dz \stackrel{!}{=} 0. -\sin(\varphi) \int_{z_\text{begin}}^{z_\text{end}} (1 + \omega \frac{\partial t(z,\varphi)}{\partial \varphi}) \cos(\omega t(z,\varphi)) E_z(z,r) dz \stackrel{!}{=} 0. \end{multline} \end{multline} Thus to get the maximum energy the lag has to fulfill Thus to get the maximum energy the lag has to fulfill \begin{equation} \label{eq:rulelag} \begin{equation} \label{eq:rulelag} ... @@ -23,20 +23,20 @@ Thus to get the maximum energy the lag has to fulfill ... @@ -23,20 +23,20 @@ Thus to get the maximum energy the lag has to fulfill where where \begin{equation} \begin{equation} \label{eq:Gamma1} \label{eq:Gamma1} \Gamma_1 = \sum_{i=1}^{N-1} (1 + \omega \diffp{t}{\varphi}) \int_{z_{i-1}}^{z_{i}} \sin\left(\omega (t_{i-1} + \Delta t_{i}\frac{z-z_{i-1}}{\Delta z_{i}})\right)\left(E_{z,i-1} + \Delta E_{z,i} \frac{z-z_{i-1}}{\Delta z_{i}}\right) dz \Gamma_1 = \sum_{i=1}^{N-1} (1 + \omega \frac{\partial t}{\partial \varphi}) \int_{z_{i-1}}^{z_{i}} \sin\left(\omega (t_{i-1} + \Delta t_{i}\frac{z-z_{i-1}}{\Delta z_{i}})\right)\left(E_{z,i-1} + \Delta E_{z,i} \frac{z-z_{i-1}}{\Delta z_{i}}\right) dz \end{equation} \end{equation} and and \begin{equation} \begin{equation} \label{eq:Gamma2} \label{eq:Gamma2} \Gamma_2 = \sum_{i=1}^{N-1} (1 + \omega \diffp{t}{\varphi}) \int_{z_{i-1}}^{z_{i}} \cos\left(\omega (t_{i-1} + \Delta t_{i}\frac{z-z_{i-1}}{\Delta z_{i}})\right)\left(E_{z,i-1} + \Delta E_{z,i} \frac{z-z_{i-1}}{\Delta z_{i}}\right) dz. \Gamma_2 = \sum_{i=1}^{N-1} (1 + \omega \frac{\partial t}{\partial \varphi}) \int_{z_{i-1}}^{z_{i}} \cos\left(\omega (t_{i-1} + \Delta t_{i}\frac{z-z_{i-1}}{\Delta z_{i}})\right)\left(E_{z,i-1} + \Delta E_{z,i} \frac{z-z_{i-1}}{\Delta z_{i}}\right) dz. \end{equation} \end{equation} Between two sampling points we assume a linear correlation between the electric field and position respectively between time and position. The products in the integrals between two sampling points can be expanded and solved analytically. We then find Between two sampling points we assume a linear correlation between the electric field and position respectively between time and position. The products in the integrals between two sampling points can be expanded and solved analytically. We then find \begin{equation*} \begin{equation*} \Gamma_1 = \sum_{i=1}^{N-1} (1 + \omega \diff{t}{\varphi}) \Delta z_{i}(E_{z,i-1} (\Gamma_{11,i} - \Gamma_{12,i}) + E_{z,i}\, \Gamma_{12,i}) \Gamma_1 = \sum_{i=1}^{N-1} (1 + \omega \frac{\partial t}{\partial \varphi}) \Delta z_{i}(E_{z,i-1} (\Gamma_{11,i} - \Gamma_{12,i}) + E_{z,i}\, \Gamma_{12,i}) \end{equation*} \end{equation*} and and \begin{equation*} \begin{equation*} \Gamma_1 = \sum_{i=1}^{N-1} (1 + \omega \diffp{t}{\varphi}) \Delta z_{i}(E_{z,i-1} (\Gamma_{21,i} - \Gamma_{22,i}) + E_{z,i}\, \Gamma_{22,i}) \Gamma_1 = \sum_{i=1}^{N-1} (1 + \omega \frac{\partial t}{\partial \varphi}) \Delta z_{i}(E_{z,i-1} (\Gamma_{21,i} - \Gamma_{22,i}) + E_{z,i}\, \Gamma_{22,i}) \end{equation*} \end{equation*} where where \begin{align*} \begin{align*} ... ...
 ... @@ -519,13 +519,13 @@ Even in this case, a good overall agreement has been found between the two codes ... @@ -519,13 +519,13 @@ Even in this case, a good overall agreement has been found between the two codes The field index parameter K1 is defined as: The field index parameter K1 is defined as: \begin{equation} \begin{equation} K1 = \frac{1}{B\rho}\diffp{B_y}{x}, K1 = \frac{1}{B\rho}\frac{\partial B_y}{\partial x}, \end{equation} \end{equation} Section~\ref{RBend}. Instead, in TRACE 3D the field index parameter n is: Section~\ref{RBend}. Instead, in TRACE 3D the field index parameter n is: \begin{equation} \begin{equation} n = -\frac{\rho}{B_y}\diffp{B_y}{x}. n = -\frac{\rho}{B_y}\frac{\partial B_y}{\partial x}. \end{equation} \end{equation} In order to have a significant focusing effect on both transverse planes, the transport line has been simulated in TRACE 3D using $n = 1.5$. Since, a different definition exists between \textit{OPAL} and TRACE 3D on the field index, the n-parameter translation in \textit{OPAL} language has been done with the following tests: In order to have a significant focusing effect on both transverse planes, the transport line has been simulated in TRACE 3D using $n = 1.5$. Since, a different definition exists between \textit{OPAL} and TRACE 3D on the field index, the n-parameter translation in \textit{OPAL} language has been done with the following tests: ... ...
 ... @@ -181,7 +181,7 @@ pole faces. Figure~\ref{rbend} shows an \texttt{RBEND} with a positive bend angl ... @@ -181,7 +181,7 @@ pole faces. Figure~\ref{rbend} shows an \texttt{RBEND} with a positive bend angl Field amplitude in x direction (Tesla). If the \texttt{ANGLE} attribute is set, \texttt{K0S} is ignored. Field amplitude in x direction (Tesla). If the \texttt{ANGLE} attribute is set, \texttt{K0S} is ignored. \item[K1] \item[K1] Field gradient index of the magnet, $K_1=-\frac{R}{B_{y}}\diffp{B_y}{x}$, where Field gradient index of the magnet, $K_1=-\frac{R}{B_{y}}\frac{\partial B_y}{\partial x}$, where $R$ is the bend radius as defined in Figure~\ref{rbend}. Not supported in \texttt{DOPAL-t} any more. Superimpose a \texttt{Quadrupole} instead. $R$ is the bend radius as defined in Figure~\ref{rbend}. Not supported in \texttt{DOPAL-t} any more. Superimpose a \texttt{Quadrupole} instead. \item[E1] \item[E1] ... @@ -229,7 +229,7 @@ pole faces. Figure~\ref{rbend} shows an \texttt{RBEND3D} with a positive bend an ... @@ -229,7 +229,7 @@ pole faces. Figure~\ref{rbend} shows an \texttt{RBEND3D} with a positive bend an Field amplitude in x direction (Tesla). If the \texttt{ANGLE} attribute is set, \texttt{K0S} is ignored. Field amplitude in x direction (Tesla). If the \texttt{ANGLE} attribute is set, \texttt{K0S} is ignored. \item[K1] \item[K1] Field gradient index of the magnet, $K_1=-\frac{R}{B_{y}}\diffp{B_y}{x}$, where Field gradient index of the magnet, $K_1=-\frac{R}{B_{y}}\frac{\partial B_y}{\partial x}$, where $R$ is the bend radius as defined in Figure~\ref{rbend}. Not supported in \texttt{DOPAL-t} any more. Superimpose a \texttt{Quadrupole} instead. $R$ is the bend radius as defined in Figure~\ref{rbend}. Not supported in \texttt{DOPAL-t} any more. Superimpose a \texttt{Quadrupole} instead. \item[E1] \item[E1] ... @@ -285,7 +285,7 @@ edge angle, and a positive exit edge angle. ... @@ -285,7 +285,7 @@ edge angle, and a positive exit edge angle. Field amplitude in x direction (Tesla). If the \texttt{ANGLE} attribute is set, \texttt{K0S} is ignored. Field amplitude in x direction (Tesla). If the \texttt{ANGLE} attribute is set, \texttt{K0S} is ignored. \item[K1] \item[K1] Field gradient index of the magnet, $K_1=-\frac{R}{B_{y}}\diffp{B_y}{x}$, where Field gradient index of the magnet, $K_1=-\frac{R}{B_{y}}\frac{\partial B_y}{\partial x}$, where $R$ is the bend radius as defined in Figure~\ref{sbend}. Not supported in \texttt{DOPAL-t} any more. Superimpose a \texttt{Quadrupole} instead. $R$ is the bend radius as defined in Figure~\ref{sbend}. Not supported in \texttt{DOPAL-t} any more. Superimpose a \texttt{Quadrupole} instead. \item[E1] \item[E1] ... @@ -825,7 +825,7 @@ Let us assume we have a correctly defined positive \texttt{RBEND} or \texttt{SBE ... @@ -825,7 +825,7 @@ Let us assume we have a correctly defined positive \texttt{RBEND} or \texttt{SBE \begin{align*} \begin{align*} B_0 &= \text{Field amplitude (T)} \\ B_0 &= \text{Field amplitude (T)} \\ R &= \text{Bend radius (m)} \\ R &= \text{Bend radius (m)} \\ n &= -\frac{R}{B_{y}}\diffp{B_y}{x} \text{ (Field index, set using the parameter \texttt{K1})} \\ n &= -\frac{R}{B_{y}}\frac{\partial B_y}{\partial x} \text{ (Field index, set using the parameter \texttt{K1})} \\ F(z) &= \left\{ F(z) &= \left\{ \begin{array}{lll} \begin{array}{lll} & F_{entrance}(z_{entrance}) \\ & F_{entrance}(z_{entrance}) \\ ... @@ -856,9 +856,9 @@ using the conditions ... @@ -856,9 +856,9 @@ using the conditions and making the definitions: and making the definitions: \begin{align*} \begin{align*} F'(z) &\equiv \diff{F(z)}{z} \\ F'(z) &\equiv \frac{\mathrm{d} F(z)}{\mathrm{d} z} \\ F''(z) &\equiv \diff{F(z)}{z} \\ F''(z) &\equiv \frac{\mathrm{d^{2}} F(z)}{\mathrm{d} z^{2}} \\ F'''(z) &\equiv \diff{F(z)}{z} F'''(z) &\equiv \frac{\mathrm{d^{3}} F(z)}{\mathrm{d} z^{3}} \end{align*} \end{align*} we can expand the field off axis, with the result: we can expand the field off axis, with the result: ... @@ -1036,14 +1036,14 @@ The reference system for a quadrupole is a Cartesian coordinate system ... @@ -1036,14 +1036,14 @@ The reference system for a quadrupole is a Cartesian coordinate system A \texttt{QUADRUPOLE} has three real attributes: A \texttt{QUADRUPOLE} has three real attributes: \begin{kdescription} \begin{kdescription} \item[K1] \item[K1] The normal quadrupole component $K_1=\diffp{B_y}{x}$. The normal quadrupole component $K_1=\frac{\partial B_y}{\partial x}$. The default is ${0}{Tm^{-1}}$. The default is ${0}{Tm^{-1}}$. The component is positive, if $B_y$ is positive on the positive $x$-axis. The component is positive, if $B_y$ is positive on the positive $x$-axis. This implies horizontal focusing of positively charged particles which This implies horizontal focusing of positively charged particles which travel in positive $s$-direction. travel in positive $s$-direction. \item[K1S] \item[K1S] The skew quadrupole component. $K_{1s}=-\diffp{B_x}{x}$. The skew quadrupole component. $K_{1s}=-\frac{\partial B_x}{\partial x}$. The default is ${0}{Tm^{-1}}$. The default is ${0}{Tm^{-1}}$. The component is negative, if $B_x$ is positive on the positive $x$-axis. The component is negative, if $B_x$ is positive on the positive $x$-axis. \end{kdescription} \end{kdescription} ... @@ -1069,13 +1069,13 @@ A \texttt{SEXTUPOLE} has three real attributes: ... @@ -1069,13 +1069,13 @@ A \texttt{SEXTUPOLE} has three real attributes: \begin{kdescription} \begin{kdescription} \item[K2] \item[K2] The normal sextupole component The normal sextupole component $K_2=\diffp{B_y}{x}$. $K_2=\frac{\partial^2} B_y}{\partial x^2}$. The default is ${0}{T\per\squarem}$. The default is ${0}{T m^{-2}}$. The component is positive, if $B_y$ is positive on the $x$-axis. The component is positive, if $B_y$ is positive on the $x$-axis. \item[K2S] \item[K2S] The skew sextupole component The skew sextupole component $K_{2s}=-\diffp{B_x}{x}$. $K_{2s}=-\frac{\partial{^2}B_x}{\partial x^{2}}$. The default is ${0}{T\per\squarem}$. The default is ${0}{T m^{-2}}$. The component is negative, if $B_x$ is positive on the $x$-axis. The component is negative, if $B_x$ is positive on the $x$-axis. \end{kdescription} \end{kdescription} \noindent Example: \noindent Example: ... @@ -1097,14 +1097,13 @@ label:OCTUPOLE, TYPE=string, APERTURE=real-vector, ... @@ -1097,14 +1097,13 @@ label:OCTUPOLE, TYPE=string, APERTURE=real-vector, An \texttt{OCTUPOLE} has three real attributes: An \texttt{OCTUPOLE} has three real attributes: \begin{kdescription} \begin{kdescription} \item[K3] \item[K3] The normal sextupole component The normal octupole component $K_3=\diffp{B_y}{x}$. $K_3=\frac{\partial^3} B_y}{\partial x^3}$. The default is ${0}{Tm^{-3}}$. The default is ${0}{Tm^{-3}}$. The component is positive, if $B_y$ is positive on the positive $x$-axis. The component is positive, if $B_y$ is positive on the positive $x$-axis. \item[K3S] \item[K3S] The skew sextupole component The skew octupole component $K_{3s}=-\diffp{B_x}{x}$. $K_{3s}=-\frac{\partial{^3}B_x}{\partial x^{3}}$. % $K_{3s}=\frac{1}{B \rho}\diffp{B_x}{x}$. The default is ${0}{Tm^{-3}}$. The default is ${0}{Tm^{-3}}$. The component is negative, if $B_x$ is positive on the positive $x$-axis. The component is negative, if $B_x$ is positive on the positive $x$-axis. \end{kdescription} \end{kdescription} ... @@ -1128,13 +1127,13 @@ label:MULTIPOLE, TYPE=string, APERTURE=real-vector, ... @@ -1128,13 +1127,13 @@ label:MULTIPOLE, TYPE=string, APERTURE=real-vector, \item[KN] \item[KN] A real vector see~Section~\ref{anarray}, A real vector see~Section~\ref{anarray}, containing the normal multipole coefficients, containing the normal multipole coefficients, $K_n=\diffp[n]{B_y}{x}$ $K_n=\frac{\partial^n} B_y}{\partial x^n}$. (default is ${0}{Tm^{-n}}$). (default is ${0}{Tm^{-n}}$). A component is positive, if $B_y$ is positive on the positive $x$-axis. A component is positive, if $B_y$ is positive on the positive $x$-axis. \item[KS] \item[KS] A real vector see~Section~\ref{anarray}, A real vector see~Section~\ref{anarray}, containing the skew multipole coefficients, containing the skew multipole coefficients, $K_{n~s}=-\diffp[n]{B_x}{x}$ $K_{n~s}=-\frac{\partial{^n}B_x}{\partial x^{n}}$. (default is ${0}{Tm^{-n}}$). (default is ${0}{Tm^{-n}}$). A component is negative, if $B_x$ is positive on the positive $x$-axis. A component is negative, if $B_x$ is positive on the positive $x$-axis. \end{kdescription} \end{kdescription} ... @@ -1213,7 +1212,7 @@ label:SOLENOID, TYPE=string, APERTURE=real-vector, ... @@ -1213,7 +1212,7 @@ label:SOLENOID, TYPE=string, APERTURE=real-vector, A \texttt{SOLENOID} has two real attributes: A \texttt{SOLENOID} has two real attributes: \begin{kdescription} \begin{kdescription} \item[KS] \item[KS] The solenoid strength $K_s=\diffp{B_s}{s}$, default is ${0}{Tm^{-1}}$. The solenoid strength $K_s=\frac{\partial B_s}{\partial s}$, default is ${0}{Tm^{-1}}$. For positive \texttt{KS} and positive particle charge, For positive \texttt{KS} and positive particle charge, the solenoid field points in the direction of increasing $s$. the solenoid field points in the direction of increasing $s$. \end{kdescription} \end{kdescription} ... ...
 ... @@ -440,9 +440,9 @@ The behavior of the preconditioner can be: \texttt{STD}\index{PRECMODE!STD}, \te ... @@ -440,9 +440,9 @@ The behavior of the preconditioner can be: \texttt{STD}\index{PRECMODE!STD}, \te \section{Define the number of Energy Bins to use} \section{Define the number of Energy Bins to use} \label{sec:FSENBINS} \label{sec:FSENBINS} \index{FSENBINS} \index{FSENBINS} Suppose $\differential E$ the energy spread in the particle bunch is to large, the electrostatic approximation is no longer valid. Suppose $\mathrm{d} E$ the energy spread in the particle bunch is to large, the electrostatic approximation is no longer valid. One solution to that problem is to introduce $k$ energy bins and perform $k$ separate field solves One solution to that problem is to introduce $k$ energy bins and perform $k$ separate field solves in which $\differential E$ is again small and hence the electrostatic approximation valid. In case of a cyclotron in which $\mathrm{d} E$ is again small and hence the electrostatic approximation valid. In case of a cyclotron see~Section~\ref{cyclotron} the number of energy bins must be at minimum the number of neighboring bunches (\texttt{NNEIGHBB}) i.e. $\text{\texttt{ENBINS}} \le \text{\texttt{NNEIGHBB}}$. see~Section~\ref{cyclotron} the number of energy bins must be at minimum the number of neighboring bunches (\texttt{NNEIGHBB}) i.e. $\text{\texttt{ENBINS}} \le \text{\texttt{NNEIGHBB}}$. The variable \texttt{MINSTEPFORREBIN} defines the number of integration step that have to pass until all energy bins are merged into one. The variable \texttt{MINSTEPFORREBIN} defines the number of integration step that have to pass until all energy bins are merged into one. ... ...
 \input{header} \chapter{\textit{OPAL-cycl}} \chapter{\textit{OPAL-cycl}} \label{chp:opalcycl} \label{chp:opalcycl} \index{OPAL-cycl} \index{OPAL-cycl} ... @@ -166,17 +164,17 @@ Since the magnetic field data off the median plane field components is necessary ... @@ -166,17 +164,17 @@ Since the magnetic field data off the median plane field components is necessary According to the approach given by Gordon and Taivassalo, by using a magnetic potential and measured $B_z$ on the median plane, According to the approach given by Gordon and Taivassalo, by using a magnetic potential and measured $B_z$ on the median plane, at the point $(r,\theta, z)$ in cylindrical polar coordinates, the third order field can be written as at the point $(r,\theta, z)$ in cylindrical polar coordinates, the third order field can be written as \begin{eqnarray}\label{eq:Bfield} \begin{eqnarray}\label{eq:Bfield} B_r(r,\theta, z) & = & z\diffp{B_z}{ r}-\frac{1}{6}z^3 C_r, \\ B_r(r,\theta, z) & = & z\frac{\partial B_z}{\partial r}-\frac{1}{6}z^3 C_r, \\ B_\theta(r,\theta, z) & = & \frac{z}{r}\diffp{B_z}{\theta}-\frac{1}{6}\frac{z^3}{r} C_{\theta}, \\ B_\theta(r,\theta, z) & = & \frac{z}{r}\frac{\partial B_z}{\partial \theta}-\frac{1}{6}\frac{z^3}{r} C_{\theta}, \\ B_z(r,\theta, z) & = & B_z-\frac{1}{2}z^2 C_z, B_z(r,\theta, z) & = & B_z-\frac{1}{2}z^2 C_z, \end{eqnarray} \end{eqnarray} where $B_z\equiv B_z(r, \theta, 0)$ and where $B_z\equiv B_z(r, \theta, 0)$ and \begin{eqnarray}\label{eq:Bcoeff} \begin{eqnarray}\label{eq:Bcoeff} C_r & = & \diffp{B_z}{r} + \frac{1}{r}\diffp{B_z}{r} - \frac{1}{r^2}\diffp{B_z}{r} C_r & = & \frac{\partial^{3}{B_z}}{\partial r^{3}} + \frac{1}{r}\frac{\partial^{2}{B_z}}{\partial r^{2}} - \frac{1}{r^2}\frac{\partial{B_z}}{\partial r} + \frac{1}{r^2}\diffp{B_z}{{r}{\theta^2}} - 2\frac{1}{r^3}\diffp{B_z}{\theta}, \\ + \frac{1}{r^2}\frac{\partial^{3}{B_z}}{{\partial r}{\partial \theta^2}} - 2\frac{1}{r^3}\frac{\partial^{2}{B_z}}{\partial \theta^{2}}, \\ C_{\theta} & = & \frac{1}{r}\diffp{B_z}{{r}{\theta}} + \diffp{B_z}{{r^2}{\theta}} C_{\theta} & = & \frac{1}{r}\frac{\partial^{2}{B_z}}{{\partial r}{\partial \theta}} + \frac{\partial^{3}{B_z}}{{\partial r^2}{\partial \theta}} + \frac{1}{r^2}\diffp{B_z}{\theta}, \\ + \frac{1}{r^2}\frac{\partial^{3}{B_z}}{\partial \theta^{3}}, \\ C_z & = & \frac{1}{r}\diffp{B_z}{r} + \diffp{B_z}{r} + \frac{1}{r^2}\diffp{B_z}{\theta}. C_z & = & \frac{1}{r}\frac{\partial{B_z}}{\partial r} + \frac{\partial^{2}{B_z}}{\partial r^{2}} + \frac{1}{r^2}\frac{\partial^{2}{B_z}}{\partial \theta^{2}}. \end{eqnarray} \end{eqnarray} All the partial differential coefficients are on the median plane and can be calculated by interpolation. \textit{OPAL-cycl} uses Lagrange's 5-point formula. All the partial differential coefficients are on the median plane and can be calculated by interpolation. \textit{OPAL-cycl} uses Lagrange's 5-point formula. ... @@ -198,7 +196,7 @@ If \texttt{TYPE=CARBONCYCL}, the program requires the $B_z$ data which is store ... @@ -198,7 +196,7 @@ If \texttt{TYPE=CARBONCYCL}, the program requires the $B_z$ data which is store \label{fig:CYCLField} \label{fig:CYCLField} \end{center} \end{center} \end{figure} \end{figure} We need to add 6 parameters at the header of a plain $B_z$ [{k\gauss}] data file, namely, We need to add 6 parameters at the header of a plain $B_z$ [{kG}] data file, namely, $r_{min}$ [{mm}], $\Delta r$ [{mm}], $\theta_{min}$ [{^{\circ}}], $\Delta \theta$ [{^{\circ}}], $r_{min}$ [{mm}], $\Delta r$ [{mm}], $\theta_{min}$ [{^{\circ}}], $\Delta \theta$ [{^{\circ}}], $N_\theta$ (total data number in each arc path of azimuthal direction) and $N_r$ (total path number along radial direction). $N_\theta$ (total data number in each arc path of azimuthal direction) and $N_r$ (total path number along radial direction). If $\Delta r$ or $\Delta \theta$ is decimal, one can set its negative opposite number. For instance, if $\Delta \theta = \frac{1}{3}{^{\circ}}$, the fourth line of the header should be set to -3.0. If $\Delta r$ or $\Delta \theta$ is decimal, one can set its negative opposite number. For instance, if $\Delta \theta = \frac{1}{3}{^{\circ}}$, the fourth line of the header should be set to -3.0. ... @@ -542,4 +540,3 @@ obtain the rms emittances that are given in the output. ... @@ -542,4 +540,3 @@ obtain the rms emittances that are given in the output. \subsubsection{Output} \subsubsection{Output} \examplefromfile{examples/matchedDistribution.output} \examplefromfile{examples/matchedDistribution.output} \input{footer}
 ... @@ -21,7 +21,7 @@ The energy loss is simulated using the Bethe-Bloch equation. ... @@ -21,7 +21,7 @@ The energy loss is simulated using the Bethe-Bloch equation. \begin{equation} \begin{equation} \label{eq:dEdx} \label{eq:dEdx} -\diff{E}{x}=\frac{K z^2 Z}{A \beta^2}\left[\frac{1}{2} \ln{\frac{2 m_e c^2\beta^2 \gamma^2 Tmax}{I^2}}-\beta^2 \right], -\frac{\mathrm{d} E}{\mathrm{d} x}=\frac{K z^2 Z}{A \beta^2}\left[\frac{1}{2} \ln{\frac{2 m_e c^2\beta^2 \gamma^2 Tmax}{I^2}}-\beta^2 \right], \end{equation} \end{equation} where $Z$ is the atomic number of absorber, $A$ is the atomic mass of absorber, $m_e$ is the electron mass, $z$ is the charge number of the incident particle, $K=4\pi N_Ar_e^2m_ec^2$, $r_e$ is the classical electron radius, $N_A$ is the Avogadro's number, $I$ is the mean excitation energy. $\beta$ and $\gamma$ are kinematic variables. $T_{max}$ is the maximum kinetic energy which can be imparted to a free electron in a single collision. where $Z$ is the atomic number of absorber, $A$ is the atomic mass of absorber, $m_e$ is the electron mass, $z$ is the charge number of the incident particle, $K=4\pi N_Ar_e^2m_ec^2$, $r_e$ is the classical electron radius, $N_A$ is the Avogadro's number, $I$ is the mean excitation energy. $\beta$ and $\gamma$ are kinematic variables. $T_{max}$ is the maximum kinetic energy which can be imparted to a free electron in a single collision. \begin{equation} \begin{equation} ... @@ -50,7 +50,7 @@ The Coulomb scattering is treated as two independent events: the multiple Coulom ... @@ -50,7 +50,7 @@ The Coulomb scattering is treated as two independent events: the multiple Coulom Using the distribution given in Classical Electrodynamics, by J. D. Jackson, the multiple- and single-scattering distributions can be written: Using the distribution given in Classical Electrodynamics, by J. D. Jackson, the multiple- and single-scattering distributions can be written: \begin{equation} \begin{equation} \label{eq:PM} \label{eq:PM} P_M(\alpha) \;\differential \alpha=\frac{1}{\sqrt{\pi}}e^{-\alpha^2}\;\differential\alpha, P_M(\alpha) \;\mathrm{d} \alpha=\frac{1}{\sqrt{\pi}}e^{-\alpha^2}\;\mathrm{d}\alpha, \end{equation} \end{equation} \begin{equation} \begin{equation} \label{eq:Ps} \label{eq:Ps} ... @@ -89,13 +89,13 @@ p_y=p_y+z_4 \theta_0. ... @@ -89,13 +89,13 @@ p_y=p_y+z_4 \theta_0. \subsection{Large Angle Rutherford Scattering} \subsection{Large Angle Rutherford Scattering} Generate a random number $\xi_1$, \textit{if} $\xi_1<\frac{\int_{2.5}^\infty P_S(\alpha)d\alpha}{\int_0^{2.5} P_M(\alpha)\;\differential\alpha+\int_{2.5}^\infty P_S(\alpha)\;\differential\alpha}=0.0047$, sampling the large angle Generate a random number $\xi_1$, \textit{if} $\xi_1<\frac{\int_{2.5}^\infty P_S(\alpha)d\alpha}{\int_0^{2.5} P_M(\alpha)\;\mathrm{d}\alpha+\int_{2.5}^\infty P_S(\alpha)\;\mathrm{d}\alpha}=0.0047$, sampling the large angle Rutherford scattering.\\ Rutherford scattering.\\ The cumulative distribution function of the large angle The cumulative distribution function of the large angle Rutherford scattering is Rutherford scattering is \begin{equation} \begin{equation} \label{eq:Fa} \label{eq:Fa} F(\alpha)=\frac{\int_{2.5}^\alpha P_S(\alpha) \;\differential \alpha}{\int_{2.5}^\infty P_S(\alpha) \;\differential \alpha}=\xi, F(\alpha)=\frac{\int_{2.5}^\alpha P_S(\alpha) \;\mathrm{d} \alpha}{\int_{2.5}^\infty P_S(\alpha) \;\mathrm{d} \alpha}=\xi, \end{equation} \end{equation} where $\xi$ is a random variable. So where $\xi$ is a random variable. So \begin{equation} \begin{equation} ... ...
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!