Dynamical Functional Particle Kristo er Karlsson533372/FULLTEXT01.pdf · Kristo er Karlsson...

61

Transcript of Dynamical Functional Particle Kristo er Karlsson533372/FULLTEXT01.pdf · Kristo er Karlsson...

Page 1: Dynamical Functional Particle Kristo er Karlsson533372/FULLTEXT01.pdf · Kristo er Karlsson Abstract 2012-06-12 Abstract The aim of this master thesis has been to solve the fully

Mid Sweden UniversityDepartment of Natural Sciences, Engineering and Mathematics (NAT)Author: Kristo�er KarlssonE-mail address: [email protected] programme: Master of Science in Engineering Physics, 300 highereducation creditsExaminer: Assoc. Prof. Peter Glans, [email protected]: Prof. Sverker Edvardsson, Mid Sweden University,[email protected]: Prof. Mårten Gulliksson, Mid Sweden University,[email protected]: 12153 words inclusive of appendicesDate: 2012-06-12

M.Sc. Thesis within Physics MA, Degree Project, 30higher education credits

Dynamical Functional ParticleMethod applied to theSchrödinger Equation

Exact solutions of three-body exotic ions

Kristo�er Karlsson

Page 2: Dynamical Functional Particle Kristo er Karlsson533372/FULLTEXT01.pdf · Kristo er Karlsson Abstract 2012-06-12 Abstract The aim of this master thesis has been to solve the fully

Dynamical Functional ParticleMethod applied to the SchrödingerEquation - Exact solutions ofthree-body exotic ionsKristo�er Karlsson

Abstract2012-06-12

Abstract

The aim of this master thesis has been to solve the fully correlatednon-relativistic Schrödinger Equation for three-particle systems by usingthe Dynamical Functional Particle Method (DFPM) and control thesolutions by comparing with the results from the literature. Thethree-particle systems that has been analyzed is helium, a muon-based ionand the negative ion of positronium. The Schrödinger equation for S-stateshas been transformed and derived, and the wavefunction has beensubstituted to a wavefunction that treated the Cusp conditions when twoparticles approach each other as boundary condition by using theknowledge that the wavefunction is limited everywhere. The discrete gridsfor the distances were transformed so that the outer boundary conditioncould be placed further from the origin and obtain better description of thewavefunction. By using the chain rule and quotient rule, the SchrödingerEquation was transformed again and �nite di�erences resulted in a discretedynamical system that was programmed in C-code and iteratively steppedto the solution of the systems energy. The continuum energy wasdetermined by applying Richardson extrapolation with the values of theenergy for di�erent step sizes. The resulting energies were -2.903304(-2.90330456) a.u. in ground state and -2.174934 (-2.17493019) a.u. in �rstexcited state for helium, -97.57 (-97.5669834) a.u. in ground state for themuon-based ion and -0.258405 (-0.262) a.u. in ground state for thenegative ion of positronium, where the values in the parentheses are valuesfrom the literature, and the values were consistent with the results fromliterature. But the values obtained here were in general more exact due tothe non-approximated method. There were limited precision during thecalculations and the condition number of the matrices with the step sizeswas high for small step sizes and results in a uncertainty and not morethan 5-6 signi�cant �gures can be used for the value of the energies. Abetter value had been obtained if for example Multi Precision had beenused because it can handle a high condition number. The curse ofdimensionality is hard to beat and methods for treating bigger systemswith DFPM has to be developed in order to have a higher order of thedi�erential equation with respect to time and to increase the maximumtime step to make the calculations faster.

Keywords: Dynamical Functional Particle Method, SchrödingerEquation, three-particle systems, helium, muon, positronium

ii

Page 3: Dynamical Functional Particle Kristo er Karlsson533372/FULLTEXT01.pdf · Kristo er Karlsson Abstract 2012-06-12 Abstract The aim of this master thesis has been to solve the fully

Dynamical Functional ParticleMethod applied to the SchrödingerEquation - Exact solutions ofthree-body exotic ionsKristo�er Karlsson

Sammanfattning2012-06-12

Sammanfattning

Syftet med detta examensarbete har varit att lösa den fullt korreleradeicke-relativistiska Schrödingerekvation för tre-partikelsystem genomanvändning av partikelmetoden Dynamical Functional Particle Method(DFPM) och kontrollera resultaten med värden från litteraturen. Desystem som har analyserats är helium, en muon-baserad jon och negativladdad positronium. Schrödingerekvationen för S-tillstånd hartransformerats och härletts och vågfunktionen har substituerats till enannan vågfunktion som kan behandla Cusp-villkoren när två partiklarnärmar sig varandra som randvillkor genom att använda kunskapen om attvågfunktionen är begränsad överallt. Det diskreta rutnätet med diskretapunkter för avstånden transformerades för att kunna placera det yttrerandvillkoret längre bort från origo och därigenom erhålla en bättrebeskrivning av vågfunktionen. Med hjälp av kedjeregeln och kvotregelntransformerades Schrödingerekvationen igen och med �nita di�erenserskapades ett diskretiserat dynamiskt system som programmerades i C-kodoch iterativt stegade fram till lösningen av systemets energi.Kontinuumvärdet av energin bestämmdes genom att användaRichardsonextrapolation med värdena på energin som bestämdes för olikasteglängder. Resultaten blev -2.903304 (-2.90330456) a.u. förgrundtillstånd och -2.174934 (-2.17493019) a.u. för första exciteradetillståndet för helium, -97.57 (-97.5669834) a.u. för muonbaserade jonensgrundtillståndet och -0.258405 (-0.262) a.u. för grundtillståndet förnegativt laddade positronium där värdena inom paranteserna är värdenfrån litteraturen, och resultaten stämde bra överens med litteraturvärden.Men de erhållna energierna är ofta mer exakta eftersom ingenapproximation gjordes. Beräkningarna utfördes med begränsad precision,och konditionstalet för matriserna med steglängderna var högt vid väldigtsmå steglängder, vilket orsakar en osäkerhet och endast 5-6 si�ror kundeanvändas i svaret. Bättre resultat hade erhållits om t.ex. multiprecisionhade används eftersom det kan hantera matriser med högt konditionstal.Dimensionens förbannelse är svår att besegra och för behandling av störresystem måste ordningen för di�erentialekvationen med avseende på tiden iDFPM öka för att öka det maximala tidssteget och därigenom få snabbareberäkningar.

Nyckelord: DFPM, schrödingerekvationen, tre-partikelsystem, helium,muon, positronium

iii

Page 4: Dynamical Functional Particle Kristo er Karlsson533372/FULLTEXT01.pdf · Kristo er Karlsson Abstract 2012-06-12 Abstract The aim of this master thesis has been to solve the fully

Dynamical Functional ParticleMethod applied to the SchrödingerEquation - Exact solutions ofthree-body exotic ionsKristo�er Karlsson

Acknowledgements2012-06-12

Acknowledgements

I would like to thank my tutors Sverker Edvardsson and Mårten Gullikssonfor feedback and guidance during my master thesis and getting theopportunity to have an own room at Fibre Science and CommunicationNetwork (FSCN) to quickly �nd answers to questions and get good accessto the tutors.

Thanks to Sverker for guidance and discussion in programming and theory,and the guidance in LYX of having the opportunity to learn a new programto write in that gives a very nice structure for equations.

The introduction with examples of DFPM was a good start for me to learnand understand the method, so thanks for the support during that to.

iv

Page 5: Dynamical Functional Particle Kristo er Karlsson533372/FULLTEXT01.pdf · Kristo er Karlsson Abstract 2012-06-12 Abstract The aim of this master thesis has been to solve the fully

Dynamical Functional ParticleMethod applied to the SchrödingerEquation - Exact solutions ofthree-body exotic ionsKristo�er Karlsson

Table of Contents2012-06-12

Table of Contents

Abstract . . . . . . . . . . . . . . . . . . . . . . iiSammanfattning . . . . . . . . . . . . . . . iii

Acknowledgements . . . . . . . . . . . . . iv

Terminology . . . . . . . . . . . . . . . . . . . vi

1 Introduction 1

1.1 Background and problem motivation . . . . . . . . . . . 11.2 Overall aim . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.3 Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.4 Outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.5 Contributions . . . . . . . . . . . . . . . . . . . . . . . . . 2

2 Theory 3

2.1 Three-particle systems . . . . . . . . . . . . . . . . . . . . 32.2 Dynamical Functional Particle Method . . . . . . . . . . 5

2.2.1 Inspiration . . . . . . . . . . . . . . . . . . . . . . . . 52.2.2 DFPM in the one-dimensional case . . . . . . . . . . . 92.2.3 DFPM in the three-dimensional case . . . . . . . . . . 10

2.3 DFPM for the hydrogen atom . . . . . . . . . . . . . . . 11

3 Methodology 15

3.1 Helium atom . . . . . . . . . . . . . . . . . . . . . . . . . . 153.2 Muon-based ion . . . . . . . . . . . . . . . . . . . . . . . . 203.3 Negative ion of Positronium . . . . . . . . . . . . . . . . 22

4 Results 25

4.1 Helium atom . . . . . . . . . . . . . . . . . . . . . . . . . . 254.2 Muon-based system . . . . . . . . . . . . . . . . . . . . . 284.3 Negative ion of Positronium . . . . . . . . . . . . . . . . 30

5 Conclusion and Discussion 32

References . . . . . . . . . . . . . . . . . . . . 34Appendix A: Hamiltonian in (r1, r2, µ) 35

Appendix B: Rewriting of the SE . 37

Appendix C: Transformation of the SE 38

Appendix D: The programme codes 40

v

Page 6: Dynamical Functional Particle Kristo er Karlsson533372/FULLTEXT01.pdf · Kristo er Karlsson Abstract 2012-06-12 Abstract The aim of this master thesis has been to solve the fully

Dynamical Functional ParticleMethod applied to the SchrödingerEquation - Exact solutions ofthree-body exotic ionsKristo�er Karlsson

Terminology2012-06-12

Terminology

Abbreviations and acronyms

DFPM Dynamical Functional Particle Method

SE Schrödinger Equation

a.u. Atomic units

Ha Hartree units

Mathematical notation

Symbol Description

ψ The wavefunction for S-states

Q The substituted wavefunction for S-states in three dimensions

F The functional in DFPM

µ (x, t) The mass function in DFPM in one dimension

η (x, t) The damping function in DFPM in one dimension

H The Hamiltonian

me The mass of the electron

mp The mass of the proton

me+ The mass of the positron

mN The mass of the nucleus in Helium

mµ− The mass of a muon

∇2i The Laplace operator for the i:th particle

Zi The charge of the i:th particle

E The energy

vi

Page 7: Dynamical Functional Particle Kristo er Karlsson533372/FULLTEXT01.pdf · Kristo er Karlsson Abstract 2012-06-12 Abstract The aim of this master thesis has been to solve the fully

Dynamical Functional ParticleMethod applied to the SchrödingerEquation - Exact solutions ofthree-body exotic ionsKristo�er Karlsson

1 Introduction2012-06-12

1 Introduction1.1 Background and problem motivation

The Schrödinger Equation (SE) is one of the most important equations inphysics because it describes a lot of phenomena in material physics.Solving that equation for three-body systems with accurate, or �exact�,results are today very di�cult due to algorithms limitations in computercalculations [1]. Every problem leads to solving large eigenvalue problemsdue to the discretization and that is very tough when the dimension of thesystem gets very large and leads to numerical problems [1]. The curse of

dimensionality arises, which is very hard to beat [1]. There are also termsthat make the problem di�cult, so approximations have been made byassuming that the nucleus does not move and that the orbiting particles(usually electrons) move independently of each other (the Hartree-Fockmethod with the Born-Oppenheimer approximation), which reduces someterms and provide an easier solution [2]. Most commonly, basis functionshave been used to solve the problems, where Hylleraas is the most commonbecause it is the only basis function that ful�lls the Cusp conditions whentwo particles approach each other [1]. The basis functions are di�erentiableeverywhere except in the cusp and �nd it di�cult to describe thethree-particle coalescence [1]. Instead, particle methods can be appliedwith �nite di�erences since they are iterative methods and the particlesfollow known physical laws of motion. No assumptions need to be made forparticle methods, in contrast to basis functions where an ansatz can bemade that the wavefunction is for example a Gaussian.

1.2 Overall aim

The aim of this master thesis is to apply the Dynamical FunctionalParticle Method (DFPM) in an e�ective way to solve the fully correlatednon-relativistic SE for three-particle systems. Helium and exotic ions suchas a muon-based ion and the negative ion of positronium are systems ofinterest. Calculated energies will be compared to energy values from theliterature.

1.3 Scope

The focus is to solve the SE for S-states, which means that the wavefunction only depends on the distances between the particles. The aim isto calculate both the ground state energy and the �rst excited state energyof Helium and the ground state energies of the muon-based ion and thenegative ion of positronium.

1.4 Outline

Chapter 2 describes three-particle systems, introduces the DFPM and givesan example how to use the solution method used in this work. Chapter 3describes in detail how the SE has been solved through varioustransformations and substitutions. Chapter 4 shows the results determined

1

Page 8: Dynamical Functional Particle Kristo er Karlsson533372/FULLTEXT01.pdf · Kristo er Karlsson Abstract 2012-06-12 Abstract The aim of this master thesis has been to solve the fully

Dynamical Functional ParticleMethod applied to the SchrödingerEquation - Exact solutions ofthree-body exotic ionsKristo�er Karlsson

1 Introduction2012-06-12

from the computer code of the various three-body systems and Chapter 5gives a discussion of the results and the conclusions drawn.

1.5 Contributions

The programming of the C-code of three-particle systems has been madetogether with Sverker Edvardsson. The programming code forextrapolation has been made by the author.

2

Page 9: Dynamical Functional Particle Kristo er Karlsson533372/FULLTEXT01.pdf · Kristo er Karlsson Abstract 2012-06-12 Abstract The aim of this master thesis has been to solve the fully

Dynamical Functional ParticleMethod applied to the SchrödingerEquation - Exact solutions ofthree-body exotic ionsKristo�er Karlsson

2 Theory2012-06-12

2 Theory

2.1 Three-particle systems

A general three-particle system contains three moving particles, see Figure2.1 below. The heaviest particle acts as a nucleus, which is particle 3 inFigure 2.1. The approximation with a static nucleus (Born-Oppenheimerapproximation) is not made here.[2]

Figure 2.1: A general three-particle system where particle 3 is the nucleus.

If particle 3 is the nucleus, the full correlated non-relativistic SE forS-states can be expressed as(

−~2

2

m1 +m3

m1m3∇2

1 −~2

2

m2 +m3

m2m3∇2

2 −~2

m3∇1 · ∇2

)ψ (r1, r2, r12)+

+

(Z1Z3e

2

4πϵ0r1+Z2Z3e

2

4πϵ0r2+Z1Z2e

2

4πϵ0r12

)ψ (r1, r2, r12) = Eψ (r1, r2, r12) (2.1)

where ~ is the reduced Planck constant; m1,m2 and m3 are the masses ofthe particles; ∇2

1 and ∇22 are the Laplace operators on particle 1 and 2; r1,

r2 are the distances from particle 3 to particle 1 and 2; r12 is the distancebetween particle 1 and 2; e is the elementary charge; ϵ0 is the permittivity;Z1, Z2 and Z3 are the atomic numbers of particle 1, 2 and 3; E is thebinding energy; and ψ is the time independent wavefunction [2,3].

In atomic units (a.u.), or Hartree units (Ha) for the energy, the constants~ = e = 4πϵ0 = me = 1 to avoid numerical values and by using the law ofcosine with µ = cos (ϑ), where ϑ is the angle between the distance vectorsr1 and r2, the distance r12 =

√r21 + r22 − 2r1r2µ [3]. This results in that

the wavefunction ψ (r1, r2, r12) instead may be written as ψ (r1, r2, µ). Thissimpli�es the derivations, because the variables r1, r2 and µ areindependent of each other. The SE in Eq. 2.1 can then be expressed as

Hψ (r1, r2, µ) =

(−1

2

m1 +m3

m1m3∇2

1 −1

2

m2 +m3

m2m3∇2

2 −1

m3∇1 · ∇2

)ψ (r1, r2, µ)+

+

(Z1Z3

r1+Z2Z3

r2+

Z1Z2√r21 + r22 − 2r1r2µ

)ψ (r1, r2, µ) = Eψ (r1, r2, µ) (2.2)

3

Page 10: Dynamical Functional Particle Kristo er Karlsson533372/FULLTEXT01.pdf · Kristo er Karlsson Abstract 2012-06-12 Abstract The aim of this master thesis has been to solve the fully

Dynamical Functional ParticleMethod applied to the SchrödingerEquation - Exact solutions ofthree-body exotic ionsKristo�er Karlsson

2 Theory2012-06-12

where the binding energy E in Eq. 2.2 can be expressed as

E =< ψ (r1, r2, µ) |H|ψ (r1, r2, µ) >

In the SE in Eq. 2.2, the two �rst terms in the Hamiltonian H describe thekinetic energy of particle 1 and 2. The third term is the mass polarizationterm which is due to the motion of particle 3, the nucleus. The other termsdescribe the Coulomb potential interactions, correlations, between theparticles.[2]

The di�erential equation has no analytic solution and has to be solved in anumerical way. But solving it is di�cult due to the in�nite potentialenergy at the distances r1 = r2 = r12 = 0. When two particles approacheach other, a cusp arises because of the diverged energy, and results in adiscontinuous �rst derivative, see Figure 2.2 for the situation when particle1 and 2 approach each other [3]. The kinetic energy part must then have acancelling term from the Laplace operators term in order to obtain a �nitevalue of the total energy [5]. This is guarantied by the Kato cuspconditions [4], see Eq. 2.3, 2.4 and 2.5, that must be ful�lled for the SE:(

∂ ⟨ψ (r1, r2, r12)⟩∂r1

)r1=0

=m1 +m3

m1m3Z1Z3ψ (r1 = 0, r2 > 0, r12 > 0) (2.3)

(∂ ⟨ψ (r1, r2, r12)⟩

∂r2

)r2=0

=m2 +m3

m2m3Z2Z3ψ (r1 > 0, r2 = 0, r12 > 0) (2.4)

(∂ ⟨ψ (r1, r2, r12)⟩

∂r12

)r12=0

=m1 +m2

m1m2Z1Z2ψ (r1 = R, r2 = R, r12 = 0) (2.5)

where ⟨ψ (r1, r2, r12)⟩ is the mean value of the wave function over anin�nitesimal sphere centered at r1 = 0, r2 = 0 or r12 = 0 and R is anarbitrary value of the distance between the nucleus and electron 1 and 2.The situation in Figure 2.2 a) implies that the wave-function is linear inr12 in the vicinity of the line r1 = r2, see Figure 2.2 b) [1].

4

Page 11: Dynamical Functional Particle Kristo er Karlsson533372/FULLTEXT01.pdf · Kristo er Karlsson Abstract 2012-06-12 Abstract The aim of this master thesis has been to solve the fully

Dynamical Functional ParticleMethod applied to the SchrödingerEquation - Exact solutions ofthree-body exotic ionsKristo�er Karlsson

2 Theory2012-06-12

a) b)

Figure 2.2: a) The cusp can be seen as the dip in the wavefunction at theline r1 = r2 [1]. b) The wavefunction is linear in r12 in the vicinity of the liner1 = r2.

The Cusp problem makes the SE di�cult to solve due to the boundaryconditions that must be ful�lled. A possible solution is to approximatewith �nite di�erences, but there are cusp points, for example in Figure 2.2b), where the derivative is discontinuous and does not exist, which impliesthat �nite di�erences can not be used in these points.

2.2 Dynamical Functional Particle Method

2.2.1 Inspiration

The Dynamical Functional Particle Method (DFPM) is a solution methodfor solving di�erential equations, both linear and nonlinear [6,7]. Theprinciple of the method is inspired by the harmonic oscillator, see Figure2.3, with a particle, with mass m, attached to a spring having a springconstant k [8]. By moving the particle from the equilibrium position x = 0an arbitrary distance x, the forces acting on the particle is the force fromthe spring (according to Hooke´s law), F1 = −kx, and the damping force,F2 = −bx, where b is the damping coe�cient, provided viscous damping ofthe particle [8].

5

Page 12: Dynamical Functional Particle Kristo er Karlsson533372/FULLTEXT01.pdf · Kristo er Karlsson Abstract 2012-06-12 Abstract The aim of this master thesis has been to solve the fully

Dynamical Functional ParticleMethod applied to the SchrödingerEquation - Exact solutions ofthree-body exotic ionsKristo�er Karlsson

2 Theory2012-06-12

Figure 2.3: a) Particle attached to a spring in equilibrium position x = 0.b) Particle moved an arbitrary distance x from equilibrium. c) Free bodydiagram of the particle.

According to Newtons second law:∑Fi = ma = mx (2.6)

which leads to that Eq. 2.6 can be written as the following linear, ordinarydi�erential equation:

− kx− bx = mx (2.7)

⇒ x+ γx+ ω20x = 0 (2.8)

where γ = bmand ω2

0 = km. [8]

By solving the di�erential equation in Eq. 2.8 and using the initialconditions x(0) = x0 and x(0) = 0, di�erent solutions is obtained fordi�erent values of the parameters γ and ω0.[8]

There are three di�erent cases:

1. Case of underdamping: γ < 2ω0 :

x(t) = Ae−γt2 cos

(√4ω2

0 − γ2

2t+ φ

)(2.9)

where the constants A and φ are determined from the initial conditions.This kind of damping is a underdamping and the behaviour of Eq. 2.9 witharbitrary initial conditions can be seen in Figure 2.4.[8]

6

Page 13: Dynamical Functional Particle Kristo er Karlsson533372/FULLTEXT01.pdf · Kristo er Karlsson Abstract 2012-06-12 Abstract The aim of this master thesis has been to solve the fully

Dynamical Functional ParticleMethod applied to the SchrödingerEquation - Exact solutions ofthree-body exotic ionsKristo�er Karlsson

2 Theory2012-06-12

0 1 2 3 4 5 6 7−6

−4

−2

0

2

4

6

8Underdamping of a harmonic oscillator

t

x(t)

Figure 2.4: The behaviour of underdamping with x0 = 6 and x0 = 0,where the dashed line is the exponential damping amplitude in x(t) =

Ae−γt2 cos

(√4ω2

0−γ2

2 t+ φ

)

2. Case of critical damping: γ = 2ω0 :

x(t) = e−γt2 (B1t+B2) (2.10)

where the constants B1 and B2 are determined from the initial conditions.This damping is a critical damping, and a typical behaviour of Eq. 2.10 isillustrated in Figure 2.5. Critical damping is the fastest way for the systemin Figure 2.3 to reach equilibrium, i.e. become stationary.[8]

7

Page 14: Dynamical Functional Particle Kristo er Karlsson533372/FULLTEXT01.pdf · Kristo er Karlsson Abstract 2012-06-12 Abstract The aim of this master thesis has been to solve the fully

Dynamical Functional ParticleMethod applied to the SchrödingerEquation - Exact solutions ofthree-body exotic ionsKristo�er Karlsson

2 Theory2012-06-12

0 1 2 3 4 5 6 70

1

2

3

4

5

6Critical damping of a harmonic oscillator

t

x(t)

Figure 2.5: The behaviour of critical damping with x0 = 6 and x0 = 0, wherethe dashed line is the exponential factor in x(t) = e−

γt2 (B1t+B2).

3. Case of overdamping: γ > 2ω0 :

x(t) = C1e−

γ+√

γ2−4ω20

2 t + C2e−

γ−√

γ2−4ω20

2 t (2.11)

where the constants C1 and C2 are determined from the initial conditions.This is a overdamping, and a typical behaviour of x(t) in Eq. 2.11 isillustrated in Figure 2.6 with initial conditions.[8]

0 1 2 3 4 5 6 70

1

2

3

4

5

6

7Overdamping of a harmonic oscillator

t

x(t)

Figure 2.6: The behaviour of overdamping with x0 = 6 and x0 = 0.

8

Page 15: Dynamical Functional Particle Kristo er Karlsson533372/FULLTEXT01.pdf · Kristo er Karlsson Abstract 2012-06-12 Abstract The aim of this master thesis has been to solve the fully

Dynamical Functional ParticleMethod applied to the SchrödingerEquation - Exact solutions ofthree-body exotic ionsKristo�er Karlsson

2 Theory2012-06-12

2.2.2 DFPM in the one-dimensional case

DFPM is inspired by the harmonic oscillator where a functional Fcorresponds to interactions acting on abstract particles. The idea is to �ndthe asymptotic solution to determine the solution of an abstract equation.Consider a function v = v (x) and an operator F , then F(v (x)) = 0 is theabstract equation. By introducing an arti�cial time parameter t, a newfunction u = u (x, t) is formulated and an equation of motion from Eq. 2.7for a dynamical system can be expressed as

F(u (x, t)) = µ (x, t)∂2u (x, t)

∂t2+ η (x, t)

∂u (x, t)

∂t(2.12)

u (x, t = t0) = u (t0) ,(∂u (x, t)

∂t

)t=t0

= ut (t0)

where µ (x, t) is the mass function; η (x, t) is the damping function; u (t0)and ut (t0) are the initial conditions. Due to the dissipation in Eq. 2.12,limt→tf

∂2u(x,t)∂t2

= limt→tf∂u(x,t)∂t

= 0, which leads to thatlimt→tf u (x, t) = v (x), where tf ≤ ∞, and means that the abstractequation F(v (x)) = 0 is solved by solving F(u (x, t)) = 0 [7].

A numerical solution can be attained by discretizing the equations by using�nite di�erences for the spatial derivatives and de�ne a gridx1, x2, x3, ..., xn, where n is the number of discretized points. The functionsand the functional can then be discretized to vi = v (xi), ui (t) = u (xi, t),µi (t) = µ (xi, t), ηi (t) = η (xi, t) andFi (t) = Fi (u1 (t) , u2 (t) , ..., un (t) , x1, x2, ..., xn), where i = 1, 2, ..., n. Byusing the discretizations, the equation of motion in Eq. 2.12 can beexpressed as

Fi (t) = µi (t) ui (t) + ηi (t) ui (t) (2.13)

This can be seen as a particle system with interacting particles where aparticle corresponds to a discrete point and the functional Fi (t)corresponds to the force. The idea is to make the system approachequilibrium, which means that the functional Fi (t) → 0 when the timeparameter t→ tf . By having a random ansatz of the values ui (t0) andsetting ui (t0) = 0 as initial conditions, a numerical time integration can bemade for each particle. The velocity and position after a �nite time step∆t can be determined by using the symplectic Euler step method andcombining with Eq. 2.13:[6]{

ui (t+∆t) = ui (t) + ui (t)∆t = ui (t) +(

Fi(t)−ηi(t)ui(t)µi(t)

)∆t

ui (t+∆t) = ui (t) + ui (t+∆t)∆t(2.14)

For equilibrium, the following condition must be ful�lled:n∑i=1

F2i (tf ) = 0 (2.15)

9

Page 16: Dynamical Functional Particle Kristo er Karlsson533372/FULLTEXT01.pdf · Kristo er Karlsson Abstract 2012-06-12 Abstract The aim of this master thesis has been to solve the fully

Dynamical Functional ParticleMethod applied to the SchrödingerEquation - Exact solutions ofthree-body exotic ionsKristo�er Karlsson

2 Theory2012-06-12

where Eq. 2.15 says that if the value of the functional is very close to theorigin, it has converged to the asymptotic value.[6]

The force interactions in the system are often conservative, which meansthat there exists a potential energy. The idea is to have a potential where aminimum exists, which results in asymptotic convergence for the systembecause the damping parameter dissipates energy from the system.[7]

If there exist a potential V , a force F = −∇V is conservative, which meansthat the integrability condition

∇× F = 0 (2.16)

is satis�ed, where ∇ =(

∂∂ui, ∂∂uj

), F = (Fi,Fj) in Eq. 2.16 [7]. The work

is then independent of the path a particle is moving, so by determine thetotal work, W , made of all the particles in the system by using thecoordinate directions u

′1, u

′2, ..., u

′n, the potential is determined also as

W = −V =

∫F · du =

u1∫0

F1

(u

1, 0, ..., 0)du

1 +

u2∫0

F2

(u1, u

2, ..., 0)du

2 + ...

...+

un∫0

Fn(u1, u2, ..., u

n

)du

n (2.17)

where F = (F1,F2, ...,Fn) can be seen as a vector �eld with the forcesacting on each particle.[7]

If there exists a minimum point of the determined potential in Eq. 2.17,DFPM will converge. If there exists a maximum point, the sign of thefunctional F can be changed to −F to transform the potential to a curvewith a minimum point. If a saddle point exists, the idea is to make a stepfunction where the functional F is positive in one region and negative inthe other region from the critical point to make it become a minimumpoint.[7]

For the harmonic oscillator in Chapter 2.2.1, the functional F = −kx givesthe potential V = 1

2kx2, which means that there exist a minimum and the

system converge to the asymptotic solution. For a one-dimensional case,there always exist a potential V that F = −dV

dx.[8]

2.2.3 DFPM in the three-dimensional case

In the three-dimensional case, which is interesting for the case in Chapter 3(method section), if v = v (x1, x2, x3) is a function, F is an operator andF (v (x1, x2, x3)) = 0 is the abstract equation, an equation of motion for adynamical system can be expressed as

F (u (x1, x2, x3, t)) = µ∂2u (x1, x2, x3, t)

∂t2+ η

∂u (x1, x2, x3, t)

∂t(2.18)

u (x1, x2, x3, t = t0) = u (t0) ,(∂u (x1, x2, x3, t)

∂t

)t=t0

= ut (t0)

10

Page 17: Dynamical Functional Particle Kristo er Karlsson533372/FULLTEXT01.pdf · Kristo er Karlsson Abstract 2012-06-12 Abstract The aim of this master thesis has been to solve the fully

Dynamical Functional ParticleMethod applied to the SchrödingerEquation - Exact solutions ofthree-body exotic ionsKristo�er Karlsson

2 Theory2012-06-12

where u = u (x1, x2, x3, t) is the new function with the arti�cial time t;µ = µ (x1, x2, x3, t) is the mass function; η = η (x1, x2, x3, t) is the dampingfunction; and u (t0) and ut (t0) are the initial conditions. Discretization ofthe function v gives that vijk = v (x1i, x2j, x3k) , where i = 1, 2, ..., n1,j = 1, 2, ..., n2 and k = 1, 2, ..., n3, where n1, n2, n3 are total number ofdiscrete points for the variables. The function u becomes thenuijk (t) = u (x1i, x2j, x3k, t), and µijk (t) = µ (x1i, x2j, x3k, t),ηijk (t) = η (x1i, x2j, x3k, t) and Fijk (t) =F (u111 (t) , u112 (t) , ..., ..., un1n2n3 (t) , x11, x12, ..., x1n1 , x2,1, ..., ..., x3n3).[7]

The discretized equation of motion can then be expressed as

Fi,j,k (t) = µijk (t) uijk (t) + ηijk (t) ui,j,k,t (2.19)

Using the same step method by Euler for the numerical time integration asin Chapter 2.2.2, see Eq. 2.14, the following must be ful�lled forequilibrium at the time t = tf :[6]∑

F2ijk (tf ) = 0

As in the one-dimensional case, a potential function exists if theintegrability condition is satis�ed. If the determined potential has aminimum, the functional is used. Or else, if a maximum or a saddle pointexist, the sign of the functional F is altered to create a minimum.[7]

2.3 DFPM for the hydrogen atom

An example where the one-dimensional DFPM can be applied is the SE forthe hydrogen atom. For the S-states in atomic units using sphericalcoordinates and the assumption that mp >> me, where mp and me are themasses of the proton and the electron, the SE can be expressed as

Hψ (r) =

(− 1

2r

∂2

∂r2r − 1

r+l(l + 1)

2r2

)ψ (r) = Eψ (r) (2.20)

where l is the orbital quantum number, i.e. an eigenvalue of the angularmomentum operator L2Ylm (θ, ϕ) = l (l + 1)Ylm (θ, ϕ), where Ylm (θ, ϕ) isspherical harmonic function; r is the distance between the proton and theelectron, see Figure 2.7; and the energy E can be expressed asE =< ψ (r) |H|ψ (r) >.[3]

11

Page 18: Dynamical Functional Particle Kristo er Karlsson533372/FULLTEXT01.pdf · Kristo er Karlsson Abstract 2012-06-12 Abstract The aim of this master thesis has been to solve the fully

Dynamical Functional ParticleMethod applied to the SchrödingerEquation - Exact solutions ofthree-body exotic ionsKristo�er Karlsson

2 Theory2012-06-12

Figure 2.7: The hydrogen atom.

To avoid the Kato Cusp condition when r → 0, a substitution of thewavefunction ψ (r) to P (r) = rψ (r) can be made. This results gives thatthe boundary conditions are P (0) = 0 and P (∞) = 0 (ψ (∞) = 0),because the wavefunction is limited everywhere over r ∈ [0,∞]. Using theexpression above in Eq. 2.20 and that ∂2ψ(r)

∂r2r = ∂2(rψ(r))

∂r2= ∂2P (r)

∂r2, the SE

can be written as

HP (r) =

(−1

2

∂2

∂r2− 1

r+l(l + 1)

2r2

)P (r) = EP (r) (2.21)

The new SE in Eq. 2.21 has a functional F expressed as

F =(E − H

)P (r) =

=

(< P (r) |H|P (r) > +

1

2

∂2

∂r2+

1

r− l(l + 1)

2r2

)P (r) (2.22)

By using �nite di�erences for the second derivative and the compositetrapezoidal rule for the integral

E (t) =< P (r) |H|P (r) >=

∫P (r)

(HP (r)

)dV =

= 4π

∫P (r)

(HP (r)

)dr ≈ 4π∆r

∑i

Pi (t)(HPi (t)

)in Eq. 2.22, the discrete functionalFi (t) = Fi (P1 (t) , P2 (t) , ..., Pn (t) , r1, r2, ..., rn) can be expressed as

Fi (t) =1

2

Pi−1 (t)− 2Pi (t) + Pi+1 (t)

(∆r)2 +

+

∑Pi (t)(HPi (t)

)∑P 2i (t)

+1

ri− l(l + 1)

2r2i

Pi (t) (2.23)

where i = 0, 1, ..., n, ∆r = ri+1 − ri and the term∑Pi (t)

(HPi (t)

) (∑P 2i (t)

)−1 means that the wavefunction is normalized inevery iteration, because

12

Page 19: Dynamical Functional Particle Kristo er Karlsson533372/FULLTEXT01.pdf · Kristo er Karlsson Abstract 2012-06-12 Abstract The aim of this master thesis has been to solve the fully

Dynamical Functional ParticleMethod applied to the SchrödingerEquation - Exact solutions ofthree-body exotic ionsKristo�er Karlsson

2 Theory2012-06-12

< P (r) |P (r) >=

∫P 2 (r) dV = 4π

∫P 2 (r) dr ≈ 4π∆r

∑i

P 2i (t)

gives a factor√(< P (r) |P (r) >) that the wavefunction ful�lls the

nomalization condition.

A problem when solving the SE is the outer boundary condition. Todescribe the wavefunction well, the outer boundary condition has to beplaced as far from the origin as possible. But a location of the boundarycondition further from the origin results in more discrete points to counton. But a substitution r = x2 gives less discrete points to count on whileproviding a better description of the wavefunction. By introducing thesubstitution r = x2 and using the chain-rule, the second derivative can beexpressed as

∂r=∂x

∂r

∂x=

1

2x

∂x

∂2

∂r2=∂x

∂r

∂x

(1

2x

∂x

)=

1

2x

(1

2x

∂2

∂x2− 1

2x2∂

∂x

)which leads to that the SE from Eq. 2.21 can be written as

HP (x) =

(−1

8

(1

x2∂2

∂x2− 1

x3∂

∂x

)+l(l + 1)

2x4− 1

x2

)P (x) = EP (x) (2.24)

Finite di�erences of the derivatives and the composite trapezoidal rule ofthe integral in Eq. 2.24 gives that the functional Fi (t) can be expressed as

Fi (t) =1

8

(1

x2i

Pi−1 (t)− 2Pi (t) + Pi+1 (t)

(∆x)2 − 1

x3i

Pi+1 (t)− Pi−1 (t)

2∆x

)+

+

(∑Pi(t)(HPi(t))∑

P 2i (t)

+1

x2i− l(l + 1)

2x4i

)Pi (t) (2.25)

By having the discrete points xi in the x-grid equidistant, the r-grid will benon-equidistant and the boundary condition can be placed further from theorigin, see Figure 2.8 a) and b). This transformation is particularly good inthe case of excited states because the outer boundary must then be setfurther out from the origin than for the ground state. More points isplaced in the beginning part of the r-grid, which results in better accuracyof the wavefunction in the interesting part.

13

Page 20: Dynamical Functional Particle Kristo er Karlsson533372/FULLTEXT01.pdf · Kristo er Karlsson Abstract 2012-06-12 Abstract The aim of this master thesis has been to solve the fully

Dynamical Functional ParticleMethod applied to the SchrödingerEquation - Exact solutions ofthree-body exotic ionsKristo�er Karlsson

2 Theory2012-06-12

Figure 2.8: a) Substituting r = x2 results in more narrow discrete points nearthe origin, where a re�ned curve can be obtained, and sparse points far fromthe origin. b) The boundary condition can be placed further from the originin the r-grid while working in a smaller x-grid.

14

Page 21: Dynamical Functional Particle Kristo er Karlsson533372/FULLTEXT01.pdf · Kristo er Karlsson Abstract 2012-06-12 Abstract The aim of this master thesis has been to solve the fully

Dynamical Functional ParticleMethod applied to the SchrödingerEquation - Exact solutions ofthree-body exotic ionsKristo�er Karlsson

3 Methodology2012-06-12

3 Methodology

3.1 Helium atom

For the helium atom, the SE in atomic units and spherical coordinates forS-states can be expressed as

Hψ (r1, r2, µ) =

(−1

2

me +mN

memN

(∇2e1 +∇2

e2

)− 1

mN∇e1 · ∇e2

)ψ (r1, r2, µ)+

+

(ZNZe

(1

r1+

1

r2

)+

ZeZe√r21 + r22 − 2r1r2µ

)ψ (r1, r2, µ) = Eψ (r1, r2, µ) (3.1)

where me is the mass of the electron (me = 1 a.u.); mN the mass of thenucleus (two protons and two neutrons) (mN = 7294.295 a.u.); ∇2

e1,∇2

e2are

the Laplace operators for electron 1 and 2; ZN is the atom number ofhelium (ZN = 2 a.u.); Ze is the charge of the electron (Ze = −1 a.u.); r1, r2are the distances from the nucleus to electron 1 and electron 2; µ = cos (ϑ),see Figure 3.1; and E is the energy, also expressed asE =< ψ (r1, r2, µ) |H|ψ (r1, r2, µ) >.[2]

Figure 3.1: The Helium atom with the nucleus consisting of 2 protons and 2neutrons.

The Cusp conditions in Eq. 2.3-2.5 are here avoided by substituting thewavefunction ψ (r1, r2, µ) with Q (r1, r2, µ) = r1r2 (1− µ2)ψ (r1, r2, µ). Thewavefunction Q (r1, r2, µ) has the following characteristic and boundaryconditions:

Q (r1, r2, µ) =

0 , r1 = r2 and µ = 1

0 , r1 = 0 or r2 = 0

0 , r1 → ∞ or r2 → ∞ (ψ (r1, r2, µ) → ∞)

0 , µ = −1

15

Page 22: Dynamical Functional Particle Kristo er Karlsson533372/FULLTEXT01.pdf · Kristo er Karlsson Abstract 2012-06-12 Abstract The aim of this master thesis has been to solve the fully

Dynamical Functional ParticleMethod applied to the SchrödingerEquation - Exact solutions ofthree-body exotic ionsKristo�er Karlsson

3 Methodology2012-06-12

where the �rst condition treats the Cusp condition in Eq. 2.5, the secondcondition treats the Cusp conditions in Eq. 2.3 and 2.4 and the thirdcondition is due to the behaviour of the wavefunction ψ (r1, r2, µ) .By rewriting the derivatives in the Nabla- and Laplace operators in Eq. 3.1in terms of (r1, r2, µ) [9], see Appendix A, and using the quotient rule forthe rewritten derivatives, see Appendix C, the SE in Eq. 3.1 can beexpressed as

HQ (r1, r2, µ) = −1

2

me +mN

memN

(∂2Q (r1, r2, µ)

∂r21+∂2Q (r1, r2, µ)

∂r22

)+

−1

2

me +mN

memN

(1

r21+

1

r22

)((1− µ2

) ∂2Q (r1, r2, µ)

∂µ2+ 2µ

∂Q (r1, r2, µ)

∂µ

)+

−1

2

me +mN

memN

(1

r21+

1

r22

)(2

(1 + µ2

1− µ2

)Q (r1, r2, µ)

)+

− µ

mN

(∂2Q (r1, r2, µ)

∂r1∂r2+Q (r1, r2, µ)

r1r2−(

1

r1

∂Q (r1, r2, µ)

∂r2+

1

r2

∂Q (r1, r2, µ)

∂r1

))+

+ZNZe

(1

r1+

1

r2

)Q (r1, r2, µ)+

ZeZe√r21 + r22 − 2r1r2µ

Q (r1, r2, µ) = EQ (r1, r2, µ) (3.2)

To transform the grid of the distances r1 and r2 to place the outerboundary condition further out from the origin, the wavefunctionQ (r1, r2, µ) can be substituted to Q (x1, x2, µ)

(2 4√r1r2

)−1, where x21 = r1 andx22 = r2. By using the expression in Eq. 3.2, the chain rule and quotientrule for the derivatives, see Appendix C, the SE in Eq. 3.2 can beexpressed as

HQ (x1, x2, µ) = −1

2

me +mN

memN

(1

4

(1

r1

∂2Q (x1, x2, µ)

∂x21+

1

r2

∂2Q (x1, x2, µ)

∂x22

))+

−1

2

me +mN

memN

(−1

2

(1√r31

∂Q (x1, x2, µ)

∂x1+

1√r32

∂Q (x1, x2, µ)

∂x2

))+

−1

2

me +mN

memN

5Q (x1, x2, µ)

16

(1

r21+

1

r22

)+

−1

2

me +mN

memN

(1

r21+

1

r22

)((1− µ2

) ∂2Q (x1, x2, µ)

∂µ2+ 2µ

∂Q (x1, x2, µ)

∂µ

)+

−1

2

me +mN

memN

(1

r21+

1

r22

)(2

(1 + µ2

1− µ2

)Q (x1, x2, µ)

)+

− µ

mN

(1

4√r1r2

∂2Q (x1, x2, µ)

∂x1∂x2− 5

8

(1

√r1r2

∂Q (x1, x2, µ)

∂x1+

1

r1√r2

∂Q (x1, x2, µ)

∂x2

))+

− µ

mN

(25Q (x1, x2, µ)

16r1r2

)+

+ZNZe

(1

r1+

1

r2

)Q (x1, x2, µ)+

16

Page 23: Dynamical Functional Particle Kristo er Karlsson533372/FULLTEXT01.pdf · Kristo er Karlsson Abstract 2012-06-12 Abstract The aim of this master thesis has been to solve the fully

Dynamical Functional ParticleMethod applied to the SchrödingerEquation - Exact solutions ofthree-body exotic ionsKristo�er Karlsson

3 Methodology2012-06-12

+ZeZe√

r21 + r22 − 2r1r2µQ (x1, x2, µ) = EQ (x1, x2, µ) (3.3)

By replacing r1 = x21 and r2 = x22 in Eq. 3.3, the SE can be rewritten as

HQ (x1, x2, µ) = −1

2

me +mN

memN

(1

4

(1

x21

∂2Q (x1, x2, µ)

∂x21+

1

x22

∂2Q (x1, x2, µ)

∂x22

))+

−1

2

me +mN

memN

(−1

2

(1

x31

∂Q (x1, x2, µ)

∂x1+

1

x32

∂Q (x1, x2, µ)

∂x2

))+

−1

2

me +mN

memN

5Q (x1, x2, µ)

16

(1

x41+

1

x42

)+

−1

2

me +mN

memN

(1

x41+

1

x42

)((1− µ2

) ∂2Q (x1, x2, µ)

∂µ2+ 2µ

∂Q (x1, x2, µ)

∂µ

)+

−1

2

me +mN

memN

(1

x41+

1

x42

)(2

(1 + µ2

1− µ2

)Q (x1, x2, µ)

)+

− µ

mN

(1

4x1x2

∂2Q (x1, x2, µ)

∂x1∂x2− 5

8

(1

x1x22

∂Q (x1, x2, µ)

∂x1+

1

x21x2

∂Q (x1, x2, µ)

∂x2

))+

− µ

mN

(25Q (x1, x2, µ)

16x21x22

)+

+ZNZe

(1

x21+

1

x22

)Q (x1, x2, µ)+

+ZeZe√

x41 + x42 − 2x21x22µQ (x1, x2, µ) = EQ (x1, x2, µ) (3.4)

By using �nite di�erences for the derivatives and the composite trapezoidalrule for the integral E =< Q (x1, x2, µ) |H|Q (x1, x2, µ) > in Eq. 3.4, thediscretized functional Fijk (t) can be expressed as

Fijk (t) =∑i∑

j

∑k Qijk(t)(HQijk(t))∑

i∑

j

∑k Q

2ijk(t)

Qijk (t)+

+1

2

me +mN

memN

(1

4x21i

Qi+1jk (t)− 2Qijk (t) +Qi−1jk (t)

(∆x1)2

)+

+1

2

me +mN

memN

(1

4x22j

Qij+1k (t)− 2Qijk (t) +Qij−1k (t)

(∆x2)2

)+

+1

2

me +mN

memN

(−1

2

(1

x31i

Qi+1jk (t)−Qi−1jk (t)

2∆x1+

1

x32j

Qij+1k (t)−Qij−1k (t)

2∆x2

))+

+1

2

me +mN

memN

(5Qijk (t)

16

(1

x41i+

1

x42j

))+

+1

2

me +mN

memN

((1

x41i+

1

x42j

)((1− µ2

k

) Qijk+1 (t)− 2Qijk (t) +Qijk−1 (t)

(∆µ)2

))+

17

Page 24: Dynamical Functional Particle Kristo er Karlsson533372/FULLTEXT01.pdf · Kristo er Karlsson Abstract 2012-06-12 Abstract The aim of this master thesis has been to solve the fully

Dynamical Functional ParticleMethod applied to the SchrödingerEquation - Exact solutions ofthree-body exotic ionsKristo�er Karlsson

3 Methodology2012-06-12

+1

2

me +mN

memN

((1

x41i+

1

x42j

)(2µk

Qijk+1 (t)−Qijk−1 (t)

2∆µ+ 2

(1 + µ2

k

1− µ2k

)Qijk (t)

))+

+µkmN

(1

4x1ix2j

Qi+1j+1k (t)−Qi−1j+1k (t)−Qi+1j−1k (t) +Qi−1j−1k (t)

4∆x1∆x2

)+

+µkmN

(− 5

8x1ix22j

Qi+1jk (t)−Qi−1jk (t)

2∆x1− 5

8x21ix2j

Qij+1k (t)−Qij−1k (t)

2∆x2

)+

+µkmN

(25Qijk (t)

16x21ix22j

)+

− ZNZe

(1

x21i+

1

x22j

)Qijk (t)−

ZeZe√x41i + x42j − 2x21ix

22jµk

Qijk (t) (3.5)

The discretized functional in Eq. 3.5 was implemented in theC-programme �three-body-gen.c�, see Appendix D. By running theprogramme, the energy for a given step size hn = ∆x1 = ∆x2 = ∆µ can bedetermined. When obtaining di�erent energies for di�erent step sizes, thecontinuum value at hn = 0 of the energy can then be extrapolated, seeFigure 3.2, by applying Richardson extrapolation [10].

Figure 3.2: Continuum value is the extrapolated value from extrapolation.

The continuum energy, E, at hn = 0 can be determined as

E = En +M∑m=1

cmhpmn +O (hpM+1

n ) (3.6)

where Enis the energy for a given step size hn; cm are unknown constantsthat are independent of the step size; pm are known numbers, either

18

Page 25: Dynamical Functional Particle Kristo er Karlsson533372/FULLTEXT01.pdf · Kristo er Karlsson Abstract 2012-06-12 Abstract The aim of this master thesis has been to solve the fully

Dynamical Functional ParticleMethod applied to the SchrödingerEquation - Exact solutions ofthree-body exotic ionsKristo�er Karlsson

3 Methodology2012-06-12

natural numbers (1,2,3,...), odd numbers (1,3,5,...) or even numbers(2,4,6,...) depending on the truncated error from the Taylor expansion ofthe used �nite di�erence formulas; and O

(hpM+1n

)describes the truncated

error of order hpM+1n while using M coe�cients.

The unknown coe�cients cm can be determined by making a linearequation system. Consider the case that N energies are determined fordi�erent step sizes. Then the following system can be written by using Eq.3.6:

E = E1 + c1hp11 + c2h

p21 + c3h

p31 + ...

E = E2 + c1hp12 + c2h

p22 + c3h

p32 + ...

E = E3 + c1hp13 + c2h

p23 + c3h

p33 + ...

...

E = EN + c1hp1N + c2h

p2N + c3h

p3N + ...

The unknown continuum value can then be reduced by taking thedi�erence between two adjacent rows, which results in the following system:

0 = E1 − E2 + c1 (hp11 − hp12 ) + c2 (h

p21 − hp22 ) + c3 (h

p31 − hp32 ) + ...

0 = E2 − E3 + c1 (hp12 − hp13 ) + c2 (h

p22 − hp23 ) + c3 (h

p32 − hp33 ) + ...

0 = E3 − E4 + c1 (hp13 − hp14 ) + c2 (h

p23 − hp24 ) + c3 (h

p33 − hp34 ) + ...

...

0 = EN−1 − EN + c1(hp1N−1 − hp1N

)+ c2

(hp2N−1 − hp2N

)+ c3

(hp3N−1 − hp3N

)+ ...

From this, a linear equation system can be created to determine the �rstN − 1 number of constants cn. The linear equation system will be Hc = e,where H is a (N − 1)× (N − 1) matrix and c and e are (N − 1)× 1 vectors.

Hc =

hp11 − hp12 hp21 − hp22 · · · h

pN−1

1 − hpN−1

2

hp12 − hp13 hp22 − hp23 · · · hpN−1

2 − hpN−1

3...

.... . .

...hp1N−1 − hp1N hp2N−1 − hp2N · · · h

pN−1

N−1 − hpN−1

N

c1c2...

cN−1

=

=

E2 − E1

E3 − E2

...EN − EN−1

= e

The coe�cients c1, c2, c3, ..., cN−1 can be determined by using Gaussianelimination, and the continuum energy E can then be determined to

E = En +N−1∑m=1

cmhpmn (3.7)

with a truncated error O (hpNn ) of order hpNn .

Energies of the ground state and the �rst excited state for helium wasobtained both with and without the mass polarization term. Thecontinuum value of the energy was determined in Matlab by making anm-�le, see Appendix D.

19

Page 26: Dynamical Functional Particle Kristo er Karlsson533372/FULLTEXT01.pdf · Kristo er Karlsson Abstract 2012-06-12 Abstract The aim of this master thesis has been to solve the fully

Dynamical Functional ParticleMethod applied to the SchrödingerEquation - Exact solutions ofthree-body exotic ionsKristo�er Karlsson

3 Methodology2012-06-12

For the excited state the following condition [11] was added:

Q (x1i, x2j , µ) = −Q (x2j , x1i, µ) (3.8)

The total wave function q = χQ has to be antisymmetric for heliumbecause the electrons are fermions [1,12]. In the ground state the spin wavefunction χ is antisymmetric, because the electrons can not have the samespin, and Q is then symmetric [1]. For the �rst excited state χ issymmetric, and this forces the wave function Q to be antisymmetric as inEq. 3.8. The total wavefunction thereby ful�lls the condition of beingantisymmetric [1,12].

3.2 Muon-based ion

The muon-based ion can be seen in Figure 3.3, which consists of oneproton as the nucleus and two muons as the orbiting particles.

Figure 3.3: Muon-based ion containing of a proton as the nucleus and two muons

as the orbiting particles.

The SE for the muon-based ion for S-states in atomic units and sphericalcoordinates can be written as

Hψ (r1, r2, µ) =

(−1

2

mµ− +mp

mpmµ−

(∇2µ−1+∇2

µ−2

)− 1

mp∇µ−

1· ∇µ−

2

)ψ (r1, r2, µ)+

+

(ZpZµ−

(1

r1+

1

r2

)+

Zµ−Zµ−√r21 + r22 − 2r1r2µ

)ψ (r1, r2, µ) = Eψ (r1, r2, µ) (3.9)

where mµ− is the mass of the muon particle (mµ− = 206.7686 a.u.); mp isthe mass of the proton (mp = 1836.1515 a.u.); ∇µ−1

,∇µ−2are the Nabla

operators for the muons; Zµ− is the charge of the muon particle (Zµ− = −1a.u.); and Zp is the charge of the proton (Zp = 1 a.u.).[2]

Substituting in the same way with r1 = x21 and r2 = x22 as in Chapter 3.1,the SE in Eq. 3.9 can be expressed as

20

Page 27: Dynamical Functional Particle Kristo er Karlsson533372/FULLTEXT01.pdf · Kristo er Karlsson Abstract 2012-06-12 Abstract The aim of this master thesis has been to solve the fully

Dynamical Functional ParticleMethod applied to the SchrödingerEquation - Exact solutions ofthree-body exotic ionsKristo�er Karlsson

3 Methodology2012-06-12

HQ (x1, x2, µ) = −1

2

mµ− +mp

mpmµ−

(1

4

(1

x21

∂2Q (x1, x2, µ)

∂x21+

1

x22

∂2Q (x1, x2, µ)

∂x22

))+

−1

2

mµ− +mp

mpmµ−

(−1

2

(1

x31

∂Q (x1, x2, µ)

∂x1+

1

x32

∂Q (x1, x2, µ)

∂x2

))+

−1

2

mµ− +mp

mpmµ−

5Q (x1, x2, µ)

16

(1

x41+

1

x42

)+

−1

2

mµ− +mp

mpmµ−

(1

x41+

1

x42

)((1− µ2

) ∂2Q (x1, x2, µ)

∂µ2+ 2µ

∂Q (x1, x2, µ)

∂µ

)+

−1

2

mµ− +mp

mpmµ−

(1

x41+

1

x42

)(2

(1 + µ2

1− µ2

)Q (x1, x2, µ)

)+

− µ

mp

(1

4x1x2

∂2Q (x1, x2, µ)

∂x1∂x2− 5

8

(1

x1x22

∂Q (x1, x2, µ)

∂x1+

1

x21x2

∂Q (x1, x2, µ)

∂x2

))+

− µ

mp

(25Q (x1, x2, µ)

16x21x22

)+

+ZpZµ−

(1

x21+

1

x22

)Q (x1, x2, µ)+

+Zµ−Zµ−√

x41 + x42 − 2x21x22µQ (x1, x2, µ) = EQ (x1, x2, µ) (3.10)

The discretized functional Fijk (t) can then from Eq. 3.10 be expressed as

Fijk (t) =∑i∑

j

∑k Qijk(t)(HQijk(t))∑

i∑

j

∑k Q

2ijk(t)

Qijk (t)+

+1

2

mµ− +mp

mpmµ−

1

4x21i

Qi+1jk (t)− 2Qijk (t) +Qi−1jk (t)

(∆x1)2 +

+1

2

mµ− +mp

mpmµ−

1

4x22j

Qij+1k (t)− 2Qijk (t) +Qij−1k (t)

(∆x2)2 +

+1

2

mµ− +mp

mpmµ−

(−1

2

(1

x31i

Qi+1jk (t)−Qi−1jk (t)

2∆x1+

1

x32j

Qij+1k (t)−Qij−1k (t)

2∆x2

))+

+1

2

mµ− +mp

mpmµ−

(5Qijk (t)

16

(1

x41i+

1

x42j

))+

+1

2

mµ− +mp

mpmµ−

((1

x41i+

1

x42j

)((1− µ2

k

) Qijk+1 (t)− 2Qijk (t) +Qijk−1 (t)

(∆µ)2 +

))+

+1

2

mµ− +mp

mpmµ−

((1

x41i+

1

x42j

)(2µk

Qijk+1 (t)−Qijk−1 (t)

2∆µ+ 2

(1 + µ2

k

1− µ2k

)Qijk (t)

))+

+µkmp

(1

4x1ix2j

Qi+1j+1k (t)−Qi−1j+1k (t)−Qi+1j−1k (t) +Qi−1j−1k (t)

4∆x1∆x2

)+

21

Page 28: Dynamical Functional Particle Kristo er Karlsson533372/FULLTEXT01.pdf · Kristo er Karlsson Abstract 2012-06-12 Abstract The aim of this master thesis has been to solve the fully

Dynamical Functional ParticleMethod applied to the SchrödingerEquation - Exact solutions ofthree-body exotic ionsKristo�er Karlsson

3 Methodology2012-06-12

+µkmp

(− 5

8x1ix22j

Qi+1jk (t)−Qi−1jk (t)

2∆x1− 5

8x21ix2j

Qij+1k (t)−Qij−1k (t)

2∆x2

)+

+µkmp

(25Qijk (t)

16x21ix22j

)+

− ZpZµ−

(1

x21i+

1

x22j

)Qijk (t)−

Zµ−Zµ−√x41i + x42j − 2x21ix

22jµk

Qijk (t) (3.11)

By using the discretized functional of the muon-ion in Eq. 3.11implemented in the C-programme �three-body-gen.c� and then Richardsonextrapolation as described in Chapter 3.1, the continuum value of theground state energy was determined by using Matlab.

3.3 Negative ion of Positronium

The negative ion of Positronium, Ps−, consists of two electrons and onepositron, e+, and can be seen in Figure 3.4.

Figure 3.4: The negative ion of positronium, Ps−, where the positron is treated as

the nucleus.

The SE for the negative ion of Positronium in Hartree units and sphericalcoordinates for S-states can be expressed as

Hψ (r1, r2, µ) =

(−1

2

me +me+

meme+

(∇2e1 +∇2

e2

)− 1

me+∇e1 · ∇e2

)ψ (r1, r2, µ)+

+

(ZeZe+

(1

r1+

1

r2

)+

ZeZe√r21 + r22 − 2r1r2µ

)ψ (r1, r2, µ) = Eψ (r1, r2, µ) (3.12)

where me+ is the mass of the positron (me+ = 1 a.u.); ∇e1 ,∇e2 are theNabla operators for the electrons; and Ze+ is the charge of the positron(Ze+ = 1 a.u.).[2]

With the same substitution as in Chapter 3.1 and 3.2, the SE for Ps− inEq. 3.12 can be expressed as

22

Page 29: Dynamical Functional Particle Kristo er Karlsson533372/FULLTEXT01.pdf · Kristo er Karlsson Abstract 2012-06-12 Abstract The aim of this master thesis has been to solve the fully

Dynamical Functional ParticleMethod applied to the SchrödingerEquation - Exact solutions ofthree-body exotic ionsKristo�er Karlsson

3 Methodology2012-06-12

HQ (x1, x2, µ) = −1

2

me +me+

meme+

(1

4

(1

x21

∂2Q (x1, x2, µ)

∂x21+

1

x22

∂2Q (x1, x2, µ)

∂x22

))+

−1

2

me +me+

meme+

(−1

2

(1

x31

∂Q (x1, x2, µ)

∂x1+

1

x32

∂Q (x1, x2, µ)

∂x2

))+

−1

2

me +me+

meme+

5Q (x1, x2, µ)

16

(1

x41+

1

x42

)+

−1

2

me +me+

meme+

(1

x41+

1

x42

)((1− µ2

) ∂2Q (x1, x2, µ)

∂µ2+ 2µ

∂Q (x1, x2, µ)

∂µ

)+

−1

2

me +me+

meme+

(1

x41+

1

x42

)(2

(1 + µ2

1− µ2

)Q (x1, x2, µ)

)+

− µ

me+

(1

4x1x2

∂2Q (x1, x2, µ)

∂x1∂x2− 5

8

(1

x1x22

∂Q (x1, x2, µ)

∂x1+

1

x21x2

∂Q (x1, x2, µ)

∂x2

))+

− µ

me+

(25Q (x1, x2, µ)

16x21x22

)+

+ZeZe+

(1

x21+

1

x22

)Q (x1, x2, µ)+

+ZeZe√

x41 + x42 − 2x21x22µQ (x1, x2, µ) = EQ (x1, x2, µ) (3.13)

By using �nite di�erences and the composite trapezoidal rule, thediscretized functional Fijk (t) can from Eq. 3.13 be expressed as

Fijk (t) =∑i∑

j

∑k Qijk(t)(HQijk(t))∑

i∑

j

∑k Q

2ijk(t)

Qijk (t)+

+1

2

me +me+

meme+

1

4x21i

Qi+1jk (t)− 2Qijk (t) +Qi−1jk (t)

(∆x1)2 +

+1

2

me +me+

meme+

1

4x22,j

Qij+1k (t)− 2Qijk (t) +Qij−1k (t)

(∆x2)2 +

+1

2

me +me+

meme+

(−1

2

(1

x31i

Qi+1jk (t)−Qi−1jk (t)

2∆x1+

1

x32j

Qij+1k (t)−Qij−1k (t)

2∆x2

))+

+1

2

me +me+

meme+

(5Qijk (t)

16

(1

x41i+

1

x42j

))+

+1

2

me +me+

meme+

((1

x41i+

1

x42j

)((1− µ2

k

) Qijk+1 (t)− 2Qijk (t) +Qijk−1 (t)

(∆µ)2

))+

+1

2

me +me+

meme+

((1

x41i+

1

x42j

)(2µk

Qijk+1 (t)−Qijk−1 (t)

2∆µ+ 2

(1 + µ2

k

1− µ2k

)Qijk (t)

))+

me+

(1

4x1ix2j

Qi+1j+1k (t)−Qi−1j+1k (t)−Qi+1j−1k (t) +Qi−1j−1k (t)

4∆x1∆x2

)+

23

Page 30: Dynamical Functional Particle Kristo er Karlsson533372/FULLTEXT01.pdf · Kristo er Karlsson Abstract 2012-06-12 Abstract The aim of this master thesis has been to solve the fully

Dynamical Functional ParticleMethod applied to the SchrödingerEquation - Exact solutions ofthree-body exotic ionsKristo�er Karlsson

3 Methodology2012-06-12

me+

(− 5

8x1ix22j

Qi+1jk (t)−Qi−1jk (t)

2∆x1− 5

8x21ix2j

Qij+1k (t)−Qij−1k (t)

2∆x2

)+

me+

(25Qijk (t)

16x21ix22j

)+

− ZeZe+

(1

x21i+

1

x22j

)Qijk (t)−

ZeZe√x41i + x42j − 2x21ix

22jµk

Qijk (t) (3.14)

The ground state energy of the system from the C-programme�three-body-gen.c�, both with and without the mass polarization term, wasdetermined in the same way as in Chapter 3.1 and 3.2.

24

Page 31: Dynamical Functional Particle Kristo er Karlsson533372/FULLTEXT01.pdf · Kristo er Karlsson Abstract 2012-06-12 Abstract The aim of this master thesis has been to solve the fully

Dynamical Functional ParticleMethod applied to the SchrödingerEquation - Exact solutions ofthree-body exotic ionsKristo�er Karlsson

4 Results2012-06-12

4 Results4.1 Helium atom

The results from the simulations on helium can be seen in Tables 4.1-4.4below. The continuum value of the energy was determined by Richardsonextrapolation, and the exponents pm in Eq. 3.7 used for the step sizes hnwere the natural numbers 1, 2, 3, ..., N − 1, where N is the number ofdetermined energies. The value of R is the �cut-o� distance�, which is thedistance from the origin where the outer boundary condition is placed. Forthe energies at h = 0 in the Tables 4.1-4.4 given from the Richardsonextrapolation, the numbers in the parentheses are uncertain numbers dueto the condition number of the matrix H with the step sizes.

Table 4.1: Energy of Helium in the ground state 1S with R = 9, where the lastvalue at h = 0 is the continuum value from the Richardson extrapolation andthe last value at h = 00 is the value from [4].

Step size, h Ground State Energy, E0 [a.u.]

1/6 -2.9352948251690381/7 -2.9261366222529961/8 -2.9210039365207111/9 -2.9177146711997001/10 -2.9154148648099501/11 -2.9137113052535431/12 -2.9123978985781761/13 -2.9113552815771301/14 -2.910508897382980

0 -2.903304(232846079)

00 -2.90330456

Table 4.2: Energy of Helium in the excited state 3S with R = 25, where thevalue at h = 0 is the continuum value from the Richardson extrapolation andthe last value at h = 00 is the value from [4].

Step size, h Excited State Energy, E1 [a.u.]1/6 -2.1931518521227381/7 -2.1871104774946801/8 -2.1838514489906591/9 -2.1818377102829201/10 -2.1804766853365121/11 -2.1794996253592331/12 -2.1787679530921501/13 -2.1782027815329701/14 -2.177755694887620

0 -2.174934(090844025)

00 -2.17493019

25

Page 32: Dynamical Functional Particle Kristo er Karlsson533372/FULLTEXT01.pdf · Kristo er Karlsson Abstract 2012-06-12 Abstract The aim of this master thesis has been to solve the fully

Dynamical Functional ParticleMethod applied to the SchrödingerEquation - Exact solutions ofthree-body exotic ionsKristo�er Karlsson

4 Results2012-06-12

Table 4.3: Energy of Helium in the ground state 1S with R = 9 and the masspolarization term equals zero, where the value at h = 0 is the continuum valuefrom the Richardson extrapolation and the last value at h = 00 is from [4].

Step size, h Ground State Energy, E0 [a.u.]1/6 -2.9357115489893921/7 -2.9265515024918641/8 -2.9214182203318581/9 -2.9181287878520501/10 -2.9158289732076961/11 -2.9141254655585101/12 -2.9128121321581801/13 -2.9117695938238601/14 -2.910923287004210

0 -2.90372(0104761482)

00 -2.90372438

Table 4.4: Energy of Helium in the excited state 3S with R = 25 and the masspolarization term equals zero, where the value at h = 0 is the continuum valuefrom the Richardson extrapolation and the last value at h = 00 is from [4].

Step size, h Excited State Energy, E1 [a.u.]1/6 -2.1934561109940481/7 -2.1874126305416891/8 -2.1841526126411771/9 -2.1821383311468951/10 -2.1807769716380921/11 -2.1797996872267401/12 -2.1790678549697301/13 -2.1785025642254101/14 -2.178055385853780

0 -2.17523(3665512710)

00 -2.17522938

In Figures 4.1 and 4.2, the wavefunction of helium for the ground state andthe �rst excited state respectively is plotted as a function of the distancesr1 and r2 with µ = 0

(ϑ = π

2

)and the step size h = 1/9. In Figure 4.3, the

wavefunction in the ground state with µ = 13/14 and the step sizeh = 1/14 is plotted for small values of r1 and r2.

26

Page 33: Dynamical Functional Particle Kristo er Karlsson533372/FULLTEXT01.pdf · Kristo er Karlsson Abstract 2012-06-12 Abstract The aim of this master thesis has been to solve the fully

Dynamical Functional ParticleMethod applied to the SchrödingerEquation - Exact solutions ofthree-body exotic ionsKristo�er Karlsson

4 Results2012-06-12

0

10

200 5 10 15 20 25

0

0.5

1

r2

Wave function, Q(r1,r

2,0), of He in Ground State (h=1/9)

r1

Q(r

1,r2,0

)

Figure 4.1: The wavefunction of helium, He, in the ground state when µ = 0 and

the step size h = 1/9.

05

1015

2025 0

10

20

−0.5

0

0.5

r2

Wave function, Q(r1,r

2,0), of He in Excited State (h=1/9)

r1

Q(r

1,r2,0

)

Figure 4.2: The wavefunction of helium, He, in the excited state when µ = 0 and

the step size h = 1/9.

27

Page 34: Dynamical Functional Particle Kristo er Karlsson533372/FULLTEXT01.pdf · Kristo er Karlsson Abstract 2012-06-12 Abstract The aim of this master thesis has been to solve the fully

Dynamical Functional ParticleMethod applied to the SchrödingerEquation - Exact solutions ofthree-body exotic ionsKristo�er Karlsson

4 Results2012-06-12

02

46

80 2 4 6 8

0

0.05

0.1

0.15

r2

Wave function of He in Ground State (h=1/14)

r1

Q(r

1,r2,(

13/1

4))

Figure 4.3: The wavefunction of helium, He, in the ground state zoomed in to the

origin, when µ = 13/14 and the step size h = 1/14.

4.2 Muon-based system

The results from the di�erent simulations with di�erent step sizes can beseen in Table 4.5. The exponents used in Richardson extrapolation wereboth natural numbers, odd numbers and even numbers to determine thecontinuum value. The �rst continuum value in Table 4.5 is from thenatural numbers, the second value from the odd numbers and the thirdvalue from the even numbers. The �cut-o� distance� used for themuon-based ion was smaller, because the mass of the muon is about 200times heavier and the radius of the orbiting muon is then smaller becausethe Bohr radius is inversely proportional to the mass of the orbitingparticle [3]. This means that the muon particle is close to the nucleus.

28

Page 35: Dynamical Functional Particle Kristo er Karlsson533372/FULLTEXT01.pdf · Kristo er Karlsson Abstract 2012-06-12 Abstract The aim of this master thesis has been to solve the fully

Dynamical Functional ParticleMethod applied to the SchrödingerEquation - Exact solutions ofthree-body exotic ionsKristo�er Karlsson

4 Results2012-06-12

Table 4.5: Ground State Energy of the muon-based system with R = 0.25,where the three values at h = 0 are the continuum values from the Richardsonextrapolation when using natural, even and odd exponents and the last valueat h = 00 is from [4].

Step size, h Energy, E0

1/24 -122.851127343801861/26 -115.772920600920881/28 -110.776785335796871/30 -107.322554343164411/32 -104.918328157685491/34 -103.220693799606651/36 -102.002153146689551/38 -101.112641567157241/40 -100.452411278490941/42 -99.954382584586161/44 -99.572833150584801/46 -99.276153772493831/48 -99.042180945590871/50 -98.855159466665131/52 -98.703741478679721/54 -98.579650817193351/56 -98.476779512601271/58 -98.390568635643601/60 -98.31757868328613

0 (natural exponents) -79.32(508814148264)0 (odd exponents) -97.51(918572007548)0 (even exponents) -97.57(021933368765)

00 -97.5669834

29

Page 36: Dynamical Functional Particle Kristo er Karlsson533372/FULLTEXT01.pdf · Kristo er Karlsson Abstract 2012-06-12 Abstract The aim of this master thesis has been to solve the fully

Dynamical Functional ParticleMethod applied to the SchrödingerEquation - Exact solutions ofthree-body exotic ionsKristo�er Karlsson

4 Results2012-06-12

4.3 Negative ion of Positronium

The results from the di�erent simulations with di�erent step sizes can beseen in Tables 4.6-4.7. The exponents used in Richardson extrapolation todetermine the continuum value of the energy were the natural numbers. Avalue from the literature is also given in the tables.

Table 4.6: Ground State Energy of the negative ion of Positronium with R =49, where the value at h = 0 is the continuum value from the Richardsonextrapolation and the value at h = 00 is a value from [11].

Step size, h Ground State Energy, E0 [a.u.]

1/6 -0.260167997011541/7 -0.259773172596891/8 -0.259506983139211/9 -0.259317766802771/10 -0.259177762805181/11 -0.259070838326351/12 -0.258987048359231/13 -0.258919969664851/14 -0.25886529252261

0 -0.258405(608969606)

00 -0.262

Table 4.7: Ground State Energy of the negative ion of Positronium with R = 49calculated without mass polarization, where the value at h = 0 is the contin-uum value from the Richardson extrapolation and the value at h = 00 is avalue from [11].

Step size, h Ground State Energy, E0 [a.u.]

1/6 -0.264546168342031/7 -0.264432951208721/8 -0.264352935147131/9 -0.264293002065461/10 -0.264246326800801/11 -0.264208919211381/12 -0.26417826244431

0 -0.263871(7787424099)

00 -0.262

In Figure 4.4, the wavefunction of the negative ion of Positronium isplotted as a function of r1 and r2 with µ = 0 and the step size h = 1/9.

30

Page 37: Dynamical Functional Particle Kristo er Karlsson533372/FULLTEXT01.pdf · Kristo er Karlsson Abstract 2012-06-12 Abstract The aim of this master thesis has been to solve the fully

Dynamical Functional ParticleMethod applied to the SchrödingerEquation - Exact solutions ofthree-body exotic ionsKristo�er Karlsson

4 Results2012-06-12

020

4060 0

2040

600

0.1

0.2

0.3

0.4

r2

Wave function, Q(r1,r

2,0), of Ps− in Ground State (h=1/9)

r1

Q(r

1,r2,0

)

Figure 4.4: The wavefunction of the negative ion of positronium, Ps−, in Ground

State when µ = 0 and the step size h = 1/9.

31

Page 38: Dynamical Functional Particle Kristo er Karlsson533372/FULLTEXT01.pdf · Kristo er Karlsson Abstract 2012-06-12 Abstract The aim of this master thesis has been to solve the fully

Dynamical Functional ParticleMethod applied to the SchrödingerEquation - Exact solutions ofthree-body exotic ionsKristo�er Karlsson

5 Conclusion and Discussion2012-06-12

5 Conclusion and DiscussionThe results of the energies obtained from the di�erent simulations wereconsistent with the results from the literature. However, the energiesobtained and determined here for the di�erent systems are often moreexact, because the fully correlated SE for three-particle systems has beenused and no assumptions and approximations has been made. The problemto determine the continuum value of the energy is the limited precisionduring calculations. When Matlab was used to determine the continuumvalue of the energy, the condition number of the matrix H created with thedi�erent step sizes was for helium in the order of ∼ 1012, which means thatthe matrix is sensitive and will not give more than 5-6 signi�cant �guresfor the determined energy. The reason that natural numbers was used asthe exponents was due to the uncertainties in the �nite di�erence formulas,because the �rst derivative has odd exponents in the truncated error series,the second derivative has even numbers and the mixed derivative has bothodd and even exponents. The wavefunction plotted in Figure 4.3 wasplotted to compare with the wavefunction in Figure 2.2 a) where the cusparises. The value of µ used in Figure 4.3 gives a value of approximately 20o

for the angle ϑ. A better value closer to µ = 1 had probably resulted in awavefunction that more resembled the wavefunction in Figure 2.2 a).

The exact value of the energy in the muon-based system is -97.56698 a.u.,and the determined value with natural numbers was about -79.3250 a.u..By assuming even exponents, a better value of -97.57 a.u. was obtained.The result while assuming odd exponents, -97.52 a.u., were close to theexact value, but the condition number was on the order of ∼ 1060. A largecondition number is often seen as smaller step sizes is used, which means ifthe energies are obtained with a better accuracy the matrix H becomesmore and more ill-conditioned. To obtain a better value while using naturalexponents, a better mathematical analysis has to be made by only use the�rst energy values or the 8 last energy values with di�erent exponents.

For the negative ion of positronium, the condition number of the matrixwas about the same as for helium, so the determined energy in this casehas a small uncertainty. The determined energies both with and withoutthe mass polarization term is close to the value given from Baklanov andDenisov [11], -0.262 a.u.. Probably their basis functions have di�cultiesdescribing the cusp and their assumption perhaps forces the wavefunctionto look in a certain way which a�ect the energy value. While using theparticle method, no assumptions are made which means that thedetermined energy, -0.258405 a.u., is probably more accurate and exact.

The precision, which is the number of signi�cant digits, was limited whenusing Matlab. A higher precision of the determined continuum energy hadbeen obtained if Multiple Precision (MP) had been used in thecalculations. Then the extrapolation had been improved, because MP canhandle a high condition number because the precision can be selected.About 25 signi�cant digits can then be represented in the resulting energy.Another way had been to use long double and a Linux machine or a QuadPrecision (QP) in a Sun workstation with a precision of about ∼ 36 digits,which results in about 30 signi�cant digits in the resulting energy from theextrapolation.

32

Page 39: Dynamical Functional Particle Kristo er Karlsson533372/FULLTEXT01.pdf · Kristo er Karlsson Abstract 2012-06-12 Abstract The aim of this master thesis has been to solve the fully

Dynamical Functional ParticleMethod applied to the SchrödingerEquation - Exact solutions ofthree-body exotic ionsKristo�er Karlsson

5 Conclusion and Discussion2012-06-12

The Dynamical Functional Particle Method (DFPM) is a very easy ande�ective iterative method to use. It is based on fundamental ideas inphysics, like potential, dissipation (damping), forces etc. and themathematically formulated dynamical system is the same as a physicalsystem [1]. Compared with some other numerical libraries, ARPACK andLAPACK, DFPM has been shown to be very e�ective due to theconvergence time. ARPACK and LAPACK have a time of convergence,tcon, of order O (N2), where N is total number of particles/discrete points[2]. DFPM has been tested, according to [7], which resulted in a time of

convergence of order O(N

32

)when having a dimension d = 2. In a general

case, when having a dimension d, i.e number of independent variables, andtotal number of particles N , the step size h can be written as h = L

N 1d

,where L is the length of the grid in the dimensions. This leads to that aincreasing dimension gives that the step sizes increase. The complexity, i.e.number of iterations or time to convergence, can be shown to have amaximum time step, ∆tmax, proportional to the step size h. This leads tothe computational step size O

(N

d+1d

). It has been shown in [2] that the

di�erence in time between DFPM and LAPACK/ARPACK was some10-100 times faster. An increase of the dimension results in that thecomplexity will eventually converge to O (N) when the dimension divergesto in�nity. But to achieve the same accuracy when increasing thedimension, the number of particles has to be of order Nd, where N is oforder 100. Unfortunately, the curse of dimensionality is hard to beat. Ifthe dimension increases from 3 to 4 and 100 particles are used for eachcoordinate axis, the time to convergence will be 10 times slower.

The biggest system that has been treated with exact calculations is asystem with �ve electrons, Boron, according to Ruiz [13]. Bigger systemswill be very tough to compute, so the way of decreasing the convergencetime is then to increase the time step of DFPM. A linear stability analysisof the expression of DFPM in Eq. 2.18 leads to that the maximum timestep for a stable symplectic algorithm is ∆tmax = O (h). A possibility todevelop a DFPM with a higher order p of the di�erential equation withrespect to time gives the maximum time step of order O

(h

2p

)instead. A

higher value of p could then result in faster convergence. An example is tohave p = 4, which could lead to a method with computational complexityO(√

N).

33

Page 40: Dynamical Functional Particle Kristo er Karlsson533372/FULLTEXT01.pdf · Kristo er Karlsson Abstract 2012-06-12 Abstract The aim of this master thesis has been to solve the fully

Dynamical Functional ParticleMethod applied to the SchrödingerEquation - Exact solutions ofthree-body exotic ionsKristo�er Karlsson

References2012-06-12

References

[1] S. Edvardsson, D. Åberg, P. Uddholm, �A programme for accuratesolutions of two-electron atoms�, Computer Physics Communication, vol.165, no. 3, 2004, p. 260-270.

[2] H. Nakashima, H. Nakatsuji, �Solving the electron-nuclear Schrödingerequation of helium atom and its isoelectronic ions with the freeiterative-complement-interaction method�, J. Chem. Phys., vol. 128, no.15, 2008, p. 154107-1 - 154107-7.

[3] C. Nordling, J. Österman, Physics Handbook for Science andEngineering . Edition 8:3. Poland: Studentlitteratur., 2007

[4] L.U. Ancarani, K.V. Rodriguez, G. Gasaneo, �Correlated n1,3S Statesfor Coulomb Three-Body Systems�, International Journal of QuantumChemistry , vol. 111, no. 15, 2011, p. 4255-4265.

[5] University College Cork, �Kato Cusp Condition�,http://compphys.ucc.ie/est/thesis/node49.htmlRetreived: 2012-04-18

[6] S. Edvardsson, M. Gulliksson, J. Persson, �The Dynamical FunctionalParticle Method: an approach for boundary value problems�, J. Appl.Mech., vol. 79, no. 2, 2012, p. 12-21.

[7] S. Edvardsson, M. Gulliksson, A. Lind, �The Dynamical FunctionalParticle Method�, (to be published)

[8] D. Kleppner, R.J. Kolenkow, An introduction to mechanics,International student edition, McGraw-Hill Book Co., 1978

[9] C.W. David, �The Hamiltonian and Schrödinger Equation for Helium'sElectrons (Hylleraas)�, Chemistry Education Materials , Paper 8, 2006, 10pages.

[10] University of British Columbia, �Richardson Extrapolation�,http://www.math.ubc.ca/~israel/m215/rich/rich.htmlRetreived: 2012-03-10

[11] E.V. Baklanov, A.V. Denisov, �High-Precision Calculations ofLow-Lying Energy Levels in Three-Body Coulomb Systems�, LaserPhysics , vol. 10, no. 1, 2000, p. 397-402.

[12] University of Virginia, �Identical particles: Symmertry and Scattering�,http://galileo.phys.virginia.edu/classes/752.mf1i.spring03/IdenticalParticlesRevisited.htmRetreived: 2012-05-16

[13] M.B. Ruiz, �Hylleraas Method for Many-Electron Atoms. I. TheHamiltonian�, International Journal of Quantum Chemistry , vol. 101, no.3, 2004, p. 246-260.

34

Page 41: Dynamical Functional Particle Kristo er Karlsson533372/FULLTEXT01.pdf · Kristo er Karlsson Abstract 2012-06-12 Abstract The aim of this master thesis has been to solve the fully

Dynamical Functional ParticleMethod applied to the SchrödingerEquation - Exact solutions ofthree-body exotic ionsKristo�er Karlsson

Appendix A: Hamiltonian in(r1, r2, µ)

2012-06-12

Appendix A: Hamiltonian in (r1, r2, µ)

The Hamiltonian of a three-particle system contains of the operators ∇21

and ∇22 , where 1 and 2 cooresponds to particle 1 and 2 (the orbiting

particles), in the kinetic energy operator. The operators can, in Cartesiancoordinates, be expressed as{

∇21 = ∂2

∂x21+ ∂2

∂y21+ ∂2

∂z21

∇22 = ∂2

∂x22+ ∂2

∂y22+ ∂2

∂z22

(5.1)

To obtain the operators in terms of (r1, r2, µ), the following expressionsfrom the vector analysis can be used:

r1 =√x21 + y21 + z21

r2 =√x22 + y22 + z22

µ = x1x2+y1y2+z1z2r1r2

= x1x2+y1y2+z1z2√(x2

1+y21+z

21)(x2

2+y22+z

22)

(5.2)

According to David [9] by using the chain rule, the �rst derivativeoperators ∂

∂x1, ∂∂y1, ∂∂z1, ∂∂x2, ∂∂y2, ∂∂z2

can be expressed as

∂∂x1

= ∂r1∂x1

∂∂r1

+ ∂r2∂x1

∂∂r2

+ ∂µ∂x1

∂∂µ

∂∂y1

= ∂r1∂y1

∂∂r1

+ ∂r2∂y1

∂∂r2

+ ∂µ∂y1

∂∂µ

∂∂z1

= ∂r1∂z1

∂∂r1

+ ∂r2∂z1

∂∂r2

+ ∂µ∂z1

∂∂µ

∂∂x2

= ∂r1∂x2

∂∂r1

+ ∂r2∂x2

∂∂r2

+ ∂µ∂x2

∂∂µ

∂∂y2

= ∂r1∂y2

∂∂r1

+ ∂r2∂y2

∂∂r2

+ ∂µ∂y2

∂∂µ

∂∂z2

= ∂r1∂z2

∂∂r1

+ ∂r2∂z2

∂∂r2

+ ∂µ∂z2

∂∂µ

(5.3)

and this gives from Eq. 5.1-5.2 that the second derivative operators∂2

∂x21, ∂

2

∂y21, ∂

2

∂z21, ∂2

∂x22, ∂

2

∂y22, ∂

2

∂z22can be expressed as

∂2

∂x21= x1

r1∂∂r1

(x1

r1∂∂r1

+(x2

r1r2− µx1

r21

)∂∂µ

)+

+(x2

r1r2− µx1

r21

)∂∂µ

(x1

r1∂∂r1

+(x2

r1r2− µx1

r21

)∂∂µ

)∂2

∂y21= y1

r1∂∂r1

(y1r1

∂∂r1

+(

y2r1r2

− µy1r21

)∂∂µ

)+

+(

y2r1r2

− µy1r21

)∂∂µ

(y1r1

∂∂r1

+(

y2r1r2

− µy1r21

)∂∂µ

)∂2

∂z21= z1

r1∂∂r1

(z1r1

∂∂r1

+(

z2r1r2

− µz1r21

)∂∂µ

)+

+(

z2r1r2

− µz1r21

)∂∂µ

(z1r1

∂∂r1

+(

z2r1r2

− µz1r21

)∂∂µ

)∂2

∂x22= x2

r2∂∂r2

(x2

r2∂∂r2

+(x1

r1r2− µx2

r21

)∂∂µ

)+

+(x1

r1r2− µx2

r21

)∂∂µ

(x2

r2∂∂r2

+(x1

r1r2− µx2

r21

)∂∂µ

)∂2

∂y22= y2

r2∂∂r2

(y2r2

∂∂r2

+(

y1r1r2

− µy2r21

)∂∂µ

)+

+(

y1r1r2

− µy2r21

)∂∂µ

(y2r2

∂∂r2

+(

y1r1r2

− µy2r21

)∂∂µ

)∂2

∂z22= z2

r2∂∂r2

(z2r2

∂∂r2

+(

z1r1r2

− µz2r21

)∂∂µ

)+

+(

z1r1r2

− µz2r21

)∂∂µ

(z2r2

∂∂r2

+(

z1r1r2

− µz2r21

)∂∂µ

)

(5.4)

By developing the expressions i Eq. 5.4, add all the terms and use theexpressions in Eq. 5.1, the kinetic energy operator, ∇2

1 +∇22, can be

expressed as

∇21 +∇2

2 =∂2

∂r21+

∂2

∂r22+ 2

(1

r1

∂r1+

1

r2

∂r2

)+

35

Page 42: Dynamical Functional Particle Kristo er Karlsson533372/FULLTEXT01.pdf · Kristo er Karlsson Abstract 2012-06-12 Abstract The aim of this master thesis has been to solve the fully

Dynamical Functional ParticleMethod applied to the SchrödingerEquation - Exact solutions ofthree-body exotic ionsKristo�er Karlsson

Appendix A: Hamiltonian in(r1, r2, µ)

2012-06-12

+

(1

r21+

1

r22

)((1− µ2

) ∂2

∂µ2− 2µ

∂µ

)(5.5)

For the mass polarization operator, ∇1 · ∇2, Nakashima and Nakatsuji [2]expressed the mass polarization Hamiltonian, Hmass−pol, in terms of{s, t, u} coordinates as

Hmass−pol = − 1

mN

s2 + t2 − 2u2

s2 − t2

(∂2

∂s2− ∂2

∂t2

)(5.6)

where mN corresponds to the nuclear particle m3 and the coordinates{s, t, u} are given by

s = r1 + r2

t = r1 − r2

u = r12 =√r21 + r22 − 2r1r2µ

(5.7)

By combining the expressions in Eq. 5.7, the {r1, r2} coordinates can interms of {s, t} be expressed as{

r1 = 12 (s+ t)

r2 = 12 (s− t)

(5.8)

and used to determine the operators ∂2

∂s2and ∂2

∂t2. By using the chain rule

and the expressions of r1 and r2 in Eq. 5.8, the �rst derivatives ∂∂s

and ∂∂t

can be expressed as∂∂s = ∂r1

∂s∂∂r1

+ ∂r2∂s

∂∂r2

= 12

(∂∂r1

+ ∂∂r2

)∂∂t =

∂r1∂t

∂∂r1

+ ∂r2∂t

∂∂r2

= 12

(∂∂r1

− ∂∂r2

) (5.9)

The second derivatives can then from Eq. 5.7-5.8 be expressed as∂2

∂s2 = ∂r1∂s

∂∂r1

(∂∂s

)+ ∂r2

∂s∂∂r2

(∂∂s

)= 1

4

(∂2

∂r21+ 2 ∂2

∂r1∂r2+ ∂2

∂r22

)∂2

∂t2 = ∂r1∂t

∂∂r1

(∂∂t

)+ ∂r2

∂t∂∂r2

(∂∂t

)= 1

4

(∂2

∂r21− 2 ∂2

∂r1∂r2+ ∂2

∂r22

) (5.10)

which gives by using Eq. 5.7 and 5.10 in Eq. 5.6 that the mass polarizationHamiltonian, Hmass−pol, can be expressed as

Hmass−pol = − µ

mN

∂2

∂r1∂r2(5.11)

The Hamiltonian, H, of a full correlated three-particle system for S-statescan then be expressed as (consider that m1 = m2 = m12 andZ1 = Z2 = Z12, for example two electrons)

H = −1

2

m12 +m3

m12m3

(∂2

∂r21+

∂2

∂r22+ 2

(1

r1

∂r1+

1

r2

∂r2

))+

−1

2

m12 +m3

m12m3

(1

r21+

1

r22

)((1− µ2

) ∂2

∂µ2− 2µ

∂µ

)+

− µ

mN

∂2

∂r1∂r2+ Z12Z3

(1

r1+

1

r2

)+

Z12Z12√r21 + r22 − 2r1r2µ

(5.12)

36

Page 43: Dynamical Functional Particle Kristo er Karlsson533372/FULLTEXT01.pdf · Kristo er Karlsson Abstract 2012-06-12 Abstract The aim of this master thesis has been to solve the fully

Dynamical Functional ParticleMethod applied to the SchrödingerEquation - Exact solutions ofthree-body exotic ionsKristo�er Karlsson

Appendix B: Rewriting of theSE

2012-06-12

Appendix B: Rewriting of the SE

The Hamiltonian, H, in Eq. 5.12 in Appendix B consists of �rst andsecond derivatives and a mixed derivative with respect to r1, r2, µ. The �rstderivatives can with the substitution Q = r1r2 (1− µ2)ψ be expressed as

∂ψ∂r1

= ∂∂r1

(Q

r1r2(1−µ2)

)= 1

r2(1−µ2)∂∂r1

(Qr1

)∂ψ∂r2

= ∂∂r2

(Q

r1r2(1−µ2)

)= 1

r1(1−µ2)∂∂r2

(Qr2

)∂ψ∂µ = ∂

∂µ

(Q

r1r2(1−µ2)

)= 1

r1r2∂∂µ

(Q

1−µ2

) (5.13)

The quotient rule gives that the derivatives in Eq. 5.13 can be expressed as

∂ψ∂r1

= 1r2(1−µ2)

(∂Q∂r1

r1− Q

r21

)∂ψ∂r2

= 1r1(1−µ2)

(∂Q∂r2

r2− Q

r22

)∂ψ∂µ = 1

r1r2

(∂Q∂µ

1−µ2 + 2µQ(1−µ2)2

) (5.14)

By using the quotient rule again for the �rst derivatives in Eq. 5.14, thesecond derivatives can then be expressed as

∂2ψ∂r21

= 1r2(1−µ2)

(∂2Q

∂r21

r1− 2

∂Q∂r1

r21+ 2Q

r31

)∂2ψ∂r22

= 1r1(1−µ2)

(∂2Q

∂r22

r2− 2

∂Q∂r2

r22+ 2Q

r32

)∂2ψ∂µ2 = 1

r1r2

(∂2Q

∂µ2

1−µ2 +2µ ∂Q

∂µ

(1−µ2)2+

2µ ∂Q∂µ

(1−µ2)2+ 2µQ

(1−µ2)2+ 8µ2Q

(1−µ2)3

) (5.15)

The mixed derivative in the mass polarization term can be determined byusing the �rst derivatives with respect to r2 in Eq. 5.14 and then take thederivative with respect to r1 of that, which gives

∂2ψ

∂r1∂r2=

∂r1

(1

r1 (1− µ2)

(∂Q∂r2

r2− Q

r22

))=

=1

1− µ2

(∂2Q∂r1∂r2

r1r2−

∂Q∂r1

r1r22−

∂Q∂r2

r21r2+

Q

r21r22

)(5.16)

The new Schrödinger Equation HQ = EQ can then be determined byusing the expression of the Hamitonian in Eq. 5.12 in Appendix A and theexpressions above. After that, the whole expression is multiplied withr1r2 (1− µ2), because of Eψ = E

(Q

r1r2(1−µ2)

)in the right hand side of the

original SE.

37

Page 44: Dynamical Functional Particle Kristo er Karlsson533372/FULLTEXT01.pdf · Kristo er Karlsson Abstract 2012-06-12 Abstract The aim of this master thesis has been to solve the fully

Dynamical Functional ParticleMethod applied to the SchrödingerEquation - Exact solutions ofthree-body exotic ionsKristo�er Karlsson

Appendix C: Transformationof the SE2012-06-12

Appendix C: Transformation of theSE

Transformation of the Schrödinger Equation with the substitution of thewavefunction Q (r1, r2, µ) to Q (x1, x2, µ)

(2 4√r1r2

)−1, where x21 = r1 and

x22 = r2, gives that the �rst derivatives can be expressed as

∂Q(r1,r2,µ)∂r1

= ∂∂r1

(Q(x1,x2,µ)

2r141 r

142

)= 1

2r142

∂∂r1

(Q(x1,x2,µ)

r141

)∂Q(r1,r2,µ)

∂r2= ∂

∂r2

(Q(x1,x2,µ)

2r141 r

142

)= 1

2r141

∂∂r2

(Q(x1,x2,µ)

r142

)∂Q(r1,r2,µ)

∂µ = ∂∂µ

(Q(x1,x2,µ)

2r141 r

142

)= 1

2r142 r

141

∂Q(x1,x2,µ)∂µ

(5.17)

The quotient rule gives the �rst derivatives in Eq. 5.17 as

∂Q(r1,r2,µ)∂r1

= 1

2r142

(∂Q(x1,x2,µ)

∂r1

r141

− Q(x1,x2,µ)

4r541

)∂Q(r1,r2,µ)

∂r2= 1

2r141

(∂Q(x1,x2,µ)

∂r2

r142

− Q(x1,x2,µ)

4r542

)∂Q(r1,r2,µ)

∂µ = 1

2r142 r

141

∂Q(x1,x2,µ)∂µ

(5.18)

The quotient rule for the �rst derivatives in Eq. 5.18 gives that the secondderivatives can be expressed as

∂2Q(r1,r2,µ)∂r21

= 1

2r142

(∂2Q(x1,x2,µ)

∂r21

r141

−∂Q(x1,x2,µ)

∂r1

2r541

+ 5Q(x1,x2,µ)

16r941

)∂2Q(r1,r2,µ)

∂r22= 1

2r141

(∂2Q(x1,x2,µ)

∂r22

r142

−∂Q(x1,x2,µ)

∂r2

2r542

+ 5Q(x1,x2,µ)

16r942

)∂2Q(r1,r2,µ)

∂µ2 = 1

2r142 r

141

∂2Q(x1,x2,µ)∂µ2

(5.19)

From Eq. 5.18, the mixed derivative can be expressed as

∂2Q (r1, r2, µ)

∂r1∂r2=

∂2Q(x1,x2,µ)∂r1∂r2

2r141 r

142

−∂Q(x1,x2,µ)

∂r1

8r141 r

542

−∂Q(x1,x2,µ)

∂r2

8r541 r

142

+Q (x1, x2, µ)

32r541 r

542

(5.20)

By using the chain rule, the �rst derivatives ∂Q(x1,x2,µ)∂r1

, ∂Q(x1,x2,µ)∂r2

and∂Q(x1,x2,µ)

∂µcan be expressed as

∂Q(x1,x2,µ)∂r1

= ∂x1

∂r1

∂Q(x1,x2,µ)∂x1

+ ∂x2

∂r1

∂Q(x1,x2,µ)∂x2

+ ∂µ∂r1

∂Q(x1,x2,µ)∂µ

∂Q(x1,x2,µ)∂r2

= ∂x1

∂r2

∂Q(x1,x2,µ)∂x1

+ ∂x2

∂r2

∂Q(x1,x2,µ)∂x2

+ ∂µ∂r2

∂Q(x1,x2,µ)∂µ

∂Q(x1,x2,µ)∂µ = ∂x1

∂µ∂Q(x1,x2,µ)

∂x1+ ∂x2

∂µ∂Q(x1,x2,µ)

∂x2+ ∂µ

∂µ∂Q(x1,x2,µ)

∂µ

(5.21)

where ∂x2∂r1

= ∂µ∂r1

= ∂x1∂r2

= ∂µ∂r2

= ∂x1∂µ

= ∂x2∂µ

= 0, ∂x1∂r1

= 12√r1

= 12x1

and∂x2∂r2

= 12√r2

= 12x2

from Eq. 5.21, which results in that the second derivativeswith respect to r1 and r2 and the mixed derivative can be expressed as

∂2Q (x1, x2, µ)

∂r21=∂x1∂r1

∂x1

(1

2x1

∂Q (x1, x2, µ)

∂x1

)=

=1

2x1

(1

2x1

∂2Q (x1, x2, µ)

∂x21− 1

2x21

∂Q (x1, x2, µ)

∂x1

)=

38

Page 45: Dynamical Functional Particle Kristo er Karlsson533372/FULLTEXT01.pdf · Kristo er Karlsson Abstract 2012-06-12 Abstract The aim of this master thesis has been to solve the fully

Dynamical Functional ParticleMethod applied to the SchrödingerEquation - Exact solutions ofthree-body exotic ionsKristo�er Karlsson

Appendix C: Transformationof the SE2012-06-12

=1

4r1

∂2Q (x1, x2, µ)

∂x21− 1

4√r31

∂Q (x1, x2, µ)

∂x1(5.22)

∂2Q (x1, x2, µ)

∂r22=∂x2∂r2

∂x2

(1

2x2

∂Q (x1, x2, µ)

∂x2

)=

=1

2x2

(1

2x2

∂2Q (x1, x2, µ)

∂x22− 1

2x22

∂Q (x1, x2, µ)

∂x2

)=

=1

4r2

∂2Q (x1, x2, µ)

∂x22− 1

4√r32

∂Q (x1, x2, µ)

∂x2(5.23)

∂2Q (x1, x2, µ)

∂r1∂r2=∂x1∂r1

∂x1

(1

2x2

∂Q (x1, x2, µ)

∂x2

)=

1

4√r1r2

∂2Q (x1, x2, µ)

∂x1∂x2(5.24)

By combining the expressions in Appendix B and Appendix C with theoriginal SE, the SE HQ (x1, x2, µ) = EQ (x1, x2, µ) can be determined.

39

Page 46: Dynamical Functional Particle Kristo er Karlsson533372/FULLTEXT01.pdf · Kristo er Karlsson Abstract 2012-06-12 Abstract The aim of this master thesis has been to solve the fully

Dynamical Functional ParticleMethod applied to the SchrödingerEquation - Exact solutions ofthree-body exotic ionsKristo�er Karlsson

Appendix D: The programmecodes

2012-06-12

Appendix D: The programme codes

Richardson Extrapolationclear

format long e

Eh = load('<name>.txt'); %Loading the values of the energy and the step sizes in

a matrix

E = Eh2(:,2); %The energy values collected in a array

h = Eh2(:,1); %The values of the step sizes collected in a array

H = sparse(1,1:length(h)-1,zeros(1,length(h)-1),length(h),length(h)-1); %A matrix

that will collect the differences of the step sizes

for i=1:length(h)

p = 1:length(h)-1; %Exponents that are natural numbers

%p = 1:2:2*(length(h)-1)-1; %Exponents that are odd numbers

%p = 2:2:2*(length(h)-1); %Exponents that are even numbers

H_iJ = sparse(i,1:(length(h)-1),h(i).^p,length(h),length(h)-1); %Placing the

values of the step sizes with different exponents in a matrix

H = H+H_iJ; %The matrix H collect the values

i = i+1;

end

d_E = diff(E); %Take the different between two adjacent values

d_H = -diff(H); %Take the difference between two values with the same exponent

cond_d_H = condest(d_H); %Determine the condition number of the matrix with step

sizes, to see if the solution is well accurate

c = d_H\d_E; %Determine the values of the constants

E_e = E(1)+H(1,:)*c; %Determine the continuum value

Plot of the wave functionclear

format long e

x1x2z = load('<name>.txt'); %The values are loaded from a text file to a matrix

zz = x1x2z(:,3); %The values of the wave function Q

my = x1x2z(1,4); %The constant value of my

h = x1x2z(1,5); %The value of the step size

R_sqrt = x1x2z(1,6); %The cut-off distance where the outer boundary is placed

x1 = 0:h:R_sqrt; %The values of x1 in a vector

x2 = x1;

z = reshape(zz,max(size(x1)),max(size(x2))); %The values of Q for different

values of x1 and x2

r1 = x1.*x1; %Transformation of the grid in x1

r2 = r1;

figure colormap(hsv);

surf(r1,r2,z); %Plot of the wave function

Three-particle systems

40

Page 47: Dynamical Functional Particle Kristo er Karlsson533372/FULLTEXT01.pdf · Kristo er Karlsson Abstract 2012-06-12 Abstract The aim of this master thesis has been to solve the fully

Dynamical Functional ParticleMethod applied to the SchrödingerEquation - Exact solutions ofthree-body exotic ionsKristo�er Karlsson

Appendix D: The programmecodes

2012-06-12

The C-programme �three-body-gen.c� below is a general programme fordi�erent three-particle systems. The variables that change for di�erentsystems are the masses of the nucleus and the orbiting particles and thecharges of the di�erent particles.

/* Using the DFPM for s o l v i n g the Schrödinger Equation o f three−p a r t i c l e systems and determine the energy

z [ i ] [ j ] [ k ] corresponds to the wave func t i on Q[ i ] [ j ] [ k ]=r1* r2*(1−my*my)

For the e x c i t e d s t a t e , use the "symmetry" in the func t i on "norm(vo id )" in the end o f the programme

Run the programme by w r i t t i n g " compile_tbg " and then wr i t e "th r ee 1"

The r e s u l t s o f the ene r g i e s w i l l be c o l l e c t e d in a t e x t f i l e ("fopen ") , so change the name o f the t e x t f i l e f o r everys imu la t i on

*/

#include <s td i o . h>#include <s t r i n g . h>#include <f loat . h>#include <s t d l i b . h>#include <math . h>#include <time . h>

// g2 s t u f f#include "g2 . h"#include "g2_X11 . h"

double red_mass_inv = 1.000137093355571 ;// hel ium : 1.000137093355571 (1 .0 f o r an i n f i n i t y heavy mass o f

the nuc leus . Change the "mass_pol ( ) " func t i on to " re turn (0 . 0 )then to )

//muon : 0.005380927461587;//Ps−: 2 .0

double M_nucl = 7294 .2995365 ;// hel ium : 7294.2995365 ( proton 1836.1515 , neutron 1838.6837)//muon : 1836.1515 ( proton )//Ps−: 1 .0 ( po s i t r on )

double Z_nucl = 2 . 0 ;// hel ium : 2.0//muon : 1 .0//Ps−: 1 .0

double Z_orb = −1.0; // the same fo r a l l// hel ium : −1.0//muon : −1.0//Ps−: −1.0

double bdamp = 1 . 3 ; //Ps−: 1 .5 , He_ground : 1 .3 , He_excited :1 .0 , Muon: 0.63

41

Page 48: Dynamical Functional Particle Kristo er Karlsson533372/FULLTEXT01.pdf · Kristo er Karlsson Abstract 2012-06-12 Abstract The aim of this master thesis has been to solve the fully

Dynamical Functional ParticleMethod applied to the SchrödingerEquation - Exact solutions ofthree-body exotic ionsKristo�er Karlsson

Appendix D: The programmecodes

2012-06-12

double R = 4 . 0 ;// s q r t (R) shou ld be i n t e g e r o the rw i s e yo may ge t var ious R when

changing h=2/(N−1) For muon , use R = 0.25

#define sim_end 10000.0int N, N3 ; // number o f p a r t i c l e s f o r x1 , x2 (N) and my (N3)double h , h2 , h2inv , hinv , hmy, hmyinv , hmy2 , hmy2inv ;#define ARRAY 300 //max . number o f nodes#define ARRAY2 201#define every_step 200

//Functions used in t h i s programmeint round2 (double number ) ;void i n i t (void ) ;void norm(void ) ;void move_part ic les (void ) ;void calc_E_L(void ) ;void p lo t_i t ( ) ;double deriv_my ( int i , int j , int k ) ;double sderiv_x1x2 ( int i , int j , int k ) ;double mass_pol ( int i , int j , int k ) ;

double e ig , e ig_old ; //The determine energydouble sum_func ;double Accz ;

double x [ARRAY] , my[ARRAY2] , z [ARRAY] [ARRAY] [ARRAY2] ;double r_inv [ARRAY] , rsq_inv [ARRAY] , r_inv_root [ARRAY] ,

r_inverse [ARRAY] ;double vz [ARRAY] [ARRAY] [ARRAY2] ;double Etot ;double zz [ARRAY] [ARRAY] [ARRAY2] ;

double r12_inv [ARRAY] [ARRAY] [ARRAY2] , r1r2 [ARRAY] [ARRAY] ;double r1r2_norm [ARRAY] [ARRAY] , my_func [ARRAY2] , r1r2_inv [ARRAY

] [ARRAY] ;

double DT;double h_size = 3 9 . 0 ; // I n i t i a l va lue , w i l l i n c rea se anddouble h_size_eig = 41 . 0 ; // the l a s t va lue f o r c o l l e c t energy

and s t ep s i z e sdouble h_size_f = 41 . 0 ; // choosen va lue f o r p l o t t i n g the wave

func t i on ( in the range [ h_size , h_size_eig ]

int my_0 = 20 ; //A term fo r making my=0, which means t ha t theang l e t h e t a =0.5* p i rad . Take the va lue ( h_size_f −1.0) *0.5 andwr i t e i t as an i n t e g e r

int s tep = −1;double pow_x ;double tot_time = 0 . 0 ;

double Ttot ;

double s c a l e 1 ;int rWin1 ;

42

Page 49: Dynamical Functional Particle Kristo er Karlsson533372/FULLTEXT01.pdf · Kristo er Karlsson Abstract 2012-06-12 Abstract The aim of this master thesis has been to solve the fully

Dynamical Functional ParticleMethod applied to the SchrödingerEquation - Exact solutions ofthree-body exotic ionsKristo�er Karlsson

Appendix D: The programmecodes

2012-06-12

int main ( int argc , char ** argv ){int i , j ;int i1 , i2 , i 3 ;double year = 0 . 0 ;FILE *pek ;

i f ( argc != 2){p r i n t f ( "Format : P lease prov ide the i n t e g e r x . \n" ) ;e x i t (0 ) ;

}

pow_x = (double ) a t o i ( argv [ 1 ] ) ;

i n i t ( ) ;

//Making the window with the p l o t t e d wavefunct ion

rWin1 = g2_open_X11(600 , 600) ;

s c a l e 1 = (double ) 5 0 . 0 ;g2_set_coordinate_system ( rWin1 , 300 .0 , 300 .0 , 300 .0/ sca l e1 ,

300 .0/ s c a l e 1 ) ;g2_set_background ( rWin1 , 1) ;g2_set_auto_flush ( rWin1 , 0) ;

do{step++;tot_time = tot_time+DT;

//The wave func t ions i s p l o t t e d i f t h i s cond i t i on i s f u l f i l e di f ( s tep%every_step==0){p lo t_i t ( ) ;

}

move_part ic les ( ) ;

e ig_old = e i g ; //The va lue from the prev ious time s t ep i sde f ined to observe how the energy change

norm ( ) ;

calc_E_L ( ) ;

// i f ( s t ep%every_step==0)i f ( tot_time>year +1.0){p r i n t f ( "Ek = %l f \n" , Etot ) ;p r i n t f ( "At time = %d TimeStep = %l f \n" , ( int ) ( tot_time ) ,DT

) ;p r i n t f ( "Step s i z e , h : %l f 1 .15\n" ,h) ;p r i n t f ( "N_var = %1.0 l f R = %1.1 l f my_0 = %d my[my_0] =

43

Page 50: Dynamical Functional Particle Kristo er Karlsson533372/FULLTEXT01.pdf · Kristo er Karlsson Abstract 2012-06-12 Abstract The aim of this master thesis has been to solve the fully

Dynamical Functional ParticleMethod applied to the SchrödingerEquation - Exact solutions ofthree-body exotic ionsKristo�er Karlsson

Appendix D: The programmecodes

2012-06-12

%1.3 l f \n\n" , (2/h)+1,R,my_0,my[my_0] ) ;p r i n t f ( "Energy = %5.16 l f \n\n" , e i g ) ;p r i n t f ( " de l t a e i g = %5.16 l f r e l . d e l t a e i g = %5.16 l f \n" ,

f abs ( e ig−eig_old ) , f abs ( ( e ig−eig_old ) / eig_old ) ) ;p r i n t f ( " sum_Functional = %1.16 l f \n\n" , s q r t ( sum_func ) /(N*N

*N3) ) ;

year = year +1.0 ;}

// I f the f o l l ow i n g be low i s f u l f i l e d , the system hasconverged to the as symto t i c va lue :

i f ( ( s q r t ( sum_func ) /(N*N*N3) ) <1.0e−12 && fabs ( ( e ig−eig_old ) /eig_old ) <1.0e−13 && h_size == h_size_f )

{i f ( ( pek=fopen ( "He_plot_appcusp20_4 . txt " , "a" ) )==NULL){puts ( "Error in He_plot_appcusp20_4 . txt " ) ; e x i t (0 ) ;

}for ( i 1 =0; i1<N; i 1++)

for ( i 2 =0; i2<N; i 2++) //The f o l l ow i n g i s c o l l e c t e d :{f p r i n t f ( pek , "%5.16 l f %5.16 l f %5.16 l f %5.16 l f %5.16 l f

%5.16 l f %5.16 l f \n" , x [ i 1 ] , x [ i 2 ] , z [ i 1 ] [ i 2 ] [ N3−2] ,my[N3−2] ,h , s q r t (R) , e i g ) ;

} // change my_0 aga in s t N3−1 f o r determine the wavefunc t i on when the e l e c t r o n s are at the same p lace

f c l o s e ( pek ) ;}

i f ( ( s q r t ( sum_func ) /(N*N*N3) ) <1.0e−12 && fabs ( ( e ig−eig_old ) /eig_old ) <1.0e−13)

{i f ( ( pek=fopen ( "Ps−_h_eig32 . txt " , "a" ) )==NULL){puts ( "Error in Ps−_h_eig32 . txt " ) ;e x i t (0 ) ;

}

f p r i n t f ( pek , "%5.14 l f %5.14 l f \n" , e ig , h ) ; //The energy andthe s t ep s i z e i s c o l l e c t e d in a t e x t f i l wi th twocolumns

f c l o s e ( pek ) ;

i n i t ( ) ; //The programme runs again wi th a new va lue o f thes t ep s i z e

tot_time = 0 . 0 ;s tep = −1;sum_func = 1000 . 0 ;year = 0 . 0 ;

}

44

Page 51: Dynamical Functional Particle Kristo er Karlsson533372/FULLTEXT01.pdf · Kristo er Karlsson Abstract 2012-06-12 Abstract The aim of this master thesis has been to solve the fully

Dynamical Functional ParticleMethod applied to the SchrödingerEquation - Exact solutions ofthree-body exotic ionsKristo�er Karlsson

Appendix D: The programmecodes

2012-06-12

} while ( tot_time<sim_end ) ;

p r i n t f ( "\n\nGround s t a t e energy end = %5.15 l f \n" , e i g ) ; //Theva lue o f the energy when the s imu la t i on i s f i n i s h e d

getchar ( ) ;

g2_close ( rWin1 ) ;

}

void p lo t_i t ( ){int i ;double zoom = 5 . 0 ;

g2_pen ( rWin1 , 1 ) ;g2_f i l l ed_re c tang l e ( rWin1 , −15, −15, 15 , 15) ;

g2_pen ( rWin1 , 2 5 ) ;

for ( i =0; i<N; i++){g 2_ f i l l e d_c i r c l e ( rWin1 , x [ i ]* x [ i ]−0.125 , zoom*z [ i ] [ i ] [ N3

−2] ,0 .005* s c a l e 1 ) ;}

g2_flush ( rWin1 ) ;

// i f ( s t ep==0) ge t char ( ) ; // i f you want to see the i n i t i a lwave funct ion and then cont inue

// us l e ep (200000) ;// u s l e ep (20000) ;

}

void calc_E_L(void ) //Determine the k i n e t i c energy o f the system, where a l l the mass po in t has a mass parameter m = 1.0

{int i1 , i2 , i 3 ;double Tkin ;

Ttot = 0 . 0 ;

for ( i 1 =1; i1<N−1; i 1++)for ( i 2 =1; i2<N−1; i 2++)

for ( i 3 =0; i3<N3 ; i 3++){

Tkin = 0 . 5* ( vz [ i 1 ] [ i 2 ] [ i 3 ]* vz [ i 1 ] [ i 2 ] [ i 3 ] ) ; //Kine t i cenergy

Ttot = Ttot + Tkin ; //Tota l k i n e t i c energy

45

Page 52: Dynamical Functional Particle Kristo er Karlsson533372/FULLTEXT01.pdf · Kristo er Karlsson Abstract 2012-06-12 Abstract The aim of this master thesis has been to solve the fully

Dynamical Functional ParticleMethod applied to the SchrödingerEquation - Exact solutions ofthree-body exotic ionsKristo�er Karlsson

Appendix D: The programmecodes

2012-06-12

}

Etot = Ttot ; //Tota l mechanical energy

}

//The f i n i t e d i f f e r e n c e s when tak ing the d e r i v a t i v e wi th r e s p e c tto my

double deriv_my ( int i , int j , int k ){double term1 , term2 , term3 , inv12 ;

inv12 = 1 . 0 / 1 2 . 0 ; //Factor f o r the f i n i t e d i f f e r e n c e

i f ( k==1){// term1 = r1r2 [ i ] [ j ]* hmy2inv *( z [ i ] [ j ] [ k−1]−2.0* z [ i ] [ j ] [ k ]+z [

i ] [ j ] [ k+1])*my_func [ k ] ;

term1 = r1r2 [ i ] [ j ] * ( hmy2inv* inv12 ) * (10 .0* z [ i ] [ j ] [ k−1]−15.0* z[ i ] [ j ] [ k ]−4.0* z [ i ] [ j ] [ k+1]+14.0* z [ i ] [ j ] [ k+2]−6.0* z [ i ] [ j ] [k+3]+z [ i ] [ j ] [ k+4])*my_func [ k ] ;

term2 = r1r2 [ i ] [ j ]*2 . 0* z [ i ] [ j ] [ k ]* ( (1 . 0+my[ k ]*my[ k ] ) /my_func[ k ] ) ;

// term3=r1r2 [ i ] [ j ]*2 .0*my[ k ]* hmyinv *( z [ i ] [ j ] [ k]− z [ i ] [ j ] [ k−1]) ;

term3 = r1r2 [ i ] [ j ]*my[ k ]* hmyinv*( z [ i ] [ j ] [ k+1]−z [ i ] [ j ] [ k−1]) ;

// term3=r1r2 [ i ] [ j ]*2 .0*my[ k ]* ( hmyinv* inv12 ) *(−3.0* z [ i ] [ j ] [ k+4]+16.0* z [ i ] [ j ] [ k+3]−36.0* z [ i ] [ j ] [ k+2]+48.0* z [ i ] [ j ] [ k+1]−25.0* z [ i ] [ j ] [ k ] ) ;

return ( term1+term2+term3 ) ;}

elsei f ( k==N3−2){// term1 = r1r2 [ i ] [ j ]* hmy2inv *( z [ i ] [ j ] [ k−1]−2.0* z [ i ] [ j ] [ k ]+z [

i ] [ j ] [ k+1])*my_func [ k ] ;

term1 = r1r2 [ i ] [ j ] * ( hmy2inv* inv12 ) * (10 .0* z [ i ] [ j ] [ k+1]−15.0* z[ i ] [ j ] [ k ]−4.0* z [ i ] [ j ] [ k−1]+14.0* z [ i ] [ j ] [ k−2]−6.0* z [ i ] [ j ] [k−3]+z [ i ] [ j ] [ k−4])*my_func [ k ] ;

term2 = r1r2 [ i ] [ j ]*2 . 0* z [ i ] [ j ] [ k ]* ( (1 . 0+my[ k ]*my[ k ] ) /my_func[ k ] ) ;

// term3=r1r2 [ i ] [ j ]*2 .0*my[ k ]* hmyinv *( z [ i ] [ j ] [ k+1]−z [ i ] [ j ] [ k] ) ;

// term3=r1r2 [ i ] [ j ]*my[ k ]* hmyinv *( z [ i ] [ j ] [ k+1]−z [ i ] [ j ] [ k−1]) ;

term3 = r1r2 [ i ] [ j ]*2 . 0*my[ k ] * ( hmyinv* inv12 ) * (3 . 0* z [ i ] [ j ] [ k

46

Page 53: Dynamical Functional Particle Kristo er Karlsson533372/FULLTEXT01.pdf · Kristo er Karlsson Abstract 2012-06-12 Abstract The aim of this master thesis has been to solve the fully

Dynamical Functional ParticleMethod applied to the SchrödingerEquation - Exact solutions ofthree-body exotic ionsKristo�er Karlsson

Appendix D: The programmecodes

2012-06-12

−4]−16.0* z [ i ] [ j ] [ k−3]+36.0* z [ i ] [ j ] [ k−2]−48.0* z [ i ] [ j ] [ k−1]+25.0* z [ i ] [ j ] [ k ] ) ;

return ( term1+term2+term3 ) ;}

else{term1 = r1r2 [ i ] [ j ] * ( hmy2inv* inv12 )*(−z [ i ] [ j ] [ k−2]+16.0* z [ i

] [ j ] [ k−1]−30.0* z [ i ] [ j ] [ k ]+16.0* z [ i ] [ j ] [ k+1]−z [ i ] [ j ] [ k+2])*my_func [ k ] ;

// term1 = r1r2 [ i ] [ j ]* hmy2inv *( z [ i ] [ j ] [ k−1]−2.0* z [ i ] [ j ] [ k ]+z [ i ] [ j ] [ k+1])*my_func [ k ] ;

term2 = r1r2 [ i ] [ j ]*2 . 0* z [ i ] [ j ] [ k ]* ( (1 . 0+my[ k ]*my[ k ] ) /my_func [ k ] ) ;

// term3 = r1r2 [ i ] [ j ]*my[ k ]* hmyinv *( z [ i ] [ j ] [ k+1]−z [ i ] [ j ] [ k−1]) ;

term3 = r1r2 [ i ] [ j ]*2 . 0*my[ k ] * ( hmyinv* inv12 ) *( z [ i ] [ j ] [ k−2]−z [ i ] [ j ] [ k+2]+8.0*(− z [ i ] [ j ] [ k−1]+z [ i ] [ j ] [ k+1]) ) ;

return ( term1+term2+term3 ) ;}

}

double mass_pol ( int i , int j , int k ){double term1 , term2 , term3 , term4 ;

//Centra l d i f f e r e n c e o f the "mixed" d e r i v a t i v ei f ( ( i==1)&&(j==1)){term1 = 0.25* r_inv_root [ i ]* r_inv_root [ j ] * ( z [ i +1] [ j +1] [ k ] )

/ (4 . 0* h2 ) ;}

elsei f ( i==1){term1 = 0.25* r_inv_root [ i ]* r_inv_root [ j ] * ( z [ i +1] [ j +1] [ k]−z [ i

+1] [ j −1] [ k ] ) / (4 . 0* h2 ) ;}

elsei f ( j==1){term1 = 0.25* r_inv_root [ i ]* r_inv_root [ j ] * ( z [ i +1] [ j +1] [ k]−z [ i

−1] [ j +1] [ k ] ) / (4 . 0* h2 ) ;}

47

Page 54: Dynamical Functional Particle Kristo er Karlsson533372/FULLTEXT01.pdf · Kristo er Karlsson Abstract 2012-06-12 Abstract The aim of this master thesis has been to solve the fully

Dynamical Functional ParticleMethod applied to the SchrödingerEquation - Exact solutions ofthree-body exotic ionsKristo�er Karlsson

Appendix D: The programmecodes

2012-06-12

else{term1 = 0.25* r_inv_root [ i ]* r_inv_root [ j ] * ( z [ i +1] [ j +1] [ k]−z

[ i +1] [ j −1] [ k]−z [ i −1] [ j +1] [ k]+z [ i −1] [ j −1] [ k ] ) / (4 . 0* h2 ) ;}

term2 = (25 . 0 / 16 . 0 ) * r1r2_inv [ i ] [ j ]* z [ i ] [ j ] [ k ] ;

// Simple backward and forward d i f f e r e n c e f o r f i r s t d e r i v a t i v e/*i f ( i==1){term3 = −(5.0/8.0)* r_inverse [ j ]* r_inv_root [ i ]* ( z [ i ] [ j ] [ k ] )

* hinv ;}

i f ( i==N−2){term3 = −(5.0/8.0)* r_inverse [ j ]* r_inv_root [ i ]* ( z [ i +1][ j ] [ k

]− z [ i ] [ j ] [ k ] ) * hinv ;}

e l s e{term3 = −(5.0/8.0)* r_inverse [ j ]* r_inv_root [ i ]* ( z [ i ] [ j ] [ k

]− z [ i −1][ j ] [ k ] ) * hinv ;}

*/term3 = −(5 .0/8 .0) * r_inverse [ j ]* r_inv_root [ i ] * ( z [ i +1] [ j ] [ k]−z [

i −1] [ j ] [ k ] ) *0 .5* hinv ; //Centra l d i f f e r e n c e/*i f ( j==1){term4 = −(5.0/8.0)* r_inverse [ i ]* r_inv_root [ j ]* ( z [ i ] [ j ] [ k ] ) *

hinv ;}

i f ( j==N−2){term4 = −(5.0/8.0)* r_inverse [ i ]* r_inv_root [ j ]* ( z [ i ] [ j +1][ k]−

z [ i ] [ j ] [ k ] ) * hinv ;}

e l s e{term4 = −(5.0/8.0)* r_inverse [ i ]* r_inv_root [ j ]* ( z [ i ] [ j ] [ k]−

z [ i ] [ j −1][ k ] ) * hinv ;}

*/term4 = −(5 .0/8 .0) * r_inverse [ i ]* r_inv_root [ j ] * ( z [ i ] [ j +1] [ k]−z [ i

] [ j −1] [ k ] ) *0 .5* hinv ; // c en t r a l d i f f e r e n c e

return (−(1.0/M_nucl) *my[ k ] * ( term1+term2+term3+term4 ) ) ;// re turn (0 . 0 ) ; f o r hel ium with an i n f i n i t y heavy mass o f the

nuc leus

48

Page 55: Dynamical Functional Particle Kristo er Karlsson533372/FULLTEXT01.pdf · Kristo er Karlsson Abstract 2012-06-12 Abstract The aim of this master thesis has been to solve the fully

Dynamical Functional ParticleMethod applied to the SchrödingerEquation - Exact solutions ofthree-body exotic ionsKristo�er Karlsson

Appendix D: The programmecodes

2012-06-12

}

double sderiv_x1x2 ( int i , int j , int k ){double inv12 ;

inv12 = 1 . 0 / 1 2 . 0 ; //Factor

/* Express ions o f the d i f f e r e n t second d e r i v a t i v e sd2/dx20.25* r_inv_root [ i ]* ( h2inv* inv12 ) *(10.0* z [ i −1][ j ] [ k ]* r_inv_root [

i −1]−15.0* z [ i ] [ j ] [ k ]* r_inv_root [ i ]−4.0* z [ i +1][ j ] [ k ]*r_inv_root [ i +1]+14.0* z [ i +2][ j ] [ k ]* r_inv_root [ i +2]−6.0* z [ i+3][ j ] [ k ]* r_inv_root [ i+3]+z [ i +4][ j ] [ k ]* r_inv_root [ i +4])

d2/dy20.25* r_inv_root [ j ]* ( h2inv* inv12 ) *(10.0* z [ i ] [ j −1][ k ]* r_inv_root [

j −1]−15.0* z [ i ] [ j ] [ k ]* r_inv_root [ j ]−4.0* z [ i ] [ j +1][ k ]*r_inv_root [ j +1]+14.0* z [ i ] [ j +2][ k ]* r_inv_root [ j +2]−6.0* z [ i ] [ j+3][ k ]* r_inv_root [ j+3]+z [ i ] [ j +4][ k ]* r_inv_root [ j +4])

*/

i f ( ( i==1)&&(j==1)){return (0 . 25* r_inv_root [ i ]* h2inv *( r_inv_root [ i −1]* z [ i −1] [ j ] [ k

]−2.0* r_inv_root [ i ]* z [ i ] [ j ] [ k]+r_inv_root [ i +1]* z [ i +1] [ j ] [k ] ) +0.25* r_inv_root [ j ]* h2inv *( r_inv_root [ j −1]* z [ i ] [ j −1] [ k]−2.0* r_inv_root [ j ]* z [ i ] [ j ] [ k]+r_inv_root [ j +1]* z [ i ] [ j +1] [k ] ) ) ;

}

elsei f ( ( i==1)&&(j==N−2) ){return (0 . 25* r_inv_root [ i ]* h2inv *( r_inv_root [ i −1]* z [ i −1] [ j ] [ k

]−2.0* r_inv_root [ i ]* z [ i ] [ j ] [ k]+r_inv_root [ i +1]* z [ i +1] [ j ] [k ] ) +0.25* r_inv_root [ j ]* h2inv *( r_inv_root [ j −1]* z [ i ] [ j −1] [ k]−2.0* r_inv_root [ j ]* z [ i ] [ j ] [ k]+r_inv_root [ j +1]* z [ i ] [ j +1] [k ] ) ) ;

}

elsei f ( ( i==N−2)&&(j==1))return (0 . 25* r_inv_root [ i ]* h2inv *( r_inv_root [ i −1]* z [ i −1] [ j ] [ k

]−2.0* r_inv_root [ i ]* z [ i ] [ j ] [ k]+r_inv_root [ i +1]* z [ i +1] [ j ] [ k] ) + 0.25* r_inv_root [ j ]* h2inv *( r_inv_root [ j −1]* z [ i ] [ j −1] [ k]−2.0* r_inv_root [ j ]* z [ i ] [ j ] [ k]+r_inv_root [ j +1]* z [ i ] [ j +1] [ k] ) ) ;

elsei f ( ( i==N−2)&&(j==N−2) )return (0 . 25* r_inv_root [ i ]* h2inv *( r_inv_root [ i −1]* z [ i −1] [ j ] [ k

]−2.0* r_inv_root [ i ]* z [ i ] [ j ] [ k]+r_inv_root [ i +1]* z [ i +1] [ j ] [ k] ) + 0.25* r_inv_root [ j ]* h2inv *( r_inv_root [ j −1]* z [ i ] [ j −1] [ k]−2.0* r_inv_root [ j ]* z [ i ] [ j ] [ k]+r_inv_root [ j +1]* z [ i ] [ j +1] [ k] ) ) ;

49

Page 56: Dynamical Functional Particle Kristo er Karlsson533372/FULLTEXT01.pdf · Kristo er Karlsson Abstract 2012-06-12 Abstract The aim of this master thesis has been to solve the fully

Dynamical Functional ParticleMethod applied to the SchrödingerEquation - Exact solutions ofthree-body exotic ionsKristo�er Karlsson

Appendix D: The programmecodes

2012-06-12

elsei f ( ( i==1) | | ( i==N−2) )

return (0 . 25* r_inv_root [ i ]* h2inv *( r_inv_root [ i −1]* z [ i −1] [ j ] [ k]−2.0* r_inv_root [ i ]* z [ i ] [ j ] [ k]+r_inv_root [ i +1]* z [ i +1] [ j ] [ k] ) + 0.25* r_inv_root [ j ] * ( h2inv* inv12 )*(−r_inv_root [ j −2]* z [i ] [ j −2] [ k ]+16.0* r_inv_root [ j −1]* z [ i ] [ j −1] [ k ]−30.0*r_inv_root [ j ]* z [ i ] [ j ] [ k ]+16.0* r_inv_root [ j +1]* z [ i ] [ j +1] [ k]−r_inv_root [ j +2]* z [ i ] [ j +2] [ k ] ) ) ;

elsei f ( ( j==1) | | ( j==N−2) )

return (0 . 25* r_inv_root [ i ] * ( h2inv* inv12 )*(−r_inv_root [ i −2]* z [ i−2] [ j ] [ k ]+16.0* r_inv_root [ i −1]* z [ i −1] [ j ] [ k ]−30.0* r_inv_root[ i ]* z [ i ] [ j ] [ k ]+16.0* r_inv_root [ i +1]* z [ i +1] [ j ] [ k]− r_inv_root[ i +2]* z [ i +2] [ j ] [ k ] ) + 0.25* r_inv_root [ j ]* h2inv *( r_inv_root [j −1]* z [ i ] [ j −1] [ k ]−2.0* r_inv_root [ j ]* z [ i ] [ j ] [ k]+r_inv_root [ j+1]* z [ i ] [ j +1] [ k ] ) ) ;

elsereturn (0 . 25* r_inv_root [ i ] * ( h2inv* inv12 )*(−r_inv_root [ i −2]* z [ i

−2] [ j ] [ k ]+16.0* r_inv_root [ i −1]* z [ i −1] [ j ] [ k ]−30.0* r_inv_root[ i ]* z [ i ] [ j ] [ k ]+16.0* r_inv_root [ i +1]* z [ i +1] [ j ] [ k]− r_inv_root[ i +2]* z [ i +2] [ j ] [ k ] ) + 0.25* r_inv_root [ j ] * ( h2inv* inv12 )*(−r_inv_root [ j −2]* z [ i ] [ j −2] [ k ]+16.0* r_inv_root [ j −1]* z [ i ] [ j−1] [ k ]−30.0* r_inv_root [ j ]* z [ i ] [ j ] [ k ]+16.0* r_inv_root [ j +1]* z[ i ] [ j +1] [ k]− r_inv_root [ j +2]* z [ i ] [ j +2] [ k ] ) ) ;

}

void move_part ic les (void ){int i1 , i2 , i 3 ;double funct iona l_z ;double temp ;

for ( i 1 =1; i1<N−1; i 1++)for ( i 2 =1; i2<N−1; i 2++)

for ( i 3 =1; i3<N3−1; i 3++){

zz [ i 1 ] [ i 2 ] [ i 3 ] = z [ i 1 ] [ i 2 ] [ i 3 ] ;}

sum_func=0.0 ;

for ( i 1 =1; i1<N−1; i 1++)for ( i 2 =1; i2<N−1; i 2++)

for ( i 3 =1; i3<N3−1; i 3++){funct iona l_z = ( r_inv [ i 1 ]+r_inv [ i 2 ]− e i g+rsq_inv [ i 1 ]+

rsq_inv [ i 2 ]+r12_inv [ i 1 ] [ i 2 ] [ i 3 ] ) *z [ i 1 ] [ i 2 ] [ i 3 ]+mass_pol ( i1 , i2 , i 3 )−0.5* red_mass_inv* sderiv_x1x2 ( i1, i2 , i 3 )−0.5* red_mass_inv*deriv_my ( i1 , i2 , i 3 ) ;

sum_func = funct iona l_z * funct iona l_z+sum_func ;

50

Page 57: Dynamical Functional Particle Kristo er Karlsson533372/FULLTEXT01.pdf · Kristo er Karlsson Abstract 2012-06-12 Abstract The aim of this master thesis has been to solve the fully

Dynamical Functional ParticleMethod applied to the SchrödingerEquation - Exact solutions ofthree-body exotic ionsKristo�er Karlsson

Appendix D: The programmecodes

2012-06-12

Accz = −funct iona l_z *r1r2_norm [ i 1 ] [ i 2 ]−bdamp*vz [ i 1 ] [i 2 ] [ i 3 ] ; // change r1r2_norm [ i1 ] [ i 2 ] f o r havinganother cond i t i on

// Symplec t i c Euler s t ep methodvz [ i 1 ] [ i 2 ] [ i 3 ] = vz [ i 1 ] [ i 2 ] [ i 3 ]+Accz*DT;zz [ i 1 ] [ i 2 ] [ i 3 ] = zz [ i 1 ] [ i 2 ] [ i 3 ]+vz [ i 1 ] [ i 2 ] [ i 3 ]*DT;

}

for ( i 1 =1; i1<N−1; i 1++)for ( i 2 =1; i2<N−1; i 2++)

for ( i 3 =1; i3<N3−1; i 3++){

z [ i 1 ] [ i 2 ] [ i 3 ] = zz [ i 1 ] [ i 2 ] [ i 3 ] ;}

}

int round2 (double number ) // rounds a number to an i n t e g e r{return ( number >= 0) ? ( int ) ( number+0.5) : ( int ) (number−0.5) ;

}

void i n i t (void ){int i1 , i2 , i 3 ;int i , j ;

//DT = 0.0008 ;

h_size = h_size +2.0 ; // the number o f p a r t i c l e s inc rea se inevery s t ep to have ene r g i e s f o r d i f f e r e n t s t ep s i z e s

i f ( h_size == h_size_eig +2.0){

e x i t (0 ) ; // the programme s top s and c l o s e s}

// D i s c r e t i z a t i o n in x1 , x2h = 2 .0/ ( h_size −1.0) ; // the s t ep s i z e f o r x1 and x2

DT = 0.11*h*h ; //how the time s t ep depends on the s t ep s i z ehinv = 1.0/h ; // the inv e r s e o f the s t ep s i z e , used in the

programmeh2 = h*h ; h2inv = 1.0/ h2 ;N = 1+round2 ( sq r t (R) /h) ; // determine number o f p a r t i c l e s as an

i n t e g e r

// D i s c r e t i z a t i o n in myhmy = h ;

51

Page 58: Dynamical Functional Particle Kristo er Karlsson533372/FULLTEXT01.pdf · Kristo er Karlsson Abstract 2012-06-12 Abstract The aim of this master thesis has been to solve the fully

Dynamical Functional ParticleMethod applied to the SchrödingerEquation - Exact solutions ofthree-body exotic ionsKristo�er Karlsson

Appendix D: The programmecodes

2012-06-12

hmyinv = 1.0/hmy;hmy2 = hmy*hmy; hmy2inv = 1.0/hmy2 ;N3 = 1+round2 (2 . 0/hmy) ;

i f ( (N>ARRAY) | | ( N3>ARRAY2) ){puts ( " Please check the s i z e o f ARRAY!\ n" ) ;e x i t (0 ) ;

}

for ( i 1 =0; i1<N; i 1++){x [ i 1 ] = (double ) ( i 1 ) *h ;

}

for ( i 3 =0; i3<N3 ; i 3++){my[ i 3 ] = −1.0+(double ) ( i 3 ) *hmy;}

for ( i 3 =0; i3<N3 ; i 3++){my_func [ i 3 ] = 1.0−my[ i 3 ]*my[ i 3 ] ; // f a c t o r used in the

programme}

for ( i 1 =1; i1<N; i 1++)for ( i 2 =1; i2<N; i 2++)

for ( i 3 =0; i3<N3 ; i 3++){i f ( ( i 3==N3−1)&&(i 1==i2 ) )

{r12_inv [ i 1 ] [ i 2 ] [ i 3 ] = 0 . 0 ;

}

else{

r12_inv [ i 1 ] [ i 2 ] [ i 3 ] = (Z_orb*Z_orb) / sq r t (pow(x [ i 1 ] , 4 . 0 )+pow(x [ i 2 ] , 4 . 0 ) −2.0*pow(x [ i 1 ] , 2 . 0 ) *pow(x [ i 2 ] , 2 . 0 ) *my[ i 3 ] ) ;}

}

for ( i 1 =1; i1<N; i 1++)for ( i 2 =1; i2<N; i 2++)

{r1r2 [ i 1 ] [ i 2 ] = 1 . 0/ (pow(x [ i 1 ] , 4 . 0 ) ) +1.0/(pow(x [ i 2 ] , 4 . 0 ) )

;r1r2_inv [ i 1 ] [ i 2 ] = 1 . 0/ (pow(x [ i 1 ] , 2 . 0 ) *pow(x [ i 2 ] , 2 . 0 ) ) ;

}

for ( i 1 =1; i1<N; i 1++){rsq_inv [ i 1 ] = −0.5* red_mass_inv *(−3.0/16.0) * ( 1 . 0 / ( pow(x [ i 1

] , 4 . 0 ) ) ) ;// rsq_inv [ i1 ] = −0.5*red_mass_inv * (5 .0/16 .0 ) * (1 .0/( pow( x [

i1 ] , 4 . 0 ) ) ) ;

52

Page 59: Dynamical Functional Particle Kristo er Karlsson533372/FULLTEXT01.pdf · Kristo er Karlsson Abstract 2012-06-12 Abstract The aim of this master thesis has been to solve the fully

Dynamical Functional ParticleMethod applied to the SchrödingerEquation - Exact solutions ofthree-body exotic ionsKristo�er Karlsson

Appendix D: The programmecodes

2012-06-12

r_inv_root [ i 1 ] = 1 .0/ x [ i 1 ] ;r_inverse [ i 1 ] = 1 .0/pow(x [ i 1 ] , 2 . 0 ) ;r_inv [ i 1 ] = (Z_nucl*Z_orb) /(pow(x [ i 1 ] , 2 . 0 ) ) ;}

for ( i 1 =1; i1<N; i 1++)for ( i 2 =1; i2<N; i 2++)

{r1r2_norm [ i 1 ] [ i 2 ]= pow(x [ i 1 ] , 2 . 0 ) *pow(x [ i 2 ] , 2 . 0 ) ; //a

cond i t i on f a c t o r f o r the f un c t i o na l to decrease theconvergence time and avoid numerical e r ror

}

for ( i 1 =1; i1<N; i 1++)for ( i 2 =1; i2<N; i 2++)

for ( i 3 =1; i3<N3−1; i 3++){/*i f ( ( doub le ) ( random () ) /( doub le ) (RAND_MAX) >0.5){vz [ i1 ] [ i 2 ] [ i 3 ] = ( doub le ) ( random () ) /( doub le ) (

RAND_MAX) ;}

e l s e{vz [ i1 ] [ i 2 ] [ i 3 ] = −(doub le ) ( random () ) /( doub le ) (

RAND_MAX) ;}

*/z [ i 1 ] [ i 2 ] [ i 3 ] = 10 .0*pow(x [ i 1 ] , 2 . 0 ) *pow(x [ i 2 ] , 2 . 0 ) *

exp(−pow(x [ i 1 ] , 2 . 0 ) ) *exp(−pow(x [ i 2 ] , 2 . 0 ) ) ;

// z [ i1 ] [ i 2 ] [ i 3 ] = ( doub le ) ( random () ) /( doub le ) (RAND_MAX) ; //Random i n i t i a l v a l u e s

vz [ i 1 ] [ i 2 ] [ i 3 ] = 0 . 0 ;}

//Boundary cond i t i on sfor ( i =0; i<N; i++)

for ( j =1; j<N3−1; j++){

z [ 0 ] [ i ] [ j ] = 0 . 0 ;z [ i ] [ 0 ] [ j ] = 0 . 0 ;

z [N−1] [ i ] [ j ] = 0 . 0 ;z [ i ] [ N−1] [ j ] = 0 . 0 ;

}

for ( i =0; i<N; i++)for ( j =0; j<N; j++)

{z [ i ] [ j ] [ 0 ] = 0 . 0 ;z [ i ] [ j ] [ N3−1] = 0 . 0 ;

}

53

Page 60: Dynamical Functional Particle Kristo er Karlsson533372/FULLTEXT01.pdf · Kristo er Karlsson Abstract 2012-06-12 Abstract The aim of this master thesis has been to solve the fully

Dynamical Functional ParticleMethod applied to the SchrödingerEquation - Exact solutions ofthree-body exotic ionsKristo�er Karlsson

Appendix D: The programmecodes

2012-06-12

norm ( ) ;/*f o r ( i =0; i<N3; i++)

{p r i n t f ("my−mesh = %l f \n" ,my[ i ] ) ;

}

ge t char ( ) ;

f o r ( i =0; i<N; i++){p r i n t f (" x−mesh = %l f \n" , x [ i ] ) ;

}

ge t char ( ) ;*/

}

void norm(void ){double sum1 , sum2 , sum3 , h3 ;double ybi s s , yb i s s2 , yb i s s3 , f a c t o r ;int i1 , i2 , i3 , i , j ;

// ant i−symmetry ( f o r e x c i t e d s t a t e s )/*f o r ( i =1; i<N−2; i++)

f o r ( j=i +1; j<N−1; j++)f o r ( i3 =1; i3<N3−1; i3++)

{z [ i ] [ j ] [ i 3 ] = −z [ j ] [ i ] [ i 3 ] ;

}*/

//Trapez ioda l r u l e f o r the i n t e g r a l f o r the energy E and thenorma l i za t ion f a c t o r f o r < z | z > = 1

h3 = h2*hmy;

sum1 = 0 . 0 ;

for ( i 1 =1; i1<N−1; i 1++)for ( i 2 =1; i2<N−1; i 2++)

for ( i 3 =1; i3<N3−1; i 3++){sum1 = sum1+z [ i 1 ] [ i 2 ] [ i 3 ]* z [ i 1 ] [ i 2 ] [ i 3 ] ;

}

sum1 = h3*sum1 ;

54

Page 61: Dynamical Functional Particle Kristo er Karlsson533372/FULLTEXT01.pdf · Kristo er Karlsson Abstract 2012-06-12 Abstract The aim of this master thesis has been to solve the fully

Dynamical Functional ParticleMethod applied to the SchrödingerEquation - Exact solutions ofthree-body exotic ionsKristo�er Karlsson

Appendix D: The programmecodes

2012-06-12

f a c t o r = 1 .0/ sq r t ( sum1) ;

for ( i 1 =1; i1<N−1; i 1++)for ( i 2 =1; i2<N−1; i 2++)

for ( i 3 =1; i3<N3−1; i 3++){z [ i 1 ] [ i 2 ] [ i 3 ] = f a c t o r *z [ i 1 ] [ i 2 ] [ i 3 ] ; //Normal izat ion

}

sum2 = 0 . 0 ;h3 = h2*hmy;

for ( i 1 =1; i1<N−1; i 1++)for ( i 2 =1; i2<N−1; i 2++)

for ( i 3 =1; i3<N3−1; i 3++){yb i s s = sderiv_x1x2 ( i1 , i2 , i 3 ) ;yb i s s 2 = deriv_my ( i1 , i2 , i 3 ) ;yb i s s 3 = mass_pol ( i1 , i2 , i 3 ) ;

sum2 = sum2+(r_inv [ i 1 ]+r_inv [ i 2 ]+rsq_inv [ i 1 ]+rsq_inv [i 2 ]+r12_inv [ i 1 ] [ i 2 ] [ i 3 ] ) *z [ i 1 ] [ i 2 ] [ i 3 ]* z [ i 1 ] [ i 2 ] [i 3 ]+(−0.5* red_mass_inv *( yb i s s+yb i s s 2 ) ) *z [ i 1 ] [ i 2 ] [i 3 ]+ yb i s s 3 *z [ i 1 ] [ i 2 ] [ i 3 ] ;

}

e i g = h3*sum2 ; // the determined energy

}

55