31
Space Charge Modelling in Path Manager Torsten utze 1 — AB/ABP/HSL August 24, 2006 1 [email protected]

Space Charge Modelling in Path Manager - lombarda.web.cern.ch · [email protected]. Abstract We present a detailed explanation of the space charge modelling used in Path Manager

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Space Charge Modelling in Path Manager - lombarda.web.cern.ch · 1torsten.muetze@cern.ch. Abstract We present a detailed explanation of the space charge modelling used in Path Manager

Space Charge Modelling in Path Manager

Torsten Mutze1 — AB/ABP/HSL

August 24, 2006

[email protected]

Page 2: Space Charge Modelling in Path Manager - lombarda.web.cern.ch · 1torsten.muetze@cern.ch. Abstract We present a detailed explanation of the space charge modelling used in Path Manager

Abstract

We present a detailed explanation of the space charge modelling used in PathManager and its application core Travel [1]. Two different calculation methodsare described, one based on the Coulomb interaction between every pair of par-ticles, the other one using a rings of charge approximation (SCHEFF routine).The Path Manager code has been validated with both methods to work properlyfor positively and negatively charged particles, and for different charge states(sign and/or charge multiplicity) in the same beam.

Page 3: Space Charge Modelling in Path Manager - lombarda.web.cern.ch · 1torsten.muetze@cern.ch. Abstract We present a detailed explanation of the space charge modelling used in Path Manager

Contents

1 Particle-Particle Interaction 2

1.1 Mathematical Modelling . . . . . . . . . . . . . . . . . . . . . . . 21.1.1 Electromagnetic Fields and Forces . . . . . . . . . . . . . 31.1.2 Space Charge Kicks . . . . . . . . . . . . . . . . . . . . . 5

1.2 Implementation Notes . . . . . . . . . . . . . . . . . . . . . . . . 6

2 Rings of Charge Approximation 9

2.1 Mathematical Modelling . . . . . . . . . . . . . . . . . . . . . . . 92.1.1 Ellipse Transformation and Mesh Generation . . . . . . . 102.1.2 Electromagnetic Fields and Forces . . . . . . . . . . . . . 132.1.3 Space Charge Kicks . . . . . . . . . . . . . . . . . . . . . 152.1.4 Rings and Toroids of Charge . . . . . . . . . . . . . . . . 16

2.2 Evaluating Elliptic Integrals . . . . . . . . . . . . . . . . . . . . . 212.3 Gaussian Quadrature Integration . . . . . . . . . . . . . . . . . . 232.4 Implementation Notes . . . . . . . . . . . . . . . . . . . . . . . . 26

1

Page 4: Space Charge Modelling in Path Manager - lombarda.web.cern.ch · 1torsten.muetze@cern.ch. Abstract We present a detailed explanation of the space charge modelling used in Path Manager

Chapter 1

Particle-Particle Interaction

In the following we want to describe how space charge effects can be modelledand calculated based on Coulomb’s law.

1.1 Mathematical Modelling

To determine the effect of the charged particle Pi on the charged particle Pjwe consider three frames: the laboratory frame O with origin at the referenceparticle, the shifted laboratory frame O with origin at the location of Pi andthe frame O′, moving with velocity ~v (the velocity of the reference particle,assuming that it differs only negligibly from the velocity of Pi) along the z-axisof O (see Fig. 1.1). We shall first calculate the electromagnetic field originatingfrom Pi in the frame O′, apply the relativistic transformations to obtain thefield in the frame O and the resulting force on Pj by Lorentz’ force law. Finally,

the effects of this force on Pj are calculated in the laboratory frame O.

x

y

z

x′

y′

z′

x

y

z

O O′

O ~ri

~rj

~rj

m, ~p,~v, γ, β

PiPi : qi,mi, ~pi, ~vi, γi, βi

Pj : qj ,mj , ~pj, ~vj , γi, βj

L ∼ ∆t

Figure 1.1: Frames and variables.

2

Page 5: Space Charge Modelling in Path Manager - lombarda.web.cern.ch · 1torsten.muetze@cern.ch. Abstract We present a detailed explanation of the space charge modelling used in Path Manager

1.1.1 Electromagnetic Fields and Forces

The electromagnetic fields in O and O′ are written as

~E = Ex~ex + Ey~ey + Ez~ez, (1.1)

~B = Bx~ex +By~ey +Bz~ez (1.2)

and

~E′ = E′x~ex + E′

y~ey + E′z~ez, (1.3)

~B′ = B′x~ex +B′

y~ey +B′z~ez (1.4)

respectively.In O′, the field of Pi carrying the charge qi is given by

~E′(~r ′, t′) =qi

4πε0

~r ′

|~r ′|3 , (1.5)

~B′(~r ′, t′) = 0 . (1.6)

Applying the Lorentz transformation

x′ = x , (1.7)

y′ = y , (1.8)

z′ = γ(z − vt) , (1.9)

t′ = γ(

t− vz

c2

)

(1.10)

and the resulting relativistic transformation for electromagnetic fields

Ex = γ(E′x + vB′

y) , (1.11)

Ey = γ(E′y − vB′

x) , (1.12)

Ez = E′z , (1.13)

Bx = γ(

B′x −

v

c2E′y

)

, (1.14)

By = γ(

B′y +

v

c2E′x

)

, (1.15)

Bz = B′z (1.16)

we obtain

Ex = γx · C(~r, t) , (1.17)

Ey = γy · C(~r, t) , (1.18)

Ez = γ(z − vt) · C(~r, t) , (1.19)

Bx = −γvc2y · C(~r, t) , (1.20)

By =γv

c2x · C(~r, t) , (1.21)

Bz = 0 (1.22)

3

Page 6: Space Charge Modelling in Path Manager - lombarda.web.cern.ch · 1torsten.muetze@cern.ch. Abstract We present a detailed explanation of the space charge modelling used in Path Manager

with

C(~r, t) :=qi

4πε0

1

(x2 + y2 + γ2(z − vt)2)3/2

. (1.23)

For the electric field we have

~E(~r, 0) =qi

4πε0

γ~r

(x2 + y2 + γ2z2)3/2

. (1.24)

Under the substitution x2 + y2 = r2 sin2(ψ), z = r cos(ψ) this reduces to

~E(~r, 0) =qi

4πε0

~r

γ2r3(1 − β2 sin2(ψ)

)3/2. (1.25)

The function

f(ψ, β) :=

∣∣∣~E(~r, 0)

∣∣∣|~r|=1

∣∣∣ ~E(~r, 0)

∣∣∣|~r|=1,ψ=π

2

=

(1 − β2

1 − β2 sin2(ψ)

)3/2

(1.26)

is depicted in Fig. 1.2 for ψ ∈ [−π, π] and β ∈ {0, 13 ,

12 ,

34 ,

95100 , 1}. Observe, that

f(ψ, 0) = 1 and f(ψ, 1) = 0 for ψ 6= ±π2 holds.

-3 -2 -1 1 2 3Ψ

0.2

0.4

0.6

0.8

1

fHΨ,ΒL

Figure 1.2: The electric field of a relativistic particle in the laboratory frame O.

For the magnetic field we have

~v × ~B(~r, 0) = v~ez × (Bx~ex +By~ey) (1.27)

= vBx~ey − vBy~ex (1.28)

= −v2

c2(γx~ex + γy~ey) · C(~r, 0) (1.29)

= −v2

c2qi

4πε0

x~ex + y~ey

γ2r3(1 − β2 sin2(ψ)

)3/2. (1.30)

4

Page 7: Space Charge Modelling in Path Manager - lombarda.web.cern.ch · 1torsten.muetze@cern.ch. Abstract We present a detailed explanation of the space charge modelling used in Path Manager

The force on Pj originating from Pi at t = 0 is

~Fi,j = qj

(

~E(~rj , 0) + ~vj × ~B(~rj , 0))

. (1.31)

Assuming that the velocity ~vj of the particle Pj does not differ too much fromthe velocity ~v of the reference particle, i.e.

~vj × ~B(~rj , 0) ≈ ~v × ~B(~rj , 0) , (1.32)

writing (1.31) componentwise yields with (1.25) and (1.30)

Fi,jx =qiqj4πε0

xj

γ2r3j(1 − β2 sin2(ψj)

)3/2

1

γ2, (1.33)

Fi,jy =qiqj4πε0

yj

γ2r3j(1 − β2 sin2(ψj)

)3/2

1

γ2, (1.34)

Fi,j z =qiqj4πε0

zj

γ2r3j(1 − β2 sin2(ψj)

)3/2. (1.35)

Eventually, from the transformation between the laboratory frames O andO, given by

~r = ~r − ~ri , (1.36)

we get

xj = xj − xi , (1.37)

yj = yj − yi , (1.38)

zj = zj − zi (1.39)

and

Fi,j x = Fi,jx , (1.40)

Fi,j y = Fi,jy , (1.41)

Fi,j z = Fi,j z . (1.42)

Summing up the forces originating from all other particles gives the resultingforce ~Fj on the particle Pj .

1.1.2 Space Charge Kicks

All the following calculations are carried out in the laboratory frame O. Thebunch of particles is tracked over the distance L. The reference particle travelsthis distance in the time

∆t =L

cβ(0). (1.43)

Assuming, that the force on Pj is constant over this time interval, from

d~pjdt

=d(γjmj~vj)

dt= ~Fj (1.44)

5

Page 8: Space Charge Modelling in Path Manager - lombarda.web.cern.ch · 1torsten.muetze@cern.ch. Abstract We present a detailed explanation of the space charge modelling used in Path Manager

we have~pj(∆t) = ~pj(0) + ∆t ~Fj . (1.45)

From the x- and y-component of (1.45) we get

mjγj(∆t)vj x(∆t) = mjγj(0)vj x(0) + ∆t Fj x , (1.46)

mjγj(∆t)vj y(∆t) = mjγj(0)vj y(0) + ∆t Fj y . (1.47)

Putting into these equations the relations

x′j =dxjdzj

=vj xvj z

, (1.48)

y′j =dyjdzj

=vj yvj z

(1.49)

gives

x′j(∆t) =γj(0)vj z(0)

γj(∆t)vj z(∆t)x′j(0) +

∆t

mjγj(∆t)vj z(∆t)Fj x , (1.50)

y′j(∆t) =γj(0)vj z(0)

γj(∆t)vj z(∆t)y′j(0) +

∆t

mjγj(∆t)vj z(∆t)Fj y . (1.51)

Under the approximations γj(∆t) ≈ γj(0) ≈ γ(0) and vj z(∆t) ≈ vj z(0) ≈ vz(0)this reduces to

x′j(∆t) = x′j(0) +m

mj

∆t

pz(0)Fj x , (1.52)

y′j(∆t) = y′j(0) +m

mj

∆t

pz(0)Fj y . (1.53)

From the z-component of (1.45), assuming that the momentum of the referenceparticle changes only negligibly during the time interval ∆t, i.e. pz(∆t) ≈ pz(0),we get

pj z(∆t) − pz(∆t)

pz(∆t)≈ pj z(∆t) − pz(0)

pz(0)=pj z(0) − pz(0)

pz(0)+

∆t

pz(0)Fj z . (1.54)

The equations (1.52), (1.53) and (1.54) describe in good approximation howthe divergence and the momentum of the particle Pj are affected by the forcesoriginating from the self-field of the beam.

1.2 Implementation Notes

Finally, some comments on the algorithmic implementation shall be given:

1. From

p = γmv = γmβc =mβc

1 − β2(1.55)

6

Page 9: Space Charge Modelling in Path Manager - lombarda.web.cern.ch · 1torsten.muetze@cern.ch. Abstract We present a detailed explanation of the space charge modelling used in Path Manager

it follows

β =p

p2 +m2c2=

(p

GeV/c

)

√(

pGeV/c

)2+(

mGeV/c2

)2. (1.56)

2. Observe, that

∆t

pz(0)=

(∆ts

)

( pz(0)GeV/c

)

10−9(

cm/s

)

(eC

)1

N(1.57)

holds, where we denote with e the electron charge magnitude.

3. If we denote with I the average beam current over the RF cycle and withf the reference radio-frequency, each bunch of particles carries a charge of

qb :=I

f. (1.58)

If for computing efficiency reasons the number of particles n is chosen,such that

n∑

i=1

qi < qb (1.59)

holds, in order for space charge effects to be modelled properly, the con-cept of macrocharges is applied. Therefore, in (1.33–1.35) the term qi isgenerally replaced by

qbn

=I

fn. (1.60)

4. For computing efficiency reasons, the symmetry relation

~Fj,i = −~Fi,j (1.61)

is applied.

5. Instead of integrating the equation of motion

d~pjdt

=d(γjmj~vj)

dt= ~Fj (1.62)

even for constant ~Fj over the time interval ∆t, the momentum of Pj isset instantly to the final value ~pj(∆t), without affecting the particle’shorizontal, vertical and longitudinal position. This compensates for thefact, that the effect of space charges on the beam is calculated in themiddle of each segment.

6. Observe, that the notion of simultaneity, that is used to apply space-charge kicks simultaneously to all beam particles in certain time intervals,is inherent to the laboratory frame. From this perspective, at a certain

7

Page 10: Space Charge Modelling in Path Manager - lombarda.web.cern.ch · 1torsten.muetze@cern.ch. Abstract We present a detailed explanation of the space charge modelling used in Path Manager

instant of time, the electromagnetic field is determined at all space coor-dinates, the resulting forces are calculated and the kicks are applied to thebeam particles. From the perspective of the inertial frame of the beamthe measurements of the electromagnetic field and the application of thespace-charge kicks occur at different instants of time. Therefore, a furtherapproximation error is introduced by our assumption of a constant electricfield in the inertial frame of the beam within this time difference.

A short summary of the necessary calculation steps shall be given:

• Calculate the electric field of each particle in the inertial frame of thebeam O′ and transform it to the laboratory frames O and O to obtain theforce on each particle according to (1.33)–(1.35) and (1.40)–(1.42), wheremacrocharges have to be taken into account (see item 3 in the precedingenumeration of implementation notes).

• Calculate the resulting effect on each particle’s divergence and momentumdeviation according to (1.52), (1.53) and (1.54).

8

Page 11: Space Charge Modelling in Path Manager - lombarda.web.cern.ch · 1torsten.muetze@cern.ch. Abstract We present a detailed explanation of the space charge modelling used in Path Manager

Chapter 2

Rings of Charge

Approximation

In the following we want to describe how space charge effects can be modelledand calculated based on an approximation of the beam ellipsoid through ringsof charge.

2.1 Mathematical Modelling

To determine the effect of the bunch of particles on a particle P we considerthree frames: the laboratory frame O with origin at the reference particle, thelaboratory frame O that is squeezed and shifted in the x-y-plane, such that themean value of all particles’ coordinates (¯x, ¯y, ¯z) lies on the z-axis, and the frameO′, moving with the velocity ~v of the reference particle along the z-axis of O(see Fig. 2.1). The velocity of P is assumed to be equal to the velocity of thereference particle.

x

y

z

x

y

z

x′

y′

z′

O

O O′

(¯x, ¯y, ¯z)

~v, γ, β P : q,m, ~p,~v, γ, β~r L ∼ ∆t

Figure 2.1: Frames and variables.

9

Page 12: Space Charge Modelling in Path Manager - lombarda.web.cern.ch · 1torsten.muetze@cern.ch. Abstract We present a detailed explanation of the space charge modelling used in Path Manager

We shall first describe the transition between the laboratory frames O and Odepending on the beam properties. Subsequently we deal only with the framesO and O′ and describe how the force on P in the laboratory frame O canbe calculated from the electromagnetic field in the inertial frame of the beamO′. Then we explain how the electromagnetic field in O′ can be calculatedapproximatively.

2.1.1 Ellipse Transformation and Mesh Generation

The number of radial mesh intervals nr and the number of longitudinal meshintervals nz supplied by the user determine the spatial resolution of the meshgeneration. A circular cylinder with height h and radius r, centered around thez-axis and the average longitudinal position of all beam particles is calculated,such that for 95.4% of particles their distance from the z-axis is less or equal tor and for 95.4% of particles their distance from the average longitudinal positionis less or equal to h/2 (see Fig. 2.2). The cylinder is then scaled by a factor of3/2, calculating the radial mesh interval size as

dr :=3

2

r

nr(2.1)

and the longitudinal mesh interval size as

dz :=3

2

h

nz. (2.2)

OO (¯x, ¯y) (¯y, ¯z)

r

h

x

yy

z

nrdr

nzdz

95.4%95.4%

·32·32

Figure 2.2: Calculation of the radial and longitudinal mesh interval size.

A beam ellipsoid with radially symmetric charge distribution in the x-y-plane causes a radially symmetric electromagnetic field. The forces on equallycharged particles that lie on a concentric circle in the x-y-plane can be calculatedfrom one another by rotation. Therefore, the computation costs are reduced

10

Page 13: Space Charge Modelling in Path Manager - lombarda.web.cern.ch · 1torsten.muetze@cern.ch. Abstract We present a detailed explanation of the space charge modelling used in Path Manager

considerably. This symmetry relation does not hold, if the bunch of particlesdoes not form a circle, but an ellipse in the x-y-plane. The forces on particleslying on a concentric ellipse in the x-y-plane (see Fig. 2.3) have to be calculatedindependently from one another by solving a number of integrals. To avoid thissignificant increase of computation costs we apply a heuristic approach, trying tocalculate the forces on a particle in O from the forces that are calculated in theshifted and squeezed laboratory frame O. The linear transformation between Oand O is constructed, such that the squeezed and shifted beam ellipse from thex-y-plane is mapped onto a centered circle in the x-y-plane (see Fig. 2.3).

O O

(¯x, ¯y)

x

y

x

ya

b√ab

√ab

PP~F

~F

Fx

Fy

Fx

Fy~F ∗

F ∗x

F ∗y

Figure 2.3: Transformation between laboratory frames O and O.

Before we discuss the mathematical details of the transformation betweenO and O, we show how the geometric properties of the beam ellipse in the x-y-plane can be determined by statistical means from the particles’ coordinates.

Consider any continuous probability distribution N : R → R≥0 with a meanvalue equal to zero. The two-dimensional probability distribution Q : R × R →R≥0, defined by

Q(x, y) :=1

aN( x− ¯x

a

)

︸ ︷︷ ︸

=:Qx(x)

1

bN( y − ¯y

b

)

︸ ︷︷ ︸

=:Qy(y)

(2.3)

with a, b ∈ R>0 has mean values ¯x and ¯y resp. and variances

σ2x =

R

Qx(x)(x− ¯x

)2dx = a2

R

N(α)α2dα , (2.4)

σ2y =

R

Qy(y)(y − ¯y

)2dy = b2

R

N(α)α2dα . (2.5)

Therefore,σxσy

=a

b(2.6)

gives a measure for the distortion of the distribution Q with respect to the x-and y-axis. By determining the variances σx and σy of the discrete distributionof particles in the x-y-plane we can easily calculate an approximation to the

11

Page 14: Space Charge Modelling in Path Manager - lombarda.web.cern.ch · 1torsten.muetze@cern.ch. Abstract We present a detailed explanation of the space charge modelling used in Path Manager

distortion of the beam ellipse. Recall also, that for the sample variance of avariate U the relation

σ2 = 〈u2〉 − 〈u〉2 (2.7)

holds, where 〈u2〉 denotes the square of the quadratic mean and 〈u〉2 denotesthe square of the mean value of the variate U .

Let us now examine the transformation between the laboratory frames Oand O in more detail. If we denote with a and b the semi-axes of the beamellipse in the x-y-plane and introduce the quotient

ε :=a

b, (2.8)

this area preserving transformation is given by

x =1√ε

(x− ¯x

), (2.9)

y =√ε(y − ¯y

). (2.10)

The unit vectors transform as

~ex =√ε~ex , (2.11)

~ey =1√ε~ey . (2.12)

Recall, that the unit vector in radial direction in O satisfies

~er =1

x2 + y2(x~ex + y~ey) . (2.13)

Therefore a force in radial direction in O,

~F = Fr~er , (2.14)

transforms to the laboratory frame O as

~F =Fr

x2 + y2(x~ex + y~ey) (2.15)

=Fr

(x− ¯x

)2+ ε(y − ¯y

)2

((x− ¯x

)~ex +

(y − ¯y

)~ey

)

. (2.16)

From this, introducing the abbreviation

r :=

1

ε

(x− ¯x

)2+ ε(y − ¯y

)2, (2.17)

the force components in O evaluate to

Fx =x− ¯x

rFr , (2.18)

Fy =y − ¯y

rFr . (2.19)

12

Page 15: Space Charge Modelling in Path Manager - lombarda.web.cern.ch · 1torsten.muetze@cern.ch. Abstract We present a detailed explanation of the space charge modelling used in Path Manager

A heuristically motivated ansatz for the force ~F ∗ = F ∗x~ex + F ∗

y~ey on a particleis to put

F ∗x :=

2

ε+ 1Fx =

2

ε+ 1

x− ¯x

rFr , (2.20)

F ∗y :=

ε+ 1Fy =

ε+ 1

y − ¯y

rFr . (2.21)

The functions

fx(ε) :=F ∗x

Fx=

2

ε+ 1and fy(ε) :=

F ∗y

Fy=

ε+ 1(2.22)

are depicted in Fig. 2.4 for 13 ≤ ε ≤ 3.

0.5 1.5 2 2.5 3Ε

0.6

0.8

1.2

1.4

fx`HΕL,fy`HΕL

Figure 2.4: Force tilting factors.

Note, that

|~F ∗| =√

F ∗x

2 + F ∗y

2 =2√ε

ε+ 1Fr (2.23)

holds. In order to have a radially symmetric field in O, of course now we haveto assume a radially symmetric charge distribution in O. Then Fr is constantfor all particles on a concentric circle in the x-y-plane and the absolute valueof the force for all particles lying on a concentric ellipse in the x-y-plane is thesame.

In the laboratory frame O, a circular cylinder with radius nrdr and heightnzdz is centered around the z-axis and the average z-position of all beam parti-cles and divided into a number of toroids, whose intersections with the x-z-planeand the y-z-plane give a rectangular grid (see Fig. 2.5).

2.1.2 Electromagnetic Fields and Forces

Like in Chap. 1 we follow the convention to equip all variables at the transitionfrom the laboratory frame O to the inertial frame of the beam O′ with a primemark.

13

Page 16: Space Charge Modelling in Path Manager - lombarda.web.cern.ch · 1torsten.muetze@cern.ch. Abstract We present a detailed explanation of the space charge modelling used in Path Manager

O

x

y

z

dr

dz

nrdr

nzdz

Figure 2.5: Mesh generation with nr = nz = 5.

From (1.11)–(1.16) we obtain in the case B′ = 0 for the electromagnetic fieldin the laboratory frame O

Ex = γE′x , (2.24)

Ey = γE′y , (2.25)

Ez = E′z , (2.26)

Bx = −γvc2E′y , (2.27)

By =γv

c2E′x , (2.28)

Bz = 0 . (2.29)

With ~v = v~ez it is

~v × ~B = v~ez × (Bx~ex +By~ey) (2.30)

= vBx~ey − vBy~ex (2.31)

= −γv2

c2(E′

x~ex + E′y~ey) (2.32)

= −v2

c2(Ex~ex + Ey~ey) . (2.33)

The force on P due to the electromagnetic field is

~F = q(~E + ~v × ~B

). (2.34)

Writing (2.34) componentwise yields with (2.33)

Fx = q(

1 − v2

c2

)

γE′x =

q

γE′x , (2.35)

Fy = q(

1 − v2

c2

)

γE′y =

q

γE′y , (2.36)

Fz = qE′z . (2.37)

14

Page 17: Space Charge Modelling in Path Manager - lombarda.web.cern.ch · 1torsten.muetze@cern.ch. Abstract We present a detailed explanation of the space charge modelling used in Path Manager

To evaluate these formulas one needs to know the electric field ~E′ in the iner-tial frame of the beam O′. The calculation similar to the one in Chap. 1 viaCoulomb’s law is exhibited in the section after the next (one important approx-imation inherent in this approach is highlighted under item 6 in Sect. 1.2).

2.1.3 Space Charge Kicks

All the following calculations are carried out in the laboratory frame O. Thebunch of particles is tracked over the distance L. The reference particle travelsthis distance in the time

∆t =L

cβ(0). (2.38)

Assuming, that the force ~F ∗ (see (2.20) and (2.21)) on P is constant over thistime interval, from

d~p

dt=d(γm~v)

dt= ~F ∗ (2.39)

we have~p(∆t) = ~p(0) + ∆t ~F ∗ . (2.40)

From the x- and y-component of (2.40) we get

mγ(∆t)vx(∆t) = mγ(0)vx(0) + ∆t F ∗x , (2.41)

mγ(∆t)vy(∆t) = mγ(0)vy(0) + ∆t F ∗y . (2.42)

Putting into these equations the relations

x′ =dx

dz=vxvz

=˙x˙z, (2.43)

y′ =dy

dz=vyvz

=˙y˙z

(2.44)

gives

x′(∆t) =γ(0)vz(0)

γ(∆t)vz(∆t)x′(0) +

∆t

mγ(∆t)vz(∆t)F ∗x , (2.45)

y′(∆t) =γ(0)vz(0)

γ(∆t)vz(∆t)y′(0) +

∆t

mγ(∆t)vz(∆t)F ∗y . (2.46)

Under the approximations γ(∆t) ≈ γ(0) and vz(∆t) ≈ vz(0) ≈ cβ(0) and with(2.38) this reduces to

x′(∆t) = x′(0) +L

mc2γ(0)β2(0)F ∗x , (2.47)

y′(∆t) = y′(0) +L

mc2γ(0)β2(0)F ∗y . (2.48)

A force in longitudinal direction will change the divergence of P , even if thisparticle is not subject to transversal forces. We want to express this divergence

15

Page 18: Space Charge Modelling in Path Manager - lombarda.web.cern.ch · 1torsten.muetze@cern.ch. Abstract We present a detailed explanation of the space charge modelling used in Path Manager

change by the change in kinetic energy over the time interval ∆t. The kineticenergy of P and its velocity are related by

E = (γ − 1)mc2 , (2.49)

which can be solved for v, giving

v =c

E +mc2

E(E + 2mc2) . (2.50)

From (2.43) and (2.44), assuming that ˙x(∆t) = ˙x(0) and ˙y(∆t) = ˙y(0) holds,we obtain

x′(∆t)

x′(0)=y′(∆t)

y′(0)=

˙z(0)˙z(∆t)

. (2.51)

Plugging in (2.50) and introducing the abbreviations E0 := E(0), ∆E :=E(∆t) − E(0) gives

˙z(0)˙z(∆t)

=E0 + ∆E +mc2

E0 +mc2

E0

E0 + ∆E

E0 + 2mc2

E0 + ∆E + 2mc2(2.52)

Expanding this expression into a Taylor series in ∆E around ∆E = 0 we have

˙z(0)˙z(∆t)

= 1 − ∆E

E0

(E0

mc2 + 1)(

E0

mc2 + 2) +O(∆E2) . (2.53)

Therefore,x′(∆t)

x′(0)=y′(∆t)

y′(0)≈ 1 − ∆E

E0γ(0)(γ(0) + 1

) . (2.54)

The gain in kinetic energy is approximately given by

∆E ≈ LF ∗z . (2.55)

The equations (2.47), (2.48), (2.54) and (2.55) describe in good approxima-tion how the divergence and the momentum of the particle P are affected bythe forces originating from the self-field of the beam.

2.1.4 Rings and Toroids of Charge

We explain now, how the electric self-field of the beam is calculated in thebeam frame O′. The Lorentz transformation between O and O′ for the spacecoordinates becomes

x′ = x , (2.56)

y′ = y , (2.57)

z′ = γz . (2.58)

16

Page 19: Space Charge Modelling in Path Manager - lombarda.web.cern.ch · 1torsten.muetze@cern.ch. Abstract We present a detailed explanation of the space charge modelling used in Path Manager

Each toroid of the mesh (see Fig. 2.5) is assumed to carry a uniformly distributedcharge. To determine the charge within each toroid, the charge of each particleis distributed among the 4 adjacent toroids as follows. Let

M1(a, b) :=a+ b

2and M2(a, b) :=

a2 + b2

2(2.59)

denote the arithmetic mean and the quadratic mean respectively.

O′

r =√

x2 + y2

dr

γdz

r

z′

z′

q

qi,k

qi+1,k

qi,k+1

qi+1,k+1

ri

ri+1

ri+2

z′k z′k+1 z′k+2

M1(z

′ k,z

′ k+

1)

M1(z

′ k+

1,z

′ k+

2)

M2(ri, ri+1)

M2(ri+1, ri+2)

Figure 2.6: Distribution of particle charge among the four adjacent toroids.

With the variables from Fig. 2.6 the charge q of a particle at (x, y, z′) issplitted into qi,k, qi+1,k, qi,k+1 and qi+1,k+1 according to

qi,k := qαrαz′ , (2.60)

qi+1,k := q(1 − αr)αz′ , (2.61)

qi,k+1 := qαr(1 − αz′) , (2.62)

qi+1,k+1 := q(1 − αr)(1 − αz′) (2.63)

with

r :=√

x2 + y2 , (2.64)

αr :=M2

2 (ri+1, ri+2) − r2

M22 (ri+1, ri+2) −M2

2 (ri, ri+1), (2.65)

αz′ :=M1(z

′k+1, z

′k+2) − z′

M1(z′k+1, z′k+2) −M1(z′k, z

′k+1)

(2.66)

=M1(zk+1, zk+2) − z

M1(zk+1, zk+2) −M1(zk, zk+1). (2.67)

17

Page 20: Space Charge Modelling in Path Manager - lombarda.web.cern.ch · 1torsten.muetze@cern.ch. Abstract We present a detailed explanation of the space charge modelling used in Path Manager

Note, that qi,k + qi+1,k + qi,k+1 + qi+1,k+1 = q holds.Having determined the charge in each toroid, the electric field (radial and

longitudinal component) of this formation of toroids is calculated at each meshvertice. With the variables from Fig. 2.7 the electric field at the coordinates(x, y, z′) of the particle P within the mesh is then interpolated by the field atthe 4 adjacent mesh vertices by

~E′(r, z′) := ~E′(ri, z′k)αrαz′ + ~E′(ri+1, z

′k)(1 − αr)αz′+

~E′(ri, z′k+1)αr(1 − αz′) + ~E′(ri+1, z

′k+1)(1 − αr)(1 − αz′) (2.68)

with

r :=√

x2 + y2 , (2.69)

αr :=ri+1 − r

ri+1 − ri, (2.70)

αz′ :=z′k+1 − z′

z′k+1 − z′k(2.71)

=zk+1 − z

zk+1 − zk. (2.72)

O′

r =√

x2 + y2

dr

γdz

P ~E′(r, z′)

~E′(ri, z′k)

~E′(ri+1, z′k)

~E′(ri, z′k+1)

~E′(ri+1, z′k+1)

ri

r

ri+1

z′k z′z′

z′k+1

Figure 2.7: Interpolation of the electric field at each particle’s coordinates by thefield values at the adjacent mesh vertices.

If P is lying outside the mesh, the electric field can be approximated byCoulomb’s law applied on P and another particle, which is assumed to carrythe sum of all particles’ charges and to be located at (¯x, ¯y, ¯z).

To calculate the electric field originating from one toroid, in a rough ap-proximation one could assume the charge to be concentrated on a circular ringin the center of the toroid, which results in solving a one-dimensional integral.The more accurate (but also more expensive) variant is to calculate the fieldoriginating from a space charge that is uniformly distributed over the whole

18

Page 21: Space Charge Modelling in Path Manager - lombarda.web.cern.ch · 1torsten.muetze@cern.ch. Abstract We present a detailed explanation of the space charge modelling used in Path Manager

toroid by solving a three-dimensional integral. Both variants shall be discussedin the following.

The complete elliptic integral of the first kind is defined for 0 < m < 1 by

K(m) :=

∫ π2

0

dθ√

1 −m sin2(θ). (2.73)

The complete elliptic integral of the second kind is defined for 0 < m < 1 by

E(m) :=

∫ π2

0

1 −m sin2(θ) dθ . (2.74)

We introduce the related integrals

J1(a) :=

∫ π2

−π2

dθ(1 − a(sin(θ) + 1)

)3/2, (2.75)

J2(a) :=

∫ π2

−π2

sin(θ) dθ(1 − a(sin(θ) + 1)

)3/2. (2.76)

It is J1(0) = π and J2(0) = 0. For 0 < a < 12 it is

J1(a) =2

1 − 2aE(2a) , (2.77)

J2(a) =2(1 − a)

a(1 − 2a)E(2a) − 2

aK(2a) . (2.78)

O′

x

y

z′

qt

r0

z′0

(x, y, z′)

r

Figure 2.8: Ring of charge.

The electric field at (x, y, z′) due to a ring of charge qt at

(r0 cos(θ), r0 sin(θ), z′0

), θ ∈ [0, 2π] , (2.79)

19

Page 22: Space Charge Modelling in Path Manager - lombarda.web.cern.ch · 1torsten.muetze@cern.ch. Abstract We present a detailed explanation of the space charge modelling used in Path Manager

is given by

~E′(r, z′) =qt

4πε0

1

π

π/2∫

−π/2

(r−r0 sin(θ)

)~er+(z′−z′

0)~ez′�

r20

cos(θ)2+(r−r0 sin(θ)

)2

+(z′−z′0)2�3/2

︸ ︷︷ ︸

=:~V (r,z′,r0,z′0)

dθ (2.80)

with r :=√

x2 + y2. With the abbreviations

∆z′ := z′ − z′0 , (2.81)

a :=2rr0

(r + r0)2 + ∆z′2(2.82)

the components of the electric field evaluate to

E′r(r, z

′) =qt

4πε0

1

π

rJ1(a) − r0J2(a)((r + r0)2 + ∆z′2

)3/2, (2.83)

E′z(r, z

′) =qt

4πε0

1

π

∆z′J1(a)((r + r0)2 + ∆z′2

)3/2. (2.84)

For r = 0, r0 > 0 it is a = 0 and thus

E′r(r, z

′) = 0 , (2.85)

E′z(r, z

′) =qt

4πε0

1

π

∆z′π(r20 + ∆z′2

)3/2. (2.86)

For r, r0 > 0 the relation 0 < a < 12 holds. Therefore,

E′r(r, z

′) = qt

4πε01π

(K(2a)

r√

(r+r0)2+∆z′2− (r2

0−r2+∆z′2)E(2a)

r((r−r0)2+∆z′2)√

(r+r0)2+∆z′2

)

, (2.87)

E′z(r, z

′) = qt

4πε01π

2∆z′E(2a)

((r−r0)2+∆z′2)√

(r+r0)2+∆z′2. (2.88)

See Sect. 2.2 for methods to evaluate the elliptic integrals K and E numerically.The electric field at (x, y, z′) due to a toroid of charge qt at

(ρ cos(θ), ρ sin(θ), ζ

), θ ∈ [0, 2π], ζ ∈ [z′1, z

′2], ρ ∈ [r1, r2] , (2.89)

is given by

~E′(r, z′) = qt

4πε02

π(z′2−z′

1)(r2

2−r2

1)

r2∫

ρ=r1

ρ

z′2∫

ζ=z′1

π/2∫

θ=−π/2

~V (r, z′, ρ, ζ) dθ dζ dρ (2.90)

with r :=√

x2 + y2, where the innermost integral can be evaluated in the sameway as demonstrated for a ring of charge. See Sect. 2.3 for a method to evaluatethe two outermost integrals numerically.

20

Page 23: Space Charge Modelling in Path Manager - lombarda.web.cern.ch · 1torsten.muetze@cern.ch. Abstract We present a detailed explanation of the space charge modelling used in Path Manager

O′

xy

z′qt

r1 r2

z′1

z′2

(x, y, z′)

r

Figure 2.9: Toroid of charge.

2.2 Evaluating Elliptic Integrals

The following demonstration is mainly taken from [8], where further referenceson the computation of elliptic integrals can be found.Using the hypergeometric series 2F1(a, b; c; d) the complete elliptic integrals(2.73) and (2.74) can be written as

K(m) =π

22F1

(1

2,1

2; 1;m

)

, (2.91)

E(m) =π

22F1

(

−1

2,1

2; 1;m

)

. (2.92)

From this, a modified Legendre form can be obtained by means of a standardtransformation on the hypergeometric series. Thus

K(m) = K1(η) + ln

(1

η

)

K2(η) , (2.93)

where

K1(η) = ln(4) +

∞∑

i=1

12·32···(2i−1)2

22·42···(2i)2

(

ln(4) − 2

2i∑

j=1

(−1)j−1

j

)

ηi ,

K2(η) =1

2+

1

2

∞∑

i=1

12·32···(2i−1)2

22·42···(2i)2 ηi , (2.94)

and η is the complementary parameter, defined by

η := 1 −m . (2.95)

This representation is equal to the one given in [3].Similarly,

E(m) = E1(η) + ln

(1

η

)

E2(η) , (2.96)

21

Page 24: Space Charge Modelling in Path Manager - lombarda.web.cern.ch · 1torsten.muetze@cern.ch. Abstract We present a detailed explanation of the space charge modelling used in Path Manager

where

E1(η) = 1 +

∞∑

i=1

12·32···(2i−1)2

22·42···(2i)22i

2i−1

(

ln(4) − 2

2i∑

j=1

(−1)j−1

j +1

2i− 1− 1

2i

)

ηi ,

E2(η) = 0 +1

2

∞∑

i=1

12·32···(2i−1)2

22·42···(2i)22i

2i−1ηi . (2.97)

This representation is equal to the one given in [5].The complete elliptic integral of the first kind can be approximated using a

form due to Hastings [7], given by

K∗(m) = R1(η) + ln

(1

η

)

R2(η) , (2.98)

where R1 and R2 are polynomials in η. The form (2.98) is a heuristic ansatzinspired by (2.93). We require

R1(0)!= K1(0) = ln(4) , R2(0)

!= K2(0) =

1

2, R1(1)

!= K(0) =

π

2.

Thus, the approximation becomes

K∗(m) =

n∑

i=0

aiηi + ln

(1

η

) n∑

i=0

biηi (2.99)

= a0 − b0 ln(η) + η(

a1 − b1 ln(η) + η(. . .+ η(an − bn ln(η))

))

,

where

a0 = ln(4) , b0 =1

2and

n∑

i=0

ai =π

2.

The variable n denotes the order of approximation.By similar reasoning we get an approximation form for the complete elliptic

integral of the second kind:

E∗(m) =

n∑

i=0

ciηi + ln

(1

η

) n∑

i=0

diηi (2.100)

= c0 − d0 ln(η) + η(

c1 − d1 ln(η) + η(. . .+ η(cn − dn ln(η))

))

,

where

c0 = 1 , d0 = 0 and

n∑

i=0

ci =π

2.

The coefficients ai, bi, ci, di (i = 1, 2, . . . , n) can be determined using theRemes algorithm for the computation of rational Chebyshev approximations.

22

Page 25: Space Charge Modelling in Path Manager - lombarda.web.cern.ch · 1torsten.muetze@cern.ch. Abstract We present a detailed explanation of the space charge modelling used in Path Manager

For n = 2 we obtain

i ai bi1 1.119697 · 10−1 1.213486 · 10−1

2 7.253230 · 10−2 2.887472 · 10−2

andi ci di1 4.630106 · 10−1 2.452740 · 10−1

2 1.077857 · 10−1 4.125321 · 10−2

See [8] for an extensive compilation of coefficients for approximations of orderup to n = 10.

The approximation errors

δK(m) := K(m) −K∗(m) (2.101)

δE(m) := E(m) − E∗(m) (2.102)

are depicted in Fig. 2.10 for n = 2. It is max |δK | = 2.99 · 10−5 and max |δE | =3.91 · 10−5.

0.2 0.4 0.6 0.8 1m

-0.00003

-0.00002

-0.00001

0.00001

0.00002

0.00003

∆KHmL

0.2 0.4 0.6 0.8 1m

-0.00004

-0.00002

0.00002

0.00004∆EHmL

Figure 2.10: Approximation errors for the complete elliptic integrals of first andsecond kind (n = 2).

2.3 Gaussian Quadrature Integration

Let I ⊆ R. The Gaussian quadrature integration seeks to obtain the bestnumerical estimate for the integral

I

f(x)W (x)dx , (2.103)

whereW is called the weighting function. The integral is approximated replacingf by the Lagrange interpolating polynomial φ through the points (xi, f(xi))(i = 1, 2, . . . , n), giving

I

f(x)W (x)dx ≈∫

I

φ(x)W (x)dx . (2.104)

23

Page 26: Space Charge Modelling in Path Manager - lombarda.web.cern.ch · 1torsten.muetze@cern.ch. Abstract We present a detailed explanation of the space charge modelling used in Path Manager

The fundamental theorem of Gaussian quadrature states that the optimal ab-scissas xi (i = 1, 2, . . . , n) of the n-point Gaussian quadrature formulas areprecisely the roots of the orthogonal polynomial of degree n for the interval Iand weighting function W . Gaussian quadrature is optimal because it fits allpolynomials up to degree 2n− 1 exactly.

Let ψi (i = 1, 2, . . . , n) be a family of orthogonal polynomials over the inter-val I with respect to the weighting function W . Then

I

φ(x)W (x)dx =

n∑

i=1

wif(xi) (2.105)

with

wi = − An+1γnAnψ′

n(xi)ψn+1(xi), (2.106)

where Ak is the coefficient of xk in ψk(x) and

γn =

I

(ψn(x))2W (x)dx , (2.107)

(see [6] for a derivation).The simplest form of Gaussian quadrature is the Legendre-Gauss quadrature

with I = [−1, 1] and W = 1. The orthogonal polynomials for this interval andweighting function are the Legendre polynomials, given by

Pk(x) =1

2kk!

dk

dxk(x2 − 1)k . (2.108)

For Legendre polynomials,

Ak =(2k)!

2k(k!)2(2.109)

and

γn =

∫ 1

−1

(Pn(x))2dx =

2

2n+ 1. (2.110)

Therefore, (2.106) becomes

wi = − 2

(n+ 1)P ′n(xi)Pn+1(xi)

. (2.111)

Using the recurrence relation

(1 − x2)P ′n(x) = (n+ 1)xPn(x) − (n+ 1)Pn+1(x) (2.112)

we obtain the practically useful formula

wi =2(1 − x2

i )

(n+ 1)2(Pn+1(xi))2. (2.113)

24

Page 27: Space Charge Modelling in Path Manager - lombarda.web.cern.ch · 1torsten.muetze@cern.ch. Abstract We present a detailed explanation of the space charge modelling used in Path Manager

Let the roots x1, x2, . . . , xn of the Legendre polynomial Pn(x) be ordered,such that x1 < x2 < · · · < xn holds. Then

xn−k+1 = −xk (2.114)

wn−k+1 = wk (2.115)

holds for all k = 1, 2, . . . , n.The following table lists the roots of the n-th Legendre polynomial and

the weights according to (2.113) for n ∈ {2, 4, 6}, where xi and wi for i =n/2 + 1, n/2+ 2, . . . , n can be determined using the symmetry relations (2.114)and (2.115).

n xi (i = 1, 2, . . . , n/2) wi (i = 1, 2, . . . , n/2)

2 −0.5773502692 14 −0.8611363116 0.3478548451

−0.3399810436 0.65214515496 −0.9324695142 0.1713244924

−0.6612093865 0.3607615730−0.2386191861 0.4679139346

Integrals over any finite interval [a, b] can be treated by applying the lineartransformation

y =b − a

2︸ ︷︷ ︸

=:m

x+b+ a

2︸ ︷︷ ︸

=:c

, (2.116)

giving

∫ b

a

f(y)dy = m

∫ 1

−1

f(mx+ c)dx ≈ m

n∑

i=1

wif(mxi + c) . (2.117)

We want to demonstrate the Legendre-Gauss quadrature by calculating anapproximation to the multidimensional integral

~J(r, z′) :=

r2∫

ρ=r1

ρ

z′2∫

ζ=z′1

π/2∫

θ=−π/2

~V (r, z′, ρ, ζ) dθ dζ dρ (2.118)

from (2.90). Let nζ and nρ denote the order of approximation in longitudinaland transversal direction respectively. With

mζ :=z′2 − z′1

2(2.119)

cζ :=z′2 + z′1

2(2.120)

mρ :=r2 − r1

2(2.121)

cρ :=r2 + r1

2(2.122)

25

Page 28: Space Charge Modelling in Path Manager - lombarda.web.cern.ch · 1torsten.muetze@cern.ch. Abstract We present a detailed explanation of the space charge modelling used in Path Manager

we obtain

~J(r, z′) ≈ mρ

nρ∑

i=1

wi(mρxi + cρ)mζ

nζ∑

j=1

wj

π/2∫

θ=−π/2

~V (r, z′,mρxi + cρ,mζxj + cζ) dθ .

(2.123)This approximation formula in terms of a finite double sum can be rewritten bylinearly mapping the roots of the Legendre polynomials from [−1, 1] onto [0, 1]using the substitution

x = 2x− 1 (2.124)

and introducing the abbreviations

wi :=wi2

and ri := mρxi + cρ = (r2 − r1)xi + r1 (2.125)

for all i = 1, 2, . . . , nρ and

wj :=wj2

and zj := mζxj + cζ = (z′2 − z′1)xj + z′1 (2.126)

for all j = 1, 2, . . . , nζ . Then,

~J(r, z′) ≈ (r2 − r1)(z′2 − z′1)

nρ∑

i=1

wiri

nζ∑

j=1

wj

π/2∫

θ=−π/2

~V (r, z′, ri, zj) dθ . (2.127)

2.4 Implementation Notes

1. Observe, that from

C0 :=1

4πε0(2.128)

it follows with ε0µ0c2 = 1 and µ0 = 4π · 10−7 N

A2

C0

GeV · m/C2= 10−16

(c

m/s

)2

(eC

) , (2.129)

where we denote with e the electron charge magnitude.

2. Note, that fromp = γmv (2.130)

it follows

βγ =

(p

GeV/c

)

(m

GeV/c2

) (2.131)

and from

γ =1

1 − β2(2.132)

it followsγ =

1 + (βγ)2 . (2.133)

26

Page 29: Space Charge Modelling in Path Manager - lombarda.web.cern.ch · 1torsten.muetze@cern.ch. Abstract We present a detailed explanation of the space charge modelling used in Path Manager

3. From the relation between the kinetic energy and the velocity of a particle,

E = (γ − 1)mc2 , (2.134)

andp = γmv (2.135)

it followsE =

p2c2 +m2c4 −mc2 (2.136)

and

p =

E

(E

c2+ 2m

)

(2.137)

and therefore

E

GeV=

√( p

GeV/c

)2

+( m

GeV/c2

)2

−( m

GeV/c2

)

(2.138)

and

p

GeV/c=

√( E

GeV

)(( E

GeV

)

+ 2( m

GeV/c2

))

. (2.139)

4. If we denote with I the average beam current over the RF cycle and withf the reference radio-frequency, each bunch of particles carries a charge of

qb :=I

f. (2.140)

If for computing efficiency reasons the number of particles n is chosen,such that

n∑

i=1

qi < qb (2.141)

holds, in order for space charge effects to be modelled properly, the conceptof macrocharges is applied. Therefore, a macroparticle charge factor

k :=qb

∑ni=1 qi

=I

f∑n

i=1 qi(2.142)

is introduced, and in (2.80) et sqq. and (2.90) the term qt is generallyreplaced by kqt.

A short summary of the necessary calculation steps shall be given:

• In the laboratory frame O calculate the radial and longitudinal mesh in-terval size according to (2.1) and (2.2).

27

Page 30: Space Charge Modelling in Path Manager - lombarda.web.cern.ch · 1torsten.muetze@cern.ch. Abstract We present a detailed explanation of the space charge modelling used in Path Manager

• In the beam frame O′ calculate a table of electric field values in cylindricalcoordinates at the mesh vertices originating from toroids of charge eitherroughly approximated according to (2.87) and (2.88) or more accurate(but also more expensive) according to (2.90) and (2.127). At first theamount of charge in each toroid is left undetermined to take advantage ofsymmetry relations.

• Determine the charge within each toroid by splitting up each particlecharge among the 4 adjacent toroids according to (2.60)–(2.63). Togetherwith the table of electric field values this allows the calculation of theelectric field at each mesh vertice, where macrocharges have to be takeninto account (see item 4 in the preceding enumeration of implementationnotes).

• Determine the electric field at each particle’s coordinates by interpolationfrom the field at the mesh vertices according to (2.68).

• From the electric field value in O′ calculate the force on each particle in Oaccording to (2.35)–(2.37). Use the heuristical transformations (2.20) and(2.21) to obtain the force in O and calculate the effect on each particle’sdivergence and momentum deviation according to (2.47), (2.48), (2.54)and (2.55).

28

Page 31: Space Charge Modelling in Path Manager - lombarda.web.cern.ch · 1torsten.muetze@cern.ch. Abstract We present a detailed explanation of the space charge modelling used in Path Manager

Bibliography

[1] A. Perrin, J.-F. Amand, and T. Mutze. Travel User Manual. CERN, 2006.

[2] E. W. Weisstein. Elliptic integral of the first kind.From MathWorld – A Wolfram Web Resource.http://mathworld.wolfram.com/EllipticIntegraloftheFirstKind.html.

[3] The Wolfram Functions Site. Complete elliptic integral of the first kind.http://functions.wolfram.com/08.02.06.0006.01.

[4] E. W. Weisstein. Elliptic integral of the second kind.From MathWorld–A Wolfram Web Resource.http://mathworld.wolfram.com/EllipticIntegraloftheSecondKind.html.

[5] The Wolfram Functions Site. Complete elliptic integral of the second kind.http://functions.wolfram.com/08.01.06.0006.01.

[6] E. W. Weisstein. Gaussian quadrature.From MathWorld–A Wolfram Web Resource.http://mathworld.wolfram.com/GaussianQuadrature.html.

[7] C. Hastings. Approximations for Digital Computers. Princeton UniversityPress, Princeton, N. J., 1955.

[8] W. J. Cody. Chebyshev approximations for the complete elliptic integralsK and E. Mathematics of Computation, 19:105–112, 1965.

29