ImpactX
Loading...
Searching...
No Matches
impactx::envelope::spacecharge Namespace Reference

Functions

amrex::ParticleReal Elliptic_RD (amrex::ParticleReal x, amrex::ParticleReal y, amrex::ParticleReal z, amrex::ParticleReal errtol)
 
void space_charge2D_push (RefPart const &AMREX_RESTRICT refpart, Map6x6 &AMREX_RESTRICT cm, amrex::ParticleReal current, amrex::ParticleReal ds)
 
void space_charge3D_push (RefPart const &AMREX_RESTRICT refpart, Map6x6 &AMREX_RESTRICT cm, amrex::ParticleReal bunch_charge, amrex::ParticleReal ds)
 

Function Documentation

◆ Elliptic_RD()

amrex::ParticleReal impactx::envelope::spacecharge::Elliptic_RD ( amrex::ParticleReal x,
amrex::ParticleReal y,
amrex::ParticleReal z,
amrex::ParticleReal errtol )

Function to return the Carlson elliptic integral denoted by RD(x,y,z). This is a reimplementation of the C++ function written by John Burkardt (GNU LGPL license):

https://people.math.sc.edu/Burkardt/cpp_src /elliptic_integral/elliptic_integral.html

which in turn is based on:

Bille Carlson, Computing Elliptic Integrals by Duplication, Numerische Mathematik, Volume 33, 1979, pages 1-16.

Bille Carlson, Elaine Notis, Algorithm 577, Algorithms for Incomplete Elliptic Integrals, ACM Transactions on Mathematical Software, Volume 7, Number 3, pages 398-403, September 1981.

Parameters
[in]xfirst argument
[in]ysecond argument
[in]zthird argument
[in]errtolerror tolerance
Returns
the elliptic integral RD(x,y,z)

◆ space_charge2D_push()

void impactx::envelope::spacecharge::space_charge2D_push ( RefPart const &AMREX_RESTRICT refpart,
Map6x6 &AMREX_RESTRICT cm,
amrex::ParticleReal current,
amrex::ParticleReal ds )

This function pushes the 6x6 beam covariance matrix for a slice of length ds, using the linear space charge fields in an rms equivalent 2D ellipse, as determined from the beam covariance matrix. Note: This is a reduced model of 2D space charge.

Parameters
[in]refpartreference particle
[in,out]cmcovariance matrix
[in]currentbeam current [A]
[in]dsstep size [m]

◆ space_charge3D_push()

void impactx::envelope::spacecharge::space_charge3D_push ( RefPart const &AMREX_RESTRICT refpart,
Map6x6 &AMREX_RESTRICT cm,
amrex::ParticleReal bunch_charge,
amrex::ParticleReal ds )

This function pushes the 6x6 beam covariance matrix for a slice of length ds, using the linear space charge fields in an rms equivalent 3D ellipsoid, as determined from the beam covariance matrix. Note: This is a reduced model of 3D space charge.

Parameters
[in]refpartreference particle
[in,out]cmcovariance matrix
[in]bunch_chargebunch charge [C]
[in]dsstep size [m]