IMPACT T
|
This class defines initial distributions for the charged particle beam bunch information in the accelerator. More...
Functions/Subroutines | |
subroutine | sample_dist (this, distparam, nparam, flagdist, geom, grid, |
sample the particles with intial distribution. More... | |
subroutine | uniform_dist (this, nparam, distparam, grid) |
6d uniform distribution More... | |
subroutine | gauss3_dist (this, nparam, distparam, grid, flagalloc) |
6d Gaussian distribution More... | |
subroutine | normdv (y) |
subroutine | normvec (y, num) |
subroutine | waterbag_dist (this, nparam, distparam, grid, flagalloc) |
6d Waterbag distribution. sample the particles with intial distribution using rejection method. More... | |
subroutine | kv3d_dist (this, nparam, distparam, grid) |
transverse KV distribution and longitudinal uniform distribution More... | |
subroutine | semigauss_dist (this, nparam, distparam, grid) |
3d Waterbag distribution in spatial and 3d Gaussian distribution in momentum space More... | |
subroutine | normdv2 (y) |
subroutine | read_dist (this, nparam, distparam, ib) |
read in an initial distribution with format (x(m), px/mc, y(m), py/mc,...) More... | |
subroutine | readparmela_dist (this, nparam, distparam, geom, grid, Flag |
subroutine | readelegant_dist (this, nparam, distparam, geom, grid, Flag |
subroutine | normdv1d (y) |
subroutine | cylcoldzsob_dist (this, nparam, distparam, grid) |
subroutine | psiroot (rk, xx, xmod, psi, eps, Nmax) |
subroutine | sobseq (n, x, iseed) |
subroutine | combine_dist (this, nparam, distparam, grid, ib, Nb, flagdis |
generating initial particle distribution based on the combination of transverse spatial distribution (2 types), longitudinal spatial distribution (3 types) and 3D momentum distribution (4 types). For example, flagdist = 111 denotes type 1 from transverse spatial distribution, type 1 from longitudinal spatial distribution, and type 1 from 3D momentum distribution. In this case, it denotes a transverse uniform elliptical, longitudinal flat-top with linear ramping in spatial, and 3d full Gaussian distribution in momentum space. flagdist = ijk, where i = 1 (transverse uniform ellipse) and 2 (Gaussian with cut-off); j = 1 (flat-top with linear ramping), 2 (flat-top with 2sigma Gaussain ramping), and 3 (Gaussian with cut-off); k = 1, (3D Gaussian momentum), 2 (transverse Gaussian momentum, longitudinal semi-Gaussian), 3 (streak camera model), and 4 (3 step model). More... | |
subroutine | tranunifxy_dist (ptxy, avgpts, sigx, sigy, xmu1, xmu3) |
transverse spatial uniform elleptical distribution. (id=1) More... | |
subroutine | trangaussxy_dist (ptxy, avgpts, sigx, sigy, xmu1, xmu3, cutx |
transverse spatial Gaussian distribution with cut-off. (id=2) More... | |
subroutine | longflattoplinz_dist (ptz, avgpts, avgpts0, zscale, pzscal |
longitudinal spatial flat-top distribution with linear ramp (id=1). More... | |
subroutine | longflattopgasz_dist (ptz, avgpts, avgpts0, zscale, pzscal |
longitudinal spatial flat-top distribution with 2sigma Gaussian ramp. (id=2) More... | |
subroutine | longgaussz_dist (ptz, avgpts, sigz, xmu5, cutz) |
longitudinal spatial Gaussian distribution with cut-off. (id=3) More... | |
subroutine | waterxyz_dist (ptxyz, avgpts, sigx, sigy, sigz, xmu1, xmu3, x |
3D spatial Waterbag distribution. (id=34) More... | |
subroutine | pxpypzgauss3d_dist (pmxyz, avgpts, sigpx, sigpy, sigpz, xmu |
3D Momentum Gaussian distribution. (id=1) More... | |
subroutine | pxpygausspzsg_dist (pmxyz, avgpts, sigpx, sigpy, sigpz, xmu |
Momentum Gaussian distribution in transverse while longitudinal xexp(-x^2/sigz^2). (id=2) The longitudinal distribution follows Bird's book, p.129. More... | |
subroutine | pxpypzstreakcam_dist (pmxyz, avgpts, emax, wkf, emass, xmu2 |
Momentum distribution following the streak camera model. (id=3) both emax and wkf are in the units of eV. emass is also in eV. More... | |
subroutine | pxpypz3step_dist (pmxyz, avgpts, Ef, Eph, Tem, Ewk, emass, xm |
Momentum distribution following the streak camera model. (id=4) momentum: following the 3 step model in David Dowell's PRSTAB paper v.12, 074201, 2009. momentum input parameters are: laser photon energy (eV), cathode temperature (eV), cathode effective work function (eV) (work function - surface field), Fermi energy of cathode material, emass (eV). More... | |
subroutine | normveccut (y, num, cutx, cuty) |
This class defines initial distributions for the charged particle beam bunch information in the accelerator.
subroutine distributionclass::combine_dist | ( | type (beambunch), intent(inout) | this, |
integer, intent(in) | nparam, | ||
double precision, dimension(nparam) | distparam, | ||
type (pgrid2d), intent(in) | grid, | ||
integer, intent(in) | ib, | ||
integer, intent(in) | Nb, | ||
flagdis | |||
) |
generating initial particle distribution based on the combination of transverse spatial distribution (2 types), longitudinal spatial distribution (3 types) and 3D momentum distribution (4 types). For example, flagdist = 111 denotes type 1 from transverse spatial distribution, type 1 from longitudinal spatial distribution, and type 1 from 3D momentum distribution. In this case, it denotes a transverse uniform elliptical, longitudinal flat-top with linear ramping in spatial, and 3d full Gaussian distribution in momentum space. flagdist = ijk, where i = 1 (transverse uniform ellipse) and 2 (Gaussian with cut-off); j = 1 (flat-top with linear ramping), 2 (flat-top with 2sigma Gaussain ramping), and 3 (Gaussian with cut-off); k = 1, (3D Gaussian momentum), 2 (transverse Gaussian momentum, longitudinal semi-Gaussian), 3 (streak camera model), and 4 (3 step model).
subroutine distributionclass::cylcoldzsob_dist | ( | type (beambunch), intent(inout) | this, |
integer, intent(in) | nparam, | ||
double precision, dimension(nparam) | distparam, | ||
type (pgrid2d), intent(in) | grid | ||
) |
subroutine distributionclass::gauss3_dist | ( | type (beambunch), intent(inout) | this, |
integer, intent(in) | nparam, | ||
double precision, dimension(nparam) | distparam, | ||
type (pgrid2d), intent(in) | grid, | ||
integer, intent(in) | flagalloc | ||
) |
6d Gaussian distribution
subroutine distributionclass::kv3d_dist | ( | type (beambunch), intent(inout) | this, |
integer, intent(in) | nparam, | ||
double precision, dimension(nparam) | distparam, | ||
type (pgrid2d), intent(in) | grid | ||
) |
transverse KV distribution and longitudinal uniform distribution
subroutine distributionclass::longflattopgasz_dist | ( | real*8, dimension(avgpts0), intent(out) | ptz, |
integer, intent(inout) | avgpts, | ||
integer, intent(in) | avgpts0, | ||
real*8, intent(in) | zscale, | ||
pzscal | |||
) |
longitudinal spatial flat-top distribution with 2sigma Gaussian ramp. (id=2)
subroutine distributionclass::longflattoplinz_dist | ( | real*8, dimension(avgpts0), intent(out) | ptz, |
integer, intent(inout) | avgpts, | ||
integer, intent(in) | avgpts0, | ||
real*8, intent(in) | zscale, | ||
pzscal | |||
) |
longitudinal spatial flat-top distribution with linear ramp (id=1).
subroutine distributionclass::longgaussz_dist | ( | real*8, dimension(avgpts), intent(out) | ptz, |
integer, intent(in) | avgpts, | ||
real*8, intent(in) | sigz, | ||
real*8, intent(in) | xmu5, | ||
real*8, intent(in) | cutz | ||
) |
longitudinal spatial Gaussian distribution with cut-off. (id=3)
subroutine distributionclass::normdv | ( | double precision, dimension(2), intent(out) | y | ) |
subroutine distributionclass::normdv1d | ( | double precision, intent(out) | y | ) |
subroutine distributionclass::normdv2 | ( | double precision, dimension(3), intent(out) | y | ) |
subroutine distributionclass::normvec | ( | double precision, dimension(2,num), intent(out) | y, |
integer, intent(in) | num | ||
) |
subroutine distributionclass::normveccut | ( | double precision, dimension(2,num), intent(out) | y, |
integer, intent(in) | num, | ||
real*8, intent(in) | cutx, | ||
real*8, intent(in) | cuty | ||
) |
subroutine distributionclass::psiroot | ( | real*8 | rk, |
real*8 | xx, | ||
real*8 | xmod, | ||
real*8 | psi, | ||
real*8 | eps, | ||
integer | Nmax | ||
) |
subroutine distributionclass::pxpygausspzsg_dist | ( | real*8, dimension(3,avgpts), intent(out) | pmxyz, |
integer, intent(in) | avgpts, | ||
real*8, intent(in) | sigpx, | ||
real*8, intent(in) | sigpy, | ||
real*8, intent(in) | sigpz, | ||
xmu | |||
) |
Momentum Gaussian distribution in transverse while longitudinal xexp(-x^2/sigz^2). (id=2) The longitudinal distribution follows Bird's book, p.129.
subroutine distributionclass::pxpypz3step_dist | ( | real*8, dimension(3,avgpts), intent(out) | pmxyz, |
integer, intent(in) | avgpts, | ||
real*8, intent(in) | Ef, | ||
real*8, intent(in) | Eph, | ||
real*8, intent(in) | Tem, | ||
real*8, intent(in) | Ewk, | ||
real*8, intent(in) | emass, | ||
xm | |||
) |
Momentum distribution following the streak camera model. (id=4) momentum: following the 3 step model in David Dowell's PRSTAB paper v.12, 074201, 2009. momentum input parameters are: laser photon energy (eV), cathode temperature (eV), cathode effective work function (eV) (work function - surface field), Fermi energy of cathode material, emass (eV).
subroutine distributionclass::pxpypzgauss3d_dist | ( | real*8, dimension(3,avgpts), intent(out) | pmxyz, |
integer, intent(in) | avgpts, | ||
real*8, intent(in) | sigpx, | ||
real*8, intent(in) | sigpy, | ||
real*8, intent(in) | sigpz, | ||
xmu | |||
) |
3D Momentum Gaussian distribution. (id=1)
subroutine distributionclass::pxpypzstreakcam_dist | ( | real*8, dimension(3,avgpts), intent(out) | pmxyz, |
integer, intent(in) | avgpts, | ||
real*8, intent(in) | emax, | ||
real*8, intent(in) | wkf, | ||
real*8, intent(in) | emass, | ||
real*8, intent(in) | xmu2 | ||
) |
Momentum distribution following the streak camera model. (id=3) both emax and wkf are in the units of eV. emass is also in eV.
subroutine distributionclass::read_dist | ( | type (beambunch), intent(inout) | this, |
integer, intent(in) | nparam, | ||
double precision, dimension(nparam) | distparam, | ||
integer, intent(in) | ib | ||
) |
read in an initial distribution with format (x(m), px/mc, y(m), py/mc,...)
subroutine distributionclass::readelegant_dist | ( | type (beambunch), intent(inout) | this, |
integer, intent(in) | nparam, | ||
double precision, dimension(nparam) | distparam, | ||
type (compdom), intent(in) | geom, | ||
type (pgrid2d), intent(in) | grid, | ||
Flag | |||
) |
subroutine distributionclass::readparmela_dist | ( | type (beambunch), intent(inout) | this, |
integer, intent(in) | nparam, | ||
double precision, dimension(nparam) | distparam, | ||
type (compdom), intent(in) | geom, | ||
type (pgrid2d), intent(in) | grid, | ||
Flag | |||
) |
subroutine distributionclass::sample_dist | ( | type (beambunch), intent(inout) | this, |
double precision, dimension(nparam) | distparam, | ||
integer, intent(in) | nparam, | ||
integer, intent(in) | flagdist, | ||
type (compdom), intent(in) | geom, | ||
type (pgrid2d), intent(in) | grid | ||
) |
sample the particles with intial distribution.
subroutine distributionclass::semigauss_dist | ( | type (beambunch), intent(inout) | this, |
integer, intent(in) | nparam, | ||
double precision, dimension(nparam) | distparam, | ||
type (pgrid2d), intent(in) | grid | ||
) |
3d Waterbag distribution in spatial and 3d Gaussian distribution in momentum space
subroutine distributionclass::sobseq | ( | integer | n, |
real*8, dimension(*) | x, | ||
integer | iseed | ||
) |
subroutine distributionclass::trangaussxy_dist | ( | real*8, dimension(2,avgpts), intent(out) | ptxy, |
integer, intent(in) | avgpts, | ||
real*8, intent(in) | sigx, | ||
real*8, intent(in) | sigy, | ||
real*8, intent(in) | xmu1, | ||
real*8, intent(in) | xmu3, | ||
real*8, intent(in) | cutx | ||
) |
transverse spatial Gaussian distribution with cut-off. (id=2)
subroutine distributionclass::tranunifxy_dist | ( | real*8, dimension(2,avgpts), intent(out) | ptxy, |
integer, intent(in) | avgpts, | ||
real*8, intent(in) | sigx, | ||
real*8, intent(in) | sigy, | ||
real*8, intent(in) | xmu1, | ||
real*8, intent(in) | xmu3 | ||
) |
transverse spatial uniform elleptical distribution. (id=1)
subroutine distributionclass::uniform_dist | ( | type (beambunch), intent(inout) | this, |
integer, intent(in) | nparam, | ||
double precision, dimension(nparam) | distparam, | ||
type (pgrid2d), intent(in) | grid | ||
) |
6d uniform distribution
subroutine distributionclass::waterbag_dist | ( | type (beambunch), intent(inout) | this, |
integer, intent(in) | nparam, | ||
double precision, dimension(nparam) | distparam, | ||
type (pgrid2d), intent(in) | grid, | ||
integer, intent(in) | flagalloc | ||
) |
6d Waterbag distribution. sample the particles with intial distribution using rejection method.
subroutine distributionclass::waterxyz_dist | ( | real*8, dimension(3,avgpts), intent(out) | ptxyz, |
integer, intent(in) | avgpts, | ||
real*8, intent(in) | sigx, | ||
real*8, intent(in) | sigy, | ||
real*8, intent(in) | sigz, | ||
real*8, intent(in) | xmu1, | ||
real*8, intent(in) | xmu3, | ||
x | |||
) |
3D spatial Waterbag distribution. (id=34)