Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Trying to verify my program's output

  1. Nov 9, 2015 #1
    Hi - I have written a Fortran 'beginner' program to find the kinetic energy matrix for a simplistic non-relatavistic, 1-D, radial Schrodinger system - using the Lagrange - Laguerre Mesh method. Firstly, I have verified that my roots for the Laguerre poly ##L^{\alpha}_{N}(x_{i}) = 0## are correct for ##\alpha = 0##, they look OK for other values of ##\alpha##.

    What I'd like to know, is if my kinetic elements ##T_{ij}## are at least in the right ballpark? I haven't been able to find any experimental or exact results to compare with. I have uploaded an output csv output file which I hope is self-explanatory - would appreciate any insights on the kinetic Matrix in the file please.

    I am also looking for insight into why my matrix elements have alternating sign - I suspect a program bug :-(

    I have sourced understanding & formulae from the rather impressive article - D Baye, Physics Reports 565, 1107 (2015) - and have appended the essential formulae section I used into the csv file.

    Finally, the units are a little unclear to me, this is the first time I have done anything like this, I believe these eqtns are in natural units with ##\hbar## = 1, and m = 1 eV. I think the natural units are Gev, so my value are O(1Gev) which seems about right - but would really appreciate confirmation?

    If you could comment on whatever aspects you can, all knowledge is useful, thanks.

    Attached Files:

  2. jcsd
  3. Nov 9, 2015 #2
    If I recall correctly, there are two other ways to compute the eigenvalues of a 1-D Hamiltonian. The harder way is to choose an orthonormal basis compute all the matrix elements and diagonalize. The easy way to double check answers you already have is to directly integrate the TISE and confirm that the wave function goes to zero at infinity for the values of energy that are eigenvalues. Of course, you don't really integrate to infinity, but you integrate a bit past the classical turning point and confirm that the wave function is decreasing exponentially or faster.

    You can search out eigenvalues of 1-D Hamiltonians with this method with an iterative guess-check method. This is computationally intensive and time consuming, but computers are fast. But double checking eigenvalues computed with another method is child's play.
  4. Nov 10, 2015 #3
    I unfortunately don't have a lot of time and was hoping that either someone would look at my matrix and say if they are in the ball park or not - based on their experience etc. (just a best effort basis) OR point me at some research which includes a table of results from a similar exercise? Thanks.
  5. Nov 11, 2015 #4
    I don't play the game "is this right, prof."

    I do empower students to figure out on their own whether a solution is correct.

    The attached text file is a c program that computes the wave function for a given hamiltonian and energy level.

    It uses atomic units (hbar = m = e = 1). If the wave function goes to zero beyond the classical turning point, you have an eigenvalue.

    The potential in the code is V(z) = -1/sqrt(z*z+a*a), where z is the spatial variable and a is a parameter.

    It is simple and obvious how to put in any potential function you wish.

    Attached Files:

  6. Nov 11, 2015 #5
    The assignment was mainly to understand and implement the Lagrange-laguerre method - and then finish by commenting on the results for differing input params to show understanding of how those params. (alpha and lattice size) affect the results. I have thuis already completed the bulk of the assignment. But in order to comment on how lattice size for example affects the accuracy, I need some way of knowing what is accurate - I think that numerical methods like this need to be verifiable in some way - preferably through comparison with experimental evidence (which is what I was really hoping to find).

    I am pretty sure of the method, so the other thing I was hoping to hear is that values O(1Gev) were reasonable - if they are significantly off, then it would almost certainly be a pgm bug, but again I would need to know if the results were off (and preferably by what factor) to drive any debugging effort.

    So thanks for the pgm, have never worked with c, will find an IDE and have a go ....
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook