|
ImpactX
|
#include <ChrUniformAcc.H>
Public Types | |
| using | PType = ImpactXParticleContainer::ParticleType |
Public Attributes | |
| amrex::ParticleReal | m_ez |
| amrex::ParticleReal | m_bz |
| electric field strength in 1/m | |
| Public Attributes inherited from impactx::elements::mixin::Thick | |
| amrex::ParticleReal | m_ds |
| int | m_nslice |
| segment length in m | |
| Public Attributes inherited from impactx::elements::mixin::Alignment | |
| amrex::ParticleReal | m_dx = 0 |
| amrex::ParticleReal | m_dy = 0 |
| horizontal translation error [m] | |
| amrex::ParticleReal | m_rotation = 0 |
| vertical translation error [m] | |
| Public Attributes inherited from impactx::elements::mixin::PipeAperture | |
| amrex::ParticleReal | m_inv_aperture_x = 0 |
| amrex::ParticleReal | m_inv_aperture_y = 0 |
| inverse of the horizontal aperture size [1/m] | |
Static Public Attributes | |
| static constexpr auto | type = "ChrAcc" |
| Static Public Attributes inherited from impactx::elements::mixin::Named | |
| static constexpr std::nullopt_t | DEFAULT_name = std::nullopt |
| Static Public Attributes inherited from impactx::elements::mixin::LinearTransport< ChrAcc > | |
| static constexpr bool | has_linear_transport |
| Static Public Attributes inherited from impactx::elements::mixin::Thick | |
| static constexpr int | DEFAULT_nslice = 1 |
| Static Public Attributes inherited from impactx::elements::mixin::Alignment | |
| static constexpr amrex::ParticleReal | degree2rad |
| static constexpr amrex::ParticleReal | DEFAULT_dx = 0 |
| static constexpr amrex::ParticleReal | DEFAULT_dy = 0 |
| static constexpr amrex::ParticleReal | DEFAULT_rotation_degree = 0 |
| Static Public Attributes inherited from impactx::elements::mixin::PipeAperture | |
| static constexpr amrex::ParticleReal | DEFAULT_aperture_x = 0 |
| static constexpr amrex::ParticleReal | DEFAULT_aperture_y = 0 |
| Static Public Attributes inherited from amrex::simd::Vectorized< amrex::simd::native_simd_size_particlereal > | |
| static constexpr int | simd_width |
Private Attributes | |
| amrex::ParticleReal | m_slice_ds |
| magnetic field strength in 1/m | |
| amrex::ParticleReal | m_ptf_ref |
| m_ds / nslice(); | |
| amrex::ParticleReal | m_pti_ref |
| amrex::ParticleReal | m_bgf |
| amrex::ParticleReal | m_bgi |
| amrex::ParticleReal | m_alpha |
| amrex::ParticleReal | m_alpha_iez |
|
inline |
Acceleration in a uniform field Ez, with a uniform solenoidal field Bz.
The Hamiltonian is expanded through second order in the transverse variables (x,px,y,py), with the exact pt dependence retained.
| ds | Segment length in m. |
| ez | electric field strength in m^(-1) = (charge * electric field Ez in V/m) / (m*c^2) |
| bz | magnetic field strength in m^(-1) = (charge * magnetic field Bz in T) / (m*c) |
| dx | horizontal translation error in m |
| dy | vertical translation error in m |
| rotation_degree | rotation error in the transverse plane [degrees] |
| aperture_x | horizontal half-aperture in m |
| aperture_y | vertical half-aperture in m |
| nslice | number of slices used for the application of space charge |
| name | a user defined and not necessarily unique name of the element |
|
inline |
Compute and cache the constants for the push.
In particular, used to pre-compute and cache variables that are independent of the individually tracked particle.
| refpart | reference particle |
|
inline |
This pushes the reference particle.
| [in,out] | refpart | reference particle |
|
inline |
This is a chracc functor, so that a variable of this type can be used like a chracc function.
The
| x | particle position in x |
| y | particle position in y |
| t | particle position in t |
| px | particle momentum in x |
| py | particle momentum in y |
| pt | particle momentum in t |
| idcpu | particle global index |
| refpart | reference particle (unused) |
|
inline |
Reverse the element (negate ds)
|
inline |
This function returns the linear transport map.
Jacobian at the reference trajectory of the ChrAcc push (see
This routine is called after the reference particle has been advanced by one slice (see diagnostics/LinearMap.cpp), so refpart.pt holds ptf_ref and pti_ref = ptf_ref + ez * slice_ds.
The closed-form linear map was derived with SymPy by Jacobian of the exact push at (x, px, y, py, t, pt) = 0. Writing c = cos(theta0), s = sin(theta0) with theta0 the reference phase advance above, the nonzero entries are R(1,1) = c^2, R(1,2) = bgi * c*s / alpha, R(1,3) = c*s, R(1,4) = bgi * s^2 / alpha, R(2,1) = -alpha * c*s / bgf, R(2,2) = (bgi/bgf) * c^2, R(2,3) = -alpha * s^2 / bgf, R(2,4) = (bgi/bgf) * c*s, R(3,1) = -c*s, R(3,2) = -bgi * s^2 / alpha, R(3,3) = c^2, R(3,4) = bgi * c*s / alpha, R(4,1) = alpha * s^2 / bgf, R(4,2) = -(bgi/bgf) * c*s, R(4,3) = -alpha * c*s / bgf, R(4,4) = (bgi/bgf) * c^2, R(5,5) = 1, R(5,6) = (bgi/ez) * (ptf_ref/pzf_ref - pti_ref/pzi_ref), R(6,6) = bgi/bgf. All other entries are zero. The quadratic-in-(px, py, x, y) part of the t correction vanishes at linear order.
References:
| [in] | refpart | reference particle after this slice's reference advance (pt = ptf_ref) |
|
private |
|
private |
|
private |
|
private |
| amrex::ParticleReal impactx::elements::ChrAcc::m_bz |
electric field strength in 1/m
| amrex::ParticleReal impactx::elements::ChrAcc::m_ez |
|
private |
m_ds / nslice();
|
private |
|
private |
magnetic field strength in 1/m
|
staticconstexpr |