Trying to verify my program's output

  • Context: Graduate 
  • Thread starter Thread starter ognik
  • Start date Start date
  • Tags Tags
    Kinetic Output
Click For Summary

Discussion Overview

The discussion revolves around verifying the output of a Fortran program designed to calculate the kinetic energy matrix for a non-relativistic, 1-D radial Schrödinger system using the Lagrange-Laguerre Mesh method. Participants explore the accuracy of the program's results, the significance of alternating signs in matrix elements, and the appropriate units for the calculations.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Homework-related

Main Points Raised

  • One participant has verified the roots of the Laguerre polynomial for certain values of alpha and seeks confirmation on the accuracy of the kinetic elements T_{ij} in their output.
  • Another participant suggests alternative methods to compute eigenvalues of a 1-D Hamiltonian, including direct integration of the Time Independent Schrödinger Equation (TISE) and checking the behavior of the wave function at infinity.
  • There is a concern about the alternating signs of the matrix elements, with one participant suspecting a potential bug in the program.
  • Participants discuss the need for experimental or exact results to compare against the computed values, particularly to validate the accuracy of the results and to identify potential programming errors.
  • One participant mentions that the assignment's goal is to understand the Lagrange-Laguerre method and to analyze how different parameters affect the results, emphasizing the need for verification through comparison with known results.
  • There is a request for insights on whether values on the order of O(1 GeV) are reasonable, as this could indicate if there is a programming issue if the values are significantly off.

Areas of Agreement / Disagreement

Participants express varying degrees of uncertainty regarding the accuracy of the program's output and the significance of the results. There is no consensus on the correctness of the values or the presence of a programming bug, and multiple viewpoints on verification methods are presented.

Contextual Notes

Participants note limitations in finding experimental results for comparison and the challenges of verifying numerical methods. There are also discussions about the implications of using different units and the need for clarity on the definitions used in the calculations.

Who May Find This Useful

This discussion may be useful for students and researchers working on numerical methods in quantum mechanics, particularly those interested in the Lagrange-Laguerre method and the verification of computational results in theoretical physics.

ognik
Messages
626
Reaction score
2
Hi - I have written a Fortran 'beginner' program to find the kinetic energy matrix for a simplistic non-relatavistic, 1-D, radial Schrödinger 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.
 

Attachments

  • Like
Likes   Reactions: Dr. Courtney
Physics news on Phys.org
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.
 
  • Like
Likes   Reactions: ognik
Dr. Courtney said:
This is computationally intensive and time consuming, but computers are fast. But double checking eigenvalues computed with another method is child's play.
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.
 
ognik said:
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.

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.
 

Attachments

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 ...
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
3K
Replies
19
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 16 ·
Replies
16
Views
3K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 41 ·
2
Replies
41
Views
5K
  • · Replies 138 ·
5
Replies
138
Views
9K
  • · Replies 3 ·
Replies
3
Views
4K
Replies
3
Views
2K