The goal of this program is to find numerical solutions to the eigenvalue problem, the time-independent Schrodinger Equation.
We will work in 1 dimension so the equation becomes:
We want to solve this for different potentials V(x). The potentials will be infinite square well, harmonic oscillator and Woods Saxon potential. We can compare analytically for infinite square well and the harmonic oscillator but the Woods Saxon has no analytical solution and requires numerical methods.
We will discretize the wavefunction on a lattice, turning it into a column vector. On the same lattice, the potential energy will be a diagonal matrix, while the kinetic energy will be a tridiagonal matrix. Therefore the Hamiltonian will be another tridiagonal matrix. We can then use the lapack library to find the eigenvalues (energies) and eigenvectors (wavefunctions). If you can't install lapack on your system you can use the tqli and eigsrt subroutines provided in the code.
Remember the ultimate goal is to find the eigenenergies and eigenfunctions for the Woods Saxon potential:
The wavefunction will be discretized in a “box” from –L to +L, with N
points and a step size dx = (2L)/(N-1). Hence the sampled points for x will
be x(i) = -L + dx*(i-1).
The kinetic energy is slightly subtler, but not much. Remember that it is +hbar**2/mass/dx**2 and along
the off-diagonal also a constant -0.5*hbar**2/mass/dx**2.
Adding the potential and kinetic energy matrices and we have a discretized representation of the Hamiltonian.
With all that being said, these are the parts of the program.
The first potential is the particle in a box scenario in which
The particle in a box scenario is a very well understood problem and is a common homework problem for any physics undergrad in a quantum
mechanics course. These have analytical closed form solutions that we can compare to. In fact if we were to plot these eigenfunctions we expect
sines and cosines. And we can compare the eigenvalues using this analytical formula:
Our numerical solutions may not exactly match which is fine. We have a second order derivative with only a first order approximation after all. The program will print the 3 lowest analytical and numerical energies on the screen then write in a file the three normalized probability densities and the sampled points.
The next part does the same thing but with the quantum harmonic oscillator where
The last part of this program is the Woods Saxon potential
Once the program is finished we can head over to jupyter and there should be 4 different plots:
- The ground state normalized probability density for the 3 different problems 2.The 1st excited state normalized probability density for the 3 different problems 3.The 2nd excited state normalized probability density for the 3 different problems 4.The three lowest energies for the Woods-Saxon potential as a function of the radius
It would be quite beneficial to you if you had a Linux system because it would enable you to use the makefile included. If you don't then you'll need to adjust the source code itself to solve the eigenvalue problem.
If this is the case then what you do is open a terminal, use the cd command to change to this directory.
Then type make.
You'll see some gfortran commands being executed. All of this has created an exectuable file called woods_saxon
Then the program will ask for input. Traps have been set in case you accidentally enter invalid input.
Results will be displayed on screen and written into several files. Now you can head over to Jupyter Notebook to analyze the results.