OPAL (Object Oriented Parallel Accelerator Library)
2021.1.99
OPAL
|
#include <Hamiltonian.h>
Public Types | |
typedef FTps< double, 6 > | series_t |
Public Member Functions | |
Hamiltonian (int truncOrder) | |
Hamiltonian::series_t | drift (const double &gamma0) |
Hamiltonian::series_t | rbend (double &beta0, double &gamma0, double &q, double &h, double &K0) |
Hamiltonian::series_t | sbend (const double &gamma0, const double &h, const double &k0) |
Hamiltonian::series_t | bendFringe (double &beta0, double &gamma0, double &h, double &k0, series_t &ax, series_t &az) |
Hamiltonian::series_t | quadrupole (const double &gamma0, const double &q, const double &k1) |
Hamiltonian::series_t | fringeField (const double &phi, const double &k0) |
Public Attributes | |
series_t | x |
series_t | px |
series_t | y |
series_t | py |
series_t | z |
series_t | delta |
Definition at line 32 of file Hamiltonian.h.
typedef FTps<double, 6 > Hamiltonian::series_t |
Definition at line 36 of file Hamiltonian.h.
|
explicit |
Definition at line 24 of file Hamiltonian.cpp.
References delta, FTps< double, 6 >::makeVariable(), px, py, FTps< double, 6 >::setGlobalTruncOrder(), x, y, and z.
Hamiltonian::series_t Hamiltonian::bendFringe | ( | double & | beta0, |
double & | gamma0, | ||
double & | h, | ||
double & | k0, | ||
series_t & | ax, | ||
series_t & | az | ||
) |
:TODO: WIP: Fringe Field SBend
\[H_{Dipole}= \frac{\delta}{\beta_0} - \left( 1+ hx \right) \sqrt{\left(\frac{1}{\beta_0} + \delta \right)^2 -(p_x - a_x)^2 -p_y^2 - \frac{1}{\left(\beta_0 \gamma_0\right)^2 } } + \left( 1+ hx \right) k_0 \left(x - \frac{hx^2}{2 \left( 1+ hx \right)}\right) \]
beta0 | |
gamma0 | Lorenz factor |
k0 | normalized magnetic field ( \( k0 = \frac{B q}{P_0}\), where \(q\) is the particle charge and \(P_0\) the momentum of the reference particle) |
ax | Vector potential in x |
az | longitudinal vector potential (in z) |
Definition at line 98 of file Hamiltonian.cpp.
References delta, px, py, and sqrt().
Hamiltonian::series_t Hamiltonian::drift | ( | const double & | gamma0 | ) |
Drift Space Hamiltonian
\[ H_{Drift}= \frac{\delta}{\beta_0} - \sqrt{\left(\frac{1}{\beta_0} + \delta \right)^2 -p_x^2 -p_y^2 - \frac{1}{\left(\beta_0 \gamma_0\right)^2 } } \]
gamma0 | Lorenz factor |
Definition at line 37 of file Hamiltonian.cpp.
References delta, px, py, and sqrt().
Referenced by ThickTracker::fillGaps_m(), and ThickTracker::visitDrift().
Hamiltonian::series_t Hamiltonian::fringeField | ( | const double & | phi, |
const double & | k0 | ||
) |
Hamiltonian for a linear Thin Lens fringe field approximation
\[ H_{ThinLens} = \frac{1}{2} (x^2 - y^2) k_0 \tan \left( \Psi \right) \]
phi | pole face roation angle |
k0 | normalized magnetic field ( \( k0 = \frac{B q}{P_0}\), where \(q\) is the particle charge and \(P_0\) the momentum of the reference particle) |
Definition at line 153 of file Hamiltonian.cpp.
Referenced by ThickTracker::visitSBend().
Hamiltonian::series_t Hamiltonian::quadrupole | ( | const double & | gamma0, |
const double & | q, | ||
const double & | k1 | ||
) |
Quadrupole Hamiltonian
\[ H_{Quadrupole}= \frac{\delta}{\beta_0} - \sqrt{\left(\frac{1}{\beta_0} + \delta \right)^2 -p_x^2 -p_y^2 - \frac{1}{\left(\beta_0 \gamma_0\right)^2 } } + \frac{1}{2} k_1 \left( x^2 - y^2 \right) \]
gamma0 | Lorenz factor |
q | particle charge |
k1 | normalised field gradient ( \( k1 = \frac{B q}{P_0 r_0}\), where \(q\) is the particle charge, \(P_0\) the momentum of the reference particle and \(r_0\) the element aperture) |
Definition at line 137 of file Hamiltonian.cpp.
References delta, px, py, sqrt(), x, and y.
Referenced by ThickTracker::visitMultipole().
Hamiltonian::series_t Hamiltonian::rbend | ( | double & | beta0, |
double & | gamma0, | ||
double & | q, | ||
double & | h, | ||
double & | K0 | ||
) |
:TODO: WIP:Rectangular Bend Hamiltonian
\[ H_{Dipole}= \frac{\delta}{\beta_0} - \left( 1+ hx \right) \sqrt{\left(\frac{1}{\beta_0} + \delta \right)^2 -p_x^2 -p_y^2 - \frac{1}{\left(\beta_0 \gamma_0\right)^2 } } + \left( 1+ hx \right) k_0 \left(x - \frac{hx^2}{2 \left( 1+ hx \right)}\right) \]
Definition at line 49 of file Hamiltonian.cpp.
References delta, px, py, sqrt(), and x.
Hamiltonian::series_t Hamiltonian::sbend | ( | const double & | gamma0, |
const double & | h, | ||
const double & | k0 | ||
) |
Sector Bend Hamiltonian
\[ H_{DipoleFringeField}= \frac{\delta}{\beta_0} - \left( 1+ hx \right) \sqrt{\left(\frac{1}{\beta_0} + \delta \right)^2 -\left( p_x - \frac{1}{2} \frac{k_0}{l} \left( s^2 - y^2 \right) \right) ^2 -p_y^2 - \frac{1}{\left(\beta_0 \gamma_0\right)^2 } } + \left( 1+ hx \right) \frac{1}{2} \frac{k_0}{l} \left( y^2 - x^2 \right) \tan \left( \Psi \right) \]
gamma0 | Lorenz factor |
h | curvature ( \( \frac{1}{R} \) , where \( R \) is the bend radius) |
k0 | normalized magnetic field ( \( k0 = \frac{B q}{P_0}\), where \(q\) is the particle charge and \(P_0\) the momentum of the reference particle) |
Definition at line 76 of file Hamiltonian.cpp.
References delta, px, py, sqrt(), and x.
Referenced by ThickTracker::visitSBend().
series_t Hamiltonian::delta |
Phase space 6th dimension
Definition at line 45 of file Hamiltonian.h.
Referenced by bendFringe(), drift(), Hamiltonian(), quadrupole(), rbend(), and sbend().
series_t Hamiltonian::px |
Phase space 2nd dimension
Definition at line 41 of file Hamiltonian.h.
Referenced by bendFringe(), drift(), Hamiltonian(), quadrupole(), rbend(), and sbend().
series_t Hamiltonian::py |
Phase space 4th dimension
Definition at line 43 of file Hamiltonian.h.
Referenced by bendFringe(), drift(), Hamiltonian(), quadrupole(), rbend(), and sbend().
series_t Hamiltonian::x |
Phase space 1st dimension
Definition at line 40 of file Hamiltonian.h.
Referenced by fringeField(), Hamiltonian(), quadrupole(), rbend(), and sbend().
series_t Hamiltonian::y |
Phase space 3rd dimension
Definition at line 42 of file Hamiltonian.h.
Referenced by fringeField(), Hamiltonian(), and quadrupole().
series_t Hamiltonian::z |